sanity-plugin-bynder-input
4.1.44.1.5
dist/_chunks-es/BynderModalLayout.js+
dist/_chunks-es/BynderModalLayout.jsNew file+33739
Index: package/dist/_chunks-es/BynderModalLayout.js
===================================================================
--- package/dist/_chunks-es/BynderModalLayout.js
+++ package/dist/_chunks-es/BynderModalLayout.js
@@ -0,0 +1,33739 @@
+import { c } from "react/compiler-runtime";
+import * as e from "react";
+import * as aaaaaaa from "react/jsx-runtime";
+import { jsx } from "react/jsx-runtime";
+import * as t from "react-dom";
+var n = {
+ 294: function(e) {
+ e.exports = function(e) {
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= 9007199254740991;
+ };
+ },
+ 346: function(e) {
+ e.exports = function(e) {
+ return typeof e == "object" && !!e;
+ };
+ },
+ 392: function(e) {
+ e.exports = function(e, t) {
+ return e?.[t];
+ };
+ },
+ 458: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "Ondoorzichtigheid",
+ "datepicker.clear-date": "Datum legen",
+ "datepicker.next-month": "Volgende maand",
+ "datepicker.open-calendar": "Kalender openen",
+ "datepicker.previous-month": "Vorige maand",
+ "input.clear": "Invoer wissen",
+ "input.hide-password": "Verberg wachtwoord",
+ "input.show-password": "Laat wachtwoord zien",
+ "modal.close": "Sluiten",
+ "multiselectchips.add-value": "Voeg ‘{value}’ toe",
+ "multiselectchips.remove-all": "Verwijder alles",
+ "pagination.next-page": "Volgende pagina",
+ "pagination.previous-page": "Vorige pagina"
+ };
+ },
+ 659: function(e, t, n) {
+ var r = n(1873), o = Object.prototype, i = o.hasOwnProperty, a = o.toString, s = r ? r.toStringTag : void 0;
+ e.exports = function(e) {
+ var t = i.call(e, s), n = e[s];
+ try {
+ e[s] = void 0;
+ var r = !0;
+ } catch {}
+ var o = a.call(e);
+ return r && (t ? e[s] = n : delete e[s]), o;
+ };
+ },
+ 786: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "Opacidad",
+ "datepicker.clear-date": "Borrar fecha",
+ "datepicker.next-month": "Próximo mes",
+ "datepicker.open-calendar": "Abrir calendario",
+ "datepicker.previous-month": "Mes anterior",
+ "input.clear": "Borrar entrada",
+ "input.hide-password": "Ocultar contraseña",
+ "input.show-password": "Mostrar contraseña",
+ "modal.close": "Cerrar",
+ "multiselectchips.add-value": "Agregar ‘{value}’",
+ "multiselectchips.remove-all": "Quitar todos",
+ "pagination.next-page": "Siguiente página",
+ "pagination.previous-page": "Página anterior"
+ };
+ },
+ 1020: function(e, t, n) {
+ /**
+ * @license React
+ * react-jsx-runtime.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+ t.Fragment = aaaaaaa.Fragment, t.jsx = aaaaaaa.jsx, t.jsxs = aaaaaaa.jsxs;
+ },
+ 1089: function(e, t, n) {
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.addClassName = c, t.addEvent = function(e, t, n, r) {
+ if (!e) return;
+ let o = {
+ capture: !0,
+ ...r
+ };
+ e.addEventListener ? e.addEventListener(t, n, o) : e.attachEvent ? e.attachEvent("on" + t, n) : e["on" + t] = n;
+ }, t.addUserSelectStyles = function(e) {
+ if (!e) return;
+ let t = e.getElementById("react-draggable-style-el");
+ t || (t = e.createElement("style"), t.type = "text/css", t.id = "react-draggable-style-el", t.innerHTML = ".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n", t.innerHTML += ".react-draggable-transparent-selection *::selection {all: inherit;}\n", e.getElementsByTagName("head")[0].appendChild(t)), e.body && c(e.body, "react-draggable-transparent-selection");
+ }, t.createCSSTransform = function(e, t) {
+ let n = l(e, t, "px");
+ return { [(0, o.browserPrefixToKey)("transform", o.default)]: n };
+ }, t.createSVGTransform = function(e, t) {
+ return l(e, t, "");
+ }, t.getTouch = function(e, t) {
+ return e.targetTouches && (0, r.findInArray)(e.targetTouches, ((e) => t === e.identifier)) || e.changedTouches && (0, r.findInArray)(e.changedTouches, ((e) => t === e.identifier));
+ }, t.getTouchIdentifier = function(e) {
+ return e.targetTouches && e.targetTouches[0] ? e.targetTouches[0].identifier : e.changedTouches && e.changedTouches[0] ? e.changedTouches[0].identifier : void 0;
+ }, t.getTranslation = l, t.innerHeight = function(e) {
+ let t = e.clientHeight, n = e.ownerDocument.defaultView.getComputedStyle(e);
+ return t -= (0, r.int)(n.paddingTop), t -= (0, r.int)(n.paddingBottom), t;
+ }, t.innerWidth = function(e) {
+ let t = e.clientWidth, n = e.ownerDocument.defaultView.getComputedStyle(e);
+ return t -= (0, r.int)(n.paddingLeft), t -= (0, r.int)(n.paddingRight), t;
+ }, t.matchesSelector = s, t.matchesSelectorAndParentsTo = function(e, t, n) {
+ let r = e;
+ do {
+ if (s(r, t)) return !0;
+ if (r === n) return !1;
+ r = r.parentNode;
+ } while (r);
+ return !1;
+ }, t.offsetXYFromParent = function(e, t, n) {
+ let r = t === t.ownerDocument.body ? {
+ left: 0,
+ top: 0
+ } : t.getBoundingClientRect();
+ return {
+ x: (e.clientX + t.scrollLeft - r.left) / n,
+ y: (e.clientY + t.scrollTop - r.top) / n
+ };
+ }, t.outerHeight = function(e) {
+ let t = e.clientHeight, n = e.ownerDocument.defaultView.getComputedStyle(e);
+ return t += (0, r.int)(n.borderTopWidth), t += (0, r.int)(n.borderBottomWidth), t;
+ }, t.outerWidth = function(e) {
+ let t = e.clientWidth, n = e.ownerDocument.defaultView.getComputedStyle(e);
+ return t += (0, r.int)(n.borderLeftWidth), t += (0, r.int)(n.borderRightWidth), t;
+ }, t.removeClassName = u, t.removeEvent = function(e, t, n, r) {
+ if (!e) return;
+ let o = {
+ capture: !0,
+ ...r
+ };
+ e.removeEventListener ? e.removeEventListener(t, n, o) : e.detachEvent ? e.detachEvent("on" + t, n) : e["on" + t] = null;
+ }, t.removeUserSelectStyles = function(e) {
+ if (e) try {
+ if (e.body && u(e.body, "react-draggable-transparent-selection"), e.selection) e.selection.empty();
+ else {
+ let t = (e.defaultView || window).getSelection();
+ t && t.type !== "Caret" && t.removeAllRanges();
+ }
+ } catch {}
+ };
+ var r = n(7056), o = function(e, t) {
+ if (e && e.__esModule) return e;
+ if (e === null || typeof e != "object" && typeof e != "function") return { default: e };
+ var n = i(t);
+ if (n && n.has(e)) return n.get(e);
+ var r = {}, o = Object.defineProperty && Object.getOwnPropertyDescriptor;
+ for (var a in e) if (a !== "default" && Object.prototype.hasOwnProperty.call(e, a)) {
+ var s = o ? Object.getOwnPropertyDescriptor(e, a) : null;
+ s && (s.get || s.set) ? Object.defineProperty(r, a, s) : r[a] = e[a];
+ }
+ return r.default = e, n && n.set(e, r), r;
+ }(n(3514));
+ function i(e) {
+ if (typeof WeakMap != "function") return null;
+ var t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap();
+ return (i = function(e) {
+ return e ? n : t;
+ })(e);
+ }
+ let a = "";
+ function s(e, t) {
+ return a ||= (0, r.findInArray)([
+ "matches",
+ "webkitMatchesSelector",
+ "mozMatchesSelector",
+ "msMatchesSelector",
+ "oMatchesSelector"
+ ], (function(t) {
+ return (0, r.isFunction)(e[t]);
+ })), !!(0, r.isFunction)(e[a]) && e[a](t);
+ }
+ function l(e, t, n) {
+ let { x: r, y: o } = e, i = `translate(${r}${n},${o}${n})`;
+ return t && (i = `translate(${`${typeof t.x == "string" ? t.x : t.x + n}`}, ${`${typeof t.y == "string" ? t.y : t.y + n}`})` + i), i;
+ }
+ function c(e, t) {
+ e.classList ? e.classList.add(t) : e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`)) || (e.className += ` ${t}`);
+ }
+ function u(e, t) {
+ e.classList ? e.classList.remove(t) : e.className = e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`, "g"), "");
+ }
+ },
+ 1278: function(e, t) {
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.jwtDecode = t.InvalidTokenError = void 0;
+ class n extends Error {}
+ t.InvalidTokenError = n, n.prototype.name = "InvalidTokenError", t.jwtDecode = function(e, t) {
+ if (typeof e != "string") throw new n("Invalid token specified: must be a string");
+ t ||= {};
+ let r = !0 === t.header ? 0 : 1, o = e.split(".")[r];
+ if (typeof o != "string") throw new n(`Invalid token specified: missing part #${r + 1}`);
+ let i;
+ try {
+ i = function(e) {
+ let t = e.replace(/-/g, "+").replace(/_/g, "/");
+ switch (t.length % 4) {
+ case 0: break;
+ case 2:
+ t += "==";
+ break;
+ case 3:
+ t += "=";
+ break;
+ default: throw Error("base64 string is not of the correct length");
+ }
+ try {
+ return function(e) {
+ return decodeURIComponent(atob(e).replace(/(.)/g, ((e, t) => {
+ let n = t.charCodeAt(0).toString(16).toUpperCase();
+ return n.length < 2 && (n = "0" + n), "%" + n;
+ })));
+ }(t);
+ } catch {
+ return atob(t);
+ }
+ }(o);
+ } catch (e) {
+ throw new n(`Invalid token specified: invalid base64 for part #${r + 1} (${e.message})`);
+ }
+ try {
+ return JSON.parse(i);
+ } catch (e) {
+ throw new n(`Invalid token specified: invalid json for part #${r + 1} (${e.message})`);
+ }
+ };
+ },
+ 1322: function(e, t, n) {
+ function r(e) {
+ var t, n, o = "";
+ if (typeof e == "string" || typeof e == "number") o += e;
+ else if (typeof e == "object") if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (n = r(e[t])) && (o && (o += " "), o += n);
+ else for (t in e) e[t] && (o && (o += " "), o += t);
+ return o;
+ }
+ function o() {
+ for (var e, t, n = 0, o = ""; n < arguments.length;) (e = arguments[n++]) && (t = r(e)) && (o && (o += " "), o += t);
+ return o;
+ }
+ n.r(t), n.d(t, { clsx: function() {
+ return o;
+ } }), t.default = o;
+ },
+ 1649: function(t) {
+ t.exports = e;
+ },
+ 1726: function(e, t, n) {
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.canDragX = function(e) {
+ return e.props.axis === "both" || e.props.axis === "x";
+ }, t.canDragY = function(e) {
+ return e.props.axis === "both" || e.props.axis === "y";
+ }, t.createCoreData = function(e, t, n) {
+ let o = !(0, r.isNum)(e.lastX), a = i(e);
+ return o ? {
+ node: a,
+ deltaX: 0,
+ deltaY: 0,
+ lastX: t,
+ lastY: n,
+ x: t,
+ y: n
+ } : {
+ node: a,
+ deltaX: t - e.lastX,
+ deltaY: n - e.lastY,
+ lastX: e.lastX,
+ lastY: e.lastY,
+ x: t,
+ y: n
+ };
+ }, t.createDraggableData = function(e, t) {
+ let n = e.props.scale;
+ return {
+ node: t.node,
+ x: e.state.x + t.deltaX / n,
+ y: e.state.y + t.deltaY / n,
+ deltaX: t.deltaX / n,
+ deltaY: t.deltaY / n,
+ lastX: e.state.x,
+ lastY: e.state.y
+ };
+ }, t.getBoundPosition = function(e, t, n) {
+ if (!e.props.bounds) return [t, n];
+ let { bounds: a } = e.props;
+ a = typeof a == "string" ? a : function(e) {
+ return {
+ left: e.left,
+ top: e.top,
+ right: e.right,
+ bottom: e.bottom
+ };
+ }(a);
+ let s = i(e);
+ if (typeof a == "string") {
+ let { ownerDocument: e } = s, t = e.defaultView, n;
+ if (n = a === "parent" ? s.parentNode : e.querySelector(a), !(n instanceof t.HTMLElement)) throw Error("Bounds selector \"" + a + "\" could not find an element.");
+ let i = n, l = t.getComputedStyle(s), c = t.getComputedStyle(i);
+ a = {
+ left: -s.offsetLeft + (0, r.int)(c.paddingLeft) + (0, r.int)(l.marginLeft),
+ top: -s.offsetTop + (0, r.int)(c.paddingTop) + (0, r.int)(l.marginTop),
+ right: (0, o.innerWidth)(i) - (0, o.outerWidth)(s) - s.offsetLeft + (0, r.int)(c.paddingRight) - (0, r.int)(l.marginRight),
+ bottom: (0, o.innerHeight)(i) - (0, o.outerHeight)(s) - s.offsetTop + (0, r.int)(c.paddingBottom) - (0, r.int)(l.marginBottom)
+ };
+ }
+ return (0, r.isNum)(a.right) && (t = Math.min(t, a.right)), (0, r.isNum)(a.bottom) && (n = Math.min(n, a.bottom)), (0, r.isNum)(a.left) && (t = Math.max(t, a.left)), (0, r.isNum)(a.top) && (n = Math.max(n, a.top)), [t, n];
+ }, t.getControlPosition = function(e, t, n) {
+ let r = typeof t == "number" ? (0, o.getTouch)(e, t) : null;
+ if (typeof t == "number" && !r) return null;
+ let a = i(n), s = n.props.offsetParent || a.offsetParent || a.ownerDocument.body;
+ return (0, o.offsetXYFromParent)(r || e, s, n.props.scale);
+ }, t.snapToGrid = function(e, t, n) {
+ return [Math.round(t / e[0]) * e[0], Math.round(n / e[1]) * e[1]];
+ };
+ var r = n(7056), o = n(1089);
+ function i(e) {
+ let t = e.findDOMNode();
+ if (!t) throw Error("<DraggableCore>: Unmounted during event!");
+ return t;
+ }
+ },
+ 1873: function(e, t, n) {
+ e.exports = n(9325).Symbol;
+ },
+ 1882: function(e, t, n) {
+ var r = n(2552), o = n(3805);
+ e.exports = function(e) {
+ if (!o(e)) return !1;
+ var t = r(e);
+ return t == "[object Function]" || t == "[object GeneratorFunction]" || t == "[object AsyncFunction]" || t == "[object Proxy]";
+ };
+ },
+ 1961: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "Opacidad",
+ "datepicker.clear-date": "Borrar fecha",
+ "datepicker.next-month": "Próximo mes",
+ "datepicker.open-calendar": "Abrir calendario",
+ "datepicker.previous-month": "Mes anterior",
+ "input.clear": "Borrar entrada",
+ "input.hide-password": "Ocultar contraseña",
+ "input.show-password": "Mostrar contraseña",
+ "modal.close": "Cerrar",
+ "multiselectchips.add-value": "Agregar ‘{value}’",
+ "multiselectchips.remove-all": "Eliminar todo",
+ "pagination.next-page": "Siguiente página",
+ "pagination.previous-page": "Página anterior"
+ };
+ },
+ 2193: function(e, t, n) {
+ var r = n(8984), o = n(5861), i = n(2428), a = n(6449), s = n(4894), l = n(3656), c = n(5527), u = n(7167), d = Object.prototype.hasOwnProperty;
+ e.exports = function(e) {
+ if (e == null) return !0;
+ if (s(e) && (a(e) || typeof e == "string" || typeof e.splice == "function" || l(e) || u(e) || i(e))) return !e.length;
+ var t = o(e);
+ if (t == "[object Map]" || t == "[object Set]") return !e.size;
+ if (c(e)) return !r(e).length;
+ for (var n in e) if (d.call(e, n)) return !1;
+ return !0;
+ };
+ },
+ 2428: function(e, t, n) {
+ var r = n(7534), o = n(346), i = Object.prototype, a = i.hasOwnProperty, s = i.propertyIsEnumerable;
+ e.exports = r(function() {
+ return arguments;
+ }()) ? r : function(e) {
+ return o(e) && a.call(e, "callee") && !s.call(e, "callee");
+ };
+ },
+ 2552: function(e, t, n) {
+ var r = n(1873), o = n(659), i = n(9350), a = r ? r.toStringTag : void 0;
+ e.exports = function(e) {
+ return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : a && a in Object(e) ? o(e) : i(e);
+ };
+ },
+ 2694: function(e, t, n) {
+ var r = n(6925);
+ function o() {}
+ function i() {}
+ i.resetWarningCache = o, e.exports = function() {
+ function e(e, t, n, o, i, a) {
+ if (a !== r) {
+ var s = /* @__PURE__ */ Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
+ throw s.name = "Invariant Violation", s;
+ }
+ }
+ function t() {
+ return e;
+ }
+ e.isRequired = e;
+ var n = {
+ array: e,
+ bigint: e,
+ bool: e,
+ func: e,
+ number: e,
+ object: e,
+ string: e,
+ symbol: e,
+ any: e,
+ arrayOf: t,
+ element: e,
+ elementType: e,
+ instanceOf: t,
+ node: e,
+ objectOf: t,
+ oneOf: t,
+ oneOfType: t,
+ shape: t,
+ exact: t,
+ checkPropTypes: i,
+ resetWarningCache: o
+ };
+ return n.PropTypes = n, n;
+ };
+ },
+ 2804: function(e, t, n) {
+ e.exports = n(6110)(n(9325), "Promise");
+ },
+ 2833: function(e) {
+ e.exports = function(e, t, n, r) {
+ var o = n ? n.call(r, e, t) : void 0;
+ if (o !== void 0) return !!o;
+ if (e === t) return !0;
+ if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
+ var i = Object.keys(e), a = Object.keys(t);
+ if (i.length !== a.length) return !1;
+ for (var s = Object.prototype.hasOwnProperty.bind(t), l = 0; l < i.length; l++) {
+ var c = i[l];
+ if (!s(c)) return !1;
+ var u = e[c], d = t[c];
+ if (!1 === (o = n ? n.call(r, u, d, c) : void 0) || o === void 0 && u !== d) return !1;
+ }
+ return !0;
+ };
+ },
+ 3151: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "불투명",
+ "datepicker.clear-date": "완료일",
+ "datepicker.next-month": "다음 달",
+ "datepicker.open-calendar": "캘린더 열기",
+ "datepicker.previous-month": "지난달",
+ "input.clear": "입력 지우기",
+ "input.hide-password": "비밀번호 숨기기",
+ "input.show-password": "비밀번호 표시",
+ "modal.close": "닫기",
+ "multiselectchips.add-value": "' {value} ' 추가",
+ "multiselectchips.remove-all": "모두 제거",
+ "pagination.next-page": "다음 페이지",
+ "pagination.previous-page": "이전 페이지"
+ };
+ },
+ 3222: function(e, t, n) {
+ var r = n(7556);
+ e.exports = function(e) {
+ return e == null ? "" : r(e);
+ };
+ },
+ 3514: function(e, t) {
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.browserPrefixToKey = o, t.browserPrefixToStyle = function(e, t) {
+ return t ? `-${t.toLowerCase()}-${e}` : e;
+ }, t.default = void 0, t.getPrefix = r;
+ let n = [
+ "Moz",
+ "Webkit",
+ "O",
+ "ms"
+ ];
+ function r() {
+ var e;
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
+ if (typeof window > "u") return "";
+ let r = (e = window.document) == null || (e = e.documentElement) == null ? void 0 : e.style;
+ if (!r || t in r) return "";
+ for (let e = 0; e < n.length; e++) if (o(t, n[e]) in r) return n[e];
+ return "";
+ }
+ function o(e, t) {
+ return t ? `${t}${function(e) {
+ let t = "", n = !0;
+ for (let r = 0; r < e.length; r++) n ? (t += e[r].toUpperCase(), n = !1) : e[r] === "-" ? n = !0 : t += e[r];
+ return t;
+ }(e)}` : e;
+ }
+ t.default = r();
+ },
+ 3650: function(e, t, n) {
+ e.exports = n(4335)(Object.keys, Object);
+ },
+ 3656: function(e, t, n) {
+ e = n.nmd(e);
+ var r = n(9325), o = n(9935), i = t && !t.nodeType && t, a = i && e && !e.nodeType && e, s = a && a.exports === i ? r.Buffer : void 0, l = (s ? s.isBuffer : void 0) || o;
+ e.exports = l;
+ },
+ 3800: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "Opazität",
+ "datepicker.clear-date": "Datum löschen",
+ "datepicker.next-month": "Nächsten Monat",
+ "datepicker.open-calendar": "Kalender öffnen",
+ "datepicker.previous-month": "Vorheriger Monat",
+ "input.clear": "Eingabe löschen",
+ "input.hide-password": "Passwort verbergen",
+ "input.show-password": "Passwort anzeigen",
+ "modal.close": "Schließen",
+ "multiselectchips.add-value": "Füge ‘{value}’ hinzu",
+ "multiselectchips.remove-all": "Alle entfernen",
+ "pagination.next-page": "Nächste Seite",
+ "pagination.previous-page": "Vorherige Seite"
+ };
+ },
+ 3805: function(e) {
+ e.exports = function(e) {
+ var t = typeof e;
+ return e != null && (t == "object" || t == "function");
+ };
+ },
+ 4108: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "Opacità",
+ "datepicker.clear-date": "Annulla data",
+ "datepicker.next-month": "Il prossimo mese",
+ "datepicker.open-calendar": "Calendario aperto",
+ "datepicker.previous-month": "Il mese scorso",
+ "input.clear": "Ingresso chiaro",
+ "input.hide-password": "Nascondi password",
+ "input.show-password": "Mostra password",
+ "modal.close": "Chiudi",
+ "multiselectchips.add-value": "Aggiungi ‘{value}’",
+ "multiselectchips.remove-all": "Rimuovi tutti",
+ "pagination.next-page": "Pagina seguente",
+ "pagination.previous-page": "Pagina precedente"
+ };
+ },
+ 4335: function(e) {
+ e.exports = function(e, t) {
+ return function(n) {
+ return e(t(n));
+ };
+ };
+ },
+ 4394: function(e, t, n) {
+ var r = n(2552), o = n(346);
+ e.exports = function(e) {
+ return typeof e == "symbol" || o(e) && r(e) == "[object Symbol]";
+ };
+ },
+ 4772: function(e, t, n) {
+ var r = this && this.__createBinding || (Object.create ? function(e, t, n, r) {
+ r === void 0 && (r = n);
+ var o = Object.getOwnPropertyDescriptor(t, n);
+ o && !("get" in o ? !t.__esModule : o.writable || o.configurable) || (o = {
+ enumerable: !0,
+ get: function() {
+ return t[n];
+ }
+ }), Object.defineProperty(e, r, o);
+ } : function(e, t, n, r) {
+ r === void 0 && (r = n), e[r] = t[n];
+ }), o = this && this.__setModuleDefault || (Object.create ? function(e, t) {
+ Object.defineProperty(e, "default", {
+ enumerable: !0,
+ value: t
+ });
+ } : function(e, t) {
+ e.default = t;
+ }), i = this && this.__importStar || function(e) {
+ if (e && e.__esModule) return e;
+ var t = {};
+ if (e != null) for (var n in e) n !== "default" && Object.prototype.hasOwnProperty.call(e, n) && r(t, e, n);
+ return o(t, e), t;
+ }, a = this && this.__awaiter || function(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+ }, s = this && this.__generator || function(e, t) {
+ var n, r, o, i, a = {
+ label: 0,
+ sent: function() {
+ if (1 & o[0]) throw o[1];
+ return o[1];
+ },
+ trys: [],
+ ops: []
+ };
+ return i = {
+ next: s(0),
+ throw: s(1),
+ return: s(2)
+ }, typeof Symbol == "function" && (i[Symbol.iterator] = function() {
+ return this;
+ }), i;
+ function s(s) {
+ return function(l) {
+ return function(s) {
+ if (n) throw TypeError("Generator is already executing.");
+ for (; i && (i = 0, s[0] && (a = 0)), a;) try {
+ if (n = 1, r && (o = 2 & s[0] ? r.return : s[0] ? r.throw || ((o = r.return) && o.call(r), 0) : r.next) && !(o = o.call(r, s[1])).done) return o;
+ switch (r = 0, o && (s = [2 & s[0], o.value]), s[0]) {
+ case 0:
+ case 1:
+ o = s;
+ break;
+ case 4: return a.label++, {
+ value: s[1],
+ done: !1
+ };
+ case 5:
+ a.label++, r = s[1], s = [0];
+ continue;
+ case 7:
+ s = a.ops.pop(), a.trys.pop();
+ continue;
+ default:
+ if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || s[0] !== 6 && s[0] !== 2)) {
+ a = 0;
+ continue;
+ }
+ if (s[0] === 3 && (!o || s[1] > o[0] && s[1] < o[3])) {
+ a.label = s[1];
+ break;
+ }
+ if (s[0] === 6 && a.label < o[1]) {
+ a.label = o[1], o = s;
+ break;
+ }
+ if (o && a.label < o[2]) {
+ a.label = o[2], a.ops.push(s);
+ break;
+ }
+ o[2] && a.ops.pop(), a.trys.pop();
+ continue;
+ }
+ s = t.call(e, a);
+ } catch (e) {
+ s = [6, e], r = 0;
+ } finally {
+ n = o = 0;
+ }
+ if (5 & s[0]) throw s[1];
+ return {
+ value: s[0] ? s[1] : void 0,
+ done: !0
+ };
+ }([s, l]);
+ };
+ }
+ };
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.invalidateAccessToken = void 0, t.getJWT = function() {
+ return a(this, void 0, void 0, (function() {
+ var e;
+ return s(this, (function(t) {
+ switch (t.label) {
+ case 0: return (e = u.loadAccessToken())?.jwt && !(0, d.isExpired)(e) ? [3, 2] : [4, f()];
+ case 1: e = t.sent(), u.storeAccessToken(e), (0, d.setExpiryTimeout)(e), t.label = 2;
+ case 2: return [2, e.jwt];
+ }
+ }));
+ }));
+ }, t.decodeJWT = function(e) {
+ return (0, l.jwtDecode)(e);
+ };
+ var l = n(1278), c = n(9270), u = i(n(9649)), d = n(5789);
+ function f() {
+ return a(this, void 0, void 0, (function() {
+ var e;
+ return s(this, (function(t) {
+ switch (t.label) {
+ case 0: return [4, fetch(c.IDP_ACCESS_TOKEN_ENDPOINT, { credentials: "include" }).then((function(e) {
+ return e.json();
+ }))];
+ case 1:
+ if (!(e = t.sent()) || !e.access_token) throw Error("Could not retrieve access token");
+ return [2, {
+ jwt: e.access_token,
+ expiryTimestamp: e.expires_in
+ }];
+ }
+ }));
+ }));
+ }
+ Object.defineProperty(t, "invalidateAccessToken", {
+ enumerable: !0,
+ get: function() {
+ return d.invalidateAccessToken;
+ }
+ }), window.addEventListener("beforeunload", d.invalidateAccessToken);
+ },
+ 4840: function(e, t, n) {
+ e.exports = typeof n.g == "object" && n.g && n.g.Object === Object && n.g;
+ },
+ 4848: function(e, t, n) {
+ e.exports = n(1020);
+ },
+ 4894: function(e, t, n) {
+ var r = n(1882), o = n(294);
+ e.exports = function(e) {
+ return e != null && o(e.length) && !r(e);
+ };
+ },
+ 4901: function(e, t, n) {
+ var r = n(2552), o = n(294), i = n(346), a = {};
+ a["[object Float32Array]"] = a["[object Float64Array]"] = a["[object Int8Array]"] = a["[object Int16Array]"] = a["[object Int32Array]"] = a["[object Uint8Array]"] = a["[object Uint8ClampedArray]"] = a["[object Uint16Array]"] = a["[object Uint32Array]"] = !0, a["[object Arguments]"] = a["[object Array]"] = a["[object ArrayBuffer]"] = a["[object Boolean]"] = a["[object DataView]"] = a["[object Date]"] = a["[object Error]"] = a["[object Function]"] = a["[object Map]"] = a["[object Number]"] = a["[object Object]"] = a["[object RegExp]"] = a["[object Set]"] = a["[object String]"] = a["[object WeakMap]"] = !1, e.exports = function(e) {
+ return i(e) && o(e.length) && !!a[r(e)];
+ };
+ },
+ 4932: function(e) {
+ e.exports = function(e, t) {
+ for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r;) o[n] = t(e[n], n, e);
+ return o;
+ };
+ },
+ 5083: function(e, t, n) {
+ var r = n(1882), o = n(7296), i = n(3805), a = n(7473), s = /^\[object .+?Constructor\]$/, l = Function.prototype, c = Object.prototype, u = l.toString, d = c.hasOwnProperty, f = RegExp("^" + u.call(d).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
+ e.exports = function(e) {
+ return !(!i(e) || o(e)) && (r(e) ? f : s).test(a(e));
+ };
+ },
+ 5264: function(e, t, n) {
+ function r(e) {
+ return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
+ return typeof e;
+ } : function(e) {
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
+ }, r(e);
+ }
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.CopyToClipboard = void 0;
+ var o = s(n(1649)), i = s(n(7965)), a = [
+ "text",
+ "onCopy",
+ "options",
+ "children"
+ ];
+ function s(e) {
+ return e && e.__esModule ? e : { default: e };
+ }
+ function l(e, t) {
+ var n = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var r = Object.getOwnPropertySymbols(e);
+ t && (r = r.filter((function(t) {
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
+ }))), n.push.apply(n, r);
+ }
+ return n;
+ }
+ function c(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = arguments[t] == null ? {} : arguments[t];
+ t % 2 ? l(Object(n), !0).forEach((function(t) {
+ h(e, t, n[t]);
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : l(Object(n)).forEach((function(t) {
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
+ }));
+ }
+ return e;
+ }
+ function u(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
+ }
+ }
+ function d(e, t) {
+ return d = Object.setPrototypeOf || function(e, t) {
+ return e.__proto__ = t, e;
+ }, d(e, t);
+ }
+ function f(e) {
+ if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
+ return e;
+ }
+ function p(e) {
+ return p = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
+ return e.__proto__ || Object.getPrototypeOf(e);
+ }, p(e);
+ }
+ function h(e, t, n) {
+ return t in e ? Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0
+ }) : e[t] = n, e;
+ }
+ var g = function(e) {
+ (function(e, t) {
+ if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function");
+ e.prototype = Object.create(t && t.prototype, { constructor: {
+ value: e,
+ writable: !0,
+ configurable: !0
+ } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && d(e, t);
+ })(m, e);
+ var t, n, s, l, g = (s = m, l = function() {
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
+ if (typeof Proxy == "function") return !0;
+ try {
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0;
+ } catch {
+ return !1;
+ }
+ }(), function() {
+ var e, t = p(s);
+ if (l) {
+ var n = p(this).constructor;
+ e = Reflect.construct(t, arguments, n);
+ } else e = t.apply(this, arguments);
+ return function(e, t) {
+ if (t && (r(t) === "object" || typeof t == "function")) return t;
+ if (t !== void 0) throw TypeError("Derived constructors may only return object or undefined");
+ return f(e);
+ }(this, e);
+ });
+ function m() {
+ var e;
+ (function(e, t) {
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
+ })(this, m);
+ var n = [...arguments];
+ return h(f(e = g.call.apply(g, [this].concat(n))), "onClick", (function(t) {
+ var n = e.props, r = n.text, a = n.onCopy, s = n.children, l = n.options, c = o.default.Children.only(s), u = (0, i.default)(r, l);
+ a && a(r, u), c && c.props && typeof c.props.onClick == "function" && c.props.onClick(t);
+ })), e;
+ }
+ return t = m, (n = [{
+ key: "render",
+ value: function() {
+ var e = this.props, t = (e.text, e.onCopy, e.options, e.children), n = function(e, t) {
+ if (e == null) return {};
+ var n, r, o = function(e, t) {
+ if (e == null) return {};
+ var n, r, o = {}, i = Object.keys(e);
+ for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || (o[n] = e[n]);
+ return o;
+ }(e, t);
+ if (Object.getOwnPropertySymbols) {
+ var i = Object.getOwnPropertySymbols(e);
+ for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
+ }
+ return o;
+ }(e, a), r = o.default.Children.only(t);
+ return o.default.cloneElement(r, c(c({}, n), {}, { onClick: this.onClick }));
+ }
+ }]) && u(t.prototype, n), Object.defineProperty(t, "prototype", { writable: !1 }), m;
+ }(o.default.PureComponent);
+ t.CopyToClipboard = g, h(g, "defaultProps", {
+ onCopy: void 0,
+ options: void 0
+ });
+ },
+ 5326: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "Opacidade",
+ "datepicker.clear-date": "Limpar data",
+ "datepicker.next-month": "Próximo mês",
+ "datepicker.open-calendar": "Calendário aberto",
+ "datepicker.previous-month": "Mês anterior",
+ "input.clear": "Limpar entrada",
+ "input.hide-password": "Esconder a senha",
+ "input.show-password": "Mostrar senha",
+ "modal.close": "Fechar",
+ "multiselectchips.add-value": "Adicionar ‘{value}’",
+ "multiselectchips.remove-all": "Remover tudo",
+ "pagination.next-page": "Próxima página",
+ "pagination.previous-page": "Página anterior"
+ };
+ },
+ 5349: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "不透明度",
+ "datepicker.clear-date": "日付を消去する",
+ "datepicker.next-month": "来月",
+ "datepicker.open-calendar": "カレンダーを開く",
+ "datepicker.previous-month": "前月",
+ "input.clear": "入力をクリア",
+ "input.hide-password": "パスワードを隠す",
+ "input.show-password": "パスワードを表示",
+ "modal.close": "閉じる",
+ "multiselectchips.add-value": "「 {value} 」を追加",
+ "multiselectchips.remove-all": "すべてを削除する",
+ "pagination.next-page": "次のページ",
+ "pagination.previous-page": "前のページ"
+ };
+ },
+ 5481: function(e, t, n) {
+ e.exports = n(9325)["__core-js_shared__"];
+ },
+ 5527: function(e) {
+ var t = Object.prototype;
+ e.exports = function(e) {
+ var n = e && e.constructor;
+ return e === (typeof n == "function" && n.prototype || t);
+ };
+ },
+ 5556: function(e, t, n) {
+ e.exports = n(2694)();
+ },
+ 5580: function(e, t, n) {
+ e.exports = n(6110)(n(9325), "DataView");
+ },
+ 5789: function(e, t, n) {
+ var r = this && this.__createBinding || (Object.create ? function(e, t, n, r) {
+ r === void 0 && (r = n);
+ var o = Object.getOwnPropertyDescriptor(t, n);
+ o && !("get" in o ? !t.__esModule : o.writable || o.configurable) || (o = {
+ enumerable: !0,
+ get: function() {
+ return t[n];
+ }
+ }), Object.defineProperty(e, r, o);
+ } : function(e, t, n, r) {
+ r === void 0 && (r = n), e[r] = t[n];
+ }), o = this && this.__setModuleDefault || (Object.create ? function(e, t) {
+ Object.defineProperty(e, "default", {
+ enumerable: !0,
+ value: t
+ });
+ } : function(e, t) {
+ e.default = t;
+ }), i = this && this.__importStar || function(e) {
+ if (e && e.__esModule) return e;
+ var t = {};
+ if (e != null) for (var n in e) n !== "default" && Object.prototype.hasOwnProperty.call(e, n) && r(t, e, n);
+ return o(t, e), t;
+ };
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.invalidateAccessToken = c, t.setExpiryTimeout = function(e) {
+ var t = 1e3 * e.expiryTimestamp;
+ setTimeout(c, t);
+ }, t.isExpired = function(e) {
+ try {
+ return 1e3 * ((0, a.jwtDecode)(e.jwt).exp || 0) - s.MS_REFRESH_TOKEN_BEFORE_EXPIRY < Date.now();
+ } catch {
+ return !0;
+ }
+ };
+ var a = n(1278), s = n(9270), l = i(n(9649));
+ function c() {
+ l.removeAccessToken();
+ }
+ },
+ 5794: function(e, t, n) {
+ let { default: r, DraggableCore: o } = n(6027);
+ e.exports = r, e.exports.default = r, e.exports.DraggableCore = o;
+ },
+ 5861: function(e, t, n) {
+ var r = n(5580), o = n(8223), i = n(2804), a = n(6545), s = n(8303), l = n(2552), c = n(7473), u = "[object Map]", d = "[object Promise]", f = "[object Set]", p = "[object WeakMap]", h = "[object DataView]", g = c(r), m = c(o), v = c(i), y = c(a), b = c(s), w = l;
+ (r && w(new r(/* @__PURE__ */ new ArrayBuffer(1))) != h || o && w(new o()) != u || i && w(i.resolve()) != d || a && w(new a()) != f || s && w(new s()) != p) && (w = function(e) {
+ var t = l(e), n = t == "[object Object]" ? e.constructor : void 0, r = n ? c(n) : "";
+ if (r) switch (r) {
+ case g: return h;
+ case m: return u;
+ case v: return d;
+ case y: return f;
+ case b: return p;
+ }
+ return t;
+ }), e.exports = w;
+ },
+ 6009: function(e, t, n) {
+ e = n.nmd(e);
+ var r = n(4840), o = t && !t.nodeType && t, i = o && e && !e.nodeType && e, a = i && i.exports === o && r.process, s = function() {
+ try {
+ return i && i.require && i.require("util").types || a && a.binding && a.binding("util");
+ } catch {}
+ }();
+ e.exports = s;
+ },
+ 6027: function(e, t, n) {
+ Object.defineProperty(t, "__esModule", { value: !0 }), Object.defineProperty(t, "DraggableCore", {
+ enumerable: !0,
+ get: function() {
+ return u.default;
+ }
+ }), t.default = void 0;
+ var r = function(e, t) {
+ if (e && e.__esModule) return e;
+ if (e === null || typeof e != "object" && typeof e != "function") return { default: e };
+ var n = p(t);
+ if (n && n.has(e)) return n.get(e);
+ var r = {}, o = Object.defineProperty && Object.getOwnPropertyDescriptor;
+ for (var i in e) if (i !== "default" && Object.prototype.hasOwnProperty.call(e, i)) {
+ var a = o ? Object.getOwnPropertyDescriptor(e, i) : null;
+ a && (a.get || a.set) ? Object.defineProperty(r, i, a) : r[i] = e[i];
+ }
+ return r.default = e, n && n.set(e, r), r;
+ }(n(1649)), o = f(n(5556)), i = f(n(7516)), a = f(n(1322)), s = n(1089), l = n(1726), c = n(7056), u = f(n(6888)), d = f(n(8696));
+ function f(e) {
+ return e && e.__esModule ? e : { default: e };
+ }
+ function p(e) {
+ if (typeof WeakMap != "function") return null;
+ var t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap();
+ return (p = function(e) {
+ return e ? n : t;
+ })(e);
+ }
+ function h() {
+ return h = Object.assign ? Object.assign.bind() : function(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = arguments[t];
+ for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
+ }
+ return e;
+ }, h.apply(this, arguments);
+ }
+ function g(e, t, n) {
+ return (t = function(e) {
+ var t = function(e) {
+ if (typeof e != "object" || !e) return e;
+ var t = e[Symbol.toPrimitive];
+ if (t !== void 0) {
+ var n = t.call(e, "string");
+ if (typeof n != "object") return n;
+ throw TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return String(e);
+ }(e);
+ return typeof t == "symbol" ? t : String(t);
+ }(t)) in e ? Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0
+ }) : e[t] = n, e;
+ }
+ class m extends r.Component {
+ static getDerivedStateFromProps(e, t) {
+ let { position: n } = e, { prevPropsPosition: r } = t;
+ return !n || r && n.x === r.x && n.y === r.y ? null : ((0, d.default)("Draggable: getDerivedStateFromProps %j", {
+ position: n,
+ prevPropsPosition: r
+ }), {
+ x: n.x,
+ y: n.y,
+ prevPropsPosition: { ...n }
+ });
+ }
+ constructor(e) {
+ super(e), g(this, "onDragStart", ((e, t) => {
+ if ((0, d.default)("Draggable: onDragStart: %j", t), !1 === this.props.onStart(e, (0, l.createDraggableData)(this, t))) return !1;
+ this.setState({
+ dragging: !0,
+ dragged: !0
+ });
+ })), g(this, "onDrag", ((e, t) => {
+ if (!this.state.dragging) return !1;
+ (0, d.default)("Draggable: onDrag: %j", t);
+ let n = (0, l.createDraggableData)(this, t), r = {
+ x: n.x,
+ y: n.y,
+ slackX: 0,
+ slackY: 0
+ };
+ if (this.props.bounds) {
+ let { x: e, y: t } = r;
+ r.x += this.state.slackX, r.y += this.state.slackY;
+ let [o, i] = (0, l.getBoundPosition)(this, r.x, r.y);
+ r.x = o, r.y = i, r.slackX = this.state.slackX + (e - r.x), r.slackY = this.state.slackY + (t - r.y), n.x = r.x, n.y = r.y, n.deltaX = r.x - this.state.x, n.deltaY = r.y - this.state.y;
+ }
+ if (!1 === this.props.onDrag(e, n)) return !1;
+ this.setState(r);
+ })), g(this, "onDragStop", ((e, t) => {
+ if (!this.state.dragging || !1 === this.props.onStop(e, (0, l.createDraggableData)(this, t))) return !1;
+ (0, d.default)("Draggable: onDragStop: %j", t);
+ let n = {
+ dragging: !1,
+ slackX: 0,
+ slackY: 0
+ };
+ if (this.props.position) {
+ let { x: e, y: t } = this.props.position;
+ n.x = e, n.y = t;
+ }
+ this.setState(n);
+ })), this.state = {
+ dragging: !1,
+ dragged: !1,
+ x: e.position ? e.position.x : e.defaultPosition.x,
+ y: e.position ? e.position.y : e.defaultPosition.y,
+ prevPropsPosition: { ...e.position },
+ slackX: 0,
+ slackY: 0,
+ isElementSVG: !1
+ }, !e.position || e.onDrag || e.onStop || console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
+ }
+ componentDidMount() {
+ window.SVGElement !== void 0 && this.findDOMNode() instanceof window.SVGElement && this.setState({ isElementSVG: !0 });
+ }
+ componentWillUnmount() {
+ this.setState({ dragging: !1 });
+ }
+ findDOMNode() {
+ var t;
+ return ((t = this.props) == null || (t = t.nodeRef) == null ? void 0 : t.current) ?? i.default.findDOMNode(this);
+ }
+ render() {
+ let { axis: e, bounds: t, children: n, defaultPosition: o, defaultClassName: i, defaultClassNameDragging: c, defaultClassNameDragged: d, position: f, positionOffset: p, scale: g, ...m } = this.props, v = {}, y = null, b = !f || this.state.dragging, w = f || o, x = {
+ x: (0, l.canDragX)(this) && b ? this.state.x : w.x,
+ y: (0, l.canDragY)(this) && b ? this.state.y : w.y
+ };
+ this.state.isElementSVG ? y = (0, s.createSVGTransform)(x, p) : v = (0, s.createCSSTransform)(x, p);
+ let E = (0, a.default)(n.props.className || "", i, {
+ [c]: this.state.dragging,
+ [d]: this.state.dragged
+ });
+ return r.createElement(u.default, h({}, m, {
+ onStart: this.onDragStart,
+ onDrag: this.onDrag,
+ onStop: this.onDragStop
+ }), r.cloneElement(r.Children.only(n), {
+ className: E,
+ style: {
+ ...n.props.style,
+ ...v
+ },
+ transform: y
+ }));
+ }
+ }
+ t.default = m, g(m, "displayName", "Draggable"), g(m, "propTypes", {
+ ...u.default.propTypes,
+ axis: o.default.oneOf([
+ "both",
+ "x",
+ "y",
+ "none"
+ ]),
+ bounds: o.default.oneOfType([
+ o.default.shape({
+ left: o.default.number,
+ right: o.default.number,
+ top: o.default.number,
+ bottom: o.default.number
+ }),
+ o.default.string,
+ o.default.oneOf([!1])
+ ]),
+ defaultClassName: o.default.string,
+ defaultClassNameDragging: o.default.string,
+ defaultClassNameDragged: o.default.string,
+ defaultPosition: o.default.shape({
+ x: o.default.number,
+ y: o.default.number
+ }),
+ positionOffset: o.default.shape({
+ x: o.default.oneOfType([o.default.number, o.default.string]),
+ y: o.default.oneOfType([o.default.number, o.default.string])
+ }),
+ position: o.default.shape({
+ x: o.default.number,
+ y: o.default.number
+ }),
+ className: c.dontSetMe,
+ style: c.dontSetMe,
+ transform: c.dontSetMe
+ }), g(m, "defaultProps", {
+ ...u.default.defaultProps,
+ axis: "both",
+ bounds: !1,
+ defaultClassName: "react-draggable",
+ defaultClassNameDragging: "react-draggable-dragging",
+ defaultClassNameDragged: "react-draggable-dragged",
+ defaultPosition: {
+ x: 0,
+ y: 0
+ },
+ scale: 1
+ });
+ },
+ 6110: function(e, t, n) {
+ var r = n(5083), o = n(392);
+ e.exports = function(e, t) {
+ var n = o(e, t);
+ return r(n) ? n : void 0;
+ };
+ },
+ 6426: function(e) {
+ e.exports = function() {
+ var e = document.getSelection();
+ if (!e.rangeCount) return function() {};
+ for (var t = document.activeElement, n = [], r = 0; r < e.rangeCount; r++) n.push(e.getRangeAt(r));
+ switch (t.tagName.toUpperCase()) {
+ case "INPUT":
+ case "TEXTAREA":
+ t.blur();
+ break;
+ default: t = null;
+ }
+ return e.removeAllRanges(), function() {
+ e.type === "Caret" && e.removeAllRanges(), e.rangeCount || n.forEach((function(t) {
+ e.addRange(t);
+ })), t && t.focus();
+ };
+ };
+ },
+ 6449: function(e) {
+ e.exports = Array.isArray;
+ },
+ 6545: function(e, t, n) {
+ e.exports = n(6110)(n(9325), "Set");
+ },
+ 6888: function(e, t, n) {
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.default = void 0;
+ var r = function(e, t) {
+ if (e && e.__esModule) return e;
+ if (e === null || typeof e != "object" && typeof e != "function") return { default: e };
+ var n = d(t);
+ if (n && n.has(e)) return n.get(e);
+ var r = {}, o = Object.defineProperty && Object.getOwnPropertyDescriptor;
+ for (var i in e) if (i !== "default" && Object.prototype.hasOwnProperty.call(e, i)) {
+ var a = o ? Object.getOwnPropertyDescriptor(e, i) : null;
+ a && (a.get || a.set) ? Object.defineProperty(r, i, a) : r[i] = e[i];
+ }
+ return r.default = e, n && n.set(e, r), r;
+ }(n(1649)), o = u(n(5556)), i = u(n(7516)), a = n(1089), s = n(1726), l = n(7056), c = u(n(8696));
+ function u(e) {
+ return e && e.__esModule ? e : { default: e };
+ }
+ function d(e) {
+ if (typeof WeakMap != "function") return null;
+ var t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap();
+ return (d = function(e) {
+ return e ? n : t;
+ })(e);
+ }
+ function f(e, t, n) {
+ return (t = function(e) {
+ var t = function(e) {
+ if (typeof e != "object" || !e) return e;
+ var t = e[Symbol.toPrimitive];
+ if (t !== void 0) {
+ var n = t.call(e, "string");
+ if (typeof n != "object") return n;
+ throw TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return String(e);
+ }(e);
+ return typeof t == "symbol" ? t : String(t);
+ }(t)) in e ? Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0
+ }) : e[t] = n, e;
+ }
+ let p = {
+ start: "touchstart",
+ move: "touchmove",
+ stop: "touchend"
+ }, h = {
+ start: "mousedown",
+ move: "mousemove",
+ stop: "mouseup"
+ }, g = h;
+ class m extends r.Component {
+ constructor() {
+ super(...arguments), f(this, "dragging", !1), f(this, "lastX", NaN), f(this, "lastY", NaN), f(this, "touchIdentifier", null), f(this, "mounted", !1), f(this, "handleDragStart", ((e) => {
+ if (this.props.onMouseDown(e), !this.props.allowAnyClick && typeof e.button == "number" && e.button !== 0) return !1;
+ let t = this.findDOMNode();
+ if (!t || !t.ownerDocument || !t.ownerDocument.body) throw Error("<DraggableCore> not mounted on DragStart!");
+ let { ownerDocument: n } = t;
+ if (this.props.disabled || !(e.target instanceof n.defaultView.Node) || this.props.handle && !(0, a.matchesSelectorAndParentsTo)(e.target, this.props.handle, t) || this.props.cancel && (0, a.matchesSelectorAndParentsTo)(e.target, this.props.cancel, t)) return;
+ e.type === "touchstart" && e.preventDefault();
+ let r = (0, a.getTouchIdentifier)(e);
+ this.touchIdentifier = r;
+ let o = (0, s.getControlPosition)(e, r, this);
+ if (o == null) return;
+ let { x: i, y: l } = o, u = (0, s.createCoreData)(this, i, l);
+ (0, c.default)("DraggableCore: handleDragStart: %j", u), (0, c.default)("calling", this.props.onStart), !1 !== this.props.onStart(e, u) && !1 !== this.mounted && (this.props.enableUserSelectHack && (0, a.addUserSelectStyles)(n), this.dragging = !0, this.lastX = i, this.lastY = l, (0, a.addEvent)(n, g.move, this.handleDrag), (0, a.addEvent)(n, g.stop, this.handleDragStop));
+ })), f(this, "handleDrag", ((e) => {
+ let t = (0, s.getControlPosition)(e, this.touchIdentifier, this);
+ if (t == null) return;
+ let { x: n, y: r } = t;
+ if (Array.isArray(this.props.grid)) {
+ let e = n - this.lastX, t = r - this.lastY;
+ if ([e, t] = (0, s.snapToGrid)(this.props.grid, e, t), !e && !t) return;
+ n = this.lastX + e, r = this.lastY + t;
+ }
+ let o = (0, s.createCoreData)(this, n, r);
+ if ((0, c.default)("DraggableCore: handleDrag: %j", o), !1 !== this.props.onDrag(e, o) && !1 !== this.mounted) this.lastX = n, this.lastY = r;
+ else try {
+ this.handleDragStop(new MouseEvent("mouseup"));
+ } catch {
+ let t = document.createEvent("MouseEvents");
+ t.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(t);
+ }
+ })), f(this, "handleDragStop", ((e) => {
+ if (!this.dragging) return;
+ let t = (0, s.getControlPosition)(e, this.touchIdentifier, this);
+ if (t == null) return;
+ let { x: n, y: r } = t;
+ if (Array.isArray(this.props.grid)) {
+ let e = n - this.lastX || 0, t = r - this.lastY || 0;
+ [e, t] = (0, s.snapToGrid)(this.props.grid, e, t), n = this.lastX + e, r = this.lastY + t;
+ }
+ let o = (0, s.createCoreData)(this, n, r);
+ if (!1 === this.props.onStop(e, o) || !1 === this.mounted) return !1;
+ let i = this.findDOMNode();
+ i && this.props.enableUserSelectHack && (0, a.removeUserSelectStyles)(i.ownerDocument), (0, c.default)("DraggableCore: handleDragStop: %j", o), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, i && ((0, c.default)("DraggableCore: Removing handlers"), (0, a.removeEvent)(i.ownerDocument, g.move, this.handleDrag), (0, a.removeEvent)(i.ownerDocument, g.stop, this.handleDragStop));
+ })), f(this, "onMouseDown", ((e) => (g = h, this.handleDragStart(e)))), f(this, "onMouseUp", ((e) => (g = h, this.handleDragStop(e)))), f(this, "onTouchStart", ((e) => (g = p, this.handleDragStart(e)))), f(this, "onTouchEnd", ((e) => (g = p, this.handleDragStop(e))));
+ }
+ componentDidMount() {
+ this.mounted = !0;
+ let e = this.findDOMNode();
+ e && (0, a.addEvent)(e, p.start, this.onTouchStart, { passive: !1 });
+ }
+ componentWillUnmount() {
+ this.mounted = !1;
+ let e = this.findDOMNode();
+ if (e) {
+ let { ownerDocument: t } = e;
+ (0, a.removeEvent)(t, h.move, this.handleDrag), (0, a.removeEvent)(t, p.move, this.handleDrag), (0, a.removeEvent)(t, h.stop, this.handleDragStop), (0, a.removeEvent)(t, p.stop, this.handleDragStop), (0, a.removeEvent)(e, p.start, this.onTouchStart, { passive: !1 }), this.props.enableUserSelectHack && (0, a.removeUserSelectStyles)(t);
+ }
+ }
+ findDOMNode() {
+ var e, t;
+ return (e = this.props) != null && e.nodeRef ? (t = this.props) == null || (t = t.nodeRef) == null ? void 0 : t.current : i.default.findDOMNode(this);
+ }
+ render() {
+ return r.cloneElement(r.Children.only(this.props.children), {
+ onMouseDown: this.onMouseDown,
+ onMouseUp: this.onMouseUp,
+ onTouchEnd: this.onTouchEnd
+ });
+ }
+ }
+ t.default = m, f(m, "displayName", "DraggableCore"), f(m, "propTypes", {
+ allowAnyClick: o.default.bool,
+ children: o.default.node.isRequired,
+ disabled: o.default.bool,
+ enableUserSelectHack: o.default.bool,
+ offsetParent: function(e, t) {
+ if (e[t] && e[t].nodeType !== 1) throw Error("Draggable's offsetParent must be a DOM Node.");
+ },
+ grid: o.default.arrayOf(o.default.number),
+ handle: o.default.string,
+ cancel: o.default.string,
+ nodeRef: o.default.object,
+ onStart: o.default.func,
+ onDrag: o.default.func,
+ onStop: o.default.func,
+ onMouseDown: o.default.func,
+ scale: o.default.number,
+ className: l.dontSetMe,
+ style: l.dontSetMe,
+ transform: l.dontSetMe
+ }), f(m, "defaultProps", {
+ allowAnyClick: !1,
+ disabled: !1,
+ enableUserSelectHack: !0,
+ onStart: function() {},
+ onDrag: function() {},
+ onStop: function() {},
+ onMouseDown: function() {},
+ scale: 1
+ });
+ },
+ 6925: function(e) {
+ e.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
+ },
+ 6942: function(e, t) {
+ var n;
+ /*!
+ Copyright (c) 2018 Jed Watson.
+ Licensed under the MIT License (MIT), see
+ http://jedwatson.github.io/classnames
+ */ (function() {
+ var r = {}.hasOwnProperty;
+ function o() {
+ for (var e = "", t = 0; t < arguments.length; t++) {
+ var n = arguments[t];
+ n && (e = a(e, i(n)));
+ }
+ return e;
+ }
+ function i(e) {
+ if (typeof e == "string" || typeof e == "number") return e;
+ if (typeof e != "object") return "";
+ if (Array.isArray(e)) return o.apply(null, e);
+ if (e.toString !== Object.prototype.toString && !e.toString.toString().includes("[native code]")) return e.toString();
+ var t = "";
+ for (var n in e) r.call(e, n) && e[n] && (t = a(t, n));
+ return t;
+ }
+ function a(e, t) {
+ return t ? e ? e + " " + t : e + t : e;
+ }
+ e.exports ? (o.default = o, e.exports = o) : (n = function() {
+ return o;
+ }.apply(t, [])) === void 0 || (e.exports = n);
+ })();
+ },
+ 7056: function(e, t) {
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.dontSetMe = function(e, t, n) {
+ if (e[t]) return /* @__PURE__ */ Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`);
+ }, t.findInArray = function(e, t) {
+ for (let n = 0, r = e.length; n < r; n++) if (t.apply(t, [
+ e[n],
+ n,
+ e
+ ])) return e[n];
+ }, t.int = function(e) {
+ return parseInt(e, 10);
+ }, t.isFunction = function(e) {
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
+ }, t.isNum = function(e) {
+ return typeof e == "number" && !isNaN(e);
+ };
+ },
+ 7167: function(e, t, n) {
+ var r = n(4901), o = n(7301), i = n(6009), a = i && i.isTypedArray;
+ e.exports = a ? o(a) : r;
+ },
+ 7200: function(e, t, n) {
+ var r = n(3222), o = 0;
+ e.exports = function(e) {
+ var t = ++o;
+ return r(e) + t;
+ };
+ },
+ 7296: function(e, t, n) {
+ var r, o = n(5481), i = (r = /[^.]+$/.exec(o && o.keys && o.keys.IE_PROTO || "")) ? "Symbol(src)_1." + r : "";
+ e.exports = function(e) {
+ return !!i && i in e;
+ };
+ },
+ 7301: function(e) {
+ e.exports = function(e) {
+ return function(t) {
+ return e(t);
+ };
+ };
+ },
+ 7456: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "Непрозрачность",
+ "datepicker.clear-date": "Очистить дату",
+ "datepicker.next-month": "Следующий месяц",
+ "datepicker.open-calendar": "Открыть календарь",
+ "datepicker.previous-month": "Предыдущий месяц",
+ "input.clear": "Очистить поле ввода",
+ "input.hide-password": "Скрыть пароль",
+ "input.show-password": "Показать пароль",
+ "modal.close": "Закрыть",
+ "multiselectchips.add-value": "Добавить «{value}»",
+ "multiselectchips.remove-all": "Удалить всё",
+ "pagination.next-page": "Следующая страница",
+ "pagination.previous-page": "Предыдущая страница"
+ };
+ },
+ 7473: function(e) {
+ var t = Function.prototype.toString;
+ e.exports = function(e) {
+ if (e != null) {
+ try {
+ return t.call(e);
+ } catch {}
+ try {
+ return e + "";
+ } catch {}
+ }
+ return "";
+ };
+ },
+ 7516: function(e) {
+ e.exports = t;
+ },
+ 7534: function(e, t, n) {
+ var r = n(2552), o = n(346);
+ e.exports = function(e) {
+ return o(e) && r(e) == "[object Arguments]";
+ };
+ },
+ 7556: function(e, t, n) {
+ var r = n(1873), o = n(4932), i = n(6449), a = n(4394), s = r ? r.prototype : void 0, l = s ? s.toString : void 0;
+ e.exports = function e(t) {
+ if (typeof t == "string") return t;
+ if (i(t)) return o(t, e) + "";
+ if (a(t)) return l ? l.call(t) : "";
+ var n = t + "";
+ return n == "0" && 1 / t == -Infinity ? "-0" : n;
+ };
+ },
+ 7942: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "Opacité",
+ "datepicker.clear-date": "Effacer une date",
+ "datepicker.next-month": "Le mois prochain",
+ "datepicker.open-calendar": "Ouvrir le calendrier",
+ "datepicker.previous-month": "Le mois précédent",
+ "input.clear": "Effacer l'entrée",
+ "input.hide-password": "Masquer le mot de passe",
+ "input.show-password": "Montrer le mot de passe",
+ "modal.close": "Fermer",
+ "multiselectchips.add-value": "Ajouter ‘{value}’",
+ "multiselectchips.remove-all": "Supprimer tout",
+ "pagination.next-page": "Page suivante",
+ "pagination.previous-page": "Page précédente"
+ };
+ },
+ 7965: function(e, t, n) {
+ var r = n(6426), o = {
+ "text/plain": "Text",
+ "text/html": "Url",
+ default: "Text"
+ };
+ e.exports = function(e, t) {
+ var n, i, a, s, l, c, u = !1;
+ t ||= {}, n = t.debug || !1;
+ try {
+ if (a = r(), s = document.createRange(), l = document.getSelection(), (c = document.createElement("span")).textContent = e, c.ariaHidden = "true", c.style.all = "unset", c.style.position = "fixed", c.style.top = 0, c.style.clip = "rect(0, 0, 0, 0)", c.style.whiteSpace = "pre", c.style.webkitUserSelect = "text", c.style.MozUserSelect = "text", c.style.msUserSelect = "text", c.style.userSelect = "text", c.addEventListener("copy", (function(r) {
+ if (r.stopPropagation(), t.format) if (r.preventDefault(), r.clipboardData === void 0) {
+ n && console.warn("unable to use e.clipboardData"), n && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
+ var i = o[t.format] || o.default;
+ window.clipboardData.setData(i, e);
+ } else r.clipboardData.clearData(), r.clipboardData.setData(t.format, e);
+ t.onCopy && (r.preventDefault(), t.onCopy(r.clipboardData));
+ })), document.body.appendChild(c), s.selectNodeContents(c), l.addRange(s), !document.execCommand("copy")) throw Error("copy command was unsuccessful");
+ u = !0;
+ } catch (r) {
+ n && console.error("unable to copy using execCommand: ", r), n && console.warn("trying IE specific stuff");
+ try {
+ window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), u = !0;
+ } catch (r) {
+ n && console.error("unable to copy using clipboardData: ", r), n && console.error("falling back to prompt"), i = function(e) {
+ var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
+ return e.replace(/#{\s*key\s*}/g, t);
+ }("message" in t ? t.message : "Copy to clipboard: #{key}, Enter"), window.prompt(i, e);
+ }
+ } finally {
+ l && (typeof l.removeRange == "function" ? l.removeRange(s) : l.removeAllRanges()), c && document.body.removeChild(c), a();
+ }
+ return u;
+ };
+ },
+ 8223: function(e, t, n) {
+ e.exports = n(6110)(n(9325), "Map");
+ },
+ 8303: function(e, t, n) {
+ e.exports = n(6110)(n(9325), "WeakMap");
+ },
+ 8575: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "不透明度",
+ "datepicker.clear-date": "清除日期",
+ "datepicker.next-month": "下个月",
+ "datepicker.open-calendar": "打开日历",
+ "datepicker.previous-month": "前一个月",
+ "input.clear": "清除输入",
+ "input.hide-password": "隐藏密码",
+ "input.show-password": "显示密码",
+ "modal.close": "关闭",
+ "multiselectchips.add-value": "添加“ {value} ”",
+ "multiselectchips.remove-all": "全部移除",
+ "pagination.next-page": "下一页",
+ "pagination.previous-page": "前一页"
+ };
+ },
+ 8696: function(e, t) {
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.default = function() {};
+ },
+ 8984: function(e, t, n) {
+ var r = n(5527), o = n(3650), i = Object.prototype.hasOwnProperty;
+ e.exports = function(e) {
+ if (!r(e)) return o(e);
+ var t = [];
+ for (var n in Object(e)) i.call(e, n) && n != "constructor" && t.push(n);
+ return t;
+ };
+ },
+ 9017: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "Opacity",
+ "datepicker.clear-date": "Clear date",
+ "datepicker.apply-date-range": "Apply",
+ "datepicker.next-month": "Next month",
+ "datepicker.open-calendar": "Open calendar",
+ "datepicker.previous-month": "Previous month",
+ "input.clear": "Clear input",
+ "input.hide-password": "Hide password",
+ "input.show-password": "Show password",
+ "modal.close": "Close",
+ "multiselectchips.add-value": "Add ‘{value}’",
+ "multiselectchips.remove-all": "Remove all",
+ "pagination.next-page": "Next page",
+ "pagination.previous-page": "Previous page"
+ };
+ },
+ 9026: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "Nieprzezroczystość",
+ "datepicker.clear-date": "Wyczyść datę",
+ "datepicker.next-month": "Następny miesiąc",
+ "datepicker.open-calendar": "Otwórz kalendarz",
+ "datepicker.previous-month": "Poprzedni miesiąc",
+ "input.clear": "Wyczyść pole wprowadzania",
+ "input.hide-password": "Ukryj hasło",
+ "input.show-password": "Pokaż hasło",
+ "modal.close": "Zamknij",
+ "multiselectchips.add-value": "Dodaj „{value}”",
+ "multiselectchips.remove-all": "Usuń wszystko",
+ "pagination.next-page": "Następna strona",
+ "pagination.previous-page": "Poprzednia strona"
+ };
+ },
+ 9190: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "Opaklık",
+ "datepicker.clear-date": "Tarihi sil",
+ "datepicker.next-month": "Gelecek ay",
+ "datepicker.open-calendar": "Takvimi aç",
+ "datepicker.previous-month": "Geçtiğimiz ay",
+ "input.clear": "Girişi temizle",
+ "input.hide-password": "Şifreyi gizle",
+ "input.show-password": "Şifreyi göster",
+ "modal.close": "Kapat",
+ "multiselectchips.add-value": "‘{value}’ ekleyin",
+ "multiselectchips.remove-all": "Tümünü kaldır",
+ "pagination.next-page": "Sonraki sayfa",
+ "pagination.previous-page": "Önceki sayfa"
+ };
+ },
+ 9270: function(e, t) {
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.MAX_UNIX_TIME = t.MS_REFRESH_TOKEN_BEFORE_EXPIRY = t.IDP_ACCESS_TOKEN_ENDPOINT = t.LOCAL_STORAGE_JWT_EXPIRY = t.LOCAL_STORAGE_JWT = t.LOCAL_STORAGE_JWT_TOKEN = void 0, t.LOCAL_STORAGE_JWT_TOKEN = "jwt_access_token", t.LOCAL_STORAGE_JWT = "jwt", t.LOCAL_STORAGE_JWT_EXPIRY = "jwt_expiry", t.IDP_ACCESS_TOKEN_ENDPOINT = "/v7/idp/access-tokens/by-session", t.MS_REFRESH_TOKEN_BEFORE_EXPIRY = 3e5, t.MAX_UNIX_TIME = 9999999999999;
+ },
+ 9325: function(e, t, n) {
+ var r = n(4840), o = typeof self == "object" && self && self.Object === Object && self;
+ e.exports = r || o || Function("return this")();
+ },
+ 9350: function(e) {
+ var t = Object.prototype.toString;
+ e.exports = function(e) {
+ return t.call(e);
+ };
+ },
+ 9399: function(e, t, n) {
+ var r = n(5264).CopyToClipboard;
+ r.CopyToClipboard = r, e.exports = r;
+ },
+ 9583: function(e, t, n) {
+ n.r(t), n.d(t, { default: function() {
+ return r;
+ } });
+ let r = {
+ "colorpicker.opacity-input": "不透明度",
+ "datepicker.clear-date": "清除日期",
+ "datepicker.next-month": "下個月",
+ "datepicker.open-calendar": "打開日曆",
+ "datepicker.previous-month": "前一個月",
+ "input.clear": "清除輸入",
+ "input.hide-password": "隱藏密碼",
+ "input.show-password": "顯示密碼",
+ "modal.close": "關閉",
+ "multiselectchips.add-value": "添加“ {value} ”",
+ "multiselectchips.remove-all": "全部移除",
+ "pagination.next-page": "下一頁",
+ "pagination.previous-page": "前一頁"
+ };
+ },
+ 9649: function(e, t, n) {
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.storeAccessToken = function(e) {
+ localStorage.setItem(r.LOCAL_STORAGE_JWT, e.jwt), localStorage.setItem(r.LOCAL_STORAGE_JWT_EXPIRY, e.expiryTimestamp.toString());
+ }, t.loadAccessToken = function() {
+ var e = localStorage.getItem(r.LOCAL_STORAGE_JWT) || "", t = localStorage.getItem(r.LOCAL_STORAGE_JWT_EXPIRY) || "";
+ return {
+ jwt: e,
+ expiryTimestamp: parseInt(t, o)
+ };
+ }, t.removeAccessToken = function() {
+ localStorage.removeItem(r.LOCAL_STORAGE_JWT), localStorage.removeItem(r.LOCAL_STORAGE_JWT_EXPIRY);
+ };
+ var r = n(9270), o = 10;
+ },
+ 9935: function(e) {
+ e.exports = function() {
+ return !1;
+ };
+ }
+}, r = {};
+function o(e) {
+ var t = r[e];
+ if (t !== void 0) return t.exports;
+ var i = r[e] = {
+ id: e,
+ loaded: !1,
+ exports: {}
+ };
+ return n[e].call(i.exports, i, i.exports, o), i.loaded = !0, i.exports;
+}
+o.n = function(e) {
+ var t = e && e.__esModule ? function() {
+ return e.default;
+ } : function() {
+ return e;
+ };
+ return o.d(t, { a: t }), t;
+}, o.d = function(e, t) {
+ for (var n in t) o.o(t, n) && !o.o(e, n) && Object.defineProperty(e, n, {
+ enumerable: !0,
+ get: t[n]
+ });
+}, o.g = function() {
+ if (typeof globalThis == "object") return globalThis;
+ try {
+ return this || Function("return this")();
+ } catch {
+ if (typeof window == "object") return window;
+ }
+}(), o.o = function(e, t) {
+ return Object.prototype.hasOwnProperty.call(e, t);
+}, o.r = function(e) {
+ typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 });
+}, o.nmd = function(e) {
+ return e.paths = [], e.children ||= [], e;
+}, o.nc = void 0;
+var i = {};
+o.d(i, {
+ Hg: function() {
+ return nB;
+ },
+ az: function() {
+ return pd;
+ },
+ aF: function() {
+ return Tc;
+ }
+});
+var a = {};
+o.r(a), o.d(a, {
+ hasBrowserEnv: function() {
+ return Sb;
+ },
+ hasStandardBrowserEnv: function() {
+ return kb;
+ },
+ hasStandardBrowserWebWorkerEnv: function() {
+ return _b;
+ },
+ navigator: function() {
+ return Cb;
+ },
+ origin: function() {
+ return Tb;
+ }
+});
+var s = o(1649);
+const l = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
+function c$1(e) {
+ return e && e.Math == Math ? e : void 0;
+}
+const u = typeof globalThis == "object" && c$1(globalThis) || typeof window == "object" && c$1(window) || typeof self == "object" && c$1(self) || typeof o.g == "object" && c$1(o.g) || function() {
+ return this;
+}() || {};
+function d() {
+ return u;
+}
+function f(e, t, n) {
+ let r = n || u, o = r.__SENTRY__ = r.__SENTRY__ || {};
+ return o[e] || (o[e] = t());
+}
+const p = [
+ "debug",
+ "info",
+ "warn",
+ "error",
+ "log",
+ "assert",
+ "trace"
+], h = {};
+function g(e) {
+ if (!("console" in u)) return e();
+ let t = u.console, n = {}, r = Object.keys(h);
+ r.forEach(((e) => {
+ let r = h[e];
+ n[e] = t[e], t[e] = r;
+ }));
+ try {
+ return e();
+ } finally {
+ r.forEach(((e) => {
+ t[e] = n[e];
+ }));
+ }
+}
+const m = function() {
+ let e = !1, t = {
+ enable: () => {
+ e = !0;
+ },
+ disable: () => {
+ e = !1;
+ },
+ isEnabled: () => e
+ };
+ return l ? p.forEach(((n) => {
+ t[n] = (...t) => {
+ e && g((() => {
+ u.console[n](`Sentry Logger [${n}]:`, ...t);
+ }));
+ };
+ })) : p.forEach(((e) => {
+ t[e] = () => {};
+ })), t;
+}(), v = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
+function y(e, t = !1) {
+ let { host: n, path: r, pass: o, port: i, projectId: a, protocol: s, publicKey: l } = e;
+ return `${s}://${l}${t && o ? `:${o}` : ""}@${n}${i ? `:${i}` : ""}/${r && `${r}/`}${a}`;
+}
+function b(e) {
+ return {
+ protocol: e.protocol,
+ publicKey: e.publicKey || "",
+ pass: e.pass || "",
+ host: e.host,
+ port: e.port || "",
+ path: e.path || "",
+ projectId: e.projectId
+ };
+}
+const w = Object.prototype.toString;
+function x(e) {
+ switch (w.call(e)) {
+ case "[object Error]":
+ case "[object Exception]":
+ case "[object DOMException]": return !0;
+ default: return O(e, Error);
+ }
+}
+function E(e, t) {
+ return w.call(e) === `[object ${t}]`;
+}
+function S(e) {
+ return E(e, "ErrorEvent");
+}
+function C(e) {
+ return E(e, "DOMError");
+}
+function k(e) {
+ return typeof e == "object" && !!e && "__sentry_template_string__" in e && "__sentry_template_values__" in e;
+}
+function _(e) {
+ return E(e, "Object");
+}
+function T(e) {
+ return typeof Event < "u" && O(e, Event);
+}
+function I(e) {
+ return !!(e && e.then && typeof e.then == "function");
+}
+function O(e, t) {
+ try {
+ return e instanceof t;
+ } catch {
+ return !1;
+ }
+}
+const j = d();
+function P(e, t) {
+ let n = e, r = [], o, i, a, s, l;
+ if (!n || !n.tagName) return "";
+ if (j.HTMLElement && n instanceof HTMLElement && n.dataset && n.dataset.sentryComponent) return n.dataset.sentryComponent;
+ r.push(n.tagName.toLowerCase());
+ let c = t && t.length ? t.filter(((e) => n.getAttribute(e))).map(((e) => [e, n.getAttribute(e)])) : null;
+ if (c && c.length) c.forEach(((e) => {
+ r.push(`[${e[0]}="${e[1]}"]`);
+ }));
+ else if (n.id && r.push(`#${n.id}`), o = n.className, o && E(o, "String")) for (i = o.split(/\s+/), l = 0; l < i.length; l++) r.push(`.${i[l]}`);
+ let u = [
+ "aria-label",
+ "type",
+ "name",
+ "title",
+ "alt"
+ ];
+ for (l = 0; l < u.length; l++) a = u[l], s = n.getAttribute(a), s && r.push(`[${a}="${s}"]`);
+ return r.join("");
+}
+function A(e, t = 0) {
+ return typeof e != "string" || t === 0 || e.length <= t ? e : `${e.slice(0, t)}...`;
+}
+function N(e) {
+ if (x(e)) return {
+ message: e.message,
+ name: e.name,
+ stack: e.stack,
+ ...L(e)
+ };
+ if (T(e)) {
+ let t = {
+ type: e.type,
+ target: M(e.target),
+ currentTarget: M(e.currentTarget),
+ ...L(e)
+ };
+ return typeof CustomEvent < "u" && O(e, CustomEvent) && (t.detail = e.detail), t;
+ }
+ return e;
+}
+function M(e) {
+ try {
+ return typeof Element < "u" && O(e, Element) ? function(e, t = {}) {
+ if (!e) return "<unknown>";
+ try {
+ let n = e, o = [], i = 0, a = 0, c, u = Array.isArray(t) ? t : t.keyAttrs, d = !Array.isArray(t) && t.maxStringLength || 80;
+ for (; n && i++ < 5 && (c = P(n, u), !(c === "html" || i > 1 && a + o.length * 3 + c.length >= d));) o.push(c), a += c.length, n = n.parentNode;
+ return o.reverse().join(" > ");
+ } catch {
+ return "<unknown>";
+ }
+ }(e) : Object.prototype.toString.call(e);
+ } catch {
+ return "<unknown>";
+ }
+}
+function L(e) {
+ if (typeof e == "object" && e) {
+ let t = {};
+ for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
+ return t;
+ }
+ return {};
+}
+function D(e) {
+ return R(e, /* @__PURE__ */ new Map());
+}
+function R(e, t) {
+ if (function(e) {
+ if (!_(e)) return !1;
+ try {
+ let t = Object.getPrototypeOf(e).constructor.name;
+ return !t || t === "Object";
+ } catch {
+ return !0;
+ }
+ }(e)) {
+ let n = t.get(e);
+ if (n !== void 0) return n;
+ let r = {};
+ t.set(e, r);
+ for (let n of Object.keys(e)) e[n] !== void 0 && (r[n] = R(e[n], t));
+ return r;
+ }
+ if (Array.isArray(e)) {
+ let n = t.get(e);
+ if (n !== void 0) return n;
+ let r = [];
+ return t.set(e, r), e.forEach(((e) => {
+ r.push(R(e, t));
+ })), r;
+ }
+ return e;
+}
+function z() {
+ let e = u, t = e.crypto || e.msCrypto, n = () => 16 * Math.random();
+ try {
+ if (t && t.randomUUID) return t.randomUUID().replace(/-/g, "");
+ t && t.getRandomValues && (n = () => {
+ let e = /* @__PURE__ */ new Uint8Array(1);
+ return t.getRandomValues(e), e[0];
+ });
+ } catch {}
+ return "10000000100040008000100000000000".replace(/[018]/g, ((e) => (e ^ (15 & n()) >> e / 4).toString(16)));
+}
+function $(e, t, n) {
+ let r = e.exception = e.exception || {}, o = r.values = r.values || [], i = o[0] = o[0] || {};
+ i.value ||= t || "", i.type ||= n || "Error";
+}
+function B(e, t) {
+ let n = function(e) {
+ return e.exception && e.exception.values ? e.exception.values[0] : void 0;
+ }(e);
+ if (!n) return;
+ let r = n.mechanism;
+ if (n.mechanism = {
+ type: "generic",
+ handled: !0,
+ ...r,
+ ...t
+ }, t && "data" in t) {
+ let e = {
+ ...r && r.data,
+ ...t.data
+ };
+ n.mechanism.data = e;
+ }
+}
+function F(e) {
+ if (e && e.__sentry_captured__) return !0;
+ try {
+ (function(e, t, n) {
+ try {
+ Object.defineProperty(e, t, {
+ value: n,
+ writable: !0,
+ configurable: !0
+ });
+ } catch {
+ l && m.log(`Failed to add non-enumerable property "${t}" to object`, e);
+ }
+ })(e, "__sentry_captured__", !0);
+ } catch {}
+ return !1;
+}
+var U;
+function H(e) {
+ return new V(((t) => {
+ t(e);
+ }));
+}
+function W(e) {
+ return new V(((t, n) => {
+ n(e);
+ }));
+}
+(function(e) {
+ e[e.PENDING = 0] = "PENDING", e[e.RESOLVED = 1] = "RESOLVED", e[e.REJECTED = 2] = "REJECTED";
+})(U ||= {});
+var V = class V {
+ constructor(e) {
+ V.prototype.__init.call(this), V.prototype.__init2.call(this), V.prototype.__init3.call(this), V.prototype.__init4.call(this), this._state = U.PENDING, this._handlers = [];
+ try {
+ e(this._resolve, this._reject);
+ } catch (e) {
+ this._reject(e);
+ }
+ }
+ then(e, t) {
+ return new V(((n, r) => {
+ this._handlers.push([
+ !1,
+ (t) => {
+ if (e) try {
+ n(e(t));
+ } catch (e) {
+ r(e);
+ }
+ else n(t);
+ },
+ (e) => {
+ if (t) try {
+ n(t(e));
+ } catch (e) {
+ r(e);
+ }
+ else r(e);
+ }
+ ]), this._executeHandlers();
+ }));
+ }
+ catch(e) {
+ return this.then(((e) => e), e);
+ }
+ finally(e) {
+ return new V(((t, n) => {
+ let r, o;
+ return this.then(((t) => {
+ o = !1, r = t, e && e();
+ }), ((t) => {
+ o = !0, r = t, e && e();
+ })).then((() => {
+ o ? n(r) : t(r);
+ }));
+ }));
+ }
+ __init() {
+ this._resolve = (e) => {
+ this._setResult(U.RESOLVED, e);
+ };
+ }
+ __init2() {
+ this._reject = (e) => {
+ this._setResult(U.REJECTED, e);
+ };
+ }
+ __init3() {
+ this._setResult = (e, t) => {
+ this._state === U.PENDING && (I(t) ? t.then(this._resolve, this._reject) : (this._state = e, this._value = t, this._executeHandlers()));
+ };
+ }
+ __init4() {
+ this._executeHandlers = () => {
+ if (this._state === U.PENDING) return;
+ let e = this._handlers.slice();
+ this._handlers = [], e.forEach(((e) => {
+ e[0] ||= (this._state === U.RESOLVED && e[1](this._value), this._state === U.REJECTED && e[2](this._value), !0);
+ }));
+ };
+ }
+};
+const q = /\(error: (.*)\)/, G = /captureMessage|captureException/, Y = "<anonymous>";
+function Z(e, t = 100, n = Infinity) {
+ try {
+ return X("", e, t, n);
+ } catch (e) {
+ return { ERROR: `**non-serializable** (${e})` };
+ }
+}
+function K(e, t = 3, n = 102400) {
+ let r = Z(e, t);
+ return o = r, function(e) {
+ return ~-encodeURI(e).split(/%..|./).length;
+ }(JSON.stringify(o)) > n ? K(e, t - 1, n) : r;
+ var o;
+}
+function X(e, t, n = Infinity, r = Infinity, i = function() {
+ let e = typeof WeakSet == "function", t = e ? /* @__PURE__ */ new WeakSet() : [];
+ return [function(n) {
+ if (e) return !!t.has(n) || (t.add(n), !1);
+ for (let e = 0; e < t.length; e++) if (t[e] === n) return !0;
+ return t.push(n), !1;
+ }, function(n) {
+ if (e) t.delete(n);
+ else for (let e = 0; e < t.length; e++) if (t[e] === n) {
+ t.splice(e, 1);
+ break;
+ }
+ }];
+}()) {
+ let [a, s] = i;
+ if (t == null || [
+ "number",
+ "boolean",
+ "string"
+ ].includes(typeof t) && (typeof (l = t) != "number" || l == l)) return t;
+ var l;
+ let c = function(e, t) {
+ try {
+ if (e === "domain" && t && typeof t == "object" && t._events) return "[Domain]";
+ if (e === "domainEmitter") return "[DomainEmitter]";
+ if (o.g !== void 0 && t === o.g) return "[Global]";
+ if (typeof window < "u" && t === window) return "[Window]";
+ if (typeof document < "u" && t === document) return "[Document]";
+ if (function(e) {
+ return !(typeof e != "object" || !e || !e.__isVue && !e._isVue);
+ }(t)) return "[VueViewModel]";
+ if (function(e) {
+ return _(e) && "nativeEvent" in e && "preventDefault" in e && "stopPropagation" in e;
+ }(t)) return "[SyntheticEvent]";
+ if (typeof t == "number" && t != t) return "[NaN]";
+ if (typeof t == "function") return `[Function: ${function(e) {
+ try {
+ return e && typeof e == "function" && e.name || Y;
+ } catch {
+ return Y;
+ }
+ }(t)}]`;
+ if (typeof t == "symbol") return `[${String(t)}]`;
+ if (typeof t == "bigint") return `[BigInt: ${String(t)}]`;
+ let n = function(e) {
+ let t = Object.getPrototypeOf(e);
+ return t ? t.constructor.name : "null prototype";
+ }(t);
+ return /^HTML(\w*)Element$/.test(n) ? `[HTMLElement: ${n}]` : `[object ${n}]`;
+ } catch (e) {
+ return `**non-serializable** (${e})`;
+ }
+ }(e, t);
+ if (!c.startsWith("[object ")) return c;
+ if (t.__sentry_skip_normalization__) return t;
+ let u = typeof t.__sentry_override_normalization_depth__ == "number" ? t.__sentry_override_normalization_depth__ : n;
+ if (u === 0) return c.replace("object ", "");
+ if (a(t)) return "[Circular ~]";
+ let d = t;
+ if (d && typeof d.toJSON == "function") try {
+ return X("", d.toJSON(), u - 1, r, i);
+ } catch {}
+ let f = Array.isArray(t) ? [] : {}, p = 0, h = N(t);
+ for (let e in h) {
+ if (!Object.prototype.hasOwnProperty.call(h, e)) continue;
+ if (p >= r) {
+ f[e] = "[MaxProperties ~]";
+ break;
+ }
+ let t = h[e];
+ f[e] = X(e, t, u - 1, r, i), p++;
+ }
+ return s(t), f;
+}
+function J(e, t = []) {
+ return [e, t];
+}
+function Q(e, t) {
+ let [n, r] = e;
+ return [n, [...r, t]];
+}
+function ee(e, t) {
+ let n = e[1];
+ for (let e of n) if (t(e, e[0].type)) return !0;
+ return !1;
+}
+function te(e, t) {
+ return (t || new TextEncoder()).encode(e);
+}
+function ne(e, t) {
+ let [n, r] = e, o = JSON.stringify(n);
+ function i(e) {
+ typeof o == "string" ? o = typeof e == "string" ? o + e : [te(o, t), e] : o.push(typeof e == "string" ? te(e, t) : e);
+ }
+ for (let e of r) {
+ let [t, n] = e;
+ if (i(`\n${JSON.stringify(t)}\n`), typeof n == "string" || n instanceof Uint8Array) i(n);
+ else {
+ let e;
+ try {
+ e = JSON.stringify(n);
+ } catch {
+ e = JSON.stringify(Z(n));
+ }
+ i(e);
+ }
+ }
+ return typeof o == "string" ? o : function(e) {
+ let t = e.reduce(((e, t) => e + t.length), 0), n = new Uint8Array(t), r = 0;
+ for (let t of e) n.set(t, r), r += t.length;
+ return n;
+ }(o);
+}
+function re(e, t) {
+ let n = typeof e.data == "string" ? te(e.data, t) : e.data;
+ return [D({
+ type: "attachment",
+ length: n.length,
+ filename: e.filename,
+ content_type: e.contentType,
+ attachment_type: e.attachmentType
+ }), n];
+}
+const oe = {
+ session: "session",
+ sessions: "session",
+ attachment: "attachment",
+ transaction: "transaction",
+ event: "error",
+ client_report: "internal",
+ user_report: "default",
+ profile: "profile",
+ replay_event: "replay",
+ replay_recording: "replay",
+ check_in: "monitor",
+ feedback: "feedback",
+ span: "span",
+ statsd: "metric_bucket"
+};
+function ie(e) {
+ return oe[e];
+}
+function ae(e) {
+ if (!e || !e.sdk) return;
+ let { name: t, version: n } = e.sdk;
+ return {
+ name: t,
+ version: n
+ };
+}
+var se = class extends Error {
+ constructor(e, t = "warn") {
+ super(e), this.message = e, this.name = new.target.prototype.constructor.name, Object.setPrototypeOf(this, new.target.prototype), this.logLevel = t;
+ }
+};
+function le(e, t = {}) {
+ let n = typeof t == "string" ? t : t.tunnel, r = typeof t != "string" && t._metadata ? t._metadata.sdk : void 0;
+ return n || `${function(e) {
+ return `${function(e) {
+ let t = e.protocol ? `${e.protocol}:` : "", n = e.port ? `:${e.port}` : "";
+ return `${t}//${e.host}${n}${e.path ? `/${e.path}` : ""}/api/`;
+ }(e)}${e.projectId}/envelope/`;
+ }(e)}?${function(e, t) {
+ return n = {
+ sentry_key: e.publicKey,
+ sentry_version: "7",
+ ...t && { sentry_client: `${t.name}/${t.version}` }
+ }, Object.keys(n).map(((e) => `${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`)).join("&");
+ var n;
+ }(e, r)}`;
+}
+const ce = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
+function ue() {
+ return Date.now() / 1e3;
+}
+const de = function() {
+ let { performance: e } = u;
+ if (!e || !e.now) return ue;
+ let t = Date.now() - e.now(), n = e.timeOrigin == null ? t : e.timeOrigin;
+ return () => (n + e.now()) / 1e3;
+}();
+(() => {
+ let { performance: e } = u;
+ if (!e || !e.now) return;
+ let t = 36e5, n = e.now(), r = Date.now(), o = e.timeOrigin ? Math.abs(e.timeOrigin + n - r) : t, i = o < t, a = e.timing && e.timing.navigationStart, s = typeof a == "number" ? Math.abs(a + n - r) : t;
+ (i || s < t) && o <= s && e.timeOrigin;
+})();
+const pe = "production";
+function he() {
+ return f("globalEventProcessors", (() => []));
+}
+function ge(e) {
+ he().push(e);
+}
+function me(e, t, n, r = 0) {
+ return new V(((o, i) => {
+ let a = e[r];
+ if (t === null || typeof a != "function") o(t);
+ else {
+ let s = a({ ...t }, n);
+ ce && a.id && s === null && m.log(`Event processor "${a.id}" dropped event`), I(s) ? s.then(((t) => me(e, t, n, r + 1).then(o))).then(null, i) : me(e, s, n, r + 1).then(o).then(null, i);
+ }
+ }));
+}
+function ve(e, t = {}) {
+ if (t.user && (!e.ipAddress && t.user.ip_address && (e.ipAddress = t.user.ip_address), e.did || t.did || (e.did = t.user.id || t.user.email || t.user.username)), e.timestamp = t.timestamp || de(), t.abnormal_mechanism && (e.abnormal_mechanism = t.abnormal_mechanism), t.ignoreDuration && (e.ignoreDuration = t.ignoreDuration), t.sid && (e.sid = t.sid.length === 32 ? t.sid : z()), t.init !== void 0 && (e.init = t.init), !e.did && t.did && (e.did = `${t.did}`), typeof t.started == "number" && (e.started = t.started), e.ignoreDuration) e.duration = void 0;
+ else if (typeof t.duration == "number") e.duration = t.duration;
+ else {
+ let t = e.timestamp - e.started;
+ e.duration = t >= 0 ? t : 0;
+ }
+ t.release && (e.release = t.release), t.environment && (e.environment = t.environment), !e.ipAddress && t.ipAddress && (e.ipAddress = t.ipAddress), !e.userAgent && t.userAgent && (e.userAgent = t.userAgent), typeof t.errors == "number" && (e.errors = t.errors), t.status && (e.status = t.status);
+}
+function ye() {
+ return De().getClient();
+}
+function be(e) {
+ return e.transaction;
+}
+function we(e) {
+ let { spanId: t, traceId: n } = e.spanContext(), { data: r, op: o, parent_span_id: i, status: a, tags: s, origin: l } = xe(e);
+ return D({
+ data: r,
+ op: o,
+ parent_span_id: i,
+ span_id: t,
+ status: a,
+ tags: s,
+ trace_id: n,
+ origin: l
+ });
+}
+function xe(e) {
+ return function(e) {
+ return typeof e.getSpanJSON == "function";
+ }(e) ? e.getSpanJSON() : typeof e.toJSON == "function" ? e.toJSON() : {};
+}
+function Ee(e, t, n) {
+ let r = t.getOptions(), { publicKey: o } = t.getDsn() || {}, { segment: i } = n && n.getUser() || {}, a = D({
+ environment: r.environment || pe,
+ release: r.release,
+ user_segment: i,
+ public_key: o,
+ trace_id: e
+ });
+ return t.emit && t.emit("createDsc", a), a;
+}
+function Se(e) {
+ let t = ye();
+ if (!t) return {};
+ let n = Ee(xe(e).trace_id || "", t, De().getScope()), r = be(e);
+ if (!r) return n;
+ let o = r && r._frozenDynamicSamplingContext;
+ if (o) return o;
+ let { sampleRate: i, source: a } = r.metadata;
+ i != null && (n.sample_rate = `${i}`);
+ let s = xe(r);
+ return a && a !== "url" && (n.transaction = s.description), n.sampled = String(function(e) {
+ let { traceFlags: t } = e.spanContext();
+ return !!(1 & t);
+ }(r)), t.emit && t.emit("createDsc", n), n;
+}
+function Ce(e, t) {
+ let { fingerprint: n, span: r, breadcrumbs: o, sdkProcessingMetadata: i } = t;
+ (function(e, t) {
+ let { extra: n, tags: r, user: o, contexts: i, level: a, transactionName: s } = t, l = D(n);
+ l && Object.keys(l).length && (e.extra = {
+ ...l,
+ ...e.extra
+ });
+ let c = D(r);
+ c && Object.keys(c).length && (e.tags = {
+ ...c,
+ ...e.tags
+ });
+ let u = D(o);
+ u && Object.keys(u).length && (e.user = {
+ ...u,
+ ...e.user
+ });
+ let d = D(i);
+ d && Object.keys(d).length && (e.contexts = {
+ ...d,
+ ...e.contexts
+ }), a && (e.level = a), s && (e.transaction = s);
+ })(e, t), r && function(e, t) {
+ e.contexts = {
+ trace: we(t),
+ ...e.contexts
+ };
+ let n = be(t);
+ if (n) {
+ e.sdkProcessingMetadata = {
+ dynamicSamplingContext: Se(t),
+ ...e.sdkProcessingMetadata
+ };
+ let r = xe(n).description;
+ r && (e.tags = {
+ transaction: r,
+ ...e.tags
+ });
+ }
+ }(e, r), function(e, t) {
+ var n;
+ e.fingerprint = e.fingerprint ? (n = e.fingerprint, Array.isArray(n) ? n : [n]) : [], t && (e.fingerprint = e.fingerprint.concat(t)), e.fingerprint && !e.fingerprint.length && delete e.fingerprint;
+ }(e, n), function(e, t) {
+ let n = [...e.breadcrumbs || [], ...t];
+ e.breadcrumbs = n.length ? n : void 0;
+ }(e, o), function(e, t) {
+ e.sdkProcessingMetadata = {
+ ...e.sdkProcessingMetadata,
+ ...t
+ };
+ }(e, i);
+}
+function ke(e, t) {
+ let { extra: n, tags: r, user: o, contexts: i, level: a, sdkProcessingMetadata: s, breadcrumbs: l, fingerprint: c, eventProcessors: u, attachments: d, propagationContext: f, transactionName: p, span: h } = t;
+ _e(e, "extra", n), _e(e, "tags", r), _e(e, "user", o), _e(e, "contexts", i), _e(e, "sdkProcessingMetadata", s), a && (e.level = a), p && (e.transactionName = p), h && (e.span = h), l.length && (e.breadcrumbs = [...e.breadcrumbs, ...l]), c.length && (e.fingerprint = [...e.fingerprint, ...c]), u.length && (e.eventProcessors = [...e.eventProcessors, ...u]), d.length && (e.attachments = [...e.attachments, ...d]), e.propagationContext = {
+ ...e.propagationContext,
+ ...f
+ };
+}
+function _e(e, t, n) {
+ if (n && Object.keys(n).length) {
+ e[t] = { ...e[t] };
+ for (let r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[t][r] = n[r]);
+ }
+}
+let Te;
+var Ie = class Ie {
+ constructor() {
+ this._notifyingListeners = !1, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = Oe();
+ }
+ static clone(e) {
+ return e ? e.clone() : new Ie();
+ }
+ clone() {
+ let e = new Ie();
+ return e._breadcrumbs = [...this._breadcrumbs], e._tags = { ...this._tags }, e._extra = { ...this._extra }, e._contexts = { ...this._contexts }, e._user = this._user, e._level = this._level, e._span = this._span, e._session = this._session, e._transactionName = this._transactionName, e._fingerprint = this._fingerprint, e._eventProcessors = [...this._eventProcessors], e._requestSession = this._requestSession, e._attachments = [...this._attachments], e._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, e._propagationContext = { ...this._propagationContext }, e._client = this._client, e;
+ }
+ setClient(e) {
+ this._client = e;
+ }
+ getClient() {
+ return this._client;
+ }
+ addScopeListener(e) {
+ this._scopeListeners.push(e);
+ }
+ addEventProcessor(e) {
+ return this._eventProcessors.push(e), this;
+ }
+ setUser(e) {
+ return this._user = e || {
+ email: void 0,
+ id: void 0,
+ ip_address: void 0,
+ segment: void 0,
+ username: void 0
+ }, this._session && ve(this._session, { user: e }), this._notifyScopeListeners(), this;
+ }
+ getUser() {
+ return this._user;
+ }
+ getRequestSession() {
+ return this._requestSession;
+ }
+ setRequestSession(e) {
+ return this._requestSession = e, this;
+ }
+ setTags(e) {
+ return this._tags = {
+ ...this._tags,
+ ...e
+ }, this._notifyScopeListeners(), this;
+ }
+ setTag(e, t) {
+ return this._tags = {
+ ...this._tags,
+ [e]: t
+ }, this._notifyScopeListeners(), this;
+ }
+ setExtras(e) {
+ return this._extra = {
+ ...this._extra,
+ ...e
+ }, this._notifyScopeListeners(), this;
+ }
+ setExtra(e, t) {
+ return this._extra = {
+ ...this._extra,
+ [e]: t
+ }, this._notifyScopeListeners(), this;
+ }
+ setFingerprint(e) {
+ return this._fingerprint = e, this._notifyScopeListeners(), this;
+ }
+ setLevel(e) {
+ return this._level = e, this._notifyScopeListeners(), this;
+ }
+ setTransactionName(e) {
+ return this._transactionName = e, this._notifyScopeListeners(), this;
+ }
+ setContext(e, t) {
+ return t === null ? delete this._contexts[e] : this._contexts[e] = t, this._notifyScopeListeners(), this;
+ }
+ setSpan(e) {
+ return this._span = e, this._notifyScopeListeners(), this;
+ }
+ getSpan() {
+ return this._span;
+ }
+ getTransaction() {
+ let e = this._span;
+ return e && e.transaction;
+ }
+ setSession(e) {
+ return e ? this._session = e : delete this._session, this._notifyScopeListeners(), this;
+ }
+ getSession() {
+ return this._session;
+ }
+ update(e) {
+ if (!e) return this;
+ let t = typeof e == "function" ? e(this) : e;
+ if (t instanceof Ie) {
+ let e = t.getScopeData();
+ this._tags = {
+ ...this._tags,
+ ...e.tags
+ }, this._extra = {
+ ...this._extra,
+ ...e.extra
+ }, this._contexts = {
+ ...this._contexts,
+ ...e.contexts
+ }, e.user && Object.keys(e.user).length && (this._user = e.user), e.level && (this._level = e.level), e.fingerprint.length && (this._fingerprint = e.fingerprint), t.getRequestSession() && (this._requestSession = t.getRequestSession()), e.propagationContext && (this._propagationContext = e.propagationContext);
+ } else if (_(t)) {
+ let t = e;
+ this._tags = {
+ ...this._tags,
+ ...t.tags
+ }, this._extra = {
+ ...this._extra,
+ ...t.extra
+ }, this._contexts = {
+ ...this._contexts,
+ ...t.contexts
+ }, t.user && (this._user = t.user), t.level && (this._level = t.level), t.fingerprint && (this._fingerprint = t.fingerprint), t.requestSession && (this._requestSession = t.requestSession), t.propagationContext && (this._propagationContext = t.propagationContext);
+ }
+ return this;
+ }
+ clear() {
+ return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._span = void 0, this._session = void 0, this._notifyScopeListeners(), this._attachments = [], this._propagationContext = Oe(), this;
+ }
+ addBreadcrumb(e, t) {
+ let n = typeof t == "number" ? t : 100;
+ if (n <= 0) return this;
+ let r = {
+ timestamp: ue(),
+ ...e
+ }, o = this._breadcrumbs;
+ return o.push(r), this._breadcrumbs = o.length > n ? o.slice(-n) : o, this._notifyScopeListeners(), this;
+ }
+ getLastBreadcrumb() {
+ return this._breadcrumbs[this._breadcrumbs.length - 1];
+ }
+ clearBreadcrumbs() {
+ return this._breadcrumbs = [], this._notifyScopeListeners(), this;
+ }
+ addAttachment(e) {
+ return this._attachments.push(e), this;
+ }
+ getAttachments() {
+ return this.getScopeData().attachments;
+ }
+ clearAttachments() {
+ return this._attachments = [], this;
+ }
+ getScopeData() {
+ let { _breadcrumbs: e, _attachments: t, _contexts: n, _tags: r, _extra: o, _user: i, _level: a, _fingerprint: s, _eventProcessors: l, _propagationContext: c, _sdkProcessingMetadata: u, _transactionName: d, _span: f } = this;
+ return {
+ breadcrumbs: e,
+ attachments: t,
+ contexts: n,
+ tags: r,
+ extra: o,
+ user: i,
+ level: a,
+ fingerprint: s || [],
+ eventProcessors: l,
+ propagationContext: c,
+ sdkProcessingMetadata: u,
+ transactionName: d,
+ span: f
+ };
+ }
+ applyToEvent(e, t = {}, n = []) {
+ return Ce(e, this.getScopeData()), me([
+ ...n,
+ ...he(),
+ ...this._eventProcessors
+ ], e, t);
+ }
+ setSDKProcessingMetadata(e) {
+ return this._sdkProcessingMetadata = {
+ ...this._sdkProcessingMetadata,
+ ...e
+ }, this;
+ }
+ setPropagationContext(e) {
+ return this._propagationContext = e, this;
+ }
+ getPropagationContext() {
+ return this._propagationContext;
+ }
+ captureException(e, t) {
+ let n = t && t.event_id ? t.event_id : z();
+ if (!this._client) return m.warn("No client configured on scope - will not capture exception!"), n;
+ let r = /* @__PURE__ */ Error("Sentry syntheticException");
+ return this._client.captureException(e, {
+ originalException: e,
+ syntheticException: r,
+ ...t,
+ event_id: n
+ }, this), n;
+ }
+ captureMessage(e, t, n) {
+ let r = n && n.event_id ? n.event_id : z();
+ if (!this._client) return m.warn("No client configured on scope - will not capture message!"), r;
+ let o = Error(e);
+ return this._client.captureMessage(e, t, {
+ originalException: e,
+ syntheticException: o,
+ ...n,
+ event_id: r
+ }, this), r;
+ }
+ captureEvent(e, t) {
+ let n = t && t.event_id ? t.event_id : z();
+ return this._client ? (this._client.captureEvent(e, {
+ ...t,
+ event_id: n
+ }, this), n) : (m.warn("No client configured on scope - will not capture event!"), n);
+ }
+ _notifyScopeListeners() {
+ this._notifyingListeners ||= (this._notifyingListeners = !0, this._scopeListeners.forEach(((e) => {
+ e(this);
+ })), !1);
+ }
+};
+function Oe() {
+ return {
+ traceId: z(),
+ spanId: z().substring(16)
+ };
+}
+const je = "7.119.2", Pe = 7.119;
+var Ne = class {
+ constructor(e, t, n, r = Pe) {
+ let o, i;
+ this._version = r, t ? o = t : (o = new Ie(), o.setClient(e)), n ? i = n : (i = new Ie(), i.setClient(e)), this._stack = [{ scope: o }], e && this.bindClient(e), this._isolationScope = i;
+ }
+ isOlderThan(e) {
+ return this._version < e;
+ }
+ bindClient(e) {
+ let t = this.getStackTop();
+ t.client = e, t.scope.setClient(e), e && e.setupIntegrations && e.setupIntegrations();
+ }
+ pushScope() {
+ let e = this.getScope().clone();
+ return this.getStack().push({
+ client: this.getClient(),
+ scope: e
+ }), e;
+ }
+ popScope() {
+ return !(this.getStack().length <= 1 || !this.getStack().pop());
+ }
+ withScope(e) {
+ let t = this.pushScope(), n;
+ try {
+ n = e(t);
+ } catch (e) {
+ throw this.popScope(), e;
+ }
+ return I(n) ? n.then(((e) => (this.popScope(), e)), ((e) => {
+ throw this.popScope(), e;
+ })) : (this.popScope(), n);
+ }
+ getClient() {
+ return this.getStackTop().client;
+ }
+ getScope() {
+ return this.getStackTop().scope;
+ }
+ getIsolationScope() {
+ return this._isolationScope;
+ }
+ getStack() {
+ return this._stack;
+ }
+ getStackTop() {
+ return this._stack[this._stack.length - 1];
+ }
+ captureException(e, t) {
+ let n = this._lastEventId = t && t.event_id ? t.event_id : z(), r = /* @__PURE__ */ Error("Sentry syntheticException");
+ return this.getScope().captureException(e, {
+ originalException: e,
+ syntheticException: r,
+ ...t,
+ event_id: n
+ }), n;
+ }
+ captureMessage(e, t, n) {
+ let r = this._lastEventId = n && n.event_id ? n.event_id : z(), o = Error(e);
+ return this.getScope().captureMessage(e, t, {
+ originalException: e,
+ syntheticException: o,
+ ...n,
+ event_id: r
+ }), r;
+ }
+ captureEvent(e, t) {
+ let n = t && t.event_id ? t.event_id : z();
+ return e.type || (this._lastEventId = n), this.getScope().captureEvent(e, {
+ ...t,
+ event_id: n
+ }), n;
+ }
+ lastEventId() {
+ return this._lastEventId;
+ }
+ addBreadcrumb(e, t) {
+ let { scope: n, client: r } = this.getStackTop();
+ if (!r) return;
+ let { beforeBreadcrumb: o = null, maxBreadcrumbs: i = 100 } = r.getOptions && r.getOptions() || {};
+ if (i <= 0) return;
+ let a = {
+ timestamp: ue(),
+ ...e
+ }, s = o ? g((() => o(a, t))) : a;
+ s !== null && (r.emit && r.emit("beforeAddBreadcrumb", s, t), n.addBreadcrumb(s, i));
+ }
+ setUser(e) {
+ this.getScope().setUser(e), this.getIsolationScope().setUser(e);
+ }
+ setTags(e) {
+ this.getScope().setTags(e), this.getIsolationScope().setTags(e);
+ }
+ setExtras(e) {
+ this.getScope().setExtras(e), this.getIsolationScope().setExtras(e);
+ }
+ setTag(e, t) {
+ this.getScope().setTag(e, t), this.getIsolationScope().setTag(e, t);
+ }
+ setExtra(e, t) {
+ this.getScope().setExtra(e, t), this.getIsolationScope().setExtra(e, t);
+ }
+ setContext(e, t) {
+ this.getScope().setContext(e, t), this.getIsolationScope().setContext(e, t);
+ }
+ configureScope(e) {
+ let { scope: t, client: n } = this.getStackTop();
+ n && e(t);
+ }
+ run(e) {
+ let t = Le(this);
+ try {
+ e(this);
+ } finally {
+ Le(t);
+ }
+ }
+ getIntegration(e) {
+ let t = this.getClient();
+ if (!t) return null;
+ try {
+ return t.getIntegration(e);
+ } catch {
+ return ce && m.warn(`Cannot retrieve integration ${e.id} from the current Hub`), null;
+ }
+ }
+ startTransaction(e, t) {
+ let n = this._callExtensionMethod("startTransaction", e, t);
+ return ce && !n && (this.getClient() ? m.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n") : m.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")), n;
+ }
+ traceHeaders() {
+ return this._callExtensionMethod("traceHeaders");
+ }
+ captureSession(e = !1) {
+ if (e) return this.endSession();
+ this._sendSessionUpdate();
+ }
+ endSession() {
+ let e = this.getStackTop().scope, t = e.getSession();
+ t && function(e) {
+ let t = {};
+ e.status === "ok" && (t = { status: "exited" }), ve(e, t);
+ }(t), this._sendSessionUpdate(), e.setSession();
+ }
+ startSession(e) {
+ let { scope: t, client: n } = this.getStackTop(), { release: r, environment: o = pe } = n && n.getOptions() || {}, { userAgent: i } = u.navigator || {}, a = function(e) {
+ let t = de(), n = {
+ sid: z(),
+ init: !0,
+ timestamp: t,
+ started: t,
+ duration: 0,
+ status: "ok",
+ errors: 0,
+ ignoreDuration: !1,
+ toJSON: () => function(e) {
+ return D({
+ sid: `${e.sid}`,
+ init: e.init,
+ started: (/* @__PURE__ */ new Date(1e3 * e.started)).toISOString(),
+ timestamp: (/* @__PURE__ */ new Date(1e3 * e.timestamp)).toISOString(),
+ status: e.status,
+ errors: e.errors,
+ did: typeof e.did == "number" || typeof e.did == "string" ? `${e.did}` : void 0,
+ duration: e.duration,
+ abnormal_mechanism: e.abnormal_mechanism,
+ attrs: {
+ release: e.release,
+ environment: e.environment,
+ ip_address: e.ipAddress,
+ user_agent: e.userAgent
+ }
+ });
+ }(n)
+ };
+ return e && ve(n, e), n;
+ }({
+ release: r,
+ environment: o,
+ user: t.getUser(),
+ ...i && { userAgent: i },
+ ...e
+ }), s = t.getSession && t.getSession();
+ return s && s.status === "ok" && ve(s, { status: "exited" }), this.endSession(), t.setSession(a), a;
+ }
+ shouldSendDefaultPii() {
+ let e = this.getClient(), t = e && e.getOptions();
+ return !!(t && t.sendDefaultPii);
+ }
+ _sendSessionUpdate() {
+ let { scope: e, client: t } = this.getStackTop(), n = e.getSession();
+ n && t && t.captureSession && t.captureSession(n);
+ }
+ _callExtensionMethod(e, ...t) {
+ let n = Me().__SENTRY__;
+ if (n && n.extensions && typeof n.extensions[e] == "function") return n.extensions[e].apply(this, t);
+ ce && m.warn(`Extension method ${e} couldn't be found, doing nothing.`);
+ }
+};
+function Me() {
+ return u.__SENTRY__ = u.__SENTRY__ || {
+ extensions: {},
+ hub: void 0
+ }, u;
+}
+function Le(e) {
+ let t = Me(), n = Re(t);
+ return ze(t, e), n;
+}
+function De() {
+ let e = Me();
+ if (e.__SENTRY__ && e.__SENTRY__.acs) {
+ let t = e.__SENTRY__.acs.getCurrentHub();
+ if (t) return t;
+ }
+ return function(e = Me()) {
+ return t = e, t && t.__SENTRY__ && t.__SENTRY__.hub && !Re(e).isOlderThan(Pe) || ze(e, new Ne()), Re(e);
+ var t;
+ }(e);
+}
+function Re(e) {
+ return f("hub", (() => new Ne()), e);
+}
+function ze(e, t) {
+ return !!e && ((e.__SENTRY__ = e.__SENTRY__ || {}).hub = t, !0);
+}
+const $e = [];
+function Be(e, t) {
+ for (let n of t) n && n.afterAllSetup && n.afterAllSetup(e);
+}
+function Fe(e, t, n) {
+ if (n[t.name]) ce && m.log(`Integration skipped because it was already installed: ${t.name}`);
+ else {
+ if (n[t.name] = t, $e.indexOf(t.name) === -1 && (t.setupOnce(ge, De), $e.push(t.name)), t.setup && typeof t.setup == "function" && t.setup(e), e.on && typeof t.preprocessEvent == "function") {
+ let n = t.preprocessEvent.bind(t);
+ e.on("preprocessEvent", ((t, r) => n(t, r, e)));
+ }
+ if (e.addEventProcessor && typeof t.processEvent == "function") {
+ let n = t.processEvent.bind(t), r = Object.assign(((t, r) => n(t, r, e)), { id: t.name });
+ e.addEventProcessor(r);
+ }
+ ce && m.log(`Integration installed: ${t.name}`);
+ }
+}
+const Ue = /* @__PURE__ */ new WeakMap(), He = "Not capturing exception because it's already been captured.";
+var We = class {
+ constructor(e) {
+ if (this._options = e, this._integrations = {}, this._integrationsInitialized = !1, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = function(e) {
+ let t = typeof e == "string" ? function(e) {
+ let t = v.exec(e);
+ if (!t) return void g((() => {
+ console.error(`Invalid Sentry Dsn: ${e}`);
+ }));
+ let [n, r, o = "", i, a = "", s] = t.slice(1), l = "", c = s, u = c.split("/");
+ if (u.length > 1 && (l = u.slice(0, -1).join("/"), c = u.pop()), c) {
+ let e = c.match(/^\d+/);
+ e && (c = e[0]);
+ }
+ return b({
+ host: i,
+ pass: o,
+ path: l,
+ projectId: c,
+ port: a,
+ protocol: n,
+ publicKey: r
+ });
+ }(e) : b(e);
+ if (t && function(e) {
+ if (!l) return !0;
+ let { port: t, projectId: n, protocol: r } = e;
+ return !([
+ "protocol",
+ "publicKey",
+ "host",
+ "projectId"
+ ].find(((t) => !e[t] && (m.error(`Invalid Sentry Dsn: ${t} missing`), !0))) || (n.match(/^\d+$/) ? function(e) {
+ return e === "http" || e === "https";
+ }(r) ? t && isNaN(parseInt(t, 10)) && (m.error(`Invalid Sentry Dsn: Invalid port ${t}`), 1) : (m.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), 1) : (m.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), 1)));
+ }(t)) return t;
+ }(e.dsn) : ce && m.warn("No DSN provided, client will not send events."), this._dsn) {
+ let t = le(this._dsn, e);
+ this._transport = e.transport({
+ tunnel: this._options.tunnel,
+ recordDroppedEvent: this.recordDroppedEvent.bind(this),
+ ...e.transportOptions,
+ url: t
+ });
+ }
+ }
+ captureException(e, t, n) {
+ if (F(e)) return void (ce && m.log(He));
+ let r = t && t.event_id;
+ return this._process(this.eventFromException(e, t).then(((e) => this._captureEvent(e, t, n))).then(((e) => {
+ r = e;
+ }))), r;
+ }
+ captureMessage(e, t, n, r) {
+ let o = n && n.event_id, i = k(e) ? e : String(e), a = (s = e) === null || k(s) || typeof s != "object" && typeof s != "function" ? this.eventFromMessage(i, t, n) : this.eventFromException(e, n);
+ var s;
+ return this._process(a.then(((e) => this._captureEvent(e, n, r))).then(((e) => {
+ o = e;
+ }))), o;
+ }
+ captureEvent(e, t, n) {
+ if (t && t.originalException && F(t.originalException)) return void (ce && m.log(He));
+ let r = t && t.event_id, o = (e.sdkProcessingMetadata || {}).capturedSpanScope;
+ return this._process(this._captureEvent(e, t, o || n).then(((e) => {
+ r = e;
+ }))), r;
+ }
+ captureSession(e) {
+ typeof e.release == "string" ? (this.sendSession(e), ve(e, { init: !1 })) : ce && m.warn("Discarded session because of missing or non-string release");
+ }
+ getDsn() {
+ return this._dsn;
+ }
+ getOptions() {
+ return this._options;
+ }
+ getSdkMetadata() {
+ return this._options._metadata;
+ }
+ getTransport() {
+ return this._transport;
+ }
+ flush(e) {
+ let t = this._transport;
+ return t ? (this.metricsAggregator && this.metricsAggregator.flush(), this._isClientDoneProcessing(e).then(((n) => t.flush(e).then(((e) => n && e))))) : H(!0);
+ }
+ close(e) {
+ return this.flush(e).then(((e) => (this.getOptions().enabled = !1, this.metricsAggregator && this.metricsAggregator.close(), e)));
+ }
+ getEventProcessors() {
+ return this._eventProcessors;
+ }
+ addEventProcessor(e) {
+ this._eventProcessors.push(e);
+ }
+ setupIntegrations(e) {
+ (e && !this._integrationsInitialized || this._isEnabled() && !this._integrationsInitialized) && this._setupIntegrations();
+ }
+ init() {
+ this._isEnabled() && this._setupIntegrations();
+ }
+ getIntegrationById(e) {
+ return this.getIntegrationByName(e);
+ }
+ getIntegrationByName(e) {
+ return this._integrations[e];
+ }
+ getIntegration(e) {
+ try {
+ return this._integrations[e.id] || null;
+ } catch {
+ return ce && m.warn(`Cannot retrieve integration ${e.id} from the current Client`), null;
+ }
+ }
+ addIntegration(e) {
+ let t = this._integrations[e.name];
+ Fe(this, e, this._integrations), t || Be(this, [e]);
+ }
+ sendEvent(e, t = {}) {
+ this.emit("beforeSendEvent", e, t);
+ let n = function(e, t, n, r) {
+ let o = ae(n), i = e.type && e.type !== "replay_event" ? e.type : "event";
+ (function(e, t) {
+ t && (e.sdk = e.sdk || {}, e.sdk.name = e.sdk.name || t.name, e.sdk.version = e.sdk.version || t.version, e.sdk.integrations = [...e.sdk.integrations || [], ...t.integrations || []], e.sdk.packages = [...e.sdk.packages || [], ...t.packages || []]);
+ })(e, n && n.sdk);
+ let a = function(e, t, n, r) {
+ let o = e.sdkProcessingMetadata && e.sdkProcessingMetadata.dynamicSamplingContext;
+ return {
+ event_id: e.event_id,
+ sent_at: (/* @__PURE__ */ new Date()).toISOString(),
+ ...t && { sdk: t },
+ ...!!n && r && { dsn: y(r) },
+ ...o && { trace: D({ ...o }) }
+ };
+ }(e, o, r, t);
+ return delete e.sdkProcessingMetadata, J(a, [[{ type: i }, e]]);
+ }(e, this._dsn, this._options._metadata, this._options.tunnel);
+ for (let e of t.attachments || []) n = Q(n, re(e, this._options.transportOptions && this._options.transportOptions.textEncoder));
+ let r = this._sendEnvelope(n);
+ r && r.then(((t) => this.emit("afterSendEvent", e, t)), null);
+ }
+ sendSession(e) {
+ let t = function(e, t, n, r) {
+ let o = ae(n);
+ return J({
+ sent_at: (/* @__PURE__ */ new Date()).toISOString(),
+ ...o && { sdk: o },
+ ...!!r && t && { dsn: y(t) }
+ }, ["aggregates" in e ? [{ type: "sessions" }, e] : [{ type: "session" }, e.toJSON()]]);
+ }(e, this._dsn, this._options._metadata, this._options.tunnel);
+ this._sendEnvelope(t);
+ }
+ recordDroppedEvent(e, t, n) {
+ if (this._options.sendClientReports) {
+ let r = typeof n == "number" ? n : 1, o = `${e}:${t}`;
+ ce && m.log(`Recording outcome: "${o}"${r > 1 ? ` (${r} times)` : ""}`), this._outcomes[o] = (this._outcomes[o] || 0) + r;
+ }
+ }
+ captureAggregateMetrics(e) {
+ ce && m.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);
+ let t = function(e, t, n, r) {
+ let o = { sent_at: (/* @__PURE__ */ new Date()).toISOString() };
+ return n && n.sdk && (o.sdk = {
+ name: n.sdk.name,
+ version: n.sdk.version
+ }), r && t && (o.dsn = y(t)), J(o, [function(e) {
+ let t = function(e) {
+ let t = "";
+ for (let n of e) {
+ let e = Object.entries(n.tags), r = e.length > 0 ? `|#${e.map((([e, t]) => `${e}:${t}`)).join(",")}` : "";
+ t += `${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`;
+ }
+ return t;
+ }(e);
+ return [{
+ type: "statsd",
+ length: t.length
+ }, t];
+ }(e)]);
+ }(e, this._dsn, this._options._metadata, this._options.tunnel);
+ this._sendEnvelope(t);
+ }
+ on(e, t) {
+ this._hooks[e] || (this._hooks[e] = []), this._hooks[e].push(t);
+ }
+ emit(e, ...t) {
+ this._hooks[e] && this._hooks[e].forEach(((e) => e(...t)));
+ }
+ _setupIntegrations() {
+ let { integrations: e } = this._options;
+ this._integrations = function(e, t) {
+ let n = {};
+ return t.forEach(((t) => {
+ t && Fe(e, t, n);
+ })), n;
+ }(this, e), Be(this, e), this._integrationsInitialized = !0;
+ }
+ _updateSessionFromEvent(e, t) {
+ let n = !1, r = !1, o = t.exception && t.exception.values;
+ if (o) {
+ r = !0;
+ for (let e of o) {
+ let t = e.mechanism;
+ if (t && !1 === t.handled) {
+ n = !0;
+ break;
+ }
+ }
+ }
+ let i = e.status === "ok";
+ (i && e.errors === 0 || i && n) && (ve(e, {
+ ...n && { status: "crashed" },
+ errors: e.errors || Number(r || n)
+ }), this.captureSession(e));
+ }
+ _isClientDoneProcessing(e) {
+ return new V(((t) => {
+ let n = 0, r = setInterval((() => {
+ this._numProcessing == 0 ? (clearInterval(r), t(!0)) : (n += 1, e && n >= e && (clearInterval(r), t(!1)));
+ }), 1);
+ }));
+ }
+ _isEnabled() {
+ return !1 !== this.getOptions().enabled && this._transport !== void 0;
+ }
+ _prepareEvent(e, t, n, r = function() {
+ return De().getIsolationScope();
+ }()) {
+ let o = this.getOptions(), i = Object.keys(this._integrations);
+ return !t.integrations && i.length > 0 && (t.integrations = i), this.emit("preprocessEvent", e, t), function(e, t, n, r, o, i) {
+ let { normalizeDepth: a = 3, normalizeMaxBreadth: s = 1e3 } = e, l = {
+ ...t,
+ event_id: t.event_id || n.event_id || z(),
+ timestamp: t.timestamp || ue()
+ }, c = n.integrations || e.integrations.map(((e) => e.name));
+ (function(e, t) {
+ let { environment: n, release: r, dist: o, maxValueLength: i = 250 } = t;
+ "environment" in e || (e.environment = "environment" in t ? n : pe), e.release === void 0 && r !== void 0 && (e.release = r), e.dist === void 0 && o !== void 0 && (e.dist = o), e.message &&= A(e.message, i);
+ let a = e.exception && e.exception.values && e.exception.values[0];
+ a && a.value && (a.value = A(a.value, i));
+ let s = e.request;
+ s && s.url && (s.url = A(s.url, i));
+ })(l, e), function(e, t) {
+ t.length > 0 && (e.sdk = e.sdk || {}, e.sdk.integrations = [...e.sdk.integrations || [], ...t]);
+ }(l, c), t.type === void 0 && function(e, t) {
+ let n = u._sentryDebugIds;
+ if (!n) return;
+ let r, o = Ue.get(t);
+ o ? r = o : (r = /* @__PURE__ */ new Map(), Ue.set(t, r));
+ let i = Object.keys(n).reduce(((e, o) => {
+ let i, a = r.get(o);
+ a ? i = a : (i = t(o), r.set(o, i));
+ for (let t = i.length - 1; t >= 0; t--) {
+ let r = i[t];
+ if (r.filename) {
+ e[r.filename] = n[o];
+ break;
+ }
+ }
+ return e;
+ }), {});
+ try {
+ e.exception.values.forEach(((e) => {
+ e.stacktrace.frames.forEach(((e) => {
+ e.filename && (e.debug_id = i[e.filename]);
+ }));
+ }));
+ } catch {}
+ }(l, e.stackParser);
+ let d = function(e, t) {
+ if (!t) return e;
+ let n = e ? e.clone() : new Ie();
+ return n.update(t), n;
+ }(r, n.captureContext);
+ n.mechanism && B(l, n.mechanism);
+ let f = o && o.getEventProcessors ? o.getEventProcessors() : [], p = (Te ||= new Ie(), Te).getScopeData();
+ i && ke(p, i.getScopeData()), d && ke(p, d.getScopeData());
+ let h = [...n.attachments || [], ...p.attachments];
+ return h.length && (n.attachments = h), Ce(l, p), me([
+ ...f,
+ ...he(),
+ ...p.eventProcessors
+ ], l, n).then(((e) => (e && function(e) {
+ let t = {};
+ try {
+ e.exception.values.forEach(((e) => {
+ e.stacktrace.frames.forEach(((e) => {
+ e.debug_id && (e.abs_path ? t[e.abs_path] = e.debug_id : e.filename && (t[e.filename] = e.debug_id), delete e.debug_id);
+ }));
+ }));
+ } catch {}
+ if (Object.keys(t).length === 0) return;
+ e.debug_meta = e.debug_meta || {}, e.debug_meta.images = e.debug_meta.images || [];
+ let n = e.debug_meta.images;
+ Object.keys(t).forEach(((e) => {
+ n.push({
+ type: "sourcemap",
+ code_file: e,
+ debug_id: t[e]
+ });
+ }));
+ }(e), typeof a == "number" && a > 0 ? function(e, t, n) {
+ if (!e) return null;
+ let r = {
+ ...e,
+ ...e.breadcrumbs && { breadcrumbs: e.breadcrumbs.map(((e) => ({
+ ...e,
+ ...e.data && { data: Z(e.data, t, n) }
+ }))) },
+ ...e.user && { user: Z(e.user, t, n) },
+ ...e.contexts && { contexts: Z(e.contexts, t, n) },
+ ...e.extra && { extra: Z(e.extra, t, n) }
+ };
+ return e.contexts && e.contexts.trace && r.contexts && (r.contexts.trace = e.contexts.trace, e.contexts.trace.data && (r.contexts.trace.data = Z(e.contexts.trace.data, t, n))), e.spans && (r.spans = e.spans.map(((e) => {
+ let r = xe(e).data;
+ return r && (e.data = Z(r, t, n)), e;
+ }))), r;
+ }(e, a, s) : e)));
+ }(o, e, t, n, this, r).then(((e) => {
+ if (e === null) return e;
+ let t = {
+ ...r.getPropagationContext(),
+ ...n ? n.getPropagationContext() : void 0
+ };
+ if ((!e.contexts || !e.contexts.trace) && t) {
+ let { traceId: r, spanId: o, parentSpanId: i, dsc: a } = t;
+ e.contexts = {
+ trace: {
+ trace_id: r,
+ span_id: o,
+ parent_span_id: i
+ },
+ ...e.contexts
+ }, e.sdkProcessingMetadata = {
+ dynamicSamplingContext: a || Ee(r, this, n),
+ ...e.sdkProcessingMetadata
+ };
+ }
+ return e;
+ }));
+ }
+ _captureEvent(e, t = {}, n) {
+ return this._processEvent(e, t, n).then(((e) => e.event_id), ((e) => {
+ if (ce) {
+ let t = e;
+ t.logLevel === "log" ? m.log(t.message) : m.warn(t);
+ }
+ }));
+ }
+ _processEvent(e, t, n) {
+ let r = this.getOptions(), { sampleRate: o } = r, i = qe(e), a = Ve(e), s = e.type || "error", l = `before send for type \`${s}\``;
+ if (a && typeof o == "number" && Math.random() > o) return this.recordDroppedEvent("sample_rate", "error", e), W(new se(`Discarding event because it's not included in the random sample (sampling rate = ${o})`, "log"));
+ let c = s === "replay_event" ? "replay" : s, u = (e.sdkProcessingMetadata || {}).capturedSpanIsolationScope;
+ return this._prepareEvent(e, t, n, u).then(((n) => {
+ if (n === null) throw this.recordDroppedEvent("event_processor", c, e), new se("An event processor returned `null`, will not send event.", "log");
+ return t.data && !0 === t.data.__sentry__ ? n : function(e, t) {
+ let n = `${t} must return \`null\` or a valid event.`;
+ if (I(e)) return e.then(((e) => {
+ if (!_(e) && e !== null) throw new se(n);
+ return e;
+ }), ((e) => {
+ throw new se(`${t} rejected with ${e}`);
+ }));
+ if (!_(e) && e !== null) throw new se(n);
+ return e;
+ }(function(e, t, n) {
+ let { beforeSend: r, beforeSendTransaction: o } = e;
+ if (Ve(t) && r) return r(t, n);
+ if (qe(t) && o) {
+ if (t.spans) {
+ let e = t.spans.length;
+ t.sdkProcessingMetadata = {
+ ...t.sdkProcessingMetadata,
+ spanCountBeforeProcessing: e
+ };
+ }
+ return o(t, n);
+ }
+ return t;
+ }(r, n, t), l);
+ })).then(((r) => {
+ if (r === null) {
+ if (this.recordDroppedEvent("before_send", c, e), i) {
+ let t = 1 + (e.spans || []).length;
+ this.recordDroppedEvent("before_send", "span", t);
+ }
+ throw new se(`${l} returned \`null\`, will not send event.`, "log");
+ }
+ let o = n && n.getSession();
+ if (!i && o && this._updateSessionFromEvent(o, r), i) {
+ let e = (r.sdkProcessingMetadata && r.sdkProcessingMetadata.spanCountBeforeProcessing || 0) - (r.spans ? r.spans.length : 0);
+ e > 0 && this.recordDroppedEvent("before_send", "span", e);
+ }
+ let a = r.transaction_info;
+ return i && a && r.transaction !== e.transaction && (r.transaction_info = {
+ ...a,
+ source: "custom"
+ }), this.sendEvent(r, t), r;
+ })).then(null, ((e) => {
+ throw e instanceof se ? e : (this.captureException(e, {
+ data: { __sentry__: !0 },
+ originalException: e
+ }), new se(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`));
+ }));
+ }
+ _process(e) {
+ this._numProcessing++, e.then(((e) => (this._numProcessing--, e)), ((e) => (this._numProcessing--, e)));
+ }
+ _sendEnvelope(e) {
+ if (this.emit("beforeEnvelope", e), this._isEnabled() && this._transport) return this._transport.send(e).then(null, ((e) => {
+ ce && m.error("Error while sending event:", e);
+ }));
+ ce && m.error("Transport disabled");
+ }
+ _clearOutcomes() {
+ let e = this._outcomes;
+ return this._outcomes = {}, Object.keys(e).map(((t) => {
+ let [n, r] = t.split(":");
+ return {
+ reason: n,
+ category: r,
+ quantity: e[t]
+ };
+ }));
+ }
+};
+function Ve(e) {
+ return e.type === void 0;
+}
+function qe(e) {
+ return e.type === "transaction";
+}
+const Ge = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
+function Ye(e, t) {
+ let n = Ke(e, t), r = {
+ type: t && t.name,
+ value: Je(t)
+ };
+ return n.length && (r.stacktrace = { frames: n }), r.type === void 0 && r.value === "" && (r.value = "Unrecoverable error caught"), r;
+}
+function Ze(e, t) {
+ return { exception: { values: [Ye(e, t)] } };
+}
+function Ke(e, t) {
+ let n = t.stacktrace || t.stack || "", r = function(e) {
+ if (e) {
+ if (typeof e.framesToPop == "number") return e.framesToPop;
+ if (Xe.test(e.message)) return 1;
+ }
+ return 0;
+ }(t);
+ try {
+ return e(n, r);
+ } catch {}
+ return [];
+}
+const Xe = /Minified React error #\d+;/i;
+function Je(e) {
+ let t = e && e.message;
+ return t ? t.error && typeof t.error.message == "string" ? t.error.message : t : "No error message";
+}
+function Qe(e, t, n, r) {
+ let o = {};
+ if (r && n) {
+ let r = Ke(e, n);
+ r.length && (o.exception = { values: [{
+ value: t,
+ stacktrace: { frames: r }
+ }] });
+ }
+ if (k(t)) {
+ let { __sentry_template_string__: e, __sentry_template_values__: n } = t;
+ return o.logentry = {
+ message: e,
+ params: n
+ }, o;
+ }
+ return o.message = t, o;
+}
+function et(e, { isUnhandledRejection: t }) {
+ let n = function(e, t = 40) {
+ let n = Object.keys(N(e));
+ if (n.sort(), !n.length) return "[object has no keys]";
+ if (n[0].length >= t) return A(n[0], t);
+ for (let e = n.length; e > 0; e--) {
+ let r = n.slice(0, e).join(", ");
+ if (!(r.length > t)) return e === n.length ? r : A(r, t);
+ }
+ return "";
+ }(e), r = t ? "promise rejection" : "exception";
+ return S(e) ? `Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\`` : T(e) ? `Event \`${function(e) {
+ try {
+ let t = Object.getPrototypeOf(e);
+ return t ? t.constructor.name : void 0;
+ } catch {}
+ }(e)}\` (type=${e.type}) captured as ${r}` : `Object captured as ${r} with keys: ${n}`;
+}
+const tt = u;
+function rt(e, t, n, r) {
+ let o = {
+ filename: e,
+ function: t,
+ in_app: !0
+ };
+ return n !== void 0 && (o.lineno = n), r !== void 0 && (o.colno = r), o;
+}
+const ot = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, it = /\((\S*)(?::(\d+))(?::(\d+))\)/, at = [30, (e) => {
+ let t = ot.exec(e);
+ if (t) {
+ if (t[2] && t[2].indexOf("eval") === 0) {
+ let e = it.exec(t[2]);
+ e && (t[2] = e[1], t[3] = e[2], t[4] = e[3]);
+ }
+ let [e, n] = pt(t[1] || "?", t[2]);
+ return rt(n, e, t[3] ? +t[3] : void 0, t[4] ? +t[4] : void 0);
+ }
+}], st = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, lt = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, ct = [50, (e) => {
+ let t = st.exec(e);
+ if (t) {
+ if (t[3] && t[3].indexOf(" > eval") > -1) {
+ let e = lt.exec(t[3]);
+ e && (t[1] = t[1] || "eval", t[3] = e[1], t[4] = e[2], t[5] = "");
+ }
+ let e = t[3], n = t[1] || "?";
+ return [n, e] = pt(n, e), rt(e, n, t[4] ? +t[4] : void 0, t[5] ? +t[5] : void 0);
+ }
+}], ut = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i, ft = function(...e) {
+ let t = e.sort(((e, t) => e[0] - t[0])).map(((e) => e[1]));
+ return (e, n = 0) => {
+ let r = [], o = e.split("\n");
+ for (let e = n; e < o.length; e++) {
+ let n = o[e];
+ if (n.length > 1024) continue;
+ let i = q.test(n) ? n.replace(q, "$1") : n;
+ if (!i.match(/\S*Error: /)) {
+ for (let e of t) {
+ let t = e(i);
+ if (t) {
+ r.push(t);
+ break;
+ }
+ }
+ if (r.length >= 50) break;
+ }
+ }
+ return function(e) {
+ if (!e.length) return [];
+ let t = Array.from(e);
+ return /sentryWrapped/.test(t[t.length - 1].function || "") && t.pop(), t.reverse(), G.test(t[t.length - 1].function || "") && (t.pop(), G.test(t[t.length - 1].function || "") && t.pop()), t.slice(0, 50).map(((e) => ({
+ ...e,
+ filename: e.filename || t[t.length - 1].filename,
+ function: e.function || "?"
+ })));
+ }(r);
+ };
+}(at, ct, [40, (e) => {
+ let t = ut.exec(e);
+ return t ? rt(t[2], t[1] || "?", +t[3], t[4] ? +t[4] : void 0) : void 0;
+}]), pt = (e, t) => {
+ let n = e.indexOf("safari-extension") !== -1, r = e.indexOf("safari-web-extension") !== -1;
+ return n || r ? [e.indexOf("@") === -1 ? "?" : e.split("@")[0], n ? `safari-extension:${t}` : `safari-web-extension:${t}`] : [e, t];
+};
+function ht(e, t, n = function(e) {
+ let t = [];
+ function n(e) {
+ return t.splice(t.indexOf(e), 1)[0];
+ }
+ return {
+ $: t,
+ add: function(r) {
+ if (!(e === void 0 || t.length < e)) return W(new se("Not adding Promise because buffer limit was reached."));
+ let o = r();
+ return t.indexOf(o) === -1 && t.push(o), o.then((() => n(o))).then(null, (() => n(o).then(null, (() => {})))), o;
+ },
+ drain: function(e) {
+ return new V(((n, r) => {
+ let o = t.length;
+ if (!o) return n(!0);
+ let i = setTimeout((() => {
+ e && e > 0 && n(!1);
+ }), e);
+ t.forEach(((e) => {
+ H(e).then((() => {
+ --o || (clearTimeout(i), n(!0));
+ }), r);
+ }));
+ }));
+ }
+ };
+}(e.bufferSize || 30)) {
+ let r = {};
+ function o(o) {
+ let i = [];
+ if (ee(o, ((t, n) => {
+ let o = ie(n);
+ if (function(e, t, n = Date.now()) {
+ return function(e, t) {
+ return e[t] || e.all || 0;
+ }(e, t) > n;
+ }(r, o)) {
+ let r = gt(t, n);
+ e.recordDroppedEvent("ratelimit_backoff", o, r);
+ } else i.push(t);
+ })), i.length === 0) return H();
+ let a = J(o[0], i), s = (t) => {
+ ee(a, ((n, r) => {
+ let o = gt(n, r);
+ e.recordDroppedEvent(t, ie(r), o);
+ }));
+ };
+ return n.add((() => t({ body: ne(a, e.textEncoder) }).then(((e) => (e.statusCode !== void 0 && (e.statusCode < 200 || e.statusCode >= 300) && ce && m.warn(`Sentry responded with status code ${e.statusCode} to sent event.`), r = function(e, { statusCode: t, headers: n }, r = Date.now()) {
+ let o = { ...e }, i = n && n["x-sentry-rate-limits"], a = n && n["retry-after"];
+ if (i) for (let e of i.trim().split(",")) {
+ let [t, n, , , i] = e.split(":", 5), a = parseInt(t, 10), s = 1e3 * (isNaN(a) ? 60 : a);
+ if (n) for (let e of n.split(";")) e === "metric_bucket" && i && !i.split(";").includes("custom") || (o[e] = r + s);
+ else o.all = r + s;
+ }
+ else a ? o.all = r + function(e, t = Date.now()) {
+ let n = parseInt(`${e}`, 10);
+ if (!isNaN(n)) return 1e3 * n;
+ let r = Date.parse(`${e}`);
+ return isNaN(r) ? 6e4 : r - t;
+ }(a, r) : t === 429 && (o.all = r + 6e4);
+ return o;
+ }(r, e), e)), ((e) => {
+ throw s("network_error"), e;
+ })))).then(((e) => e), ((e) => {
+ if (e instanceof se) return ce && m.error("Skipped sending event because buffer is full."), s("queue_overflow"), H();
+ throw e;
+ }));
+ }
+ return o.__sentry__baseTransport__ = !0, {
+ send: o,
+ flush: (e) => n.drain(e)
+ };
+}
+function gt(e, t) {
+ if (t === "event" || t === "transaction") return Array.isArray(e) ? e[1] : void 0;
+}
+let mt;
+var vt = function() {
+ return vt = Object.assign || function(e) {
+ for (var t, n = 1, r = arguments.length; n < r; n++) for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
+ return e;
+ }, vt.apply(this, arguments);
+};
+function yt(e, t, n) {
+ if (n || arguments.length === 2) for (var r, o = 0, i = t.length; o < i; o++) !r && o in t || (r ||= Array.prototype.slice.call(t, 0, o), r[o] = t[o]);
+ return e.concat(r || Array.prototype.slice.call(t));
+}
+var bt = o(2833), wt = o.n(bt), xt = "-ms-", Et = "-moz-", St = "-webkit-", Ct = "comm", kt = "rule", _t = "decl", Tt = "@import", It = "@keyframes", Ot = "@layer", jt = Math.abs, Pt = String.fromCharCode, At = Object.assign;
+function Nt(e) {
+ return e.trim();
+}
+function Mt(e, t) {
+ return (e = t.exec(e)) ? e[0] : e;
+}
+function Lt(e, t, n) {
+ return e.replace(t, n);
+}
+function Dt(e, t, n) {
+ return e.indexOf(t, n);
+}
+function Rt(e, t) {
+ return 0 | e.charCodeAt(t);
+}
+function zt(e, t, n) {
+ return e.slice(t, n);
+}
+function $t(e) {
+ return e.length;
+}
+function Bt(e) {
+ return e.length;
+}
+function Ft(e, t) {
+ return t.push(e), e;
+}
+function Ut(e, t) {
+ return e.filter((function(e) {
+ return !Mt(e, t);
+ }));
+}
+var Ht = 1, Wt = 1, Vt = 0, qt = 0, Gt = 0, Yt = "";
+function Zt(e, t, n, r, o, i, a, s) {
+ return {
+ value: e,
+ root: t,
+ parent: n,
+ type: r,
+ props: o,
+ children: i,
+ line: Ht,
+ column: Wt,
+ length: a,
+ return: "",
+ siblings: s
+ };
+}
+function Kt(e, t) {
+ return At(Zt("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, t);
+}
+function Xt(e) {
+ for (; e.root;) e = Kt(e.root, { children: [e] });
+ Ft(e, e.siblings);
+}
+function Jt() {
+ return Gt = qt > 0 ? Rt(Yt, --qt) : 0, Wt--, Gt === 10 && (Wt = 1, Ht--), Gt;
+}
+function Qt() {
+ return Gt = qt < Vt ? Rt(Yt, qt++) : 0, Wt++, Gt === 10 && (Wt = 1, Ht++), Gt;
+}
+function en() {
+ return Rt(Yt, qt);
+}
+function tn() {
+ return qt;
+}
+function nn(e, t) {
+ return zt(Yt, e, t);
+}
+function rn(e) {
+ switch (e) {
+ case 0:
+ case 9:
+ case 10:
+ case 13:
+ case 32: return 5;
+ case 33:
+ case 43:
+ case 44:
+ case 47:
+ case 62:
+ case 64:
+ case 126:
+ case 59:
+ case 123:
+ case 125: return 4;
+ case 58: return 3;
+ case 34:
+ case 39:
+ case 40:
+ case 91: return 2;
+ case 41:
+ case 93: return 1;
+ }
+ return 0;
+}
+function on(e) {
+ return Nt(nn(qt - 1, ln(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
+}
+function an(e) {
+ for (; (Gt = en()) && Gt < 33;) Qt();
+ return rn(e) > 2 || rn(Gt) > 3 ? "" : " ";
+}
+function sn(e, t) {
+ for (; --t && Qt() && !(Gt < 48 || Gt > 102 || Gt > 57 && Gt < 65 || Gt > 70 && Gt < 97););
+ return nn(e, tn() + (t < 6 && en() == 32 && Qt() == 32));
+}
+function ln(e) {
+ for (; Qt();) switch (Gt) {
+ case e: return qt;
+ case 34:
+ case 39:
+ e !== 34 && e !== 39 && ln(Gt);
+ break;
+ case 40:
+ e === 41 && ln(e);
+ break;
+ case 92: Qt();
+ }
+ return qt;
+}
+function cn(e, t) {
+ for (; Qt() && e + Gt !== 57 && (e + Gt !== 84 || en() !== 47););
+ return "/*" + nn(t, qt - 1) + "*" + Pt(e === 47 ? e : Qt());
+}
+function un(e) {
+ for (; !rn(en());) Qt();
+ return nn(e, qt);
+}
+function dn(e, t) {
+ for (var n = "", r = 0; r < e.length; r++) n += t(e[r], r, e, t) || "";
+ return n;
+}
+function fn(e, t, n, r) {
+ switch (e.type) {
+ case Ot: if (e.children.length) break;
+ case Tt:
+ case _t: return e.return = e.return || e.value;
+ case Ct: return "";
+ case It: return e.return = e.value + "{" + dn(e.children, r) + "}";
+ case kt: if (!$t(e.value = e.props.join(","))) return "";
+ }
+ return $t(n = dn(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
+}
+function pn(e, t, n) {
+ switch (function(e, t) {
+ return 45 ^ Rt(e, 0) ? (((t << 2 ^ Rt(e, 0)) << 2 ^ Rt(e, 1)) << 2 ^ Rt(e, 2)) << 2 ^ Rt(e, 3) : 0;
+ }(e, t)) {
+ case 5103: return St + "print-" + e + e;
+ case 5737:
+ case 4201:
+ case 3177:
+ case 3433:
+ case 1641:
+ case 4457:
+ case 2921:
+ case 5572:
+ case 6356:
+ case 5844:
+ case 3191:
+ case 6645:
+ case 3005:
+ case 6391:
+ case 5879:
+ case 5623:
+ case 6135:
+ case 4599:
+ case 4855:
+ case 4215:
+ case 6389:
+ case 5109:
+ case 5365:
+ case 5621:
+ case 3829: return St + e + e;
+ case 4789: return Et + e + e;
+ case 5349:
+ case 4246:
+ case 4810:
+ case 6968:
+ case 2756: return St + e + Et + e + xt + e + e;
+ case 5936: switch (Rt(e, t + 11)) {
+ case 114: return St + e + xt + Lt(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
+ case 108: return St + e + xt + Lt(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
+ case 45: return St + e + xt + Lt(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
+ }
+ case 6828:
+ case 4268:
+ case 2903: return St + e + xt + e + e;
+ case 6165: return St + e + xt + "flex-" + e + e;
+ case 5187: return St + e + Lt(e, /(\w+).+(:[^]+)/, St + "box-$1$2" + xt + "flex-$1$2") + e;
+ case 5443: return St + e + xt + "flex-item-" + Lt(e, /flex-|-self/g, "") + (Mt(e, /flex-|baseline/) ? "" : xt + "grid-row-" + Lt(e, /flex-|-self/g, "")) + e;
+ case 4675: return St + e + xt + "flex-line-pack" + Lt(e, /align-content|flex-|-self/g, "") + e;
+ case 5548: return St + e + xt + Lt(e, "shrink", "negative") + e;
+ case 5292: return St + e + xt + Lt(e, "basis", "preferred-size") + e;
+ case 6060: return St + "box-" + Lt(e, "-grow", "") + St + e + xt + Lt(e, "grow", "positive") + e;
+ case 4554: return St + Lt(e, /([^-])(transform)/g, "$1" + St + "$2") + e;
+ case 6187: return Lt(Lt(Lt(e, /(zoom-|grab)/, St + "$1"), /(image-set)/, St + "$1"), e, "") + e;
+ case 5495:
+ case 3959: return Lt(e, /(image-set\([^]*)/, St + "$1$`$1");
+ case 4968: return Lt(Lt(e, /(.+:)(flex-)?(.*)/, St + "box-pack:$3" + xt + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + St + e + e;
+ case 4200:
+ if (!Mt(e, /flex-|baseline/)) return xt + "grid-column-align" + zt(e, t) + e;
+ break;
+ case 2592:
+ case 3360: return xt + Lt(e, "template-", "") + e;
+ case 4384:
+ case 3616: return n && n.some((function(e, n) {
+ return t = n, Mt(e.props, /grid-\w+-end/);
+ })) ? ~Dt(e + (n = n[t].value), "span", 0) ? e : xt + Lt(e, "-start", "") + e + xt + "grid-row-span:" + (~Dt(n, "span", 0) ? Mt(n, /\d+/) : Mt(n, /\d+/) - +Mt(e, /\d+/)) + ";" : xt + Lt(e, "-start", "") + e;
+ case 4896:
+ case 4128: return n && n.some((function(e) {
+ return Mt(e.props, /grid-\w+-start/);
+ })) ? e : xt + Lt(Lt(e, "-end", "-span"), "span ", "") + e;
+ case 4095:
+ case 3583:
+ case 4068:
+ case 2532: return Lt(e, /(.+)-inline(.+)/, St + "$1$2") + e;
+ case 8116:
+ case 7059:
+ case 5753:
+ case 5535:
+ case 5445:
+ case 5701:
+ case 4933:
+ case 4677:
+ case 5533:
+ case 5789:
+ case 5021:
+ case 4765:
+ if ($t(e) - 1 - t > 6) switch (Rt(e, t + 1)) {
+ case 109: if (Rt(e, t + 4) !== 45) break;
+ case 102: return Lt(e, /(.+:)(.+)-([^]+)/, "$1" + St + "$2-$3$1" + Et + (Rt(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
+ case 115: return ~Dt(e, "stretch", 0) ? pn(Lt(e, "stretch", "fill-available"), t, n) + e : e;
+ }
+ break;
+ case 5152:
+ case 5920: return Lt(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, (function(t, n, r, o, i, a, s) {
+ return xt + n + ":" + r + s + (o ? xt + n + "-span:" + (i ? a : a - +r) + s : "") + e;
+ }));
+ case 4949:
+ if (Rt(e, t + 6) === 121) return Lt(e, ":", ":" + St) + e;
+ break;
+ case 6444:
+ switch (Rt(e, Rt(e, 14) === 45 ? 18 : 11)) {
+ case 120: return Lt(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + St + (Rt(e, 14) === 45 ? "inline-" : "") + "box$3$1" + St + "$2$3$1" + xt + "$2box$3") + e;
+ case 100: return Lt(e, ":", ":" + xt) + e;
+ }
+ break;
+ case 5719:
+ case 2647:
+ case 2135:
+ case 3927:
+ case 2391: return Lt(e, "scroll-", "scroll-snap-") + e;
+ }
+ return e;
+}
+function hn(e, t, n, r) {
+ if (e.length > -1 && !e.return) switch (e.type) {
+ case _t:
+ e.return = pn(e.value, e.length, n);
+ return;
+ case It: return dn([Kt(e, { value: Lt(e.value, "@", "@" + St) })], r);
+ case kt: if (e.length) return function(e, t) {
+ return e.map(t).join("");
+ }(n = e.props, (function(t) {
+ switch (Mt(t, r = /(::plac\w+|:read-\w+)/)) {
+ case ":read-only":
+ case ":read-write":
+ Xt(Kt(e, { props: [Lt(t, /:(read-\w+)/, ":" + Et + "$1")] })), Xt(Kt(e, { props: [t] })), At(e, { props: Ut(n, r) });
+ break;
+ case "::placeholder": Xt(Kt(e, { props: [Lt(t, /:(plac\w+)/, ":" + St + "input-$1")] })), Xt(Kt(e, { props: [Lt(t, /:(plac\w+)/, ":" + Et + "$1")] })), Xt(Kt(e, { props: [Lt(t, /:(plac\w+)/, xt + "input-$1")] })), Xt(Kt(e, { props: [t] })), At(e, { props: Ut(n, r) });
+ }
+ return "";
+ }));
+ }
+}
+function gn(e) {
+ return function(e) {
+ return Yt = "", e;
+ }(mn("", null, null, null, [""], e = function(e) {
+ return Ht = Wt = 1, Vt = $t(Yt = e), qt = 0, [];
+ }(e), 0, [0], e));
+}
+function mn(e, t, n, r, o, i, a, s, l) {
+ for (var c = 0, u = 0, d = a, f = 0, p = 0, h = 0, g = 1, m = 1, v = 1, y = 0, b = "", w = o, x = i, E = r, S = b; m;) switch (h = y, y = Qt()) {
+ case 40: if (h != 108 && Rt(S, d - 1) == 58) {
+ Dt(S += Lt(on(y), "&", "&\f"), "&\f", jt(c ? s[c - 1] : 0)) != -1 && (v = -1);
+ break;
+ }
+ case 34:
+ case 39:
+ case 91:
+ S += on(y);
+ break;
+ case 9:
+ case 10:
+ case 13:
+ case 32:
+ S += an(h);
+ break;
+ case 92:
+ S += sn(tn() - 1, 7);
+ continue;
+ case 47:
+ switch (en()) {
+ case 42:
+ case 47:
+ Ft(yn(cn(Qt(), tn()), t, n, l), l);
+ break;
+ default: S += "/";
+ }
+ break;
+ case 123 * g: s[c++] = $t(S) * v;
+ case 125 * g:
+ case 59:
+ case 0:
+ switch (y) {
+ case 0:
+ case 125: m = 0;
+ case 59 + u:
+ v == -1 && (S = Lt(S, /\f/g, "")), p > 0 && $t(S) - d && Ft(p > 32 ? bn(S + ";", r, n, d - 1, l) : bn(Lt(S, " ", "") + ";", r, n, d - 2, l), l);
+ break;
+ case 59: S += ";";
+ default: if (Ft(E = vn(S, t, n, c, u, o, s, b, w = [], x = [], d, i), i), y === 123) if (u === 0) mn(S, t, E, E, w, i, d, s, x);
+ else switch (f === 99 && Rt(S, 3) === 110 ? 100 : f) {
+ case 100:
+ case 108:
+ case 109:
+ case 115:
+ mn(e, E, E, r && Ft(vn(e, E, E, 0, 0, o, s, b, o, w = [], d, x), x), o, x, d, s, r ? w : x);
+ break;
+ default: mn(S, E, E, E, [""], x, 0, s, x);
+ }
+ }
+ c = u = p = 0, g = v = 1, b = S = "", d = a;
+ break;
+ case 58: d = 1 + $t(S), p = h;
+ default:
+ if (g < 1) {
+ if (y == 123) --g;
+ else if (y == 125 && g++ == 0 && Jt() == 125) continue;
+ }
+ switch (S += Pt(y), y * g) {
+ case 38:
+ v = u > 0 ? 1 : (S += "\f", -1);
+ break;
+ case 44:
+ s[c++] = ($t(S) - 1) * v, v = 1;
+ break;
+ case 64:
+ en() === 45 && (S += on(Qt())), f = en(), u = d = $t(b = S += un(tn())), y++;
+ break;
+ case 45: h === 45 && $t(S) == 2 && (g = 0);
+ }
+ }
+ return i;
+}
+function vn(e, t, n, r, o, i, a, s, l, c, u, d) {
+ for (var f = o - 1, p = o === 0 ? i : [""], h = Bt(p), g = 0, m = 0, v = 0; g < r; ++g) for (var y = 0, b = zt(e, f + 1, f = jt(m = a[g])), w = e; y < h; ++y) (w = Nt(m > 0 ? p[y] + " " + b : Lt(b, /&\f/g, p[y]))) && (l[v++] = w);
+ return Zt(e, t, n, o === 0 ? kt : s, l, c, u, d);
+}
+function yn(e, t, n, r) {
+ return Zt(e, t, n, Ct, Pt(Gt), zt(e, 2, -2), 0, r);
+}
+function bn(e, t, n, r, o) {
+ return Zt(e, t, n, _t, zt(e, 0, r), zt(e, r + 1, -1), r, o);
+}
+var wn = {
+ animationIterationCount: 1,
+ aspectRatio: 1,
+ borderImageOutset: 1,
+ borderImageSlice: 1,
+ borderImageWidth: 1,
+ boxFlex: 1,
+ boxFlexGroup: 1,
+ boxOrdinalGroup: 1,
+ columnCount: 1,
+ columns: 1,
+ flex: 1,
+ flexGrow: 1,
+ flexPositive: 1,
+ flexShrink: 1,
+ flexNegative: 1,
+ flexOrder: 1,
+ gridRow: 1,
+ gridRowEnd: 1,
+ gridRowSpan: 1,
+ gridRowStart: 1,
+ gridColumn: 1,
+ gridColumnEnd: 1,
+ gridColumnSpan: 1,
+ gridColumnStart: 1,
+ msGridRow: 1,
+ msGridRowSpan: 1,
+ msGridColumn: 1,
+ msGridColumnSpan: 1,
+ fontWeight: 1,
+ lineHeight: 1,
+ opacity: 1,
+ order: 1,
+ orphans: 1,
+ tabSize: 1,
+ widows: 1,
+ zIndex: 1,
+ zoom: 1,
+ WebkitLineClamp: 1,
+ fillOpacity: 1,
+ floodOpacity: 1,
+ stopOpacity: 1,
+ strokeDasharray: 1,
+ strokeDashoffset: 1,
+ strokeMiterlimit: 1,
+ strokeOpacity: 1,
+ strokeWidth: 1
+}, xn = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", En = "active", Sn = "data-styled-version", Cn = "6.1.13", kn = "/*!sc*/\n", _n = typeof window < "u" && "HTMLElement" in window, Tn = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" && process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY), In = {}, On = Object.freeze([]), jn = Object.freeze({});
+function Pn(e, t, n) {
+ return n === void 0 && (n = jn), e.theme !== n.theme && e.theme || t || n.theme;
+}
+var An = /* @__PURE__ */ new Set(/* @__PURE__ */ "a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.track.u.ul.use.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan".split(".")), Nn = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, Mn = /(^-|-$)/g;
+function Ln(e) {
+ return e.replace(Nn, "-").replace(Mn, "");
+}
+var Dn = /(a)(d)/gi, Rn = function(e) {
+ return String.fromCharCode(e + (e > 25 ? 39 : 97));
+};
+function zn(e) {
+ var t, n = "";
+ for (t = Math.abs(e); t > 52; t = t / 52 | 0) n = Rn(t % 52) + n;
+ return (Rn(t % 52) + n).replace(Dn, "$1-$2");
+}
+var $n, Bn = 5381, Fn = function(e, t) {
+ for (var n = t.length; n;) e = 33 * e ^ t.charCodeAt(--n);
+ return e;
+}, Un = function(e) {
+ return Fn(Bn, e);
+};
+function Hn(e) {
+ return zn(Un(e) >>> 0);
+}
+function Wn(e) {
+ return typeof e == "string" && !0;
+}
+var Vn = typeof Symbol == "function" && Symbol.for, qn = Vn ? Symbol.for("react.memo") : 60115, Gn = Vn ? Symbol.for("react.forward_ref") : 60112, Yn = {
+ childContextTypes: !0,
+ contextType: !0,
+ contextTypes: !0,
+ defaultProps: !0,
+ displayName: !0,
+ getDefaultProps: !0,
+ getDerivedStateFromError: !0,
+ getDerivedStateFromProps: !0,
+ mixins: !0,
+ propTypes: !0,
+ type: !0
+}, Zn = {
+ name: !0,
+ length: !0,
+ prototype: !0,
+ caller: !0,
+ callee: !0,
+ arguments: !0,
+ arity: !0
+}, Kn = {
+ $$typeof: !0,
+ compare: !0,
+ defaultProps: !0,
+ displayName: !0,
+ propTypes: !0,
+ type: !0
+}, Xn = (($n = {})[Gn] = {
+ $$typeof: !0,
+ render: !0,
+ defaultProps: !0,
+ displayName: !0,
+ propTypes: !0
+}, $n[qn] = Kn, $n);
+function Jn(e) {
+ return ("type" in (t = e) && t.type.$$typeof) === qn ? Kn : "$$typeof" in e ? Xn[e.$$typeof] : Yn;
+ var t;
+}
+var Qn = Object.defineProperty, er = Object.getOwnPropertyNames, tr = Object.getOwnPropertySymbols, nr = Object.getOwnPropertyDescriptor, rr = Object.getPrototypeOf, or = Object.prototype;
+function ir(e, t, n) {
+ if (typeof t != "string") {
+ if (or) {
+ var r = rr(t);
+ r && r !== or && ir(e, r, n);
+ }
+ var o = er(t);
+ tr && (o = o.concat(tr(t)));
+ for (var i = Jn(e), a = Jn(t), s = 0; s < o.length; ++s) {
+ var l = o[s];
+ if (!(l in Zn || n && n[l] || a && l in a || i && l in i)) {
+ var c = nr(t, l);
+ try {
+ Qn(e, l, c);
+ } catch {}
+ }
+ }
+ }
+ return e;
+}
+function ar(e) {
+ return typeof e == "function";
+}
+function sr(e) {
+ return typeof e == "object" && "styledComponentId" in e;
+}
+function lr(e, t) {
+ return e && t ? `${e} ${t}` : e || t || "";
+}
+function cr(e, t) {
+ if (e.length === 0) return "";
+ for (var n = e[0], r = 1; r < e.length; r++) n += t ? t + e[r] : e[r];
+ return n;
+}
+function ur(e) {
+ return typeof e == "object" && !!e && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
+}
+function dr(e, t, n) {
+ if (n === void 0 && (n = !1), !n && !ur(e) && !Array.isArray(e)) return t;
+ if (Array.isArray(t)) for (var r = 0; r < t.length; r++) e[r] = dr(e[r], t[r]);
+ else if (ur(t)) for (var r in t) e[r] = dr(e[r], t[r]);
+ return e;
+}
+function fr(e, t) {
+ Object.defineProperty(e, "toString", { value: t });
+}
+function pr(e) {
+ var t = [...arguments].slice(1);
+ return /* @__PURE__ */ Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length > 0 ? ` Args: ${t.join(", ")}` : ""}`);
+}
+var hr = function() {
+ function e(e) {
+ this.groupSizes = /* @__PURE__ */ new Uint32Array(512), this.length = 512, this.tag = e;
+ }
+ return e.prototype.indexOfGroup = function(e) {
+ for (var t = 0, n = 0; n < e; n++) t += this.groupSizes[n];
+ return t;
+ }, e.prototype.insertRules = function(e, t) {
+ if (e >= this.groupSizes.length) {
+ for (var n = this.groupSizes, r = n.length, o = r; e >= o;) if ((o <<= 1) < 0) throw pr(16, `${e}`);
+ this.groupSizes = new Uint32Array(o), this.groupSizes.set(n), this.length = o;
+ for (var i = r; i < o; i++) this.groupSizes[i] = 0;
+ }
+ for (var a = this.indexOfGroup(e + 1), s = (i = 0, t.length); i < s; i++) this.tag.insertRule(a, t[i]) && (this.groupSizes[e]++, a++);
+ }, e.prototype.clearGroup = function(e) {
+ if (e < this.length) {
+ var t = this.groupSizes[e], n = this.indexOfGroup(e), r = n + t;
+ this.groupSizes[e] = 0;
+ for (var o = n; o < r; o++) this.tag.deleteRule(n);
+ }
+ }, e.prototype.getGroup = function(e) {
+ var t = "";
+ if (e >= this.length || this.groupSizes[e] === 0) return t;
+ for (var n = this.groupSizes[e], r = this.indexOfGroup(e), o = r + n, i = r; i < o; i++) t += `${this.tag.getRule(i)}${kn}`;
+ return t;
+ }, e;
+}(), gr = /* @__PURE__ */ new Map(), mr = /* @__PURE__ */ new Map(), vr = 1, yr = function(e) {
+ if (gr.has(e)) return gr.get(e);
+ for (; mr.has(vr);) vr++;
+ var t = vr++;
+ return gr.set(e, t), mr.set(t, e), t;
+}, br = function(e, t) {
+ vr = t + 1, gr.set(e, t), mr.set(t, e);
+}, wr = `style[${xn}][${Sn}="${Cn}"]`, xr = RegExp(`^${xn}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`), Er = function(e, t, n) {
+ for (var r, o = n.split(","), i = 0, a = o.length; i < a; i++) (r = o[i]) && e.registerName(t, r);
+}, Sr = function(e, t) {
+ for (var r = (t.textContent ?? "").split(kn), o = [], i = 0, a = r.length; i < a; i++) {
+ var s = r[i].trim();
+ if (s) {
+ var l = s.match(xr);
+ if (l) {
+ var c = 0 | parseInt(l[1], 10), u = l[2];
+ c !== 0 && (br(u, c), Er(e, u, l[3]), e.getTag().insertRules(c, o)), o.length = 0;
+ } else o.push(s);
+ }
+ }
+}, Cr = function(e) {
+ for (var t = document.querySelectorAll(wr), n = 0, r = t.length; n < r; n++) {
+ var o = t[n];
+ o && o.getAttribute(xn) !== En && (Sr(e, o), o.parentNode && o.parentNode.removeChild(o));
+ }
+};
+function kr() {
+ return o.nc;
+}
+var _r = function(e) {
+ var t = document.head, n = e || t, r = document.createElement("style"), o = function(e) {
+ var t = Array.from(e.querySelectorAll(`style[${xn}]`));
+ return t[t.length - 1];
+ }(n), i = o === void 0 ? null : o.nextSibling;
+ r.setAttribute(xn, En), r.setAttribute(Sn, Cn);
+ var a = kr();
+ return a && r.setAttribute("nonce", a), n.insertBefore(r, i), r;
+}, Tr = function() {
+ function e(e) {
+ this.element = _r(e), this.element.appendChild(document.createTextNode("")), this.sheet = function(e) {
+ if (e.sheet) return e.sheet;
+ for (var t = document.styleSheets, n = 0, r = t.length; n < r; n++) {
+ var o = t[n];
+ if (o.ownerNode === e) return o;
+ }
+ throw pr(17);
+ }(this.element), this.length = 0;
+ }
+ return e.prototype.insertRule = function(e, t) {
+ try {
+ return this.sheet.insertRule(t, e), this.length++, !0;
+ } catch {
+ return !1;
+ }
+ }, e.prototype.deleteRule = function(e) {
+ this.sheet.deleteRule(e), this.length--;
+ }, e.prototype.getRule = function(e) {
+ var t = this.sheet.cssRules[e];
+ return t && t.cssText ? t.cssText : "";
+ }, e;
+}(), Ir = function() {
+ function e(e) {
+ this.element = _r(e), this.nodes = this.element.childNodes, this.length = 0;
+ }
+ return e.prototype.insertRule = function(e, t) {
+ if (e <= this.length && e >= 0) {
+ var n = document.createTextNode(t);
+ return this.element.insertBefore(n, this.nodes[e] || null), this.length++, !0;
+ }
+ return !1;
+ }, e.prototype.deleteRule = function(e) {
+ this.element.removeChild(this.nodes[e]), this.length--;
+ }, e.prototype.getRule = function(e) {
+ return e < this.length ? this.nodes[e].textContent : "";
+ }, e;
+}(), Or = function() {
+ function e(e) {
+ this.rules = [], this.length = 0;
+ }
+ return e.prototype.insertRule = function(e, t) {
+ return e <= this.length && (this.rules.splice(e, 0, t), this.length++, !0);
+ }, e.prototype.deleteRule = function(e) {
+ this.rules.splice(e, 1), this.length--;
+ }, e.prototype.getRule = function(e) {
+ return e < this.length ? this.rules[e] : "";
+ }, e;
+}(), jr = _n, Pr = {
+ isServer: !_n,
+ useCSSOMInjection: !Tn
+}, Ar = function() {
+ function e(e, t, n) {
+ e === void 0 && (e = jn), t === void 0 && (t = {});
+ var r = this;
+ this.options = vt(vt({}, Pr), e), this.gs = t, this.names = new Map(n), this.server = !!e.isServer, !this.server && _n && jr && (jr = !1, Cr(this)), fr(this, (function() {
+ return function(e) {
+ for (var t = e.getTag(), n = t.length, r = "", o = function(n) {
+ var o = function(e) {
+ return mr.get(e);
+ }(n);
+ if (o === void 0) return "continue";
+ var i = e.names.get(o), a = t.getGroup(n);
+ if (i === void 0 || !i.size || a.length === 0) return "continue";
+ var s = `${xn}.g${n}[id="${o}"]`, l = "";
+ i !== void 0 && i.forEach((function(e) {
+ e.length > 0 && (l += `${e},`);
+ })), r += `${a}${s}{content:"${l}"}${kn}`;
+ }, i = 0; i < n; i++) o(i);
+ return r;
+ }(r);
+ }));
+ }
+ return e.registerId = function(e) {
+ return yr(e);
+ }, e.prototype.rehydrate = function() {
+ !this.server && _n && Cr(this);
+ }, e.prototype.reconstructWithOptions = function(t, n) {
+ return n === void 0 && (n = !0), new e(vt(vt({}, this.options), t), this.gs, n && this.names || void 0);
+ }, e.prototype.allocateGSInstance = function(e) {
+ return this.gs[e] = (this.gs[e] || 0) + 1;
+ }, e.prototype.getTag = function() {
+ return this.tag ||= (e = function(e) {
+ var t = e.useCSSOMInjection, n = e.target;
+ return e.isServer ? new Or(n) : t ? new Tr(n) : new Ir(n);
+ }(this.options), new hr(e));
+ var e;
+ }, e.prototype.hasNameForId = function(e, t) {
+ return this.names.has(e) && this.names.get(e).has(t);
+ }, e.prototype.registerName = function(e, t) {
+ if (yr(e), this.names.has(e)) this.names.get(e).add(t);
+ else {
+ var n = /* @__PURE__ */ new Set();
+ n.add(t), this.names.set(e, n);
+ }
+ }, e.prototype.insertRules = function(e, t, n) {
+ this.registerName(e, t), this.getTag().insertRules(yr(e), n);
+ }, e.prototype.clearNames = function(e) {
+ this.names.has(e) && this.names.get(e).clear();
+ }, e.prototype.clearRules = function(e) {
+ this.getTag().clearGroup(yr(e)), this.clearNames(e);
+ }, e.prototype.clearTag = function() {
+ this.tag = void 0;
+ }, e;
+}(), Nr = /&/g, Mr = /^\s*\/\/.*$/gm;
+function Lr(e, t) {
+ return e.map((function(e) {
+ return e.type === "rule" && (e.value = `${t} ${e.value}`, e.value = e.value.replaceAll(",", `,${t} `), e.props = e.props.map((function(e) {
+ return `${t} ${e}`;
+ }))), Array.isArray(e.children) && e.type !== "@keyframes" && (e.children = Lr(e.children, t)), e;
+ }));
+}
+function Dr(e) {
+ var t, n, r, o = e === void 0 ? jn : e, i = o.options, a = i === void 0 ? jn : i, s = o.plugins, l = s === void 0 ? On : s, c = function(e, r, o) {
+ return o.startsWith(n) && o.endsWith(n) && o.replaceAll(n, "").length > 0 ? `.${t}` : e;
+ }, u = l.slice();
+ u.push((function(e) {
+ e.type === kt && e.value.includes("&") && (e.props[0] = e.props[0].replace(Nr, n).replace(r, c));
+ })), a.prefix && u.push(hn), u.push(fn);
+ var d = function(e, o, i, s) {
+ o === void 0 && (o = ""), i === void 0 && (i = ""), s === void 0 && (s = "&"), t = s, n = o, r = RegExp(`\\${n}\\b`, "g");
+ var l = e.replace(Mr, ""), c = gn(i || o ? `${i} ${o} { ${l} }` : l);
+ a.namespace && (c = Lr(c, a.namespace));
+ var d, f, p, h = [];
+ return dn(c, (d = u.concat((p = function(e) {
+ return h.push(e);
+ }, function(e) {
+ e.root || (e = e.return) && p(e);
+ })), f = Bt(d), function(e, t, n, r) {
+ for (var o = "", i = 0; i < f; i++) o += d[i](e, t, n, r) || "";
+ return o;
+ })), h;
+ };
+ return d.hash = l.length ? l.reduce((function(e, t) {
+ return t.name || pr(15), Fn(e, t.name);
+ }), Bn).toString() : "", d;
+}
+var Rr = new Ar(), zr = Dr(), $r = s.default.createContext({
+ shouldForwardProp: void 0,
+ styleSheet: Rr,
+ stylis: zr
+}), Br = ($r.Consumer, s.default.createContext(void 0));
+function Fr() {
+ return (0, s.useContext)($r);
+}
+function Ur(e) {
+ var t = (0, s.useState)(e.stylisPlugins), n = t[0], r = t[1], o = Fr().styleSheet, i = (0, s.useMemo)((function() {
+ var t = o;
+ return e.sheet ? t = e.sheet : e.target && (t = t.reconstructWithOptions({ target: e.target }, !1)), e.disableCSSOMInjection && (t = t.reconstructWithOptions({ useCSSOMInjection: !1 })), t;
+ }), [
+ e.disableCSSOMInjection,
+ e.sheet,
+ e.target,
+ o
+ ]), a = (0, s.useMemo)((function() {
+ return Dr({
+ options: {
+ namespace: e.namespace,
+ prefix: e.enableVendorPrefixes
+ },
+ plugins: n
+ });
+ }), [
+ e.enableVendorPrefixes,
+ e.namespace,
+ n
+ ]);
+ (0, s.useEffect)((function() {
+ wt()(n, e.stylisPlugins) || r(e.stylisPlugins);
+ }), [e.stylisPlugins]);
+ var l = (0, s.useMemo)((function() {
+ return {
+ shouldForwardProp: e.shouldForwardProp,
+ styleSheet: i,
+ stylis: a
+ };
+ }), [
+ e.shouldForwardProp,
+ i,
+ a
+ ]);
+ return s.default.createElement($r.Provider, { value: l }, s.default.createElement(Br.Provider, { value: a }, e.children));
+}
+var Hr = function() {
+ function e(e, t) {
+ var n = this;
+ this.inject = function(e, t) {
+ t === void 0 && (t = zr);
+ var r = n.name + t.hash;
+ e.hasNameForId(n.id, r) || e.insertRules(n.id, r, t(n.rules, r, "@keyframes"));
+ }, this.name = e, this.id = `sc-keyframes-${e}`, this.rules = t, fr(this, (function() {
+ throw pr(12, String(n.name));
+ }));
+ }
+ return e.prototype.getName = function(e) {
+ return e === void 0 && (e = zr), this.name + e.hash;
+ }, e;
+}(), Wr = function(e) {
+ return e >= "A" && e <= "Z";
+};
+function Vr(e) {
+ for (var t = "", n = 0; n < e.length; n++) {
+ var r = e[n];
+ if (n === 1 && r === "-" && e[0] === "-") return e;
+ Wr(r) ? t += "-" + r.toLowerCase() : t += r;
+ }
+ return t.startsWith("ms-") ? "-" + t : t;
+}
+var qr = function(e) {
+ return e == null || !1 === e || e === "";
+}, Gr = function(e) {
+ var t, n, r = [];
+ for (var o in e) {
+ var i = e[o];
+ e.hasOwnProperty(o) && !qr(i) && (Array.isArray(i) && i.isCss || ar(i) ? r.push(`${Vr(o)}:`, i, ";") : ur(i) ? r.push.apply(r, yt(yt([`${o} {`], Gr(i), !1), ["}"], !1)) : r.push(`${Vr(o)}: ${t = o, (n = i) == null || typeof n == "boolean" || n === "" ? "" : typeof n != "number" || n === 0 || t in wn || t.startsWith("--") ? String(n).trim() : `${n}px`};`));
+ }
+ return r;
+};
+function Yr(e, t, n, r) {
+ return qr(e) ? [] : sr(e) ? [`.${e.styledComponentId}`] : ar(e) ? !ar(o = e) || o.prototype && o.prototype.isReactComponent || !t ? [e] : Yr(e(t), t, n, r) : e instanceof Hr ? n ? (e.inject(n, r), [e.getName(r)]) : [e] : ur(e) ? Gr(e) : Array.isArray(e) ? Array.prototype.concat.apply(On, e.map((function(e) {
+ return Yr(e, t, n, r);
+ }))) : [e.toString()];
+ var o;
+}
+function Zr(e) {
+ for (var t = 0; t < e.length; t += 1) {
+ var n = e[t];
+ if (ar(n) && !sr(n)) return !1;
+ }
+ return !0;
+}
+var Kr = Un(Cn), Xr = function() {
+ function e(e, t, n) {
+ this.rules = e, this.staticRulesId = "", this.isStatic = (n === void 0 || n.isStatic) && Zr(e), this.componentId = t, this.baseHash = Fn(Kr, t), this.baseStyle = n, Ar.registerId(t);
+ }
+ return e.prototype.generateAndInjectStyles = function(e, t, n) {
+ var r = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e, t, n) : "";
+ if (this.isStatic && !n.hash) if (this.staticRulesId && t.hasNameForId(this.componentId, this.staticRulesId)) r = lr(r, this.staticRulesId);
+ else {
+ var o = cr(Yr(this.rules, e, t, n)), i = zn(Fn(this.baseHash, o) >>> 0);
+ if (!t.hasNameForId(this.componentId, i)) {
+ var a = n(o, `.${i}`, void 0, this.componentId);
+ t.insertRules(this.componentId, i, a);
+ }
+ r = lr(r, i), this.staticRulesId = i;
+ }
+ else {
+ for (var s = Fn(this.baseHash, n.hash), l = "", c = 0; c < this.rules.length; c++) {
+ var u = this.rules[c];
+ if (typeof u == "string") l += u;
+ else if (u) {
+ var d = cr(Yr(u, e, t, n));
+ s = Fn(s, d + c), l += d;
+ }
+ }
+ if (l) {
+ var f = zn(s >>> 0);
+ t.hasNameForId(this.componentId, f) || t.insertRules(this.componentId, f, n(l, `.${f}`, void 0, this.componentId)), r = lr(r, f);
+ }
+ }
+ return r;
+ }, e;
+}(), Jr = s.default.createContext(void 0);
+Jr.Consumer;
+var Qr = {};
+function eo(e, t, n) {
+ var r = sr(e), o = e, i = !Wn(e), a = t.attrs, l = a === void 0 ? On : a, c = t.componentId, u = c === void 0 ? function(e, t) {
+ var n = typeof e == "string" ? Ln(e) : "sc";
+ Qr[n] = (Qr[n] || 0) + 1;
+ var r = `${n}-${Hn(Cn + n + Qr[n])}`;
+ return t ? `${t}-${r}` : r;
+ }(t.displayName, t.parentComponentId) : c, d = t.displayName, f = d === void 0 ? function(e) {
+ return Wn(e) ? `styled.${e}` : `Styled(${function(e) {
+ return e.displayName || e.name || "Component";
+ }(e)})`;
+ }(e) : d, p = t.displayName && t.componentId ? `${Ln(t.displayName)}-${t.componentId}` : t.componentId || u, h = r && o.attrs ? o.attrs.concat(l).filter(Boolean) : l, g = t.shouldForwardProp;
+ if (r && o.shouldForwardProp) {
+ var m = o.shouldForwardProp;
+ if (t.shouldForwardProp) {
+ var v = t.shouldForwardProp;
+ g = function(e, t) {
+ return m(e, t) && v(e, t);
+ };
+ } else g = m;
+ }
+ var y = new Xr(n, p, r ? o.componentStyle : void 0);
+ function b(e, t) {
+ return function(e, t, n) {
+ var r = e.attrs, o = e.componentStyle, i = e.defaultProps, a = e.foldedComponentIds, l = e.styledComponentId, c = e.target, u = s.default.useContext(Jr), d = Fr(), f = e.shouldForwardProp || d.shouldForwardProp, p = Pn(t, u, i) || jn, h = function(e, t, n) {
+ for (var r, o = vt(vt({}, t), {
+ className: void 0,
+ theme: n
+ }), i = 0; i < e.length; i += 1) {
+ var a = ar(r = e[i]) ? r(o) : r;
+ for (var s in a) o[s] = s === "className" ? lr(o[s], a[s]) : s === "style" ? vt(vt({}, o[s]), a[s]) : a[s];
+ }
+ return t.className && (o.className = lr(o.className, t.className)), o;
+ }(r, t, p), g = h.as || c, m = {};
+ for (var v in h) h[v] === void 0 || v[0] === "$" || v === "as" || v === "theme" && h.theme === p || (v === "forwardedAs" ? m.as = h.forwardedAs : f && !f(v, g) || (m[v] = h[v]));
+ var y = function(e, t) {
+ var n = Fr();
+ return e.generateAndInjectStyles(t, n.styleSheet, n.stylis);
+ }(o, h), b = lr(a, l);
+ return y && (b += " " + y), h.className && (b += " " + h.className), m[Wn(g) && !An.has(g) ? "class" : "className"] = b, m.ref = n, (0, s.createElement)(g, m);
+ }(w, e, t);
+ }
+ b.displayName = f;
+ var w = s.default.forwardRef(b);
+ return w.attrs = h, w.componentStyle = y, w.displayName = f, w.shouldForwardProp = g, w.foldedComponentIds = r ? lr(o.foldedComponentIds, o.styledComponentId) : "", w.styledComponentId = p, w.target = r ? o.target : e, Object.defineProperty(w, "defaultProps", {
+ get: function() {
+ return this._foldedDefaultProps;
+ },
+ set: function(e) {
+ this._foldedDefaultProps = r ? function(e) {
+ for (var t = [...arguments].slice(1), r = 0, o = t; r < o.length; r++) dr(e, o[r], !0);
+ return e;
+ }({}, o.defaultProps, e) : e;
+ }
+ }), fr(w, (function() {
+ return `.${w.styledComponentId}`;
+ })), i && ir(w, e, {
+ attrs: !0,
+ componentStyle: !0,
+ displayName: !0,
+ foldedComponentIds: !0,
+ shouldForwardProp: !0,
+ styledComponentId: !0,
+ target: !0
+ }), w;
+}
+function to(e, t) {
+ for (var n = [e[0]], r = 0, o = t.length; r < o; r += 1) n.push(t[r], e[r + 1]);
+ return n;
+}
+var no = function(e) {
+ return Object.assign(e, { isCss: !0 });
+};
+function ro(e) {
+ var t = [...arguments].slice(1);
+ if (ar(e) || ur(e)) return no(Yr(to(On, yt([e], t, !0))));
+ var r = e;
+ return t.length === 0 && r.length === 1 && typeof r[0] == "string" ? Yr(r) : no(Yr(to(r, t)));
+}
+function oo(e, t, n) {
+ if (n === void 0 && (n = jn), !t) throw pr(1, t);
+ var r = function(r) {
+ var o = [...arguments].slice(1);
+ return e(t, n, ro.apply(void 0, yt([r], o, !1)));
+ };
+ return r.attrs = function(r) {
+ return oo(e, t, vt(vt({}, n), { attrs: Array.prototype.concat(n.attrs, r).filter(Boolean) }));
+ }, r.withConfig = function(r) {
+ return oo(e, t, vt(vt({}, n), r));
+ }, r;
+}
+var io = function(e) {
+ return oo(eo, e);
+}, ao = io;
+An.forEach((function(e) {
+ ao[e] = io(e);
+}));
+var so = function() {
+ function e(e, t) {
+ this.rules = e, this.componentId = t, this.isStatic = Zr(e), Ar.registerId(this.componentId + 1);
+ }
+ return e.prototype.createStyles = function(e, t, n, r) {
+ var o = r(cr(Yr(this.rules, t, n, r)), ""), i = this.componentId + e;
+ n.insertRules(i, i, o);
+ }, e.prototype.removeStyles = function(e, t) {
+ t.clearRules(this.componentId + e);
+ }, e.prototype.renderStyles = function(e, t, n, r) {
+ e > 2 && Ar.registerId(this.componentId + e), this.removeStyles(e, n), this.createStyles(e, t, n, r);
+ }, e;
+}();
+function lo(e) {
+ var t = [...arguments].slice(1), r = ro.apply(void 0, yt([e], t, !1)), o = `sc-global-${Hn(JSON.stringify(r))}`, i = new so(r, o), a = function(e) {
+ var t = Fr(), n = s.default.useContext(Jr), r = s.default.useRef(t.styleSheet.allocateGSInstance(o)).current;
+ return t.styleSheet.server && l(r, e, t.styleSheet, n, t.stylis), s.default.useLayoutEffect((function() {
+ if (!t.styleSheet.server) return l(r, e, t.styleSheet, n, t.stylis), function() {
+ return i.removeStyles(r, t.styleSheet);
+ };
+ }), [
+ r,
+ e,
+ t.styleSheet,
+ n,
+ t.stylis
+ ]), null;
+ };
+ function l(e, t, n, r, o) {
+ if (i.isStatic) i.renderStyles(e, In, n, o);
+ else {
+ var s = vt(vt({}, t), { theme: Pn(t, r, a.defaultProps) });
+ i.renderStyles(e, s, n, o);
+ }
+ }
+ return s.default.memo(a);
+}
+function co(e) {
+ var t = [...arguments].slice(1), r = cr(ro.apply(void 0, yt([e], t, !1)));
+ return new Hr(Hn(r), r);
+}
+(function() {
+ function e() {
+ var e = this;
+ this._emitSheetCSS = function() {
+ var t = e.instance.toString();
+ if (!t) return "";
+ var n = kr();
+ return `<style ${cr([
+ n && `nonce="${n}"`,
+ `${xn}="true"`,
+ `${Sn}="${Cn}"`
+ ].filter(Boolean), " ")}>${t}</style>`;
+ }, this.getStyleTags = function() {
+ if (e.sealed) throw pr(2);
+ return e._emitSheetCSS();
+ }, this.getStyleElement = function() {
+ var t;
+ if (e.sealed) throw pr(2);
+ var n = e.instance.toString();
+ if (!n) return [];
+ var r = ((t = {})[xn] = "", t[Sn] = Cn, t.dangerouslySetInnerHTML = { __html: n }, t), o = kr();
+ return o && (r.nonce = o), [s.default.createElement("style", vt({}, r, { key: "sc-0-0" }))];
+ }, this.seal = function() {
+ e.sealed = !0;
+ }, this.instance = new Ar({ isServer: !0 }), this.sealed = !1;
+ }
+ e.prototype.collectStyles = function(e) {
+ if (this.sealed) throw pr(2);
+ return s.default.createElement(Ur, { sheet: this.instance }, e);
+ }, e.prototype.interleaveWithNodeStream = function(e) {
+ throw pr(3);
+ };
+})(), `${xn}`;
+const uo = "v7.11.2".replace(/\./g, "-");
+function fo(e) {
+ return `var(--${e}-${uo})`;
+}
+const po = {
+ white: fo("white"),
+ "white-rgb": fo("white-rgb"),
+ gray1000: fo("gray1000"),
+ "gray1000-rgb": fo("gray1000-rgb"),
+ gray900: fo("gray900"),
+ gray800: fo("gray800"),
+ gray700: fo("gray700"),
+ gray600: fo("gray600"),
+ gray500: fo("gray500"),
+ gray400: fo("gray400"),
+ gray300: fo("gray300"),
+ gray200: fo("gray200"),
+ gray100: fo("gray100"),
+ gray75: fo("gray75"),
+ gray50: fo("gray50"),
+ gray25: fo("gray25"),
+ gray10: fo("gray10"),
+ blue1000: fo("blue1000"),
+ blue900: fo("blue900"),
+ blue800: fo("blue800"),
+ blue700: fo("blue700"),
+ blue600: fo("blue600"),
+ blue500: fo("blue500"),
+ "blue500-rgb": fo("blue500-rgb"),
+ blue500a10: fo("blue500a10"),
+ blue400: fo("blue400"),
+ blue300: fo("blue300"),
+ blue200: fo("blue200"),
+ blue100: fo("blue100"),
+ blue75: fo("blue75"),
+ blue50: fo("blue50"),
+ blue25: fo("blue25"),
+ red1000: fo("red1000"),
+ red900: fo("red900"),
+ red800: fo("red800"),
+ red700: fo("red700"),
+ red600: fo("red600"),
+ red500: fo("red500"),
+ "red500-rgb": fo("red500-rgb"),
+ red500a50: fo("red500a50"),
+ red500a10: fo("red500a10"),
+ red400: fo("red400"),
+ red300: fo("red300"),
+ red200: fo("red200"),
+ red100: fo("red100"),
+ red75: fo("red75"),
+ red50: fo("red50"),
+ red25: fo("red25"),
+ yellow700: fo("yellow700"),
+ yellow600: fo("yellow600"),
+ yellow500: fo("yellow500"),
+ "yellow500-rgb": fo("yellow500-rgb"),
+ yellow500a10: fo("yellow500a10"),
+ green1000: fo("green1000"),
+ green900: fo("green900"),
+ green800: fo("green800"),
+ green700: fo("green700"),
+ green600: fo("green600"),
+ green500: fo("green500"),
+ green400: fo("green400"),
+ green300: fo("green300"),
+ green200: fo("green200"),
+ green100: fo("green100"),
+ green75: fo("green75"),
+ green50: fo("green50"),
+ green25: fo("green25"),
+ purple1000: fo("purple1000"),
+ purple900: fo("purple900"),
+ purple800: fo("purple800"),
+ purple700: fo("purple700"),
+ purple600: fo("purple600"),
+ purple500: fo("purple500"),
+ purple400: fo("purple400"),
+ purple300: fo("purple300"),
+ purple200: fo("purple200"),
+ purple100: fo("purple100"),
+ purple75: fo("purple75"),
+ purple50: fo("purple50"),
+ purple25: fo("purple25"),
+ magenta1000: fo("magenta1000"),
+ magenta900: fo("magenta900"),
+ magenta800: fo("magenta800"),
+ magenta700: fo("magenta700"),
+ magenta600: fo("magenta600"),
+ magenta500: fo("magenta500"),
+ magenta400: fo("magenta400"),
+ magenta300: fo("magenta300"),
+ magenta200: fo("magenta200"),
+ magenta100: fo("magenta100"),
+ magenta75: fo("magenta75"),
+ magenta50: fo("magenta50"),
+ magenta25: fo("magenta25"),
+ teal1000: fo("teal1000"),
+ teal900: fo("teal900"),
+ teal800: fo("teal800"),
+ teal700: fo("teal700"),
+ teal600: fo("teal600"),
+ teal500: fo("teal500"),
+ "teal500-rgb": fo("teal500-rgb"),
+ teal500a10: fo("teal500a10"),
+ teal400: fo("teal400"),
+ teal300: fo("teal300"),
+ teal200: fo("teal200"),
+ teal100: fo("teal100"),
+ teal75: fo("teal75"),
+ teal50: fo("teal50"),
+ teal25: fo("teal25"),
+ brandPrimary700: fo("brandPrimary700"),
+ brandPrimary600: fo("brandPrimary600"),
+ brandPrimary500: fo("brandPrimary500"),
+ "brandPrimary500-rgb": fo("brandPrimary500-rgb"),
+ brandPrimary300: fo("brandPrimary300"),
+ brandPrimary100: fo("brandPrimary100"),
+ spacing1: fo("spacing1"),
+ spacing2: fo("spacing2"),
+ spacing3: fo("spacing3"),
+ spacing4: fo("spacing4"),
+ spacing5: fo("spacing5"),
+ spacing6: fo("spacing6"),
+ spacing7: fo("spacing7"),
+ spacing8: fo("spacing8"),
+ spacing9: fo("spacing9"),
+ layoutSpacing1: fo("layoutSpacing1"),
+ layoutSpacing2: fo("layoutSpacing2"),
+ layoutSpacing3: fo("layoutSpacing3"),
+ layoutSpacing4: fo("layoutSpacing4"),
+ layoutSpacing5: fo("layoutSpacing5"),
+ layoutSpacing6: fo("layoutSpacing6"),
+ layoutSpacing7: fo("layoutSpacing7"),
+ radiusSmall: fo("radiusSmall"),
+ radiusMedium: fo("radiusMedium"),
+ radiusLarge: fo("radiusLarge"),
+ radiusCircle: fo("radiusCircle"),
+ radiusPill: fo("radiusPill"),
+ radiusBase: fo("radiusBase"),
+ brandRadiusBase: fo("brandRadiusBase"),
+ fontStackBase: fo("fontStackBase"),
+ brandFontStackBase: fo("brandFontStackBase"),
+ fontSize25: fo("fontSize25"),
+ fontSize50: fo("fontSize50"),
+ fontSize75: fo("fontSize75"),
+ fontSize100: fo("fontSize100"),
+ fontSize200: fo("fontSize200"),
+ fontSize300: fo("fontSize300"),
+ fontSize400: fo("fontSize400"),
+ fontSize500: fo("fontSize500"),
+ fontSize600: fo("fontSize600"),
+ fontSize700: fo("fontSize700"),
+ fontSize800: fo("fontSize800"),
+ fontSize900: fo("fontSize900"),
+ fontSize1000: fo("fontSize1000"),
+ fontSizeBase: fo("fontSizeBase"),
+ lineHeightBase: fo("lineHeightBase"),
+ lineHeightHeading: fo("lineHeightHeading"),
+ lineHeightText: fo("lineHeightText"),
+ gray900a: fo("gray900a"),
+ gray800a: fo("gray800a"),
+ gray700a: fo("gray700a"),
+ gray600a: fo("gray600a"),
+ gray500a: fo("gray500a"),
+ gray400a: fo("gray400a"),
+ gray300a: fo("gray300a"),
+ gray200a: fo("gray200a"),
+ gray100a: fo("gray100a"),
+ gray75a: fo("gray75a"),
+ gray50a: fo("gray50a"),
+ gray25a: fo("gray25a"),
+ colorText: fo("colorText"),
+ colorTextMuted: fo("colorTextMuted"),
+ colorTextDisabled: fo("colorTextDisabled"),
+ focusRingWidth: fo("focusRingWidth"),
+ focusRingColorPrimary: fo("focusRingColorPrimary"),
+ focusRingColorSecondary: fo("focusRingColorSecondary"),
+ colorShadow: fo("colorShadow"),
+ elevationStatic: fo("elevationStatic"),
+ elevation1: fo("elevation1"),
+ elevation2: fo("elevation2"),
+ elevation4: fo("elevation4"),
+ elevation8: fo("elevation8"),
+ elevation12: fo("elevation12"),
+ elevation16: fo("elevation16"),
+ elevation24: fo("elevation24")
+}, go = (0, s.createContext)({
+ assetTypes: [],
+ language: "en_US",
+ onSuccess: (e, { selectedFile: t }) => console.log(e, t),
+ selectionMode: "MultiSelect",
+ hideExternalAccess: !1
+}), mo = go.Provider, vo = () => (0, s.useContext)(go), yo = () => vo().assetFilter, bo = () => vo().selectionMode, wo = () => vo().hideSwitch, xo = (e) => {
+ let t, n = /* @__PURE__ */ new Set(), r = (e, r) => {
+ let o = typeof e == "function" ? e(t) : e;
+ if (!Object.is(o, t)) {
+ let e = t;
+ t = r ?? (typeof o != "object" || !o) ? o : Object.assign({}, t, o), n.forEach(((n) => n(t, e)));
+ }
+ }, o = () => t, i = {
+ setState: r,
+ getState: o,
+ getInitialState: () => a,
+ subscribe: (e) => (n.add(e), () => n.delete(e))
+ }, a = t = e(r, o, i);
+ return i;
+}, Eo = (e) => e, So = (e) => {
+ let t = ((e) => e ? xo(e) : xo)(e), n = (e) => function(e, t = Eo) {
+ let n = s.default.useSyncExternalStore(e.subscribe, s.default.useCallback((() => t(e.getState())), [e, t]), s.default.useCallback((() => t(e.getInitialState())), [e, t]));
+ return s.default.useDebugValue(n), n;
+ }(t, e);
+ return Object.assign(n, t), n;
+}, Co = (e) => e ? So(e) : So, ko = /* @__PURE__ */ new Map(), _o = (e) => {
+ let t = ko.get(e);
+ return t ? Object.fromEntries(Object.entries(t.stores).map((([e, t]) => [e, t.getState()]))) : {};
+}, To = (e) => {
+ if (!e) return;
+ let r = e.split("\n"), o = r.findIndex(((e) => e.includes("api.setState")));
+ if (o < 0) return;
+ let i = r[o + 1]?.trim() || "";
+ return /.+ (.+) .+/.exec(i)?.[1];
+}, Io = (e, t = {}) => (n, r, o) => {
+ let { enabled: i, anonymousActionType: a, store: s, ...l } = t, c;
+ try {
+ c = (i == null || i) && window.__REDUX_DEVTOOLS_EXTENSION__;
+ } catch {}
+ if (!c) return e(n, r, o);
+ let { connection: u, ...d } = ((e, t, n) => {
+ if (e === void 0) return {
+ type: "untracked",
+ connection: t.connect(n)
+ };
+ let r = ko.get(n.name);
+ if (r) return {
+ type: "tracked",
+ store: e,
+ ...r
+ };
+ let o = {
+ connection: t.connect(n),
+ stores: {}
+ };
+ return ko.set(n.name, o), {
+ type: "tracked",
+ store: e,
+ ...o
+ };
+ })(s, c, l), f = !0;
+ o.setState = (e, t, i) => {
+ let c = n(e, t);
+ if (!f) return c;
+ let d = i === void 0 ? { type: a || To((/* @__PURE__ */ Error()).stack) || "anonymous" } : typeof i == "string" ? { type: i } : i;
+ return s === void 0 ? (u?.send(d, r()), c) : (u?.send({
+ ...d,
+ type: `${s}/${d.type}`
+ }, {
+ ..._o(l.name),
+ [s]: o.getState()
+ }), c);
+ }, o.devtools = { cleanup: () => {
+ u && typeof u.unsubscribe == "function" && u.unsubscribe(), ((e, t) => {
+ if (t === void 0) return;
+ let n = ko.get(e);
+ n && (delete n.stores[t], Object.keys(n.stores).length === 0 && ko.delete(e));
+ })(l.name, s);
+ } };
+ let p = (...e) => {
+ let t = f;
+ f = !1, n(...e), f = t;
+ }, h = e(o.setState, r, o);
+ if (d.type === "untracked" ? u?.init(h) : (d.stores[d.store] = o, u?.init(Object.fromEntries(Object.entries(d.stores).map((([e, t]) => [e, e === d.store ? h : t.getState()]))))), o.dispatchFromDevtools && typeof o.dispatch == "function") {
+ let e = !1, t = o.dispatch;
+ o.dispatch = (...n) => {
+ n[0].type !== "__setState" || e || (console.warn("[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it."), e = !0), t(...n);
+ };
+ }
+ return u.subscribe(((e) => {
+ switch (e.type) {
+ case "ACTION": return typeof e.payload == "string" ? Oo(e.payload, ((e) => {
+ if (e.type !== "__setState") o.dispatchFromDevtools && typeof o.dispatch == "function" && o.dispatch(e);
+ else {
+ if (s === void 0) return void p(e.state);
+ Object.keys(e.state).length !== 1 && console.error("\n [zustand devtools middleware] Unsupported __setState action format.\n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n ");
+ let t = e.state[s];
+ if (t == null) return;
+ JSON.stringify(o.getState()) !== JSON.stringify(t) && p(t);
+ }
+ })) : void console.error("[zustand devtools middleware] Unsupported action format");
+ case "DISPATCH":
+ switch (e.payload.type) {
+ case "RESET": return p(h), s === void 0 ? u?.init(o.getState()) : u?.init(_o(l.name));
+ case "COMMIT": return s === void 0 ? void (u == null || u.init(o.getState())) : u?.init(_o(l.name));
+ case "ROLLBACK": return Oo(e.state, ((e) => {
+ if (s === void 0) return p(e), void (u == null || u.init(o.getState()));
+ p(e[s]), u?.init(_o(l.name));
+ }));
+ case "JUMP_TO_STATE":
+ case "JUMP_TO_ACTION": return Oo(e.state, ((e) => {
+ s === void 0 ? p(e) : JSON.stringify(o.getState()) !== JSON.stringify(e[s]) && p(e[s]);
+ }));
+ case "IMPORT_STATE": {
+ let { nextLiftedState: n } = e.payload, r = n.computedStates.slice(-1)[0]?.state;
+ if (!r) return;
+ p(s === void 0 ? r : r[s]), u?.send(null, n);
+ return;
+ }
+ case "PAUSE_RECORDING": return f = !f;
+ }
+ return;
+ }
+ })), h;
+}, Oo = (e, t) => {
+ let n;
+ try {
+ n = JSON.parse(e);
+ } catch (e) {
+ console.error("[zustand devtools middleware] Could not parse the received json", e);
+ }
+ n !== void 0 && t(n);
+}, jo = (e) => {
+ let t = e;
+ t.use = {};
+ for (let e of Object.keys(t.getState())) t.use[e] = () => t(((t) => t[e]));
+ return t;
+}, Po = {
+ field: "CREATED_AT",
+ direction: "DESC"
+}, Ao = Co()(Io(((e, t, n) => ({
+ assets: Po,
+ collections: Po,
+ collection: Po,
+ setOrdering: (t, n) => e((() => t === "assets" ? { assets: n } : t === "collections" ? { collections: n } : { collection: n })),
+ reset: () => e(n.getInitialState())
+})), {
+ name: "OrderingStore",
+ enabled: !1
+})), No = jo(Ao), Mo = (e) => {
+ let t = Ao(((t) => t[e])), n = Ao(((e) => e.setOrdering));
+ return [t, (t) => n(e, t)];
+}, Lo = Co()(Io(((e) => ({
+ page: { page: "assets" },
+ setPage: (t) => e({ page: t })
+})), {
+ name: "RouterStore",
+ enabled: !1
+})), Do = jo(Lo), Ro = () => [Lo(((e) => e.page)), Lo(((e) => e.setPage))], zo = (0, s.createContext)(null), $o = {
+ assets: "",
+ collection: "",
+ collections: "",
+ isLoading: !1
+};
+function Bo(e) {
+ let [t, n] = (0, s.useState)($o), r = Do.use.page();
+ function o(e, t) {
+ let r = t !== "";
+ n(((n) => Object.assign(Object.assign({}, n), {
+ [e]: t,
+ isLoading: r
+ })));
+ }
+ function i(e) {
+ n(((t) => Object.assign(Object.assign({}, t), { isLoading: e })));
+ }
+ function a() {
+ n($o);
+ }
+ (0, s.useEffect)((() => {
+ o("assets", e.defaultValue ?? "");
+ }), [e.defaultValue]), (0, s.useEffect)((() => {
+ n(((e) => Object.assign(Object.assign({}, e), { collection: "" })));
+ }), [r]);
+ let l = (0, s.useMemo)((() => Object.assign(Object.assign({}, t), {
+ setSearch: o,
+ setIsLoading: i,
+ clear: a
+ })), [t]);
+ return s.default.createElement(zo.Provider, { value: l }, e.children);
+}
+function Fo() {
+ let e = (0, s.useContext)(zo);
+ if (e === null) throw Error("useSearchState must be used within a SearchStateContext");
+ return e;
+}
+function Uo(e) {
+ let t = Fo();
+ return {
+ value: t[e],
+ isLoading: t.isLoading,
+ setSearch: (n) => t.setSearch(e, n),
+ setIsLoading: t.setIsLoading
+ };
+}
+function Ho(e, t, n) {
+ var r = this, o = (0, s.useRef)(null), i = (0, s.useRef)(0), a = (0, s.useRef)(null), l = (0, s.useRef)([]), c = (0, s.useRef)(), u = (0, s.useRef)(), d = (0, s.useRef)(e), f = (0, s.useRef)(!0);
+ (0, s.useEffect)((function() {
+ d.current = e;
+ }), [e]);
+ var p = !t && t !== 0 && typeof window < "u";
+ if (typeof e != "function") throw TypeError("Expected a function");
+ t = +t || 0;
+ var h = !!(n ||= {}).leading, g = !("trailing" in n) || !!n.trailing, m = "maxWait" in n, v = m ? Math.max(+n.maxWait || 0, t) : null;
+ return (0, s.useEffect)((function() {
+ return f.current = !0, function() {
+ f.current = !1;
+ };
+ }), []), (0, s.useMemo)((function() {
+ var e = function(e) {
+ var t = l.current, n = c.current;
+ return l.current = c.current = null, i.current = e, u.current = d.current.apply(n, t);
+ }, n = function(e, t) {
+ p && cancelAnimationFrame(a.current), a.current = p ? requestAnimationFrame(e) : setTimeout(e, t);
+ }, s = function(e) {
+ if (!f.current) return !1;
+ var n = e - o.current;
+ return !o.current || n >= t || n < 0 || m && e - i.current >= v;
+ }, y = function(t) {
+ return a.current = null, g && l.current ? e(t) : (l.current = c.current = null, u.current);
+ }, b = function e() {
+ var r = Date.now();
+ if (s(r)) return y(r);
+ if (f.current) {
+ var a = t - (r - o.current);
+ n(e, m ? Math.min(a, v - (r - i.current)) : a);
+ }
+ }, w = function() {
+ var d = Date.now(), p = s(d);
+ if (l.current = [].slice.call(arguments), c.current = r, o.current = d, p) {
+ if (!a.current && f.current) return i.current = o.current, n(b, t), h ? e(o.current) : u.current;
+ if (m) return n(b, t), e(o.current);
+ }
+ return a.current || n(b, t), u.current;
+ };
+ return w.cancel = function() {
+ a.current && (p ? cancelAnimationFrame(a.current) : clearTimeout(a.current)), i.current = 0, l.current = o.current = c.current = a.current = null;
+ }, w.isPending = function() {
+ return !!a.current;
+ }, w.flush = function() {
+ return a.current ? y(Date.now()) : u.current;
+ }, w;
+ }), [
+ h,
+ m,
+ t,
+ v,
+ g,
+ p
+ ]);
+}
+function Wo(e, t) {
+ return e === t;
+}
+function Vo(e) {
+ return typeof e == "function" ? function() {
+ return e;
+ } : e;
+}
+function qo(e, t, n) {
+ var r, o, i = n && n.equalityFn || Wo, a = (r = (0, s.useState)(Vo(e)), o = r[1], [r[0], (0, s.useCallback)((function(e) {
+ return o(Vo(e));
+ }), [])]), l = a[0], c = a[1], u = Ho((0, s.useCallback)((function(e) {
+ return c(e);
+ }), [c]), t, n), d = (0, s.useRef)(e);
+ return i(d.current, e) || (u(e), d.current = e), [l, u];
+}
+var Go = o(4848);
+function Yo({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M15 9h2V7h4V5h-4V3h-2v6ZM7 9v2H3v2h4v2h2V9H7Zm6 10v2h-2v-6h2v2h8v2h-8ZM3 19v-2h6v2H3Zm18-8v2H11v-2h10Zm-8-6H3v1.99h10V5Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function Zo({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsxs)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: [(0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M3 3h2v16h16v2H3V3Z"
+ }), (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M7 5c6.627 0 12 5.373 12 12h-2c0-5.523-4.477-10-10-10V5Z"
+ })]
+ });
+}
+function Ko({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "m20.54 5.23-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27ZM12 17.5 6.5 12H10v-2h4v2h3.5L12 17.5ZM5.12 5l.81-1h12l.94 1H5.12Z"
+ })
+ });
+}
+function Xo({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41Z"
+ })
+ });
+}
+function Jo({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41Z"
+ })
+ });
+}
+function Qo({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41Z"
+ })
+ });
+}
+function ei({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M19 12h-2v3h-3v2h5v-5ZM7 9h3V7H5v5h2V9Zm14-6H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm0 16.01H3V4.99h18v14.02Z"
+ })
+ });
+}
+function ti({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M16.56 8.94 7.62 0 6.21 1.41l2.38 2.38-5.15 5.15a1.49 1.49 0 0 0 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12ZM5.21 10 10 5.21 14.79 10H5.21ZM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5ZM2 20h20v4H2v-4Z"
+ })
+ });
+}
+function ni({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1Zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1Zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1Zm-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5ZM6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1Zm15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5ZM14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1Zm0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5Zm-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5Zm7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5Zm0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5ZM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1Zm0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5Zm8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1Zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1Zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1Zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1Zm3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5ZM14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1Zm0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5Zm-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5Zm0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1Zm4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5Zm0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5Z"
+ })
+ });
+}
+function ri({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M13 7h-2v2h2V7Zm0 4h-2v2h2v-2Zm4 0h-2v2h2v-2ZM3 3v18h18V3H3Zm16 16H5V5h14v14Zm-6-4h-2v2h2v-2Zm-4-4H7v2h2v-2Z"
+ })
+ });
+}
+function oi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M4 5h16v2H4V5ZM4 9h16v3H4V9ZM20 14H4v5h16v-5Z"
+ })
+ });
+}
+function ii({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsxs)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: [(0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M15.2 12a3.2 3.2 0 1 1-6.4 0 3.2 3.2 0 0 1 6.4 0Z"
+ }), (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M7.17 4 9 2h6l1.83 2H20c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3.17ZM7 12c0 2.76 2.24 5 5 5s5-2.24 5-5-2.24-5-5-5-5 2.24-5 5Z",
+ clipRule: "evenodd"
+ })]
+ });
+}
+function ai({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"
+ })
+ });
+}
+function si({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "m7 10 5 5 5-5H7Z"
+ })
+ });
+}
+function li({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17Z"
+ })
+ });
+}
+function ci({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2Zm-1.4 14.6 7.05-7.05-1.4-1.4-5.65 5.65-2.85-2.85-1.4 1.4 4.25 4.25Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function ui({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2Zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59Z"
+ })
+ });
+}
+function di({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2Zm-11-4 2.03 2.71L16 11l4 5H8l3-4Zm-9 8V6h2v14h14v2H4c-1.1 0-2-.9-2-2Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function fi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "m20.71 5.63-2.34-2.34a.996.996 0 0 0-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42ZM6.92 19 5 17.08l8.06-8.06 1.92 1.92L6.92 19Z"
+ })
+ });
+}
+function pi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsxs)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: [(0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5Zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2Zm0 16H7V3h14v14Z"
+ }), (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M12.778 6.283 14 5l1.222 1.283.004.004.008.008.025.027a13.827 13.827 0 0 1 .386.43c.243.282.57.676.899 1.128.326.447.674.976.945 1.523.26.523.511 1.182.511 1.857 0 1.942-1.668 3.74-4 3.74s-4-1.798-4-3.74c0-.675.25-1.334.51-1.857.272-.547.62-1.076.947-1.523a17.709 17.709 0 0 1 1.284-1.558l.025-.027.008-.008.004-.004Z"
+ })]
+ });
+}
+function hi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M15 21h2v-2h-2v2Zm4-12h2V7h-2v2ZM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2Zm16-2v2h2c0-1.1-.9-2-2-2Zm-8 20h2V1h-2v22Zm8-6h2v-2h-2v2ZM15 5h2V3h-2v2Zm4 8h2v-2h-2v2Zm0 8c1.1 0 2-.9 2-2h-2v2Z"
+ })
+ });
+}
+function gi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M12 21c-2.217 0-4.104-.77-5.662-2.313C4.779 17.146 4 15.284 4 13.1c0-1.1.208-2.117.625-3.05a8.288 8.288 0 0 1 1.725-2.5L12 2l5.65 5.55a8.289 8.289 0 0 1 1.725 2.5c.417.933.625 1.95.625 3.05 0 2.183-.78 4.046-2.337 5.588C16.104 20.229 14.217 21 12 21Zm0-2V4.8L7.75 9a5.466 5.466 0 0 0-1.313 1.863A5.7 5.7 0 0 0 6 13.1c0 1.617.583 3.004 1.75 4.162C8.917 18.421 10.333 19 12 19Z"
+ })
+ });
+}
+function mi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M7 1v16h16v2h-4v4h-2v-4H7c-1.1 0-2-.9-2-2V7H1V5h4V1h2Zm12 14h-2V7H9V5h8c1.1 0 2 .9 2 2v8Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function vi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1L9.64 7.64ZM6 8a2 2 0 1 1-.001-3.999A2 2 0 0 1 6 8ZM4 18a2 2 0 1 0 3.999.001A2 2 0 0 0 4 18Zm8-5.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5ZM13 9l6-6h3v1l-7 7-2-2Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function yi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsxs)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: [(0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M12 4c-4.415 0-8 3.585-8 8s3.585 8 8 8 8-3.585 8-8-3.585-8-8-8ZM2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12Z",
+ clipRule: "evenodd"
+ }), (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M13 15h-2v2h2v-2ZM13 7h-2v6h2V7Z"
+ })]
+ });
+}
+function bi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M10.09 15.59 11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59ZM19 3H5a2 2 0 0 0-2 2v4h2V5h14v14H5v-4H3v4a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Z"
+ })
+ });
+}
+function wi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6Zm7 7V3.5L18.5 9H13Z"
+ })
+ });
+}
+function xi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2Z"
+ })
+ });
+}
+function Ei({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M2.5 7V4h13v3h-5v12h-3V7h-5Zm10 2h9v3h-3v7h-3v-7h-3V9Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function Si({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "m2.01 3.87 1.41-1.42L21.15 20.2l-1.41 1.41-3.43-3.43c-1.34.52-2.79.82-4.31.82-5 0-9.27-3.11-11-7.5.77-1.97 2.06-3.67 3.69-4.95L2.01 3.87ZM17 11.5c0-2.76-2.24-5-5-5-.51 0-1 .1-1.47.24L8.36 4.57C9.51 4.2 10.73 4 12 4c5 0 9.27 3.11 11 7.49-.69 1.76-1.79 3.3-3.18 4.53l-3.06-3.06c.14-.46.24-.95.24-1.46Zm-5 5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5Zm2.97-5.33a2.97 2.97 0 0 0-2.64-2.64l2.64 2.64Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function Ci({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M5 8H3v8h2v-3h14v3h2V8h-2v3H5V8Z"
+ })
+ });
+}
+function ki({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M19 3c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14Zm-8 13.51L8.5 13.5 5 18h14l-4.5-6-3.5 4.51Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function _i({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "m15.96 10.29-2.75 3.54-1.96-2.36L8.5 15h11l-3.54-4.71ZM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5Zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2Zm0 16H7V3h14v14Z"
+ })
+ });
+}
+function Ti({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z"
+ })
+ });
+}
+function Ii({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "m12.7 14.05 5.65-5.65-1.4-1.45-4.25 4.25-2.15-2.1-1.4 1.4 3.55 3.55ZM8 18c-.55 0-1.02-.196-1.412-.587A1.926 1.926 0 0 1 6 16V4c0-.55.196-1.02.588-1.413A1.926 1.926 0 0 1 8 2h12c.55 0 1.02.196 1.413.587C21.803 2.98 22 3.45 22 4v12c0 .55-.196 1.02-.587 1.413A1.926 1.926 0 0 1 20 18H8Zm0-2h12V4H8v12Zm-4 6c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 0 1 2 20V6h2v14h14v2H4Z"
+ })
+ });
+}
+function Oi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M12 21c-2.217 0-4.104-.767-5.662-2.3C4.779 17.167 4 15.3 4 13.1c0-1.05.204-2.054.612-3.012A7.784 7.784 0 0 1 6.35 7.55L12 2l5.65 5.55c.75.733 1.33 1.58 1.738 2.538.408.958.612 1.962.612 3.012 0 2.2-.78 4.067-2.337 5.6C16.104 20.233 14.217 21 12 21Zm-6-7.9h12c0-.783-.15-1.53-.45-2.237A5.453 5.453 0 0 0 16.25 9L12 4.8 7.75 9c-.567.533-1 1.154-1.3 1.863-.3.708-.45 1.454-.45 2.237Z"
+ })
+ });
+}
+function ji({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M5 5v14h14v-7h2v7c0 1.1-.9 2-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7v2H5Zm9 0V3h7v7h-2V6.41l-9.83 9.83-1.41-1.41L17.59 5H14Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function Pi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M19 15.18V7c0-2.21-1.79-4-4-4s-4 1.79-4 4v10c0 1.1-.9 2-2 2s-2-.9-2-2V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V17c0 2.21 1.79 4 4 4s4-1.79 4-4V7c0-1.1.9-2 2-2s2 .9 2 2v8.18A2.996 2.996 0 0 0 18 21c1.66 0 3-1.34 3-3 0-1.3-.84-2.4-2-2.82ZM6 7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1Zm12 12c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1Z"
+ })
+ });
+}
+function Ai({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M5 3h14c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2Zm0 16h14V5H5v14Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function Ni({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M3 5h2V3c-1.1 0-2 .9-2 2Zm0 8h2v-2H3v2Zm4 8h2v-2H7v2ZM3 9h2V7H3v2Zm10-6h-2v2h2V3Zm6 0v2h2c0-1.1-.9-2-2-2ZM5 21v-2H3c0 1.1.9 2 2 2Zm-2-4h2v-2H3v2ZM9 3H7v2h2V3Zm2 18h2v-2h-2v2Zm8-8h2v-2h-2v2Zm0 8c1.1 0 2-.9 2-2h-2v2Zm0-12h2V7h-2v2Zm0 8h2v-2h-2v2Zm-4 4h2v-2h-2v2Zm0-16h2V3h-2v2ZM7 17h10V7H7v10Zm2-8h6v6H9V9Z"
+ })
+ });
+}
+function Mi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5Zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14Z"
+ })
+ });
+}
+function Li({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M19.5 12c0 .34-.03.66-.07.98l2.11 1.65c.19.15.24.42.12.64l-2 3.46c-.12.22-.38.31-.61.22l-2.49-1c-.52.39-1.08.73-1.69.98l-.38 2.65c-.03.24-.24.42-.49.42h-4c-.25 0-.46-.18-.49-.42l-.38-2.65c-.61-.25-1.17-.58-1.69-.98l-2.49 1c-.22.08-.49 0-.61-.22l-2-3.46a.505.505 0 0 1 .12-.64l2.11-1.65A7.93 7.93 0 0 1 4.5 12c0-.33.03-.66.07-.98L2.46 9.37a.493.493 0 0 1-.12-.64l2-3.46c.12-.22.38-.31.61-.22l2.49 1c.52-.39 1.08-.73 1.69-.98l.38-2.65c.03-.24.24-.42.49-.42h4c.25 0 .46.18.49.42l.38 2.65c.61.25 1.17.58 1.69.98l2.49-1c.22-.08.49 0 .61.22l2 3.46c.12.22.07.49-.12.64l-2.11 1.65c.04.32.07.64.07.98Zm-11 0c0 1.93 1.57 3.5 3.5 3.5s3.5-1.57 3.5-3.5-1.57-3.5-3.5-3.5-3.5 1.57-3.5 3.5Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function Di({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M11.04 3.594a1.073 1.073 0 0 1 1.92 0l7.925 15.852a1.074 1.074 0 0 1-.96 1.554H4.075c-.798 0-1.317-.84-.96-1.554L11.04 3.594ZM12 18.852V6.475L5.812 18.852H12Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function Ri({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5ZM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5Zm-3-5c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function zi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9Zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5ZM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15Z"
+ })
+ });
+}
+function $i({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M3 6v2h18V6H3Zm0 12h6v-2H3v2Zm12-5H3v-2h12v2Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function Bi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M14 2H4a2 2 0 0 0-2 2v10h2V4h10V2Zm4 4H8a2 2 0 0 0-2 2v10h2V8h10V6Zm2 4h-8a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2Z"
+ })
+ });
+}
+function Fi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "m12.41 2.58 9 9c.36.36.59.87.59 1.42 0 .55-.22 1.05-.59 1.41l-7 7c-.36.37-.86.59-1.41.59-.55 0-1.05-.22-1.41-.58l-9-9C2.22 12.05 2 11.55 2 11V4c0-1.1.9-2 2-2h7c.55 0 1.05.22 1.41.58ZM4 5.5C4 6.33 4.67 7 5.5 7S7 6.33 7 5.5 6.33 4 5.5 4 4 4.67 4 5.5Z",
+ clipRule: "evenodd"
+ })
+ });
+}
+function Ui({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M8 19v2h8v-2h-3V5h3V3H8v2h3v14H8Z"
+ })
+ });
+}
+function Hi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4Z"
+ })
+ });
+}
+function Wi({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02ZM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77Z"
+ })
+ });
+}
+const Vi = {
+ paragraphS: ro([
+ "font-weight:normal;font-size:",
+ ";line-height:",
+ ";"
+ ], po.fontSize75, po.lineHeightText),
+ paragraphM: ro([
+ "font-weight:normal;font-size:",
+ ";line-height:",
+ ";"
+ ], po.fontSize100, po.lineHeightText),
+ paragraphL: ro([
+ "font-weight:normal;font-size:",
+ ";line-height:",
+ ";"
+ ], po.fontSize200, po.lineHeightText),
+ uiTextXS: ro(["font-weight:normal;font-size:", ";line-height:20px;"], po.fontSize50),
+ uiTextS: ro(["font-weight:normal;font-size:", ";line-height:20px;"], po.fontSize75),
+ uiTextM: ro(["font-weight:normal;font-size:", ";line-height:20px;"], po.fontSize100),
+ uiTextL: ro(["font-weight:normal;font-size:", ";line-height:24px;"], po.fontSize200),
+ headingXS: ro([
+ "font-weight:600;font-size:",
+ ";line-height:",
+ ";"
+ ], po.fontSize100, po.lineHeightHeading),
+ headingS: ro([
+ "font-weight:600;font-size:",
+ ";line-height:",
+ ";"
+ ], po.fontSize200, po.lineHeightHeading),
+ headingM: ro([
+ "font-weight:normal;font-size:",
+ ";line-height:",
+ ";"
+ ], po.fontSize400, po.lineHeightHeading),
+ headingL: ro([
+ "font-weight:normal;font-size:",
+ ";line-height:",
+ ";"
+ ], po.fontSize600, po.lineHeightHeading),
+ headingXL: ro([
+ "font-weight:normal;font-size:",
+ ";line-height:",
+ ";"
+ ], po.fontSize800, po.lineHeightHeading),
+ headingXXL: ro([
+ "font-weight:normal;font-size:",
+ ";line-height:",
+ ";"
+ ], po.fontSize1000, po.lineHeightHeading)
+};
+function qi(e) {
+ if (!/^#([\da-f]{3}){1,2}$/i.test(e)) throw Error(`Invalid HEX to RGB conversion: ${e}`);
+ let t, n, r;
+ return e.length === 4 ? (t = "0x" + e[1] + e[1], n = "0x" + e[2] + e[2], r = "0x" + e[3] + e[3]) : e.length === 7 ? (t = "0x" + e[1] + e[2], n = "0x" + e[3] + e[4], r = "0x" + e[5] + e[6]) : (t = "", n = "", r = ""), `${Number(t)} ${Number(n)} ${Number(r)}`;
+}
+const Gi = {
+ "--white": "#ffffff",
+ "--white-rgb": qi("#ffffff"),
+ "--gray1000": "#031026",
+ "--gray1000-rgb": qi("#031026"),
+ "--gray900": "#132034",
+ "--gray800": "#212c40",
+ "--gray700": "#343e50",
+ "--gray600": "#4f5867",
+ "--gray500": "#6f7783",
+ "--gray400": "#8b919b",
+ "--gray300": "#b8bcc2",
+ "--gray200": "#d5d7da",
+ "--gray100": "#e6e7e9",
+ "--gray75": "#edeef0",
+ "--gray50": "#f2f3f4",
+ "--gray25": "#f8f8f9",
+ "--gray10": "#ffffff",
+ "--blue1000": "#031025",
+ "--blue900": "#051e46",
+ "--blue800": "#072961",
+ "--blue700": "#093986",
+ "--blue600": "#0d51bc",
+ "--blue500": "#126dfe",
+ "--blue500-rgb": qi("#126dfe"),
+ "--blue500a10": `rgb(${po["blue500-rgb"]} / 10%)`,
+ "--blue400": "#488fff",
+ "--blue300": "#94bdff",
+ "--blue200": "#c0d8ff",
+ "--blue100": "#dae8ff",
+ "--blue75": "#e5efff",
+ "--blue50": "#ecf3ff",
+ "--blue25": "#f4f8ff",
+ "--red1000": "#1f0908",
+ "--red900": "#3b120f",
+ "--red800": "#521914",
+ "--red700": "#71221c",
+ "--red600": "#9e3028",
+ "--red500": "#d54035",
+ "--red500-rgb": qi("#d54035"),
+ "--red500a50": `rgb(${po["red500-rgb"]} / 50%)`,
+ "--red500a10": `rgb(${po["red500-rgb"]} / 10%)`,
+ "--red400": "#e16e66",
+ "--red300": "#eeaba6",
+ "--red200": "#f5cecb",
+ "--red100": "#f9e2e1",
+ "--red75": "#fbebea",
+ "--red50": "#fcf0ef",
+ "--red25": "#fdf7f6",
+ "--yellow500": "#fea900",
+ "--yellow500-rgb": qi("#fea900"),
+ "--yellow500a10": `rgb(${po["yellow500-rgb"]} / 10%)`,
+ "--yellow600": "#e59800",
+ "--yellow700": "#cb8700",
+ "--green1000": "#001405",
+ "--green900": "#002609",
+ "--green800": "#00340c",
+ "--green700": "#004911",
+ "--green600": "#006618",
+ "--green500": "#038922",
+ "--green400": "#3ca454",
+ "--green300": "#8cc99b",
+ "--green200": "#bbdfc4",
+ "--green100": "#d7eddc",
+ "--green75": "#e3f2e7",
+ "--green50": "#ebf5ed",
+ "--green25": "#f4faf5",
+ "--purple1000": "#100e20",
+ "--purple900": "#1e1b3e",
+ "--purple800": "#2a2656",
+ "--purple700": "#3b3478",
+ "--purple600": "#534aa9",
+ "--purple500": "#7064e4",
+ "--purple400": "#8d84ea",
+ "--purple300": "#bab5f3",
+ "--purple200": "#d6d3f8",
+ "--purple100": "#e7e5fb",
+ "--purple75": "#eeedfc",
+ "--purple50": "#f3f2fd",
+ "--purple25": "#f8f7fe",
+ "--magenta1000": "#1f0910",
+ "--magenta900": "#3b101e",
+ "--magenta800": "#511729",
+ "--magenta700": "#701f39",
+ "--magenta600": "#9d2c50",
+ "--magenta500": "#d33b6c",
+ "--magenta400": "#e2688f",
+ "--magenta300": "#eea8be",
+ "--magenta200": "#f5ccd9",
+ "--magenta100": "#f9e1e9",
+ "--magenta75": "#fbeaf0",
+ "--magenta50": "#fcf0f4",
+ "--magenta25": "#fdf6f9",
+ "--teal1000": "#00140e",
+ "--teal900": "#00251b",
+ "--teal800": "#003325",
+ "--teal700": "#004734",
+ "--teal600": "#006449",
+ "--teal500": "#008762",
+ "--teal500-rgb": qi("#008762"),
+ "--teal500a10": `rgb(${po["teal500-rgb"]} / 10%)`,
+ "--teal400": "#35a284",
+ "--teal300": "#88c8b7",
+ "--teal200": "#b9dfd4",
+ "--teal100": "#d6ece6",
+ "--teal75": "#e2f2ee",
+ "--teal50": "#eaf5f2",
+ "--teal25": "#f3faf8",
+ "--brandPrimary700": Qi("brandPrimary700", "#093986"),
+ "--brandPrimary600": Qi("brandPrimary600", "#0d51bc"),
+ "--brandPrimary500": Qi("brandPrimary500", "#126dfe"),
+ "--brandPrimary500-rgb": Qi("brandPrimary500-rgb", qi("#126dfe")),
+ "--brandPrimary300": Qi("brandPrimary300", "#94bdff"),
+ "--brandPrimary100": Qi("brandPrimary100", "#dae8ff"),
+ "--spacing1": "2px",
+ "--spacing2": "4px",
+ "--spacing3": "8px",
+ "--spacing4": "12px",
+ "--spacing5": "16px",
+ "--spacing6": "24px",
+ "--spacing7": "32px",
+ "--spacing8": "40px",
+ "--spacing9": "48px",
+ "--layoutSpacing1": "16px",
+ "--layoutSpacing2": "24px",
+ "--layoutSpacing3": "32px",
+ "--layoutSpacing4": "48px",
+ "--layoutSpacing5": "64px",
+ "--layoutSpacing6": "96px",
+ "--layoutSpacing7": "160px",
+ "--radiusSmall": "2px",
+ "--radiusMedium": "5px",
+ "--radiusLarge": "8px",
+ "--radiusCircle": "50%",
+ "--radiusPill": "9999px",
+ "--radiusBase": po.radiusMedium,
+ "--brandRadiusBase": po.radiusBase,
+ "--fontStackBase": "Inter, system-ui, sans-serif",
+ "--brandFontStackBase": Qi("brandFontStackBase", "inherit"),
+ "--fontSize25": "10px",
+ "--fontSize50": "12px",
+ "--fontSize75": "14px",
+ "--fontSize100": "16px",
+ "--fontSize200": "18px",
+ "--fontSize300": "20px",
+ "--fontSize400": "22px",
+ "--fontSize500": "25px",
+ "--fontSize600": "28px",
+ "--fontSize700": "32px",
+ "--fontSize800": "36px",
+ "--fontSize900": "40px",
+ "--fontSize1000": "45px",
+ "--fontSizeBase": po.fontSize100,
+ "--lineHeightBase": "1.25",
+ "--lineHeightHeading": "1.25",
+ "--lineHeightText": "1.5",
+ "--gray900a": `rgb(${po["gray1000-rgb"]} / 93%)`,
+ "--gray800a": `rgb(${po["gray1000-rgb"]} / 88%)`,
+ "--gray700a": `rgb(${po["gray1000-rgb"]} / 81%)`,
+ "--gray600a": `rgb(${po["gray1000-rgb"]} / 70%)`,
+ "--gray500a": `rgb(${po["gray1000-rgb"]} / 57%)`,
+ "--gray400a": `rgb(${po["gray1000-rgb"]} / 46%)`,
+ "--gray300a": `rgb(${po["gray1000-rgb"]} / 28%)`,
+ "--gray200a": `rgb(${po["gray1000-rgb"]} / 17%)`,
+ "--gray100a": `rgb(${po["gray1000-rgb"]} / 10%)`,
+ "--gray75a": `rgb(${po["gray1000-rgb"]} / 7%)`,
+ "--gray50a": `rgb(${po["gray1000-rgb"]} / 5%)`,
+ "--gray25a": `rgb(${po["gray1000-rgb"]} / 3%)`,
+ "--colorText": po.gray800,
+ "--colorTextMuted": po.gray600,
+ "--colorTextDisabled": po.gray400,
+ "--focusRingWidth": "2px",
+ "--focusRingColorPrimary": po.blue500,
+ "--focusRingColorSecondary": po.gray200,
+ "--colorShadow": po.gray100a,
+ "--elevationStatic": `0 0 0 1px ${po.colorShadow}`,
+ "--elevation1": `0 1px 4px -1px ${po.colorShadow}`,
+ "--elevation2": `0 2px 4px -1px ${po.colorShadow}`,
+ "--elevation4": `0 4px 6px -2px ${po.colorShadow}`,
+ "--elevation8": `0 8px 12px -2px ${po.colorShadow}`,
+ "--elevation12": `0 12px 12px -2px ${po.colorShadow}`,
+ "--elevation16": `0 16px 12px -2px ${po.colorShadow}`,
+ "--elevation24": `0 24px 12px -2px ${po.colorShadow}`
+}, Yi = {
+ "--gray1000": "#ffffff",
+ "--gray1000-rgb": qi("#ffffff"),
+ "--gray900": "#e6e7e9",
+ "--gray800": "#cdcfd4",
+ "--gray700": "#b3b7be",
+ "--gray600": "#9a9fa8",
+ "--gray500": "#818793",
+ "--gray400": "#68707d",
+ "--gray300": "#4f5867",
+ "--gray200": "#354051",
+ "--gray100": "#1c283c",
+ "--gray75": "#152135",
+ "--gray50": "#101c31",
+ "--gray25": "#0b172c",
+ "--gray10": "#031026",
+ "--focusRingColorSecondary": po.gray200a
+}, Zi = "ds-light-theme", Ki = "ds-dark-theme", Xi = lo`${ro([
+ ":root,:host,.",
+ ",.",
+ "{",
+ "}.",
+ "{",
+ "}"
+], Zi, Ki, Ji(Gi), Ki, Ji(Yi))}`;
+function Ji(e) {
+ return Object.entries(e).map((([e, t]) => `${e}-${uo}: ${t}`)).join(";") + ";";
+}
+function Qi(e, t) {
+ return `var(--user-${e}, var(--theme-${e}, ${t}))`;
+}
+function ea({ lightTheme: e, darkTheme: t }) {
+ let n = {};
+ return Object.keys(e).forEach(((e) => {
+ n[e] = `var(--ds-${e})`;
+ })), {
+ internalTokens: n,
+ declareTokens: ro([
+ "&,.",
+ " &{",
+ "}.",
+ " &{",
+ "}"
+ ], Zi, ta(e), Ki, ta(t))
+ };
+}
+function ta(e) {
+ return Object.entries(e).map((([e, t]) => `--ds-${e}: ${t}`)).join(";") + ";";
+}
+const { internalTokens: na, declareTokens: ra } = ea({
+ lightTheme: {
+ "input-fill": po.gray10,
+ "input-fill-disabled": po.gray25,
+ "input-border": po.gray100,
+ "input-border-hover": po.gray200,
+ "input-border-focus": po.gray300,
+ "input-border-disabled": po.gray100,
+ "input-shadow-hover": po.elevation1,
+ "input-focus-ring": po.gray100,
+ "input-clean-fill-hover": po.gray25a,
+ "input-clean-fill-focus": po.gray50a
+ },
+ darkTheme: {
+ "input-fill": "transparent",
+ "input-fill-disabled": po.gray50a,
+ "input-border": po.gray200a,
+ "input-border-hover": po.gray300a,
+ "input-border-focus": po.gray400a,
+ "input-border-disabled": po.gray100a,
+ "input-shadow-hover": "none",
+ "input-focus-ring": po.gray300a,
+ "input-clean-fill-hover": po.gray50a,
+ "input-clean-fill-focus": po.gray75a
+ }
+}), oa = ao.div.withConfig({
+ displayName: "InputWrapper",
+ componentId: "sc-1ha4tm6-0"
+})([
+ "",
+ " ",
+ " display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--ds-input-height);padding:0 var(--ds-input-side-padding);border:1px solid ",
+ ";border-radius:",
+ ";background:",
+ ";&:hover{border-color:",
+ ";box-shadow:",
+ ";}&:focus-within{border-color:",
+ ";box-shadow:0 0 0 3px ",
+ ";}",
+ ";",
+ ";"
+], ((e) => e.$isSmall ? ro([
+ "--ds-input-height:32px;--ds-input-side-padding:",
+ ";--ds-input-icons-gap:",
+ ";"
+], po.spacing4, po.spacing2) : ro([
+ "--ds-input-height:40px;--ds-input-side-padding:",
+ ";--ds-input-icons-gap:",
+ ";"
+], po.spacing5, po.spacing3)), ra, ((e) => e.$isInvalid ? po.red500 : na["input-border"]), po.radiusMedium, na["input-fill"], ((e) => e.$isInvalid ? po.red600 : na["input-border-hover"]), na["input-shadow-hover"], ((e) => e.$isInvalid ? po.red500 : na["input-border-focus"]), na["input-focus-ring"], ((e) => e.$isDisabled && ro([
+ "border-color:",
+ ";background:",
+ ";color:",
+ ";cursor:not-allowed;&:hover{border-color:",
+ ";box-shadow:none;}"
+], na["input-border-disabled"], na["input-fill-disabled"], po.colorTextMuted, na["input-border-disabled"])), ((e) => e.$variant === "clean" && ro([
+ "border-color:transparent;box-shadow:none;&:hover{border-color:transparent;background:",
+ ";box-shadow:none;}&:focus-within{border-color:transparent;background:",
+ ";box-shadow:none;}"
+], na["input-clean-fill-hover"], na["input-clean-fill-focus"]))), ia = ao.input.withConfig({
+ displayName: "InputStyled",
+ componentId: "sc-1ha4tm6-1"
+})([
+ "&&&{flex:1;width:auto;min-width:0;height:100%;margin:0 !important;padding:0 !important;border:0;background:transparent;color:",
+ ";box-shadow:none;outline:none;font-family:",
+ ";",
+ " &::-webkit-inner-spin-button,&::-webkit-outer-spin-button{display:none;margin:0;appearance:none;}&[type='number']{appearance:textfield;}&::placeholder{color:",
+ ";}&:disabled{color:",
+ ";cursor:not-allowed;&::placeholder{color:",
+ ";}}}"
+], po.colorText, po.brandFontStackBase, Vi.uiTextM, po.colorTextDisabled, po.colorTextMuted, po.colorTextDisabled), aa = ao.div.withConfig({
+ displayName: "LeftItems",
+ componentId: "sc-1ha4tm6-2"
+})(["display:flex;gap:var(--ds-input-icons-gap);align-items:center;margin-right:var(--ds-input-icons-gap);&:empty{display:none;}"]), sa = ao.div.withConfig({
+ displayName: "IconLeftContainer",
+ componentId: "sc-1ha4tm6-3"
+})([
+ "flex:none;margin-left:calc(",
+ " * -1);color:",
+ ";"
+], po.spacing2, po.colorTextMuted), la = ao.div.withConfig({
+ displayName: "PrefixContainer",
+ componentId: "sc-1ha4tm6-4"
+})(["color:", ";"], ((e) => e.$isDisabled ? po.colorTextDisabled : po.colorTextMuted)), ca = ao.div.withConfig({
+ displayName: "RightItems",
+ componentId: "sc-1ha4tm6-5"
+})(["display:flex;flex:none;gap:var(--ds-input-icons-gap);align-items:center;margin-right:calc(", " * -1);margin-left:var(--ds-input-icons-gap);&:empty{display:none;}"], po.spacing2), ua = ao.div.withConfig({
+ displayName: "SuffixContainer",
+ componentId: "sc-1ha4tm6-6"
+})([
+ "color:",
+ ";&:last-child{margin-right:",
+ ";}"
+], ((e) => e.$isDisabled ? po.colorTextDisabled : po.colorTextMuted), po.spacing2), da = ao.div.withConfig({
+ displayName: "IconRightContainer",
+ componentId: "sc-1ha4tm6-7"
+})(["display:grid;flex:none;align-items:center;color:", ";"], po.colorTextMuted), fa = ao.button.withConfig({
+ displayName: "ClearButton",
+ componentId: "sc-1ha4tm6-8"
+})([
+ "flex:none;padding:0;border:none;background:transparent;color:",
+ ";cursor:pointer;&:hover,&:focus{color:",
+ ";outline:none;}&:active{color:",
+ ";}"
+], po.gray200a, po.gray300a, po.gray400a), pa = typeof document < "u" ? s.default.useLayoutEffect : () => {};
+function ha(e) {
+ let t = e;
+ return t.nativeEvent = e, t.isDefaultPrevented = () => t.defaultPrevented, t.isPropagationStopped = () => t.cancelBubble, t.persist = () => {}, t;
+}
+function ga(e) {
+ let t = (0, s.useRef)({
+ isFocused: !1,
+ observer: null
+ });
+ pa((() => {
+ let e = t.current;
+ return () => {
+ e.observer &&= (e.observer.disconnect(), null);
+ };
+ }), []);
+ let n = function(e) {
+ let t = (0, s.useRef)(null);
+ return pa((() => {
+ t.current = e;
+ }), [e]), (0, s.useCallback)(((...e) => {
+ let n = t.current;
+ return n?.(...e);
+ }), []);
+ }(((t) => {
+ e?.(t);
+ }));
+ return (0, s.useCallback)(((e) => {
+ if (e.target instanceof HTMLButtonElement || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement) {
+ t.current.isFocused = !0;
+ let r = e.target;
+ r.addEventListener("focusout", (e) => {
+ if (t.current.isFocused = !1, r.disabled) {
+ let t = ha(e);
+ n(t);
+ }
+ t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
+ }, { once: !0 }), t.current.observer = new MutationObserver((() => {
+ if (t.current.isFocused && r.disabled) {
+ var e;
+ (e = t.current.observer) == null || e.disconnect();
+ let n = r === document.activeElement ? null : document.activeElement;
+ r.dispatchEvent(new FocusEvent("blur", { relatedTarget: n })), r.dispatchEvent(new FocusEvent("focusout", {
+ bubbles: !0,
+ relatedTarget: n
+ }));
+ }
+ })), t.current.observer.observe(r, {
+ attributes: !0,
+ attributeFilter: ["disabled"]
+ });
+ }
+ }), [n]);
+}
+function va(e) {
+ return typeof window < "u" && window.navigator != null && (window.navigator.userAgentData?.brands.some(((t) => e.test(t.brand))) || e.test(window.navigator.userAgent));
+}
+function ya(e) {
+ return typeof window < "u" && window.navigator != null && e.test(window.navigator.userAgentData?.platform || window.navigator.platform);
+}
+function ba(e) {
+ let t = null;
+ return () => (t ??= e(), t);
+}
+const wa = ba((function() {
+ return ya(/^Mac/i);
+})), ka = ba((function() {
+ return va(/Android/i);
+})), _a = (e) => e?.ownerDocument ?? document, Ta = (e) => e && "window" in e && e.window === e ? e : _a(e).defaultView || window;
+function Ia(e) {
+ return (t = e) !== null && typeof t == "object" && "nodeType" in t && typeof t.nodeType == "number" && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in e;
+ var t;
+}
+let Oa = null, ja = /* @__PURE__ */ new Set(), Pa = /* @__PURE__ */ new Map(), Aa = !1, Na = !1;
+const Ma = {
+ Tab: !0,
+ Escape: !0
+};
+function La(e, t) {
+ for (let n of ja) n(e, t);
+}
+function Da(e) {
+ Aa = !0, function(e) {
+ return !(e.metaKey || !wa() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
+ }(e) && (Oa = "keyboard", La("keyboard", e));
+}
+function Ra(e) {
+ Oa = "pointer", e.type !== "mousedown" && e.type !== "pointerdown" || (Aa = !0, La("pointer", e));
+}
+function za(e) {
+ var t;
+ ((t = e).mozInputSource === 0 && t.isTrusted || (ka() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType)) && (Aa = !0, Oa = "virtual");
+}
+function $a(e) {
+ e.target !== window && e.target !== document && e.isTrusted && (Aa || Na || (Oa = "virtual", La("virtual", e)), Aa = !1, Na = !1);
+}
+function Ba() {
+ Aa = !1, Na = !0;
+}
+function Fa(e) {
+ if (typeof window > "u" || Pa.get(Ta(e))) return;
+ let t = Ta(e), n = _a(e), r = t.HTMLElement.prototype.focus;
+ t.HTMLElement.prototype.focus = function() {
+ Aa = !0, r.apply(this, arguments);
+ }, n.addEventListener("keydown", Da, !0), n.addEventListener("keyup", Da, !0), n.addEventListener("click", za, !0), t.addEventListener("focus", $a, !0), t.addEventListener("blur", Ba, !1), typeof PointerEvent < "u" && (n.addEventListener("pointerdown", Ra, !0), n.addEventListener("pointermove", Ra, !0), n.addEventListener("pointerup", Ra, !0)), t.addEventListener("beforeunload", (() => {
+ Ua(e);
+ }), { once: !0 }), Pa.set(t, { focus: r });
+}
+const Ua = (e, t) => {
+ let n = Ta(e), r = _a(e);
+ t && r.removeEventListener("DOMContentLoaded", t), Pa.has(n) && (n.HTMLElement.prototype.focus = Pa.get(n).focus, r.removeEventListener("keydown", Da, !0), r.removeEventListener("keyup", Da, !0), r.removeEventListener("click", za, !0), n.removeEventListener("focus", $a, !0), n.removeEventListener("blur", Ba, !1), typeof PointerEvent < "u" && (r.removeEventListener("pointerdown", Ra, !0), r.removeEventListener("pointermove", Ra, !0), r.removeEventListener("pointerup", Ra, !0)), Pa.delete(n));
+};
+function Ha() {
+ return Oa !== "pointer";
+}
+typeof document < "u" && function(e) {
+ let t = _a(e), n;
+ t.readyState === "loading" ? (n = () => {
+ Fa(e);
+ }, t.addEventListener("DOMContentLoaded", n)) : Fa(e);
+}();
+const Wa = /* @__PURE__ */ new Set([
+ "checkbox",
+ "radio",
+ "range",
+ "color",
+ "file",
+ "image",
+ "button",
+ "submit",
+ "reset"
+]);
+function qa() {
+ return !1;
+}
+function Ga(e, t) {
+ if (!qa()) return !(!t || !e) && e.contains(t);
+ if (!e || !t) return !1;
+ let n = t;
+ for (; n !== null;) {
+ if (n === e) return !0;
+ n = n.tagName === "SLOT" && n.assignedSlot ? n.assignedSlot.parentNode : Ia(n) ? n.host : n.parentNode;
+ }
+ return !1;
+}
+const Ya = (e = document) => {
+ if (!qa()) return e.activeElement;
+ let n = e.activeElement;
+ for (; n && "shadowRoot" in n && n.shadowRoot?.activeElement;) n = n.shadowRoot.activeElement;
+ return n;
+};
+function Za(e) {
+ return qa() && e.target.shadowRoot && e.composedPath ? e.composedPath()[0] : e.target;
+}
+function Ka() {
+ let e = (0, s.useRef)(/* @__PURE__ */ new Map()), t = (0, s.useCallback)(((t, n, r, o) => {
+ let i = o?.once ? (...t) => {
+ e.current.delete(r), r(...t);
+ } : r;
+ e.current.set(r, {
+ type: n,
+ eventTarget: t,
+ fn: i,
+ options: o
+ }), t.addEventListener(n, i, o);
+ }), []), n = (0, s.useCallback)(((t, n, r, o) => {
+ let a = e.current.get(r)?.fn || r;
+ t.removeEventListener(n, a, o), e.current.delete(r);
+ }), []), r = (0, s.useCallback)((() => {
+ e.current.forEach(((e, t) => {
+ n(e.eventTarget, e.type, t, e.options);
+ }));
+ }), [n]);
+ return (0, s.useEffect)((() => r), [r]), {
+ addGlobalListener: t,
+ removeGlobalListener: n,
+ removeAllGlobalListeners: r
+ };
+}
+function Xa(e) {
+ let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: o } = e, i = (0, s.useRef)({ isFocusWithin: !1 }), { addGlobalListener: a, removeAllGlobalListeners: l } = Ka(), c = (0, s.useCallback)(((e) => {
+ e.currentTarget.contains(e.target) && i.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget) && (i.current.isFocusWithin = !1, l(), n && n(e), o && o(!1));
+ }), [
+ n,
+ o,
+ i,
+ l
+ ]), u = ga(c), d = (0, s.useCallback)(((e) => {
+ if (!e.currentTarget.contains(e.target)) return;
+ let t = _a(e.target), n = Ya(t);
+ if (!i.current.isFocusWithin && n === Za(e.nativeEvent)) {
+ r && r(e), o && o(!0), i.current.isFocusWithin = !0, u(e);
+ let n = e.currentTarget;
+ a(t, "focus", ((e) => {
+ if (i.current.isFocusWithin && !Ga(n, e.target)) {
+ let r = new t.defaultView.FocusEvent("blur", { relatedTarget: e.target });
+ (function(e, t) {
+ Object.defineProperty(e, "target", { value: t }), Object.defineProperty(e, "currentTarget", { value: t });
+ })(r, n);
+ let o = ha(r);
+ c(o);
+ }
+ }), { capture: !0 });
+ }
+ }), [
+ r,
+ o,
+ u,
+ a,
+ c
+ ]);
+ return t ? { focusWithinProps: {
+ onFocus: void 0,
+ onBlur: void 0
+ } } : { focusWithinProps: {
+ onFocus: d,
+ onBlur: c
+ } };
+}
+function Ja(e = {}) {
+ let { autoFocus: t = !1, isTextInput: n, within: r } = e, o = (0, s.useRef)({
+ isFocused: !1,
+ isFocusVisible: t || Ha()
+ }), [i, a] = (0, s.useState)(!1), [l, c] = (0, s.useState)((() => o.current.isFocused && o.current.isFocusVisible)), u = (0, s.useCallback)((() => c(o.current.isFocused && o.current.isFocusVisible)), []), d = (0, s.useCallback)(((e) => {
+ o.current.isFocused = e, a(e), u();
+ }), [u]);
+ (function(e, t, n) {
+ Fa(), (0, s.useEffect)((() => {
+ let t = (t, r) => {
+ (function(e, t, n) {
+ let r = _a(n?.target), o = typeof window < "u" ? Ta(n?.target).HTMLInputElement : HTMLInputElement, i = typeof window < "u" ? Ta(n?.target).HTMLTextAreaElement : HTMLTextAreaElement, a = typeof window < "u" ? Ta(n?.target).HTMLElement : HTMLElement, s = typeof window < "u" ? Ta(n?.target).KeyboardEvent : KeyboardEvent;
+ return !((e = e || r.activeElement instanceof o && !Wa.has(r.activeElement.type) || r.activeElement instanceof i || r.activeElement instanceof a && r.activeElement.isContentEditable) && t === "keyboard" && n instanceof s && !Ma[n.key]);
+ })(!!n?.isTextInput, t, r) && e(Ha());
+ };
+ return ja.add(t), () => {
+ ja.delete(t);
+ };
+ }), t);
+ })(((e) => {
+ o.current.isFocusVisible = e, u();
+ }), [], { isTextInput: n });
+ let { focusProps: f } = function(e) {
+ let { isDisabled: t, onFocus: n, onBlur: r, onFocusChange: o } = e, i = (0, s.useCallback)(((e) => {
+ if (e.target === e.currentTarget) return r && r(e), o && o(!1), !0;
+ }), [r, o]), a = ga(i), l = (0, s.useCallback)(((e) => {
+ let t = _a(e.target), r = t ? Ya(t) : Ya();
+ e.target === e.currentTarget && r === Za(e.nativeEvent) && (n && n(e), o && o(!0), a(e));
+ }), [
+ o,
+ n,
+ a
+ ]);
+ return { focusProps: {
+ onFocus: !t && (n || o || r) ? l : void 0,
+ onBlur: t || !r && !o ? void 0 : i
+ } };
+ }({
+ isDisabled: r,
+ onFocusChange: d
+ }), { focusWithinProps: p } = Xa({
+ isDisabled: !r,
+ onFocusWithinChange: d
+ });
+ return {
+ isFocused: i,
+ isFocusVisible: l,
+ focusProps: r ? p : f
+ };
+}
+var Qa = o(7516);
+function es(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
+ }
+}
+function ts(e, t, n) {
+ return t && es(e.prototype, t), n && es(e, n), e;
+}
+function ns() {
+ return ns = Object.assign || function(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = arguments[t];
+ for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
+ }
+ return e;
+ }, ns.apply(this, arguments);
+}
+function rs(e, t) {
+ return rs = Object.setPrototypeOf || function(e, t) {
+ return e.__proto__ = t, e;
+ }, rs(e, t);
+}
+function os(e, t) {
+ (t == null || t > e.length) && (t = e.length);
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
+ return r;
+}
+function is(e, t) {
+ var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
+ if (n) return (n = n.call(e)).next.bind(n);
+ if (Array.isArray(e) || (n = function(e, t) {
+ if (e) {
+ if (typeof e == "string") return os(e, t);
+ var n = Object.prototype.toString.call(e).slice(8, -1);
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? os(e, t) : void 0;
+ }
+ }(e)) || t && e && typeof e.length == "number") {
+ n && (e = n);
+ var r = 0;
+ return function() {
+ return r >= e.length ? { done: !0 } : {
+ done: !1,
+ value: e[r++]
+ };
+ };
+ }
+ throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+}
+function as(e) {
+ var t = (0, s.useRef)(null);
+ return function(n) {
+ n && n !== t.current && (t.current = n, e(n));
+ };
+}
+var ss = typeof window < "u" ? s.useLayoutEffect : s.useEffect;
+function ls(e) {
+ return parseFloat(e.replace("px", ""));
+}
+function cs(e, t, n) {
+ return e < t ? t : e > n ? n : e;
+}
+function us(e) {
+ return e != null;
+}
+function ds() {
+ var t = [...arguments];
+ return function(e) {
+ for (var n, r = is(t); !(n = r()).done;) {
+ var o = n.value;
+ o && (typeof o == "function" ? o(e) : o.current = e);
+ }
+ };
+}
+function fs(e, t) {
+ var n = [];
+ if (!e || !t || e === document.body) return n;
+ var r = t.getComputedStyle(e);
+ return [
+ r.overflow,
+ r.overflowX,
+ r.overflowY
+ ].some((function(e) {
+ return ["auto", "scroll"].includes(e);
+ })) && n.push(e), [].concat(n, fs(e.parentElement, t));
+}
+function ps(e) {
+ return "react-laag: Could not find a valid reference for the " + e + " element. There might be 2 causes:\n - Make sure that the 'ref' is set correctly on the " + e + " element when isOpen: true. Also make sure your component forwards the ref with \"forwardRef()\".\n - Make sure that you are actually rendering the " + e + " when the isOpen prop is set to true";
+}
+function hs(e) {
+ var t = e.enabled, n = e.onChange, r = e.environment, o = e.ResizeObserverPolyfill, i = e.overflowContainer, a = e.triggerOption, l = function(e, t) {
+ if (e !== void 0) return t || e.ResizeObserver;
+ }(r, o);
+ (0, s.useEffect)((function() {}), [l]);
+ var c, u, d = (0, s.useRef)(null), f = !!a, p = (u = (0, s.useRef)({
+ scrollContainers: [],
+ trigger: null,
+ layer: null
+ }), (0, s.useMemo)((function() {
+ return [function() {
+ return u.current;
+ }, function(e) {
+ u.current = typeof e == "function" ? e(u.current) : e;
+ }];
+ }), [])), h = p[0], g = p[1], m = (c = (0, s.useRef)([]), (0, s.useMemo)((function() {
+ return {
+ hasEventSubscriptions: function() {
+ return c.current.length > 0;
+ },
+ removeAllEventSubscriptions: function() {
+ for (var e, t = is(c.current); !(e = t()).done;) (0, e.value)();
+ c.current = [];
+ },
+ addEventSubscription: function(e) {
+ c.current.push(e);
+ }
+ };
+ }), [])), v = m.hasEventSubscriptions, y = m.addEventSubscription, b = m.removeAllEventSubscriptions, w = (0, s.useCallback)((function() {
+ var e = h(), t = e.layer, o = e.trigger, i = e.scrollContainers, a = i[0];
+ if (!t) throw Error(ps("layer"));
+ if (!o && !f) throw Error(ps("trigger"));
+ var s = {
+ top: 0,
+ left: 0
+ };
+ if (a) {
+ var l = a.scrollLeft;
+ s = {
+ top: a.scrollTop,
+ left: l
+ };
+ } else {
+ var c = r.scrollX;
+ s = {
+ top: r.scrollY,
+ left: c
+ };
+ }
+ var u = {
+ left: 0,
+ top: 0
+ };
+ if (a) {
+ var p = r.getComputedStyle(a), g = p.borderLeftWidth, m = p.borderTopWidth;
+ u = {
+ left: ls(g) || 0,
+ top: ls(m) || 0
+ };
+ }
+ n({
+ layer: t,
+ trigger: o,
+ scrollContainers: i,
+ arrow: d.current
+ }, s, u);
+ }), [
+ h,
+ n,
+ r,
+ d,
+ f
+ ]), x = (0, s.useCallback)((function() {
+ var e = h(), t = e.trigger, n = e.layer, o = e.scrollContainers;
+ if (!n) throw Error(ps("layer"));
+ if (!t && !f) throw Error(ps("trigger"));
+ if (l) {
+ for (var i = !1, a = new l((function() {
+ i ? w() : i = !0;
+ })), s = 0, c = [
+ t,
+ n,
+ document.body
+ ]; s < c.length; s++) {
+ var u = c[s];
+ u && a.observe(u);
+ }
+ y((function() {
+ for (var e = 0, r = [
+ t,
+ n,
+ document.body
+ ]; e < r.length; e++) {
+ var o = r[e];
+ o && a.unobserve(o);
+ }
+ a.disconnect();
+ }));
+ }
+ for (var d, p = function() {
+ var e = d.value;
+ e.addEventListener("scroll", w), y((function() {
+ return e.removeEventListener("scroll", w);
+ }));
+ }, g = is([r].concat(o)); !(d = g()).done;) p();
+ }), [
+ h,
+ y,
+ w,
+ r,
+ l,
+ f
+ ]), E = (0, s.useCallback)((function(e, n) {
+ t && e && e !== n && (b(), x(), w());
+ }), [
+ b,
+ x,
+ w,
+ t
+ ]), S = as((0, s.useCallback)((function(e) {
+ var t = h().layer;
+ g((function(t) {
+ return ns({}, t, { layer: e });
+ })), E(t, e);
+ }), [
+ h,
+ g,
+ E
+ ])), C = (0, s.useCallback)((function(e) {
+ var t = fs(e, r), n = t[0];
+ if (n) {
+ var o = r.getComputedStyle(n).position;
+ [
+ "relative",
+ "absolute",
+ "fixed"
+ ].includes(o) || i || (n.style.position = "relative");
+ }
+ return t;
+ }), [r, i]), k = as((0, s.useCallback)((function(e) {
+ var t = C(e), n = h().trigger;
+ g((function(n) {
+ return ns({}, n, {
+ trigger: e,
+ scrollContainers: t
+ });
+ })), E(n, e);
+ }), [
+ h,
+ g,
+ E,
+ C
+ ])), _ = a == null || a.getParent == null ? void 0 : a.getParent();
+ return ss((function() {
+ _ && g((function(e) {
+ return ns({}, e, { scrollContainers: C(_) });
+ }));
+ }), [
+ _,
+ g,
+ C
+ ]), ss((function() {
+ return t && (v() || x()), function() {
+ v() && b();
+ };
+ }), [
+ t,
+ v,
+ x,
+ b
+ ]), ss((function() {
+ t && w();
+ })), {
+ triggerRef: k,
+ layerRef: S,
+ arrowRef: d,
+ closestScrollContainer: h().scrollContainers[0] || null
+ };
+}
+var gs = (0, s.createContext)({});
+function ms(e) {
+ var t = e.children, n = e.registrations, r = (0, s.useCallback)((function(e) {
+ return n.current.add(e), function() {
+ return n.current.delete(e);
+ };
+ }), [n]);
+ return (0, s.createElement)(gs.Provider, { value: r }, t);
+}
+var vs = {
+ top: "bottom",
+ left: "right",
+ bottom: "top",
+ right: "left",
+ center: "center"
+}, ys = function() {
+ function e(e, t, n, r, o, i, a, s, l) {
+ this.prop = void 0, this.opposite = void 0, this.isHorizontal = void 0, this.sizeProp = void 0, this.oppositeSizeProp = void 0, this.cssProp = void 0, this.oppositeCssProp = void 0, this.isCenter = void 0, this.isPush = void 0, this.prop = e, this.opposite = t, this.isHorizontal = n, this.sizeProp = r, this.oppositeSizeProp = o, this.cssProp = i, this.oppositeCssProp = a, this.isCenter = s, this.isPush = l;
+ }
+ var t = e.prototype;
+ return t.factor = function(e) {
+ return e * (this.isPush ? 1 : -1);
+ }, t.isOppositeDirection = function(e) {
+ return this.isHorizontal !== e.isHorizontal;
+ }, e;
+}();
+function bs(e, t) {
+ t === void 0 && (t = !0);
+ var n = ["left", "right"].includes(e);
+ return new ys(e, t ? bs(vs[e], !1) : null, n, n ? "width" : "height", n ? "height" : "width", n ? "left" : "top", n ? "top" : "left", e === "center", !["right", "bottom"].includes(e));
+}
+var ws = {
+ top: bs("top"),
+ bottom: bs("bottom"),
+ left: bs("left"),
+ right: bs("right")
+}, xs = ns({}, ws, { center: bs("center") }), Es = [
+ "top",
+ "left",
+ "bottom",
+ "right"
+], Ss = function() {
+ function e(e) {
+ return this.top = void 0, this.left = void 0, this.right = void 0, this.bottom = void 0, Object.assign(this, e);
+ }
+ return e.mergeSmallestSides = function(t) {
+ var n = t[0], r = t.slice(1);
+ if (!n) throw Error("Please provide at least 1 bounds objects in order to merge");
+ for (var o, i = Object.fromEntries(Es.map((function(e) {
+ return [e, n[e]];
+ }))), a = is(r); !(o = a()).done;) for (var s, l = o.value, c = is(Es); !(s = c()).done;) {
+ var u = s.value;
+ i[u] = Math.min(i[u], l[u]);
+ }
+ return new e(i);
+ }, ts(e, [{
+ key: "allSidesArePositive",
+ get: function() {
+ var e = this;
+ return Es.every((function(t) {
+ return e[t] >= 0;
+ }));
+ }
+ }, {
+ key: "negativeSides",
+ get: function() {
+ var e = this;
+ return Object.fromEntries(Es.filter((function(t) {
+ return e[t] < 0;
+ })).map((function(t) {
+ return [t, e[t]];
+ })));
+ }
+ }]), e;
+}();
+function Cs() {
+ return [...arguments].reduce((function(e, t) {
+ return e + (t ? ls(t) : 0);
+ }), 0);
+}
+function ks(e) {
+ return {
+ top: e.top,
+ left: e.left,
+ right: e.right,
+ bottom: e.bottom,
+ width: e.width,
+ height: e.height
+ };
+}
+var _s = {
+ top: 0,
+ left: 0,
+ right: 0,
+ bottom: 0,
+ width: 0,
+ height: 0
+}, Ts = function() {
+ function e(e) {
+ return e === void 0 && (e = {}), this.top = void 0, this.left = void 0, this.right = void 0, this.bottom = void 0, this.width = void 0, this.height = void 0, Object.assign(this, _s, e);
+ }
+ e.create = function(t) {
+ return new e(t);
+ }, e.fromElement = function(t, n) {
+ n === void 0 && (n = {});
+ var r = n, o = r.withTransform, i = o === void 0 || o, a = r.environment, s = a === void 0 ? window : a, l = r.withScrollbars, c = l === void 0 || l, u = new e(ks(t.getBoundingClientRect()));
+ if (!i) {
+ var d = s.getComputedStyle(t), f = d.width, p = d.height, h = d.boxSizing, g = d.borderLeft, m = d.borderRight, v = d.borderTop, y = d.borderBottom, b = d.paddingLeft, w = d.paddingRight, x = d.paddingTop, E = d.paddingBottom;
+ u = new e(ns({}, u, {
+ width: h === "border-box" ? ls(f) : Cs(f, g, m, b, w),
+ height: h === "border-box" ? ls(p) : Cs(p, v, y, x, E)
+ }));
+ }
+ if (!c) {
+ var S = u.width - t.clientWidth, C = u.height - t.clientHeight;
+ return u.substract({
+ right: S,
+ bottom: C
+ });
+ }
+ return u;
+ }, e.empty = function() {
+ return new e();
+ }, e.fromWindow = function(t) {
+ var o = t?.document.scrollingElement ?? t?.document.documentElement ?? {}, i = o.clientWidth, a = i === void 0 ? 0 : i, s = o.clientHeight, l = s === void 0 ? 0 : s;
+ return new e({
+ width: a,
+ height: l,
+ right: a,
+ bottom: l
+ });
+ };
+ var t = e.prototype;
+ return t.toObject = function() {
+ return ks(this);
+ }, t.merge = function(t) {
+ var n = this.toObject();
+ return new e(ns({}, n, typeof t == "function" ? t(n) : t));
+ }, t.substract = function(t) {
+ for (var n = this.toObject(), r = 0, o = Object.entries(t); r < o.length; r++) {
+ var i = o[r], a = i[0], s = i[1];
+ if (a in ws) {
+ var l = ws[a];
+ n[a] += l.factor(s), n[l.isHorizontal ? "width" : "height"] -= s;
+ } else n[a] -= s || 0;
+ }
+ return new e(n);
+ }, t.offsetsTo = function(e) {
+ return new Ss({
+ top: e.top - this.top,
+ bottom: this.bottom - e.bottom,
+ left: e.left - this.left,
+ right: this.right - e.right
+ });
+ }, t.mapSides = function(t) {
+ for (var n = this.toObject(), r = 0, o = Object.values(ws); r < o.length; r++) {
+ var i = o[r];
+ n[i.prop] = t(i, n[i.prop]);
+ }
+ return new e(n);
+ }, ts(e, [{
+ key: "surface",
+ get: function() {
+ return this.width * this.height;
+ }
+ }]), e;
+}(), Is = function() {
+ function e(e, t, n, r, o) {
+ this.primary = void 0, this.secondary = void 0, this.offsets = void 0, this.subjectsBounds = void 0, this._cachedLayerBounds = null, this._cachedContainerOffsets = null, this.primary = e, this.secondary = t, this.offsets = o, this.setSubjectsBounds(n, r);
+ }
+ var t = e.prototype;
+ return t.setSubjectsBounds = function(e, t) {
+ if (t) {
+ var n = typeof t == "function" ? t(this.primary.prop) : t;
+ this.subjectsBounds = e.merge({ layer: ns({}, e.layer, n) });
+ } else this.subjectsBounds = e;
+ }, t.getLayerBounds = function(e) {
+ if (e === void 0 && (e = 0), this._cachedLayerBounds && e === 0) return this._cachedLayerBounds;
+ var t = this.primary, n = this.secondary, r = this.subjectsBounds, o = r.trigger, i = r.layer, a = r.arrow, s = t.isHorizontal, l = t.oppositeCssProp, c = t.oppositeSizeProp, u = t.prop, d = t.opposite, f = Ts.empty();
+ f[d.prop] = o[u] - t.factor(this.offsets.trigger), f[u] = f[d.prop] - t.factor(i[t.sizeProp]);
+ var p = 2 * this.offsets.arrow, h = o[l] - (i[c] - a[c]) + p, g = o[l] + (o[c] - a[c]) - p;
+ if (n.isPush || (h += i[c], g += i[c]), n.isCenter) {
+ var m = (s ? ws.top : ws.left).prop, v = (s ? ws.bottom : ws.right).prop;
+ f[m] = cs(o[m] + o[c] / 2 - i[c] / 2 + e, h, g), f[v] = f[m] + i[c];
+ } else {
+ var y = n, b = o[y.prop], w = b < h ? h - b : b > g ? g - b : 0;
+ f[y.prop] = cs(b + e + w, h, g), f[y.opposite.prop] = f[y.prop] + n.factor(i[c]);
+ }
+ f.width = f.right - f.left, f.height = f.bottom - f.top;
+ var x = Ts.create(f);
+ return e === 0 && (this._cachedLayerBounds = x), x;
+ }, t.getLayerCollisionBounds = function() {
+ var e = this.offsets.container;
+ return this.getLayerBounds().mapSides((function(t, n) {
+ return n - t.factor(e);
+ })).merge((function(t) {
+ var n = t.width, r = t.height;
+ return {
+ width: n + 2 * e,
+ height: r + 2 * e
+ };
+ }));
+ }, t.getContainerOffsets = function(e) {
+ if (this._cachedContainerOffsets && !e) return this._cachedContainerOffsets;
+ var t = this.subjectsBounds.merge({ layer: e || this.getLayerCollisionBounds() }), n = Ss.mergeSmallestSides(t.layerOffsetsToScrollContainers);
+ return e || (this._cachedContainerOffsets = n), n;
+ }, ts(e, [
+ {
+ key: "type",
+ get: function() {
+ return this.primary.prop + "-" + (this.secondary.prop === "center" ? "center" : ["bottom", "right"].includes(this.secondary.prop) ? "end" : "start");
+ }
+ },
+ {
+ key: "triggerIsBigger",
+ get: function() {
+ var e = this.secondary.isHorizontal, t = this.subjectsBounds, n = t.triggerHasBiggerWidth, r = t.triggerHasBiggerHeight;
+ return e && n || !e && r;
+ }
+ },
+ {
+ key: "fitsContainer",
+ get: function() {
+ return this.getContainerOffsets().allSidesArePositive;
+ }
+ },
+ {
+ key: "visibleSurface",
+ get: function() {
+ var e = this.getLayerBounds(), t = this.getContainerOffsets(e).negativeSides;
+ for (var n in t) t[n] = -t[n];
+ return e.substract(t).surface;
+ }
+ },
+ {
+ key: "secondaryOffsetSide",
+ get: function() {
+ var n = this, r = this.getContainerOffsets();
+ return (Object.entries(r.negativeSides).map((function(e) {
+ var t = e[0], n = e[1];
+ return [ws[t], n];
+ })).filter((function(e) {
+ var t = e[0];
+ return n.primary.isOppositeDirection(t);
+ })).sort((function(e, t) {
+ var n = e[1];
+ return t[1] - n;
+ }))?.[0] ?? [])[0] || null;
+ }
+ }
+ ]), e;
+}(), Os = function(e) {
+ var t, n;
+ function r() {
+ return e.apply(this, arguments) || this;
+ }
+ return n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, rs(t, n), r.prototype.getLayerBounds = function() {
+ var e = this.subjectsBounds, t = e.trigger, n = e.layer, r = Ts.empty();
+ return r.top = t.top + t.height / 2 - n.height / 2, r.bottom = r.top + n.height, r.left = t.left + t.width / 2 - n.width / 2, r.right = r.left + n.width, r.width = r.right - r.left, r.height = r.bottom - r.top, r;
+ }, r;
+}(Is), js = {
+ position: "absolute",
+ willChange: "top, left",
+ left: null,
+ right: null,
+ top: null,
+ bottom: null
+}, Ps = function() {
+ function e(e, t, n) {
+ this.placements = void 0, this.config = void 0, this.subjectsBounds = void 0, this.placements = e, this.config = t, this.subjectsBounds = n;
+ }
+ e.getSidesFromPlacementType = function(e) {
+ var t = e.split("-"), n = t[0], r = t[1], o = ws[n];
+ return [o, r === "center" ? xs.center : o.isHorizontal ? r === "start" ? xs.top : xs.bottom : r === "start" ? xs.left : xs.right];
+ }, e.create = function(t, n) {
+ var r = {
+ arrow: n.arrowOffset,
+ container: n.containerOffset,
+ trigger: n.triggerOffset
+ };
+ function o(o) {
+ o === void 0 && (o = n.placement);
+ var i = e.getSidesFromPlacementType(o), a = i[0], s = i[1], l = ws[a.isHorizontal ? n.preferY : n.preferX], c = !a.isHorizontal && t.triggerHasBiggerWidth || a.isHorizontal && t.triggerHasBiggerHeight;
+ function u(e, o) {
+ return new Is(e, o, t, n.layerDimensions, r);
+ }
+ var d = [];
+ return d[0] = u(a, s), d[1] = u(a, s.isCenter ? l : xs.center), d[2] = u(a, xs[(s.opposite.isCenter ? l.opposite : s.opposite).prop]), d[3] = u(l, c ? a : xs[a.opposite.prop]), d[4] = u(l, xs.center), d[5] = u(l, c ? xs[a.opposite.prop] : a), d[6] = u(ws[l.opposite.prop], c ? a : xs[a.opposite.prop]), d[7] = u(ws[l.opposite.prop], xs.center), d[8] = u(ws[l.opposite.prop], c ? xs[a.opposite.prop] : a), d[9] = u(ws[a.opposite.prop], s), d[10] = u(ws[a.opposite.prop], s.isCenter ? l : xs.center), d[11] = u(ws[a.opposite.prop], xs[(s.opposite.isCenter ? l.opposite : s.opposite).prop]), d.filter((function(e) {
+ return e.type === n.placement || n.possiblePlacements.includes(e.type);
+ }));
+ }
+ return n.placement === "center" ? new e([new Os(xs.center, xs.center, t, n.layerDimensions, r)].concat(o(n.preferY + "-" + n.preferX)), n, t) : new e(o(), n, t);
+ };
+ var t = e.prototype;
+ return t.filterPlacementsBySide = function(e) {
+ return this.placements.filter((function(t) {
+ return t.primary === e;
+ }));
+ }, t.findFirstPlacementThatFits = function() {
+ return this.placements.find((function(e) {
+ return e.fitsContainer;
+ }));
+ }, t.placementWithBiggestVisibleSurface = function() {
+ return this.placements.map((function(e) {
+ return {
+ placement: e,
+ surface: e.visibleSurface
+ };
+ })).sort((function(e, t) {
+ return t.surface - e.surface;
+ }))[0].placement;
+ }, t.findSuitablePlacement = function() {
+ return this.config.auto ? this.findFirstPlacementThatFits() || this.placementWithBiggestVisibleSurface() : this.placements[0];
+ }, t.getSecondaryOffset = function(e) {
+ var t = this.config, n = t.auto, r = t.snap;
+ if (!n || r || e instanceof Os) return 0;
+ var o = this.filterPlacementsBySide(e.primary);
+ if (o.indexOf(e) === 0 && e.fitsContainer) return 0;
+ var i = o.find((function(e) {
+ return !e.fitsContainer;
+ }));
+ if (!i) return 0;
+ var a = i.secondaryOffsetSide;
+ if (!a) return 0;
+ var s, l = e.getContainerOffsets(), c = e.secondary;
+ return s = e.triggerIsBigger || i === e ? a.isPush ? -1 : 1 : c === xs.left || [xs.top, xs.center].includes(c) && a.isPush ? -1 : 1, l[a.prop] * s;
+ }, t.getStyles = function(e, t, n, r) {
+ var o = { willChange: "top, left, width, height" };
+ return {
+ arrow: function(e, t, n) {
+ var r;
+ if (t.primary.isCenter) return js;
+ var o = e.layer, i = e.trigger, a = e.arrow, s = t.primary.oppositeSizeProp, l = i[s] > o[s], c = n + a[s] / 2, u = o[s] - a[s] / 2 - n, d = function(e, t, n) {
+ var r = e.layer, o = e.trigger, i = e.arrow, a = t.primary.oppositeSizeProp, s = t.primary.isHorizontal ? ["top", "bottom"] : ["left", "right"], l = s[0], c = s[1], u = r[l] + r[a] / 2 - o[l] - i[a] / 2 - n, d = r[c] - r[a] / 2 - o[c] + i[a] / 2 + n;
+ return (u < 0 ? -u : 0) + (d > 0 ? -d : 0);
+ }(e, t, n), f = t.primary.prop, p = t.primary.oppositeCssProp, h = l ? o[s] / 2 + d : i[p] + i[s] / 2 - o[p];
+ return ns({}, js, ((r = {})[f] = "100%", r[p] = cs(h, c, u), r));
+ }(this.subjectsBounds.merge({ layer: e }), t, this.config.arrowOffset),
+ layer: this.config.overflowContainer ? ns({}, o, {
+ position: "fixed",
+ top: e.top,
+ left: e.left
+ }) : ns({}, o, {
+ position: "absolute",
+ top: e.top - this.subjectsBounds.parent.top + n.top - r.top,
+ left: e.left - this.subjectsBounds.parent.left + n.left - r.left
+ })
+ };
+ }, t.getHasDisappeared = function(e) {
+ var t = this.config.overflowContainer ? this.subjectsBounds.trigger : e, n = Ss.mergeSmallestSides(this.subjectsBounds.offsetsToScrollContainers(t, !0));
+ return Object.entries(n.negativeSides).some((function(e) {
+ var n = e[0];
+ return e[1] <= -t[ws[n].sizeProp];
+ })) ? "full" : n.allSidesArePositive ? null : "partial";
+ }, t.result = function(e, t) {
+ var n = this.findSuitablePlacement(), r = this.getSecondaryOffset(n), o = n.getLayerBounds(r);
+ return {
+ styles: this.getStyles(o, n, e, t),
+ layerSide: n.primary.prop,
+ placement: n,
+ layerBounds: o,
+ hasDisappeared: this.getHasDisappeared(o)
+ };
+ }, e;
+}(), As = function() {
+ function e(e, t) {
+ this.overflowContainer = void 0, this.trigger = void 0, this.layer = void 0, this.arrow = void 0, this.parent = void 0, this.window = void 0, this.scrollContainers = void 0, this.overflowContainer = t, Object.assign(this, e);
+ }
+ e.create = function(t, n, r, o, i, a, s, l) {
+ var c = Ts.fromWindow(t);
+ return new e({
+ layer: Ts.fromElement(n, {
+ environment: t,
+ withTransform: !1
+ }),
+ trigger: l ? Ts.create(ks(l())) : Ts.fromElement(r),
+ arrow: i ? Ts.fromElement(i) : Ts.empty(),
+ parent: o ? Ts.fromElement(o) : c,
+ window: c,
+ scrollContainers: [c].concat(a.map((function(e) {
+ return Ts.fromElement(e, { withScrollbars: !1 });
+ })))
+ }, s);
+ };
+ var t = e.prototype;
+ return t.merge = function(t) {
+ return new e(ns({}, this, t), this.overflowContainer);
+ }, t.offsetsToScrollContainers = function(e, t) {
+ return t === void 0 && (t = !1), (this.overflowContainer && !t ? [this.window] : this.scrollContainers).map((function(t) {
+ return t.offsetsTo(e);
+ }));
+ }, ts(e, [
+ {
+ key: "layerOffsetsToScrollContainers",
+ get: function() {
+ return this.offsetsToScrollContainers(this.layer);
+ }
+ },
+ {
+ key: "triggerHasBiggerWidth",
+ get: function() {
+ return this.trigger.width > this.layer.width;
+ }
+ },
+ {
+ key: "triggerHasBiggerHeight",
+ get: function() {
+ return this.trigger.height > this.layer.height;
+ }
+ }
+ ]), e;
+}(), Ns = null, Ms = {
+ auto: !1,
+ arrowOffset: 0,
+ containerOffset: 10,
+ triggerOffset: 0,
+ overflowContainer: !0,
+ placement: "top-center",
+ possiblePlacements: [
+ "bottom-start",
+ "bottom-end",
+ "bottom-center",
+ "top-start",
+ "top-center",
+ "top-end",
+ "left-end",
+ "left-center",
+ "left-start",
+ "right-end",
+ "right-center",
+ "right-start",
+ "center"
+ ],
+ preferX: "right",
+ preferY: "bottom",
+ snap: !1,
+ container: void 0,
+ trigger: void 0
+};
+function Ls(e) {
+ var n = e.isOpen, r = n !== void 0 && n, o = e.overflowContainer, i = o === void 0 ? Ms.overflowContainer : o, a = e.environment, l = a === void 0 ? typeof window < "u" ? window : void 0 : a, c = e.ResizeObserver, u = e.placement, d = u === void 0 ? Ms.placement : u, f = e.possiblePlacements, p = f === void 0 ? Ms.possiblePlacements : f, h = e.preferX, g = h === void 0 ? Ms.preferX : h, m = e.preferY, v = m === void 0 ? Ms.preferY : m, y = e.auto, b = y === void 0 ? Ms.auto : y, w = e.snap, x = w === void 0 ? Ms.snap : w, E = e.triggerOffset, S = E === void 0 ? Ms.triggerOffset : E, C = e.containerOffset, k = C === void 0 ? Ms.containerOffset : C, _ = e.arrowOffset, T = _ === void 0 ? Ms.arrowOffset : _, I = e.container, O = I === void 0 ? Ms.container : I, j = e.layerDimensions, P = j === void 0 ? null : j, A = e.onDisappear, N = e.onOutsideClick, M = e.onParentClose, L = e.trigger, D = (0, s.useState)((function() {
+ return {
+ layerSide: d === "center" ? "center" : Ps.getSidesFromPlacementType(d)[0].prop,
+ styles: {
+ layer: {
+ position: i ? "fixed" : "absolute",
+ top: 0,
+ left: 0
+ },
+ arrow: {
+ position: "absolute",
+ top: 0,
+ left: 0
+ }
+ }
+ };
+ })), R = D[0], z = D[1], $ = (0, s.useRef)(null), B = function(e, t) {
+ var n = (0, s.useRef)(e);
+ return t ? (n.current = e, n) : (n.current = null, n);
+ }(R, r), F = (0, s.useRef)({ cancelled: !1 });
+ (0, s.useEffect)((function() {
+ return function() {
+ F.current.cancelled = !0;
+ };
+ }), []);
+ var H = hs({
+ ResizeObserverPolyfill: c,
+ environment: l,
+ enabled: r,
+ overflowContainer: i,
+ onChange: (0, s.useCallback)((function(e, t, n) {
+ var r = e.arrow, o = e.layer, a = e.scrollContainers, s = e.trigger, c = a[0], u = As.create(l, o, s, c, r, a, i, L?.getBounds), f = {
+ placement: d,
+ possiblePlacements: p,
+ auto: b,
+ layerDimensions: P,
+ arrowOffset: T,
+ containerOffset: k,
+ triggerOffset: S,
+ preferX: g,
+ preferY: v,
+ snap: x,
+ overflowContainer: i
+ }, h = Ps.create(u, f).result(t, n), m = h.hasDisappeared, y = {
+ layerSide: h.layerSide,
+ styles: h.styles
+ };
+ if (!B.current || function(e, t) {
+ if (e.layerSide !== t.layerSide) return !0;
+ for (var n = 0, r = [
+ "position",
+ "top",
+ "left",
+ "right",
+ "bottom"
+ ]; n < r.length; n++) {
+ var o = r[n];
+ if (e.styles.layer[o] !== t.styles.layer[o] || e.styles.arrow[o] !== t.styles.arrow[o]) return !0;
+ }
+ return !1;
+ }(B.current, y)) {
+ B.current = y, F.current.cancelled = !0;
+ var w = { cancelled: !1 };
+ F.current = w, Promise.resolve().then((function() {
+ w.cancelled || z(y);
+ }));
+ }
+ us(m) && us(A) && A(m);
+ }), [
+ T,
+ b,
+ k,
+ l,
+ P,
+ A,
+ i,
+ d,
+ p,
+ g,
+ v,
+ x,
+ S,
+ B,
+ L
+ ]),
+ triggerOption: L
+ }), W = H.triggerRef, V = H.layerRef, q = H.arrowRef, G = H.closestScrollContainer, Y = function(e) {
+ var t = e.isOpen, n = e.onOutsideClick, r = e.onParentClose, o = (0, s.useRef)(null), i = (0, s.useRef)(null), a = (0, s.useRef)(/* @__PURE__ */ new Set()), l = (0, s.useContext)(gs), c = (0, s.useCallback)((function(e) {
+ var t = e.target, n = o.current && o.current.contains(t), r = i.current && i.current.contains(t), s = function(e, t) {
+ for (var n, r = is(e); !(n = r()).done;) if (!(0, n.value.shouldCloseWhenClickedOutside)(t)) return !1;
+ return !0;
+ }(a.current, e);
+ return r && s && a.current.forEach((function(e) {
+ return (0, e.closeChild)();
+ })), !n && !r && s;
+ }), [
+ o,
+ i,
+ a
+ ]);
+ return (0, s.useEffect)((function() {
+ if (typeof l == "function") return l({
+ shouldCloseWhenClickedOutside: c,
+ closeChild: function() {
+ r && r();
+ }
+ });
+ }), [
+ l,
+ c,
+ r,
+ a
+ ]), (0, s.useEffect)((function() {
+ if (t && n && typeof l != "function") return document.addEventListener("click", e, !0), function() {
+ return document.removeEventListener("click", e, !0);
+ };
+ function e(e) {
+ c(e) && n();
+ }
+ }), [
+ t,
+ n,
+ c,
+ l
+ ]), (0, s.useEffect)((function() {
+ t || a.current.forEach((function(e) {
+ return (0, e.closeChild)();
+ }));
+ }), [t]), {
+ closeOnOutsideClickRefs: {
+ trigger: o,
+ layer: i
+ },
+ registrations: a
+ };
+ }({
+ isOpen: r,
+ onOutsideClick: N,
+ onParentClose: M
+ }), Z = Y.closeOnOutsideClickRefs, K = Y.registrations;
+ return {
+ triggerProps: L ? {} : { ref: ds(W, Z.trigger, $) },
+ layerProps: {
+ ref: ds(V, Z.layer),
+ style: R.styles.layer
+ },
+ arrowProps: {
+ ref: q,
+ style: R.styles.arrow,
+ layerSide: R.layerSide
+ },
+ layerSide: R.layerSide,
+ triggerBounds: r ? L ? L.getBounds() : $.current?.getBoundingClientRect() : null,
+ renderLayer: function(e) {
+ return typeof document < "u" ? (0, Qa.createPortal)((0, s.createElement)(ms, {
+ registrations: K,
+ children: e
+ }), i || !G ? function(e) {
+ var t;
+ if (typeof e == "function") {
+ if (!((t = e()) && t instanceof HTMLElement)) throw Error("react-laag: You've passed a function to the 'container' prop, but it returned no valid HTMLElement");
+ } else if (e instanceof HTMLElement) t = e;
+ else if (typeof e == "string") {
+ if (!(t = document.getElementById(e))) throw Error("react-laag: You've passed element with id '" + e + "' to the 'container' prop, but it returned no valid HTMLElement");
+ } else {
+ if (Ns instanceof HTMLElement) return Ns;
+ (t = document.getElementById(Rs)) || ((t = document.createElement("div")).id = Rs, t.style.cssText = "\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n ", document.body.appendChild(t));
+ }
+ return t;
+ }(O) : G) : null;
+ }
+ };
+}
+var Ds, Rs = "layers";
+function zs({ className: e, children: t, ...n }) {
+ return (0, Go.jsx)("div", {
+ className: Zi + (e ? ` ${e}` : ""),
+ ...n,
+ children: t
+ });
+}
+function $s({ className: e, children: t, ...n }) {
+ return (0, Go.jsx)("div", {
+ className: Ki + (e ? ` ${e}` : ""),
+ ...n,
+ children: t
+ });
+}
+function Bs({ children: e, direction: t = "row", wrap: n = "nowrap", justifyContent: r = "flex-start", alignItems: o = "stretch", gap: i, ...a }) {
+ return (0, Go.jsx)(Fs, {
+ $direction: t,
+ $wrap: n,
+ $justifyContent: r,
+ $alignItems: o,
+ $gap: i,
+ ...a,
+ children: e
+ });
+}
+(function(e) {
+ e[e.ENTERING = 0] = "ENTERING", e[e.LEAVING = 1] = "LEAVING", e[e.IDLE = 2] = "IDLE";
+})(Ds ||= {});
+const Fs = ao.div.withConfig({
+ displayName: "FlexStyled",
+ componentId: "sc-duap7b-0"
+})([
+ "display:flex;flex-direction:",
+ ";flex-wrap:",
+ ";gap:",
+ ";justify-content:",
+ ";align-items:",
+ ";box-sizing:border-box;width:100%;height:100%;"
+], ((e) => e.$direction), ((e) => e.$wrap), ((e) => e.$gap ? po[`spacing${e.$gap}`] : void 0), ((e) => e.$justifyContent), ((e) => e.$alignItems)), Us = {
+ primaryBorderHover: po.brandPrimary600,
+ primaryBorderActive: po.brandPrimary700,
+ primaryBorderFocus: po.brandPrimary500,
+ primaryBorderDisabled: "transparent",
+ primaryColor: po.white,
+ primaryColorHover: po.white,
+ primaryColorActive: po.white,
+ primaryColorFocus: po.white,
+ primaryFill: po.brandPrimary500,
+ primaryFillHover: po.brandPrimary600,
+ primaryFillActive: po.brandPrimary700,
+ primaryFillFocus: po.brandPrimary500,
+ secondaryColor: po.gray800,
+ secondaryColorDisabled: po.gray400,
+ cleanBorderActive: "transparent",
+ cleanFill: "transparent",
+ cleanFillHover: po.gray25a,
+ cleanFillActive: po.gray50a,
+ cleanFillFocus: po.gray25a,
+ cleanFillDisabled: "transparent",
+ dangerBorderHover: po.red600,
+ dangerBorderActive: po.red700,
+ dangerBorderFocus: po.red500,
+ dangerBorderDisabled: "transparent",
+ dangerColor: po.white,
+ dangerFill: po.red500,
+ dangerFillHover: po.red600,
+ dangerFillActive: po.red700,
+ dangerFillFocus: po.red500,
+ dangerFillDisabled: po.red500a50
+}, { internalTokens: Hs, declareTokens: Ws } = ea({
+ lightTheme: {
+ "button-primary-fill-disabled": po.brandPrimary300,
+ "button-primary-color-disabled": po.white,
+ "button-primary-focus-ring": `0 0 0 3px rgb(${po["brandPrimary500-rgb"]} / 30%)`,
+ "button-secondary-fill": po.gray25,
+ "button-secondary-border": po.gray100,
+ "button-secondary-fill-hover": po.gray50,
+ "button-secondary-border-hover": po.gray200,
+ "button-secondary-shadow-hover": po.elevation1,
+ "button-secondary-fill-active": po.gray75,
+ "button-secondary-border-active": po.gray300,
+ "button-secondary-fill-focus": po.gray25,
+ "button-secondary-border-focus": po.gray300,
+ "button-secondary-fill-disabled": po.gray25,
+ "button-secondary-border-disabled": po.gray50,
+ "button-secondary-focus-ring": `0 0 0 3px ${po.gray50}`,
+ "button-clean-color": po.gray600,
+ "button-clean-color-hover": po.gray900,
+ "button-clean-color-active": po.gray900,
+ "button-clean-color-focus": po.gray900,
+ "button-clean-border-focus": po.gray200,
+ "button-clean-color-disabled": po.gray300,
+ "button-clean-focus-ring": `0 0 0 3px ${po.gray50}`,
+ "button-danger-focus-ring": `0 0 0 3px rgb(${po["red500-rgb"]} / 30%)`
+ },
+ darkTheme: {
+ "button-primary-fill-disabled": `rgb(${po["brandPrimary500-rgb"]} / 50%)`,
+ "button-primary-color-disabled": po.gray500a,
+ "button-primary-focus-ring": `0 0 0 1px ${po.gray10}, 0 0 0 3px ${po.brandPrimary500}`,
+ "button-secondary-fill": po.gray25a,
+ "button-secondary-border": po.gray100a,
+ "button-secondary-fill-hover": po.gray50a,
+ "button-secondary-border-hover": po.gray200a,
+ "button-secondary-shadow-hover": "none",
+ "button-secondary-fill-active": po.gray25a,
+ "button-secondary-border-active": po.gray100a,
+ "button-secondary-fill-focus": po.gray25a,
+ "button-secondary-border-focus": po.gray200a,
+ "button-secondary-fill-disabled": po.gray25a,
+ "button-secondary-border-disabled": po.gray50a,
+ "button-secondary-focus-ring": `0 0 0 1px ${po.gray10}, 0 0 0 3px ${po.gray200a}`,
+ "button-clean-color": po.gray600a,
+ "button-clean-color-hover": po.gray1000,
+ "button-clean-color-active": po.gray1000,
+ "button-clean-color-focus": po.gray1000,
+ "button-clean-color-disabled": po.gray400a,
+ "button-clean-border-focus": "transparent",
+ "button-clean-focus-ring": `0 0 0 1px ${po.gray10}, 0 0 0 3px ${po.gray200a}`,
+ "button-danger-focus-ring": `0 0 0 1px ${po.gray10}, 0 0 0 3px ${po.red500}`
+ }
+}), Vs = ao.button.withConfig({
+ displayName: "ButtonStyled",
+ componentId: "sc-1gq6l63-0"
+})([
+ "",
+ " vertical-align:middle;justify-content:center;align-items:center !important;box-sizing:border-box !important;border:1px solid transparent !important;border-radius:",
+ ";outline:none !important;font-weight:400 !important;font-style:normal;font-size:",
+ " !important;font-family:",
+ " !important;line-height:",
+ " !important;text-transform:none !important;text-shadow:none !important;cursor:pointer !important;transition-duration:0.1s;transition-property:background-color,border-color,box-shadow,color;button&,a&{position:relative;display:flex;flex:0 0 auto;flex-wrap:nowrap;min-width:40px;background-position:center;text-align:center;text-decoration:none;white-space:nowrap;fill:currentcolor;&:focus{display:flex;}}&:disabled{cursor:default !important;pointer-events:none;}",
+ " ",
+ ";",
+ ""
+], Ws, po.brandRadiusBase, po.fontSizeBase, po.brandFontStackBase, po.lineHeightBase, ((e) => e.$isFullWidth && "width: 100%;"), ((e) => e.$isSmall ? ro([
+ "height:32px !important;padding:0 ",
+ " !important;font-size:",
+ " !important;line-height:20px !important;"
+], po.spacing4, po.fontSize75) : ro(["height:40px !important;padding:0 ", " !important;"], po.spacing5)), ((e) => {
+ if (e.$variant === "primary") {
+ let t = ro([
+ "border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:none !important;"
+ ], Us.primaryBorderActive, Us.primaryFillActive, Us.primaryColorActive);
+ return ro([
+ "border-color:transparent;background-color:",
+ ";color:",
+ ";",
+ " &:hover{border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:",
+ " !important;}&:focus{border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:",
+ " !important;}&:active{",
+ "}&:disabled{border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:none !important;}"
+ ], Us.primaryFill, Us.primaryColor, e.$isPressed && t, Us.primaryBorderHover, Us.primaryFillHover, Us.primaryColorHover, po.elevation1, Us.primaryBorderFocus, Us.primaryFillFocus, Us.primaryColorFocus, Hs["button-primary-focus-ring"], t, Us.primaryBorderDisabled, Hs["button-primary-fill-disabled"], Hs["button-primary-color-disabled"]);
+ }
+ if (e.$variant === "secondary") {
+ let t = ro([
+ "border-color:",
+ " !important;background-color:",
+ " !important;color:",
+ " !important;box-shadow:none !important;"
+ ], Hs["button-secondary-border-active"], Hs["button-secondary-fill-active"], Us.secondaryColor);
+ return ro([
+ "border-color:",
+ " !important;background-color:",
+ " !important;color:",
+ " !important;",
+ " &:hover{border-color:",
+ " !important;background-color:",
+ " !important;color:",
+ " !important;box-shadow:",
+ " !important;}&:focus{border-color:",
+ " !important;background-color:",
+ " !important;color:",
+ " !important;box-shadow:",
+ " !important;}&:active{",
+ "}&:disabled{border-color:",
+ " !important;background-color:",
+ " !important;color:",
+ " !important;box-shadow:none !important;}"
+ ], Hs["button-secondary-border"], Hs["button-secondary-fill"], Us.secondaryColor, e.$isPressed && t, Hs["button-secondary-border-hover"], Hs["button-secondary-fill-hover"], Us.secondaryColor, po.elevation1, Hs["button-secondary-border-focus"], Hs["button-secondary-fill-focus"], Us.secondaryColor, Hs["button-secondary-focus-ring"], t, Hs["button-secondary-border-disabled"], Hs["button-secondary-fill-disabled"], Us.secondaryColorDisabled);
+ }
+ if (e.$variant === "clean") {
+ let t = ro([
+ "border-color:",
+ " !important;background-color:",
+ " !important;color:",
+ " !important;box-shadow:none !important;"
+ ], Us.cleanBorderActive, Us.cleanFillActive, Hs["button-clean-color-active"]);
+ return ro([
+ "background-color:",
+ " !important;color:",
+ ";",
+ " &:hover{background-color:",
+ " !important;color:",
+ " !important;box-shadow:none !important;}&:focus{border-color:",
+ " !important;color:",
+ " !important;box-shadow:",
+ " !important;}&:active{",
+ "}&&&:disabled{background-color:",
+ " !important;color:",
+ " !important;}"
+ ], Us.cleanFill, Hs["button-clean-color"], e.$isPressed && t, Us.cleanFillHover, Hs["button-clean-color-hover"], Hs["button-clean-border-focus"], Hs["button-clean-color-focus"], Hs["button-clean-focus-ring"], t, Us.cleanFillDisabled, Hs["button-clean-color-disabled"]);
+ }
+ if (e.$variant === "danger") {
+ let t = ro([
+ "border-color:",
+ " !important;background-color:",
+ " !important;color:",
+ " !important;box-shadow:none !important;"
+ ], Us.dangerBorderActive, Us.dangerFillActive, Us.dangerColor);
+ return ro([
+ "border-color:transparent;background-color:",
+ " !important;color:",
+ " !important;box-shadow:",
+ " !important;",
+ " &:hover{border-color:",
+ " !important;background-color:",
+ " !important;color:",
+ " !important;box-shadow:",
+ " !important;}&:focus{border-color:",
+ " !important;color:",
+ " !important;box-shadow:",
+ " !important;}&:active{",
+ "}&&&:disabled{border-color:",
+ " !important;background-color:",
+ " !important;color:",
+ " !important;box-shadow:none !important;}"
+ ], Us.dangerFill, Us.dangerColor, po.elevation1, e.$isPressed && t, Us.dangerBorderHover, Us.dangerFillHover, Us.dangerColor, po.elevation2, Us.dangerBorderFocus, Us.dangerColor, Hs["button-danger-focus-ring"], t, Us.dangerBorderDisabled, Us.dangerFillDisabled, Us.dangerColor);
+ }
+ return "";
+})), qs = ao.button.withConfig({
+ displayName: "ButtonStyled",
+ componentId: "sc-1s5p5ok-0"
+})([
+ "",
+ " display:inline-flex;vertical-align:middle;flex-wrap:nowrap;justify-content:center;align-items:center;box-sizing:border-box;min-width:40px;border:1px solid transparent;border-radius:",
+ ";background-color:transparent;outline:none;font-weight:400;font-style:normal;font-size:",
+ ";font-family:",
+ ";line-height:",
+ ";letter-spacing:normal;text-align:center;text-decoration:none;white-space:nowrap;cursor:pointer;fill:currentcolor;transition-duration:0.1s;transition-property:background-color,border-color,box-shadow,color;&:disabled{cursor:default;}",
+ " ",
+ ";",
+ ""
+], Ws, po.brandRadiusBase, po.fontSizeBase, po.brandFontStackBase, po.lineHeightBase, ((e) => e.$isFullWidth && "width: 100%;"), ((e) => e.$isSmall ? ro([
+ "height:32px;padding:0 ",
+ ";font-size:",
+ ";line-height:20px;"
+], po.spacing4, po.fontSize75) : ro(["height:40px;padding:0 ", ";"], po.spacing5)), ((e) => {
+ if (e.$variant === "primary") {
+ let t = ro([
+ "border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:none;"
+ ], Us.primaryBorderActive, Us.primaryFillActive, Us.primaryColorActive);
+ return ro([
+ "border-color:transparent;background-color:",
+ ";color:",
+ ";",
+ " &&:hover{border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:",
+ ";}&&:active{",
+ "}",
+ " &&:disabled{border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:none;}"
+ ], Us.primaryFill, Us.primaryColor, e.$isPressed && t, Us.primaryBorderHover, Us.primaryFillHover, Us.primaryColorHover, po.elevation1, t, e.$isFocusVisible && ro([
+ "background-color:",
+ ";color:",
+ ";&&,&&:hover{border-color:",
+ ";box-shadow:",
+ ";}"
+ ], Us.primaryFillFocus, Us.primaryColorFocus, Us.primaryBorderFocus, Hs["button-primary-focus-ring"]), Us.primaryBorderDisabled, Hs["button-primary-fill-disabled"], Hs["button-primary-color-disabled"]);
+ }
+ if (e.$variant === "secondary") {
+ let t = ro([
+ "border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:none;"
+ ], Hs["button-secondary-border-active"], Hs["button-secondary-fill-active"], Us.secondaryColor);
+ return ro([
+ "border-color:",
+ ";background-color:",
+ ";color:",
+ ";",
+ " &&:hover{border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:",
+ ";}&&:active{",
+ "}",
+ " &&:disabled{border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:none;}"
+ ], Hs["button-secondary-border"], Hs["button-secondary-fill"], Us.secondaryColor, e.$isPressed && t, Hs["button-secondary-border-hover"], Hs["button-secondary-fill-hover"], Us.secondaryColor, po.elevation1, t, e.$isFocusVisible && ro([
+ "background-color:",
+ ";color:",
+ ";&&,&&:hover{border-color:",
+ ";box-shadow:",
+ ";}"
+ ], Hs["button-secondary-fill-focus"], Us.secondaryColor, Hs["button-secondary-border-focus"], Hs["button-secondary-focus-ring"]), Hs["button-secondary-border-disabled"], Hs["button-secondary-fill-disabled"], Us.secondaryColorDisabled);
+ }
+ if (e.$variant === "clean") {
+ let t = ro([
+ "border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:none;"
+ ], Us.cleanBorderActive, Us.cleanFillActive, Hs["button-clean-color-active"]);
+ return ro([
+ "background-color:",
+ ";color:",
+ ";",
+ " &&:hover{background-color:",
+ ";color:",
+ ";box-shadow:none;}&&:active{",
+ "}",
+ " &&:disabled{background-color:",
+ ";color:",
+ ";}"
+ ], Us.cleanFill, Hs["button-clean-color"], e.$isPressed && t, Us.cleanFillHover, Hs["button-clean-color-hover"], t, e.$isFocusVisible && ro([
+ "color:",
+ ";&&,&&:hover{border-color:",
+ ";box-shadow:",
+ ";}"
+ ], Hs["button-clean-color-focus"], Hs["button-clean-border-focus"], Hs["button-clean-focus-ring"]), Us.cleanFillDisabled, Hs["button-clean-color-disabled"]);
+ }
+ if (e.$variant === "danger") {
+ let t = ro([
+ "border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:none;"
+ ], Us.dangerBorderActive, Us.dangerFillActive, Us.dangerColor);
+ return ro([
+ "border-color:transparent;background-color:",
+ ";color:",
+ ";box-shadow:",
+ ";",
+ " &&:hover{border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:",
+ ";}&&:active{",
+ "}",
+ " &&:disabled{border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:none;}"
+ ], Us.dangerFill, Us.dangerColor, po.elevation1, e.$isPressed && t, Us.dangerBorderHover, Us.dangerFillHover, Us.dangerColor, po.elevation2, t, e.$isFocusVisible && ro([
+ "background-color:",
+ ";color:",
+ ";box-shadow:none;&&,&&:hover{border-color:",
+ ";box-shadow:",
+ ";}"
+ ], Us.dangerFillFocus, Us.dangerColor, Us.dangerBorderFocus, Hs["button-danger-focus-ring"]), Us.dangerBorderDisabled, Us.dangerFillDisabled, Us.dangerColor);
+ }
+ return "";
+})), Gs = ao.div.withConfig({
+ displayName: "Icon",
+ componentId: "sc-1s5p5ok-1"
+})(["display:flex;align-items:center;height:100%;"]), Ys = ao(Gs).withConfig({
+ displayName: "LeftIcon",
+ componentId: "sc-1s5p5ok-2"
+})([
+ "margin-right:",
+ ";margin-left:calc(",
+ " * -1);"
+], ((e) => e.$lastChild ? `calc(${po.spacing2} * -1) ` : po.spacing3), po.spacing2), Zs = ao(Gs).withConfig({
+ displayName: "RightIcon",
+ componentId: "sc-1s5p5ok-3"
+})([
+ "margin-right:calc(",
+ " * -1);margin-left:",
+ ";"
+], po.spacing2, po.spacing3);
+function Ks(e) {
+ return (0, Go.jsx)(Qs, {
+ viewBox: "0 0 24 24",
+ "aria-hidden": "true",
+ ...e,
+ children: (0, Go.jsx)(el, {
+ cx: "12",
+ cy: "12",
+ r: "8",
+ fill: "none",
+ strokeWidth: "3"
+ })
+ });
+}
+const Xs = co`
+ 100% {
+ transform: rotate(360deg);
+ }
+`, Js = co`
+ 0% {
+ stroke-dasharray: 1, 100;
+ stroke-dashoffset: 0;
+ }
+
+ 50% {
+ stroke-dasharray: 80, 100;
+ stroke-dashoffset: -20;
+ }
+
+ 100% {
+ stroke-dasharray: 80, 100;
+ stroke-dashoffset: -48;
+ }
+`, Qs = ao.svg.withConfig({
+ displayName: "Svg",
+ componentId: "sc-5lftme-0"
+})(["width:24px;height:24px;animation:", " 1s linear infinite;"], Xs), el = ao.circle.withConfig({
+ displayName: "Circle",
+ componentId: "sc-5lftme-1"
+})(["stroke:currentcolor;animation:", " 1.5s ease-in-out infinite;stroke-linecap:round;"], Js), tl = (0, s.forwardRef)((({ children: e, className: t = "", rightIcon: n, type: r = "button", "aria-label": o, isFullWidth: i = !1, icon: a, variant: s = "secondary", isSmall: l = !1, isDisabled: c = !1, isPressed: u = !1, isLoading: d = !1, ...f }, p) => {
+ let h = function({ variant: e, isSmall: t, icon: n, isDisabled: r, className: o = "" }) {
+ return [
+ o,
+ "action-btn",
+ e === "secondary" || e === "clean" ? "cancel gray" : "cta-main blue",
+ t ? "button-small" : "",
+ n ? "button-icon" : "",
+ r ? "disabled" : ""
+ ].join(" ");
+ }({
+ className: t,
+ variant: s,
+ isSmall: l,
+ icon: a,
+ isDisabled: c
+ });
+ return (0, Go.jsx)(Vs, {
+ "aria-label": o || f.title,
+ className: h,
+ disabled: c || d,
+ type: r,
+ $variant: s,
+ $isPressed: u,
+ $isSmall: l,
+ $isFullWidth: i,
+ as: f.href ? "a" : "button",
+ ref: p,
+ ...f,
+ children: d ? (0, Go.jsxs)(Go.Fragment, { children: [(0, Go.jsx)(Ys, {
+ $lastChild: !e,
+ children: (0, Go.jsx)(Ks, {})
+ }), e] }) : (0, Go.jsxs)(Go.Fragment, { children: [
+ a && (0, Go.jsx)(Ys, {
+ $lastChild: !e,
+ children: a
+ }),
+ e,
+ n && (0, Go.jsx)(Zs, { children: n })
+ ] })
+ });
+})), nl = (0, s.createContext)("modern"), rl = (0, s.forwardRef)((({ children: e, variant: t = "secondary", isSmall: n = !1, icon: r, rightIcon: o, isDisabled: i = !1, isLoading: a = !1, type: s = "button", isPressed: l = !1, isFullWidth: c = !1, ...u }, d) => {
+ let { isFocusVisible: f, focusProps: p } = Ja();
+ return (0, Go.jsx)(qs, {
+ $variant: t,
+ $isSmall: n,
+ $isPressed: l,
+ $isFullWidth: c,
+ disabled: a || i,
+ type: s,
+ as: u.href ? "a" : "button",
+ $isFocusVisible: f,
+ ref: d,
+ ...p,
+ ...u,
+ children: a ? (0, Go.jsxs)(Go.Fragment, { children: [(0, Go.jsx)(Ys, {
+ "data-testid": "ds-button-loading-icon",
+ $lastChild: !e,
+ children: (0, Go.jsx)(Ks, {})
+ }), e] }) : (0, Go.jsxs)(Go.Fragment, { children: [
+ r && (0, Go.jsx)(Ys, {
+ $lastChild: !e,
+ children: r
+ }),
+ e,
+ o && (0, Go.jsx)(Zs, { children: o })
+ ] })
+ });
+})), ol = (0, s.forwardRef)(((e, t) => ((0, s.useContext)(nl) || "modern") === "legacy" ? (0, Go.jsx)(tl, {
+ ref: t,
+ ...e
+}) : (0, Go.jsx)(rl, {
+ ref: t,
+ ...e
+}))), il = Object.assign(ol, { VersionProvider: nl.Provider }), al = (e, t, n) => {
+ let r = e[t];
+ return r ? typeof r == "function" ? r() : Promise.resolve(r) : new Promise(((e, r) => {
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(r.bind(null, /* @__PURE__ */ Error("Unknown variable dynamic import: " + t + (t.split("/").length === n ? "" : ". Note that variables only represent file names one level deep."))));
+ }));
+};
+var sl, ll = o(4772), cl = class {
+ constructor(e) {
+ this.input = e, this.index = 0, this.done = !1, this.value = "", this.value = this.input.charAt(0);
+ }
+ next() {
+ return ++this.index >= this.input.length && (this.done = !0), this.value = this.input.charAt(this.index);
+ }
+ croak() {
+ throw Error(`[${this.input}]. Unexpected character "${this.value}" on position ${this.index}.`);
+ }
+};
+(function(e) {
+ e[e.Plural = 0] = "Plural", e[e.Select = 1] = "Select", e[e.Text = 2] = "Text", e[e.Variable = 3] = "Variable";
+})(sl ||= {});
+const pl = [
+ "{",
+ "}",
+ ","
+];
+var hl = class {
+ constructor(e) {
+ this.input = new cl(e);
+ }
+ next() {
+ return this.input.value === "{" ? this.readVariable() : this.readText();
+ }
+ skip(e) {
+ e !== this.input.value && this.input.croak(), this.input.next();
+ }
+ readWhile(e) {
+ let t = "";
+ for (; !this.input.done && e(this.input.value);) t += this.input.value, this.input.next();
+ return t;
+ }
+ readVariable() {
+ this.skip("{");
+ let e = this.readWhile(((e) => !function(e) {
+ return pl.includes(e);
+ }(e))).trim();
+ if (e.length === 0 && this.input.croak(), this.input.value === "}") return this.skip("}"), {
+ type: sl.Variable,
+ value: e
+ };
+ this.skip(",");
+ let t = this.readVariableType();
+ return {
+ options: this.readVariableOptions(),
+ type: t,
+ value: e
+ };
+ }
+ readText() {
+ return {
+ type: sl.Text,
+ value: this.readWhile(((e) => e !== "{" && e !== "}"))
+ };
+ }
+ readVariableType() {
+ let e = this.readWhile(((e) => e !== ",")).trim();
+ return e === "plural" ? sl.Plural : e === "select" ? sl.Select : void this.input.croak();
+ }
+ readVariableOptions() {
+ this.skip(",");
+ let e = {};
+ for (; this.input.value !== "}";) e[this.readText().value.trim()] = this.readExpression();
+ return this.skip("}"), e;
+ }
+ readExpression() {
+ let e = [];
+ for (this.skip("{"); this.input.value !== "}";) e.push(this.next());
+ return this.skip("}"), e;
+ }
+};
+const gl = /* @__PURE__ */ "campaigns.Campaigns.Campaign.campaign.Collection.collections.collection.Collections.limitedUsage.LIMITED.jobs.Jobs.job.Job.Guidelines.WorkflowCalendar.AssetBank.Brandstore.Reporter.Brand.brands.categories.Brands.brand.Asset.Subbrand.subbrands.Assets.assets.asset.subbrand.Subbrands.category.task.Stage.accountable.tasks.stage.Categories.Category.stages.Task.Stages.Tasks.Accountable".split(".");
+var ml = class {
+ constructor(e, t, n) {
+ this.memo = {}, this.onError = console.error, this.translateParts = (e, t) => {
+ let n = this.getTranslationById(e);
+ try {
+ return function({ locale: e, translation: t, values: n, wordReplacements: r }) {
+ let o = new hl(t), i = [];
+ for (; !o.input.done;) a(o.next());
+ return i;
+ function a({ options: t, type: o, value: s }) {
+ if (o === sl.Variable) return gl.includes(s) ? void (r[s] ? i.push(r[s]) : i.push(s)) : void i.push(n[s]);
+ if (!t) return void i.push(s);
+ if (o === sl.Select) return void t[n[s]].map(a);
+ let l = e.replace("_", "-");
+ t[new Intl.PluralRules(l).select(n[s])].map(a);
+ }
+ }({
+ locale: this.locale,
+ translation: n,
+ values: t,
+ wordReplacements: this.wordReplacements
+ });
+ } catch (e) {
+ return this.onError(e), [n];
+ }
+ }, this.translate = (e, t = {}) => this.translateParts(e, t).join(""), this.getTranslationById = (e) => {
+ if (!this.memo[e]) {
+ let t = this.translations[e];
+ typeof t != "string" && (this.onError(/* @__PURE__ */ Error(`Localization: Missing translation with ID "${e}"`)), t = e), this.memo[e] = t;
+ }
+ return this.memo[e];
+ }, this.locale = function(e) {
+ return e || "en_US";
+ }(t), n ? (this.translations = {
+ ...e,
+ ...n.translations
+ }, this.wordReplacements = n.wordReplacements) : (this.translations = { ...e }, this.wordReplacements = {});
+ }
+};
+s.default.createContext(void 0);
+const vl = [
+ "de_DE",
+ "en_US",
+ "es_ES",
+ "es_MX",
+ "fr_FR",
+ "it_IT",
+ "ja_JP",
+ "ko_KR",
+ "nl_NL",
+ "pl_PL",
+ "pt_BR",
+ "ru_RU",
+ "tr_TR",
+ "zh_CN",
+ "zh_TW"
+], yl = s.default.createContext(void 0);
+function bl({ children: e, locale: t = "en_US" }) {
+ let [n, r] = (0, s.useState)(void 0);
+ if ((0, s.useEffect)((() => {
+ vl.includes(t) ? al(Object.assign({
+ "../../i18n/de_DE.json": () => Promise.resolve().then(o.bind(o, 3800)),
+ "../../i18n/en_US.json": () => Promise.resolve().then(o.bind(o, 9017)),
+ "../../i18n/es_ES.json": () => Promise.resolve().then(o.bind(o, 786)),
+ "../../i18n/es_MX.json": () => Promise.resolve().then(o.bind(o, 1961)),
+ "../../i18n/fr_FR.json": () => Promise.resolve().then(o.bind(o, 7942)),
+ "../../i18n/it_IT.json": () => Promise.resolve().then(o.bind(o, 4108)),
+ "../../i18n/ja_JP.json": () => Promise.resolve().then(o.bind(o, 5349)),
+ "../../i18n/ko_KR.json": () => Promise.resolve().then(o.bind(o, 3151)),
+ "../../i18n/nl_NL.json": () => Promise.resolve().then(o.bind(o, 458)),
+ "../../i18n/pl_PL.json": () => Promise.resolve().then(o.bind(o, 9026)),
+ "../../i18n/pt_BR.json": () => Promise.resolve().then(o.bind(o, 5326)),
+ "../../i18n/ru_RU.json": () => Promise.resolve().then(o.bind(o, 7456)),
+ "../../i18n/tr_TR.json": () => Promise.resolve().then(o.bind(o, 9190)),
+ "../../i18n/zh_CN.json": () => Promise.resolve().then(o.bind(o, 8575)),
+ "../../i18n/zh_TW.json": () => Promise.resolve().then(o.bind(o, 9583))
+ }), `../../i18n/${t}.json`, 4).then(((e) => {
+ r(e.default);
+ })) : Promise.resolve().then(o.bind(o, 9017)).then(((e) => {
+ r(e.default);
+ }));
+ }), [t]), !n) return null;
+ let i = new ml(n, t);
+ return (0, Go.jsx)(yl.Provider, {
+ value: i,
+ children: e
+ });
+}
+const wl = 1031, xl = s.default.createContext({ zIndexBase: wl });
+function El({ children: e, noTheme: t, zIndexBase: n = wl, buttonVersion: r = "modern", dateFnsLocale: o, locale: i = "en_US" }) {
+ let a = (0, s.useMemo)((() => ({
+ zIndexBase: n,
+ dateFnsLocale: o
+ })), [o, n]);
+ return (0, Go.jsx)(xl.Provider, {
+ value: a,
+ children: (0, Go.jsx)(bl, {
+ locale: i,
+ children: (0, Go.jsxs)(il.VersionProvider, {
+ value: r,
+ children: [!t && (0, Go.jsx)(Xi, {}), e]
+ })
+ })
+ });
+}
+const Sl = [
+ "modal",
+ "popover",
+ "dropdown",
+ "datepicker",
+ "tooltip",
+ "colorpicker",
+ "listDragAndDrop"
+];
+function Cl(e) {
+ return (0, s.useContext)(xl).zIndexBase + Sl.indexOf(e);
+}
+const kl = ao.div.withConfig({
+ displayName: "ImageHolder",
+ componentId: "sc-1m204zj-0"
+})([
+ "margin:calc(",
+ " * -1) calc(",
+ " * -1) ",
+ ";"
+], po.spacing4, po.spacing5, po.spacing3), _l = ao.img.withConfig({
+ displayName: "StyledImage",
+ componentId: "sc-1m204zj-1"
+})(["vertical-align:top;width:100%;border-bottom:1px solid ", ";border-radius:var(--ds-tooltip-border-radius) var(--ds-tooltip-border-radius) 0 0;"], po.gray100a), { internalTokens: Tl, declareTokens: Il } = ea({
+ lightTheme: {
+ "tooltip-background": po.gray10,
+ "tooltip-shadow": `${po.elevation2}, ${po.elevationStatic}`,
+ "tooltip-title-color": po.colorText,
+ "tooltip-secondary-text-color": po.colorTextMuted,
+ "tooltip-text-color": po.colorTextMuted
+ },
+ darkTheme: {
+ "tooltip-background": po.gray100,
+ "tooltip-shadow": "0 2px 4px -1px rgb(3 16 38 / 10%), 0 0 0 1px rgb(3 16 38 / 10%)",
+ "tooltip-title-color": po.gray1000,
+ "tooltip-secondary-text-color": po.gray600,
+ "tooltip-text-color": po.gray800
+ }
+}), Ol = ao.div.withConfig({
+ displayName: "StyledText",
+ componentId: "sc-nthtpa-0"
+})([
+ "",
+ " padding-block:",
+ ";color:",
+ ";"
+], Vi.paragraphS, po.spacing3, Tl["tooltip-text-color"]), jl = ao.div.withConfig({
+ displayName: "ItemStyled",
+ componentId: "sc-shh96p-0"
+})([
+ "display:flex;gap:",
+ ";align-items:center;margin-inline:calc(",
+ " * -1);padding:",
+ " ",
+ ";"
+], po.spacing3, po.spacing5, po.spacing3, po.spacing5), Pl = ao.div.withConfig({
+ displayName: "ThumbnailContainer",
+ componentId: "sc-shh96p-1"
+})(["flex:none;"]), Al = ao.div.withConfig({
+ displayName: "Content",
+ componentId: "sc-shh96p-2"
+})(["", " flex:1;min-width:0;"], Vi.uiTextM), Nl = ao.div.withConfig({
+ displayName: "Subtext",
+ componentId: "sc-shh96p-3"
+})([
+ "",
+ " color:",
+ ";"
+], Vi.uiTextS, Tl["tooltip-secondary-text-color"]);
+function Ml({ position: e = "top-center", timing: t = "instant", size: n = "small", isLightTheme: r = !1, className: o, icon: i, secondaryText: a, badge: l, content: c, ...u }) {
+ let [d, f] = function(e) {
+ var t = e === void 0 ? {} : e, n = t.delayEnter, r = n === void 0 ? 0 : n, o = t.delayLeave, i = o === void 0 ? 0 : o, a = t.hideOnScroll, l = a === void 0 || a, c = (0, s.useState)(!1), u = c[0], d = c[1], f = (0, s.useRef)(null), p = (0, s.useRef)(Ds.IDLE), h = (0, s.useRef)(!1), g = (0, s.useCallback)((function() {
+ clearTimeout(f.current), f.current = null, p.current = Ds.IDLE;
+ }), []);
+ function m(e, t) {
+ if (p.current === Ds.ENTERING && f.current && g(), u) {
+ if (t) return d(!1), f.current = null, void (p.current = Ds.IDLE);
+ p.current = Ds.LEAVING, f.current = window.setTimeout((function() {
+ d(!1), f.current = null, p.current = Ds.IDLE;
+ }), i);
+ }
+ }
+ return (0, s.useEffect)((function() {
+ function e() {
+ u && l && (g(), d(!1));
+ }
+ return window.addEventListener("scroll", e, !0), function() {
+ window.removeEventListener("scroll", e, !0), f.current && clearTimeout(f.current);
+ };
+ }), [
+ u,
+ l,
+ g
+ ]), [
+ u,
+ {
+ onMouseEnter: function() {
+ p.current === Ds.LEAVING && f.current && g(), u || (p.current = Ds.ENTERING, f.current = window.setTimeout((function() {
+ d(!0), f.current = null, p.current = Ds.IDLE;
+ }), r));
+ },
+ onMouseLeave: m,
+ onTouchStart: function() {
+ h.current = !1;
+ },
+ onTouchMove: function() {
+ h.current = !0;
+ },
+ onTouchEnd: function() {
+ h.current || u || d(!0), h.current = !1;
+ }
+ },
+ function() {
+ return m(0, !0);
+ }
+ ];
+ }({ delayEnter: t === "delay" ? 800 : 0 }), { isFocusVisible: p, focusProps: h } = Ja(), g = Cl("tooltip"), m = u.isOpen === void 0 ? d || p : u.isOpen, { triggerProps: v, layerProps: y, renderLayer: b } = Ls({
+ isOpen: m,
+ auto: !0,
+ snap: !0,
+ placement: Ll(e),
+ possiblePlacements: Dl(e),
+ triggerOffset: 8,
+ containerOffset: 8
+ });
+ return (0, Go.jsxs)(Go.Fragment, { children: [typeof u.children == "function" ? u.children({
+ ...v,
+ ...f,
+ ...h
+ }) : (0, Go.jsx)("div", {
+ ...v,
+ ...f,
+ ...h,
+ children: u.children
+ }), m && b((0, Go.jsx)(Rl, {
+ isLightTheme: r,
+ children: (0, Go.jsx)(zl, {
+ ...y,
+ $zIndex: g,
+ className: o,
+ $size: n,
+ children: (0, Go.jsxs)(Bs, {
+ alignItems: "center",
+ gap: "3",
+ children: [
+ i && (0, Go.jsx)($l, {
+ $size: n,
+ children: i
+ }),
+ (0, Go.jsx)("div", { children: c }),
+ a && (0, Go.jsx)(Bl, { children: a }),
+ l
+ ]
+ })
+ })
+ }))] });
+}
+function Ll(e) {
+ return {
+ "top-left": "top-start",
+ "top-center": "top-center",
+ "top-right": "top-end",
+ left: "left-center",
+ right: "right-center",
+ "bottom-left": "bottom-start",
+ "bottom-center": "bottom-center",
+ "bottom-right": "bottom-end"
+ }[e];
+}
+function Dl(e) {
+ let t = ["top-center", "bottom-center"], n = ["left-center", "right-center"], r = [
+ "top-end",
+ "top-start",
+ "bottom-end",
+ "bottom-start"
+ ];
+ return {
+ "top-left": r,
+ "top-center": t,
+ "top-right": r,
+ left: n,
+ right: n,
+ "bottom-left": r,
+ "bottom-center": t,
+ "bottom-right": r
+ }[e];
+}
+function Rl({ isLightTheme: e, children: t }) {
+ return e ? (0, Go.jsx)(zs, { children: t }) : (0, Go.jsx)($s, { children: t });
+}
+Ml.Image = function({ src: e, alt: t = "" }) {
+ return (0, Go.jsx)(kl, { children: (0, Go.jsx)(_l, {
+ src: e,
+ alt: t,
+ "data-testid": "ds-tooltip-image"
+ }) });
+}, Ml.Text = function({ children: e }) {
+ return (0, Go.jsx)(Ol, { children: e });
+}, Ml.ListItem = function({ children: e, subtext: t, thumbnail: n, rightElements: r, ...o }) {
+ return (0, Go.jsxs)(jl, {
+ ...o,
+ children: [
+ n && (0, Go.jsx)(Pl, { children: n }),
+ (0, Go.jsxs)(Al, { children: [e, t ? (0, Go.jsx)(Nl, { children: t }) : null] }),
+ r
+ ]
+ });
+};
+const zl = ao.div.withConfig({
+ displayName: "TooltipContainer",
+ componentId: "sc-1fp15xc-0"
+})([
+ "--ds-tooltip-border-radius:",
+ ";",
+ " z-index:",
+ ";display:flex;box-sizing:border-box;border-radius:var(--ds-tooltip-border-radius);background:",
+ ";color:",
+ ";box-shadow:",
+ ";word-break:break-word;",
+ ";"
+], po.radiusBase, Il, ((e) => e.$zIndex), Tl["tooltip-background"], Tl["tooltip-title-color"], Tl["tooltip-shadow"], ((e) => e.$size === "small" ? ro([
+ "",
+ " max-width:240px;padding:",
+ " ",
+ ";"
+], Vi.uiTextS, po.spacing3, po.spacing4) : e.$size === "medium" ? ro([
+ "",
+ " max-width:256px;padding:",
+ " ",
+ ";"
+], Vi.uiTextM, po.spacing3, po.spacing5) : void 0)), $l = ao.span.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-1fp15xc-1"
+})([
+ "display:flex;align-items:center;width:24px;height:24px;margin-block:calc(",
+ " * -1);margin-left:",
+ ";"
+], po.spacing1, ((e) => e.$size === "medium" ? `calc(${po.spacing3} * -1)` : `calc(${po.spacing2} * -1)`)), Bl = ao.span.withConfig({
+ displayName: "SecondaryTextContainer",
+ componentId: "sc-1fp15xc-2"
+})([
+ "",
+ " color:",
+ ";"
+], Vi.uiTextS, Tl["tooltip-secondary-text-color"]);
+function Fl(...e) {
+ return (t) => {
+ for (let n of e) n && (typeof n == "function" ? n(t) : n.current = t);
+ };
+}
+const Ul = (0, s.forwardRef)((({ icon: e, onClick: t, isTooltipShown: n = !1, label: r, isDisabled: o = !1, tabIndex: i, ...a }, s) => {
+ let { isFocusVisible: l, focusProps: c } = Ja();
+ return n ? (0, Go.jsx)(Ml, {
+ content: r,
+ isOpen: !!l || void 0,
+ children: (n) => (0, Go.jsx)(Hl, {
+ ...a,
+ ...n,
+ ...c,
+ ref: Fl(s, n.ref),
+ onClick: t,
+ disabled: o,
+ type: "button",
+ "aria-label": r,
+ $isFocusVisible: l,
+ tabIndex: i,
+ children: e
+ })
+ }) : (0, Go.jsx)(Hl, {
+ ref: s,
+ ...a,
+ ...c,
+ onClick: t,
+ disabled: o,
+ type: "button",
+ "aria-label": r,
+ $isFocusVisible: l,
+ tabIndex: i,
+ children: e
+ });
+})), Hl = ao.button.withConfig({
+ displayName: "InteractiveIconWrapper",
+ componentId: "sc-1ieyeg1-0"
+})([
+ "vertical-align:middle;width:24px;height:24px;padding:0;border:none;background:transparent;color:",
+ ";cursor:pointer;&:hover,&:active{color:",
+ ";}&:disabled{color:",
+ ";cursor:not-allowed;}",
+ ""
+], po.gray600, po.gray800, po.gray200, ((e) => e.$isFocusVisible && ro([
+ "border-radius:2px;color:",
+ ";box-shadow:0 0 0 2px ",
+ ";outline:none;"
+], po.gray800, po.gray200))), Vl = new ml(o(9017).default);
+function ql() {
+ return { translate: ((0, s.useContext)(yl) || Vl).translate };
+}
+const Gl = (0, s.forwardRef)((({ hasClearButton: e = !1, icon: t, iconRight: n, id: r, name: o, isDisabled: i = !1, isReadOnly: a = !1, isInvalid: l = !1, isSmall: c = !1, onBlur: u, onChange: d, onFocus: f, onKeyDown: p, onClean: h, placeholder: g, type: m = "text", value: v, variant: y = "outlined", "aria-label": b, "aria-labelledby": w, "aria-describedby": x, "aria-haspopup": E, "aria-expanded": S, "aria-controls": C, "aria-autocomplete": k, "aria-activedescendant": _, inputRef: T, maxLength: I, prefix: O, suffix: j, autoFocus: P = !1, role: A, autoComplete: N = "off", ...M }, L) => {
+ let [D, R] = (0, s.useState)(!1), z = (0, s.useRef)(null), $ = T || z, { translate: B } = ql(), F = e && v.length > 0 && m !== "number" && m !== "password", U = m === "password" ? D ? "text" : "password" : m;
+ function H() {
+ var e;
+ (e = $?.current) == null || e.focus();
+ }
+ let W = m === "password";
+ return (0, Go.jsxs)(oa, {
+ ...M,
+ $isDisabled: i,
+ $isInvalid: l,
+ $isSmall: c,
+ onClick: H,
+ ref: L,
+ $variant: y,
+ children: [
+ (0, Go.jsxs)(aa, {
+ "data-testid": "ds-input-left-items",
+ children: [t && (0, Go.jsx)(sa, { children: t }), O && (0, Go.jsx)(la, {
+ $isDisabled: i,
+ children: O
+ })]
+ }),
+ (0, Go.jsx)(ia, {
+ autoComplete: N,
+ autoCorrect: "off",
+ disabled: i,
+ $isDisabled: i,
+ readOnly: a,
+ onBlur: u,
+ onChange: function(e) {
+ let t = e.currentTarget.value;
+ d?.(t);
+ },
+ onFocus: f,
+ onKeyDown: p,
+ placeholder: g,
+ ref: $,
+ spellCheck: !1,
+ type: U,
+ value: v,
+ "aria-label": b,
+ "aria-labelledby": w,
+ "aria-describedby": x,
+ "aria-haspopup": E,
+ "aria-expanded": S,
+ "aria-controls": C,
+ "aria-autocomplete": k,
+ "aria-activedescendant": _,
+ "aria-invalid": l,
+ role: A,
+ id: r,
+ name: o,
+ maxLength: I,
+ autoFocus: P
+ }),
+ (0, Go.jsxs)(ca, {
+ "data-testid": "ds-input-right-items",
+ children: [
+ j && (0, Go.jsx)(ua, {
+ $isDisabled: i,
+ children: j
+ }),
+ W && !i && (0, Go.jsx)(Ul, {
+ "data-testid": "ds-password-visibility-toggle",
+ onClick: () => (R(((e) => !e)), void H()),
+ label: B(D ? "input.hide-password" : "input.show-password"),
+ icon: D ? (0, Go.jsx)(Ri, {}) : (0, Go.jsx)(Si, {}),
+ isTooltipShown: !0
+ }),
+ F && !i && (0, Go.jsx)(fa, {
+ onClick: function() {
+ d?.(""), h?.(), H();
+ },
+ type: "button",
+ "aria-label": B("input.clear"),
+ children: (0, Go.jsx)(ui, {})
+ }),
+ n && (0, Go.jsx)(da, { children: n })
+ ]
+ })
+ ]
+ });
+}));
+function Yl(e) {
+ return s.default.createElement(Zl, {
+ "data-testid": "spinner",
+ $isRelative: e.isRelative,
+ $isHidden: e.isHidden,
+ $isRefreshingSpinner: e.isRefreshingSpinner,
+ $isNotUsingMargin: e.isNotUsingMargin
+ }, s.default.createElement("svg", {
+ className: "spinner",
+ viewBox: "0 0 20 20"
+ }, s.default.createElement("circle", {
+ cx: "10",
+ cy: "10",
+ r: "8",
+ fill: "none",
+ strokeWidth: "3"
+ })));
+}
+const Zl = ao.div`
+ display: ${(e) => e.$isHidden ? "none" : "initial"};
+ position: ${(e) => e.$isRelative ? "relative" : "absolute"};
+ top: ${(e) => e.$isRefreshingSpinner ? "initial" : "0"};
+ right: ${(e) => e.$isRefreshingSpinner ? "initial" : "0"};
+ width: ${po.spacing6};
+ height: ${po.spacing6};
+ margin-right: ${(e) => e.$isNotUsingMargin ? "0" : po.spacing3};
+ margin-top: ${(e) => e.$isNotUsingMargin ? "0" : po.spacing4};
+ background-color: #fff;
+ color: rgba(0, 34, 51, 0.3);
+`;
+function Kl(e) {
+ return Xl[e] ?? e;
+}
+let Xl = {};
+function Jl(e) {
+ (0, s.useEffect)((() => {
+ let t = e.slice(0, 2).toLowerCase();
+ fetch(`https://d8ejoa1fys2rk.cloudfront.net/5.0.5/modules/compactview/i18n/${t}.json`).then(((e) => e.json())).then(((e) => {
+ Xl = e;
+ }));
+ }), [e]);
+}
+function Ql(e) {
+ return {
+ tag: "ok",
+ value: e
+ };
+}
+function ec(e) {
+ return {
+ tag: "error",
+ error: e
+ };
+}
+function tc(e) {
+ return e.tag === "ok";
+}
+function nc(e) {
+ return e.tag === "error";
+}
+function rc() {
+ let e = /* @__PURE__ */ new Uint32Array(28), t = window.crypto.getRandomValues(e);
+ return Array.from(t).map(((e) => `0${e.toString(16)}`.substr(-2))).join("");
+}
+function oc(e) {
+ return `https://${e.replace(/^https?:\/\//i, "").replace(/\/+$/i, "")}/`;
+}
+var ic = function(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+};
+const ac = "42b1eefa-d754-4802-b9c4-bf80d6ab6052", lc = "https://d8ejoa1fys2rk.cloudfront.net/5.0.5/modules/compactview/loginCompleted.html", cc = [
+ "offline",
+ "asset:read",
+ "collection:read",
+ "meta.assetbank:read"
+];
+function uc(e) {
+ return dc() === "webdam" ? "https://apiv2.webdamdb.com/oauth2/" : oc(e) + "v6/authentication/oauth2/";
+}
+function dc() {
+ return localStorage.getItem("cvp") ?? void 0;
+}
+function fc(e) {
+ return t = this, n = void 0, o = function* () {
+ let t = rc(), n;
+ try {
+ n = yield function(e) {
+ if (!window.crypto?.subtle) return Promise.reject("Access to the WebCrypto API is restricted to secure origins. Compact View requires HTTPS when used outside localhost (for development).");
+ let n = new TextEncoder().encode(e);
+ return window.crypto.subtle.digest("SHA-256", n);
+ }(t);
+ } catch (e) {
+ return ec(e.toString());
+ }
+ let r = (o = n, btoa(String.fromCharCode.apply(null, Array.from(new Uint8Array(o)))).replace(/\+/g, "-").replace(/\//g, "_").replace(/[=]+$/, ""));
+ var o;
+ let i = rc(), s = yield function(e) {
+ return t = this, n = void 0, o = function* () {
+ let t = window.screen, n = t.width / 2 - 285 + window.screenX, r = t.height / 2 - 350 + window.screenY, o = window.open("", "Bynder Brand Portal", `height=700,width=570,left=${n},top=${r}`);
+ if (o === null) return ec("Error opening login window");
+ o.document.head.innerHTML = "\n<title>Redirecting...</title>\n<style>\n @keyframes cv-spinner-animation {\n to {\n transform:rotate(1turn)\n }\n }\n\n .cv-spinner {\n position: relative;\n display: inline-block;\n padding: 175px 0 100px;\n width: 100%;\n height: auto;\n background: #fff;\n box-sizing: border-box;\n }\n \n .cv-spinner:before {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 40px;\n height: 40px;\n margin-top: -20px;\n margin-left: -20px;\n box-sizing: border-box;\n border-top: 3px solid #7e8890;\n border-right: 3px solid transparent;\n border-radius: 50%;\n content: \"\";\n animation: cv-spinner-animation .8s linear infinite;\n z-index: 3;\n }\n</style>", o.document.body.innerHTML = "<div class=\"cv-spinner\"></div>", o.location.href = e;
+ let i = yield Promise.race([
+ new Promise(((e) => {
+ window.addEventListener("message", ((t) => {
+ t.origin === "https://d8ejoa1fys2rk.cloudfront.net" && e(Ql(t));
+ }));
+ })),
+ new Promise(((e) => {
+ setTimeout((() => e(ec("Timeout"))), 6e5);
+ })),
+ (a = o, new Promise(((e) => {
+ let t = setInterval((function() {
+ a.closed && (clearInterval(t), e(ec("Login window closed")));
+ }), 1e3);
+ })))
+ ]);
+ var a;
+ if (nc(i)) return i;
+ let s = new URLSearchParams(i.value.data);
+ return Ql({
+ state: s.get("state"),
+ code: s.get("code")
+ });
+ }, new ((r = void 0) || (r = Promise))((function(e, i) {
+ function a(e) {
+ try {
+ l(o.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(o.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(t) {
+ var n;
+ t.done ? e(t.value) : (n = t.value, n instanceof r ? n : new r((function(e) {
+ e(n);
+ }))).then(a, s);
+ }
+ l((o = o.apply(t, n || [])).next());
+ }));
+ var t, n, r, o;
+ }(function(e, t, n) {
+ let r = {
+ client_id: ac,
+ code_challenge: e,
+ code_challenge_method: "S256",
+ redirect_uri: lc,
+ response_type: "code",
+ scope: cc.join(" "),
+ domain: "",
+ state: t
+ }, o = "auth?";
+ dc() === "webdam" && (o = "authorize?", delete r.scope, r.domain = n);
+ let i = new URLSearchParams(r);
+ return uc(n) + o + i;
+ }(r, i, e));
+ if (nc(s)) return s;
+ if (s.value.state !== i || s.value.code === null) return ec("Error logging in");
+ let l = yield function(e, t, n) {
+ return ic(this, void 0, void 0, (function* () {
+ let r = uc(n) + "token", o = new URLSearchParams({
+ client_id: ac,
+ code_verifier: t,
+ code: e,
+ redirect_uri: lc,
+ grant_type: "authorization_code"
+ });
+ try {
+ let e = yield fetch(r, {
+ method: "POST",
+ headers: {
+ Accept: "application/json",
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
+ },
+ body: o
+ });
+ if (!e.ok) return ec(`Failed to fetch access token: ${e.status}`);
+ let t = yield e.json();
+ return Ql({
+ refreshToken: t.refresh_token,
+ accessToken: t.access_token,
+ expiresIn: t.expires_in
+ });
+ } catch (e) {
+ return ec(e.toString());
+ }
+ }));
+ }(s.value.code, t, e);
+ if (nc(l)) return l;
+ let { refreshToken: c, accessToken: u, expiresIn: d } = l.value;
+ return Ql({
+ accessToken: u,
+ expiresIn: parseFloat(d),
+ refreshToken: c
+ });
+ }, new ((r = void 0) || (r = Promise))((function(e, i) {
+ function a(e) {
+ try {
+ l(o.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(o.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(t) {
+ var n;
+ t.done ? e(t.value) : (n = t.value, n instanceof r ? n : new r((function(e) {
+ e(n);
+ }))).then(a, s);
+ }
+ l((o = o.apply(t, n || [])).next());
+ }));
+ var t, n, r, o;
+}
+const pc = { error: console.error }, hc = (0, s.createContext)(null), gc = hc.Provider, mc = () => {
+ let e = (0, s.useContext)(hc);
+ if (!e) throw Error("useRootElement must be used with a RootElementProvider");
+ return e;
+};
+var vc = ":host {\n font-family: SourceSansPro, Source Sans Pro, system-ui, -apple-system, BlinkMacSystemFont,\n 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',\n 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n --fade-in-down: fade-in-down 150ms ease-out;\n}\n\n.translate-y-2\\/4 {\n transform: translateY(-50%);\n}\n\n@keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes fade-in-down {\n 0% {\n opacity: 0;\n transform: translateY(-2px);\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes border-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n@keyframes border-dash {\n 0% {\n stroke-dasharray: 1, 100;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 80, 100;\n stroke-dashoffset: -20;\n }\n 100% {\n stroke-dasharray: 80, 100;\n stroke-dashoffset: -48;\n }\n}\n\n.transition-shadow {\n transition: box-shadow 0.1s linear;\n}\n\n.transition-transform {\n transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.15);\n}\n\n.cv-root {\n display: flex;\n flex-direction: column;\n background-color: rgba(255, 255, 255, 1);\n font-family: SourceSansPro, Source Sans Pro, system-ui, -apple-system, BlinkMacSystemFont,\n 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',\n 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n box-sizing: border-box;\n position: relative;\n font-size: 16px;\n color: rgba(0, 34, 51, 0.8);\n\n *,\n *:before,\n *:after {\n box-sizing: inherit;\n }\n}\n\n.cv-container {\n overflow: hidden;\n width: 100%;\n height: 100%;\n\n nav:last-of-type {\n box-shadow: 0 1px 0 0 rgba(0, 34, 51, 0.1), 0 1px 6px 0 rgba(0, 34, 51, 0.1);\n }\n}\n\n.cv-dropdown {\n position: fixed;\n border-width: 1px;\n border-color: rgba(0, 34, 51, 0.1);\n animation: fade-in-down 150ms ease-out;\n margin-top: 16px;\n border-radius: 5px;\n box-shadow: 0 4px 10px 0 rgba(0, 34, 51, 0.1);\n z-index: 9999999;\n overflow-y: hidden;\n transition: left 0.1s ease-out;\n}\n\n.card-list {\n display: flex;\n flex-wrap: wrap;\n flex-grow: 1;\n align-content: flex-start;\n justify-content: center;\n position: relative;\n padding-left: 8px;\n padding-right: 8px;\n user-select: none;\n}\n\n.max-h-400 {\n max-height: 400px;\n}\n\n.max-w-600 {\n max-width: 600px;\n}\n\n.flip-y {\n transform: scaleY(-1);\n}\n\n.spinner {\n animation: border-rotate 1s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -10px 0 0 -10px;\n width: 20px;\n height: 20px;\n\n circle {\n stroke: currentColor;\n stroke-linecap: round;\n animation: border-dash 1.5s ease-in-out infinite;\n }\n}\n\n/* Disable IE11 \"clear input\" button */\n::-ms-clear {\n display: none;\n}\n\n/* Increase default line height to prevent large icons from being cut off */\n.fa-lg {\n line-height: 1.05em;\n}\n\n/* Currently set to be higher than Wordpress UI elements */\n.z-a-lot {\n z-index: 999999;\n}\n\n.z-a-lot-more {\n z-index: 9999999;\n}\n\nbutton:focus {\n outline: revert;\n}\n";
+function yc(e) {
+ let t = mc();
+ return s.default.createElement(Ur, { target: t }, s.default.createElement(El, { zIndexBase: 1e6 }, e.children));
+}
+function bc({ children: e, isContainerMode: t = !1 }) {
+ let n = s.default.useRef(null), [r, o] = (0, s.useState)(null);
+ return (0, s.useEffect)((() => {
+ if (n.current === null) return;
+ let e = function(e) {
+ try {
+ return e.attachShadow({ mode: "open" });
+ } catch {
+ return null;
+ }
+ }(n.current);
+ (function(e) {
+ let t = "@import url(https://d8ejoa1fys2rk.cloudfront.net/5.0.5/includes/css/vendor/font-awesome.min.css);" + vc;
+ wc(e ?? document.head, t);
+ })(e), e && wc(document.head, xc), o(e ?? n.current);
+ }), []), s.default.createElement("div", {
+ ref: n,
+ style: {
+ display: "flex",
+ height: "100%"
+ },
+ "data-testid": "root"
+ }, r && s.default.createElement(gc, { value: r }, s.default.createElement(yc, null, (0, Qa.createPortal)(s.default.createElement(Ec, {
+ $isContainerMode: t,
+ "data-testid": "ShadowRootInternalContainer"
+ }, e), r))));
+}
+function wc(e, t) {
+ let n = document.createElement("style"), r = document.createTextNode(t);
+ n.appendChild(r), e.appendChild(n);
+}
+const xc = "\n@font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n src: local('Source Sans Pro Regular'),\n local('SourceSansPro-Regular'),\n url('https://d8ejoa1fys2rk.cloudfront.net/5.0.5/includes/fonts/SourceSans/sourcesanspro-regular.woff2') format('woff2'),\n url('https://d8ejoa1fys2rk.cloudfront.net/5.0.5/includes/fonts/SourceSans/sourcesanspro-regular.woff') format('woff');\n }\n \n @font-face {\n font-family: \"FontAwesome\";\n src: url(\"https://d8ejoa1fys2rk.cloudfront.net/5.0.5/includes/fonts/fontawesome-webfont.woff2?v=4.7.0\") format(\"woff2\"),\n url(\"https://d8ejoa1fys2rk.cloudfront.net/5.0.5/includes/fonts/fontawesome-webfont.woff?v=4.7.0\") format(\"woff\");\n font-weight: 400;\n font-style: normal;\n }\n", Ec = ao.div`
+ width: ${(e) => e.$isContainerMode ? "100%" : "auto"};
+ font-family: 'Source Sans Pro';
+`, Sc = (0, s.createContext)("parent");
+function Cc({ children: e, isContainerMode: t = !1 }) {
+ return (0, s.useContext)(Sc) === "parent" ? s.default.createElement(Sc.Provider, { value: "child" }, s.default.createElement(bc, { isContainerMode: t }, e)) : s.default.createElement(s.default.Fragment, null, e);
+}
+const kc = (0, s.createContext)(null), _c = () => (0, s.useContext)(kc);
+function Tc({ children: e, isOpen: t = !0, style: n, onClose: r = () => {} }) {
+ let [o, i] = (0, s.useState)(null), a = (0, s.useMemo)((() => ({ onClose: r })), [r]);
+ return (0, s.useEffect)((() => {
+ let e = document.createElement("div");
+ return e.dataset.testId = "CompactViewContainer", document.body.appendChild(e), i(e), () => {
+ e.remove();
+ };
+ }), []), t ? s.default.createElement(kc.Provider, { value: a }, o && s.default.createElement(s.default.Fragment, null, (0, Qa.createPortal)(s.default.createElement(Cc, null, s.default.createElement(Ic, { className: "z-a-lot" }, s.default.createElement(Oc, {
+ style: n,
+ "data-testid": "modal"
+ }, e))), o))) : null;
+}
+const Ic = ao.div`
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ display: flex;
+ align-items: center;
+ padding: ${po.spacing5};
+ position: fixed;
+ animation: var(--fade-in-down);
+ background: ${po.gray100a};
+`, Oc = ao.div`
+ box-shadow: 0 2px 12px 0 rgba(0, 34, 51, 0.1);
+ height: 100%;
+ width: 100%;
+ overflow: hidden;
+ border-radius: ${po.radiusBase};
+`;
+function jc(e) {
+ let t = _c();
+ return s.default.createElement(Pc, {
+ className: "cv-root",
+ style: { minHeight: 320 }
+ }, t !== null && s.default.createElement(Ac, null, s.default.createElement(il, {
+ variant: "clean",
+ onClick: t.onClose,
+ title: Kl("Close"),
+ icon: s.default.createElement(ai, null)
+ })), s.default.createElement(Nc, null, e.children));
+}
+const Pc = ao.div`
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ position: relative;
+ background-color: ${po.gray10};
+`, Ac = ao.div`
+ position: absolute;
+ top: ${po.spacing4};
+ right: ${po.spacing5};
+`, Nc = ao.div`
+ display: flex;
+ flex-direction: column;
+ font-size: ${po.fontSize300};
+`;
+function Mc() {
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement("svg", {
+ viewBox: "0 0 479.438 361.46",
+ className: "w-10 mb-8",
+ style: {
+ width: 40,
+ marginBottom: 32
+ }
+ }, s.default.createElement("path", {
+ d: "\n M365.18 0a114 114 0 00-85.9 38.93l-153.18 153-43.82-43.84a45.18 45.18\n 0 01-11.54-30.75 46.06 46.06 0 0146.34-46.08 44.81 44.81 0 0130.42\n 11.49c2.73 2.42 10.48 10.43 10.48 10.43l48.5-48.51-14-14C172.19 11.43\n 144.48.03 114.3.03 51.24.03 0 51.03 0 114.1a115.08 115.08 0 0028.09\n 75.46l98.35 98.77 205.53-205.5a44.78 44.78 0 0130.58-11.57 46.07 46.07 0\n 0146.06 46.43 45.07 45.07 0 01-11.52 30.5l-136.6 136.57a28.73 28.73 0\n 01-20.83 8.58 28.29 28.29 0 01-20.51-8.92l-10.27-10.16-48.28 48.28 9.88\n 9.72a97.06 97.06 0 0069.38 29.2h.07a96 96 0\n 0069-29.13l142.35-142.67A114.47 114.47 0 00365.18 0z",
+ fill: "#0af"
+ })), s.default.createElement("h1", {
+ className: "text-xl mb-2",
+ style: {
+ fontSize: 20,
+ margin: 0,
+ marginBottom: 8,
+ fontWeight: 400
+ }
+ }, Kl("Connect your brand portal")));
+}
+const Lc = (0, s.createContext)(void 0);
+function Dc(e) {
+ if (!(0, s.useContext)(Lc)) throw Error(`<Form.${e}> cannot be rendered outside the <Form.Group> component`);
+}
+const Rc = ao.div.withConfig({
+ displayName: "GroupStyled",
+ componentId: "sc-1o6r33c-0"
+})(["margin:0;padding:", " 0;border:0;"], po.spacing3), zc = ao.div.withConfig({
+ displayName: "HelperTextStyled",
+ componentId: "sc-1gcvrkz-0"
+})([
+ "",
+ " display:flex;align-items:center;margin-top:",
+ ";padding-top:",
+ ";color:",
+ ";"
+], Vi.uiTextS, po.spacing2, ((e) => e.$hasIcon ? "2px" : "0"), ((e) => e.$isInvalid ? po.red500 : po.colorTextMuted)), $c = ao.div.withConfig({
+ displayName: "Icon",
+ componentId: "sc-1gcvrkz-1"
+})(["flex:none;align-self:flex-start;margin-top:-2px;margin-right:", ";"], po.spacing2), Bc = ao.label.withConfig({
+ displayName: "LabelStyled",
+ componentId: "sc-17wblts-0"
+})([
+ "",
+ " display:block;margin:0 0 ",
+ ";padding:0;border:none;color:",
+ ";"
+], Vi.uiTextM, po.spacing3, po.colorText), Fc = ao.span.withConfig({
+ displayName: "SecondaryText",
+ componentId: "sc-17wblts-1"
+})(["color:", ";"], po.colorTextMuted), Uc = ao.span.withConfig({
+ displayName: "Space",
+ componentId: "sc-17wblts-2"
+})(["display:inline-block;width:", ";"], po.spacing3), Hc = ao.div.withConfig({
+ displayName: "RowStyled",
+ componentId: "sc-13oau0l-0"
+})(["display:grid;grid-template-columns:repeat(auto-fit,minmax(10px,1fr));gap:", ";"], po.spacing4), Wc = ao.div.withConfig({
+ displayName: "InputRowStyled",
+ componentId: "sc-1mba7ih-0"
+})([
+ "display:flex;gap:",
+ ";> *:not(",
+ "){min-width:auto;}> ",
+ "{min-width:0;}"
+], po.spacing4, oa, oa);
+function Vc({ children: e, onSubmit: t, ...n }) {
+ return (0, Go.jsx)("form", {
+ onSubmit: t,
+ ...n,
+ children: e
+ });
+}
+Vc.Group = function({ children: e, ...t }) {
+ return (0, Go.jsx)(Lc.Provider, {
+ value: "group",
+ children: (0, Go.jsx)(Rc, {
+ ...t,
+ children: e
+ })
+ });
+}, Vc.HelperText = function({ icon: e, isInvalid: t, children: n, ...r }) {
+ return Dc("HelperText"), (0, Go.jsxs)(zc, {
+ $isInvalid: t,
+ $hasIcon: !!e,
+ ...r,
+ children: [e && (0, Go.jsx)($c, { children: e }), n]
+ });
+}, Vc.Label = function({ children: e, secondaryText: t, htmlFor: n, id: r, ...o }) {
+ return Dc("Label"), (0, Go.jsxs)(Bc, {
+ htmlFor: n,
+ id: r,
+ ...o,
+ children: [e, t ? (0, Go.jsxs)(Fc, { children: [(0, Go.jsx)(Uc, { children: " " }), t] }) : null]
+ });
+}, Vc.Row = function({ children: e, ...t }) {
+ return (0, Go.jsx)(Hc, {
+ ...t,
+ children: e
+ });
+}, Vc.InputRow = function({ children: e, ...t }) {
+ return Dc("InputRow"), (0, Go.jsx)(Wc, {
+ ...t,
+ children: e
+ });
+}, Vc.IconError = function({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ fillRule: "evenodd",
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm-1 15v-2h2v2h-2Zm0-10v6h2V7h-2Z",
+ clipRule: "evenodd"
+ })
+ });
+};
+let qc = (e = 21) => {
+ let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
+ for (; e--;) t += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63 & n[e]];
+ return t;
+};
+function Gc(e) {
+ return (0, s.useMemo)((() => e + "-" + qc()), [e]);
+}
+function Yc({ label: e, labelSecondaryText: t, helperText: n, helperTextIcon: r, id: o, name: i, isInvalid: a, hasClearButton: s, icon: l, iconRight: c, inputRef: u, isDisabled: d, isReadOnly: f, isSmall: p, maxLength: h, onBlur: g, onChange: m, onClean: v, onFocus: y, onKeyDown: b, placeholder: w, type: x, value: E, variant: S, prefix: C, suffix: k, autoFocus: _, ...T }) {
+ let I = Gc("input"), O = o || I, j = Gc("helper-text");
+ return (0, Go.jsxs)(Vc.Group, {
+ ...T,
+ children: [
+ (0, Go.jsx)(Vc.Label, {
+ secondaryText: t,
+ htmlFor: O,
+ children: e
+ }),
+ (0, Go.jsx)(Gl, {
+ hasClearButton: s,
+ icon: l,
+ iconRight: c,
+ inputRef: u,
+ isDisabled: d,
+ isReadOnly: f,
+ isInvalid: a,
+ isSmall: p,
+ maxLength: h,
+ onBlur: g,
+ onChange: m,
+ onClean: v,
+ onFocus: y,
+ onKeyDown: b,
+ placeholder: w,
+ type: x,
+ value: E,
+ variant: S,
+ id: O,
+ name: i,
+ "aria-describedby": n ? j : void 0,
+ prefix: C,
+ suffix: k,
+ autoFocus: _
+ }),
+ n ? (0, Go.jsx)(Vc.HelperText, {
+ icon: r,
+ isInvalid: a,
+ id: j,
+ children: n
+ }) : null
+ ]
+ });
+}
+function Zc({ status: e, isReadOnly: t, value: n, onChange: r, onSubmit: o }) {
+ return s.default.createElement(Kc, null, s.default.createElement(Yc, {
+ type: "url",
+ value: n,
+ placeholder: "yourdomain.bynder.com",
+ label: Kl("Enter the portal domain"),
+ onChange: r,
+ onKeyDown: function(t) {
+ e === "valid" && t.keyCode === 13 && o();
+ },
+ isInvalid: e === "invalid",
+ helperText: e === "invalid" && Kl("This portal domain does not exist"),
+ hasClearButton: e !== "validating" && !t,
+ iconRight: e === "validating" ? s.default.createElement(Xc, {
+ role: "alert",
+ "aria-live": "polite"
+ }, s.default.createElement(Yl, {
+ isRelative: !0,
+ isNotUsingMargin: !0
+ })) : void 0,
+ isDisabled: t,
+ "data-testid": "login-input"
+ }));
+}
+const Kc = ao.div`
+ margin: ${po.spacing4} 0;
+ width: 320px;
+`, Xc = ao.div`
+ height: 100%;
+ display: flex;
+ align-items: center;
+`;
+function Jc(e) {
+ return s.default.createElement(il, {
+ variant: "primary",
+ isDisabled: !e.isValidDomain || e.isSubmitting,
+ onClick: e.onClick,
+ isLoading: e.isSubmitting,
+ "data-testid": "login-button"
+ }, Kl("Connect"));
+}
+function Qc(e) {
+ return s.default.createElement(jc, null, s.default.createElement(Mc, null), s.default.createElement(Zc, {
+ value: e.domainValue,
+ isReadOnly: !1 === e.isEditable || e.isSubmitting,
+ onChange: e.onChangeDomain,
+ onSubmit: e.onSubmit,
+ status: e.domainStatus
+ }), s.default.createElement(Jc, {
+ isValidDomain: e.domainStatus === "valid",
+ isSubmitting: e.isSubmitting,
+ onClick: e.onSubmit
+ }));
+}
+function eu(e) {
+ let [t, n] = (0, s.useState)(e ?? ""), [r, o] = (0, s.useState)(e ? "validating" : "empty"), i = (0, s.useRef)();
+ return (0, s.useEffect)((() => {
+ if (!t) return;
+ let e = !1;
+ return i.current = setTimeout((() => {
+ (function(e) {
+ return t = this, n = void 0, o = function* () {
+ let t = oc(e.trim()) + "feeds/media/is-bynder-portal/";
+ try {
+ let e = yield fetch(t), n = yield e.json();
+ return e.status === 200 && e.headers.get("Content-Type") === "application/json;charset=UTF-8" ? n.webdam ? "webdam" : "bynder" : "invalid";
+ } catch {
+ return "invalid";
+ }
+ }, new ((r = void 0) || (r = Promise))((function(e, i) {
+ function a(e) {
+ try {
+ l(o.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(o.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(t) {
+ var n;
+ t.done ? e(t.value) : (n = t.value, n instanceof r ? n : new r((function(e) {
+ e(n);
+ }))).then(a, s);
+ }
+ l((o = o.apply(t, n || [])).next());
+ }));
+ var t, n, r, o;
+ })(t).then(((t) => {
+ e || (o(t === "invalid" ? "invalid" : "valid"), localStorage.setItem("cvp", t));
+ }));
+ }), 1e3), () => {
+ e = !0;
+ };
+ }), [t]), [
+ t,
+ function(e) {
+ i.current && clearTimeout(i.current), n(e), o(e === "" ? "empty" : "validating");
+ },
+ r
+ ];
+}
+function tu() {
+ return s.default.createElement("svg", {
+ width: "190",
+ height: "130"
+ }, s.default.createElement("defs", null, s.default.createElement("linearGradient", {
+ id: "prefix__b",
+ x1: "100%",
+ x2: "25.598%",
+ y1: "11.782%",
+ y2: "100%"
+ }, s.default.createElement("stop", {
+ offset: "0%",
+ stopColor: "#F8FAFC"
+ }), s.default.createElement("stop", {
+ offset: "100%",
+ stopColor: "#EFF2F4"
+ })), s.default.createElement("rect", {
+ id: "prefix__a",
+ width: "190",
+ height: "130",
+ rx: "3"
+ })), s.default.createElement("g", {
+ fill: "none",
+ fillRule: "evenodd"
+ }, s.default.createElement("mask", {
+ id: "prefix__c",
+ fill: "#fff"
+ }, s.default.createElement("use", { xlinkHref: "#prefix__a" })), s.default.createElement("use", {
+ fill: "url(#prefix__b)",
+ xlinkHref: "#prefix__a"
+ }), s.default.createElement("g", { mask: "url(#prefix__c)" }, s.default.createElement("path", {
+ fill: "#F5A623",
+ d: "M100.296 45.951l23.01 43.23A6 6 0 01118.009 98H71.991a6 6 0 01-5.297-8.82l23.01-43.229a6 6 0 0110.592 0z"
+ }), s.default.createElement("path", {
+ fill: "#FFF",
+ fillRule: "nonzero",
+ d: "M93.21 60h3.58a2 2 0 011.99 2.199l-1.6 16A2 2 0 0195.19 80h-.38a2 2 0 01-1.99-1.801l-1.6-16A2 2 0 0193.21 60zM95 84a3 3 0 110 6 3 3 0 010-6z"
+ })), s.default.createElement("path", {
+ fill: "#EEF1F3",
+ d: "M3 0h184a3 3 0 013 3v13H0V3a3 3 0 013-3z",
+ mask: "url(#prefix__c)"
+ }), s.default.createElement("circle", {
+ cx: "11",
+ cy: "8",
+ r: "3",
+ fill: "#023",
+ fillOpacity: "0.1",
+ mask: "url(#prefix__c)"
+ }), s.default.createElement("circle", {
+ cx: "20",
+ cy: "8",
+ r: "3",
+ fill: "#023",
+ fillOpacity: "0.1",
+ mask: "url(#prefix__c)"
+ }), s.default.createElement("circle", {
+ cx: "29",
+ cy: "8",
+ r: "3",
+ fill: "#023",
+ fillOpacity: "0.1",
+ mask: "url(#prefix__c)"
+ })));
+}
+function nu(e) {
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(tu, null), s.default.createElement(ru, null, Kl("Oops! Something went wrong")), s.default.createElement(ou, null, Kl("Please try again or get in contact with our customer support.")), s.default.createElement(iu, null, s.default.createElement(il, {
+ variant: "secondary",
+ title: Kl("Send report"),
+ onClick: e.onClickSend,
+ isDisabled: e.isReportSent
+ }, e.isReportSent ? Kl("Report sent") : Kl("Send report...")), s.default.createElement(il, {
+ variant: "primary",
+ title: Kl("Try again"),
+ onClick: e.onClickRetry
+ }, Kl("Try again"))));
+}
+const ru = ao.h1`
+ margin-top: ${po.spacing8};
+ font-size: ${po.fontSize400};
+`, ou = ao.span`
+ margin-top: ${po.spacing5};
+ color: ${po.colorTextDisabled};
+`, iu = ao.div`
+ margin-top: ${po.spacing7};
+ display: flex;
+ gap: ${po.spacing3};
+`;
+var au = o(6942), su = o.n(au), lu = !1;
+if (typeof window < "u") {
+ var cu = { get passive() {
+ lu = !0;
+ } };
+ window.addEventListener("testPassive", null, cu), window.removeEventListener("testPassive", null, cu);
+}
+var uu = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), du = [], fu = !1, pu = -1, hu = void 0, gu = void 0, mu = function(e) {
+ return du.some((function(t) {
+ return !(!t.options.allowTouchMove || !t.options.allowTouchMove(e));
+ }));
+}, vu = function(e) {
+ var t = e || window.event;
+ return !!mu(t.target) || t.touches.length > 1 || (t.preventDefault && t.preventDefault(), !1);
+};
+function yu() {
+ return yu = Object.assign || function(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = arguments[t];
+ for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
+ }
+ return e;
+ }, yu.apply(this, arguments);
+}
+var bu = function(e) {
+ var t = e.classes, n = e.classNames, r = e.styles, o = e.id, i = e.closeIcon, a = e.onClick;
+ return s.default.createElement("button", {
+ id: o,
+ className: su()(t.closeButton, n?.closeButton),
+ style: r?.closeButton,
+ onClick: a,
+ "data-testid": "close-button"
+ }, i || s.default.createElement("svg", {
+ className: n?.closeIcon,
+ style: r?.closeIcon,
+ width: 28,
+ height: 28,
+ viewBox: "0 0 36 36",
+ "data-testid": "close-icon"
+ }, s.default.createElement("path", { d: "M28.5 9.62L26.38 7.5 18 15.88 9.62 7.5 7.5 9.62 15.88 18 7.5 26.38l2.12 2.12L18 20.12l8.38 8.38 2.12-2.12L20.12 18z" })));
+}, wu = typeof window < "u", xu = [
+ "input",
+ "select",
+ "textarea",
+ "a[href]",
+ "button",
+ "[tabindex]",
+ "audio[controls]",
+ "video[controls]",
+ "[contenteditable]:not([contenteditable=\"false\"])"
+];
+function Eu(e) {
+ return e.offsetParent === null || getComputedStyle(e).visibility === "hidden";
+}
+function Su(e) {
+ if (e.tagName !== "INPUT" || e.type !== "radio" || !e.name) return !0;
+ var t = (e.form || e.ownerDocument).querySelectorAll("input[type=\"radio\"][name=\"" + e.name + "\"]"), n = function(e, t) {
+ for (var n = 0; n < e.length; n++) if (e[n].checked && e[n].form === t) return e[n];
+ }(t, e.form);
+ return n === e || n === void 0 && t[0] === e;
+}
+function Cu(e) {
+ for (var t = document.activeElement, n = e.querySelectorAll(xu.join(",")), r = [], o = 0; o < n.length; o++) {
+ var i = n[o];
+ (t === i || !i.disabled && ku(i) > -1 && !Eu(i) && Su(i)) && r.push(i);
+ }
+ return r;
+}
+function ku(e) {
+ var t = parseInt(e.getAttribute("tabindex"), 10);
+ return isNaN(t) ? function(e) {
+ return e.getAttribute("contentEditable");
+ }(e) ? 0 : e.tabIndex : t;
+}
+var _u = function(e) {
+ var t = e.container, n = e.initialFocusRef, r = (0, s.useRef)();
+ return (0, s.useEffect)((function() {
+ var e = function(e) {
+ t != null && t.current && function(e, t) {
+ if (e && e.key === "Tab") {
+ if (!t || !t.contains) return process, !1;
+ if (!t.contains(e.target)) return !1;
+ var n = Cu(t), r = n[0], o = n[n.length - 1];
+ e.shiftKey && e.target === r ? (o.focus(), e.preventDefault()) : !e.shiftKey && e.target === o && (r.focus(), e.preventDefault());
+ }
+ }(e, t.current);
+ };
+ if (wu && document.addEventListener("keydown", e), wu && t?.current) {
+ var o = function() {
+ xu.findIndex((function(e) {
+ return document.activeElement?.matches(e);
+ })) !== -1 && (r.current = document.activeElement);
+ };
+ if (n) o(), requestAnimationFrame((function() {
+ var e;
+ (e = n.current) == null || e.focus();
+ }));
+ else {
+ var i = Cu(t.current);
+ i[0] && (o(), i[0].focus());
+ }
+ }
+ return function() {
+ var t;
+ wu && (document.removeEventListener("keydown", e), (t = r.current) == null || t.focus());
+ };
+ }), [t, n]), null;
+}, Tu = [], Iu = function(e, t, n, r, o) {
+ var i = (0, s.useRef)(null);
+ (0, s.useEffect)((function() {
+ return t && e.current && r && (i.current = e.current, function(e, t) {
+ if (e) {
+ if (!du.some((function(t) {
+ return t.targetElement === e;
+ }))) {
+ var n = {
+ targetElement: e,
+ options: t || {}
+ };
+ du = [].concat(function(e) {
+ if (Array.isArray(e)) {
+ for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
+ return n;
+ }
+ return Array.from(e);
+ }(du), [n]), uu ? (e.ontouchstart = function(e) {
+ e.targetTouches.length === 1 && (pu = e.targetTouches[0].clientY);
+ }, e.ontouchmove = function(t) {
+ t.targetTouches.length === 1 && function(e, t) {
+ var n = e.targetTouches[0].clientY - pu;
+ !mu(e.target) && (t && t.scrollTop === 0 && n > 0 || function(e) {
+ return !!e && e.scrollHeight - e.scrollTop <= e.clientHeight;
+ }(t) && n < 0 ? vu(e) : e.stopPropagation());
+ }(t, e);
+ }, fu ||= (document.addEventListener("touchmove", vu, lu ? { passive: !1 } : void 0), !0)) : function(e) {
+ if (gu === void 0) {
+ var t = !!e && !0 === e.reserveScrollBarGap, n = window.innerWidth - document.documentElement.clientWidth;
+ t && n > 0 && (gu = document.body.style.paddingRight, document.body.style.paddingRight = n + "px");
+ }
+ hu === void 0 && (hu = document.body.style.overflow, document.body.style.overflow = "hidden");
+ }(t);
+ }
+ } else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");
+ }(e.current, { reserveScrollBarGap: o })), function() {
+ var e;
+ i.current &&= ((e = i.current) ? (du = du.filter((function(t) {
+ return t.targetElement !== e;
+ })), uu ? (e.ontouchstart = null, e.ontouchmove = null, fu && du.length === 0 && (document.removeEventListener("touchmove", vu, lu ? { passive: !1 } : void 0), fu = !1)) : du.length || (gu !== void 0 && (document.body.style.paddingRight = gu, gu = void 0), hu !== void 0 && (document.body.style.overflow = hu, hu = void 0))) : console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices."), null);
+ };
+ }), [
+ t,
+ n,
+ e,
+ r,
+ o
+ ]);
+}, Ou = {
+ root: "react-responsive-modal-root",
+ overlay: "react-responsive-modal-overlay",
+ overlayAnimationIn: "react-responsive-modal-overlay-in",
+ overlayAnimationOut: "react-responsive-modal-overlay-out",
+ modalContainer: "react-responsive-modal-container",
+ modalContainerCenter: "react-responsive-modal-containerCenter",
+ modal: "react-responsive-modal-modal",
+ modalAnimationIn: "react-responsive-modal-modal-in",
+ modalAnimationOut: "react-responsive-modal-modal-out",
+ closeButton: "react-responsive-modal-closeButton"
+}, Pu = s.default.forwardRef((function(e, t) {
+ var a = e.open, l = e.center, c = e.blockScroll, u = c === void 0 || c, d = e.closeOnEsc, f = d === void 0 || d, p = e.closeOnOverlayClick, h = p === void 0 || p, g = e.container, m = e.showCloseIcon, v = m === void 0 || m, y = e.closeIconId, b = e.closeIcon, w = e.focusTrapped, x = w === void 0 || w, E = e.initialFocusRef, S = E === void 0 ? void 0 : E, C = e.animationDuration, k = C === void 0 ? 300 : C, _ = e.classNames, T = e.styles, I = e.role, O = I === void 0 ? "dialog" : I, j = e.ariaDescribedby, P = e.ariaLabelledby, A = e.containerId, N = e.modalId, M = e.onClose, L = e.onEscKeyDown, D = e.onOverlayClick, R = e.onAnimationEnd, z = e.children, $ = e.reserveScrollBarGap, B = function(e, t = { isStateful: !0 }) {
+ let n = function(e = null) {
+ let [t, n] = s.default.useState(e), { current: r } = s.default.useRef({ current: t });
+ return Object.defineProperty(r, "current", {
+ get: () => t,
+ set: (e) => {
+ Object.is(t, e) || (t = e, n(e));
+ }
+ }), r;
+ }(null), r = (0, s.useRef)(null), o = t.isStateful ? n : r;
+ return s.default.useEffect((() => {
+ !e || (typeof e == "function" ? e(o.current) : e.current = o.current);
+ })), o;
+ }(t), F = (0, s.useRef)(null), U = (0, s.useRef)(null), H = (0, s.useRef)(null);
+ H.current === null && wu && (H.current = document.createElement("div"));
+ var W = (0, s.useState)(!1), V = W[0], q = W[1];
+ (function(e, t) {
+ (0, s.useEffect)((function() {
+ return t && (n = e, Tu.push(n)), function() {
+ var t = e;
+ Tu = Tu.filter((function(e) {
+ return e !== t;
+ }));
+ };
+ var n;
+ }), [t, e]);
+ })(F, a), Iu(F, a, V, u, $);
+ var G = function(e) {
+ var t;
+ e.keyCode === 27 && (t = F, Tu.length && Tu[Tu.length - 1] === t) && (L?.(e), f && M());
+ };
+ (0, s.useEffect)((function() {
+ return function() {
+ V && (H.current && !g && document.body.contains(H.current) && document.body.removeChild(H.current), document.removeEventListener("keydown", G));
+ };
+ }), [V]), (0, s.useEffect)((function() {
+ a && !V && (q(!0), !H.current || g || document.body.contains(H.current) || document.body.appendChild(H.current), document.addEventListener("keydown", G));
+ }), [a]);
+ var Y = function() {
+ U.current = !1;
+ }, Z = g || H.current, K = a ? _?.overlayAnimationIn ?? Ou.overlayAnimationIn : _?.overlayAnimationOut ?? Ou.overlayAnimationOut, X = a ? _?.modalAnimationIn ?? Ou.modalAnimationIn : _?.modalAnimationOut ?? Ou.modalAnimationOut;
+ return V && Z ? Qa.default.createPortal(s.default.createElement("div", {
+ className: su()(Ou.root, _?.root),
+ style: T?.root,
+ "data-testid": "root"
+ }, s.default.createElement("div", {
+ className: su()(Ou.overlay, _?.overlay),
+ "data-testid": "overlay",
+ "aria-hidden": !0,
+ style: yu({ animation: K + " " + k + "ms" }, T?.overlay)
+ }), s.default.createElement("div", {
+ ref: F,
+ id: A,
+ className: su()(Ou.modalContainer, l && Ou.modalContainerCenter, _?.modalContainer),
+ style: T?.modalContainer,
+ "data-testid": "modal-container",
+ onClick: function(e) {
+ U.current === null && (U.current = !0), U.current ? (D?.(e), h && M(), U.current = null) : U.current = null;
+ }
+ }, s.default.createElement("div", {
+ ref: B,
+ className: su()(Ou.modal, _?.modal),
+ style: yu({ animation: X + " " + k + "ms" }, T?.modal),
+ onMouseDown: Y,
+ onMouseUp: Y,
+ onClick: Y,
+ onAnimationEnd: function() {
+ a || q(!1), R?.();
+ },
+ id: N,
+ role: O,
+ "aria-modal": "true",
+ "aria-labelledby": P,
+ "aria-describedby": j,
+ "data-testid": "modal",
+ tabIndex: -1
+ }, x && s.default.createElement(_u, {
+ container: B,
+ initialFocusRef: S
+ }), z, v && s.default.createElement(bu, {
+ classes: Ou,
+ classNames: _,
+ styles: T,
+ closeIcon: b,
+ onClick: M,
+ id: y
+ })))), Z) : null;
+}));
+function Au({ hasNoBorder: e = !1, children: t, ...n }) {
+ return (0, Go.jsx)(Nu, {
+ $hasBorder: !e,
+ ...n,
+ children: t
+ });
+}
+const Nu = ao.aside.withConfig({
+ displayName: "Container",
+ componentId: "sc-1pvyynk-0"
+})([
+ "overflow-y:auto;box-sizing:border-box;width:272px;height:100%;padding:",
+ " 0;border-right:",
+ ";"
+], po.spacing5, ((e) => e.$hasBorder ? `1px solid ${po.gray100}` : void 0)), Mu = ro([
+ "color:",
+ ";font-size:",
+ ";font-family:",
+ ";line-height:",
+ ";"
+], po.colorText, po.fontSizeBase, po.brandFontStackBase, po.lineHeightBase), Lu = (ao.div.withConfig({
+ displayName: "BaseStyles",
+ componentId: "sc-9qrbu4-0"
+})(["", ""], Mu), `b-modal-${qc()}`), Du = {
+ root: Lu,
+ overlay: `${Lu}__overlay`,
+ modalContainer: `${Lu}__container`,
+ modal: `${Lu}__modal`,
+ modalSmall: `${Lu}__modal--small`,
+ modalMedium: `${Lu}__modal--medium`,
+ modalFullScreen: `${Lu}__modal--full-screen`,
+ modalHasSidebar: `${Lu}__modal--has-sidebar`,
+ overlayAnimationIn: `${Lu}-overlay-in`,
+ overlayAnimationOut: `${Lu}-overlay-out`,
+ modalAnimationIn: `${Lu}-container-in`,
+ modalAnimationOut: `${Lu}-container-out`
+}, Ru = lo(((e) => ro([
+ "@keyframes ",
+ "{0%{opacity:0;}100%{opacity:1;}}@keyframes ",
+ "{0%{opacity:1;}100%{opacity:0;}}@keyframes ",
+ "{0%{opacity:0.5;transform:scale(0.95);}100%{opacity:1;transform:scale(1);}}@keyframes ",
+ "{0%{opacity:1;transform:scale(1);}100%{opacity:0;transform:scale(0.95);}}.",
+ ",.",
+ ",.",
+ "{animation-fill-mode:forwards !important;}.",
+ ",.",
+ "{position:fixed;top:0;right:0;bottom:0;left:0;z-index:",
+ ";}.",
+ "{background:",
+ ";}.",
+ "{display:flex;justify-content:center;align-items:center;padding:",
+ ";}.",
+ "{",
+ " position:relative;display:grid;grid-template-areas:'sidebar header' 'sidebar content' 'sidebar footer';grid-template-rows:auto 1fr auto;grid-template-columns:auto var(--ds-modal-content-width);box-sizing:border-box;border-radius:",
+ ";background:",
+ ";box-shadow:",
+ ";}.",
+ "{--ds-modal-content-width:520px;max-height:100%;}.",
+ ".",
+ "{max-height:min(520px,100%);}.",
+ "{--ds-modal-content-width:minmax(auto,866px);max-height:min(752px,100%);}.",
+ "{--ds-modal-content-width:minmax( 0,1fr );width:100%;height:100%;min-height:0;}"
+], Du.overlayAnimationIn, Du.overlayAnimationOut, Du.modalAnimationIn, Du.modalAnimationOut, Du.overlay, Du.modalContainer, Du.modal, Du.overlay, Du.modalContainer, e.zIndex, Du.overlay, po.gray200a, Du.modalContainer, po.spacing6, Du.modal, Mu, po.radiusLarge, po.gray10, po.elevation8, Du.modalSmall, Du.modalSmall, Du.modalHasSidebar, Du.modalMedium, Du.modalFullScreen))), zu = ao.div.withConfig({
+ displayName: "HeaderStyled",
+ componentId: "sc-13hyd7w-0"
+})([
+ "display:flex;grid-area:header;gap:",
+ ";align-items:center;box-sizing:border-box;height:72px;padding:",
+ " ",
+ ";",
+ ""
+], po.spacing4, po.spacing4, po.spacing6, ((e) => !e.$hideCloseIcon && ro([
+ "padding-right:calc( 50px + ",
+ " + ",
+ " );"
+], po.spacing5, po.spacing4))), $u = ao.div.withConfig({
+ displayName: "AdditionalActions",
+ componentId: "sc-13hyd7w-1"
+})(["display:flex;gap:", ";"], po.spacing3), Bu = ao.div.withConfig({
+ displayName: "BackButton",
+ componentId: "sc-13hyd7w-2"
+})(["margin-left:calc(", " * -1);"], po.spacing3), Fu = ao.div.withConfig({
+ displayName: "Headings",
+ componentId: "sc-13hyd7w-3"
+})(["flex:1;min-width:0;"]), Uu = ao.h2.withConfig({
+ displayName: "Title",
+ componentId: "sc-13hyd7w-4"
+})([
+ "",
+ " overflow:hidden;margin:0;color:",
+ ";text-overflow:ellipsis;white-space:nowrap;"
+], Vi.uiTextL, po.colorText), Hu = ao.h3.withConfig({
+ displayName: "SecondaryInformation",
+ componentId: "sc-13hyd7w-5"
+})([
+ "",
+ " overflow:hidden;margin:0;color:",
+ ";text-overflow:ellipsis;white-space:nowrap;"
+], Vi.uiTextS, po.colorTextMuted), Wu = ao.div.withConfig({
+ displayName: "ContentStyled",
+ componentId: "sc-13hyd7w-6"
+})([
+ "position:relative;grid-area:content;min-height:0;&:nth-last-child(2){--ds-modal-content-bottom-radius:",
+ ";}&::before,&::after{content:'';position:absolute;left:0;display:block;width:100%;height:4px;}&::before{top:0;z-index:1;background:linear-gradient(to bottom,",
+ ",transparent);box-shadow:inset 0 1px 0 0 ",
+ ";}&::after{bottom:0;border-bottom-right-radius:var(--ds-modal-content-bottom-radius);border-bottom-left-radius:var(--ds-modal-content-bottom-radius);background:linear-gradient(to top,",
+ ",transparent);box-shadow:inset 0 -1px 0 0 ",
+ ";}"
+], po.radiusLarge, po.gray50a, po.gray100a, po.gray50a, po.gray100a), Vu = ao.div.withConfig({
+ displayName: "ContentInner",
+ componentId: "sc-13hyd7w-7"
+})([
+ "",
+ " position:relative;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;height:100%;padding:",
+ " ",
+ ";color:",
+ ";font-family:",
+ ";scroll-behavior:smooth;&::before,&::after{content:'';position:relative;left:0;z-index:1;display:block;height:",
+ ";}&::before{margin:calc(",
+ " * -1) calc(",
+ " * -1) 0;background:linear-gradient( to bottom,",
+ ",",
+ " 50%,rgb(255 255 255 / 0) );}&::after{margin:0 calc(",
+ " * -1) calc(",
+ " * -1);border-bottom-right-radius:var(--ds-modal-content-bottom-radius);border-bottom-left-radius:var(--ds-modal-content-bottom-radius);background:linear-gradient( to top,",
+ ",",
+ " 50%,rgb(255 255 255 / 0) );}"
+], Vi.paragraphM, po.spacing5, po.spacing6, po.colorText, po.brandFontStackBase, po.spacing5, po.spacing5, po.spacing6, po.gray10, po.gray10, po.spacing6, po.spacing5, po.gray10, po.gray10), qu = ao.div.withConfig({
+ displayName: "ContentExpander",
+ componentId: "sc-13hyd7w-8"
+})(["min-height:100%;"]), Gu = ao.div.withConfig({
+ displayName: "FooterStyled",
+ componentId: "sc-13hyd7w-9"
+})(["display:flex;grid-area:footer;padding:", ";"], po.spacing6), Yu = ao.div.withConfig({
+ displayName: "ActionsRight",
+ componentId: "sc-13hyd7w-10"
+})(["margin-left:auto;"]), Zu = ao.div.withConfig({
+ displayName: "CloseButton",
+ componentId: "sc-13hyd7w-11"
+})([
+ "position:absolute;top:",
+ ";right:",
+ ";"
+], po.spacing5, po.spacing5), Ku = ao.div.withConfig({
+ displayName: "SidebarStyled",
+ componentId: "sc-13hyd7w-12"
+})(["grid-area:sidebar;"]), Xu = s.default.createContext({
+ hideCloseIcon: !1,
+ setHasSidebar: () => {}
+}), Ju = {
+ small: Du.modalSmall,
+ medium: Du.modalMedium,
+ fullscreen: Du.modalFullScreen
+};
+function Qu({ isOpen: e, onClose: t, size: n = "small", isCloseButtonHidden: r = !1, isClosedOnOverlayClick: o = !1, onCloseAnimationEnd: i, children: a, container: l, ...c }) {
+ let [u, d] = (0, s.useState)(!1), f = {
+ root: Du.root,
+ overlay: Du.overlay,
+ modalContainer: Du.modalContainer,
+ modal: `${Du.modal} ${Ju[n]} ${u ? Du.modalHasSidebar : ""}`,
+ modalAnimationIn: Du.modalAnimationIn,
+ modalAnimationOut: Du.modalAnimationOut,
+ overlayAnimationIn: Du.overlayAnimationIn,
+ overlayAnimationOut: Du.overlayAnimationOut
+ }, { translate: p } = ql(), h = !r, g = Cl("modal"), m = (0, s.useMemo)((() => ({
+ hideCloseIcon: r,
+ setHasSidebar: d
+ })), [r]), [v, y] = (0, s.useState)(!1);
+ return (0, s.useEffect)((() => {
+ e && y(!0);
+ }), [e]), (0, Go.jsxs)(Xu.Provider, {
+ value: m,
+ children: [(0, Go.jsxs)(Pu, {
+ open: e,
+ onClose: t,
+ classNames: f,
+ animationDuration: 200,
+ showCloseIcon: !1,
+ closeOnEsc: h,
+ closeOnOverlayClick: o,
+ container: l,
+ onAnimationEnd: () => {
+ e || (y(!1), i?.());
+ },
+ ...c,
+ children: [e || v ? a : null, h && (0, Go.jsx)(Zu, { children: (0, Go.jsx)(il, {
+ variant: "clean",
+ icon: (0, Go.jsx)(ai, {}),
+ "aria-label": p("modal.close"),
+ title: p("modal.close"),
+ onClick: t
+ }) })]
+ }), (0, Go.jsx)(Ru, { zIndex: g })]
+ });
+}
+function ed({ isOpen: e, onClose: t, size: n, isCloseButtonHidden: r, isClosedOnOverlayClick: o, title: i, secondaryInfo: a, additionalActions: s, thumbnail: l, children: c, actionPrimary: u, actionSecondary: d, actionTertiary: f, container: p, onCloseAnimationEnd: h, sidebar: g, ...m }) {
+ return (0, Go.jsxs)(Qu, {
+ isOpen: e,
+ onClose: t,
+ isClosedOnOverlayClick: o,
+ isCloseButtonHidden: r,
+ size: n,
+ onCloseAnimationEnd: h,
+ container: p,
+ ...m,
+ children: [
+ (0, Go.jsx)(Qu.Header, {
+ title: i,
+ secondaryInfo: a,
+ thumbnail: l,
+ additionalActions: s
+ }),
+ g ? (0, Go.jsx)(Qu.Sidebar, { children: g }) : null,
+ (0, Go.jsx)(Qu.Content, { children: c }),
+ u && (0, Go.jsx)(Qu.Footer, {
+ actionPrimary: u,
+ actionSecondary: d,
+ actionTertiary: f
+ })
+ ]
+ });
+}
+function td(e) {
+ return (0, Go.jsx)(ed, { ...e });
+}
+function nd(e) {
+ return s.default.createElement(td, {
+ title: Kl("Send error report"),
+ isOpen: e.isOpen,
+ onClose: e.onCancel,
+ actionPrimary: s.default.createElement(il, {
+ variant: "primary",
+ title: Kl("Send report"),
+ onClick: e.onDone
+ }, Kl("Send report")),
+ actionSecondary: s.default.createElement(il, {
+ variant: "secondary",
+ title: Kl("Cancel"),
+ onClick: e.onCancel
+ }, Kl("Cancel")),
+ container: e.container
+ }, s.default.createElement(rd, null, Kl("We have created a report that you can send us to help us prevent this from happening in the future.")), s.default.createElement(od, { "data-testid": "error-stack" }, e.error.stack?.split("\n").map(((e) => s.default.createElement(s.default.Fragment, { key: e }, e, s.default.createElement("br", null))))), s.default.createElement(id, null, Kl("We will treat this report as confidential and anonymous.")));
+}
+Qu.Header = function({ title: e, secondaryInfo: t, thumbnail: n, backButton: r, additionalActions: o }) {
+ let { hideCloseIcon: i } = (0, s.useContext)(Xu);
+ return (0, Go.jsxs)(zu, {
+ $hideCloseIcon: i,
+ children: [
+ r && (0, Go.jsx)(Bu, { children: (0, Go.jsx)(il, {
+ variant: "clean",
+ icon: (0, Go.jsx)(Jo, {}),
+ "aria-label": r.title,
+ ...r
+ }) }),
+ n && (0, Go.jsx)("div", { children: n }),
+ (0, Go.jsxs)(Fu, { children: [(0, Go.jsx)(Uu, { children: e }), t && (0, Go.jsx)(Hu, { children: t })] }),
+ o && (0, Go.jsx)($u, { children: o })
+ ]
+ });
+}, Qu.Content = function({ children: e }) {
+ return (0, Go.jsx)(Wu, { children: (0, Go.jsx)(Vu, { children: (0, Go.jsx)(qu, { children: e }) }) });
+}, Qu.Footer = function({ actionPrimary: e, actionSecondary: t, actionTertiary: n }) {
+ return (0, Go.jsxs)(Gu, { children: [n, (0, Go.jsx)(Yu, { children: (0, Go.jsxs)(Bs, {
+ gap: "4",
+ children: [t, e]
+ }) })] });
+}, Qu.Sidebar = function({ children: e }) {
+ let { setHasSidebar: t } = (0, s.useContext)(Xu);
+ return (0, s.useEffect)((() => (t(!0), () => {
+ t(!1);
+ }))), (0, Go.jsx)(Ku, { children: (0, Go.jsx)(Au, { children: e }) });
+};
+const rd = ao.div`
+ line-height: ${po.lineHeightText};
+`, od = ao.div`
+ margin: ${po.spacing5} 0;
+ flex-grow: 1;
+ align-self: stretch;
+ background-color: ${po.gray25};
+ border-radius: ${po.radiusMedium};
+ border: 1px solid ${po.gray200};
+ line-height: ${po.lineHeightText};
+ overflow: scroll;
+ padding: ${po.spacing5} ${po.spacing4};
+ max-height: 200px;
+`, id = ao.span`
+ color: ${po.colorTextDisabled};
+ line-height: ${po.lineHeightBase};
+ font-size: ${po.fontSize75};
+`;
+function ad({ error: e, onRetry: t, sentryClient: n }) {
+ let r = mc(), [o, i] = (0, s.useState)(!1), [a, l] = (0, s.useState)(!1);
+ return (0, s.useEffect)((() => {
+ pc.error(e);
+ }), [e]), s.default.createElement(sd, null, s.default.createElement(nu, {
+ isReportSent: a,
+ onClickSend: () => {
+ i(!0);
+ },
+ onClickRetry: t
+ }), s.default.createElement(nd, {
+ isOpen: o,
+ error: e,
+ container: r,
+ onDone: () => {
+ n?.captureException(e), i(!1), l(!0);
+ },
+ onCancel: () => {
+ i(!1);
+ }
+ }));
+}
+const sd = ao.div`
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ background: ${({ theme: e }) => e.colors?.["ui-0"] || "#fff"};
+ font-family: ${({ theme: e }) => e.fonts?.sans || "sans-serif"};
+ font-size: 1rem;
+ color: ${({ theme: e }) => e.colors?.["body-500"] || "#666"};
+`;
+var ld = class extends s.default.Component {
+ constructor(e) {
+ super(e), this.state = { error: null };
+ }
+ static getDerivedStateFromError(e) {
+ return { error: e };
+ }
+ render() {
+ return this.state.error ? s.default.createElement(ad, {
+ error: this.state.error,
+ sentryClient: this.props.sentryClient,
+ onRetry: () => this.setState({ error: null })
+ }) : this.props.children;
+ }
+};
+function cd() {
+ return s.default.createElement(ud, {
+ role: "alert",
+ "aria-live": "polite"
+ }, " ", s.default.createElement(Yl, { isRefreshingSpinner: !0 }), " ");
+}
+const ud = ao.div`
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 100%;
+ width: 100%;
+ background-color: #fff;
+`, dd = (0, s.createContext)(null);
+function fd(e) {
+ var u;
+ Jl(e.language ?? "en_US");
+ let [d, f, p] = function() {
+ let [n, r] = (0, s.useState)(void 0), [o, i] = (0, s.useState)(localStorage.getItem("cvrt") ?? void 0), [a, l] = (0, s.useState)(localStorage.getItem("cvad") ?? void 0), [c, u] = (0, s.useState)(h()), d = (0, s.useRef)();
+ function f(e) {
+ r((() => e.getAccessToken)), i(e.refreshToken), l(e.accountDomain), u(h(e.getAccessToken, e.refreshToken)), e.accountDomain && localStorage.setItem("cvad", e.accountDomain), e.refreshToken && localStorage.setItem("cvrt", e.refreshToken), d.current && clearTimeout(d.current), e.expiresIn && (d.current = setTimeout((() => {
+ r(void 0);
+ }), 1e3 * e.expiresIn));
+ }
+ function p() {
+ r(void 0), i(void 0), l(localStorage.getItem("cvad") ?? void 0), u("not-authenticated"), localStorage.removeItem("cvrt"), d.current && clearTimeout(d.current);
+ }
+ function h(e = n, t = o) {
+ return e === void 0 ? t === void 0 ? "not-authenticated" : "refreshing" : "authenticated";
+ }
+ return (0, s.useEffect)((() => () => {
+ d.current && clearTimeout(d.current);
+ }), []), (0, s.useEffect)((() => {
+ n && n() || !o || !a || (u("refreshing"), function(e, t) {
+ return ic(this, void 0, void 0, (function* () {
+ let n = uc(t) + "token", r = new URLSearchParams({
+ client_id: ac,
+ refresh_token: e,
+ grant_type: "refresh_token"
+ });
+ try {
+ let e = yield fetch(n, {
+ method: "POST",
+ headers: {
+ Accept: "application/json",
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
+ },
+ body: r
+ });
+ if (!e.ok) return ec(`Failed to fetch refresh token: ${e.status}`);
+ let t = yield e.json();
+ return Ql({
+ accessToken: t.access_token,
+ expiresIn: t.expires_in
+ });
+ } catch (e) {
+ return ec(e.toString());
+ }
+ }));
+ }(o, a).then(((e) => {
+ tc(e) ? f({
+ getAccessToken: () => e.value.accessToken,
+ expiresIn: e.value.expiresIn,
+ refreshToken: o,
+ accountDomain: a
+ }) : (pc.error(e.error), p());
+ })));
+ }), [
+ n,
+ o,
+ a
+ ]), [
+ {
+ getAccessToken: n,
+ accountDomain: a,
+ status: c
+ },
+ f,
+ p
+ ];
+ }(), [h, g, m] = eu(e.portal?.url ?? d.accountDomain), [v, y] = (0, s.useState)(!1);
+ (0, s.useEffect)((() => {
+ var t;
+ (t = e.authentication) != null && t.hideLogout && !e.authentication?.getAccessToken && pc.error("The hideLogout property can only be used in combination with getAccessToken property");
+ }), [e.authentication?.hideLogout, e.authentication?.getAccessToken]), (0, s.useEffect)((() => {
+ var t;
+ (t = e.authentication) != null && t.getAccessToken && f({
+ getAccessToken: e.authentication.getAccessToken,
+ accountDomain: e.portal?.url
+ });
+ }), [e.authentication?.getAccessToken]), (0, s.useEffect)((() => {
+ let e = !0;
+ return !0 === v && fc(h).then(((t) => {
+ e && (function(e) {
+ if (tc(e)) {
+ let { accessToken: t, refreshToken: n, expiresIn: r } = e.value;
+ f({
+ getAccessToken: () => t,
+ refreshToken: n,
+ expiresIn: r,
+ accountDomain: h
+ });
+ } else pc.error(e.error);
+ }(t), y(!1));
+ })), () => {
+ e = !1;
+ };
+ }), [v, h]);
+ let b = Object.assign(Object.assign({}, d), {
+ logout: function() {
+ var t;
+ p(), (t = e.onLogout) == null || t.call(e);
+ },
+ hideLogout: !!e.authentication?.getAccessToken && e.authentication.hideLogout
+ });
+ switch (d.status) {
+ case "authenticated": return s.default.createElement(dd.Provider, { value: b }, e.children);
+ case "not-authenticated": return s.default.createElement(Cc, { isContainerMode: !0 }, s.default.createElement(Qc, {
+ domainValue: h,
+ domainStatus: m,
+ onChangeDomain: g,
+ isSubmitting: v,
+ isEditable: (u = e.portal?.editable) == null || u,
+ onSubmit: function() {
+ y(!0);
+ }
+ }));
+ case "refreshing": return s.default.createElement(cd, null);
+ }
+}
+const pd = (e) => s.default.createElement(ld, null, s.default.createElement(fd, Object.assign({}, e))), hd = () => (0, s.useContext)(dd)?.status === "authenticated" || !1, gd = () => (0, s.useContext)(dd), md = "transformBaseURL", yd = {
+ year: "numeric",
+ month: "long",
+ day: "2-digit"
+};
+var wd = function(e, t) {
+ var n = {};
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") {
+ var o = 0;
+ for (r = Object.getOwnPropertySymbols(e); o < r.length; o++) t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
+ }
+ return n;
+};
+function xd(e) {
+ if (e[md]) {
+ let t = e, r = t[md], o = wd(t, ["transformBaseURL"]);
+ return Object.assign(Object.assign({}, o), { transformBaseUrl: Object.assign({}, r) });
+ }
+ return e;
+}
+var Ed = function(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+};
+const Sd = /* @__PURE__ */ new Map();
+function Cd(e) {
+ return Ed(this, void 0, void 0, (function* () {
+ let { query: t, variables: n, auth: r, noCache: o, isNewGQL: i } = e;
+ if (!r) return ec("No authentication provided");
+ let a = r.getAccessToken && r.getAccessToken(), s = r.accountDomain === void 0 ? `https://${window.location.host}` : oc(r.accountDomain.trim());
+ s.charAt(s.length - 1) === "/" && (s = s.slice(0, -1));
+ let l = `${s}:${t}:${JSON.stringify(n)}:${a}`;
+ if (Sd.has(l) && !o) return Ql(Sd.get(l));
+ let c = {
+ Accept: "application/json",
+ "Content-Type": "application/json",
+ "X-Bynder-Integration": "UCV/v5.1.2"
+ }, u = {
+ method: "post",
+ headers: a === void 0 ? c : Object.assign(Object.assign({}, c), { Authorization: `Bearer ${a}` }),
+ body: JSON.stringify({
+ query: t,
+ variables: n
+ })
+ }, d, f, p = i ? "/v7/api/graphql" : "/graphql";
+ try {
+ d = yield (yield fetch(`${s}${p}`, u)).json(), f = function(e) {
+ return (e?.searchAssets?.assets)?.nodes.length ? Object.assign(Object.assign({}, e), { searchAssets: Object.assign(Object.assign({}, e.searchAssets), { assets: Object.assign(Object.assign({}, e.searchAssets.assets), { nodes: (e.searchAssets?.assets)?.nodes.map(((e) => {
+ if (e.files) {
+ let t = xd(e.files);
+ return Object.assign(Object.assign({}, e), { files: Object.assign({}, t) });
+ }
+ return e;
+ })) }) }) }) : e;
+ }(d.data);
+ } catch (e) {
+ return ec(e);
+ }
+ return d.errors === void 0 ? (o || (Sd.set(l, f), Sd.size > 50 && Sd.delete(Sd.keys().next().value)), Ql(f)) : ec(d.errors.map(((e) => e.message)).join(","));
+ }));
+}
+var kd = function(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+};
+function _d(e) {
+ return { searchAssets: { assets: e.similaritySearch.assets } };
+}
+const Td = ({ assetIds: e, textQuery: t, auth: n, noCache: r, language: o }) => Cd({
+ query: "\nquery QueriesIO($assetIds: [String!], $textQuery: String, $language: String) {\n similaritySearch(assetIds: $assetIds, textQuery: $textQuery) {\n assets {\n nodes {\n id\n __typename\n name\n extensions\n url\n derivatives {\n thumbnail\n }\n files\n isArchived\n isLimitedUse\n isWatermarked\n similarityScore\n metaproperties {\n nodes {\n options {\n label(language: $language)\n assetCount\n id\n }\n id\n label(language: $language)\n zIndex\n showInGridView,\n showInListView\n }\n },\n textMetaproperties {\n name\n label\n showInGridView\n showInListView\n value\n zIndex\n type\n }\n },\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n}",
+ variables: {
+ assetIds: e,
+ textQuery: t,
+ language: o
+ },
+ auth: n,
+ noCache: r,
+ isNewGQL: !0
+}), Id = (e, t) => {
+ let r = t ?? e;
+ if (r.tag !== "Failure") return r.value?.searchAssets.assets;
+}, Od = (0, s.createContext)(null);
+function jd({ children: e }) {
+ let [t, n] = (0, s.useState)(!1), [r, o] = (0, s.useState)(!1), [i, a] = (0, s.useState)(!1), [l, c] = (0, s.useState)(void 0), { search: u, connection: d, resetData: f } = function() {
+ let t = gd(), { language: n } = vo(), [r, o] = (0, s.useState)({
+ tag: "Loading",
+ value: null
+ }), [i, a] = (0, s.useState)(void 0), [l, c] = (0, s.useState)(void 0), u = (e, r, i) => kd(this, void 0, void 0, (function* () {
+ o(((e) => ({
+ tag: "Loading",
+ value: e.tag === "Failure" ? null : e.value
+ }))), e && a(e), r && c(r);
+ let s = yield Td({
+ assetIds: e,
+ textQuery: r,
+ language: n,
+ auth: t,
+ noCache: !1
+ });
+ if (!nc(s)) return !!s.value.similaritySearch && (d(s, i), !0);
+ o({
+ tag: "Failure",
+ value: s.error
+ });
+ })), d = (e, t) => {
+ Id(r) && t ? o(((t) => {
+ let o = Id(t)?.nodes ?? [], i = _d(e.value);
+ return {
+ tag: "Loaded",
+ value: { searchAssets: { assets: Object.assign(Object.assign({}, i.searchAssets.assets), { nodes: [...o, ...i.searchAssets.assets.nodes] }) } }
+ };
+ })) : o({
+ tag: "Loaded",
+ value: _d(e.value)
+ });
+ };
+ return {
+ search: u,
+ resetData: () => {
+ o({
+ tag: "Loading",
+ value: null
+ });
+ },
+ connection: {
+ data: r,
+ executeQuery: () => u(i),
+ isLoading: !r || r.tag === "Loading",
+ loadMore: () => u(i, l, Id(r)?.pageInfo.endCursor),
+ hasNextPage: !!Id(r)?.pageInfo.hasNextPage
+ }
+ };
+ }(), p = (0, s.useMemo)((() => ({
+ isEnabled: t,
+ isSelected: r,
+ setIsEnabled: n,
+ setIsSelected: o,
+ isNLSSelected: i,
+ setIsNLSSelected: a,
+ search: u,
+ connection: d,
+ resetData: f,
+ NLSSearchText: l,
+ setNLSSearchText: c
+ })), [
+ t,
+ r,
+ i,
+ u,
+ d,
+ f,
+ l
+ ]);
+ return s.default.createElement(Od.Provider, { value: p }, e);
+}
+function Pd() {
+ let e = (0, s.useContext)(Od);
+ if (e === null) throw Error("useSimilaritySearch must be used within a SimilaritySearchProvider");
+ return e;
+}
+function Ad(e, t, n) {
+ return e[t] ? e[t][0] ? e[t][0][n] : e[t][n] : t === "contentBoxSize" ? e.contentRect[n === "inlineSize" ? "width" : "height"] : void 0;
+}
+function Nd({ children: e, tooltipPosition: t = "top-left", ...n }) {
+ let [r, o] = (0, s.useState)(!1), i = (0, s.useRef)(null);
+ function a() {
+ if (i.current) {
+ let e = i.current.offsetWidth < i.current.scrollWidth;
+ o(e);
+ }
+ }
+ return function(e) {
+ e === void 0 && (e = {});
+ var t = e.onResize, n = (0, s.useRef)(void 0);
+ n.current = t;
+ var r = e.round || Math.round, o = (0, s.useRef)(), i = (0, s.useState)({
+ width: void 0,
+ height: void 0
+ }), a = i[0], l = i[1], c = (0, s.useRef)(!1);
+ (0, s.useEffect)((function() {
+ return c.current = !1, function() {
+ c.current = !0;
+ };
+ }), []);
+ var u = (0, s.useRef)({
+ width: void 0,
+ height: void 0
+ }), d = function(e, t) {
+ var n = (0, s.useRef)(null), r = (0, s.useRef)(null);
+ r.current = t;
+ var o = (0, s.useRef)(null);
+ (0, s.useEffect)((function() {
+ i();
+ }));
+ var i = (0, s.useCallback)((function() {
+ var t = o.current, i = r.current, a = t || (i ? i instanceof Element ? i : i.current : null);
+ n.current && n.current.element === a && n.current.subscriber === e || (n.current && n.current.cleanup && n.current.cleanup(), n.current = {
+ element: a,
+ subscriber: e,
+ cleanup: a ? e(a) : void 0
+ });
+ }), [e]);
+ return (0, s.useEffect)((function() {
+ return function() {
+ n.current && n.current.cleanup && (n.current.cleanup(), n.current = null);
+ };
+ }), []), (0, s.useCallback)((function(e) {
+ o.current = e, i();
+ }), [i]);
+ }((0, s.useCallback)((function(t) {
+ return o.current && o.current.box === e.box && o.current.round === r || (o.current = {
+ box: e.box,
+ round: r,
+ instance: new ResizeObserver((function(t) {
+ var o = t[0], i = e.box === "border-box" ? "borderBoxSize" : e.box === "device-pixel-content-box" ? "devicePixelContentBoxSize" : "contentBoxSize", a = Ad(o, i, "inlineSize"), s = Ad(o, i, "blockSize"), d = a ? r(a) : void 0, f = s ? r(s) : void 0;
+ if (u.current.width !== d || u.current.height !== f) {
+ var p = {
+ width: d,
+ height: f
+ };
+ u.current.width = d, u.current.height = f, n.current ? n.current(p) : c.current || l(p);
+ }
+ }))
+ }), o.current.instance.observe(t, { box: e.box }), function() {
+ o.current && o.current.instance.unobserve(t);
+ };
+ }), [e.box, r]), e.ref);
+ (0, s.useMemo)((function() {
+ return {
+ ref: d,
+ width: a.width,
+ height: a.height
+ };
+ }), [
+ d,
+ a.width,
+ a.height
+ ]);
+ }({
+ ref: i,
+ onResize: () => {
+ a();
+ }
+ }), (0, s.useLayoutEffect)((() => {
+ a();
+ }), []), (0, Go.jsx)(Md, {
+ ref: i,
+ ...n,
+ children: r ? (0, Go.jsx)(Ml, {
+ content: e,
+ position: t,
+ timing: "delay",
+ children: (t) => (0, Go.jsx)("span", {
+ ...t,
+ children: e
+ })
+ }) : e
+ });
+}
+const Md = ao.span.withConfig({
+ displayName: "StyledText",
+ componentId: "sc-b6pp4c-0"
+})(["display:block;overflow:hidden;min-width:0;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;&::after{content:'';display:block;}&:has(", "){overflow:visible;}"], oa), Ld = "ds-switch__pointer-events-wrapper";
+function Dd({ children: e, isChecked: t, isDisabled: n, inputProps: r, onChange: o = () => {}, subtext: i, ...a }) {
+ let { isFocusVisible: s, focusProps: l } = Ja();
+ return (0, Go.jsxs)($d, {
+ $hasSubtext: !!i,
+ $isDisabled: n,
+ className: Ld,
+ ...a,
+ children: [e && (0, Go.jsxs)(Bd, { children: [e, i ? (0, Go.jsx)(Fd, {
+ $isDisabled: n,
+ children: i
+ }) : null] }), (0, Go.jsx)(Ud, { children: (0, Go.jsxs)(Hd, { children: [(0, Go.jsx)("input", {
+ role: "switch",
+ type: "checkbox",
+ disabled: n,
+ onChange: o,
+ checked: t,
+ "aria-checked": t,
+ ...l,
+ ...r
+ }), (0, Go.jsx)(Vd, {
+ "aria-hidden": "true",
+ $isDisabled: n,
+ $isFocusVisible: s
+ })] }) })]
+ });
+}
+Dd.pointerEventsClassname = Ld;
+const { internalTokens: Rd, declareTokens: zd } = ea({
+ lightTheme: {
+ "switch-indicator-background-off": po.gray75,
+ "switch-indicator-background-off-hover": po.gray100,
+ "switch-indicator-handle-box-shadow": po.elevation2,
+ "switch-focus-ring-color": po.gray200,
+ "switch-indicator-background-off-disabled": po.gray100,
+ "switch-indicator-handle-color-off-disabled": po.gray50,
+ "switch-indicator-background-on-disabled": po.gray400,
+ "switch-indicator-handle-color-on-disabled": po.gray100
+ },
+ darkTheme: {
+ "switch-indicator-background-off": po.gray75a,
+ "switch-indicator-background-off-hover": po.gray100a,
+ "switch-indicator-handle-box-shadow": "none",
+ "switch-focus-ring-color": po.gray200a,
+ "switch-indicator-background-off-disabled": po.gray100a,
+ "switch-indicator-handle-color-off-disabled": po.gray200a,
+ "switch-indicator-background-on-disabled": po.gray400a,
+ "switch-indicator-handle-color-on-disabled": po.gray200a
+ }
+}), $d = ao.label.withConfig({
+ displayName: "SwitchStyled",
+ componentId: "sc-zermjl-0"
+})([
+ "",
+ " ",
+ " display:flex;align-items:",
+ ";margin:0;padding:",
+ " 0;color:",
+ ";cursor:",
+ ";user-select:none;"
+], zd, Vi.uiTextM, ((e) => e.$hasSubtext ? "center" : "baseline"), po.spacing1, po.colorText, ((e) => !e.$isDisabled && "pointer")), Bd = ao.span.withConfig({
+ displayName: "Label",
+ componentId: "sc-zermjl-1"
+})(["align-self:center;margin-right:", ";"], po.spacing4), Fd = ao.span.withConfig({
+ displayName: "SubtextHolder",
+ componentId: "sc-zermjl-2"
+})([
+ "display:block;color:",
+ ";font-size:",
+ ";"
+], ((e) => e.$isDisabled ? po.colorTextDisabled : po.colorTextMuted), po.fontSize75), Ud = ao.span.withConfig({
+ displayName: "ToggleAlignment",
+ componentId: "sc-zermjl-3"
+})(["position:static !important;margin-left:auto;&::before{content:'\\200B';display:inline-block;vertical-align:middle;}"]), Hd = ao.span.withConfig({
+ displayName: "Toggle",
+ componentId: "sc-zermjl-4"
+})(["position:relative !important;display:inline-block;vertical-align:middle;width:36px;height:22px;input{position:absolute;opacity:0;}"]), Wd = ".ds-switch__pointer-events-wrapper", Vd = ao.span.withConfig({
+ displayName: "Indicator",
+ componentId: "sc-zermjl-5"
+})([
+ "position:absolute !important;top:0;right:0;bottom:0;left:0;box-sizing:border-box;width:100%;height:100%;border-radius:",
+ ";background:",
+ ";cursor:",
+ ";transition:0.2s;&::before{content:'';position:absolute;right:calc(100% - 20px);bottom:2px;left:2px;height:18px;border-radius:50%;background-color:",
+ ";box-shadow:",
+ ";transition:0.2s;}",
+ " input:checked + &&{background-color:",
+ ";opacity:",
+ ";&::before{right:2px;left:calc(100% - 20px);background-color:",
+ ";}}",
+ " ",
+ ":hover &&,",
+ ":focus-visible &&{background-color:",
+ ";}",
+ ":hover input:checked + &&,",
+ ":focus-visible input:checked + &&{background-color:",
+ ";}",
+ ""
+], po.radiusPill, ((e) => e.$isDisabled ? Rd["switch-indicator-background-off-disabled"] : Rd["switch-indicator-background-off"]), ((e) => !e.$isDisabled && "pointer"), ((e) => e.$isDisabled ? Rd["switch-indicator-handle-color-off-disabled"] : po.white), Rd["switch-indicator-handle-box-shadow"], Hd, ((e) => e.$isDisabled ? Rd["switch-indicator-background-on-disabled"] : po.blue500), ((e) => e.$isDisabled ? "0.5" : "1"), ((e) => e.$isDisabled ? Rd["switch-indicator-handle-color-on-disabled"] : po.white), ((e) => !e.$isDisabled && ro([
+ "",
+ ":active input + &&::before{right:calc(100% - 24px);left:2px;border-radius:9px;}",
+ ":active input:checked + &&::before{right:2px;left:calc(100% - 24px);}"
+], Wd, Wd)), Wd, Wd, ((e) => !e.$isDisabled && Rd["switch-indicator-background-off-hover"]), Wd, Wd, ((e) => !e.$isDisabled && po.blue600), ((e) => e.$isFocusVisible && ro([
+ "",
+ " input + &&{background-color:",
+ ";&::after{content:'';position:absolute;top:-3px;right:-3px;bottom:-3px;left:-3px;border:2px solid ",
+ ";border-radius:100px;}}",
+ " input:checked + &&::after{border-color:",
+ ";}"
+], Hd, po.gray100, Rd["switch-focus-ring-color"], Hd, po.blue500))), qd = ({ isNLSSearchOn: e, setIsNLSSearchOn: t }) => {
+ let n = (e) => {
+ e && e.currentTarget !== e.target || (e?.stopPropagation(), t(((e) => !e)));
+ };
+ return s.default.createElement(Gd, {
+ onClick: n,
+ onKeyDown: (e) => {
+ e.key !== "Enter" && e.key !== " " || (e.preventDefault(), n(e));
+ },
+ tabIndex: 0,
+ "data-testid": "switch-nls-container"
+ }, s.default.createElement(Yd, null, s.default.createElement(zi, null)), s.default.createElement(Zd, { id: "labelId" }, s.default.createElement(Nd, null, Kl("Use natural language search")), s.default.createElement(Kd, null, s.default.createElement(Nd, null, Kl("Find images by describing them")))), s.default.createElement(Xd, null, s.default.createElement(Dd, {
+ isChecked: e,
+ "aria-labelledby": "labelId",
+ onChange: () => {
+ t(((e) => !e));
+ }
+ })));
+}, Gd = ao.div`
+ display: flex;
+
+ align-items: flex-start;
+ margin: ${po.spacing3};
+ padding: ${po.spacing3};
+ background-color: #f3f2fd;
+ border-radius: ${po.radiusLarge};
+
+ &:hover {
+ background-color: #eeedfc;
+ cursor: pointer;
+ }
+
+ &:active {
+ background-color: #f3f2fd;
+ }
+`, Yd = ao.div`
+ flex: none;
+ margin-right: ${po.spacing4};
+ color: ${po.purple500};
+`, Zd = ao.div`
+ ${Vi.uiTextM}
+
+ flex: 1;
+ min-width: 0;
+ font-weight: 400;
+ color: #031026;
+`, Kd = ao.div`
+ ${Vi.uiTextS}
+
+ color: ${po.colorTextMuted};
+`, Xd = ao.div`
+ display: flex;
+ flex: none;
+ gap: ${po.spacing3};
+ align-items: center;
+ margin-left: ${po.spacing4};
+`;
+function Jd() {
+ let e = Do.use.page(), t = wo(), { value: n, isLoading: r, setSearch: o } = Uo(e.page), { isEnabled: i, isNLSSelected: a, setIsNLSSelected: l, search: c, setNLSSearchText: u, resetData: d, setIsSelected: f } = Pd(), p = Ho(c, 500), [h, g] = (0, s.useState)(n), [m, v] = (0, s.useState)(!1), [y, b] = (0, s.useState)(!1);
+ (0, s.useEffect)((() => {
+ g(n);
+ }), [e, n]);
+ let w = Ho(((e) => {
+ f(!1), o(e);
+ }), 500);
+ (0, s.useEffect)((() => () => {
+ w.flush(), p.flush();
+ }), [
+ e,
+ w,
+ p
+ ]);
+ let x = e.page === "collections" ? Kl("Search for collections") : Kl("Search for assets");
+ return s.default.createElement(Qd, { $hideSwitch: t }, s.default.createElement(Gl, {
+ value: h,
+ placeholder: x,
+ "aria-label": x,
+ onChange: (e) => {
+ return g(t = e), a ? (u(t), t.length === 0 && d(), p(void 0, t)) : w(t);
+ var t;
+ },
+ "data-testid": "search-input",
+ icon: s.default.createElement(Mi, null),
+ iconRight: r ? s.default.createElement("div", {
+ role: "alert",
+ "aria-live": "polite"
+ }, s.default.createElement(Yl, { isRelative: !0 })) : s.default.createElement(ki, null),
+ hasClearButton: !(r || !n && !h),
+ onFocus: () => v(!0),
+ onBlur: () => {
+ y || v(!1);
+ }
+ }), i && m && e.page === "assets" && s.default.createElement(ef, {
+ onMouseDown: () => {
+ b(!0);
+ },
+ onMouseUp: () => {
+ setTimeout((() => {
+ b(!1);
+ }), 0);
+ }
+ }, s.default.createElement(qd, {
+ isNLSSearchOn: a,
+ setIsNLSSearchOn: l
+ })));
+}
+const Qd = ao.div`
+ width: 100%;
+ max-width: 440px;
+ margin-left: ${(e) => e.$hideSwitch ? "auto" : "none"};
+ position: relative;
+`, ef = ao.div`
+ position: absolute;
+ right: 0;
+ top: 100%;
+ z-index: 10;
+ width: 100%;
+`;
+function tf({ nlSearch: e = !1 }) {
+ let t = Do.use.page(), [n, r] = Mo(t.page), o = {
+ ASC: Kl("Ascending"),
+ DESC: Kl("Descending")
+ }, i = {
+ ASC: "DESC",
+ DESC: "ASC"
+ };
+ return s.default.createElement(nf, {
+ variant: "clean",
+ isSmall: !0,
+ title: o[n.direction],
+ onClick: function() {
+ r({
+ field: n.field,
+ direction: i[n.direction]
+ });
+ },
+ icon: s.default.createElement(rf, { $isAscending: n.direction === "ASC" }),
+ isDisabled: e
+ });
+}
+const nf = ao(il)`
+ border-radius: 5px 0 0 5px;
+ border: 1px solid #d9dee1;
+ height: 42px;
+`, rf = ao($i)`
+ width: ${po.spacing6};
+ height: ${po.spacing6};
+ ${(e) => e.$isAscending && "transform: scaleY(-1)"}
+`;
+function of(e) {
+ let t = (0, s.useRef)(null), [, n] = (0, s.useState)(0);
+ (function(e, t) {
+ let n = mc();
+ (0, s.useEffect)((() => {
+ function r(n) {
+ let r = n.target;
+ e.map(((e) => e?.current)).some(((e) => e && e.contains(r))) || t();
+ }
+ return n?.addEventListener("mousedown", r), () => n?.removeEventListener("mousedown", r);
+ }), [
+ e,
+ t,
+ n
+ ]);
+ })([e.target, t], e.onClickOutside);
+ let r = !!document.querySelector("#compactViewContainer");
+ (0, s.useLayoutEffect)((() => {
+ n(e.target.current === null ? 0 : e.target.current.getBoundingClientRect().x);
+ }), [e.target]);
+ let o = mc();
+ if (o === null || e.target.current === null) return null;
+ let i = e.target.current.getBoundingClientRect(), a = i.x, l = window.innerWidth - 32, c = l - 16, u = e.isMetapropertyDropdown ? r ? "39%" : l < 1120 ? c : 1120 : 300, d = {
+ left: (() => {
+ let e = t.current && a + t.current.clientWidth > l ? void 0 : a;
+ return r ? "initial" : e;
+ })(),
+ right: t.current && a + t.current.clientWidth > l ? 24 : void 0,
+ top: e.direction === "Down" ? i.top + i.height : void 0,
+ bottom: e.direction === "Up" ? window.innerHeight - i.top : void 0,
+ minWidth: 280,
+ maxWidth: u,
+ maxHeight: 600
+ }, f = ["cv-root cv-dropdown"].filter(Boolean).join(" ");
+ return (0, Qa.createPortal)(s.default.createElement(af, {
+ role: "menu",
+ id: e.id,
+ className: f,
+ ref: t,
+ style: d,
+ isPaddingContent: e.isPaddingContent
+ }, e.children), o);
+}
+const af = ao.div`
+ padding: ${({ isPaddingContent: e }) => e ? `${po.spacing3} 0` : "0"};
+ user-select: none;
+ border-radius: 6px;
+ border: 1px solid rgba(3, 16, 38, 0.17);
+ box-shadow: 0px 0px 1px 0px rgba(3, 16, 38, 0.1), 0px 8px 12px -2px rgba(3, 16, 38, 0.1);
+`;
+var sf = function(e, t) {
+ var n = {};
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") {
+ var o = 0;
+ for (r = Object.getOwnPropertySymbols(e); o < r.length; o++) t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
+ }
+ return n;
+};
+const lf = (0, s.createContext)(null);
+function cf({ children: e, hideLimitedUse: t = !1, predefinedFilter: n }) {
+ let [r, o] = (0, s.useState)(n?.predefinedAssetType ? [...n?.predefinedAssetType] : []), [i, a] = (0, s.useState)([]), [l, c] = (0, s.useState)(!1), [u, d] = (0, s.useState)(n?.predefinedTagNames ? [...n.predefinedTagNames] : []), [f, p] = (0, s.useState)(), [h, g] = (0, s.useState)({}), [m, v] = (0, s.useState)({}), [y, b] = (0, s.useState)(null);
+ function w(e) {
+ o(((t) => uf(t, e)));
+ }
+ function x(e) {
+ var t;
+ n != null && n.showToolbar && (t = n.predefinedAssetType) != null && t.includes(e) || o(((t) => df(t, e)));
+ }
+ function E(e) {
+ a(((t) => uf(t, e.id))), g(((t) => Object.assign(Object.assign({}, t), { [e.id]: e })));
+ }
+ function S(e) {
+ a(((t) => df(t, e.id))), g(((t) => {
+ let n = t, r = e.id;
+ return n[r], sf(n, [typeof r == "symbol" ? r : r + ""]);
+ }));
+ }
+ function C() {
+ n != null && n.predefinedMetapropertiesOptions && v((() => Object.entries(n.predefinedMetapropertiesOptions || {}).reduce(((e, [t, n]) => (e[t] = {}, Object.entries(n).forEach((([n, r]) => {
+ e[t][r] = {
+ id: r,
+ label: n,
+ metapropertyName: t
+ };
+ })), e)), {})));
+ }
+ function k(e) {
+ d(((t) => uf(t, e)));
+ }
+ function _(e) {
+ var t;
+ n != null && n.showToolbar && (t = n.predefinedTagNames) != null && t.includes(e) || d(((t) => df(t, e)));
+ }
+ function T(e, t, n) {
+ let r = {
+ id: t.id,
+ label: t.label,
+ metapropertyName: e
+ };
+ v(((o) => {
+ let i = o[e] || {}, a = !!i[t.id];
+ return n ? Object.assign(Object.assign({}, o), { [e]: a ? Object.fromEntries(Object.entries(i).filter((([e]) => e !== t.id))) : Object.assign(Object.assign({}, i), { [t.id]: r }) }) : a ? Object.assign(Object.assign({}, o), { [e]: {} }) : Object.assign(Object.assign({}, o), { [e]: { [t.id]: r } });
+ }));
+ }
+ function I(e, t) {
+ v(((n) => {
+ let r = n, o = e, i = r[o], a = sf(r, [typeof o == "symbol" ? o : o + ""]), s = i || {}, l = t, c = (s[l], sf(s, [typeof l == "symbol" ? l : l + ""]));
+ return c && Object.keys(c).length > 0 ? Object.assign(Object.assign({}, n), { [e]: c }) : a;
+ }));
+ }
+ function O(e) {
+ let t = e.count, n = Object.entries(t || {}).filter((([e, t]) => e.startsWith("property") && t && Object.keys(t).length > 0)).reduce(((e, [t, n]) => (e[t.replace("property_", "")] = n, e)), {});
+ b(n);
+ }
+ function j() {
+ o(n?.showToolbar && n?.predefinedAssetType ? [...n.predefinedAssetType] : []), d(n?.showToolbar && n?.predefinedTagNames ? [...n.predefinedTagNames] : []), v({}), b(null);
+ }
+ (0, s.useEffect)((() => {
+ p(!t && void 0);
+ }), [t]), (0, s.useEffect)((() => {
+ C();
+ }), [n?.predefinedMetapropertiesOptions]);
+ let P = i.map(((e) => h[e]));
+ function A(e) {
+ c(e);
+ }
+ let N = (0, s.useMemo)((() => ({
+ assetTypes: r,
+ metaproperties: P,
+ metapropertyIds: i,
+ tags: u,
+ isLimited: f,
+ addAssetType: w,
+ removeAssetType: x,
+ addMetaproperty: E,
+ removeMetaproperty: S,
+ setPredefinedMetaproperties: C,
+ addTag: k,
+ removeTag: _,
+ clear: j,
+ setDropdownState: A,
+ isDropdownActive: l,
+ selectSmartfilterOption: T,
+ removeSmartfilterOption: I,
+ selectedSmartfilterOptions: m,
+ setActiveFiltersState: O,
+ existingFilters: y
+ })), [
+ r,
+ P,
+ u,
+ f,
+ i,
+ m
+ ]);
+ return s.default.createElement(lf.Provider, { value: N }, e);
+}
+function uf(e, t) {
+ return e.includes(t) ? e : [...e, t];
+}
+function df(e, t) {
+ return e.filter(((e) => e !== t));
+}
+function ff() {
+ let e = (0, s.useContext)(lf);
+ if (e === null) throw Error("useAssetFilter must be used with a AssetFilterProvider");
+ return e;
+}
+var pf = function(e, t) {
+ var n = {};
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") {
+ var o = 0;
+ for (r = Object.getOwnPropertySymbols(e); o < r.length; o++) t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
+ }
+ return n;
+};
+function hf(e) {
+ var { buttonKind: t = "clean", direction: n = "Down", isSmall: r, fadeIn: o, isMetapropertyDropdown: i } = e, a = pf(e, [
+ "buttonKind",
+ "direction",
+ "isSmall",
+ "fadeIn",
+ "isMetapropertyDropdown"
+ ]);
+ let l = ff(), c = (0, s.useMemo)((() => `dropdownmenu-${Date.now()}-${Math.random().toString(36).substring(2)}`), []), [u, d] = (0, s.useState)(!1), f = (0, s.useRef)(null), p = () => {
+ d(((e) => !e)), l.setDropdownState(!l.isDropdownActive);
+ };
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(gf, { $fadeIn: !!o }, s.default.createElement(il, {
+ variant: t,
+ isSmall: r,
+ onClick: p,
+ ref: f,
+ isDisabled: a.disabled,
+ isPressed: u,
+ "aria-haspopup": !0,
+ "aria-expanded": u,
+ "aria-controls": c,
+ "data-testid": "button"
+ }, s.default.createElement(vf, { title: a.alt }, a.title), s.default.createElement(mf, {
+ $active: u,
+ className: "fa fa-caret-down"
+ }))), u && s.default.createElement(of, {
+ isPaddingContent: a.isPaddingContent,
+ onClickOutside: p,
+ direction: n,
+ target: f,
+ id: c,
+ isMetapropertyDropdown: i
+ }, a.children(p)));
+}
+const gf = ao.div`
+ text-transform: inherit;
+ ${(e) => e.$fadeIn ? "animation: var(--fade-in-down);" : ""}
+`, mf = ao.i`
+ margin-left: ${po.spacing3};
+ transition: transform 200ms;
+ ${(e) => e.$active ? "transform: rotate(180deg);" : ""}
+`, vf = ao.span`
+ display: inline-flex;
+ align-items: center;
+`;
+var yf = function(e, t) {
+ var n = {};
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") {
+ var o = 0;
+ for (r = Object.getOwnPropertySymbols(e); o < r.length; o++) t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
+ }
+ return n;
+};
+function bf(e) {
+ var { selected: t = !1 } = e, n = yf(e, ["selected"]);
+ return s.default.createElement("li", null, s.default.createElement(wf, {
+ type: "button",
+ onClick: n.onClick,
+ role: "menuitemradio",
+ "aria-checked": t,
+ tabIndex: -1,
+ "data-testid": "dropdown-list-item",
+ $isSelected: t,
+ $isFieldSelect: n.isFieldSelect
+ }, n.children, t && s.default.createElement(xf, null)));
+}
+const wf = ao.button`
+ display: flex;
+ align-items: center;
+ cursor: pointer;
+ width: 100%;
+ color: ${(e) => e.$isSelected ? "rgba(0, 34, 51, 0.8);" : "rgba(0, 34, 51, 0.5)"};
+ text-align: left;
+ transition-property: color, background-color, border-color, opacity;
+ transition-timing-function: linear;
+ transition-duration: 0.05s;
+ border: 0 solid rgba(0, 34, 51, 0.1);
+ background-color: transparent;
+ font-size: ${po.fontSize75};
+ padding: ${(e) => e.$isFieldSelect ? `1px ${po.spacing5}` : `${po.spacing3} ${po.spacing4}`};
+
+ &:hover {
+ color: rgba(0, 34, 51, 0.8);
+ background-color: rgba(0, 34, 51, 0.03);
+ }
+`, xf = ao(li)`
+ margin-left: ${po.spacing4};
+ height: ${po.spacing6};
+ width: ${po.spacing6};
+ animation: fade-in 150ms ease-out;
+`;
+function Ef({ options: e }) {
+ let t = Do.use.page(), [n, r] = Mo(t.page), o = {
+ CREATED_AT: Kl("Date added"),
+ NAME: Kl("Name"),
+ PUBLISHED_AT: Kl("Date published"),
+ UPDATED_AT: Kl("Date modified"),
+ NL_SEARCH: Kl("Similarity")
+ };
+ return s.default.createElement(Tf, null, s.default.createElement(hf, {
+ title: s.default.createElement(Sf, {
+ stringOfFieldMap: o,
+ orderingField: e[0] === "NL_SEARCH" ? e[0] : n.field
+ }),
+ alt: Kl("Order by"),
+ isPaddingContent: !0,
+ disabled: e[0] === "NL_SEARCH"
+ }, ((t) => s.default.createElement(Cf, null, e.map(((e) => s.default.createElement(kf, {
+ selected: n.field === e,
+ key: o[e],
+ onClick: () => {
+ r({
+ field: e,
+ direction: n.direction
+ }), t();
+ },
+ isFieldSelect: !0
+ }, s.default.createElement(_f, null, o[e]))))))));
+}
+function Sf({ stringOfFieldMap: e, orderingField: t }) {
+ return s.default.createElement("span", null, "Order by", " ", s.default.createElement(If, { $isDisabled: t === "NL_SEARCH" }, e[t]));
+}
+const Cf = ao.ul`
+ margin: 0;
+ padding: 0;
+ list-style: none;
+`, kf = ao(bf)`
+ font-size: ${po.fontSize75};
+`, _f = ao.span`
+ flex-grow: 1;
+ min-width: 96px;
+ padding: ${po.spacing3} 0;
+ font-size: ${po.fontSize75};
+`, Tf = ao.div`
+ margin-left: auto;
+ border-radius: 5px 0 0 5px;
+ border: 1px solid #d9dee1;
+`, If = ao.strong`
+ font-weight: 600;
+ color: ${(e) => e.$isDisabled ? "rgba(0, 34, 51, 0.5)" : "#212c40"};
+`;
+function Of(e, t, n) {
+ return (e === 1 ? t : n).replace("{}", e.toString());
+}
+function Pf({ children: e, color: t = "brand", hasBorder: n = !1, isPillShaped: r = !1, icon: o, isSmall: i = !1, isSecondary: a = !1, ...s }) {
+ return (0, Go.jsxs)(Af, {
+ $color: t,
+ $hasBorder: n,
+ $isPillShaped: r,
+ $isSecondary: a,
+ $isSmall: i,
+ ...s,
+ children: [o && (0, Go.jsx)(Nf, {
+ $isSmall: i,
+ children: o
+ }), e]
+ });
+}
+const Af = ao.div.withConfig({
+ displayName: "BadgeStyled",
+ componentId: "sc-he9ifc-0"
+})([
+ "",
+ " display:inline-flex;vertical-align:middle;flex-wrap:nowrap;justify-content:center;align-items:center;box-sizing:border-box;height:",
+ ";padding:0 ",
+ ";border:2px solid transparent;border-radius:",
+ ";color:",
+ ";",
+ ""
+], Vi.uiTextXS, ((e) => e.$isSmall ? "20px" : "24px"), ((e) => e.$isSmall ? po.spacing2 : "6px"), ((e) => e.$isPillShaped ? po.radiusPill : po.radiusMedium), po.white, ((e) => {
+ if (!e.$isSecondary && e.$color) {
+ let t = {
+ brand: po.brandPrimary500,
+ gray: po.gray400,
+ black: po.gray900,
+ "black-alpha": po.gray600a,
+ green: po.green500,
+ blue: po.blue500,
+ red: po.red400
+ };
+ return e.$hasBorder ? ro([
+ "border-color:",
+ ";color:",
+ ";"
+ ], t[e.$color], t[e.$color]) : ro(["background-color:", ";"], t[e.$color]);
+ }
+ if (e.$isSecondary) return ro([
+ "border-color:",
+ ";background-color:",
+ ";color:",
+ ";"
+ ], e.$hasBorder ? po.gray100 : "transparent", e.$hasBorder ? po.white : po.gray100, po.gray800);
+})), Nf = ao.div.withConfig({
+ displayName: "IconHolder",
+ componentId: "sc-he9ifc-1"
+})([
+ "display:flex;align-items:center;height:100%;margin-right:",
+ ";margin-left:calc(",
+ " * -1);svg{width:18px;height:18px;}"
+], ((e) => e.$isSmall ? po.spacing1 : po.spacing2), po.spacing1), Mf = (0, s.createContext)(null);
+function Lf() {
+ let e = (0, s.useContext)(Mf);
+ if (!e) throw Error("Card compound components cannot be rendered outside the Card component");
+ return e;
+}
+const Df = ao.div.withConfig({
+ displayName: "FrameStyled",
+ componentId: "sc-1bnqt8s-0"
+})([
+ "position:relative;min-height:92px;border-radius:var(--card-frame-border-radius);background:",
+ ";",
+ ""
+], ((e) => e.$isCheckeredBackground ? "url(\"data:image/svg+xml,%3Csvg width='12' height='12' xmlns='http://www.w3.org/2000/svg'%3E%3Crect height='12' width='12' y='0' x='0' fill='%23ffffff'/%3E%3Crect height='6' width='6' y='0' x='0' fill='%23e9ecee'/%3E%3Crect height='6' width='6' y='6' x='6' fill='%23e9ecee'/%3E%3C/svg%3E%0A\") " : po.gray25), ((e) => e.$height === "fixed" && ro(["&::before{content:'';display:inline-block;vertical-align:top;width:0;height:0;padding-bottom:calc(100% / (16 / 10));}"]))), Rf = ao.div.withConfig({
+ displayName: "FocusRing",
+ componentId: "sc-1bnqt8s-1"
+})(["position:absolute;top:-4px;right:-4px;bottom:-4px;left:-4px;border:var(--card-selected-border-width) solid var(--card-selected-border-color);border-radius:calc(var(--card-border-radius) + 4px);"]), zf = ao.div.withConfig({
+ displayName: "Children",
+ componentId: "sc-1bnqt8s-2"
+})(["", " display:grid;overflow:hidden;border-radius:var(--card-frame-border-radius);"], ((e) => e.$height === "fixed" && ro(["position:absolute;inset:0;"]))), $f = ao.div.withConfig({
+ displayName: "Overlay",
+ componentId: "sc-1bnqt8s-3"
+})(["position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border:var(--card-inner-border-width) solid var(--card-inner-border-color);border-bottom-width:var(--card-frame-border-bottom-width);border-radius:var(--card-frame-border-radius);background:var(--card-frame-overlay-color);"]), Bf = ao.div.withConfig({
+ displayName: "BadgeContainer",
+ componentId: "sc-1bnqt8s-4"
+})([
+ "position:absolute;right:",
+ ";bottom:",
+ ";"
+], po.spacing4, po.spacing4), Ff = ao.div.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-1bnqt8s-5"
+})([
+ "position:absolute;bottom:",
+ ";left:",
+ ";color:",
+ ";path{stroke:",
+ ";stroke-width:2px;paint-order:stroke;&[d='M0 0h24v24H0z']{stroke:none;}}"
+], po.spacing4, po.spacing4, po.white, po.gray100a), Uf = ao.div.withConfig({
+ displayName: "ProgressContainer",
+ componentId: "sc-1bnqt8s-6"
+})(["position:absolute;bottom:0;left:0;width:100%;"]), Hf = ao.div.withConfig({
+ displayName: "HeaderStyled",
+ componentId: "sc-1pov1j3-0"
+})(["display:grid;grid-template-areas:'thumbnail title icon' 'thumbnail detail icon';grid-template-columns:auto 1fr auto;padding:var(--card-content-padding);"]), Wf = ao.div.withConfig({
+ displayName: "ThumbnailContainer",
+ componentId: "sc-1pov1j3-1"
+})(["grid-area:thumbnail;margin-top:2px;margin-right:", ";"], po.spacing4), Vf = ao.div.withConfig({
+ displayName: "Title",
+ componentId: "sc-1pov1j3-2"
+})([
+ "",
+ " grid-area:title;min-width:0;color:",
+ ";overflow-wrap:break-word;"
+], Vi.uiTextM, po.colorText), qf = ao.div.withConfig({
+ displayName: "Detail",
+ componentId: "sc-1pov1j3-3"
+})([
+ "",
+ " grid-area:detail;min-width:0;margin-top:",
+ ";color:",
+ ";overflow-wrap:break-word;"
+], Vi.uiTextS, po.spacing2, po.colorTextMuted), Gf = ao.div.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-1pov1j3-4"
+})([
+ "z-index:2;display:grid;grid-area:icon;align-items:center;margin-left:",
+ ";color:",
+ ";"
+], po.spacing2, po.gray600), Yf = ao.div.withConfig({
+ displayName: "AdditionalInfoStyled",
+ componentId: "sc-kuakuj-0"
+})([
+ "",
+ " padding:",
+ ";border-top:1px solid ",
+ ";color:",
+ ";"
+], Vi.uiTextS, ((e) => e.$padding === "all" ? "var(--card-content-padding)" : "0"), po.gray100a, po.colorText), Zf = (0, s.forwardRef)((({ children: e, isDisabled: t = !1, isPressed: n = !1, tooltip: r, "aria-label": o, ...i }, a) => {
+ let { isFocusVisible: s, focusProps: l } = Ja(), c = (0, Go.jsx)(Kf, {
+ disabled: t,
+ type: "button",
+ $isFocusVisible: s,
+ ref: a,
+ $isPressed: n,
+ "aria-label": o,
+ ...l,
+ ...i,
+ children: e
+ });
+ return r ? (0, Go.jsx)(Ml, {
+ timing: "delay",
+ content: r,
+ children: c
+ }) : c;
+})), Kf = ao.button.withConfig({
+ displayName: "ContextActionButtonStyled",
+ componentId: "sc-1m1kqdv-0"
+})([
+ "display:inline-flex;vertical-align:middle;flex-wrap:nowrap;justify-content:center;align-items:center;box-sizing:border-box;min-width:40px;height:32px;padding:0 ",
+ ";border:none;border-radius:",
+ ";background-color:transparent;box-shadow:0 0 0 1px ",
+ ";font-weight:400;font-style:normal;font-size:",
+ ";font-family:",
+ ";line-height:",
+ ";letter-spacing:normal;text-align:center;text-decoration:none;white-space:nowrap;cursor:pointer;fill:currentcolor;transition-duration:0.1s;transition-property:background-color,border-color,box-shadow,color;",
+ ""
+], po.spacing3, po.brandRadiusBase, po.gray100a, po.fontSize75, po.brandFontStackBase, po.lineHeightBase, ((e) => {
+ let t = ro([
+ "background-color:",
+ ";color:",
+ ";box-shadow:0 0 0 1px ",
+ ";"
+ ], po.gray10, po.gray800, po.gray100a);
+ return ro([
+ "background-color:rgb(",
+ " / 90%);color:",
+ ";",
+ " &:hover{background-color:",
+ ";color:",
+ ";box-shadow:",
+ ",",
+ ";}&:active{",
+ "}&:disabled{background-color:rgb(",
+ " / 70%);color:",
+ ";box-shadow:0 0 0 1px ",
+ ";cursor:default;}"
+ ], po["white-rgb"], po.gray600a, e.$isPressed && t, po.gray10, po.gray800, po.elevation1, po.elevationStatic, t, po["white-rgb"], po.gray200a, po.gray100a);
+})), Xf = ao.div.withConfig({
+ displayName: "ImagesStyled",
+ componentId: "sc-v41o6p-0"
+})(["display:grid;grid-template-rows:1fr 1fr;grid-template-columns:3fr 2fr;gap:", ";min-height:10px;&:has(:first-child:last-child){display:flex;}"], po.spacing1), Jf = ao.img.withConfig({
+ displayName: "ImgStyled",
+ componentId: "sc-v41o6p-1"
+})(["object-fit:", ";width:100%;height:100%;min-height:0;max-height:410px;&:nth-child(1){grid-row:1 / -1;grid-column:1;}&:nth-child(1):last-child{grid-column:span 2;}&:nth-child(2){grid-row:1;grid-column:2;}&:nth-child(2):last-child{grid-row:span 2;}&:nth-child(3){grid-row:2;grid-column:2;}"], ((e) => e.$contentResize === "fill" ? "cover" : "scale-down")), Qf = ao.div.withConfig({
+ displayName: "Placeholder",
+ componentId: "sc-1qwqjbg-0"
+})(["display:grid;place-items:center;min-height:100px;"]), ep = ao.div.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-1qwqjbg-1"
+})([
+ "display:grid;place-items:center;width:60px;height:70px;border-radius:",
+ ";background:",
+ ";color:",
+ ";"
+], po.brandRadiusBase, po.gray10, po.gray600), tp = ao.div.withConfig({
+ displayName: "Placeholder",
+ componentId: "sc-qax8fp-0"
+})([
+ "display:flex;justify-content:center;align-items:center;min-height:100px;background:",
+ ";color:",
+ ";svg{width:48px;height:48px;}"
+], ((e) => e.$backgroundColor), ((e) => e.$iconColor)), np = ao.div.withConfig({
+ displayName: "StatsStyled",
+ componentId: "sc-a5kvvv-0"
+})([
+ "display:flex;flex-wrap:wrap;row-gap:",
+ ";padding:var(--card-content-padding);border-top:1px solid ",
+ ";column-gap:",
+ ";"
+], po.spacing4, po.gray100a, po.spacing5), rp = ao.div.withConfig({
+ displayName: "StatItemStyled",
+ componentId: "sc-7uwt82-0"
+})([
+ "",
+ " display:flex;align-items:center;color:",
+ ";column-gap:",
+ ";"
+], Vi.uiTextS, po.colorTextMuted, po.spacing2);
+function op({ children: e, variant: t = "outlined", isSelected: n = !1, contextAction: r, onClick: o, onSelect: i, as: a = "button", href: l, to: c, noMinWidth: u, selectButtonAriaLabel: d, "aria-label": f, isDisabled: p = !1, ...h }) {
+ let g = Gc("card-title"), m = (0, s.useMemo)((() => ({
+ variant: t,
+ isSelected: n,
+ cardTitleId: g
+ })), [
+ n,
+ t,
+ g
+ ]), v = p ? "div" : a;
+ return (0, Go.jsx)(Mf.Provider, {
+ value: m,
+ children: (0, Go.jsxs)(ip, {
+ $variant: t,
+ $isSelected: n,
+ $noMinWidth: u,
+ $isDisabled: p,
+ ...h,
+ children: [
+ (0, Go.jsx)(ap, {
+ as: v,
+ to: p ? void 0 : c,
+ href: v === "a" ? l : void 0,
+ type: v === "button" ? "button" : void 0,
+ onClick: function(e) {
+ if (!p) return i && (e.metaKey || e.ctrlKey || e.shiftKey) ? (i(e), void e.preventDefault()) : void (o == null || o(e));
+ },
+ "aria-labelledby": f ? void 0 : g,
+ "aria-label": f,
+ $isDisabled: p,
+ children: e
+ }),
+ r && !p ? (0, Go.jsx)(lp, { children: r }) : null,
+ i ? (0, Go.jsx)(sp, {
+ type: "button",
+ $isSelected: n,
+ onClick: i,
+ "aria-label": d,
+ disabled: p,
+ $isDisabled: p,
+ children: (0, Go.jsx)(li, {})
+ }) : null
+ ]
+ })
+ });
+}
+op.Frame = function({ children: e, progressBar: t, badge: n, icon: r, isCheckeredBackground: o = !1, height: i = "fixed", ...a }) {
+ let { variant: s, isSelected: l } = Lf();
+ return (0, Go.jsxs)(Df, {
+ $isCheckeredBackground: o,
+ $height: i,
+ ...a,
+ children: [
+ s === "clean" && l && (0, Go.jsx)(Rf, {}),
+ (0, Go.jsx)(zf, {
+ $height: i,
+ children: e
+ }),
+ (0, Go.jsx)($f, {}),
+ t ? (0, Go.jsx)(Uf, { children: t }) : null,
+ n ? (0, Go.jsx)(Bf, { children: (0, Go.jsx)(Pf, {
+ color: "black-alpha",
+ children: n
+ }) }) : null,
+ r ? (0, Go.jsx)(Ff, { children: r }) : null
+ ]
+ });
+}, op.Header = function({ thumbnail: e, title: t, detail: n, icon: r, isNotTruncated: o = !1, ...i }) {
+ let { cardTitleId: a } = Lf();
+ return (0, Go.jsxs)(Hf, {
+ ...i,
+ children: [
+ e ? (0, Go.jsx)(Wf, { children: e }) : null,
+ (0, Go.jsx)(Vf, {
+ id: a,
+ children: o ? t : (0, Go.jsx)(Nd, { children: t })
+ }),
+ n ? (0, Go.jsx)(qf, { children: o ? n : (0, Go.jsx)(Nd, { children: n }) }) : null,
+ r ? (0, Go.jsx)(Gf, { children: r }) : null
+ ]
+ });
+}, op.AdditionalInfo = function({ children: e, padding: t = "all", ...n }) {
+ return (0, Go.jsx)(Yf, {
+ $padding: t,
+ ...n,
+ children: e
+ });
+}, op.ContextActionButton = Zf, op.Images = function({ children: e, ...t }) {
+ return (0, Go.jsx)(Xf, {
+ ...t,
+ children: e
+ });
+}, op.Img = function({ src: e, contentResize: t = "fill", alt: n = "", onError: r, ...o }) {
+ return (0, Go.jsx)(Jf, {
+ src: e,
+ alt: n,
+ $contentResize: t,
+ onError: r,
+ ...o
+ });
+}, op.FilePlaceholder = function({ children: e, ...t }) {
+ return (0, Go.jsx)(Qf, {
+ ...t,
+ children: (0, Go.jsx)(ep, { children: e })
+ });
+}, op.IconPlaceholder = function({ children: e, backgroundColor: t = po.gray25, iconColor: n = po.gray400a, ...r }) {
+ return (0, Go.jsx)(tp, {
+ $backgroundColor: t,
+ $iconColor: n,
+ ...r,
+ children: e
+ });
+}, op.Stats = function({ children: e, ...t }) {
+ return (0, Go.jsx)(np, {
+ ...t,
+ children: e
+ });
+}, op.StatsItem = function({ icon: e, children: t, title: n, ...r }) {
+ return t && t.toString().length, (0, Go.jsx)(Ml, {
+ content: n,
+ timing: "delay",
+ children: (n) => (0, Go.jsxs)(rp, {
+ ...r,
+ ...n,
+ children: [(0, Go.jsx)("div", { children: e }), t ? (0, Go.jsx)("span", { children: t }) : null]
+ })
+ });
+};
+const ip = ao.div.withConfig({
+ displayName: "Container",
+ componentId: "sc-1tqtj7t-0"
+})([
+ "--card-border-radius:",
+ ";--card-inner-border-color:",
+ ";--card-inner-border-width:1px;--card-selected-border-color:",
+ ";--card-selected-border-width:2px;--card-elevation:",
+ ";--card-frame-overlay-color:transparent;--card-actions-opacity:0;&:hover{--card-frame-overlay-color:",
+ ";--card-actions-opacity:1;}&:focus-within{--card-actions-opacity:1;}",
+ " position:relative;box-sizing:border-box;min-width:",
+ ";border-radius:var(--card-border-radius);background:",
+ ";box-shadow:var(--card-box-shadow);pointer-events:",
+ ";"
+], po.radiusBase, po.gray100a, ((e) => e.$isDisabled ? po.gray400 : po.brandPrimary500), ((e) => e.$isDisabled ? "0 0 0 transparent" : po.elevation1), po.gray100a, ((e) => e.$variant === "outlined" ? ro([
+ "--card-frame-border-radius:var(--card-border-radius) var(--card-border-radius) 0 0;--card-box-shadow:var(--card-elevation),inset 0 0 0 var(--card-inner-border-width) var(--card-inner-border-color);--card-frame-border-bottom-width:0;--card-content-padding:",
+ " ",
+ ";&:hover{--card-inner-border-color:",
+ ";--card-elevation:",
+ ";}",
+ ""
+], po.spacing4, po.spacing5, po.gray200a, po.elevation2, e.$isSelected ? ro(["--card-inner-border-width:var(--card-selected-border-width);--card-inner-border-color:var(--card-selected-border-color);&:hover{--card-inner-border-color:var(--card-selected-border-color);}"]) : "") : ro(["--card-frame-border-radius:var(--card-border-radius);--card-box-shadow:none;--card-frame-border-bottom-width:1px;--card-content-padding:", " 0;"], po.spacing3)), ((e) => e.$noMinWidth ? "auto" : "224px"), po.gray10, ((e) => e.$isDisabled ? "none" : "initial")), ap = ao.button.withConfig({
+ displayName: "MainAction",
+ componentId: "sc-1tqtj7t-1"
+})(["display:block;box-sizing:border-box;width:100%;padding:0;border:none;background:none;font:inherit;text-align:left;text-decoration:none;cursor:", ";"], ((e) => e.$isDisabled ? "default" : "pointer")), sp = ao.button.withConfig({
+ displayName: "SelectButton",
+ componentId: "sc-1tqtj7t-2"
+})([
+ "position:absolute;top:",
+ ";right:",
+ ";z-index:2;display:grid;place-items:center;box-sizing:border-box;width:32px;height:32px;padding:0;border:2px solid rgb(",
+ " / 80%);border-radius:",
+ ";background:none;color:transparent;opacity:",
+ ";pointer-events:",
+ ";&:hover{border-color:",
+ ";}&:active{border-width:3px;border-color:",
+ ";}",
+ ""
+], po.spacing4, po.spacing4, po["white-rgb"], po.radiusCircle, ((e) => e.$isSelected ? "1" : "var(--card-actions-opacity)"), ((e) => e.$isDisabled ? "none" : "initial"), po.white, po.white, ((e) => e.$isSelected && ro([
+ "border:none;background:",
+ ";color:",
+ ";&:hover{background:",
+ ";box-shadow:",
+ ";}&:active{background:",
+ ";box-shadow:none;}"
+], e.$isDisabled ? po.gray400 : po.brandPrimary500, po.white, po.brandPrimary600, po.elevation1, po.brandPrimary700))), lp = ao.div.withConfig({
+ displayName: "ActionContainer",
+ componentId: "sc-1tqtj7t-3"
+})([
+ "position:absolute;top:",
+ ";left:",
+ ";z-index:2;opacity:var(--card-actions-opacity);"
+], po.spacing4, po.spacing4);
+function cp({ width: e = 100 }) {
+ return s.default.createElement(dp, {
+ width: e,
+ "data-testid": "skeleton"
+ }, "");
+}
+const up = co`
+ 0% {
+ left: -500px;
+ }
+ 100% {
+ left: 100%;
+ }
+`, dp = ao.span`
+ overflow: hidden;
+ display: inline-block;
+ position: relative;
+ width: ${({ width: e }) => e}px;
+ margin: ${po.spacing3} ${po.spacing3};
+ height: ${po.spacing5};
+ background-color: ${po.gray50};
+ border-radius: ${po.brandRadiusBase};
+
+ &before {
+ position: absolute;
+ top: 0;
+ height: 100%;
+ animation: ${up} 1.5s ease-in-out infinite;
+ content: '';
+ width: 500px;
+ left: -500px;
+ background-image: linear-gradient(
+ 90deg,
+ rgba(255, 255, 255, 0),
+ rgba(255, 255, 255, 0.6),
+ rgba(255, 255, 255, 0)
+ );
+ }
+`;
+function fp(e) {
+ return s.default.createElement(s.default.Fragment, null, Array(e.rows * e.columns).fill(void 0).map(((t, n) => {
+ return s.default.createElement(pp, {
+ key: n,
+ "data-testid": "asset-card"
+ }, s.default.createElement(op, null, s.default.createElement(op.Frame, null), s.default.createElement(op.AdditionalInfo, null, s.default.createElement(cp, { width: 70 + (r = n, 16807 * ((r + 20) % 2147483647 + 2147483646) % 2147483647 % 100) })), e.title));
+ var r;
+ })));
+}
+const pp = ao.div`
+ width: 224px;
+ position: relative;
+ margin: ${po.spacing3};
+ align-self: flex-start;
+`, hp = ({ filters: e, predefinedFilters: t, showToolbar: n }) => n ? e?.length ? Array.from(/* @__PURE__ */ new Set([...t || [], ...e])) : t : e?.length ? e : t, gp = ({ metapropertyName: e, id: t }) => window.btoa(`(Metaproperty_option_id(${e} ${t}))`), mp = (e) => {
+ if (e) return Object.values(e).reduce(((e, t) => [...e, ...Object.values(t).map(gp)]), []);
+}, vp = (e) => window.btoa(`(Asset_id ${e})`);
+var yp = function(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+};
+const bp = "\nfragment DisplayAsset on Asset {\n __typename\n id\n databaseId\n derivatives {\n thumbnail\n }\n extensions\n name\n url\n isArchived\n isWatermarked\n isLimitedUse\n files\n metaproperties {\n nodes {\n id\n label(language: $language)\n showInGridView\n showInListView\n zIndex\n options {\n id\n label(language: $language)\n assetCount\n }\n }\n }\n textMetaproperties {\n name\n value\n type\n label\n zIndex\n showInGridView\n showInListView\n }\n}", wp = `\n query searchAssets($filter: AssetFilter!, $after: Cursor, $orderBy: AssetOrder!, $language: String) {\n searchAssets(filter: $filter) {\n assets(after: $after, first: 50, orderBy: $orderBy) {\n nodes {\n __typename\n ...DisplayAsset\n }\n\t\t\t\ttotalCount\n\t\t\t\tpageInfo {\n\t\t\t\t\tendCursor\n\t\t\t\t\thasNextPage\n }\n }\n }\n }\n ${bp}\n`;
+function xp(e, t = !1) {
+ let l = gd(), [c, u] = (0, s.useState)({
+ tag: "Loading",
+ value: null
+ }), d = !1, f = (n) => yp(this, void 0, void 0, (function* () {
+ u(((e) => ({
+ tag: "Loading",
+ value: e.tag === "Failure" ? null : e.value
+ })));
+ let r = Ep(e, n ?? null), o = yield Cd({
+ query: wp,
+ variables: r,
+ auth: l,
+ noCache: t
+ });
+ d || (nc(o) ? u({
+ tag: "Failure",
+ value: o.error
+ }) : p(o, n));
+ })), p = (e, t) => {
+ Sp(c) && t ? u(((t) => {
+ let o = Sp(t)?.nodes ?? [];
+ return {
+ tag: "Loaded",
+ value: { searchAssets: { assets: Object.assign(Object.assign({}, e.value.searchAssets.assets), { nodes: [...o, ...e.value.searchAssets.assets.nodes] }) } }
+ };
+ })) : u({
+ tag: "Loaded",
+ value: e.value
+ });
+ };
+ return (0, s.useEffect)((() => (f(), () => {
+ d = !0;
+ })), [
+ e.filter?.assetTypes,
+ e.filter?.selectedSmartfilterOptions,
+ e.filter?.tags,
+ e.filter?.isLimited,
+ e.collection,
+ e.orderBy,
+ e.searchTerm,
+ e.language,
+ e.predefinedFilter
+ ]), {
+ data: c,
+ executeQuery: () => f(),
+ isLoading: !c || c.tag === "Loading",
+ loadMore: () => f(Sp(c)?.pageInfo.endCursor),
+ hasNextPage: !!Sp(c)?.pageInfo.hasNextPage
+ };
+}
+const Ep = (e, t) => {
+ let { filter: o, predefinedFilter: i, collection: a, orderBy: s, allAssetTypes: l, searchTerm: c, language: u } = e, d = hp({
+ filters: o?.assetTypes,
+ predefinedFilters: i?.predefinedAssetType,
+ showToolbar: i?.showToolbar
+ }), f = hp({
+ filters: o?.tags,
+ predefinedFilters: i?.predefinedTagNames,
+ showToolbar: i?.showToolbar
+ });
+ return {
+ orderBy: s,
+ filter: {
+ collectionId: a?.id ?? i?.collectionId,
+ assetType_in: d ?? l,
+ metapropertyOptionId_in: mp(o?.selectedSmartfilterOptions),
+ searchTerm: c ?? i?.searchTerm ?? null,
+ tagNames_in: f,
+ isLimitedUse: o?.isLimited
+ },
+ after: t,
+ language: u
+ };
+}, Sp = (e, t) => {
+ let r = t ?? e;
+ if (r.tag !== "Failure") return r.value?.searchAssets.assets;
+}, Cp = (0, s.forwardRef)((({ size: e = "m", isDisabled: t = !1, thumbnail: n, children: r, icon: o, onClick: i, onDelete: a, ...s }, l) => {
+ let { isFocusVisible: c, focusProps: u } = Ja(), d = !!(i || a);
+ return (0, Go.jsxs)(Ip, {
+ $size: e,
+ $isDisabled: t,
+ disabled: t && d,
+ onClick: i,
+ onKeyDown: function(e) {
+ i && e.key === "Enter" ? (e.preventDefault(), i()) : !a || e.key !== "Backspace" && e.key !== "Delete" || a();
+ },
+ $isFocusVisible: c,
+ as: d ? "button" : "span",
+ ref: l,
+ ...u,
+ ...s,
+ children: [
+ n && (0, Go.jsx)(Op, { children: n }),
+ o && (0, Go.jsx)(Np, { children: o }),
+ (0, Go.jsx)("span", { children: r }),
+ a && (0, Go.jsx)(Tp, {
+ $isDisabled: t,
+ onClick: function(e) {
+ e.stopPropagation(), a && a();
+ },
+ "data-testid": "ds-chip-delete-button",
+ children: (0, Go.jsx)(ai, { size: "18px" })
+ })
+ ]
+ });
+})), { internalTokens: kp, declareTokens: _p } = ea({
+ lightTheme: {
+ "chip-background-color": po.gray50,
+ "chip-background-color-disabled": po.gray25,
+ "chip-background-color-hover": po.gray75,
+ "chip-background-color-active": po.gray100,
+ "chip-background-color-focus": po.gray25,
+ "chip-shadow-focus": po.elevationStatic
+ },
+ darkTheme: {
+ "chip-background-color": po.gray50a,
+ "chip-background-color-disabled": po.gray25a,
+ "chip-background-color-hover": po.gray75a,
+ "chip-background-color-active": po.gray100a,
+ "chip-background-color-focus": "transparent",
+ "chip-shadow-focus": `0 0 0 1px ${po.gray200a}`
+ }
+}), Tp = ao.span.withConfig({
+ displayName: "DeleteButton",
+ componentId: "sc-1hj94p7-0"
+})([
+ "display:flex;justify-content:center;align-items:center;width:24px;height:24px;margin:0 calc(",
+ " * -1) 0 ",
+ ";padding:0;border:0;border-radius:",
+ ";background:none;color:",
+ ";outline:0;cursor:pointer;&:hover{background:",
+ ";color:",
+ ";}&:active{background:",
+ ";}"
+], po.spacing3, po.spacing3, po.radiusCircle, ((e) => e.$isDisabled ? po.gray400 : po.gray600), po.gray50a, po.gray800, po.gray100a), Ip = ao.button.withConfig({
+ displayName: "ChipStyled",
+ componentId: "sc-1hj94p7-1"
+})([
+ "",
+ " display:inline-flex;align-items:center;border:0;border-radius:",
+ ";background-color:",
+ ";color:",
+ ";outline:none;font-family:",
+ ";white-space:nowrap;",
+ ";",
+ ";",
+ ";",
+ ";",
+ ";"
+], _p, po.radiusPill, kp["chip-background-color"], po.colorText, po.brandFontStackBase, ((e) => e.onClick && ro([
+ "cursor:pointer;&:hover{background-color:",
+ ";",
+ "{color:",
+ ";}}&:active{background-color:",
+ ";}"
+], kp["chip-background-color-hover"], Tp, po.gray800, kp["chip-background-color-active"])), ((e) => e.$isFocusVisible && ro([
+ "background:",
+ ";box-shadow:inset ",
+ ";outline:0;"
+], kp["chip-background-color-focus"], kp["chip-shadow-focus"])), ((e) => e.$size === "m" && Pp), ((e) => e.$size === "s" && jp), ((e) => e.$isDisabled && Ap)), Op = ao.div.withConfig({
+ displayName: "ThumbnailContainer",
+ componentId: "sc-1hj94p7-2"
+})(["display:block;"]), jp = ro([
+ "",
+ " height:32px;padding:0 12px;",
+ "{margin:0 ",
+ " 0 calc(",
+ " * -1);}"
+], Vi.uiTextS, Op, po.spacing3, po.spacing3), Pp = ro([
+ "",
+ " height:40px;padding:0 16px;",
+ "{margin:0 ",
+ " 0 calc(",
+ " * -1);}"
+], Vi.uiTextM, Op, po.spacing3, po.spacing4), Ap = ro([
+ "background-color:",
+ ";color:",
+ ";pointer-events:none;"
+], kp["chip-background-color-disabled"], po.colorTextDisabled), Np = ao.div.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-1hj94p7-3"
+})([
+ "width:24px;height:24px;margin-left:calc(",
+ " * -1);padding:0 ",
+ " 0 0;"
+], po.spacing2, po.spacing3);
+let Mp = { data: "" }, Lp = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, Dp = /\/\*[^]*?\*\/| +/g, Rp = /\n+/g, zp = (e, t) => {
+ let n = "", r = "", o = "";
+ for (let i in e) {
+ let a = e[i];
+ i[0] == "@" ? i[1] == "i" ? n = i + " " + a + ";" : r += i[1] == "f" ? zp(a, i) : i + "{" + zp(a, i[1] == "k" ? "" : t) + "}" : typeof a == "object" ? r += zp(a, t ? t.replace(/([^,])+/g, ((e) => i.replace(/(^:.*)|([^,])+/g, ((t) => /&/.test(t) ? t.replace(/&/g, e) : e ? e + " " + t : t)))) : i) : a != null && (i = /^--/.test(i) ? i : i.replace(/[A-Z]/g, "-$&").toLowerCase(), o += zp.p ? zp.p(i, a) : i + ":" + a + ";");
+ }
+ return n + (t && o ? t + "{" + o + "}" : o) + r;
+}, $p = {}, Bp = (e) => {
+ if (typeof e == "object") {
+ let t = "";
+ for (let n in e) t += n + Bp(e[n]);
+ return t;
+ }
+ return e;
+}, Fp = (e, t, n, r, o) => {
+ let i = Bp(e), a = $p[i] || ($p[i] = ((e) => {
+ let t = 0, n = 11;
+ for (; t < e.length;) n = 101 * n + e.charCodeAt(t++) >>> 0;
+ return "go" + n;
+ })(i));
+ if (!$p[a]) {
+ let t = i === e ? ((e) => {
+ let t, n, r = [{}];
+ for (; t = Lp.exec(e.replace(Dp, ""));) t[4] ? r.shift() : t[3] ? (n = t[3].replace(Rp, " ").trim(), r.unshift(r[0][n] = r[0][n] || {})) : r[0][t[1]] = t[2].replace(Rp, " ").trim();
+ return r[0];
+ })(e) : e;
+ $p[a] = zp(o ? { ["@keyframes " + a]: t } : t, n ? "" : "." + a);
+ }
+ let s = n && $p.g ? $p.g : null;
+ return n && ($p.g = $p[a]), ((e, t, n, r) => {
+ r ? t.data = t.data.replace(r, e) : t.data.indexOf(e) === -1 && (t.data = n ? e + t.data : t.data + e);
+ })($p[a], t, r, s), a;
+};
+function Up(e) {
+ let t = this || {}, n = e.call ? e(t.p) : e;
+ return Fp(n.unshift ? n.raw ? ((e, t, n) => e.reduce(((e, r, o) => {
+ let i = t[o];
+ if (i && i.call) {
+ let e = i(n), t = e && e.props && e.props.className || /^go/.test(e) && e;
+ i = t ? "." + t : e && typeof e == "object" ? e.props ? "" : zp(e, "") : !1 === e ? "" : e;
+ }
+ return e + r + (i ?? "");
+ }), ""))(n, [].slice.call(arguments, 1), t.p) : n.reduce(((e, n) => Object.assign(e, n && n.call ? n(t.p) : n)), {}) : n, (r = t.target, typeof window == "object" ? ((r ? r.querySelector("#_goober") : window._goober) || Object.assign((r || document.head).appendChild(document.createElement("style")), {
+ innerHTML: " ",
+ id: "_goober"
+ })).firstChild : r || Mp), t.g, t.o, t.k);
+ var r;
+}
+Up.bind({ g: 1 });
+let Hp, Wp, Vp, qp = Up.bind({ k: 1 });
+function Gp(e, t) {
+ let n = this || {};
+ return function() {
+ let r = arguments;
+ function o(i, a) {
+ let s = Object.assign({}, i), l = s.className || o.className;
+ n.p = Object.assign({ theme: Wp && Wp() }, s), n.o = / *go\d+/.test(l), s.className = Up.apply(n, r) + (l ? " " + l : ""), t && (s.ref = a);
+ let c = e;
+ return e[0] && (c = s.as || e, delete s.as), Vp && c[0] && Vp(s), Hp(c, s);
+ }
+ return t ? t(o) : o;
+ };
+}
+var Yp = (e, t) => ((e) => typeof e == "function")(e) ? e(t) : e, Zp = (() => {
+ let e = 0;
+ return () => (++e).toString();
+})(), Kp = (() => {
+ let e;
+ return () => {
+ if (e === void 0 && typeof window < "u") {
+ let t = matchMedia("(prefers-reduced-motion: reduce)");
+ e = !t || t.matches;
+ }
+ return e;
+ };
+})(), Xp = /* @__PURE__ */ new Map(), Jp = (e) => {
+ if (Xp.has(e)) return;
+ let t = setTimeout((() => {
+ Xp.delete(e), nh({
+ type: 4,
+ toastId: e
+ });
+ }), 1e3);
+ Xp.set(e, t);
+}, Qp = (e, t) => {
+ switch (t.type) {
+ case 0: return {
+ ...e,
+ toasts: [t.toast, ...e.toasts].slice(0, 20)
+ };
+ case 1: return t.toast.id && ((e) => {
+ let t = Xp.get(e);
+ t && clearTimeout(t);
+ })(t.toast.id), {
+ ...e,
+ toasts: e.toasts.map(((e) => e.id === t.toast.id ? {
+ ...e,
+ ...t.toast
+ } : e))
+ };
+ case 2:
+ let { toast: n } = t;
+ return e.toasts.find(((e) => e.id === n.id)) ? Qp(e, {
+ type: 1,
+ toast: n
+ }) : Qp(e, {
+ type: 0,
+ toast: n
+ });
+ case 3:
+ let { toastId: r } = t;
+ return r ? Jp(r) : e.toasts.forEach(((e) => {
+ Jp(e.id);
+ })), {
+ ...e,
+ toasts: e.toasts.map(((e) => e.id === r || r === void 0 ? {
+ ...e,
+ visible: !1
+ } : e))
+ };
+ case 4: return t.toastId === void 0 ? {
+ ...e,
+ toasts: []
+ } : {
+ ...e,
+ toasts: e.toasts.filter(((e) => e.id !== t.toastId))
+ };
+ case 5: return {
+ ...e,
+ pausedAt: t.time
+ };
+ case 6:
+ let o = t.time - (e.pausedAt || 0);
+ return {
+ ...e,
+ pausedAt: void 0,
+ toasts: e.toasts.map(((e) => ({
+ ...e,
+ pauseDuration: e.pauseDuration + o
+ })))
+ };
+ }
+}, eh = [], th = {
+ toasts: [],
+ pausedAt: void 0
+}, nh = (e) => {
+ th = Qp(th, e), eh.forEach(((e) => {
+ e(th);
+ }));
+}, rh = (e) => (t, n) => {
+ let r = ((e, t = "blank", n) => ({
+ createdAt: Date.now(),
+ visible: !0,
+ type: t,
+ ariaProps: {
+ role: "status",
+ "aria-live": "polite"
+ },
+ message: e,
+ pauseDuration: 0,
+ ...n,
+ id: n?.id || Zp()
+ }))(t, e, n);
+ return nh({
+ type: 2,
+ toast: r
+ }), r.id;
+}, oh = (e, t) => rh("blank")(e, t);
+oh.error = rh("error"), oh.success = rh("success"), oh.loading = rh("loading"), oh.custom = rh("custom"), oh.dismiss = (e) => {
+ nh({
+ type: 3,
+ toastId: e
+ });
+}, oh.remove = (e) => nh({
+ type: 4,
+ toastId: e
+}), oh.promise = (e, t, n) => {
+ let r = oh.loading(t.loading, {
+ ...n,
+ ...n?.loading
+ });
+ return e.then(((e) => (oh.success(Yp(t.success, e), {
+ id: r,
+ ...n,
+ ...n?.success
+ }), e))).catch(((e) => {
+ oh.error(Yp(t.error, e), {
+ id: r,
+ ...n,
+ ...n?.error
+ });
+ })), e;
+};
+var ih, ah = qp`
+from {
+ transform: scale(0) rotate(45deg);
+ opacity: 0;
+}
+to {
+ transform: scale(1) rotate(45deg);
+ opacity: 1;
+}`, sh = qp`
+from {
+ transform: scale(0);
+ opacity: 0;
+}
+to {
+ transform: scale(1);
+ opacity: 1;
+}`, lh = qp`
+from {
+ transform: scale(0) rotate(90deg);
+ opacity: 0;
+}
+to {
+ transform: scale(1) rotate(90deg);
+ opacity: 1;
+}`, ch = Gp("div")`
+ width: 20px;
+ opacity: 0;
+ height: 20px;
+ border-radius: 10px;
+ background: ${(e) => e.primary || "#ff4b4b"};
+ position: relative;
+ transform: rotate(45deg);
+
+ animation: ${ah} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
+ forwards;
+ animation-delay: 100ms;
+
+ &:after,
+ &:before {
+ content: '';
+ animation: ${sh} 0.15s ease-out forwards;
+ animation-delay: 150ms;
+ position: absolute;
+ border-radius: 3px;
+ opacity: 0;
+ background: ${(e) => e.secondary || "#fff"};
+ bottom: 9px;
+ left: 4px;
+ height: 2px;
+ width: 12px;
+ }
+
+ &:before {
+ animation: ${lh} 0.15s ease-out forwards;
+ animation-delay: 180ms;
+ transform: rotate(90deg);
+ }
+`, uh = qp`
+ from {
+ transform: rotate(0deg);
+ }
+ to {
+ transform: rotate(360deg);
+ }
+`, dh = Gp("div")`
+ width: 12px;
+ height: 12px;
+ box-sizing: border-box;
+ border: 2px solid;
+ border-radius: 100%;
+ border-color: ${(e) => e.secondary || "#e0e0e0"};
+ border-right-color: ${(e) => e.primary || "#616161"};
+ animation: ${uh} 1s linear infinite;
+`, fh = qp`
+from {
+ transform: scale(0) rotate(45deg);
+ opacity: 0;
+}
+to {
+ transform: scale(1) rotate(45deg);
+ opacity: 1;
+}`, ph = qp`
+0% {
+ height: 0;
+ width: 0;
+ opacity: 0;
+}
+40% {
+ height: 0;
+ width: 6px;
+ opacity: 1;
+}
+100% {
+ opacity: 1;
+ height: 10px;
+}`, hh = Gp("div")`
+ width: 20px;
+ opacity: 0;
+ height: 20px;
+ border-radius: 10px;
+ background: ${(e) => e.primary || "#61d345"};
+ position: relative;
+ transform: rotate(45deg);
+
+ animation: ${fh} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
+ forwards;
+ animation-delay: 100ms;
+ &:after {
+ content: '';
+ box-sizing: border-box;
+ animation: ${ph} 0.2s ease-out forwards;
+ opacity: 0;
+ animation-delay: 200ms;
+ position: absolute;
+ border-right: 2px solid;
+ border-bottom: 2px solid;
+ border-color: ${(e) => e.secondary || "#fff"};
+ bottom: 6px;
+ left: 6px;
+ height: 10px;
+ width: 6px;
+ }
+`, gh = Gp("div")`
+ position: absolute;
+`, mh = Gp("div")`
+ position: relative;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ min-width: 20px;
+ min-height: 20px;
+`, vh = qp`
+from {
+ transform: scale(0.6);
+ opacity: 0.4;
+}
+to {
+ transform: scale(1);
+ opacity: 1;
+}`, yh = Gp("div")`
+ position: relative;
+ transform: scale(0.6);
+ opacity: 0.4;
+ min-width: 20px;
+ animation: ${vh} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
+ forwards;
+`, bh = ({ toast: e }) => {
+ let { icon: t, type: n, iconTheme: r } = e;
+ return t === void 0 ? n === "blank" ? null : s.createElement(mh, null, s.createElement(dh, { ...r }), n !== "loading" && s.createElement(gh, null, n === "error" ? s.createElement(ch, { ...r }) : s.createElement(hh, { ...r }))) : typeof t == "string" ? s.createElement(yh, null, t) : t;
+}, wh = (e) => `\n0% {transform: translate3d(0,${-200 * e}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`, xh = (e) => `\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150 * e}%,-1px) scale(.6); opacity:0;}\n`, Eh = Gp("div")`
+ display: flex;
+ align-items: center;
+ background: #fff;
+ color: #363636;
+ line-height: 1.3;
+ will-change: transform;
+ box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
+ max-width: 350px;
+ pointer-events: auto;
+ padding: 8px 10px;
+ border-radius: 8px;
+`, Sh = Gp("div")`
+ display: flex;
+ justify-content: center;
+ margin: 4px 10px;
+ color: inherit;
+ flex: 1 1 auto;
+ white-space: pre-line;
+`;
+s.memo((({ toast: e, position: t, style: n, children: r }) => {
+ let o = e.height ? ((e, t) => {
+ let n = e.includes("top") ? 1 : -1, [r, o] = Kp() ? ["0%{opacity:0;} 100%{opacity:1;}", "0%{opacity:1;} 100%{opacity:0;}"] : [wh(n), xh(n)];
+ return { animation: t ? `${qp(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards` : `${qp(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)` };
+ })(e.position || t || "top-center", e.visible) : { opacity: 0 }, i = s.createElement(bh, { toast: e }), a = s.createElement(Sh, { ...e.ariaProps }, Yp(e.message, e));
+ return s.createElement(Eh, {
+ className: e.className,
+ style: {
+ ...o,
+ ...n,
+ ...e.style
+ }
+ }, typeof r == "function" ? r({
+ icon: i,
+ message: a
+ }) : s.createElement(s.Fragment, null, i, a));
+})), ih = s.createElement, zp.p = void 0, Hp = ih, Wp = void 0, Vp = void 0, Up`
+ z-index: 9999;
+ > * {
+ pointer-events: auto;
+ }
+`;
+const Ch = "ds-thumbnail__pointer-events-wrapper", { internalTokens: kh, declareTokens: _h } = ea({
+ lightTheme: {
+ "thumbnail-overlay-fill": po.gray200a,
+ "thumbnail-overlay-color": po.gray10
+ },
+ darkTheme: {
+ "thumbnail-overlay-fill": "rgb(3 16 38 / 20%)",
+ "thumbnail-overlay-color": po.gray1000
+ }
+}), Th = ao.div.withConfig({
+ displayName: "OverlayStyled",
+ componentId: "sc-7kyl1s-0"
+})([
+ "",
+ " position:absolute;top:0;left:0;display:grid;place-items:center;width:100%;height:100%;border-radius:var(--ds-thumbnail-border-radius);background:",
+ ";color:",
+ ";-webkit-mask-image:var(--ds-thumbnail-overlay-indicator-cutout);mask-image:var(--ds-thumbnail-overlay-indicator-cutout);",
+ ""
+], _h, kh["thumbnail-overlay-fill"], kh["thumbnail-overlay-color"], ((e) => e.$isConcealed && ro([
+ "opacity:0;",
+ ":hover &,",
+ ":focus-visible &{opacity:1;}"
+], ".ds-thumbnail__pointer-events-wrapper", ".ds-thumbnail__pointer-events-wrapper"))), Ih = {
+ indicator: {
+ square: {
+ l: {
+ radius: 8,
+ offset: [4, 4]
+ },
+ m: {
+ radius: 8,
+ offset: [4, 4]
+ },
+ s: {
+ radius: 8,
+ offset: [4, 4]
+ },
+ xs: {
+ radius: 8,
+ offset: [7, 7]
+ }
+ },
+ circle: {
+ l: {
+ radius: 8,
+ offset: [0, 0]
+ },
+ m: {
+ radius: 8,
+ offset: [2, 2]
+ },
+ s: {
+ radius: 8,
+ offset: [4, 4]
+ },
+ xs: {
+ radius: 8,
+ offset: [9, 5]
+ }
+ }
+ },
+ status: {
+ square: {
+ l: {
+ radius: 5,
+ offset: [1, 1]
+ },
+ m: {
+ radius: 5,
+ offset: [1, 1]
+ },
+ s: {
+ radius: 5,
+ offset: [1, 1]
+ },
+ xs: {
+ radius: 3,
+ offset: [1, 1]
+ }
+ },
+ circle: {
+ l: {
+ radius: 5,
+ offset: [-5, -5]
+ },
+ m: {
+ radius: 5,
+ offset: [-1, -1]
+ },
+ s: {
+ radius: 5,
+ offset: [1, 1]
+ },
+ xs: {
+ radius: 3,
+ offset: [-1, -1]
+ }
+ }
+ }
+}, Oh = ro(["position:absolute;right:calc(var(--ds-thumbnail-indicator-offset-x) * -1);bottom:calc(var(--ds-thumbnail-indicator-offset-y) * -1);overflow:visible;width:calc(var(--ds-thumbnail-indicator-radius) * 2);height:calc(var(--ds-thumbnail-indicator-radius) * 2);"]), jh = ao.svg.withConfig({
+ displayName: "SvgIcon",
+ componentId: "sc-18umtiy-0"
+})(["", ""], Oh), Ph = ao.div.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-18umtiy-1"
+})([
+ "",
+ " display:flex;justify-content:center;align-items:center;border-radius:50%;background-color:",
+ ";color:",
+ ";svg{width:12px;height:12px;}"
+], Oh, (({ $backgroundColor: e }) => po[e]), (({ $iconColor: e }) => po[e])), Ah = {
+ draft: function({ ...e }) {
+ return (0, Go.jsxs)(jh, {
+ ...e,
+ viewBox: "0 0 24 24",
+ "aria-hidden": "true",
+ fill: po.gray400,
+ children: [(0, Go.jsx)("path", { d: "M 0 12 C 0 5.371094 5.371094 0 12 0 C 18.628906 0 24 5.371094 24 12 C 24 18.628906 18.628906 24 12 24 C 5.371094 24 0 18.628906 0 12 Z M 0 12 " }), (0, Go.jsx)("path", {
+ d: "M 7.5 10.5 C 6.671875 10.5 6 11.171875 6 12 C 6 12.828125 6.671875 13.5 7.5 13.5 C 8.328125 13.5 9 12.828125 9 12 C 9 11.171875 8.328125 10.5 7.5 10.5 Z M 10.5 12 C 10.5 11.171875 11.171875 10.5 12 10.5 C 12.828125 10.5 13.5 11.171875 13.5 12 C 13.5 12.828125 12.828125 13.5 12 13.5 C 11.171875 13.5 10.5 12.828125 10.5 12 Z M 15 12 C 15 11.171875 15.671875 10.5 16.5 10.5 C 17.328125 10.5 18 11.171875 18 12 C 18 12.828125 17.328125 13.5 16.5 13.5 C 15.671875 13.5 15 12.828125 15 12 Z M 15 12 ",
+ fill: "white"
+ })]
+ });
+ },
+ error: function({ ...e }) {
+ return (0, Go.jsxs)(jh, {
+ ...e,
+ viewBox: "0 0 24 24",
+ "aria-hidden": "true",
+ fill: po.red400,
+ children: [
+ (0, Go.jsx)("path", { d: "M 0 12 C 0 5.371094 5.371094 0 12 0 C 18.628906 0 24 5.371094 24 12 C 24 18.628906 18.628906 24 12 24 C 5.371094 24 0 18.628906 0 12 Z M 0 12 " }),
+ (0, Go.jsx)("path", {
+ d: "M 13.5 4.5 L 10.5 4.5 L 10.5 13.5 L 13.5 13.5 Z M 13.5 4.5 ",
+ fill: "white"
+ }),
+ (0, Go.jsx)("path", {
+ d: "M 13.5 16.5 L 10.5 16.5 L 10.5 19.5 L 13.5 19.5 Z M 13.5 16.5 ",
+ fill: "white"
+ })
+ ]
+ });
+ },
+ loading: function({ ...e }) {
+ return (0, Go.jsx)(jh, {
+ ...e,
+ viewBox: "0 0 14 14",
+ "aria-hidden": "true",
+ fill: po.gray400,
+ children: (0, Go.jsx)(Mh, {
+ cx: "7",
+ cy: "7",
+ r: "5",
+ fill: "transparent",
+ strokeWidth: "2"
+ })
+ });
+ },
+ negative: function({ ...e }) {
+ return (0, Go.jsxs)(jh, {
+ ...e,
+ viewBox: "0 0 24 24",
+ "aria-hidden": "true",
+ fill: po.red400,
+ children: [(0, Go.jsx)("path", { d: "M 0 12 C 0 5.371094 5.371094 0 12 0 C 18.628906 0 24 5.371094 24 12 C 24 18.628906 18.628906 24 12 24 C 5.371094 24 0 18.628906 0 12 Z M 0 12 " }), (0, Go.jsx)("path", {
+ d: "M 17.304688 6.695312 C 16.71875 6.109375 15.769531 6.109375 15.183594 6.695312 L 12 9.878906 L 8.816406 6.695312 C 8.230469 6.109375 7.28125 6.109375 6.695312 6.695312 C 6.109375 7.28125 6.109375 8.230469 6.695312 8.816406 L 9.878906 12 L 6.695312 15.183594 C 6.109375 15.769531 6.109375 16.71875 6.695312 17.304688 C 7.28125 17.890625 8.230469 17.890625 8.816406 17.304688 L 12 14.121094 L 15.183594 17.304688 C 15.769531 17.890625 16.71875 17.890625 17.304688 17.304688 C 17.890625 16.71875 17.890625 15.769531 17.304688 15.183594 L 14.121094 12 L 17.304688 8.816406 C 17.890625 8.230469 17.890625 7.28125 17.304688 6.695312 Z M 17.304688 6.695312",
+ fill: "white"
+ })]
+ });
+ },
+ positive: function({ ...e }) {
+ return (0, Go.jsxs)(jh, {
+ ...e,
+ viewBox: "0 0 24 24",
+ "aria-hidden": "true",
+ fill: po.teal500,
+ children: [(0, Go.jsx)("path", { d: "M 0 12 C 0 5.371094 5.371094 0 12 0 C 18.628906 0 24 5.371094 24 12 C 24 18.628906 18.628906 24 12 24 C 5.371094 24 0 18.628906 0 12 Z M 0 12 " }), (0, Go.jsx)("path", {
+ d: "m5.69215,11.43763c-0.58607,0.58607 -0.58607,1.53629 0,2.12236l3.18355,3.18363c0.21978,0.21971 0.49077,0.35703 0.77456,0.41195c0.12714,0.02461 0.25685,0.03272 0.38568,0.02431c0.35044,-0.02311 0.69432,-0.16853 0.96216,-0.43627l7.42831,-7.42836c0.58604,-0.58608 0.58604,-1.53629 0,-2.12238c-0.58604,-0.58607 -1.53631,-0.58607 -2.12235,0l-6.36715,6.36712l-2.12238,-2.12238c-0.58608,-0.58608 -1.53629,-0.58608 -2.12238,0z",
+ fill: "white"
+ })]
+ });
+ }
+}, Nh = co`
+ 0% {
+ transform: rotate(0deg);
+ stroke-dashoffset: 6.6;
+ }
+
+ 50% {
+ transform: rotate(720deg);
+ stroke-dashoffset: 31.4;
+ }
+
+ 100% {
+ transform: rotate(1080deg);
+ stroke-dashoffset: 6.6;
+ }
+`, Mh = ao.circle.withConfig({
+ displayName: "SvgSpinner",
+ componentId: "sc-cmirl-0"
+})([
+ "stroke:",
+ ";transform-origin:center;animation:",
+ " 2s linear infinite;stroke-dasharray:31.4;stroke-linecap:round;"
+], ((e) => e.$color || po.gray400), Nh), Lh = {
+ online: function({ ...e }) {
+ return (0, Go.jsx)(jh, {
+ viewBox: "0 0 24 24",
+ "aria-hidden": "true",
+ fill: po.teal500,
+ ...e,
+ children: (0, Go.jsx)("path", { d: "M 0 12 C 0 5.371094 5.371094 0 12 0 C 18.628906 0 24 5.371094 24 12 C 24 18.628906 18.628906 24 12 24 C 5.371094 24 0 18.628906 0 12 Z M 0 12 " })
+ });
+ },
+ offline: function({ ...e }) {
+ return (0, Go.jsx)(jh, {
+ viewBox: "0 0 24 24",
+ "aria-hidden": "true",
+ fill: po.gray400,
+ ...e,
+ children: (0, Go.jsx)("path", { d: "M 0 12 C 0 5.371094 5.371094 0 12 0 C 18.628906 0 24 5.371094 24 12 C 24 18.628906 18.628906 24 12 24 C 5.371094 24 0 18.628906 0 12 Z M 0 12 " })
+ });
+ },
+ inactive: function({ ...e }) {
+ return (0, Go.jsx)(jh, {
+ viewBox: "0 0 24 24",
+ "aria-hidden": "true",
+ fill: "transparent",
+ ...e,
+ children: (0, Go.jsx)("circle", {
+ cx: "12",
+ cy: "12",
+ r: "9",
+ stroke: po.gray400,
+ strokeWidth: "4"
+ })
+ });
+ }
+};
+function Dh({ size: e = "m", shape: t = "square", variant: n = "clean", icon: r, imageUrl: o, backgroundColor: i, iconColor: a, children: s, ...l }) {
+ let c = n === "content", u = n === "clean", d = i ? po[i] || i : u ? po.gray50a : i || o ? "transparent" : po.white, f = u ? po[a] || a || po.gray600 : void 0, p = t === "circle" ? "50%" : n === "preview" ? "0" : "5px", h = Gc("thumbnail-mask");
+ return (0, Go.jsxs)(zh, {
+ $size: e,
+ $shape: t,
+ className: Ch,
+ style: { "--ds-thumbnail-border-radius": p },
+ ...l,
+ children: [
+ (0, Go.jsxs)(Bh, {
+ role: "none",
+ children: [(0, Go.jsxs)("mask", {
+ id: h,
+ children: [(0, Go.jsx)("rect", {
+ fill: "white",
+ x: "0",
+ y: "0",
+ width: "100%",
+ height: "100%",
+ rx: p
+ }), (0, Go.jsx)(Fh, {})]
+ }), (0, Go.jsxs)("g", {
+ mask: `url(#${h})`,
+ children: [
+ c && (0, Go.jsx)(Vh, {}),
+ (0, Go.jsx)("rect", {
+ fill: d,
+ x: "0",
+ y: "0",
+ width: "100%",
+ height: "100%",
+ rx: p,
+ "data-testid": "ds-thumbnail-fill"
+ }),
+ o && (0, Go.jsx)("image", {
+ x: "0",
+ y: "0",
+ width: "100%",
+ height: "100%",
+ preserveAspectRatio: "xMidYMid " + (n === "preview" ? "meet" : "slice"),
+ xlinkHref: o,
+ "data-testid": "ds-thumbnail-image"
+ }),
+ c && (0, Go.jsx)("rect", {
+ fill: "none",
+ x: "0",
+ y: "0",
+ width: "100%",
+ height: "100%",
+ stroke: "rgba(0,0,0,0.1)",
+ strokeWidth: "2",
+ rx: p,
+ "data-testid": "ds-thumbnail-inner-shadow"
+ })
+ ]
+ })]
+ }),
+ (0, Go.jsxs)(Hh, {
+ $iconColor: f,
+ $size: e,
+ "data-testid": "ds-thumbnail-content",
+ children: [r, c && !i && !o && (0, Go.jsx)(Wh, { "data-testid": "ds-thumbnail-no-image-line" })]
+ }),
+ s
+ ]
+ });
+}
+Dh.Overlay = function({ children: e, isConcealed: t = !1, isLoading: n = !1, ...r }) {
+ return (0, Go.jsx)(Th, {
+ $isConcealed: t,
+ ...r,
+ children: n ? (0, Go.jsx)(Ks, { "data-testid": "ds-thumbnail-overlay-spinner" }) : e
+ });
+}, Dh.pointerEventsClassname = Ch, Dh.Indicator = function({ ...e }) {
+ if ("type" in e) {
+ let { type: t, ...n } = e, r = Ah[t];
+ return (0, Go.jsx)(r, {
+ "data-thumbnail-indicator": !0,
+ ...n
+ });
+ }
+ let { backgroundColor: t, iconColor: n, icon: r, ...o } = e;
+ return (0, Go.jsx)(Ph, {
+ $backgroundColor: t || "gray400",
+ $iconColor: n || "white",
+ "data-thumbnail-indicator": !0,
+ ...o,
+ children: r
+ });
+}, Dh.Status = function({ type: e }) {
+ let t = Lh[e];
+ return (0, Go.jsx)(t, { "data-thumbnail-status": !0 });
+};
+const Rh = {
+ xs: "24px",
+ s: "32px",
+ m: "40px",
+ l: "64px"
+}, zh = ao.div.withConfig({
+ displayName: "ThumbnailContainer",
+ componentId: "sc-humdc6-0"
+})([
+ "position:relative;flex:none;width:",
+ ";height:",
+ ";&:has([data-thumbnail-status]){",
+ "}&:has([data-thumbnail-indicator]){",
+ "}"
+], ((e) => Rh[e.$size]), ((e) => Rh[e.$size]), $h("status"), $h("indicator"));
+function $h(e) {
+ return (t) => {
+ let { radius: n, offset: r } = Ih[e][t.$shape][t.$size];
+ return ro([
+ "--ds-thumbnail-indicator-offset-x:",
+ "px;--ds-thumbnail-indicator-offset-y:",
+ "px;--ds-thumbnail-indicator-radius:",
+ "px;--ds-thumbnail-overlay-indicator-cutout:-webkit-radial-gradient( calc( 100% - ( var(--ds-thumbnail-indicator-radius) - var( --ds-thumbnail-indicator-offset-x ) ) ) calc( 100% - ( var(--ds-thumbnail-indicator-radius) - var( --ds-thumbnail-indicator-offset-y ) ) ),circle,transparent calc(var(--ds-thumbnail-indicator-radius) + ",
+ "px),black 0 );--ds-thumbnail-indicator-color:black;"
+ ], r[0], r[1], n, 2);
+ };
+}
+const Bh = ao.svg.withConfig({
+ displayName: "Svg",
+ componentId: "sc-humdc6-1"
+})(["position:absolute;top:0;left:0;width:100%;height:100%;"]), Fh = ao.circle.withConfig({
+ displayName: "Cutout",
+ componentId: "sc-humdc6-2"
+})(["fill:var(--ds-thumbnail-indicator-color,white);cx:calc(100% - var(--ds-thumbnail-indicator-radius) + var(--ds-thumbnail-indicator-offset-x));cy:calc(100% - var(--ds-thumbnail-indicator-radius) + var(--ds-thumbnail-indicator-offset-y));r:calc(var(--ds-thumbnail-indicator-radius) + ", "px);"], 2), Uh = {
+ xs: po.fontSize100,
+ s: po.fontSize200,
+ m: po.fontSize500,
+ l: po.fontSize500
+}, Hh = ao.div.withConfig({
+ displayName: "Content",
+ componentId: "sc-humdc6-3"
+})([
+ "position:absolute;inset:0;display:grid;place-items:center;color:",
+ ";font-weight:600;font-size:",
+ ";line-height:1;"
+], ((e) => e.$iconColor), ((e) => Uh[e.$size])), Wh = ao.div.withConfig({
+ displayName: "NoImage",
+ componentId: "sc-humdc6-4"
+})(["width:80%;height:2px;border-radius:2px;background:", ";transform:rotate(-45deg);"], po.red500);
+function Vh() {
+ return (0, Go.jsxs)("g", { children: [(0, Go.jsx)("rect", {
+ height: "64",
+ width: "64",
+ x: "0",
+ y: "0",
+ fill: "#ffffff"
+ }), (0, Go.jsx)("path", {
+ fill: "#e9ecee",
+ d: "M0 0h4v4H0zM0 8h4v4H0zM0 16h4v4H0zM0 24h4v4H0zM0 32h4v4H0zM0 40h4v4H0zM0 48h4v4H0zM0 56h4v4H0zM4 4h4v4H4zM4 12h4v4H4zM4 20h4v4H4zM4 28h4v4H4zM4 36h4v4H4zM4 44h4v4H4zM4 52h4v4H4zM4 60h4v4H4zM8 0h4v4H8zM8 8h4v4H8zM8 16h4v4H8zM8 24h4v4H8zM8 32h4v4H8zM8 40h4v4H8zM8 48h4v4H8zM8 56h4v4H8zM12 4h4v4h-4zM12 12h4v4h-4zM12 20h4v4h-4zM12 28h4v4h-4zM12 36h4v4h-4zM12 44h4v4h-4zM12 52h4v4h-4zM12 60h4v4h-4zM16 0h4v4h-4zM16 8h4v4h-4zM16 16h4v4h-4zM16 24h4v4h-4zM16 32h4v4h-4zM16 40h4v4h-4zM16 48h4v4h-4zM16 56h4v4h-4zM20 4h4v4h-4zM20 12h4v4h-4zM20 20h4v4h-4zM20 28h4v4h-4zM20 36h4v4h-4zM20 44h4v4h-4zM20 52h4v4h-4zM20 60h4v4h-4zM24 0h4v4h-4zM24 8h4v4h-4zM24 16h4v4h-4zM24 24h4v4h-4zM24 32h4v4h-4zM24 40h4v4h-4zM24 48h4v4h-4zM24 56h4v4h-4zM28 4h4v4h-4zM28 12h4v4h-4zM28 20h4v4h-4zM28 28h4v4h-4zM28 36h4v4h-4zM28 44h4v4h-4zM28 52h4v4h-4zM28 60h4v4h-4zM32 0h4v4h-4zM32 8h4v4h-4zM32 16h4v4h-4zM32 24h4v4h-4zM32 32h4v4h-4zM32 40h4v4h-4zM32 48h4v4h-4zM32 56h4v4h-4zM36 4h4v4h-4zM36 12h4v4h-4zM36 20h4v4h-4zM36 28h4v4h-4zM36 36h4v4h-4zM36 44h4v4h-4zM36 52h4v4h-4zM36 60h4v4h-4zM40 0h4v4h-4zM40 8h4v4h-4zM40 16h4v4h-4zM40 24h4v4h-4zM40 32h4v4h-4zM40 40h4v4h-4zM40 48h4v4h-4zM40 56h4v4h-4zM44 4h4v4h-4zM44 12h4v4h-4zM44 20h4v4h-4zM44 28h4v4h-4zM44 36h4v4h-4zM44 44h4v4h-4zM44 52h4v4h-4zM44 60h4v4h-4zM48 0h4v4h-4zM48 8h4v4h-4zM48 16h4v4h-4zM48 24h4v4h-4zM48 32h4v4h-4zM48 40h4v4h-4zM48 48h4v4h-4zM48 56h4v4h-4zM52 4h4v4h-4zM52 12h4v4h-4zM52 20h4v4h-4zM52 28h4v4h-4zM52 36h4v4h-4zM52 44h4v4h-4zM52 52h4v4h-4zM52 60h4v4h-4zM56 0h4v4h-4zM56 8h4v4h-4zM56 16h4v4h-4zM56 24h4v4h-4zM56 32h4v4h-4zM56 40h4v4h-4zM56 48h4v4h-4zM56 56h4v4h-4zM60 4h4v4h-4zM60 12h4v4h-4zM60 20h4v4h-4zM60 28h4v4h-4zM60 36h4v4h-4zM60 44h4v4h-4zM60 52h4v4h-4zM60 60h4v4h-4z"
+ })] });
+}
+function qh(e) {
+ return (0, Go.jsxs)(Gh, {
+ role: "status",
+ "aria-live": "polite",
+ children: [
+ e.thumbnail && (0, Go.jsx)(Yh, { children: e.thumbnail }),
+ (0, Go.jsxs)(Zh, { children: [(0, Go.jsx)(Kh, {
+ title: typeof e.title == "string" ? e.title : "",
+ children: e.title
+ }), e.description && (0, Go.jsx)(Xh, {
+ title: typeof e.description == "string" ? e.description : "",
+ children: e.description
+ })] }),
+ (0, Go.jsx)(Jh, { children: e.button }),
+ typeof e.progressPercentage == "number" && (0, Go.jsx)(Qh, { style: { width: e.progressPercentage + "%" } })
+ ]
+ });
+}
+const Gh = ao.div.withConfig({
+ displayName: "BaloonStyled",
+ componentId: "sc-1yjr5hd-0"
+})([
+ "",
+ ";position:relative;display:flex;align-items:flex-start;overflow:hidden;box-sizing:border-box;width:480px;padding:",
+ ";border-radius:",
+ ";background:",
+ ";box-shadow:",
+ ",",
+ ";"
+], Mu, po.spacing5, po.radiusLarge, po.white, po.elevationStatic, po.elevation2), Yh = ao.div.withConfig({
+ displayName: "ThumbnailWrapper",
+ componentId: "sc-1yjr5hd-1"
+})(["flex:none;margin-right:", ";"], po.spacing5), Zh = ao.div.withConfig({
+ displayName: "Text",
+ componentId: "sc-1yjr5hd-2"
+})(["flex:1;align-self:center;"]), Kh = ao.h2.withConfig({
+ displayName: "Title",
+ componentId: "sc-1yjr5hd-3"
+})(["display:-webkit-box;overflow:hidden;margin:0;font:inherit;-webkit-line-clamp:3;-webkit-box-orient:vertical;"]), Xh = ao.p.withConfig({
+ displayName: "Description",
+ componentId: "sc-1yjr5hd-4"
+})([
+ "display:-webkit-box;overflow:hidden;margin:",
+ " 0 0;color:",
+ ";font-size:",
+ ";line-height:20px;-webkit-line-clamp:4;-webkit-box-orient:vertical;"
+], po.spacing2, po.colorTextMuted, po.fontSize75), Jh = ao.div.withConfig({
+ displayName: "Action",
+ componentId: "sc-1yjr5hd-5"
+})(["flex:none;"]), Qh = ao.div.withConfig({
+ displayName: "Progress",
+ componentId: "sc-1yjr5hd-6"
+})(["position:absolute;bottom:0;left:0;height:4px;background-color:", ";transition:width 0.2s;"], po.brandPrimary500);
+function eg({ isPersistent: e, button: t, id: n = qc(), variant: r, thumbnail: o, ...i }) {
+ return oh(((e) => (0, Go.jsx)(qh, {
+ thumbnail: tg(o, r),
+ ...i,
+ button: t ? (0, s.cloneElement)(t, {
+ variant: "clean",
+ onClick() {
+ var n, r;
+ (r = (n = t.props).onClick) == null || r.call(n), oh.dismiss(e.id);
+ }
+ }) : (0, Go.jsx)(il, {
+ variant: "clean",
+ onClick: () => {
+ oh.dismiss(e.id);
+ },
+ icon: (0, Go.jsx)(ai, {}),
+ title: "Close"
+ })
+ })), {
+ id: n,
+ duration: e ? 288e5 : 8e3
+ });
+}
+function tg(e, t) {
+ return e || (t ? {
+ loading: (0, Go.jsx)(Dh, {
+ shape: "circle",
+ backgroundColor: "transparent",
+ icon: (0, Go.jsx)(Ks, {})
+ }),
+ success: (0, Go.jsx)(Dh, {
+ shape: "circle",
+ backgroundColor: "green500",
+ icon: (0, Go.jsx)(li, {}),
+ iconColor: "white"
+ }),
+ error: (0, Go.jsx)(Dh, {
+ shape: "circle",
+ backgroundColor: "red500",
+ icon: (0, Go.jsx)(ai, {}),
+ iconColor: "white"
+ })
+ }[t] : void 0);
+}
+function ng(e, t) {
+ (0, s.useEffect)((() => {
+ function n(n) {
+ n.key === e && t(n);
+ }
+ return window.addEventListener("keydown", n), () => {
+ window.removeEventListener("keydown", n);
+ };
+ }), [t, e]);
+}
+eg.dismiss = function(e) {
+ oh.dismiss(e);
+}, eg.remove = function(e) {
+ oh.remove(e);
+};
+const rg = ao.div.withConfig({
+ displayName: "ArrowStyled",
+ componentId: "sc-dmd5wz-0"
+})([
+ "margin-right:calc(",
+ " * -1);margin-left:calc(",
+ " * -1);"
+], po.spacing2, po.spacing2), og = (0, s.createContext)(null);
+function ig() {
+ let e = (0, s.useContext)(og);
+ if (!e) throw Error("Dropdown compound components cannot be rendered outside the Dropdown component");
+ return e;
+}
+const ag = (0, s.createContext)(void 0), sg = (0, s.forwardRef)((({ children: e, minWidth: t, role: n = "menu", ...r }, o) => {
+ let i = Cl("dropdown"), a = (0, s.useRef)(null), { dispatch: l } = ig(), c = (0, s.useContext)(ag);
+ return (0, s.useEffect)((() => () => {
+ l({
+ type: "purge-menu-items",
+ payload: c
+ });
+ }), [
+ e,
+ l,
+ c
+ ]), (0, Go.jsx)(lg, {
+ $minWidth: t,
+ role: n,
+ ref: Fl(o, a),
+ $zIndex: i,
+ ...r,
+ onMouseLeave: r.onMouseLeave,
+ children: e
+ });
+})), lg = ao.div.withConfig({
+ displayName: "ContainerStyled",
+ componentId: "sc-rd9abn-0"
+})([
+ "z-index:",
+ ";overflow-y:auto;box-sizing:border-box;min-width:",
+ ";max-width:336px;max-height:calc(36px * 9.5 + ",
+ ");padding:",
+ " 0;border-radius:",
+ ";background:",
+ ";color:",
+ ";box-shadow:",
+ ",",
+ ";&:empty{display:none;}"
+], ((e) => e.$zIndex), ((e) => e.$minWidth ? e.$minWidth : "224px"), po.spacing3, po.spacing3, po.radiusBase, po.gray10, po.colorText, po.elevationStatic, po.elevation2);
+let cg = !1, ug = 0;
+function dg(e) {
+ e.pointerType === "touch" && (cg = !0, setTimeout((() => {
+ cg = !1;
+ }), 50));
+}
+function fg() {
+ if (typeof document < "u") return typeof PointerEvent < "u" && document.addEventListener("pointerup", dg), ug++, () => {
+ ug--, ug > 0 || typeof PointerEvent < "u" && document.removeEventListener("pointerup", dg);
+ };
+}
+function pg() {
+ return (0, Go.jsx)("svg", {
+ width: "12",
+ height: "12",
+ viewBox: "0 0 12 12",
+ xmlns: "http://www.w3.org/2000/svg",
+ children: (0, Go.jsx)("path", { d: "M1.793 5.621a1 1 0 000 1.415l2.121 2.12a.995.995 0 00.773.292.996.996 0 00.641-.291l4.95-4.95a1 1 0 00-1.414-1.414L4.621 7.036 3.207 5.62a1 1 0 00-1.414 0z" })
+ });
+}
+const hg = "ds-checkbox__pointer-events-wrapper";
+function gg({ isChecked: e = !1, isDisabled: t = !1, isIndeterminate: n = !1, inputProps: r, subtext: o, children: i, onChange: a = () => {}, id: s, ...l }) {
+ let { isFocusVisible: c, focusProps: u } = Ja();
+ return (0, Go.jsxs)(yg, {
+ $isIndeterminate: n,
+ $isDisabled: t,
+ $isChecked: e,
+ className: hg,
+ ...l,
+ children: [
+ (0, Go.jsx)(xg, {
+ type: "checkbox",
+ ref: (e) => {
+ e && (e.indeterminate = n);
+ },
+ "aria-checked": n ? "mixed" : e,
+ disabled: t,
+ checked: e,
+ onChange: a,
+ id: s,
+ ...u,
+ ...r
+ }),
+ (0, Go.jsx)(bg, { children: (0, Go.jsxs)(wg, {
+ $isFocusVisible: c,
+ $isIndeterminate: n,
+ $isDisabled: t,
+ $isChecked: e,
+ children: [e && (0, Go.jsx)(pg, {}), n && (0, Go.jsx)(Eg, {})]
+ }) }),
+ i && (0, Go.jsxs)(Sg, {
+ $isDisabled: t,
+ children: [i, o && (0, Go.jsx)(Cg, {
+ $isDisabled: t,
+ children: o
+ })]
+ })
+ ]
+ });
+}
+gg.pointerEventsClassname = hg;
+const { internalTokens: mg, declareTokens: vg } = ea({
+ lightTheme: {
+ "checkbox-border-unchecked": po.gray300,
+ "checkbox-border-unchecked-hover": po.gray500,
+ "checkbox-border-unchecked-focus": po.gray500,
+ "checkbox-fill-disabled": po.gray100,
+ "checkbox-checkmark-color-disabled": po.gray500
+ },
+ darkTheme: {
+ "checkbox-border-unchecked": po.gray300a,
+ "checkbox-border-unchecked-hover": po.gray500a,
+ "checkbox-border-unchecked-focus": po.gray500a,
+ "checkbox-fill-disabled": po.gray100a,
+ "checkbox-checkmark-color-disabled": po.gray500a
+ }
+}), yg = ao.label.withConfig({
+ displayName: "Container",
+ componentId: "sc-1q9e150-0"
+})([
+ "",
+ " ",
+ " display:flex;align-items:flex-start;margin:0;padding:",
+ " 0;cursor:",
+ ";user-select:none;"
+], vg, Vi.uiTextM, po.spacing1, ((e) => !e.$isDisabled && "pointer")), bg = ao.div.withConfig({
+ displayName: "IndicatorPosition",
+ componentId: "sc-1q9e150-1"
+})(["display:flex;flex:none;align-items:center;&::before{content:'';}"]), wg = ao.div.withConfig({
+ displayName: "Indicator",
+ componentId: "sc-1q9e150-2"
+})([
+ "position:relative;display:flex;justify-content:center;align-items:center;box-sizing:border-box;width:16px;height:16px;border:2px solid ",
+ ";border-radius:",
+ ";background-color:transparent;&::before{content:'';position:absolute;top:-5px;right:-5px;bottom:-5px;left:-5px;border:",
+ " solid transparent;border-radius:calc( ",
+ " + 3px );}",
+ " ",
+ " ",
+ " ",
+ " ",
+ ":hover &&,",
+ ":focus-visible &&{",
+ " background-color:",
+ ";}"
+], mg["checkbox-border-unchecked"], po.radiusMedium, po.focusRingWidth, po.radiusMedium, ((e) => e.$isFocusVisible && ro([
+ "border-color:",
+ ";&::before{border-color:",
+ ";}"
+], mg["checkbox-border-unchecked-focus"], e.$isChecked || e.$isIndeterminate ? po.focusRingColorPrimary : po.focusRingColorSecondary)), ((e) => e.$isChecked && ro(["border-color:transparent;background-color:", ";fill:#fff;"], po.blue500)), ((e) => e.$isIndeterminate && ro(["border-color:transparent;background-color:", ";"], po.blue500)), ((e) => e.$isDisabled && ro([
+ "border-color:transparent;background-color:",
+ ";fill:",
+ ";"
+], mg["checkbox-fill-disabled"], mg["checkbox-checkmark-color-disabled"])), ".ds-checkbox__pointer-events-wrapper", ".ds-checkbox__pointer-events-wrapper", ((e) => !e.$isChecked && !e.$isIndeterminate && !e.$isDisabled && `border-color: ${mg["checkbox-border-unchecked-hover"]};`), ((e) => !e.$isChecked && !e.$isIndeterminate || e.$isDisabled ? void 0 : po.blue600)), xg = ao.input.withConfig({
+ displayName: "Input",
+ componentId: "sc-1q9e150-3"
+})(["position:absolute;overflow:hidden;clip:rect(0,0,0,0);width:1px;height:1px;margin:0 -1px -1px 0;padding:0;border:0;white-space:nowrap;clip-path:inset(50%);"]), Eg = ao.div.withConfig({
+ displayName: "IndeterminateMark",
+ componentId: "sc-1q9e150-4"
+})([
+ "width:8px;height:2px;border-radius:",
+ ";background-color:",
+ ";"
+], po.radiusPill, po.white), Sg = ao.div.withConfig({
+ displayName: "Label",
+ componentId: "sc-1q9e150-5"
+})(["display:block;margin-left:8px;color:", ";"], ((e) => e.$isDisabled ? po.colorTextDisabled : po.colorText)), Cg = ao.span.withConfig({
+ displayName: "SubtextHolder",
+ componentId: "sc-1q9e150-6"
+})([
+ "display:block;color:",
+ ";font-size:",
+ ";"
+], ((e) => e.$isDisabled ? po.colorTextDisabled : po.colorTextMuted), po.fontSize75), kg = ao.div.withConfig({
+ displayName: "ItemWrapper",
+ componentId: "sc-1ihd0z9-0"
+})(["position:relative;"]), _g = ao.button.withConfig({
+ displayName: "ItemStyled",
+ componentId: "sc-1ihd0z9-1"
+})([
+ "",
+ " display:flex;align-items:center;box-sizing:border-box;width:100%;height:36px;margin:0;padding:0 ",
+ ";border:none;background:none;color:",
+ ";outline:none;font-family:",
+ ";cursor:pointer;",
+ " ",
+ " &:hover{background:",
+ ";color:",
+ ";}&:active{background:",
+ ";color:",
+ ";}&:disabled{background:none;color:",
+ ";cursor:default;}"
+], Vi.uiTextS, po.spacing5, ((e) => e.$isChecked ? po.colorText : po.colorTextMuted), po.brandFontStackBase, ((e) => e.$isSubmenuOpen && ro([
+ "background:",
+ ";color:",
+ ";"
+], po.gray25, po.gray800)), ((e) => e.$isHighlighted && ro([
+ "background:",
+ ";color:",
+ ";"
+], po.gray50, po.gray800)), po.gray25, po.colorText, po.gray50, po.gray800, po.colorTextDisabled), Tg = ao.span.withConfig({
+ displayName: "CheckboxContainer",
+ componentId: "sc-1ihd0z9-2"
+})(["display:flex;flex:none;justify-content:center;align-items:center;width:24px;height:24px;margin-right:", ";"], po.spacing3), Ig = ao.span.withConfig({
+ displayName: "Icon",
+ componentId: "sc-1ihd0z9-3"
+})(["display:flex;flex:none;justify-content:center;align-items:center;width:24px;height:24px;margin-right:", ";"], po.spacing3), Og = ao.span.withConfig({
+ displayName: "Label",
+ componentId: "sc-1ihd0z9-4"
+})(["flex:1;overflow:hidden;min-width:0;text-align:left;text-overflow:ellipsis;white-space:nowrap;"]), jg = ao.span.withConfig({
+ displayName: "RightContainer",
+ componentId: "sc-1ihd0z9-5"
+})([
+ "flex:none;margin:0 ",
+ ";&:last-child{margin-right:calc(",
+ " * -1);}"
+], po.spacing3, po.spacing2), Pg = ao.span.withConfig({
+ displayName: "SubmenuIconContainer",
+ componentId: "sc-1ihd0z9-6"
+})([
+ "flex:none;margin-right:calc(",
+ " * -1);margin-left:",
+ ";color:",
+ ";",
+ ":hover,",
+ ":active{color:",
+ ";}"
+], po.spacing3, po.spacing3, ((e) => e.$isActive ? po.gray400 : po.gray200), _g, _g, po.gray400), Ag = ao(sg).withConfig({
+ displayName: "SubMenuContainer",
+ componentId: "sc-1ihd0z9-7"
+})(["margin-top:calc(", " * -1);"], po.spacing3), Ng = ao.div.withConfig({
+ displayName: "SectionTitleStyled",
+ componentId: "sc-oyebvv-0"
+})([
+ "",
+ " overflow:hidden;padding:",
+ " ",
+ " ",
+ ";color:",
+ ";text-overflow:ellipsis;white-space:nowrap;"
+], Vi.uiTextS, po.spacing4, po.spacing5, po.spacing3, po.colorText);
+function Mg(e) {
+ return {
+ "bottom-center": {
+ placement: "bottom-center",
+ possiblePlacements: ["bottom-center", "top-center"]
+ },
+ "bottom-left": {
+ placement: "bottom-start",
+ preferX: "left",
+ preferY: "bottom",
+ possiblePlacements: ["bottom-start", "top-start"]
+ },
+ "bottom-right": {
+ placement: "bottom-end",
+ preferX: "right",
+ preferY: "bottom",
+ possiblePlacements: ["bottom-end", "top-end"]
+ },
+ bottom: {
+ placement: "bottom-start",
+ preferX: "left",
+ preferY: "bottom",
+ possiblePlacements: ["bottom-start", "top-start"]
+ },
+ "top-left": {
+ placement: "top-start",
+ preferX: "left",
+ preferY: "top",
+ possiblePlacements: ["top-start", "bottom-start"]
+ },
+ "top-right": {
+ placement: "top-end",
+ preferX: "right",
+ preferY: "top",
+ possiblePlacements: ["top-end", "bottom-end"]
+ },
+ "right-center": {
+ placement: "right-center",
+ possiblePlacements: ["right-center"]
+ },
+ "left-center": {
+ placement: "left-center",
+ possiblePlacements: ["left-center"]
+ }
+ }[e];
+}
+const Lg = {
+ isOpen: !1,
+ isOpenedWithKeyboard: !1,
+ items: [],
+ highlightedItemId: "",
+ hasSearch: !1,
+ keepHighlight: !1
+};
+function Dg(e, t) {
+ if (t.type === "open") return {
+ ...e,
+ isOpen: !0
+ };
+ if (t.type === "close") return { ...Lg };
+ if (t.type === "toggle") return {
+ ...Lg,
+ isOpen: !e.isOpen
+ };
+ if (t.type === "toggle-from-keyboard") return {
+ ...Lg,
+ isOpen: !e.isOpen,
+ isOpenedWithKeyboard: !e.isOpen
+ };
+ if (t.type === "highlight-current-item") {
+ let t = e.items.find(((e) => e.isSelected));
+ return e.hasSearch && t ? {
+ ...e,
+ highlightedItemId: t.id
+ } : e.isOpenedWithKeyboard && e.items.length ? {
+ ...e,
+ highlightedItemId: e.items[0].id
+ } : e;
+ }
+ if (t.type === "highlight-item") return {
+ ...e,
+ highlightedItemId: t.payload,
+ keepHighlight: !0
+ };
+ if (t.type === "highlight-previous") {
+ if (e.items.length === 0) return e;
+ let t = e.items.find(((t) => t.id === e.highlightedItemId))?.parentId, r = e.items.filter(((e) => e.parentId === t && !e.isDisabled)), o = r.findIndex(((t) => t.id === e.highlightedItemId)), i = o === 0, a = r.length - 1, s = o === -1 || i ? r[a].id : r[o - 1].id;
+ return {
+ ...e,
+ highlightedItemId: s
+ };
+ }
+ if (t.type === "highlight-next") {
+ if (e.items.length === 0) return e;
+ let t = e.items.find(((t) => t.id === e.highlightedItemId))?.parentId, n = e.items.filter(((e) => e.parentId === t && !e.isDisabled)), o = n.findIndex(((t) => t.id === e.highlightedItemId)), i = o === n.length - 1, a = o === -1 || i ? n[0].id : n[o + 1].id;
+ return {
+ ...e,
+ highlightedItemId: a
+ };
+ }
+ if (t.type === "highlight-submenu") {
+ let t = e.highlightedItemId, n = e.items.find(((e) => e.parentId === t));
+ return {
+ ...e,
+ highlightedItemId: n.id
+ };
+ }
+ if (t.type === "add-item") {
+ let n = t.payload;
+ return e.items.find(((e) => e.id === n.id)) ? e : {
+ ...e,
+ items: [...e.items, n]
+ };
+ }
+ if (t.type === "purge-menu-items") {
+ let n = t.payload, r = e.items.filter(((e) => e.parentId !== n));
+ return {
+ ...e,
+ items: r,
+ highlightedItemId: e.keepHighlight ? e.highlightedItemId : "",
+ keepHighlight: !1
+ };
+ }
+ return t.type === "keep-highlight" ? {
+ ...e,
+ keepHighlight: !0
+ } : t.type === "set-search-presence" ? {
+ ...e,
+ hasSearch: !0
+ } : void function(e, t) {
+ throw Error("Unexpected action: " + t);
+ }(0, t);
+}
+const Rg = ao.span.withConfig({
+ displayName: "Text",
+ componentId: "sc-46jr3k-0"
+})(["width:100%;min-width:0;text-align:left;"]);
+function zg({ direction: e = "horizontal", ...t }) {
+ return e === "horizontal" ? (0, Go.jsx)($g, { ...t }) : (0, Go.jsx)(Bg, {
+ role: "separator",
+ ...t
+ });
+}
+const $g = ao.hr.withConfig({
+ displayName: "HorizontalDivider",
+ componentId: "sc-138dhux-0"
+})([
+ "box-sizing:content-box;height:1px;margin:0;padding:",
+ " 0;border:none;background:",
+ ";background-clip:content-box;"
+], po.spacing3, po.gray100a), Bg = ao.div.withConfig({
+ displayName: "VerticalDivider",
+ componentId: "sc-138dhux-1"
+})([
+ "box-sizing:content-box;width:1px;min-height:100%;margin:0;padding:0 ",
+ ";background:",
+ ";background-clip:content-box;"
+], po.spacing2, po.gray100a), Fg = ao.div.withConfig({
+ displayName: "Container",
+ componentId: "sc-1pe10ve-0"
+})([
+ "--container-top-padding-compensation:calc(",
+ " * -1);position:sticky;top:var(--container-top-padding-compensation);z-index:1;box-sizing:content-box;height:40px;margin-top:var(--container-top-padding-compensation);margin-bottom:",
+ ";padding:",
+ ";background:",
+ ";box-shadow:",
+ ";"
+], po.spacing3, po.spacing3, po.spacing4, po.white, po.elevationStatic), Ug = ao.div.withConfig({
+ displayName: "Inner",
+ componentId: "sc-1pe10ve-1"
+})([
+ "position:absolute;top:",
+ ";right:",
+ ";left:",
+ ";display:flex;gap:",
+ ";"
+], po.spacing4, po.spacing4, po.spacing4, po.spacing3), Hg = ao.div.withConfig({
+ displayName: "InputWrapper",
+ componentId: "sc-1pe10ve-2"
+})(["flex:1;min-width:0;"]), Wg = ao.div.withConfig({
+ displayName: "TextStyled",
+ componentId: "sc-14qd6tq-0"
+})([
+ "",
+ " padding:",
+ " ",
+ ";color:",
+ ";"
+], ((e) => e.$fontSize === "item" ? Vi.uiTextS : Vi.uiTextM), po.spacing3, po.spacing5, po.gray400), qg = ao.div.withConfig({
+ displayName: "ConcealedActionStyled",
+ componentId: "sc-inr4c8-0"
+})([
+ "width:",
+ ";opacity:",
+ ";&:focus-within{width:auto;opacity:1;}"
+], ((e) => e.$isVisible ? "auto" : "var(--list-item-concealead-action-width, 0)"), ((e) => e.$isVisible ? "1" : "var(--list-item-concealead-action-opacity, 0)")), Gg = ao.div.withConfig({
+ displayName: "Header",
+ componentId: "sc-1hlvuel-0"
+})([
+ "display:flex;justify-content:space-between;align-items:center;padding:",
+ " 0 ",
+ ";color:",
+ ";"
+], po.spacing3, po.spacing2, po.colorText), Yg = (0, s.createContext)({
+ isDragging: !1,
+ dragIndicator: null
+}), Zg = (0, s.forwardRef)((({ children: e, subtext: t, switchProps: n, thumbnail: r, rightElements: o, onClick: i, isDisabled: a = !1, isSelected: l = !1, checkedVariant: c, isChecked: u = !1, isIndeterminateCheckbox: d = !1, ...f }, p) => {
+ let h = Gc("list-item-label"), { isFocusVisible: g, focusProps: m } = Ja(), v = (0, s.useContext)(Yg), y = s.default.useRef(null), b = n?.onChange ? "" : Dd.pointerEventsClassname, w = [
+ gg.pointerEventsClassname,
+ b,
+ Dh.pointerEventsClassname
+ ].join(" "), x = typeof i == "function", E = x && !a;
+ return (0, Go.jsxs)(Jg, {
+ $isDragging: v?.isDragging ?? !1,
+ $isSelected: l,
+ $isActive: x,
+ tabIndex: E ? 0 : void 0,
+ onClick: E ? i : void 0,
+ onKeyDown: (e) => {
+ typeof i != "function" || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), i());
+ },
+ $isDisabled: a,
+ className: w,
+ $isFocusVisible: g,
+ ref: p,
+ ...f,
+ ...m,
+ children: [
+ c === "checkbox" && (0, Go.jsx)(Qg, {
+ onClick: (e) => {
+ e.stopPropagation();
+ },
+ onKeyDown: (e) => {
+ e.stopPropagation();
+ },
+ children: (0, Go.jsx)(gg, {
+ isChecked: u,
+ isIndeterminate: d,
+ isDisabled: a,
+ "aria-labelledby": h,
+ onChange: i
+ })
+ }),
+ r && (0, Go.jsx)(em, {
+ $isDisabled: a,
+ children: r
+ }),
+ (0, Go.jsxs)(tm, {
+ id: h,
+ children: [(0, Go.jsx)(Nd, { children: e }), t ? (0, Go.jsx)(nm, {
+ $isDisabled: a,
+ children: (0, Go.jsx)(Nd, { children: t })
+ }) : null]
+ }),
+ o && (0, Go.jsx)(rm, {
+ ref: y,
+ onClick: (e) => {
+ var t;
+ (t = y?.current) != null && t.querySelectorAll("a, button").length && e.stopPropagation();
+ },
+ onKeyDown: function(e) {
+ e.key !== "ArrowDown" && e.key !== "ArrowUp" && e.key !== "ArrowLeft" && e.key !== "ArrowRight" && e.stopPropagation();
+ },
+ children: o
+ }),
+ c === "switch" && (0, Go.jsx)(rm, {
+ onClick: (e) => {
+ e.stopPropagation();
+ },
+ onKeyDown: (e) => {
+ e.stopPropagation();
+ },
+ children: (0, Go.jsx)(Dd, {
+ isChecked: u,
+ isDisabled: a,
+ "aria-labelledby": h,
+ onChange: i,
+ ...n
+ })
+ }),
+ v?.dragIndicator && (0, Go.jsx)(rm, { children: v?.dragIndicator })
+ ]
+ });
+})), { internalTokens: Kg, declareTokens: Xg } = ea({
+ lightTheme: {
+ "list-item-active-background-hover": po.gray25,
+ "list-item-active-background-focus": po.gray25,
+ "list-item-active-background-active": po.gray50,
+ "list-item-right-elements-color": po.gray200,
+ "list-item-right-elements-color-active": po.gray600,
+ "list-item-focus-ring": `inset 0 0 0 2px ${po.gray50}, inset 0 0 0 4px ${po.gray10}`
+ },
+ darkTheme: {
+ "list-item-active-background-hover": po.gray25a,
+ "list-item-active-background-focus": po.gray25a,
+ "list-item-active-background-active": po.gray50a,
+ "list-item-right-elements-color": po.gray200a,
+ "list-item-right-elements-color-active": po.gray600a,
+ "list-item-focus-ring": `inset 0 0 0 2px ${po.gray300a}, inset 0 0 0 4px ${po.gray50}`
+ }
+}), Jg = ao.div.withConfig({
+ displayName: "ItemStyled",
+ componentId: "sc-1c1oyq7-0"
+})([
+ "",
+ " --list-item-right-elements-color:",
+ ";display:flex;align-items:center;margin-right:calc(",
+ " * -1);margin-left:calc(",
+ " * -1);padding:",
+ " ",
+ ";border-radius:var(--ds-list-item-border-radius-override,",
+ ");color:",
+ ";&:hover{--list-item-concealead-action-opacity:1;--list-item-concealead-action-width:auto;}",
+ " ",
+ " ",
+ ""
+], Xg, Kg["list-item-right-elements-color"], po.spacing4, po.spacing4, po.spacing3, po.spacing4, po.radiusLarge, po.colorText, ((e) => e.$isActive && ro([
+ "outline:none;cursor:pointer;&&:hover{--list-item-right-elements-color:",
+ ";background:",
+ ";}",
+ " &&:active{background:",
+ ";box-shadow:none;}",
+ ""
+], Kg["list-item-right-elements-color-active"], Kg["list-item-active-background-hover"], e.$isFocusVisible && ro([
+ "--list-item-right-elements-color:",
+ ";background:",
+ ";box-shadow:var( --ds-list-item-focus-ring-override,",
+ " );"
+], Kg["list-item-right-elements-color-active"], Kg["list-item-active-background-focus"], Kg["list-item-focus-ring"]), Kg["list-item-active-background-active"], e.$isDisabled && ro(["color:", ";pointer-events:none;"], po.colorTextDisabled))), ((e) => e.$isSelected && ro([
+ "--list-item-right-elements-color:",
+ ";&&,&&:hover{background:",
+ ";}"
+], Kg["list-item-right-elements-color-active"], Kg["list-item-active-background-active"])), ((e) => e.$isDragging && ro([
+ "--list-item-right-elements-color:",
+ ";background:",
+ ";box-shadow:",
+ ";cursor:grabbing;"
+], Kg["list-item-right-elements-color-active"], po.gray25, po.elevation4))), Qg = ao.div.withConfig({
+ displayName: "CheckboxContainer",
+ componentId: "sc-1c1oyq7-1"
+})(["flex:none;margin-right:", ";"], po.spacing4), em = ao.div.withConfig({
+ displayName: "ThumbnailContainer",
+ componentId: "sc-1c1oyq7-2"
+})([
+ "flex:none;margin-right:",
+ ";",
+ ""
+], po.spacing4, ((e) => e.$isDisabled && "opacity: 50%;")), tm = ao.div.withConfig({
+ displayName: "Content",
+ componentId: "sc-1c1oyq7-3"
+})(["", " flex:1;min-width:0;"], Vi.uiTextM), nm = ao.div.withConfig({
+ displayName: "Subtext",
+ componentId: "sc-1c1oyq7-4"
+})([
+ "",
+ " color:",
+ ";"
+], Vi.uiTextS, ((e) => e.$isDisabled ? po.colorTextDisabled : po.colorTextMuted)), rm = ao.div.withConfig({
+ displayName: "RightElements",
+ componentId: "sc-1c1oyq7-5"
+})([
+ "display:flex;flex:none;gap:",
+ ";align-items:center;margin-left:",
+ ";color:var(--list-item-right-elements-color);"
+], po.spacing3, po.spacing4);
+function om({ children: e, isContained: t = !1, ...n }) {
+ return (0, Go.jsx)(im, {
+ $isContained: t,
+ ...n,
+ children: e
+ });
+}
+om.Group = function({ title: e, action: t, children: n, ...r }) {
+ let o = Gc("list-group-header");
+ return (0, Go.jsxs)("div", {
+ ...r,
+ children: [(0, Go.jsxs)(Gg, { children: [(0, Go.jsx)("span", {
+ id: o,
+ children: e
+ }), t] }), (0, Go.jsx)("div", {
+ "aria-describedby": o,
+ children: n
+ })]
+ });
+}, om.Item = Zg, om.Divider = zg, om.ConcealedAction = function({ isVisible: e, ...t }) {
+ return (0, Go.jsx)(qg, {
+ $isVisible: e,
+ ...t
+ });
+};
+const im = ao.div.withConfig({
+ displayName: "ListStyled",
+ componentId: "sc-kyt0j-0"
+})(["padding:", ";"], ((e) => e.$isContained ? `0 ${po.spacing5}` : `${po.spacing3} 0`)), am = ao.div.withConfig({
+ displayName: "ItemWrapper",
+ componentId: "sc-upc0k1-0"
+})(["--ds-list-item-border-radius-override:0;--ds-list-item-focus-ring-override:none;padding:0 ", ";"], po.spacing4);
+function sm(e) {
+ return !!e && e.getRootNode() instanceof ShadowRoot;
+}
+function lm(e) {
+ if (!e || !sm(e)) return;
+ let t = e?.getRootNode();
+ return Array.from(t.children).find(((e) => e.tagName !== "STYLE"));
+}
+const cm = (0, s.createContext)("normal");
+function um({ children: e, trigger: t, position: n = "bottom-left", isClosedOnScroll: r = !1, isKeepingFocusOnTrigger: o = !1, containerRef: i, onOpen: a, onClose: l, minWidth: c, role: u, ...d }) {
+ let [f, p] = (0, s.useReducer)(Dg, Lg), h = (0, s.useRef)(!0), g = (0, s.useRef)(), m = Gc("dropdown-menu");
+ var v, y;
+ (0, s.useEffect)((() => {
+ h.current ? h.current = !1 : f.isOpen ? (p({ type: "highlight-current-item" }), a?.()) : l?.();
+ }), [f.isOpen]), v = f.highlightedItemId, y = f.hasSearch, (0, s.useEffect)((() => {
+ if (!v) return;
+ let e = document.querySelector("#" + v);
+ if (e) {
+ let t = e.closest("[role=\"menu\"");
+ t && (function(e, t, n) {
+ let { top: r, bottom: o, height: i } = e.getBoundingClientRect(), a = t.getBoundingClientRect(), s = n ? 64 : 0;
+ return !(r >= a.bottom - i || o <= a.top + s + i);
+ }(e, t, y) || e.scrollIntoView(!1));
+ }
+ }), [v, y]);
+ let b = (0, s.useCallback)((() => {
+ var e;
+ f.isOpen && (p({ type: "close" }), (e = g?.current) == null || e.focus());
+ }), [f.isOpen]);
+ (0, s.useEffect)((() => {
+ function e() {
+ b();
+ }
+ if (r && f.isOpen) return document.addEventListener("scroll", e), () => {
+ document.removeEventListener("scroll", e);
+ };
+ }), [
+ r,
+ b,
+ f.isOpen
+ ]), ng("Tab", (() => {
+ f.isOpen && b();
+ })), ng("Escape", (() => {
+ f.isOpen && b();
+ })), ng("Enter", ((e) => {
+ var t;
+ f.isOpen && f.highlightedItemId && ((t = document.querySelector("#" + f.highlightedItemId)) == null || t.click(), e.preventDefault());
+ })), ng("ArrowDown", ((e) => {
+ f.isOpen && (p({ type: "highlight-next" }), e.preventDefault());
+ })), ng("ArrowUp", ((e) => {
+ f.isOpen && (p({ type: "highlight-previous" }), e.preventDefault());
+ }));
+ let w = (0, s.useMemo)((() => ({
+ dispatch: p,
+ close: b,
+ highlightedItemId: f.highlightedItemId,
+ hasSearch: f.hasSearch,
+ isKeepingFocusOnTrigger: o,
+ menuId: m
+ })), [
+ b,
+ o,
+ f.hasSearch,
+ f.highlightedItemId,
+ m
+ ]), x = (0, s.useContext)(cm) === "extra" ? 8 : 4, { renderLayer: E, triggerProps: { ref: S }, layerProps: C, triggerBounds: k } = Ls({
+ isOpen: f.isOpen,
+ onOutsideClick: sm(g.current) ? void 0 : () => p({ type: "close" }),
+ onParentClose() {
+ p({ type: "close" });
+ },
+ onDisappear: (e) => {
+ e === "full" && p({ type: "close" });
+ },
+ triggerOffset: x,
+ containerOffset: 16,
+ auto: !0,
+ container: lm(g.current),
+ ...Mg(n)
+ }), _ = n === "bottom" ? {
+ width: k?.width,
+ minWidth: "initial",
+ maxWidth: "initial"
+ } : {};
+ return (0, Go.jsx)(og.Provider, {
+ value: w,
+ children: (0, Go.jsxs)("div", {
+ ...d,
+ children: [t({
+ isOpen: f.isOpen,
+ onClick: () => {
+ p({ type: "toggle" });
+ },
+ "aria-haspopup": !0,
+ "aria-expanded": f.isOpen,
+ "aria-controls": m,
+ "aria-activedescendant": f.highlightedItemId || void 0,
+ onKeyDown: function(e) {
+ e.key !== " " && e.key !== "Enter" || (e.preventDefault(), p({ type: "toggle-from-keyboard" }));
+ },
+ ref: ds(S, g)
+ }, {
+ open: () => {
+ p({ type: "open" });
+ },
+ close: () => {
+ p({ type: "close" });
+ }
+ }), f.isOpen && E((0, Go.jsx)(sg, {
+ id: m,
+ ...C,
+ ref: ds(C.ref, i),
+ style: {
+ ...C.style,
+ ..._
+ },
+ minWidth: c,
+ role: u,
+ children: e
+ }))]
+ })
+ });
+}
+um.Divider = zg, um.Item = function({ children: e, isDisabled: t, icon: n, checkedVariant: r = "checkmark", isChecked: o = !1, badge: i, onClick: a, submenu: l, role: c, ...u }) {
+ let [d, f] = (0, s.useState)(!1), [p, h] = (0, s.useState)(!1), g = Gc("dropdown-item"), m = Gc("dropdown-item-label"), v = Gc("dropdown-submenu"), y = !!l, { dispatch: b, ...w } = ig(), x = w.highlightedItemId === g, E = (0, s.useContext)(ag), { isFocusVisible: S, focusProps: C } = Ja(), { hoverProps: k } = function(e) {
+ let { onHoverStart: t, onHoverChange: n, onHoverEnd: r, isDisabled: o } = e, [i, a] = (0, s.useState)(!1), l = (0, s.useRef)({
+ isHovered: !1,
+ ignoreEmulatedMouseEvents: !1,
+ pointerType: "",
+ target: null
+ }).current;
+ (0, s.useEffect)(fg, []);
+ let { addGlobalListener: c, removeAllGlobalListeners: u } = Ka(), { hoverProps: d, triggerHoverEnd: f } = (0, s.useMemo)((() => {
+ let e = (e, t) => {
+ let o = l.target;
+ l.pointerType = "", l.target = null, t !== "touch" && l.isHovered && o && (l.isHovered = !1, u(), r && r({
+ type: "hoverend",
+ target: o,
+ pointerType: t
+ }), n && n(!1), a(!1));
+ }, i = {};
+ return typeof PointerEvent < "u" && (i.onPointerEnter = (r) => {
+ cg && r.pointerType === "mouse" || ((r, i) => {
+ if (l.pointerType = i, o || i === "touch" || l.isHovered || !r.currentTarget.contains(r.target)) return;
+ l.isHovered = !0;
+ let s = r.currentTarget;
+ l.target = s, c(_a(r.target), "pointerover", ((t) => {
+ l.isHovered && l.target && !Ga(l.target, t.target) && e(0, t.pointerType);
+ }), { capture: !0 }), t && t({
+ type: "hoverstart",
+ target: s,
+ pointerType: i
+ }), n && n(!0), a(!0);
+ })(r, r.pointerType);
+ }, i.onPointerLeave = (t) => {
+ !o && t.currentTarget.contains(t.target) && e(0, t.pointerType);
+ }), {
+ hoverProps: i,
+ triggerHoverEnd: e
+ };
+ }), [
+ t,
+ n,
+ r,
+ o,
+ l,
+ c,
+ u
+ ]);
+ return (0, s.useEffect)((() => {
+ o && f({ currentTarget: l.target }, l.pointerType);
+ }), [o]), {
+ hoverProps: d,
+ isHovered: i
+ };
+ }({
+ onHoverStart: () => {
+ y && f(!0);
+ },
+ onHoverEnd: () => {
+ y && f(!1);
+ }
+ }), _ = d && y, { triggerProps: T, layerProps: I, renderLayer: O } = Ls({
+ isOpen: _,
+ auto: !0,
+ placement: "right-start",
+ possiblePlacements: [
+ "right-end",
+ "right-start",
+ "left-start",
+ "left-end"
+ ],
+ triggerOffset: -4,
+ onParentClose: () => {}
+ });
+ (0, s.useEffect)((() => {
+ b({
+ type: "add-item",
+ payload: {
+ id: g,
+ parentId: E,
+ isDisabled: t,
+ isSelected: r === "checkmark" ? o : void 0
+ }
+ });
+ })), (0, s.useEffect)((() => {
+ p && b({ type: "highlight-submenu" });
+ }), [b, p]), (0, s.useEffect)((() => {
+ var e;
+ w.hasSearch || w.isKeepingFocusOnTrigger || x && ((e = document.querySelector("#" + g)) == null || e.focus());
+ }), [
+ w.hasSearch,
+ w.isKeepingFocusOnTrigger,
+ g,
+ x
+ ]), ng("ArrowLeft", ((e) => {
+ y && p && (b({
+ type: "highlight-item",
+ payload: g
+ }), f(!1), h(!1), e.preventDefault());
+ })), ng("ArrowRight", ((e) => {
+ x && y && (f(!0), h(!0), e.preventDefault());
+ }));
+ let j = function(e) {
+ return e === "checkbox" ? gg.pointerEventsClassname : e === "switch" ? Dd.pointerEventsClassname : "";
+ }(r), P = function(e, t, n) {
+ return e || (t === "checkbox" || t === "switch" ? "menuitemcheckbox" : t === "checkmark" && n ? "menuitemradio" : "menuitem");
+ }(c, r, o), A = P === "menuitemcheckbox" || P === "menuitemradio" || P === "option" ? o : void 0, N = y ? {
+ "aria-haspopup": !0,
+ "aria-expanded": d,
+ "aria-controls": v
+ } : {};
+ function M(e) {
+ a?.(e), y || (P === "menuitemcheckbox" ? b({ type: "keep-highlight" }) : w.close());
+ }
+ return (0, Go.jsx)(ag.Provider, {
+ value: g,
+ children: (0, Go.jsxs)(kg, {
+ ...k,
+ ...T,
+ onClick: (e) => e.stopPropagation(),
+ children: [(0, Go.jsxs)(_g, {
+ disabled: t,
+ "aria-disabled": t,
+ $isChecked: o,
+ "aria-checked": A,
+ "aria-selected": w.hasSearch || w.isKeepingFocusOnTrigger ? x : void 0,
+ role: P,
+ onClick: M,
+ tabIndex: -1,
+ id: g,
+ onKeyDown: function(e) {
+ y && (e.key !== " " && e.key !== "Enter" || (a?.(e), f(((e) => {
+ let t = !e;
+ return h(t), t;
+ })), e.preventDefault()));
+ },
+ $isHighlighted: x || S,
+ $isSubmenuOpen: d,
+ className: j,
+ ...N,
+ ...C,
+ ...u,
+ onMouseEnter: () => y && f(!0),
+ children: [
+ r === "checkbox" && (0, Go.jsx)(Tg, {
+ onClick: (e) => e.stopPropagation(),
+ children: (0, Go.jsx)(gg, {
+ isChecked: o,
+ isDisabled: t,
+ "aria-labelledby": m,
+ onChange: M
+ })
+ }),
+ n && (0, Go.jsx)(Ig, { children: n }),
+ (0, Go.jsx)(Og, {
+ id: m,
+ children: e
+ }),
+ r === "checkmark" && o && (0, Go.jsx)(jg, { children: (0, Go.jsx)(li, {}) }),
+ i && (0, Go.jsx)(jg, { children: i }),
+ r === "switch" && (0, Go.jsx)(jg, {
+ onClick: (e) => e.stopPropagation(),
+ children: (0, Go.jsx)(Dd, {
+ isChecked: o,
+ isDisabled: t,
+ "aria-labelledby": m,
+ onChange: M
+ })
+ }),
+ y && (0, Go.jsx)(Pg, {
+ $isActive: d || S || x,
+ children: (0, Go.jsx)(Qo, {})
+ })
+ ]
+ }), _ && O((0, Go.jsx)(Ag, {
+ "data-testid": "ds-dropdown-submenu",
+ id: v,
+ ...I,
+ onMouseLeave: () => f(!1),
+ children: l
+ }))]
+ })
+ });
+}, um.ListItem = function({ children: e, isDisabled: t, isChecked: n = !1, onClick: r, role: o = "menuitem", rightElements: i, ...a }) {
+ let l = Gc("dropdown-item"), { dispatch: c, ...u } = ig(), d = u.highlightedItemId === l;
+ (0, s.useEffect)((() => {
+ c({
+ type: "add-item",
+ payload: {
+ id: l,
+ parentId: void 0,
+ isDisabled: t,
+ isSelected: n
+ }
+ });
+ })), (0, s.useEffect)((() => {
+ var e;
+ u.hasSearch || u.isKeepingFocusOnTrigger || d && ((e = document.querySelector("#" + l)) == null || e.focus());
+ }), [
+ u.hasSearch,
+ u.isKeepingFocusOnTrigger,
+ l,
+ d
+ ]);
+ let f = n ? (0, Go.jsx)(li, { style: { color: po.gray800 } }) : null;
+ return (0, Go.jsx)(am, {
+ onClick: (e) => e.stopPropagation(),
+ children: (0, Go.jsx)(om.Item, {
+ isSelected: d,
+ isDisabled: t,
+ onClick: function() {
+ r?.(), u.close();
+ },
+ "aria-disabled": t,
+ "aria-checked": o === "menuitemradio" || o === "option" ? n : void 0,
+ "aria-selected": u.hasSearch || u.isKeepingFocusOnTrigger ? d : void 0,
+ role: o,
+ rightElements: i ? (0, Go.jsxs)(Go.Fragment, { children: [i, f] }) : f,
+ id: l,
+ ...a,
+ children: e
+ })
+ });
+}, um.SectionTitle = function({ children: e, ...t }) {
+ return (0, Go.jsx)(Ng, {
+ ...t,
+ children: e
+ });
+}, um.Arrow = function(e) {
+ return (0, Go.jsx)(rg, {
+ ...e,
+ children: (0, Go.jsx)(si, {})
+ });
+}, um.SelectButtonText = function({ children: e, ...t }) {
+ return (0, Go.jsx)(Rg, {
+ ...t,
+ children: (0, Go.jsx)(Nd, { children: e })
+ });
+}, um.SearchInput = function({ onChange: e, actionButton: t, ...n }) {
+ let r = (0, s.useRef)(null), { dispatch: o } = ig(), { menuId: i } = ig();
+ return (0, s.useEffect)((() => {
+ var e;
+ (e = r.current) == null || e.focus();
+ }), []), (0, s.useEffect)((() => {
+ o({ type: "set-search-presence" });
+ }), [o]), (0, Go.jsx)(Fg, { children: (0, Go.jsxs)(Ug, { children: [(0, Go.jsx)(Hg, { children: (0, Go.jsx)(Gl, {
+ inputRef: r,
+ hasClearButton: !0,
+ icon: (0, Go.jsx)(Mi, {}),
+ onChange: function(t) {
+ var n, r;
+ (r = (n = document.querySelector(`#${i}`))?.scrollTo) == null || r.call(n, { top: 0 }), e(t);
+ },
+ ...n
+ }) }), t] }) });
+}, um.Text = function({ fontSize: e = "item", children: t, ...n }) {
+ return (0, Go.jsx)(Wg, {
+ $fontSize: e,
+ ...n,
+ children: t
+ });
+}, um.OffsetContext = cm;
+const dm = (0, s.createContext)({
+ value: "",
+ onChange: () => {}
+});
+function fm({ children: e, isDisabled: t, onChange: n, value: r, label: o, icon: i, "aria-labelledby": a, "aria-label": l, ...c }) {
+ let u = (0, s.useMemo)((() => ({
+ value: r,
+ onChange: n
+ })), [n, r]);
+ return (0, Go.jsx)(dm.Provider, {
+ value: u,
+ children: (0, Go.jsx)(um, {
+ trigger: ({ isOpen: e, ...n }) => (0, Go.jsx)(il, {
+ icon: i,
+ isPressed: e,
+ rightIcon: (0, Go.jsx)(um.Arrow, {}),
+ isFullWidth: !0,
+ isDisabled: t,
+ role: "combobox",
+ "aria-label": l,
+ "aria-labelledby": a,
+ ...n,
+ "aria-haspopup": "listbox",
+ children: (0, Go.jsx)(um.SelectButtonText, { children: o })
+ }),
+ position: "bottom",
+ role: "listbox",
+ ...c,
+ children: e
+ })
+ });
+}
+function pm(e, t, n) {
+ return 100 * (n - e) / (t - e) + "%";
+}
+fm.Item = function({ icon: e, children: t, isDisabled: n, value: r }) {
+ let o = (0, s.useContext)(dm);
+ return (0, Go.jsx)(um.Item, {
+ isChecked: r === o.value,
+ role: "option",
+ icon: e,
+ isDisabled: n,
+ onClick: () => {
+ o.onChange(r);
+ },
+ children: t
+ });
+}, fm.SectionTitle = um.SectionTitle, fm.Divider = um.Divider, fm.SearchInput = um.SearchInput, fm.Text = um.Text;
+const hm = ao.div.withConfig({
+ displayName: "Container",
+ componentId: "sc-1b6hxsw-0"
+})(["position:relative;display:flex;gap:", ";align-items:center;"], po.spacing3), gm = ao.div.withConfig({
+ displayName: "SliderContainer",
+ componentId: "sc-1b6hxsw-1"
+})(["position:relative;display:flex;flex:1;align-items:center;height:24px;"]), mm = ao.div.withConfig({
+ displayName: "IconStyled",
+ componentId: "sc-1b6hxsw-2"
+})(["display:grid;color:", ";"], ((e) => e.$isDisabled ? po.colorTextDisabled : po.colorTextMuted)), vm = ro(["position:relative;box-sizing:border-box;height:24px;padding:0;border:10px solid transparent;border-radius:2px / 50%;background-image:var(--track-background);background-clip:padding-box;border-inline:none;appearance:none;"]), ym = ro(["position:relative;top:50%;bottom:0;width:20px;height:20px;padding:0;opacity:0;pointer-events:", ";transform:translateY(-50%);-webkit-appearance:none;appearance:none;"], ((e) => e.$isDisabled ? "none" : "auto"));
+function bm(e) {
+ let t = pm(e.min, e.max, e.value), n, r;
+ Array.isArray(e.$values) ? (n = pm(e.min, e.max, e.$values[0]), r = pm(e.min, e.max, e.$values[1])) : e.$isFromCenter ? (n = `min(${t}, 50%)`, r = `max(50%, ${t})`) : (n = "0", r = t);
+ let o = e.$isDisabled ? po.gray400 : po.brandPrimary500;
+ return `linear-gradient(\n\t\t90deg,\n\t\t${po.gray100a} ${n},\n\t\t${o} ${n},\n\t\t${o} ${r},\n\t\t${po.gray100a} ${r}\n\t)`;
+}
+const wm = ao.input.attrs(((e) => ({ style: { "--track-background": bm(e) } }))).withConfig({
+ displayName: "SliderInput",
+ componentId: "sc-1b6hxsw-3"
+})([
+ "position:absolute;left:0;width:100%;margin:0;padding:0;border:none;background:transparent;cursor:",
+ ";pointer-events:",
+ ";-webkit-appearance:none;appearance:none;&:focus{outline:none;}&::-webkit-slider-thumb{",
+ "}&::-moz-range-thumb{",
+ " transform:none;}&::-webkit-slider-runnable-track{",
+ "}&::-moz-range-track{",
+ "}"
+], ((e) => e.$isDisabled ? "default" : "pointer"), ((e) => e.$isRange || e.$isDisabled ? "none" : "auto"), ym, ym, vm, vm), xm = ao.div.withConfig({
+ displayName: "ThumbContainer",
+ componentId: "sc-1b6hxsw-4"
+})([
+ "position:absolute;top:50%;z-index:1;box-sizing:border-box;width:16px;height:16px;opacity:var(--thumb-opacity,",
+ ");pointer-events:none;transition:opacity 120ms ease-in-out;",
+ " ",
+ ":hover + &{--thumb-opacity:1;--thumb-inner-circle-visibility:visible;--thumb-border:0 0 0 1px ",
+ ";--thumb-shadow:",
+ ",",
+ ";}",
+ ":focus-visible + &{--thumb-opacity:1;--thumb-inner-circle-visibility:visible;--thumb-border:0 0 0 1px ",
+ ";--thumb-shadow:0 0 0 3px ",
+ ";}",
+ ":active + &{--thumb-opacity:1;--thumb-inner-circle-visibility:visible;--thumb-border:0 0 0 1px ",
+ ";--thumb-shadow:",
+ ",",
+ ";--thumb-size:20px;}"
+], ((e) => +!e.$isInactive), ((e) => e.$isInactive && ro([
+ "",
+ ":hover &{--thumb-opacity:",
+ ";}"
+], gm, +!e.$isDisabled)), wm, po.gray100a, po.elevationStatic, po.elevation1, wm, po.gray100a, po.gray100a, wm, po.gray100a, po.elevationStatic, po.elevation2), Em = ao.div.withConfig({
+ displayName: "ThumbCircle",
+ componentId: "sc-1b6hxsw-5"
+})([
+ "position:absolute;top:50%;left:50%;width:var(--thumb-size,16px);height:var(--thumb-size,16px);border-radius:",
+ ";background:",
+ ";",
+ " transform:translate(-50%,-50%);&::before{content:'';position:absolute;top:50%;left:50%;display:block;width:8px;height:8px;border-radius:",
+ ";background-color:",
+ ";visibility:var(--thumb-inner-circle-visibility,hidden);transform:translate(-50%,-50%);}"
+], po.radiusCircle, ((e) => e.$isDisabled ? po.gray400 : po.gray10), ((e) => !e.$isDisabled && ro([
+ "box-shadow:var(--thumb-shadow,",
+ ",",
+ "),var(--thumb-border,0 0 0 1px ",
+ ");"
+], po.elevationStatic, po.elevation1, po.gray75a)), po.radiusCircle, ((e) => e.$isDisabled ? po.gray400 : po.gray25)), Sm = ao.div.withConfig({
+ displayName: "InputContainer",
+ componentId: "sc-1b6hxsw-6"
+})(["width:", ";input{text-align:center;}"], (function(e) {
+ return 40 + 8 * Math.max(e.$min.toString().length, e.$max.toString().length) + "px";
+}));
+function Cm({ min: e, max: t, value: n, isTooltipOpen: r, inputPosition: o, isInactive: i, isDisabled: a }) {
+ let s = pm(e, t, n);
+ return (0, Go.jsxs)(xm, {
+ $isInactive: i,
+ $isDisabled: a,
+ style: km(s),
+ "data-testid": "ds-slider-thumb",
+ children: [(0, Go.jsx)(Em, { $isDisabled: a }), o === "none" && (0, Go.jsx)(Ml, {
+ isOpen: r,
+ content: n,
+ position: "top-center",
+ children: (e) => (0, Go.jsx)("div", { ...e })
+ })]
+ });
+}
+function km(e) {
+ return {
+ left: e,
+ transform: `translateY(-50%) translateX(calc(${e} * -1))`
+ };
+}
+function _m({ min: e, max: t, value: n, onChange: r, inputPosition: o, isFromCenter: i = !1, isInactive: a, isTooltipHidden: l, isDisabled: c, step: u }) {
+ let [d, f] = (0, s.useState)(!1), p = Array.isArray(n);
+ return (0, Go.jsxs)(Go.Fragment, { children: [
+ (0, Go.jsx)(wm, {
+ min: e,
+ max: t,
+ value: p ? n[0] : n,
+ $values: n,
+ type: "range",
+ onChange: r,
+ name: "min-input",
+ step: u,
+ onMouseDown: () => {
+ f(!0);
+ },
+ onMouseUp: () => {
+ f(!1);
+ },
+ $isFromCenter: i,
+ $isRange: p,
+ $isDisabled: c,
+ role: "slider",
+ disabled: c
+ }),
+ (0, Go.jsx)(Cm, {
+ isTooltipOpen: d && !l,
+ min: e,
+ max: t,
+ value: p ? n[0] : n,
+ inputPosition: o,
+ isInactive: a,
+ isDisabled: c
+ }),
+ p && (0, Go.jsxs)(Go.Fragment, { children: [(0, Go.jsx)(wm, {
+ min: e,
+ max: t,
+ value: n[1],
+ type: "range",
+ onChange: r,
+ name: "max-input",
+ step: u,
+ $values: n,
+ onMouseDown: () => {
+ f(!0);
+ },
+ onMouseUp: () => {
+ f(!1);
+ },
+ $isRange: p,
+ $isDisabled: c,
+ disabled: c
+ }), (0, Go.jsx)(Cm, {
+ isTooltipOpen: d && !l,
+ min: e,
+ max: t,
+ value: n[1],
+ inputPosition: o,
+ isInactive: a,
+ isDisabled: c
+ })] })
+ ] });
+}
+function Tm({ max: e, min: t, onKeyDown: n, onMouseDown: r, value: o }) {
+ function i(n) {
+ return (n - t) / (e - t) * 100;
+ }
+ return (0, Go.jsx)(Im, {
+ $left: i(o[0]),
+ $width: i(o[1]) - i(o[0]),
+ "aria-valuemin": t,
+ "aria-valuemax": e,
+ "aria-valuetext": `${o[0]} - ${o[1]}`,
+ "data-testid": "ds-slider-drag-range",
+ onKeyDown: n,
+ onMouseDown: r,
+ tabIndex: 0
+ });
+}
+const Im = ao.div.withConfig({
+ displayName: "StyledDragRange",
+ componentId: "sc-nihmrp-0"
+})([
+ "position:absolute;left:",
+ "%;width:",
+ "%;height:100%;cursor:pointer;"
+], (({ $left: e }) => e), (({ $width: e }) => e)), Om = ["ArrowLeft", "ArrowDown"], jm = [
+ ...Om,
+ "ArrowRight",
+ "ArrowUp"
+];
+function Pm({ min: e, max: t, inputPosition: n = "none", value: r, onChange: o, iconLeft: i, iconRight: a, isFromCenter: l = !1, isInactive: c = !1, isTooltipHidden: u = !1, isDisabled: d = !1, step: f = "1", ...p }) {
+ let [h, g] = (0, s.useState)(""), [m, v] = (0, s.useState)("none"), y = (0, s.useRef)(0), b = (0, s.useRef)(null), w = Array.isArray(r), x = w ? r[1] - r[0] : 0, E = f?.includes(".") ? f.split(".")[1].length : 0;
+ function S(e) {
+ return Number(e.toFixed(E));
+ }
+ function C(n) {
+ return w ? S(Math.max(e, Math.min(t - x, r[0] + n))) : r;
+ }
+ function k(n) {
+ if (!w || !b.current) return;
+ let r = Number(f ?? 1), i = (n.clientX - y.current) / b.current.clientWidth, a = C(Math.round(i * (t - e) / r) * r);
+ o([a, S(Math.min(t, a + x))]);
+ }
+ function _(e) {
+ window.removeEventListener("mousemove", k), window.removeEventListener("mouseup", _), y.current = e.clientX;
+ }
+ function T(n, r) {
+ return w ? r === "min-input" && n < e ? e : r === "max-input" && n > t ? t : n : n > t ? t : n < e ? e : n;
+ }
+ function I(e) {
+ let t = parseFloat(e.target.value);
+ if (w) {
+ if (e.target.name === "min-input" && t < r[1] && o([T(t, "min-input"), r[1]]), e.target.name === "max-input" && r[0] < t) {
+ let e = T(t, "max-input");
+ o([r[0], e]);
+ }
+ } else o(T(t));
+ }
+ function O(e, t, n) {
+ if (e.key === "Enter" && e.target.blur(), ["ArrowUp", "ArrowDown"].includes(e.key)) {
+ e.preventDefault();
+ let r = parseFloat(e.currentTarget.value) || Number(t);
+ switch (e.key) {
+ case "ArrowUp":
+ r += Number(f);
+ break;
+ case "ArrowDown": r -= Number(f);
+ }
+ r = T(r, n), I({ target: {
+ name: n,
+ value: String(r)
+ } }), g(String(r));
+ }
+ }
+ let j = String(w ? r[0] : r), P = String(w ? r[1] : r);
+ return (0, Go.jsxs)(hm, {
+ ...p,
+ children: [
+ (n === "left" || n === "both") && (0, Go.jsx)(Sm, {
+ $min: e,
+ $max: t,
+ "data-testid": "ds-slider-input-left",
+ children: (0, Go.jsx)(Gl, {
+ onChange: g,
+ value: m === "left" ? h : j,
+ type: "number",
+ onFocus: () => {
+ g(j), v("left");
+ },
+ onBlur: () => {
+ I({ target: {
+ name: "min-input",
+ value: h
+ } }), v("none");
+ },
+ onKeyDown: (e) => O(e, j, "min-input"),
+ isDisabled: d
+ })
+ }),
+ i && (0, Go.jsx)(mm, {
+ $isDisabled: d,
+ children: i
+ }),
+ (0, Go.jsxs)(gm, {
+ ref: b,
+ children: [w && (0, Go.jsx)(Tm, {
+ max: t,
+ min: e,
+ value: r,
+ onKeyDown: function(e) {
+ if (!w) return;
+ let n = Number(f ?? 1);
+ if (jm.includes(e.key)) {
+ e.preventDefault();
+ let r = C(Om.includes(e.key) ? -n : n);
+ return o([r, S(Math.min(t, r + x))]);
+ }
+ },
+ onMouseDown: function(e) {
+ e.preventDefault(), y.current = e.clientX, window.addEventListener("mousemove", k), window.addEventListener("mouseup", _);
+ }
+ }), (0, Go.jsx)(_m, {
+ min: e,
+ max: t,
+ value: r,
+ inputPosition: n,
+ onChange: I,
+ isFromCenter: l,
+ isInactive: c,
+ isTooltipHidden: u,
+ isDisabled: d,
+ step: f
+ })]
+ }),
+ a && (0, Go.jsx)(mm, {
+ $isDisabled: d,
+ children: a
+ }),
+ (n === "right" || n === "both") && (0, Go.jsx)(Sm, {
+ $min: e,
+ $max: t,
+ "data-testid": "ds-slider-input-right",
+ children: (0, Go.jsx)(Gl, {
+ onChange: g,
+ value: m === "right" ? h : P,
+ type: "number",
+ onFocus: () => {
+ g(P), v("right");
+ },
+ onBlur: () => {
+ I({ target: {
+ name: "max-input",
+ value: h
+ } }), v("none");
+ },
+ onKeyDown: (e) => O(e, P, "max-input"),
+ isDisabled: d
+ })
+ })
+ ]
+ });
+}
+function Am(e) {
+ return !!e && e.getRootNode() instanceof ShadowRoot;
+}
+function Nm(e) {
+ if (!e || !Am(e)) return;
+ let t = e?.getRootNode();
+ return Array.from(t.children).find(((e) => e.tagName !== "STYLE"));
+}
+function Mm() {
+ return (Mm = Object.assign || function(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = arguments[t];
+ for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
+ }
+ return e;
+ }).apply(this, arguments);
+}
+function Lm(e, t) {
+ if (e == null) return {};
+ var n, r, o = {}, i = Object.keys(e);
+ for (r = 0; r < i.length; r++) t.indexOf(n = i[r]) >= 0 || (o[n] = e[n]);
+ return o;
+}
+function Dm(e) {
+ var t = (0, s.useRef)(e), n = (0, s.useRef)((function(e) {
+ t.current && t.current(e);
+ }));
+ return t.current = e, n.current;
+}
+var Rm = function(e, t, n) {
+ return t === void 0 && (t = 0), n === void 0 && (n = 1), e > n ? n : e < t ? t : e;
+}, zm = function(e) {
+ return "touches" in e;
+}, $m = function(e) {
+ return e && e.ownerDocument.defaultView || self;
+}, Bm = function(e, t, n) {
+ var r = e.getBoundingClientRect(), o = zm(t) ? function(e, t) {
+ for (var n = 0; n < e.length; n++) if (e[n].identifier === t) return e[n];
+ return e[0];
+ }(t.touches, n) : t;
+ return {
+ left: Rm((o.pageX - (r.left + $m(e).pageXOffset)) / r.width),
+ top: Rm((o.pageY - (r.top + $m(e).pageYOffset)) / r.height)
+ };
+}, Fm = function(e) {
+ !zm(e) && e.preventDefault();
+}, Um = s.default.memo((function(e) {
+ var t = e.onMove, n = e.onKey, r = Lm(e, ["onMove", "onKey"]), o = (0, s.useRef)(null), i = Dm(t), a = Dm(n), l = (0, s.useRef)(null), c = (0, s.useRef)(!1), u = (0, s.useMemo)((function() {
+ var e = function(e) {
+ Fm(e), (zm(e) ? e.touches.length > 0 : e.buttons > 0) && o.current ? i(Bm(o.current, e, l.current)) : n(!1);
+ }, t = function() {
+ return n(!1);
+ };
+ function n(n) {
+ var r = c.current, i = $m(o.current), a = n ? i.addEventListener : i.removeEventListener;
+ a(r ? "touchmove" : "mousemove", e), a(r ? "touchend" : "mouseup", t);
+ }
+ return [
+ function(e) {
+ var t = e.nativeEvent, r = o.current;
+ if (r && (Fm(t), !function(e, t) {
+ return t && !zm(e);
+ }(t, c.current) && r)) {
+ if (zm(t)) {
+ c.current = !0;
+ var a = t.changedTouches || [];
+ a.length && (l.current = a[0].identifier);
+ }
+ r.focus(), i(Bm(r, t, l.current)), n(!0);
+ }
+ },
+ function(e) {
+ var t = e.which || e.keyCode;
+ t < 37 || t > 40 || (e.preventDefault(), a({
+ left: t === 39 ? .05 : t === 37 ? -.05 : 0,
+ top: t === 40 ? .05 : t === 38 ? -.05 : 0
+ }));
+ },
+ n
+ ];
+ }), [a, i]), d = u[0], f = u[1], p = u[2];
+ return (0, s.useEffect)((function() {
+ return p;
+ }), [p]), s.default.createElement("div", Mm({}, r, {
+ onTouchStart: d,
+ onMouseDown: d,
+ className: "react-colorful__interactive",
+ ref: o,
+ onKeyDown: f,
+ tabIndex: 0,
+ role: "slider"
+ }));
+})), Hm = function(e) {
+ return e.filter(Boolean).join(" ");
+}, Wm = function(e) {
+ var t = e.color, n = e.left, r = e.top, o = r === void 0 ? .5 : r, i = Hm(["react-colorful__pointer", e.className]);
+ return s.default.createElement("div", {
+ className: i,
+ style: {
+ top: 100 * o + "%",
+ left: 100 * n + "%"
+ }
+ }, s.default.createElement("div", {
+ className: "react-colorful__pointer-fill",
+ style: { backgroundColor: t }
+ }));
+}, Vm = function(e, t, n) {
+ return t === void 0 && (t = 0), n === void 0 && (n = 10 ** t), Math.round(n * e) / n;
+}, qm = function(e) {
+ return tv(Gm(e));
+}, Gm = function(e) {
+ return e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
+ r: parseInt(e[0] + e[0], 16),
+ g: parseInt(e[1] + e[1], 16),
+ b: parseInt(e[2] + e[2], 16),
+ a: e.length === 4 ? Vm(parseInt(e[3] + e[3], 16) / 255, 2) : 1
+ } : {
+ r: parseInt(e.substring(0, 2), 16),
+ g: parseInt(e.substring(2, 4), 16),
+ b: parseInt(e.substring(4, 6), 16),
+ a: e.length === 8 ? Vm(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
+ };
+}, Ym = function(e) {
+ return ev(Jm(e));
+}, Zm = function(e) {
+ var t = e.s, n = e.v, r = e.a, o = (200 - t) * n / 100;
+ return {
+ h: Vm(e.h),
+ s: Vm(o > 0 && o < 200 ? t * n / 100 / (o <= 100 ? o : 200 - o) * 100 : 0),
+ l: Vm(o / 2),
+ a: Vm(r, 2)
+ };
+}, Km = function(e) {
+ var t = Zm(e);
+ return "hsl(" + t.h + ", " + t.s + "%, " + t.l + "%)";
+}, Xm = function(e) {
+ var t = Zm(e);
+ return "hsla(" + t.h + ", " + t.s + "%, " + t.l + "%, " + t.a + ")";
+}, Jm = function(e) {
+ var t = e.h, n = e.s, r = e.v, o = e.a;
+ t = t / 360 * 6, n /= 100, r /= 100;
+ var i = Math.floor(t), a = r * (1 - n), s = r * (1 - (t - i) * n), l = r * (1 - (1 - t + i) * n), c = i % 6;
+ return {
+ r: Vm(255 * [
+ r,
+ s,
+ a,
+ a,
+ l,
+ r
+ ][c]),
+ g: Vm(255 * [
+ l,
+ r,
+ r,
+ s,
+ a,
+ a
+ ][c]),
+ b: Vm(255 * [
+ a,
+ a,
+ l,
+ r,
+ r,
+ s
+ ][c]),
+ a: Vm(o, 2)
+ };
+}, Qm = function(e) {
+ var t = e.toString(16);
+ return t.length < 2 ? "0" + t : t;
+}, ev = function(e) {
+ var t = e.r, n = e.g, r = e.b, o = e.a, i = o < 1 ? Qm(Vm(255 * o)) : "";
+ return "#" + Qm(t) + Qm(n) + Qm(r) + i;
+}, tv = function(e) {
+ var t = e.r, n = e.g, r = e.b, o = e.a, i = Math.max(t, n, r), a = i - Math.min(t, n, r), s = a ? i === t ? (n - r) / a : i === n ? 2 + (r - t) / a : 4 + (t - n) / a : 0;
+ return {
+ h: Vm(60 * (s < 0 ? s + 6 : s)),
+ s: Vm(i ? a / i * 100 : 0),
+ v: Vm(i / 255 * 100),
+ a: o
+ };
+}, nv = s.default.memo((function(e) {
+ var t = e.hue, n = e.onChange, r = Hm(["react-colorful__hue", e.className]);
+ return s.default.createElement("div", { className: r }, s.default.createElement(Um, {
+ onMove: function(e) {
+ n({ h: 360 * e.left });
+ },
+ onKey: function(e) {
+ n({ h: Rm(t + 360 * e.left, 0, 360) });
+ },
+ "aria-label": "Hue",
+ "aria-valuenow": Vm(t),
+ "aria-valuemax": "360",
+ "aria-valuemin": "0"
+ }, s.default.createElement(Wm, {
+ className: "react-colorful__hue-pointer",
+ left: t / 360,
+ color: Km({
+ h: t,
+ s: 100,
+ v: 100,
+ a: 1
+ })
+ })));
+})), rv = s.default.memo((function(e) {
+ var t = e.hsva, n = e.onChange, r = { backgroundColor: Km({
+ h: t.h,
+ s: 100,
+ v: 100,
+ a: 1
+ }) };
+ return s.default.createElement("div", {
+ className: "react-colorful__saturation",
+ style: r
+ }, s.default.createElement(Um, {
+ onMove: function(e) {
+ n({
+ s: 100 * e.left,
+ v: 100 - 100 * e.top
+ });
+ },
+ onKey: function(e) {
+ n({
+ s: Rm(t.s + 100 * e.left, 0, 100),
+ v: Rm(t.v - 100 * e.top, 0, 100)
+ });
+ },
+ "aria-label": "Color",
+ "aria-valuetext": "Saturation " + Vm(t.s) + "%, Brightness " + Vm(t.v) + "%"
+ }, s.default.createElement(Wm, {
+ className: "react-colorful__saturation-pointer",
+ top: 1 - t.v / 100,
+ left: t.s / 100,
+ color: Km(t)
+ })));
+})), ov = function(e, t) {
+ if (e === t) return !0;
+ for (var n in e) if (e[n] !== t[n]) return !1;
+ return !0;
+}, iv = function(e, t) {
+ return e.toLowerCase() === t.toLowerCase() || ov(Gm(e), Gm(t));
+};
+function av(e, t, n) {
+ var r = Dm(n), o = (0, s.useState)((function() {
+ return e.toHsva(t);
+ })), i = o[0], a = o[1], l = (0, s.useRef)({
+ color: t,
+ hsva: i
+ });
+ return (0, s.useEffect)((function() {
+ if (!e.equal(t, l.current.color)) {
+ var n = e.toHsva(t);
+ l.current = {
+ hsva: n,
+ color: t
+ }, a(n);
+ }
+ }), [t, e]), (0, s.useEffect)((function() {
+ var t;
+ ov(i, l.current.hsva) || e.equal(t = e.fromHsva(i), l.current.color) || (l.current = {
+ hsva: i,
+ color: t
+ }, r(t));
+ }), [
+ i,
+ e,
+ r
+ ]), [i, (0, s.useCallback)((function(e) {
+ a((function(t) {
+ return Object.assign({}, t, e);
+ }));
+ }), [])];
+}
+var sv = typeof window < "u" ? s.useLayoutEffect : s.useEffect, lv = /* @__PURE__ */ new Map(), cv = function(e) {
+ sv((function() {
+ var t = e.current ? e.current.ownerDocument : document;
+ if (t !== void 0 && !lv.has(t)) {
+ var n = t.createElement("style");
+ n.innerHTML = ".react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill-opacity=\".05\"><path d=\"M8 0h8v8H8zM0 8h8v8H0z\"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}", lv.set(t, n);
+ var r = o.nc;
+ r && n.setAttribute("nonce", r), t.head.appendChild(n);
+ }
+ }), []);
+}, uv = function(e) {
+ var t = e.className, n = e.colorModel, r = e.color, o = r === void 0 ? n.defaultColor : r, i = e.onChange, a = Lm(e, [
+ "className",
+ "colorModel",
+ "color",
+ "onChange"
+ ]), l = (0, s.useRef)(null);
+ cv(l);
+ var c = av(n, o, i), u = c[0], d = c[1], f = Hm(["react-colorful", t]);
+ return s.default.createElement("div", Mm({}, a, {
+ ref: l,
+ className: f
+ }), s.default.createElement(rv, {
+ hsva: u,
+ onChange: d
+ }), s.default.createElement(nv, {
+ hue: u.h,
+ onChange: d,
+ className: "react-colorful__last-control"
+ }));
+}, dv = {
+ defaultColor: "000",
+ toHsva: qm,
+ fromHsva: function(e) {
+ return Ym({
+ h: e.h,
+ s: e.s,
+ v: e.v,
+ a: 1
+ });
+ },
+ equal: iv
+}, fv = function(e) {
+ return s.default.createElement(uv, Mm({}, e, { colorModel: dv }));
+}, pv = function(e) {
+ var t = e.className, n = e.hsva, r = e.onChange, o = { backgroundImage: "linear-gradient(90deg, " + Xm(Object.assign({}, n, { a: 0 })) + ", " + Xm(Object.assign({}, n, { a: 1 })) + ")" }, i = Hm(["react-colorful__alpha", t]), a = Vm(100 * n.a);
+ return s.default.createElement("div", { className: i }, s.default.createElement("div", {
+ className: "react-colorful__alpha-gradient",
+ style: o
+ }), s.default.createElement(Um, {
+ onMove: function(e) {
+ r({ a: e.left });
+ },
+ onKey: function(e) {
+ r({ a: Rm(n.a + e.left) });
+ },
+ "aria-label": "Alpha",
+ "aria-valuetext": a + "%",
+ "aria-valuenow": a,
+ "aria-valuemin": "0",
+ "aria-valuemax": "100"
+ }, s.default.createElement(Wm, {
+ className: "react-colorful__alpha-pointer",
+ left: n.a,
+ color: Xm(n)
+ })));
+}, hv = function(e) {
+ var t = e.className, n = e.colorModel, r = e.color, o = r === void 0 ? n.defaultColor : r, i = e.onChange, a = Lm(e, [
+ "className",
+ "colorModel",
+ "color",
+ "onChange"
+ ]), l = (0, s.useRef)(null);
+ cv(l);
+ var c = av(n, o, i), u = c[0], d = c[1], f = Hm(["react-colorful", t]);
+ return s.default.createElement("div", Mm({}, a, {
+ ref: l,
+ className: f
+ }), s.default.createElement(rv, {
+ hsva: u,
+ onChange: d
+ }), s.default.createElement(nv, {
+ hue: u.h,
+ onChange: d
+ }), s.default.createElement(pv, {
+ hsva: u,
+ onChange: d,
+ className: "react-colorful__last-control"
+ }));
+}, gv = {
+ defaultColor: "0001",
+ toHsva: qm,
+ fromHsva: Ym,
+ equal: iv
+}, mv = function(e) {
+ return s.default.createElement(hv, Mm({}, e, { colorModel: gv }));
+};
+const vv = /^#([a-f\d])([a-f\d])([a-f\d])$/i;
+function yv({ color: e, opacity: t }) {
+ let n = e;
+ return vv.test(e) && (n = n.replace(vv, "#$1$1$2$2$3$3")), n + function(e) {
+ let t = Math.round(255 * parseInt(e, 10) / 100).toString(16).toUpperCase();
+ return t.length < 2 ? `0${t}` : t;
+ }(t.toString());
+}
+function bv({ value: e, onChange: t, opacity: n }) {
+ let [r, o] = (0, s.useState)(e);
+ return (0, s.useEffect)((() => {
+ o(e);
+ }), [e]), (0, Go.jsx)(Gl, {
+ maxLength: 7,
+ icon: (0, Go.jsx)(Dh, {
+ variant: "content",
+ backgroundColor: n === void 0 ? e : yv({
+ color: e,
+ opacity: n
+ }),
+ shape: "circle",
+ size: "xs"
+ }),
+ value: r,
+ onChange: (e) => {
+ let n = function(e) {
+ let t = "#" + e.replace(/([^0-9A-F]+)/gi, "");
+ return t.length === 1 ? "" : t;
+ }(e);
+ o(n), (/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(n) || n.length === 0) && t(n);
+ },
+ onBlur: () => {
+ r !== e && (t(e), o(e));
+ },
+ placeholder: "#ffffff",
+ "aria-label": "Hex"
+ });
+}
+const wv = ao.div.withConfig({
+ displayName: "InputContainer",
+ componentId: "sc-vhns83-0"
+})([
+ "display:grid;grid-template-columns:",
+ ";align-items:center;padding:0 ",
+ " ",
+ ";column-gap:",
+ ";"
+], ((e) => e.$hasAlphaChannel ? "minmax(10px, 1fr) 88px" : "minmax(0, 1fr)"), po.spacing5, po.spacing5, po.spacing4);
+function xv({ value: e, onChange: t }) {
+ return (0, Go.jsxs)(Go.Fragment, { children: [(0, Go.jsx)(fv, {
+ color: e,
+ onChange: (e) => {
+ t(e);
+ }
+ }), (0, Go.jsx)(wv, { children: (0, Go.jsx)(bv, {
+ value: e,
+ onChange: (e) => {
+ t(e);
+ }
+ }) })] });
+}
+function Ev(e) {
+ if (e.length <= 7) return 100;
+ let t = e.slice(-2);
+ return Math.floor(Math.round(parseInt(t, 16) / 255 * 100));
+}
+function Sv(e) {
+ let { translate: t } = ql();
+ return (0, Go.jsx)(Gl, {
+ type: "number",
+ suffix: "%",
+ maxLength: 3,
+ value: e.value.toString(),
+ onChange: (t) => {
+ e.onChange(parseInt(t || "0", 10));
+ },
+ onBlur: (t) => {
+ let n = parseInt(t.target.value, 10);
+ n >= 0 && n <= 100 || e.onChange(100);
+ },
+ "aria-label": t("colorpicker.opacity-input")
+ });
+}
+function Cv({ value: e, onChange: t }) {
+ return (0, Go.jsxs)(Go.Fragment, { children: [(0, Go.jsx)(mv, {
+ color: yv(e),
+ onChange: (e) => {
+ t({
+ color: e.substring(0, 7),
+ opacity: Ev(e)
+ });
+ }
+ }), (0, Go.jsxs)(wv, {
+ $hasAlphaChannel: !0,
+ children: [(0, Go.jsx)(bv, {
+ value: e.color,
+ opacity: e.opacity,
+ onChange: (n) => {
+ t({
+ color: n,
+ opacity: e.opacity
+ });
+ }
+ }), (0, Go.jsx)(Sv, {
+ value: e.opacity,
+ onChange: (n) => {
+ t({
+ color: e.color,
+ opacity: n
+ });
+ }
+ })]
+ })] });
+}
+function kv(e) {
+ return typeof e.value == "string";
+}
+function _v(e) {
+ let { trigger: t, value: n, onChange: r, ...o } = e, [i, a] = (0, s.useState)(!1), l = (0, s.useRef)(), c = Gc("colorpicker"), u = Cl("colorpicker"), { renderLayer: d, triggerProps: { ref: f }, layerProps: p } = Ls({
+ isOpen: i,
+ onOutsideClick: Am(l.current) ? void 0 : () => a(!1),
+ triggerOffset: 8,
+ containerOffset: 16,
+ auto: !0,
+ container: Nm(l.current),
+ placement: "bottom-start",
+ preferX: "left",
+ preferY: "bottom",
+ possiblePlacements: [
+ "bottom-start",
+ "top-start",
+ "bottom-end",
+ "top-end"
+ ]
+ });
+ return ng("Escape", (() => {
+ i && a(!1);
+ })), t ? (0, Go.jsxs)(Go.Fragment, { children: [t({
+ isOpen: i,
+ onClick: () => a(((e) => !e)),
+ "aria-haspopup": !0,
+ "aria-expanded": i,
+ "aria-controls": c,
+ ref: ds(f, l)
+ }), i && d((0, Go.jsx)(Tv, {
+ id: c,
+ $zIndex: u,
+ ...p,
+ ...o,
+ children: (0, Go.jsx)(Iv, { children: kv(e) ? (0, Go.jsx)(xv, {
+ value: e.value,
+ onChange: e.onChange
+ }) : (0, Go.jsx)(Cv, {
+ value: e.value,
+ onChange: e.onChange
+ }) })
+ }))] }) : (0, Go.jsx)(Iv, {
+ ...o,
+ children: kv(e) ? (0, Go.jsx)(xv, {
+ value: e.value,
+ onChange: e.onChange
+ }) : (0, Go.jsx)(Cv, {
+ value: e.value,
+ onChange: e.onChange
+ })
+ });
+}
+const Tv = ao.div.withConfig({
+ displayName: "Container",
+ componentId: "sc-p6mlhn-0"
+})(["z-index:", ";"], ((e) => e.$zIndex)), Iv = ao.div.withConfig({
+ displayName: "ColorPickerCard",
+ componentId: "sc-p6mlhn-1"
+})([
+ "width:298px;border-radius:",
+ ";background-color:",
+ ";box-shadow:",
+ ",",
+ ";.react-colorful{width:100%;height:auto;}.react-colorful__saturation{height:156px;margin-bottom:",
+ ";border-bottom:none;border-radius:",
+ " ",
+ " 0 0;box-shadow:none;}.react-colorful__hue,.react-colorful__alpha{height:8px;margin:0 ",
+ " ",
+ ";border-radius:",
+ ";}.react-colorful__hue{box-shadow:inset 0 0 0 1px ",
+ ";}.react-colorful__alpha{background-image:url(\"data:image/svg+xml,%3Csvg width='8' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Crect height='8' width='8' y='0' x='0' fill='%23ffffff'/%3E%3Crect height='4' width='4' y='0' x='0' fill='%23e9ecee'/%3E%3Crect height='4' width='4' y='4' x='4' fill='%23e9ecee'/%3E%3C/svg%3E%0A\");}.react-colorful__alpha-gradient{height:8px;border-radius:",
+ ";box-shadow:inset 0 0 0 1px ",
+ ";}.react-colorful__pointer{width:16px;height:16px;border-width:4px;box-shadow:0 0 0 1px ",
+ ";cursor:pointer;}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%);}.react-colorful__interactive:active .react-colorful__pointer{width:20px;height:20px;border-width:6px;}.react-colorful__pointer-fill{box-shadow:inset ",
+ ";}"
+], po.radiusBase, po.gray10, po.elevationStatic, po.elevation2, po.spacing6, po.radiusBase, po.radiusBase, po.spacing5, po.spacing6, po.radiusPill, po.gray100a, po.radiusBase, po.gray100a, po.gray200a, po.elevation1), Ov = {
+ "min-height": "0",
+ "max-height": "none",
+ height: "0",
+ visibility: "hidden",
+ overflow: "hidden",
+ position: "absolute",
+ "z-index": "-1000",
+ top: "0",
+ right: "0"
+};
+function jv(e) {
+ Object.keys(Ov).forEach(((t) => {
+ e.style.setProperty(t, Ov[t], "important");
+ }));
+}
+let Pv = null;
+const Av = [
+ "borderBottomWidth",
+ "borderLeftWidth",
+ "borderRightWidth",
+ "borderTopWidth",
+ "boxSizing",
+ "fontFamily",
+ "fontSize",
+ "fontStyle",
+ "fontWeight",
+ "letterSpacing",
+ "lineHeight",
+ "paddingBottom",
+ "paddingLeft",
+ "paddingRight",
+ "paddingTop",
+ "tabSize",
+ "textIndent",
+ "textRendering",
+ "textTransform",
+ "width",
+ "wordBreak"
+], Nv = (0, s.forwardRef)((({ id: e, isDisabled: t = !1, isReadOnly: n = !1, isInvalid: r = !1, onBlur: o, onChange: i, onFocus: a, placeholder: l, value: c, "aria-label": u, "aria-labelledby": d, "aria-describedby": f, minRows: p = 2, maxRows: h = 8, maxLength: g, autoFocus: m = !1, ...v }, y) => {
+ let b = (0, s.useRef)(null);
+ return function(e, t, n) {
+ let r = (0, s.useRef)(0), [o, i] = function(e, t) {
+ let n = e || 2, r = t || 8;
+ return n > r && (n = r), n < 2 && (n = 2), r > 8 && (r = 8), [n, r];
+ }(t, n);
+ (0, s.useLayoutEffect)((() => {
+ let t = e.current;
+ if (!t) return;
+ let n = function(e) {
+ let t = window.getComputedStyle(e);
+ if (t === null) return null;
+ let n = (r = t, Av.reduce(((e, t) => (e[t] = r[t], e)), {}));
+ var r;
+ return n.boxSizing === "" ? null : {
+ sizingStyle: n,
+ paddingSize: parseFloat(n.paddingBottom || "0") + parseFloat(n.paddingTop || "0"),
+ borderSize: parseFloat(n.borderBottomWidth || "0") + parseFloat(n.borderTopWidth || "0")
+ };
+ }(t);
+ if (!n) return;
+ let a = function({ sizingData: e, value: t, minRows: n, maxRows: r }) {
+ Pv || (Pv = document.createElement("textarea"), Pv.setAttribute("tabindex", "-1"), Pv.setAttribute("aria-hidden", "true"), jv(Pv)), Pv.parentNode === null && document.body.appendChild(Pv);
+ let { paddingSize: o, borderSize: i, sizingStyle: a } = e;
+ Object.keys(a).forEach(((e) => {
+ if (!Pv) return;
+ let t = e;
+ Pv.style[t] = a[t];
+ })), jv(Pv), Pv.value = t;
+ let s = function(e, t) {
+ let n = e.scrollHeight;
+ return n = e.scrollHeight, t.sizingStyle.boxSizing === "border-box" ? n + t.borderSize : n - t.paddingSize;
+ }(Pv, e);
+ Pv.value = "x";
+ let l = Pv.scrollHeight - o, c = l * n;
+ a.boxSizing === "border-box" && (c = c + o + i), s = Math.max(c, s);
+ let u = l * r;
+ return a.boxSizing === "border-box" && (u = u + o + i), s = Math.min(u, s), s;
+ }({
+ sizingData: n,
+ value: t.value || t.placeholder || "x",
+ minRows: o,
+ maxRows: i
+ });
+ r.current !== a && (r.current = a, t.style.setProperty("height", `${a}px`, "important"));
+ }));
+ }(b, p, h), (0, Go.jsx)(Dv, {
+ value: c,
+ onChange: function(e) {
+ if (i) {
+ let t = e.currentTarget.value;
+ i(t);
+ }
+ },
+ id: e,
+ disabled: t,
+ readOnly: n,
+ $isInvalid: r,
+ "aria-label": u,
+ "aria-labelledby": d,
+ "aria-describedby": f,
+ onBlur: o,
+ onFocus: a,
+ placeholder: l,
+ autoComplete: "off",
+ autoCorrect: "off",
+ autoFocus: m,
+ ref: Fl(y, b),
+ maxLength: g,
+ ...v
+ });
+})), { internalTokens: Mv, declareTokens: Lv } = ea({
+ lightTheme: {
+ "textarea-fill": po.gray10,
+ "textarea-fill-disabled": po.gray25,
+ "textarea-border": po.gray100,
+ "textarea-border-hover": po.gray200,
+ "textarea-border-focus": po.gray300,
+ "textarea-border-disabled": po.gray100,
+ "textarea-shadow-hover": po.elevation1,
+ "textarea-focus-ring": po.gray100
+ },
+ darkTheme: {
+ "textarea-fill": "transparent",
+ "textarea-fill-disabled": po.gray50a,
+ "textarea-border": po.gray200a,
+ "textarea-border-hover": po.gray300a,
+ "textarea-border-focus": po.gray400a,
+ "textarea-border-disabled": po.gray100a,
+ "textarea-shadow-hover": "none",
+ "textarea-focus-ring": po.gray300a
+ }
+}), Dv = ao.textarea.withConfig({
+ displayName: "TextareaStyled",
+ componentId: "sc-atdkub-0"
+})([
+ "&&{",
+ " display:block;box-sizing:border-box;width:100%;margin:0;padding:",
+ " ",
+ ";border:1px solid ",
+ ";border-radius:",
+ ";background:",
+ ";color:",
+ ";outline:none;font-family:",
+ ";resize:none;transition:none;",
+ " &::placeholder{color:",
+ ";}&:hover{border-color:",
+ ";box-shadow:",
+ ";}&:focus{border-color:",
+ ";box-shadow:0 0 0 3px ",
+ ";}&:disabled{border-color:",
+ ";background:",
+ ";color:",
+ ";box-shadow:none;&::placeholder{color:",
+ ";}}",
+ ";}"
+], Lv, po.spacing3, po.spacing5, Mv["textarea-border"], po.radiusBase, Mv["textarea-fill"], po.colorText, po.brandFontStackBase, Vi.paragraphM, po.colorTextDisabled, Mv["textarea-border-hover"], Mv["textarea-shadow-hover"], Mv["textarea-border-focus"], Mv["textarea-focus-ring"], Mv["textarea-border-disabled"], Mv["textarea-fill-disabled"], po.colorTextMuted, po.colorTextDisabled, ((e) => e.$isInvalid && ro([
+ "border-color:",
+ ";&:hover{border-color:",
+ ";}&:focus{border-color:",
+ ";}"
+], po.red500, po.red600, po.red500)));
+function Rv({ children: e, openOn: t = "type", isAnyValueAllowed: n = !1, value: r, onChange: o, onOpen: i, onClose: a, onClean: l, icon: c, placeholder: u, id: d, iconRight: f, isDisabled: p, ...h }) {
+ let [g, m] = (0, s.useState)(""), v = (0, s.useRef)(null);
+ return (0, Go.jsx)(um.OffsetContext.Provider, {
+ value: "extra",
+ children: (0, Go.jsx)(um, {
+ containerRef: v,
+ trigger: ({ isOpen: e, onClick: i, onKeyDown: a, ...s }, { open: h, close: y }) => (0, Go.jsx)(Gl, {
+ onFocus: () => {
+ t === "focus" && h(), n || m(r);
+ },
+ onBlur: (e) => {
+ var t;
+ n || (t = v.current) != null && t.contains(e.relatedTarget) || r.trim().length > 0 && (y(), o(g));
+ },
+ onClean: l,
+ value: r,
+ onChange: (e) => {
+ o(e), e.trim().length > 0 && h(), t === "type" && e.trim().length === 0 && y();
+ },
+ iconRight: f || (t === "focus" ? (0, Go.jsx)(um.Arrow, {}) : void 0),
+ icon: c,
+ placeholder: u,
+ id: d,
+ hasClearButton: !0,
+ role: "combobox",
+ "aria-autocomplete": "list",
+ isDisabled: p,
+ ...s
+ }),
+ position: "bottom",
+ isKeepingFocusOnTrigger: n,
+ role: "listbox",
+ onOpen: i,
+ onClose: a,
+ ...h,
+ children: t === "type" && r.trim().length === 0 ? null : e
+ })
+ });
+}
+function zv(e, t, n) {
+ var r = this, o = (0, s.useRef)(null), i = (0, s.useRef)(0), a = (0, s.useRef)(null), l = (0, s.useRef)([]), c = (0, s.useRef)(), u = (0, s.useRef)(), d = (0, s.useRef)(e), f = (0, s.useRef)(!0);
+ d.current = e;
+ var p = typeof window < "u", h = !t && t !== 0 && p;
+ if (typeof e != "function") throw TypeError("Expected a function");
+ t = +t || 0;
+ var g = !!(n ||= {}).leading, m = !("trailing" in n) || !!n.trailing, v = "maxWait" in n, y = "debounceOnServer" in n && !!n.debounceOnServer, b = v ? Math.max(+n.maxWait || 0, t) : null;
+ return (0, s.useEffect)((function() {
+ return f.current = !0, function() {
+ f.current = !1;
+ };
+ }), []), (0, s.useMemo)((function() {
+ var e = function(e) {
+ var t = l.current, n = c.current;
+ return l.current = c.current = null, i.current = e, u.current = d.current.apply(n, t);
+ }, n = function(e, t) {
+ h && cancelAnimationFrame(a.current), a.current = h ? requestAnimationFrame(e) : setTimeout(e, t);
+ }, s = function(e) {
+ if (!f.current) return !1;
+ var n = e - o.current;
+ return !o.current || n >= t || n < 0 || v && e - i.current >= b;
+ }, w = function(t) {
+ return a.current = null, m && l.current ? e(t) : (l.current = c.current = null, u.current);
+ }, x = function e() {
+ var r = Date.now();
+ if (s(r)) return w(r);
+ if (f.current) {
+ var a = t - (r - o.current);
+ n(e, v ? Math.min(a, b - (r - i.current)) : a);
+ }
+ }, E = function() {
+ if (p || y) {
+ var d = Date.now(), h = s(d);
+ if (l.current = [].slice.call(arguments), c.current = r, o.current = d, h) {
+ if (!a.current && f.current) return i.current = o.current, n(x, t), g ? e(o.current) : u.current;
+ if (v) return n(x, t), e(o.current);
+ }
+ return a.current || n(x, t), u.current;
+ }
+ };
+ return E.cancel = function() {
+ a.current && (h ? cancelAnimationFrame(a.current) : clearTimeout(a.current)), i.current = 0, l.current = o.current = c.current = a.current = null;
+ }, E.isPending = function() {
+ return !!a.current;
+ }, E.flush = function() {
+ return a.current ? w(Date.now()) : u.current;
+ }, E;
+ }), [
+ g,
+ v,
+ t,
+ b,
+ m,
+ h,
+ p,
+ y
+ ]);
+}
+Rv.Item = function({ children: e, onClick: t, icon: n, isChecked: r, ...o }) {
+ return (0, Go.jsx)(um.Item, {
+ onClick: t,
+ icon: n,
+ isChecked: r,
+ role: "option",
+ ...o,
+ children: e
+ });
+}, Rv.ListItem = function({ children: e, ...t }) {
+ return (0, Go.jsx)(um.ListItem, {
+ ...t,
+ role: "option",
+ children: e
+ });
+}, Rv.Text = function({ children: e, ...t }) {
+ return (0, Go.jsx)(um.Text, {
+ fontSize: "list-item",
+ ...t,
+ children: e
+ });
+}, o(2193), o(7200);
+var $v = {
+ color: void 0,
+ size: void 0,
+ className: void 0,
+ style: void 0,
+ attr: void 0
+}, Bv = s.default.createContext && s.default.createContext($v), Fv = function() {
+ return Fv = Object.assign || function(e) {
+ for (var t, n = 1, r = arguments.length; n < r; n++) for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
+ return e;
+ }, Fv.apply(this, arguments);
+};
+function Uv(e) {
+ return e && e.map((function(e, t) {
+ return s.default.createElement(e.tag, Fv({ key: t }, e.attr), Uv(e.child));
+ }));
+}
+function Hv(e) {
+ return function(t) {
+ return s.default.createElement(Wv, Fv({ attr: Fv({}, e.attr) }, t), Uv(e.child));
+ };
+}
+function Wv(e) {
+ var t = function(t) {
+ var n, r = e.attr, o = e.size, i = e.title, a = function(e, t) {
+ var n = {};
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") {
+ var o = 0;
+ for (r = Object.getOwnPropertySymbols(e); o < r.length; o++) t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
+ }
+ return n;
+ }(e, [
+ "attr",
+ "size",
+ "title"
+ ]), l = o || t.size || "1em";
+ return t.className && (n = t.className), e.className && (n = (n ? n + " " : "") + e.className), s.default.createElement("svg", Fv({
+ stroke: "currentColor",
+ fill: "currentColor",
+ strokeWidth: "0"
+ }, t.attr, r, a, {
+ className: n,
+ style: Fv(Fv({ color: e.color || t.color }, t.style), e.style),
+ height: l,
+ width: l,
+ xmlns: "http://www.w3.org/2000/svg"
+ }), i && s.default.createElement("title", null, i), e.children);
+ };
+ return Bv === void 0 ? t($v) : s.default.createElement(Bv.Consumer, null, (function(e) {
+ return t(e);
+ }));
+}
+function Vv(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" }
+ }]
+ })(e);
+}
+function qv(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M19 19H5V5h7V3H5a2 2 0 00-2 2v14a2 2 0 002 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z" }
+ }]
+ })(e);
+}
+function Gv(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z" }
+ }]
+ })(e);
+}
+function Yv(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9V6zM18 20H6V10h12v10z" }
+ }]
+ })(e);
+}
+function Zv(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z" }
+ }]
+ })(e);
+}
+function Kv(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0V0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M15 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zM3 12a5.99 5.99 0 014-5.65V4.26C3.55 5.15 1 8.27 1 12s2.55 6.85 6 7.74v-2.09A5.99 5.99 0 013 12z" }
+ }]
+ })(e);
+}
+function Xv(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" }
+ }]
+ })(e);
+}
+function Jv(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" }
+ }]
+ })(e);
+}
+function Qv(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z" }
+ }]
+ })(e);
+}
+function ey(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z" }
+ }]
+ })(e);
+}
+function ty(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M19.5 9.5c-1.03 0-1.9.62-2.29 1.5h-2.92c-.39-.88-1.26-1.5-2.29-1.5s-1.9.62-2.29 1.5H6.79c-.39-.88-1.26-1.5-2.29-1.5a2.5 2.5 0 000 5c1.03 0 1.9-.62 2.29-1.5h2.92c.39.88 1.26 1.5 2.29 1.5s1.9-.62 2.29-1.5h2.92c.39.88 1.26 1.5 2.29 1.5a2.5 2.5 0 000-5z" }
+ }]
+ })(e);
+}
+function ny(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" }
+ }]
+ })(e);
+}
+function ry(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0V0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z" }
+ }]
+ })(e);
+}
+function oy(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "circle",
+ attr: {
+ cx: "12",
+ cy: "12",
+ r: "10"
+ }
+ }]
+ })(e);
+}
+function iy(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm-7 7H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4z" }
+ }]
+ })(e);
+}
+function ay(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H6V6h12v12z" }
+ }]
+ })(e);
+}
+function sy(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A7.941 7.941 0 0111 4.07zm7.32.19A9.949 9.949 0 0013 2.05v2.02c1.46.18 2.79.76 3.9 1.62l1.42-1.43zM19.93 11h2.02c-.2-2.01-1-3.84-2.21-5.32L18.31 7.1a7.941 7.941 0 011.62 3.9zM5.69 7.1L4.26 5.68A9.949 9.949 0 002.05 11h2.02c.18-1.46.76-2.79 1.62-3.9zM4.07 13H2.05c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A7.868 7.868 0 014.07 13zM15 12c0-1.66-1.34-3-3-3s-3 1.34-3 3 1.34 3 3 3 3-1.34 3-3zm3.31 4.9l1.43 1.43a9.981 9.981 0 002.21-5.32h-2.02a7.945 7.945 0 01-1.62 3.89zM13 19.93v2.02c2.01-.2 3.84-1 5.32-2.21l-1.43-1.43c-1.1.86-2.43 1.44-3.89 1.62zm-7.32-.19A9.981 9.981 0 0011 21.95v-2.02a7.941 7.941 0 01-3.9-1.62l-1.42 1.43z" }
+ }]
+ })(e);
+}
+function ly(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" }
+ }]
+ })(e);
+}
+function cy(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z" }
+ }]
+ })(e);
+}
+function uy(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M7.34 6.41L.86 12.9l6.49 6.48 6.49-6.48-6.5-6.49zM3.69 12.9l3.66-3.66L11 12.9l-3.66 3.66-3.65-3.66zm15.67-6.26A8.95 8.95 0 0013 4V.76L8.76 5 13 9.24V6c1.79 0 3.58.68 4.95 2.05a7.007 7.007 0 010 9.9 6.973 6.973 0 01-7.79 1.44l-1.49 1.49C10.02 21.62 11.51 22 13 22c2.3 0 4.61-.88 6.36-2.64a8.98 8.98 0 000-12.72z" }
+ }]
+ })(e);
+}
+function dy(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93s3.05-7.44 7-7.93v15.86zm2-15.86c1.03.13 2 .45 2.87.93H13v-.93zM13 7h5.24c.25.31.48.65.68 1H13V7zm0 3h6.74c.08.33.15.66.19 1H13v-1zm0 9.93V19h2.87c-.87.48-1.84.8-2.87.93zM18.24 17H13v-1h5.92c-.2.35-.43.69-.68 1zm1.5-3H13v-1h6.93c-.04.34-.11.67-.19 1z" }
+ }]
+ })(e);
+}
+function fy(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z" }
+ }]
+ })(e);
+}
+function py(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z" }
+ }]
+ })(e);
+}
+function hy(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }
+ }]
+ })(e);
+}
+function gy(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" }
+ }]
+ })(e);
+}
+function my(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M13 6.99h3L12 3 8 6.99h3v10.02H8L12 21l4-3.99h-3z" }
+ }]
+ })(e);
+}
+var vy = o(9399);
+function yy(e, t) {
+ return function() {
+ return e.apply(t, arguments);
+ };
+}
+const { toString: by } = Object.prototype, { getPrototypeOf: wy } = Object, { iterator: xy, toStringTag: Ey } = Symbol, Sy = ((e) => (t) => {
+ let n = by.call(t);
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
+})(Object.create(null)), Cy = (e) => (e = e.toLowerCase(), (t) => Sy(t) === e), ky = (e) => (t) => typeof t === e, { isArray: _y } = Array, Ty = ky("undefined"), Iy = Cy("ArrayBuffer"), Oy = ky("string"), jy = ky("function"), Py = ky("number"), Ay = (e) => typeof e == "object" && !!e, Ny = (e) => {
+ if (Sy(e) !== "object") return !1;
+ let t = wy(e);
+ return !(t !== null && t !== Object.prototype && Object.getPrototypeOf(t) !== null || Ey in e || xy in e);
+}, My = Cy("Date"), Ly = Cy("File"), Dy = Cy("Blob"), Ry = Cy("FileList"), zy = Cy("URLSearchParams"), [$y, By, Fy, Uy] = [
+ "ReadableStream",
+ "Request",
+ "Response",
+ "Headers"
+].map(Cy);
+function Hy(e, t, { allOwnKeys: n = !1 } = {}) {
+ if (e == null) return;
+ let r, o;
+ if (typeof e != "object" && (e = [e]), _y(e)) for (r = 0, o = e.length; r < o; r++) t.call(null, e[r], r, e);
+ else {
+ let o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length, a;
+ for (r = 0; r < i; r++) a = o[r], t.call(null, e[a], a, e);
+ }
+}
+function Wy(e, t) {
+ t = t.toLowerCase();
+ let n = Object.keys(e), r, o = n.length;
+ for (; o-- > 0;) if (r = n[o], t === r.toLowerCase()) return r;
+ return null;
+}
+const Vy = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, qy = (e) => !Ty(e) && e !== Vy, Gy = (Yy = typeof Uint8Array < "u" && wy(Uint8Array), (e) => Yy && e instanceof Yy);
+var Yy;
+const Zy = Cy("HTMLFormElement"), Ky = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Xy = Cy("RegExp"), Jy = (e, t) => {
+ let n = Object.getOwnPropertyDescriptors(e), r = {};
+ Hy(n, ((n, o) => {
+ let i;
+ !1 !== (i = t(n, o, e)) && (r[o] = i || n);
+ })), Object.defineProperties(e, r);
+}, Qy = Cy("AsyncFunction"), eb = (tb = typeof setImmediate == "function", nb = jy(Vy.postMessage), tb ? setImmediate : nb ? ((e, t) => (Vy.addEventListener("message", (({ source: n, data: r }) => {
+ n === Vy && r === e && t.length && t.shift()();
+}), !1), (n) => {
+ t.push(n), Vy.postMessage(e, "*");
+}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e));
+var tb, nb, ob = {
+ isArray: _y,
+ isArrayBuffer: Iy,
+ isBuffer: function(e) {
+ return e !== null && !Ty(e) && e.constructor !== null && !Ty(e.constructor) && jy(e.constructor.isBuffer) && e.constructor.isBuffer(e);
+ },
+ isFormData: (e) => {
+ let t;
+ return e && (typeof FormData == "function" && e instanceof FormData || jy(e.append) && ((t = Sy(e)) === "formdata" || t === "object" && jy(e.toString) && e.toString() === "[object FormData]"));
+ },
+ isArrayBufferView: function(e) {
+ let t;
+ return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && Iy(e.buffer), t;
+ },
+ isString: Oy,
+ isNumber: Py,
+ isBoolean: (e) => !0 === e || !1 === e,
+ isObject: Ay,
+ isPlainObject: Ny,
+ isReadableStream: $y,
+ isRequest: By,
+ isResponse: Fy,
+ isHeaders: Uy,
+ isUndefined: Ty,
+ isDate: My,
+ isFile: Ly,
+ isBlob: Dy,
+ isRegExp: Xy,
+ isFunction: jy,
+ isStream: (e) => Ay(e) && jy(e.pipe),
+ isURLSearchParams: zy,
+ isTypedArray: Gy,
+ isFileList: Ry,
+ forEach: Hy,
+ merge: function e() {
+ let { caseless: t } = qy(this) && this || {}, n = {}, r = (r, o) => {
+ let i = t && Wy(n, o) || o;
+ Ny(n[i]) && Ny(r) ? n[i] = e(n[i], r) : Ny(r) ? n[i] = e({}, r) : _y(r) ? n[i] = r.slice() : n[i] = r;
+ };
+ for (let e = 0, t = arguments.length; e < t; e++) arguments[e] && Hy(arguments[e], r);
+ return n;
+ },
+ extend: (e, t, n, { allOwnKeys: r } = {}) => (Hy(t, ((t, r) => {
+ n && jy(t) ? e[r] = yy(t, n) : e[r] = t;
+ }), { allOwnKeys: r }), e),
+ trim: (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""),
+ stripBOM: (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e),
+ inherits: (e, t, n, r) => {
+ e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n);
+ },
+ toFlatObject: (e, t, n, r) => {
+ let o, i, a, s = {};
+ if (t ||= {}, e == null) return t;
+ do {
+ for (o = Object.getOwnPropertyNames(e), i = o.length; i-- > 0;) a = o[i], r && !r(a, e, t) || s[a] || (t[a] = e[a], s[a] = !0);
+ e = !1 !== n && wy(e);
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
+ return t;
+ },
+ kindOf: Sy,
+ kindOfTest: Cy,
+ endsWith: (e, t, n) => {
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
+ let r = e.indexOf(t, n);
+ return r !== -1 && r === n;
+ },
+ toArray: (e) => {
+ if (!e) return null;
+ if (_y(e)) return e;
+ let t = e.length;
+ if (!Py(t)) return null;
+ let n = Array(t);
+ for (; t-- > 0;) n[t] = e[t];
+ return n;
+ },
+ forEachEntry: (e, t) => {
+ let n = (e && e[xy]).call(e), r;
+ for (; (r = n.next()) && !r.done;) {
+ let n = r.value;
+ t.call(e, n[0], n[1]);
+ }
+ },
+ matchAll: (e, t) => {
+ let n, r = [];
+ for (; (n = e.exec(t)) !== null;) r.push(n);
+ return r;
+ },
+ isHTMLForm: Zy,
+ hasOwnProperty: Ky,
+ hasOwnProp: Ky,
+ reduceDescriptors: Jy,
+ freezeMethods: (e) => {
+ Jy(e, ((t, n) => {
+ if (jy(e) && [
+ "arguments",
+ "caller",
+ "callee"
+ ].indexOf(n) !== -1) return !1;
+ let r = e[n];
+ jy(r) && (t.enumerable = !1, "writable" in t ? t.writable = !1 : t.set ||= () => {
+ throw Error("Can not rewrite read-only method '" + n + "'");
+ });
+ }));
+ },
+ toObjectSet: (e, t) => {
+ let n = {}, r = (e) => {
+ e.forEach(((e) => {
+ n[e] = !0;
+ }));
+ };
+ return _y(e) ? r(e) : r(String(e).split(t)), n;
+ },
+ toCamelCase: (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, (function(e, t, n) {
+ return t.toUpperCase() + n;
+ })),
+ noop: () => {},
+ toFiniteNumber: (e, t) => e != null && Number.isFinite(e = +e) ? e : t,
+ findKey: Wy,
+ global: Vy,
+ isContextDefined: qy,
+ isSpecCompliantForm: function(e) {
+ return !!(e && jy(e.append) && e[Ey] === "FormData" && e[xy]);
+ },
+ toJSONObject: (e) => {
+ let t = Array(10), n = (e, r) => {
+ if (Ay(e)) {
+ if (t.indexOf(e) >= 0) return;
+ if (!("toJSON" in e)) {
+ t[r] = e;
+ let o = _y(e) ? [] : {};
+ return Hy(e, ((e, t) => {
+ let i = n(e, r + 1);
+ !Ty(i) && (o[t] = i);
+ })), t[r] = void 0, o;
+ }
+ }
+ return e;
+ };
+ return n(e, 0);
+ },
+ isAsyncFn: Qy,
+ isThenable: (e) => e && (Ay(e) || jy(e)) && jy(e.then) && jy(e.catch),
+ setImmediate: eb,
+ asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(Vy) : typeof process < "u" && process.nextTick || eb,
+ isIterable: (e) => e != null && jy(e[xy])
+};
+function ib(e, t, n, r, o) {
+ Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = (/* @__PURE__ */ Error()).stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
+}
+ob.inherits(ib, Error, { toJSON: function() {
+ return {
+ message: this.message,
+ name: this.name,
+ description: this.description,
+ number: this.number,
+ fileName: this.fileName,
+ lineNumber: this.lineNumber,
+ columnNumber: this.columnNumber,
+ stack: this.stack,
+ config: ob.toJSONObject(this.config),
+ code: this.code,
+ status: this.status
+ };
+} });
+const ab = ib.prototype, sb = {};
+[
+ "ERR_BAD_OPTION_VALUE",
+ "ERR_BAD_OPTION",
+ "ECONNABORTED",
+ "ETIMEDOUT",
+ "ERR_NETWORK",
+ "ERR_FR_TOO_MANY_REDIRECTS",
+ "ERR_DEPRECATED",
+ "ERR_BAD_RESPONSE",
+ "ERR_BAD_REQUEST",
+ "ERR_CANCELED",
+ "ERR_NOT_SUPPORT",
+ "ERR_INVALID_URL"
+].forEach(((e) => {
+ sb[e] = { value: e };
+})), Object.defineProperties(ib, sb), Object.defineProperty(ab, "isAxiosError", { value: !0 }), ib.from = (e, t, n, r, o, i) => {
+ let a = Object.create(ab);
+ return ob.toFlatObject(e, a, (function(e) {
+ return e !== Error.prototype;
+ }), ((e) => e !== "isAxiosError")), ib.call(a, e.message, t, n, r, o), a.cause = e, a.name = e.name, i && Object.assign(a, i), a;
+};
+var lb = ib;
+function cb(e) {
+ return ob.isPlainObject(e) || ob.isArray(e);
+}
+function ub(e) {
+ return ob.endsWith(e, "[]") ? e.slice(0, -2) : e;
+}
+function db(e, t, n) {
+ return e ? e.concat(t).map((function(e, t) {
+ return e = ub(e), !n && t ? "[" + e + "]" : e;
+ })).join(n ? "." : "") : t;
+}
+const fb = ob.toFlatObject(ob, {}, null, (function(e) {
+ return /^is[A-Z]/.test(e);
+}));
+var pb = function(e, t, n) {
+ if (!ob.isObject(e)) throw TypeError("target must be an object");
+ t ||= new FormData();
+ let r = (n = ob.toFlatObject(n, {
+ metaTokens: !0,
+ dots: !1,
+ indexes: !1
+ }, !1, (function(e, t) {
+ return !ob.isUndefined(t[e]);
+ }))).metaTokens, o = n.visitor || c, i = n.dots, a = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && ob.isSpecCompliantForm(t);
+ if (!ob.isFunction(o)) throw TypeError("visitor must be a function");
+ function l(e) {
+ if (e === null) return "";
+ if (ob.isDate(e)) return e.toISOString();
+ if (ob.isBoolean(e)) return e.toString();
+ if (!s && ob.isBlob(e)) throw new lb("Blob is not supported. Use a Buffer instead.");
+ return ob.isArrayBuffer(e) || ob.isTypedArray(e) ? s && typeof Blob == "function" ? new Blob([e]) : Buffer.from(e) : e;
+ }
+ function c(e, n, o) {
+ let s = e;
+ if (e && !o && typeof e == "object") {
+ if (ob.endsWith(n, "{}")) n = r ? n : n.slice(0, -2), e = JSON.stringify(e);
+ else if (ob.isArray(e) && function(e) {
+ return ob.isArray(e) && !e.some(cb);
+ }(e) || (ob.isFileList(e) || ob.endsWith(n, "[]")) && (s = ob.toArray(e))) return n = ub(n), s.forEach((function(e, r) {
+ !ob.isUndefined(e) && e !== null && t.append(!0 === a ? db([n], r, i) : a === null ? n : n + "[]", l(e));
+ })), !1;
+ }
+ return !!cb(e) || (t.append(db(o, n, i), l(e)), !1);
+ }
+ let u = [], d = Object.assign(fb, {
+ defaultVisitor: c,
+ convertValue: l,
+ isVisitable: cb
+ });
+ if (!ob.isObject(e)) throw TypeError("data must be an object");
+ return function e(n, r) {
+ if (!ob.isUndefined(n)) {
+ if (u.indexOf(n) !== -1) throw Error("Circular reference detected in " + r.join("."));
+ u.push(n), ob.forEach(n, (function(n, i) {
+ !0 === (!(ob.isUndefined(n) || n === null) && o.call(t, n, ob.isString(i) ? i.trim() : i, r, d)) && e(n, r ? r.concat(i) : [i]);
+ })), u.pop();
+ }
+ }(e), t;
+};
+function hb(e) {
+ let t = {
+ "!": "%21",
+ "'": "%27",
+ "(": "%28",
+ ")": "%29",
+ "~": "%7E",
+ "%20": "+",
+ "%00": "\0"
+ };
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, (function(e) {
+ return t[e];
+ }));
+}
+function gb(e, t) {
+ this._pairs = [], e && pb(e, this, t);
+}
+const mb = gb.prototype;
+mb.append = function(e, t) {
+ this._pairs.push([e, t]);
+}, mb.toString = function(e) {
+ let t = e ? function(t) {
+ return e.call(this, t, hb);
+ } : hb;
+ return this._pairs.map((function(e) {
+ return t(e[0]) + "=" + t(e[1]);
+ }), "").join("&");
+};
+var vb = gb;
+function yb(e) {
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
+}
+function bb(e, t, n) {
+ if (!t) return e;
+ let r = n && n.encode || yb;
+ ob.isFunction(n) && (n = { serialize: n });
+ let o = n && n.serialize, i;
+ if (i = o ? o(t, n) : ob.isURLSearchParams(t) ? t.toString() : new vb(t, n).toString(r), i) {
+ let t = e.indexOf("#");
+ t !== -1 && (e = e.slice(0, t)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
+ }
+ return e;
+}
+var wb = class {
+ constructor() {
+ this.handlers = [];
+ }
+ use(e, t, n) {
+ return this.handlers.push({
+ fulfilled: e,
+ rejected: t,
+ synchronous: !!n && n.synchronous,
+ runWhen: n ? n.runWhen : null
+ }), this.handlers.length - 1;
+ }
+ eject(e) {
+ this.handlers[e] && (this.handlers[e] = null);
+ }
+ clear() {
+ this.handlers &&= [];
+ }
+ forEach(e) {
+ ob.forEach(this.handlers, (function(t) {
+ t !== null && e(t);
+ }));
+ }
+}, xb = {
+ silentJSONParsing: !0,
+ forcedJSONParsing: !0,
+ clarifyTimeoutError: !1
+}, Eb = {
+ isBrowser: !0,
+ classes: {
+ URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : vb,
+ FormData: typeof FormData < "u" ? FormData : null,
+ Blob: typeof Blob < "u" ? Blob : null
+ },
+ protocols: [
+ "http",
+ "https",
+ "file",
+ "blob",
+ "url",
+ "data"
+ ]
+};
+const Sb = typeof window < "u" && typeof document < "u", Cb = typeof navigator == "object" && navigator || void 0, kb = Sb && (!Cb || [
+ "ReactNative",
+ "NativeScript",
+ "NS"
+].indexOf(Cb.product) < 0), _b = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Tb = Sb && window.location.href || "http://localhost";
+var Ib = {
+ ...a,
+ ...Eb
+}, Ob = function(e) {
+ function t(e, n, r, o) {
+ let i = e[o++];
+ if (i === "__proto__") return !0;
+ let a = Number.isFinite(+i), s = o >= e.length;
+ return i = !i && ob.isArray(r) ? r.length : i, s ? (ob.hasOwnProp(r, i) ? r[i] = [r[i], n] : r[i] = n, !a) : (r[i] && ob.isObject(r[i]) || (r[i] = []), t(e, n, r[i], o) && ob.isArray(r[i]) && (r[i] = function(e) {
+ let t = {}, n = Object.keys(e), r, o = n.length, i;
+ for (r = 0; r < o; r++) i = n[r], t[i] = e[i];
+ return t;
+ }(r[i])), !a);
+ }
+ if (ob.isFormData(e) && ob.isFunction(e.entries)) {
+ let n = {};
+ return ob.forEachEntry(e, ((e, r) => {
+ t(function(e) {
+ return ob.matchAll(/\w+|\[(\w*)]/g, e).map(((e) => e[0] === "[]" ? "" : e[1] || e[0]));
+ }(e), r, n, 0);
+ })), n;
+ }
+ return null;
+};
+const jb = {
+ transitional: xb,
+ adapter: [
+ "xhr",
+ "http",
+ "fetch"
+ ],
+ transformRequest: [function(e, t) {
+ let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, o = ob.isObject(e);
+ if (o && ob.isHTMLForm(e) && (e = new FormData(e)), ob.isFormData(e)) return r ? JSON.stringify(Ob(e)) : e;
+ if (ob.isArrayBuffer(e) || ob.isBuffer(e) || ob.isStream(e) || ob.isFile(e) || ob.isBlob(e) || ob.isReadableStream(e)) return e;
+ if (ob.isArrayBufferView(e)) return e.buffer;
+ if (ob.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
+ let i;
+ if (o) {
+ if (n.indexOf("application/x-www-form-urlencoded") > -1) return function(e, t) {
+ return pb(e, new Ib.classes.URLSearchParams(), Object.assign({ visitor: function(e, t, n, r) {
+ return Ib.isNode && ob.isBuffer(e) ? (this.append(t, e.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
+ } }, t));
+ }(e, this.formSerializer).toString();
+ if ((i = ob.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
+ let t = this.env && this.env.FormData;
+ return pb(i ? { "files[]": e } : e, t && new t(), this.formSerializer);
+ }
+ }
+ return o || r ? (t.setContentType("application/json", !1), function(e) {
+ if (ob.isString(e)) try {
+ return (0, JSON.parse)(e), ob.trim(e);
+ } catch (e) {
+ if (e.name !== "SyntaxError") throw e;
+ }
+ return (0, JSON.stringify)(e);
+ }(e)) : e;
+ }],
+ transformResponse: [function(e) {
+ let t = this.transitional || jb.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json";
+ if (ob.isResponse(e) || ob.isReadableStream(e)) return e;
+ if (e && ob.isString(e) && (n && !this.responseType || r)) {
+ let n = !(t && t.silentJSONParsing) && r;
+ try {
+ return JSON.parse(e);
+ } catch (e) {
+ if (n) throw e.name === "SyntaxError" ? lb.from(e, lb.ERR_BAD_RESPONSE, this, null, this.response) : e;
+ }
+ }
+ return e;
+ }],
+ timeout: 0,
+ xsrfCookieName: "XSRF-TOKEN",
+ xsrfHeaderName: "X-XSRF-TOKEN",
+ maxContentLength: -1,
+ maxBodyLength: -1,
+ env: {
+ FormData: Ib.classes.FormData,
+ Blob: Ib.classes.Blob
+ },
+ validateStatus: function(e) {
+ return e >= 200 && e < 300;
+ },
+ headers: { common: {
+ Accept: "application/json, text/plain, */*",
+ "Content-Type": void 0
+ } }
+};
+ob.forEach([
+ "delete",
+ "get",
+ "head",
+ "post",
+ "put",
+ "patch"
+], ((e) => {
+ jb.headers[e] = {};
+}));
+var Pb = jb;
+const Ab = ob.toObjectSet([
+ "age",
+ "authorization",
+ "content-length",
+ "content-type",
+ "etag",
+ "expires",
+ "from",
+ "host",
+ "if-modified-since",
+ "if-unmodified-since",
+ "last-modified",
+ "location",
+ "max-forwards",
+ "proxy-authorization",
+ "referer",
+ "retry-after",
+ "user-agent"
+]), Nb = Symbol("internals");
+function Mb(e) {
+ return e && String(e).trim().toLowerCase();
+}
+function Lb(e) {
+ return !1 === e || e == null ? e : ob.isArray(e) ? e.map(Lb) : String(e);
+}
+function Db(e, t, n, r, o) {
+ return ob.isFunction(r) ? r.call(this, t, n) : (o && (t = n), ob.isString(t) ? ob.isString(r) ? t.indexOf(r) !== -1 : ob.isRegExp(r) ? r.test(t) : void 0 : void 0);
+}
+var Rb = class {
+ constructor(e) {
+ e && this.set(e);
+ }
+ set(e, t, n) {
+ let r = this;
+ function o(e, t, n) {
+ let o = Mb(t);
+ if (!o) throw Error("header name must be a non-empty string");
+ let i = ob.findKey(r, o);
+ (!i || r[i] === void 0 || !0 === n || n === void 0 && !1 !== r[i]) && (r[i || t] = Lb(e));
+ }
+ let i = (e, t) => ob.forEach(e, ((e, n) => o(e, n, t)));
+ if (ob.isPlainObject(e) || e instanceof this.constructor) i(e, t);
+ else if (ob.isString(e) && (e = e.trim()) && !/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())) i(((e) => {
+ let t = {}, n, r, o;
+ return e && e.split("\n").forEach((function(e) {
+ o = e.indexOf(":"), n = e.substring(0, o).trim().toLowerCase(), r = e.substring(o + 1).trim(), !n || t[n] && Ab[n] || (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
+ })), t;
+ })(e), t);
+ else if (ob.isObject(e) && ob.isIterable(e)) {
+ let n, r, o = {};
+ for (let t of e) {
+ if (!ob.isArray(t)) throw TypeError("Object iterator must return a key-value pair");
+ o[r = t[0]] = (n = o[r]) ? ob.isArray(n) ? [...n, t[1]] : [n, t[1]] : t[1];
+ }
+ i(o, t);
+ } else e != null && o(t, e, n);
+ return this;
+ }
+ get(e, t) {
+ if (e = Mb(e)) {
+ let n = ob.findKey(this, e);
+ if (n) {
+ let e = this[n];
+ if (!t) return e;
+ if (!0 === t) return function(e) {
+ let t = Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g, r;
+ for (; r = n.exec(e);) t[r[1]] = r[2];
+ return t;
+ }(e);
+ if (ob.isFunction(t)) return t.call(this, e, n);
+ if (ob.isRegExp(t)) return t.exec(e);
+ throw TypeError("parser must be boolean|regexp|function");
+ }
+ }
+ }
+ has(e, t) {
+ if (e = Mb(e)) {
+ let n = ob.findKey(this, e);
+ return !(!n || this[n] === void 0 || t && !Db(0, this[n], n, t));
+ }
+ return !1;
+ }
+ delete(e, t) {
+ let n = this, r = !1;
+ function o(e) {
+ if (e = Mb(e)) {
+ let o = ob.findKey(n, e);
+ !o || t && !Db(0, n[o], o, t) || (delete n[o], r = !0);
+ }
+ }
+ return ob.isArray(e) ? e.forEach(o) : o(e), r;
+ }
+ clear(e) {
+ let t = Object.keys(this), n = t.length, r = !1;
+ for (; n--;) {
+ let o = t[n];
+ e && !Db(0, this[o], o, e, !0) || (delete this[o], r = !0);
+ }
+ return r;
+ }
+ normalize(e) {
+ let t = this, n = {};
+ return ob.forEach(this, ((r, o) => {
+ let i = ob.findKey(n, o);
+ if (i) return t[i] = Lb(r), void delete t[o];
+ let a = e ? function(e) {
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, ((e, t, n) => t.toUpperCase() + n));
+ }(o) : String(o).trim();
+ a !== o && delete t[o], t[a] = Lb(r), n[a] = !0;
+ })), this;
+ }
+ concat(...e) {
+ return this.constructor.concat(this, ...e);
+ }
+ toJSON(e) {
+ let t = Object.create(null);
+ return ob.forEach(this, ((n, r) => {
+ n != null && !1 !== n && (t[r] = e && ob.isArray(n) ? n.join(", ") : n);
+ })), t;
+ }
+ [Symbol.iterator]() {
+ return Object.entries(this.toJSON())[Symbol.iterator]();
+ }
+ toString() {
+ return Object.entries(this.toJSON()).map((([e, t]) => e + ": " + t)).join("\n");
+ }
+ getSetCookie() {
+ return this.get("set-cookie") || [];
+ }
+ get [Symbol.toStringTag]() {
+ return "AxiosHeaders";
+ }
+ static from(e) {
+ return e instanceof this ? e : new this(e);
+ }
+ static concat(e, ...t) {
+ let n = new this(e);
+ return t.forEach(((e) => n.set(e))), n;
+ }
+ static accessor(e) {
+ let t = (this[Nb] = this[Nb] = { accessors: {} }).accessors, n = this.prototype;
+ function r(e) {
+ let r = Mb(e);
+ t[r] || (function(e, t) {
+ let n = ob.toCamelCase(" " + t);
+ [
+ "get",
+ "set",
+ "has"
+ ].forEach(((r) => {
+ Object.defineProperty(e, r + n, {
+ value: function(e, n, o) {
+ return this[r].call(this, t, e, n, o);
+ },
+ configurable: !0
+ });
+ }));
+ }(n, e), t[r] = !0);
+ }
+ return ob.isArray(e) ? e.forEach(r) : r(e), this;
+ }
+};
+Rb.accessor([
+ "Content-Type",
+ "Content-Length",
+ "Accept",
+ "Accept-Encoding",
+ "User-Agent",
+ "Authorization"
+]), ob.reduceDescriptors(Rb.prototype, (({ value: e }, t) => {
+ let n = t[0].toUpperCase() + t.slice(1);
+ return {
+ get: () => e,
+ set(e) {
+ this[n] = e;
+ }
+ };
+})), ob.freezeMethods(Rb);
+var zb = Rb;
+function $b(e, t) {
+ let n = this || Pb, r = t || n, o = zb.from(r.headers), i = r.data;
+ return ob.forEach(e, (function(e) {
+ i = e.call(n, i, o.normalize(), t ? t.status : void 0);
+ })), o.normalize(), i;
+}
+function Bb(e) {
+ return !(!e || !e.__CANCEL__);
+}
+function Fb(e, t, n) {
+ lb.call(this, e ?? "canceled", lb.ERR_CANCELED, t, n), this.name = "CanceledError";
+}
+ob.inherits(Fb, lb, { __CANCEL__: !0 });
+var Ub = Fb;
+function Hb(e, t, n) {
+ let r = n.config.validateStatus;
+ n.status && r && !r(n.status) ? t(new lb("Request failed with status code " + n.status, [lb.ERR_BAD_REQUEST, lb.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n)) : e(n);
+}
+const Wb = (e, t, n = 3) => {
+ let r = 0, o = function(e, t) {
+ e ||= 10;
+ let n = Array(e), r = Array(e), o, i = 0, a = 0;
+ return t = t === void 0 ? 1e3 : t, function(s) {
+ let l = Date.now(), c = r[a];
+ o ||= l, n[i] = s, r[i] = l;
+ let u = a, d = 0;
+ for (; u !== i;) d += n[u++], u %= e;
+ if (i = (i + 1) % e, i === a && (a = (a + 1) % e), l - o < t) return;
+ let f = c && l - c;
+ return f ? Math.round(1e3 * d / f) : void 0;
+ };
+ }(50, 250);
+ return function(e, t) {
+ let n, r, o = 0, i = 1e3 / t, a = (t, i = Date.now()) => {
+ o = i, n = null, r &&= (clearTimeout(r), null), e.apply(null, t);
+ };
+ return [(...e) => {
+ let t = Date.now(), s = t - o;
+ s >= i ? a(e, t) : (n = e, r ||= setTimeout((() => {
+ r = null, a(n);
+ }), i - s));
+ }, () => n && a(n)];
+ }(((n) => {
+ let i = n.loaded, a = n.lengthComputable ? n.total : void 0, s = i - r, l = o(s);
+ r = i, e({
+ loaded: i,
+ total: a,
+ progress: a ? i / a : void 0,
+ bytes: s,
+ rate: l || void 0,
+ estimated: l && a && i <= a ? (a - i) / l : void 0,
+ event: n,
+ lengthComputable: a != null,
+ [t ? "download" : "upload"]: !0
+ });
+ }), n);
+}, Vb = (e, t) => {
+ let n = e != null;
+ return [(r) => t[0]({
+ lengthComputable: n,
+ total: e,
+ loaded: r
+ }), t[1]];
+}, qb = (e) => (...t) => ob.asap((() => e(...t)));
+var Gb = Ib.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, Ib.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(new URL(Ib.origin), Ib.navigator && /(msie|trident)/i.test(Ib.navigator.userAgent)) : () => !0, Yb = Ib.hasStandardBrowserEnv ? {
+ write(e, t, n, r, o, i) {
+ let a = [e + "=" + encodeURIComponent(t)];
+ ob.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), ob.isString(r) && a.push("path=" + r), ob.isString(o) && a.push("domain=" + o), !0 === i && a.push("secure"), document.cookie = a.join("; ");
+ },
+ read(e) {
+ let t = document.cookie.match(RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
+ return t ? decodeURIComponent(t[3]) : null;
+ },
+ remove(e) {
+ this.write(e, "", Date.now() - 864e5);
+ }
+} : {
+ write() {},
+ read: () => null,
+ remove() {}
+};
+function Zb(e, t, n) {
+ let r = !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
+ return e && (r || n == 0) ? function(e, t) {
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
+ }(e, t) : t;
+}
+const Kb = (e) => e instanceof zb ? { ...e } : e;
+function Xb(e, t) {
+ t ||= {};
+ let n = {};
+ function r(e, t, n, r) {
+ return ob.isPlainObject(e) && ob.isPlainObject(t) ? ob.merge.call({ caseless: r }, e, t) : ob.isPlainObject(t) ? ob.merge({}, t) : ob.isArray(t) ? t.slice() : t;
+ }
+ function o(e, t, n, o) {
+ return ob.isUndefined(t) ? ob.isUndefined(e) ? void 0 : r(void 0, e, 0, o) : r(e, t, 0, o);
+ }
+ function i(e, t) {
+ if (!ob.isUndefined(t)) return r(void 0, t);
+ }
+ function a(e, t) {
+ return ob.isUndefined(t) ? ob.isUndefined(e) ? void 0 : r(void 0, e) : r(void 0, t);
+ }
+ function s(n, o, i) {
+ return i in t ? r(n, o) : i in e ? r(void 0, n) : void 0;
+ }
+ let l = {
+ url: i,
+ method: i,
+ data: i,
+ baseURL: a,
+ transformRequest: a,
+ transformResponse: a,
+ paramsSerializer: a,
+ timeout: a,
+ timeoutMessage: a,
+ withCredentials: a,
+ withXSRFToken: a,
+ adapter: a,
+ responseType: a,
+ xsrfCookieName: a,
+ xsrfHeaderName: a,
+ onUploadProgress: a,
+ onDownloadProgress: a,
+ decompress: a,
+ maxContentLength: a,
+ maxBodyLength: a,
+ beforeRedirect: a,
+ transport: a,
+ httpAgent: a,
+ httpsAgent: a,
+ cancelToken: a,
+ socketPath: a,
+ responseEncoding: a,
+ validateStatus: s,
+ headers: (e, t, n) => o(Kb(e), Kb(t), 0, !0)
+ };
+ return ob.forEach(Object.keys(Object.assign({}, e, t)), (function(r) {
+ let i = l[r] || o, a = i(e[r], t[r], r);
+ ob.isUndefined(a) && i !== s || (n[r] = a);
+ })), n;
+}
+var Jb = (e) => {
+ let t = Xb({}, e), n, { data: r, withXSRFToken: o, xsrfHeaderName: i, xsrfCookieName: a, headers: s, auth: l } = t;
+ if (t.headers = s = zb.from(s), t.url = bb(Zb(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && s.set("Authorization", "Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))), ob.isFormData(r)) {
+ if (Ib.hasStandardBrowserEnv || Ib.hasStandardBrowserWebWorkerEnv) s.setContentType(void 0);
+ else if (!1 !== (n = s.getContentType())) {
+ let [e, ...t] = n ? n.split(";").map(((e) => e.trim())).filter(Boolean) : [];
+ s.setContentType([e || "multipart/form-data", ...t].join("; "));
+ }
+ }
+ if (Ib.hasStandardBrowserEnv && (o && ob.isFunction(o) && (o = o(t)), o || !1 !== o && Gb(t.url))) {
+ let e = i && a && Yb.read(a);
+ e && s.set(i, e);
+ }
+ return t;
+}, Qb = typeof XMLHttpRequest < "u" && function(e) {
+ return new Promise((function(t, n) {
+ let r = Jb(e), o = r.data, i = zb.from(r.headers).normalize(), a, s, l, c, u, { responseType: d, onUploadProgress: f, onDownloadProgress: p } = r;
+ function h() {
+ c && c(), u && u(), r.cancelToken && r.cancelToken.unsubscribe(a), r.signal && r.signal.removeEventListener("abort", a);
+ }
+ let g = new XMLHttpRequest();
+ function m() {
+ if (!g) return;
+ let r = zb.from("getAllResponseHeaders" in g && g.getAllResponseHeaders());
+ Hb((function(e) {
+ t(e), h();
+ }), (function(e) {
+ n(e), h();
+ }), {
+ data: d && d !== "text" && d !== "json" ? g.response : g.responseText,
+ status: g.status,
+ statusText: g.statusText,
+ headers: r,
+ config: e,
+ request: g
+ }), g = null;
+ }
+ g.open(r.method.toUpperCase(), r.url, !0), g.timeout = r.timeout, "onloadend" in g ? g.onloadend = m : g.onreadystatechange = function() {
+ g && g.readyState === 4 && (g.status !== 0 || g.responseURL && g.responseURL.indexOf("file:") === 0) && setTimeout(m);
+ }, g.onabort = function() {
+ g &&= (n(new lb("Request aborted", lb.ECONNABORTED, e, g)), null);
+ }, g.onerror = function() {
+ n(new lb("Network Error", lb.ERR_NETWORK, e, g)), g = null;
+ }, g.ontimeout = function() {
+ let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", o = r.transitional || xb;
+ r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new lb(t, o.clarifyTimeoutError ? lb.ETIMEDOUT : lb.ECONNABORTED, e, g)), g = null;
+ }, o === void 0 && i.setContentType(null), "setRequestHeader" in g && ob.forEach(i.toJSON(), (function(e, t) {
+ g.setRequestHeader(t, e);
+ })), ob.isUndefined(r.withCredentials) || (g.withCredentials = !!r.withCredentials), d && d !== "json" && (g.responseType = r.responseType), p && ([l, u] = Wb(p, !0), g.addEventListener("progress", l)), f && g.upload && ([s, c] = Wb(f), g.upload.addEventListener("progress", s), g.upload.addEventListener("loadend", c)), (r.cancelToken || r.signal) && (a = (t) => {
+ g &&= (n(!t || t.type ? new Ub(null, e, g) : t), g.abort(), null);
+ }, r.cancelToken && r.cancelToken.subscribe(a), r.signal && (r.signal.aborted ? a() : r.signal.addEventListener("abort", a)));
+ let v = function(e) {
+ let t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
+ return t && t[1] || "";
+ }(r.url);
+ v && Ib.protocols.indexOf(v) === -1 ? n(new lb("Unsupported protocol " + v + ":", lb.ERR_BAD_REQUEST, e)) : g.send(o || null);
+ }));
+}, ew = (e, t) => {
+ let { length: n } = e = e ? e.filter(Boolean) : [];
+ if (t || n) {
+ let n, r = new AbortController(), o = function(e) {
+ if (!n) {
+ n = !0, a();
+ let t = e instanceof Error ? e : this.reason;
+ r.abort(t instanceof lb ? t : new Ub(t instanceof Error ? t.message : t));
+ }
+ }, i = t && setTimeout((() => {
+ i = null, o(new lb(`timeout ${t} of ms exceeded`, lb.ETIMEDOUT));
+ }), t), a = () => {
+ e &&= (i && clearTimeout(i), i = null, e.forEach(((e) => {
+ e.unsubscribe ? e.unsubscribe(o) : e.removeEventListener("abort", o);
+ })), null);
+ };
+ e.forEach(((e) => e.addEventListener("abort", o)));
+ let { signal: s } = r;
+ return s.unsubscribe = () => ob.asap(a), s;
+ }
+};
+const tw = function* (e, t) {
+ let n = e.byteLength;
+ if (!t || n < t) return void (yield e);
+ let r, o = 0;
+ for (; o < n;) r = o + t, yield e.slice(o, r), o = r;
+}, nw = (e, t, n, r) => {
+ let o = async function* (e, t) {
+ for await (let n of async function* (e) {
+ if (e[Symbol.asyncIterator]) return void (yield* e);
+ let t = e.getReader();
+ try {
+ for (;;) {
+ let { done: e, value: n } = await t.read();
+ if (e) break;
+ yield n;
+ }
+ } finally {
+ await t.cancel();
+ }
+ }(e)) yield* tw(n, t);
+ }(e, t), i, a = 0, s = (e) => {
+ i || (i = !0, r && r(e));
+ };
+ return new ReadableStream({
+ async pull(e) {
+ try {
+ let { done: t, value: r } = await o.next();
+ if (t) return s(), void e.close();
+ let i = r.byteLength;
+ n && n(a += i), e.enqueue(new Uint8Array(r));
+ } catch (e) {
+ throw s(e), e;
+ }
+ },
+ cancel: (e) => (s(e), o.return())
+ }, { highWaterMark: 2 });
+}, rw = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", ow = rw && typeof ReadableStream == "function", iw = rw && (typeof TextEncoder == "function" ? (aw = new TextEncoder(), (e) => aw.encode(e)) : async (e) => new Uint8Array(await new Response(e).arrayBuffer()));
+var aw;
+const sw = (e, ...t) => {
+ try {
+ return !!e(...t);
+ } catch {
+ return !1;
+ }
+}, lw = ow && sw((() => {
+ let e = !1, t = new Request(Ib.origin, {
+ body: new ReadableStream(),
+ method: "POST",
+ get duplex() {
+ return e = !0, "half";
+ }
+ }).headers.has("Content-Type");
+ return e && !t;
+})), cw = ow && sw((() => ob.isReadableStream(new Response("").body))), uw = { stream: cw && ((e) => e.body) };
+var dw;
+rw && (dw = new Response(), [
+ "text",
+ "arrayBuffer",
+ "blob",
+ "formData",
+ "stream"
+].forEach(((e) => {
+ !uw[e] && (uw[e] = ob.isFunction(dw[e]) ? (t) => t[e]() : (t, n) => {
+ throw new lb(`Response type '${e}' is not supported`, lb.ERR_NOT_SUPPORT, n);
+ });
+})));
+const pw = {
+ http: null,
+ xhr: Qb,
+ fetch: rw && (async (e) => {
+ let { url: t, method: n, data: r, signal: o, cancelToken: i, timeout: a, onDownloadProgress: s, onUploadProgress: l, responseType: c, headers: u, withCredentials: d = "same-origin", fetchOptions: f } = Jb(e);
+ c = c ? (c + "").toLowerCase() : "text";
+ let p, h = ew([o, i && i.toAbortSignal()], a), g = h && h.unsubscribe && (() => {
+ h.unsubscribe();
+ }), m;
+ try {
+ if (l && lw && n !== "get" && n !== "head" && (m = await (async (e, t) => ob.toFiniteNumber(e.getContentLength()) ?? (async (e) => e == null ? 0 : ob.isBlob(e) ? e.size : ob.isSpecCompliantForm(e) ? (await new Request(Ib.origin, {
+ method: "POST",
+ body: e
+ }).arrayBuffer()).byteLength : ob.isArrayBufferView(e) || ob.isArrayBuffer(e) ? e.byteLength : (ob.isURLSearchParams(e) && (e += ""), ob.isString(e) ? (await iw(e)).byteLength : void 0))(t))(u, r)) !== 0) {
+ let e, n = new Request(t, {
+ method: "POST",
+ body: r,
+ duplex: "half"
+ });
+ if (ob.isFormData(r) && (e = n.headers.get("content-type")) && u.setContentType(e), n.body) {
+ let [e, t] = Vb(m, Wb(qb(l)));
+ r = nw(n.body, 65536, e, t);
+ }
+ }
+ ob.isString(d) || (d = d ? "include" : "omit");
+ let o = "credentials" in Request.prototype;
+ p = new Request(t, {
+ ...f,
+ signal: h,
+ method: n.toUpperCase(),
+ headers: u.normalize().toJSON(),
+ body: r,
+ duplex: "half",
+ credentials: o ? d : void 0
+ });
+ let i = await fetch(p, f), a = cw && (c === "stream" || c === "response");
+ if (cw && (s || a && g)) {
+ let e = {};
+ [
+ "status",
+ "statusText",
+ "headers"
+ ].forEach(((t) => {
+ e[t] = i[t];
+ }));
+ let t = ob.toFiniteNumber(i.headers.get("content-length")), [n, r] = s && Vb(t, Wb(qb(s), !0)) || [];
+ i = new Response(nw(i.body, 65536, n, (() => {
+ r && r(), g && g();
+ })), e);
+ }
+ c ||= "text";
+ let v = await uw[ob.findKey(uw, c) || "text"](i, e);
+ return !a && g && g(), await new Promise(((t, n) => {
+ Hb(t, n, {
+ data: v,
+ headers: zb.from(i.headers),
+ status: i.status,
+ statusText: i.statusText,
+ config: e,
+ request: p
+ });
+ }));
+ } catch (t) {
+ throw g && g(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new lb("Network Error", lb.ERR_NETWORK, e, p), { cause: t.cause || t }) : lb.from(t, t && t.code, e, p);
+ }
+ })
+};
+ob.forEach(pw, ((e, t) => {
+ if (e) {
+ try {
+ Object.defineProperty(e, "name", { value: t });
+ } catch {}
+ Object.defineProperty(e, "adapterName", { value: t });
+ }
+}));
+const hw = (e) => `- ${e}`, gw = (e) => ob.isFunction(e) || e === null || !1 === e;
+var mw = (e) => {
+ e = ob.isArray(e) ? e : [e];
+ let { length: t } = e, n, r, o = {};
+ for (let i = 0; i < t; i++) {
+ let t;
+ if (n = e[i], r = n, !gw(n) && (r = pw[(t = String(n)).toLowerCase()], r === void 0)) throw new lb(`Unknown adapter '${t}'`);
+ if (r) break;
+ o[t || "#" + i] = r;
+ }
+ if (!r) {
+ let e = Object.entries(o).map((([e, t]) => `adapter ${e} ` + (!1 === t ? "is not supported by the environment" : "is not available in the build")));
+ throw new lb("There is no suitable adapter to dispatch the request " + (t ? e.length > 1 ? "since :\n" + e.map(hw).join("\n") : " " + hw(e[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
+ }
+ return r;
+};
+function vw(e) {
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Ub(null, e);
+}
+function yw(e) {
+ return vw(e), e.headers = zb.from(e.headers), e.data = $b.call(e, e.transformRequest), [
+ "post",
+ "put",
+ "patch"
+ ].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), mw(e.adapter || Pb.adapter)(e).then((function(t) {
+ return vw(e), t.data = $b.call(e, e.transformResponse, t), t.headers = zb.from(t.headers), t;
+ }), (function(t) {
+ return Bb(t) || (vw(e), t && t.response && (t.response.data = $b.call(e, e.transformResponse, t.response), t.response.headers = zb.from(t.response.headers))), Promise.reject(t);
+ }));
+}
+const ww = {};
+[
+ "object",
+ "boolean",
+ "number",
+ "function",
+ "string",
+ "symbol"
+].forEach(((e, t) => {
+ ww[e] = function(n) {
+ return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
+ };
+}));
+const xw = {};
+ww.transitional = function(e, t, n) {
+ function r(e, t) {
+ return "[Axios v1.10.0] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
+ }
+ return (n, o, i) => {
+ if (!1 === e) throw new lb(r(o, " has been removed" + (t ? " in " + t : "")), lb.ERR_DEPRECATED);
+ return t && !xw[o] && (xw[o] = !0, console.warn(r(o, " has been deprecated since v" + t + " and will be removed in the near future"))), !e || e(n, o, i);
+ };
+}, ww.spelling = function(e) {
+ return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
+};
+var Ew = {
+ assertOptions: function(e, t, n) {
+ if (typeof e != "object") throw new lb("options must be an object", lb.ERR_BAD_OPTION_VALUE);
+ let r = Object.keys(e), o = r.length;
+ for (; o-- > 0;) {
+ let i = r[o], a = t[i];
+ if (a) {
+ let t = e[i], n = t === void 0 || a(t, i, e);
+ if (!0 !== n) throw new lb("option " + i + " must be " + n, lb.ERR_BAD_OPTION_VALUE);
+ } else if (!0 !== n) throw new lb("Unknown option " + i, lb.ERR_BAD_OPTION);
+ }
+ },
+ validators: ww
+};
+const Sw = Ew.validators;
+var Cw = class {
+ constructor(e) {
+ this.defaults = e || {}, this.interceptors = {
+ request: new wb(),
+ response: new wb()
+ };
+ }
+ async request(e, t) {
+ try {
+ return await this._request(e, t);
+ } catch (e) {
+ if (e instanceof Error) {
+ let t = {};
+ Error.captureStackTrace ? Error.captureStackTrace(t) : t = /* @__PURE__ */ Error();
+ let n = t.stack ? t.stack.replace(/^.+\n/, "") : "";
+ try {
+ e.stack ? n && !String(e.stack).endsWith(n.replace(/^.+\n.+\n/, "")) && (e.stack += "\n" + n) : e.stack = n;
+ } catch {}
+ }
+ throw e;
+ }
+ }
+ _request(e, t) {
+ typeof e == "string" ? (t ||= {}).url = e : t = e || {}, t = Xb(this.defaults, t);
+ let { transitional: n, paramsSerializer: r, headers: o } = t;
+ n !== void 0 && Ew.assertOptions(n, {
+ silentJSONParsing: Sw.transitional(Sw.boolean),
+ forcedJSONParsing: Sw.transitional(Sw.boolean),
+ clarifyTimeoutError: Sw.transitional(Sw.boolean)
+ }, !1), r != null && (ob.isFunction(r) ? t.paramsSerializer = { serialize: r } : Ew.assertOptions(r, {
+ encode: Sw.function,
+ serialize: Sw.function
+ }, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls), Ew.assertOptions(t, {
+ baseUrl: Sw.spelling("baseURL"),
+ withXsrfToken: Sw.spelling("withXSRFToken")
+ }, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
+ let i = o && ob.merge(o.common, o[t.method]);
+ o && ob.forEach([
+ "delete",
+ "get",
+ "head",
+ "post",
+ "put",
+ "patch",
+ "common"
+ ], ((e) => {
+ delete o[e];
+ })), t.headers = zb.concat(i, o);
+ let a = [], s = !0;
+ this.interceptors.request.forEach((function(e) {
+ typeof e.runWhen == "function" && !1 === e.runWhen(t) || (s &&= e.synchronous, a.unshift(e.fulfilled, e.rejected));
+ }));
+ let l = [], c;
+ this.interceptors.response.forEach((function(e) {
+ l.push(e.fulfilled, e.rejected);
+ }));
+ let u, d = 0;
+ if (!s) {
+ let e = [yw.bind(this), void 0];
+ for (e.unshift.apply(e, a), e.push.apply(e, l), u = e.length, c = Promise.resolve(t); d < u;) c = c.then(e[d++], e[d++]);
+ return c;
+ }
+ u = a.length;
+ let f = t;
+ for (d = 0; d < u;) {
+ let e = a[d++], t = a[d++];
+ try {
+ f = e(f);
+ } catch (e) {
+ t.call(this, e);
+ break;
+ }
+ }
+ try {
+ c = yw.call(this, f);
+ } catch (e) {
+ return Promise.reject(e);
+ }
+ for (d = 0, u = l.length; d < u;) c = c.then(l[d++], l[d++]);
+ return c;
+ }
+ getUri(e) {
+ return bb(Zb((e = Xb(this.defaults, e)).baseURL, e.url, e.allowAbsoluteUrls), e.params, e.paramsSerializer);
+ }
+};
+ob.forEach([
+ "delete",
+ "get",
+ "head",
+ "options"
+], (function(e) {
+ Cw.prototype[e] = function(t, n) {
+ return this.request(Xb(n || {}, {
+ method: e,
+ url: t,
+ data: (n || {}).data
+ }));
+ };
+})), ob.forEach([
+ "post",
+ "put",
+ "patch"
+], (function(e) {
+ function t(t) {
+ return function(n, r, o) {
+ return this.request(Xb(o || {}, {
+ method: e,
+ headers: t ? { "Content-Type": "multipart/form-data" } : {},
+ url: n,
+ data: r
+ }));
+ };
+ }
+ Cw.prototype[e] = t(), Cw.prototype[e + "Form"] = t(!0);
+}));
+var kw = Cw, Tw = class _w {
+ constructor(e) {
+ if (typeof e != "function") throw TypeError("executor must be a function.");
+ let t;
+ this.promise = new Promise((function(e) {
+ t = e;
+ }));
+ let n = this;
+ this.promise.then(((e) => {
+ if (!n._listeners) return;
+ let t = n._listeners.length;
+ for (; t-- > 0;) n._listeners[t](e);
+ n._listeners = null;
+ })), this.promise.then = (e) => {
+ let t, r = new Promise(((e) => {
+ n.subscribe(e), t = e;
+ })).then(e);
+ return r.cancel = function() {
+ n.unsubscribe(t);
+ }, r;
+ }, e((function(e, r, o) {
+ n.reason || (n.reason = new Ub(e, r, o), t(n.reason));
+ }));
+ }
+ throwIfRequested() {
+ if (this.reason) throw this.reason;
+ }
+ subscribe(e) {
+ this.reason ? e(this.reason) : this._listeners ? this._listeners.push(e) : this._listeners = [e];
+ }
+ unsubscribe(e) {
+ if (!this._listeners) return;
+ let t = this._listeners.indexOf(e);
+ t !== -1 && this._listeners.splice(t, 1);
+ }
+ toAbortSignal() {
+ let e = new AbortController(), t = (t) => {
+ e.abort(t);
+ };
+ return this.subscribe(t), e.signal.unsubscribe = () => this.unsubscribe(t), e.signal;
+ }
+ static source() {
+ let e;
+ return {
+ token: new _w((function(t) {
+ e = t;
+ })),
+ cancel: e
+ };
+ }
+};
+const Iw = {
+ Continue: 100,
+ SwitchingProtocols: 101,
+ Processing: 102,
+ EarlyHints: 103,
+ Ok: 200,
+ Created: 201,
+ Accepted: 202,
+ NonAuthoritativeInformation: 203,
+ NoContent: 204,
+ ResetContent: 205,
+ PartialContent: 206,
+ MultiStatus: 207,
+ AlreadyReported: 208,
+ ImUsed: 226,
+ MultipleChoices: 300,
+ MovedPermanently: 301,
+ Found: 302,
+ SeeOther: 303,
+ NotModified: 304,
+ UseProxy: 305,
+ Unused: 306,
+ TemporaryRedirect: 307,
+ PermanentRedirect: 308,
+ BadRequest: 400,
+ Unauthorized: 401,
+ PaymentRequired: 402,
+ Forbidden: 403,
+ NotFound: 404,
+ MethodNotAllowed: 405,
+ NotAcceptable: 406,
+ ProxyAuthenticationRequired: 407,
+ RequestTimeout: 408,
+ Conflict: 409,
+ Gone: 410,
+ LengthRequired: 411,
+ PreconditionFailed: 412,
+ PayloadTooLarge: 413,
+ UriTooLong: 414,
+ UnsupportedMediaType: 415,
+ RangeNotSatisfiable: 416,
+ ExpectationFailed: 417,
+ ImATeapot: 418,
+ MisdirectedRequest: 421,
+ UnprocessableEntity: 422,
+ Locked: 423,
+ FailedDependency: 424,
+ TooEarly: 425,
+ UpgradeRequired: 426,
+ PreconditionRequired: 428,
+ TooManyRequests: 429,
+ RequestHeaderFieldsTooLarge: 431,
+ UnavailableForLegalReasons: 451,
+ InternalServerError: 500,
+ NotImplemented: 501,
+ BadGateway: 502,
+ ServiceUnavailable: 503,
+ GatewayTimeout: 504,
+ HttpVersionNotSupported: 505,
+ VariantAlsoNegotiates: 506,
+ InsufficientStorage: 507,
+ LoopDetected: 508,
+ NotExtended: 510,
+ NetworkAuthenticationRequired: 511
+};
+Object.entries(Iw).forEach((([e, t]) => {
+ Iw[t] = e;
+}));
+var Ow = Iw;
+const jw = function e(t) {
+ let n = new kw(t), r = yy(kw.prototype.request, n);
+ return ob.extend(r, kw.prototype, n, { allOwnKeys: !0 }), ob.extend(r, n, null, { allOwnKeys: !0 }), r.create = function(n) {
+ return e(Xb(t, n));
+ }, r;
+}(Pb);
+jw.Axios = kw, jw.CanceledError = Ub, jw.CancelToken = Tw, jw.isCancel = Bb, jw.VERSION = "1.10.0", jw.toFormData = pb, jw.AxiosError = lb, jw.Cancel = jw.CanceledError, jw.all = function(e) {
+ return Promise.all(e);
+}, jw.spread = function(e) {
+ return function(t) {
+ return e.apply(null, t);
+ };
+}, jw.isAxiosError = function(e) {
+ return ob.isObject(e) && !0 === e.isAxiosError;
+}, jw.mergeConfig = Xb, jw.AxiosHeaders = zb, jw.formToJSON = (e) => Ob(ob.isHTMLForm(e) ? new FormData(e) : e), jw.getAdapter = mw, jw.HttpStatusCode = Ow, jw.default = jw;
+var Pw = jw;
+function Aw(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: { d: "M12 22L8 18H16L12 22ZM12 2L16 6H8L12 2ZM12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12C14 13.1046 13.1046 14 12 14ZM2 12L6 8V16L2 12ZM22 12L18 16V8L22 12Z" }
+ }]
+ })(e);
+}
+function Nw(e) {
+ return Nw = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
+ return typeof e;
+ } : function(e) {
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
+ }, Nw(e);
+}
+function Mw(e, t) {
+ if (t.length < e) throw TypeError(e + " argument" + (e > 1 ? "s" : "") + " required, but only " + t.length + " present");
+}
+function Lw(e) {
+ Mw(1, arguments);
+ var t = Object.prototype.toString.call(e);
+ return e instanceof Date || Nw(e) === "object" && t === "[object Date]" ? new Date(e.getTime()) : typeof e == "number" || t === "[object Number]" ? new Date(e) : (typeof e != "string" && t !== "[object String]" || typeof console > "u" || (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"), console.warn((/* @__PURE__ */ Error()).stack)), /* @__PURE__ */ new Date(NaN));
+}
+function Dw(e) {
+ if (e === null || !0 === e || !1 === e) return NaN;
+ var t = Number(e);
+ return isNaN(t) ? t : t < 0 ? Math.ceil(t) : Math.floor(t);
+}
+function Rw(e) {
+ Mw(1, arguments);
+ var t = Lw(e), n = t.getUTCDay(), r = (n < 1 ? 7 : 0) + n - 1;
+ return t.setUTCDate(t.getUTCDate() - r), t.setUTCHours(0, 0, 0, 0), t;
+}
+function zw(e) {
+ Mw(1, arguments);
+ var t = Lw(e), n = t.getUTCFullYear(), r = /* @__PURE__ */ new Date(0);
+ r.setUTCFullYear(n + 1, 0, 4), r.setUTCHours(0, 0, 0, 0);
+ var o = Rw(r), i = /* @__PURE__ */ new Date(0);
+ i.setUTCFullYear(n, 0, 4), i.setUTCHours(0, 0, 0, 0);
+ var a = Rw(i);
+ return t.getTime() >= o.getTime() ? n + 1 : t.getTime() >= a.getTime() ? n : n - 1;
+}
+var $w = {};
+function Bw() {
+ return $w;
+}
+function Fw(e, t) {
+ var a, s, l, c;
+ Mw(1, arguments);
+ var u = Bw(), d = Dw(t?.weekStartsOn ?? (t == null || (a = t.locale) == null || (s = a.options) == null ? void 0 : s.weekStartsOn) ?? u.weekStartsOn ?? ((l = u.locale) == null || (c = l.options) == null ? void 0 : c.weekStartsOn) ?? 0);
+ if (!(d >= 0 && d <= 6)) throw RangeError("weekStartsOn must be between 0 and 6 inclusively");
+ var f = Lw(e), p = f.getUTCDay(), h = (p < d ? 7 : 0) + p - d;
+ return f.setUTCDate(f.getUTCDate() - h), f.setUTCHours(0, 0, 0, 0), f;
+}
+function Uw(e, t) {
+ var a, s, l, c;
+ Mw(1, arguments);
+ var u = Lw(e), d = u.getUTCFullYear(), f = Bw(), p = Dw(t?.firstWeekContainsDate ?? (t == null || (a = t.locale) == null || (s = a.options) == null ? void 0 : s.firstWeekContainsDate) ?? f.firstWeekContainsDate ?? ((l = f.locale) == null || (c = l.options) == null ? void 0 : c.firstWeekContainsDate) ?? 1);
+ if (!(p >= 1 && p <= 7)) throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
+ var h = /* @__PURE__ */ new Date(0);
+ h.setUTCFullYear(d + 1, 0, p), h.setUTCHours(0, 0, 0, 0);
+ var g = Fw(h, t), m = /* @__PURE__ */ new Date(0);
+ m.setUTCFullYear(d, 0, p), m.setUTCHours(0, 0, 0, 0);
+ var v = Fw(m, t);
+ return u.getTime() >= g.getTime() ? d + 1 : u.getTime() >= v.getTime() ? d : d - 1;
+}
+function Hw(e, t) {
+ for (var n = e < 0 ? "-" : "", r = Math.abs(e).toString(); r.length < t;) r = "0" + r;
+ return n + r;
+}
+var Vw = {
+ y: function(e, t) {
+ var n = e.getUTCFullYear(), r = n > 0 ? n : 1 - n;
+ return Hw(t === "yy" ? r % 100 : r, t.length);
+ },
+ M: function(e, t) {
+ var n = e.getUTCMonth();
+ return t === "M" ? String(n + 1) : Hw(n + 1, 2);
+ },
+ d: function(e, t) {
+ return Hw(e.getUTCDate(), t.length);
+ },
+ a: function(e, t) {
+ var n = e.getUTCHours() / 12 >= 1 ? "pm" : "am";
+ switch (t) {
+ case "a":
+ case "aa": return n.toUpperCase();
+ case "aaa": return n;
+ case "aaaaa": return n[0];
+ default: return n === "am" ? "a.m." : "p.m.";
+ }
+ },
+ h: function(e, t) {
+ return Hw(e.getUTCHours() % 12 || 12, t.length);
+ },
+ H: function(e, t) {
+ return Hw(e.getUTCHours(), t.length);
+ },
+ m: function(e, t) {
+ return Hw(e.getUTCMinutes(), t.length);
+ },
+ s: function(e, t) {
+ return Hw(e.getUTCSeconds(), t.length);
+ },
+ S: function(e, t) {
+ var n = t.length, r = e.getUTCMilliseconds();
+ return Hw(Math.floor(r * 10 ** (n - 3)), t.length);
+ }
+}, qw = {
+ G: function(e, t, n) {
+ var r = +(e.getUTCFullYear() > 0);
+ switch (t) {
+ case "G":
+ case "GG":
+ case "GGG": return n.era(r, { width: "abbreviated" });
+ case "GGGGG": return n.era(r, { width: "narrow" });
+ default: return n.era(r, { width: "wide" });
+ }
+ },
+ y: function(e, t, n) {
+ if (t === "yo") {
+ var r = e.getUTCFullYear(), o = r > 0 ? r : 1 - r;
+ return n.ordinalNumber(o, { unit: "year" });
+ }
+ return Vw.y(e, t);
+ },
+ Y: function(e, t, n, r) {
+ var o = Uw(e, r), i = o > 0 ? o : 1 - o;
+ return t === "YY" ? Hw(i % 100, 2) : t === "Yo" ? n.ordinalNumber(i, { unit: "year" }) : Hw(i, t.length);
+ },
+ R: function(e, t) {
+ return Hw(zw(e), t.length);
+ },
+ u: function(e, t) {
+ return Hw(e.getUTCFullYear(), t.length);
+ },
+ Q: function(e, t, n) {
+ var r = Math.ceil((e.getUTCMonth() + 1) / 3);
+ switch (t) {
+ case "Q": return String(r);
+ case "QQ": return Hw(r, 2);
+ case "Qo": return n.ordinalNumber(r, { unit: "quarter" });
+ case "QQQ": return n.quarter(r, {
+ width: "abbreviated",
+ context: "formatting"
+ });
+ case "QQQQQ": return n.quarter(r, {
+ width: "narrow",
+ context: "formatting"
+ });
+ default: return n.quarter(r, {
+ width: "wide",
+ context: "formatting"
+ });
+ }
+ },
+ q: function(e, t, n) {
+ var r = Math.ceil((e.getUTCMonth() + 1) / 3);
+ switch (t) {
+ case "q": return String(r);
+ case "qq": return Hw(r, 2);
+ case "qo": return n.ordinalNumber(r, { unit: "quarter" });
+ case "qqq": return n.quarter(r, {
+ width: "abbreviated",
+ context: "standalone"
+ });
+ case "qqqqq": return n.quarter(r, {
+ width: "narrow",
+ context: "standalone"
+ });
+ default: return n.quarter(r, {
+ width: "wide",
+ context: "standalone"
+ });
+ }
+ },
+ M: function(e, t, n) {
+ var r = e.getUTCMonth();
+ switch (t) {
+ case "M":
+ case "MM": return Vw.M(e, t);
+ case "Mo": return n.ordinalNumber(r + 1, { unit: "month" });
+ case "MMM": return n.month(r, {
+ width: "abbreviated",
+ context: "formatting"
+ });
+ case "MMMMM": return n.month(r, {
+ width: "narrow",
+ context: "formatting"
+ });
+ default: return n.month(r, {
+ width: "wide",
+ context: "formatting"
+ });
+ }
+ },
+ L: function(e, t, n) {
+ var r = e.getUTCMonth();
+ switch (t) {
+ case "L": return String(r + 1);
+ case "LL": return Hw(r + 1, 2);
+ case "Lo": return n.ordinalNumber(r + 1, { unit: "month" });
+ case "LLL": return n.month(r, {
+ width: "abbreviated",
+ context: "standalone"
+ });
+ case "LLLLL": return n.month(r, {
+ width: "narrow",
+ context: "standalone"
+ });
+ default: return n.month(r, {
+ width: "wide",
+ context: "standalone"
+ });
+ }
+ },
+ w: function(e, t, n, r) {
+ var o = function(e, t) {
+ Mw(1, arguments);
+ var n = Lw(e), r = Fw(n, t).getTime() - function(e, t) {
+ var a, s, l, c;
+ Mw(1, arguments);
+ var u = Bw(), d = Dw(t?.firstWeekContainsDate ?? (t == null || (a = t.locale) == null || (s = a.options) == null ? void 0 : s.firstWeekContainsDate) ?? u.firstWeekContainsDate ?? ((l = u.locale) == null || (c = l.options) == null ? void 0 : c.firstWeekContainsDate) ?? 1), f = Uw(e, t), p = /* @__PURE__ */ new Date(0);
+ return p.setUTCFullYear(f, 0, d), p.setUTCHours(0, 0, 0, 0), Fw(p, t);
+ }(n, t).getTime();
+ return Math.round(r / 6048e5) + 1;
+ }(e, r);
+ return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : Hw(o, t.length);
+ },
+ I: function(e, t, n) {
+ var r = function(e) {
+ Mw(1, arguments);
+ var t = Lw(e), n = Rw(t).getTime() - function(e) {
+ Mw(1, arguments);
+ var t = zw(e), n = /* @__PURE__ */ new Date(0);
+ return n.setUTCFullYear(t, 0, 4), n.setUTCHours(0, 0, 0, 0), Rw(n);
+ }(t).getTime();
+ return Math.round(n / 6048e5) + 1;
+ }(e);
+ return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : Hw(r, t.length);
+ },
+ d: function(e, t, n) {
+ return t === "do" ? n.ordinalNumber(e.getUTCDate(), { unit: "date" }) : Vw.d(e, t);
+ },
+ D: function(e, t, n) {
+ var r = function(e) {
+ Mw(1, arguments);
+ var t = Lw(e), n = t.getTime();
+ t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
+ var r = n - t.getTime();
+ return Math.floor(r / 864e5) + 1;
+ }(e);
+ return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : Hw(r, t.length);
+ },
+ E: function(e, t, n) {
+ var r = e.getUTCDay();
+ switch (t) {
+ case "E":
+ case "EE":
+ case "EEE": return n.day(r, {
+ width: "abbreviated",
+ context: "formatting"
+ });
+ case "EEEEE": return n.day(r, {
+ width: "narrow",
+ context: "formatting"
+ });
+ case "EEEEEE": return n.day(r, {
+ width: "short",
+ context: "formatting"
+ });
+ default: return n.day(r, {
+ width: "wide",
+ context: "formatting"
+ });
+ }
+ },
+ e: function(e, t, n, r) {
+ var o = e.getUTCDay(), i = (o - r.weekStartsOn + 8) % 7 || 7;
+ switch (t) {
+ case "e": return String(i);
+ case "ee": return Hw(i, 2);
+ case "eo": return n.ordinalNumber(i, { unit: "day" });
+ case "eee": return n.day(o, {
+ width: "abbreviated",
+ context: "formatting"
+ });
+ case "eeeee": return n.day(o, {
+ width: "narrow",
+ context: "formatting"
+ });
+ case "eeeeee": return n.day(o, {
+ width: "short",
+ context: "formatting"
+ });
+ default: return n.day(o, {
+ width: "wide",
+ context: "formatting"
+ });
+ }
+ },
+ c: function(e, t, n, r) {
+ var o = e.getUTCDay(), i = (o - r.weekStartsOn + 8) % 7 || 7;
+ switch (t) {
+ case "c": return String(i);
+ case "cc": return Hw(i, t.length);
+ case "co": return n.ordinalNumber(i, { unit: "day" });
+ case "ccc": return n.day(o, {
+ width: "abbreviated",
+ context: "standalone"
+ });
+ case "ccccc": return n.day(o, {
+ width: "narrow",
+ context: "standalone"
+ });
+ case "cccccc": return n.day(o, {
+ width: "short",
+ context: "standalone"
+ });
+ default: return n.day(o, {
+ width: "wide",
+ context: "standalone"
+ });
+ }
+ },
+ i: function(e, t, n) {
+ var r = e.getUTCDay(), o = r === 0 ? 7 : r;
+ switch (t) {
+ case "i": return String(o);
+ case "ii": return Hw(o, t.length);
+ case "io": return n.ordinalNumber(o, { unit: "day" });
+ case "iii": return n.day(r, {
+ width: "abbreviated",
+ context: "formatting"
+ });
+ case "iiiii": return n.day(r, {
+ width: "narrow",
+ context: "formatting"
+ });
+ case "iiiiii": return n.day(r, {
+ width: "short",
+ context: "formatting"
+ });
+ default: return n.day(r, {
+ width: "wide",
+ context: "formatting"
+ });
+ }
+ },
+ a: function(e, t, n) {
+ var r = e.getUTCHours() / 12 >= 1 ? "pm" : "am";
+ switch (t) {
+ case "a":
+ case "aa": return n.dayPeriod(r, {
+ width: "abbreviated",
+ context: "formatting"
+ });
+ case "aaa": return n.dayPeriod(r, {
+ width: "abbreviated",
+ context: "formatting"
+ }).toLowerCase();
+ case "aaaaa": return n.dayPeriod(r, {
+ width: "narrow",
+ context: "formatting"
+ });
+ default: return n.dayPeriod(r, {
+ width: "wide",
+ context: "formatting"
+ });
+ }
+ },
+ b: function(e, t, n) {
+ var r, o = e.getUTCHours();
+ switch (r = o === 12 ? "noon" : o === 0 ? "midnight" : o / 12 >= 1 ? "pm" : "am", t) {
+ case "b":
+ case "bb": return n.dayPeriod(r, {
+ width: "abbreviated",
+ context: "formatting"
+ });
+ case "bbb": return n.dayPeriod(r, {
+ width: "abbreviated",
+ context: "formatting"
+ }).toLowerCase();
+ case "bbbbb": return n.dayPeriod(r, {
+ width: "narrow",
+ context: "formatting"
+ });
+ default: return n.dayPeriod(r, {
+ width: "wide",
+ context: "formatting"
+ });
+ }
+ },
+ B: function(e, t, n) {
+ var r, o = e.getUTCHours();
+ switch (r = o >= 17 ? "evening" : o >= 12 ? "afternoon" : o >= 4 ? "morning" : "night", t) {
+ case "B":
+ case "BB":
+ case "BBB": return n.dayPeriod(r, {
+ width: "abbreviated",
+ context: "formatting"
+ });
+ case "BBBBB": return n.dayPeriod(r, {
+ width: "narrow",
+ context: "formatting"
+ });
+ default: return n.dayPeriod(r, {
+ width: "wide",
+ context: "formatting"
+ });
+ }
+ },
+ h: function(e, t, n) {
+ if (t === "ho") {
+ var r = e.getUTCHours() % 12;
+ return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
+ }
+ return Vw.h(e, t);
+ },
+ H: function(e, t, n) {
+ return t === "Ho" ? n.ordinalNumber(e.getUTCHours(), { unit: "hour" }) : Vw.H(e, t);
+ },
+ K: function(e, t, n) {
+ var r = e.getUTCHours() % 12;
+ return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : Hw(r, t.length);
+ },
+ k: function(e, t, n) {
+ var r = e.getUTCHours();
+ return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : Hw(r, t.length);
+ },
+ m: function(e, t, n) {
+ return t === "mo" ? n.ordinalNumber(e.getUTCMinutes(), { unit: "minute" }) : Vw.m(e, t);
+ },
+ s: function(e, t, n) {
+ return t === "so" ? n.ordinalNumber(e.getUTCSeconds(), { unit: "second" }) : Vw.s(e, t);
+ },
+ S: function(e, t) {
+ return Vw.S(e, t);
+ },
+ X: function(e, t, n, r) {
+ var o = (r._originalDate || e).getTimezoneOffset();
+ if (o === 0) return "Z";
+ switch (t) {
+ case "X": return Yw(o);
+ case "XXXX":
+ case "XX": return Zw(o);
+ default: return Zw(o, ":");
+ }
+ },
+ x: function(e, t, n, r) {
+ var o = (r._originalDate || e).getTimezoneOffset();
+ switch (t) {
+ case "x": return Yw(o);
+ case "xxxx":
+ case "xx": return Zw(o);
+ default: return Zw(o, ":");
+ }
+ },
+ O: function(e, t, n, r) {
+ var o = (r._originalDate || e).getTimezoneOffset();
+ switch (t) {
+ case "O":
+ case "OO":
+ case "OOO": return "GMT" + Gw(o, ":");
+ default: return "GMT" + Zw(o, ":");
+ }
+ },
+ z: function(e, t, n, r) {
+ var o = (r._originalDate || e).getTimezoneOffset();
+ switch (t) {
+ case "z":
+ case "zz":
+ case "zzz": return "GMT" + Gw(o, ":");
+ default: return "GMT" + Zw(o, ":");
+ }
+ },
+ t: function(e, t, n, r) {
+ var o = r._originalDate || e;
+ return Hw(Math.floor(o.getTime() / 1e3), t.length);
+ },
+ T: function(e, t, n, r) {
+ return Hw((r._originalDate || e).getTime(), t.length);
+ }
+};
+function Gw(e, t) {
+ var n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.floor(r / 60), i = r % 60;
+ if (i === 0) return n + String(o);
+ var a = t || "";
+ return n + String(o) + a + Hw(i, 2);
+}
+function Yw(e, t) {
+ return e % 60 == 0 ? (e > 0 ? "-" : "+") + Hw(Math.abs(e) / 60, 2) : Zw(e, t);
+}
+function Zw(e, t) {
+ var n = t || "", r = e > 0 ? "-" : "+", o = Math.abs(e);
+ return r + Hw(Math.floor(o / 60), 2) + n + Hw(o % 60, 2);
+}
+var Kw = qw, Xw = function(e, t) {
+ switch (e) {
+ case "P": return t.date({ width: "short" });
+ case "PP": return t.date({ width: "medium" });
+ case "PPP": return t.date({ width: "long" });
+ default: return t.date({ width: "full" });
+ }
+}, Jw = function(e, t) {
+ switch (e) {
+ case "p": return t.time({ width: "short" });
+ case "pp": return t.time({ width: "medium" });
+ case "ppp": return t.time({ width: "long" });
+ default: return t.time({ width: "full" });
+ }
+}, Qw = {
+ p: Jw,
+ P: function(e, t) {
+ var n, r = e.match(/(P+)(p+)?/) || [], o = r[1], i = r[2];
+ if (!i) return Xw(e, t);
+ switch (o) {
+ case "P":
+ n = t.dateTime({ width: "short" });
+ break;
+ case "PP":
+ n = t.dateTime({ width: "medium" });
+ break;
+ case "PPP":
+ n = t.dateTime({ width: "long" });
+ break;
+ default: n = t.dateTime({ width: "full" });
+ }
+ return n.replace("{{date}}", Xw(o, t)).replace("{{time}}", Jw(i, t));
+ }
+}, ex = ["D", "DD"], tx = ["YY", "YYYY"];
+function nx(e, t, n) {
+ if (e === "YYYY") throw RangeError(`Use \`yyyy\` instead of \`YYYY\` (in \`${t}\`) for formatting years to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);
+ if (e === "YY") throw RangeError(`Use \`yy\` instead of \`YY\` (in \`${t}\`) for formatting years to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);
+ if (e === "D") throw RangeError(`Use \`d\` instead of \`D\` (in \`${t}\`) for formatting days of the month to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);
+ if (e === "DD") throw RangeError(`Use \`dd\` instead of \`DD\` (in \`${t}\`) for formatting days of the month to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);
+}
+var rx = {
+ lessThanXSeconds: {
+ one: "less than a second",
+ other: "less than {{count}} seconds"
+ },
+ xSeconds: {
+ one: "1 second",
+ other: "{{count}} seconds"
+ },
+ halfAMinute: "half a minute",
+ lessThanXMinutes: {
+ one: "less than a minute",
+ other: "less than {{count}} minutes"
+ },
+ xMinutes: {
+ one: "1 minute",
+ other: "{{count}} minutes"
+ },
+ aboutXHours: {
+ one: "about 1 hour",
+ other: "about {{count}} hours"
+ },
+ xHours: {
+ one: "1 hour",
+ other: "{{count}} hours"
+ },
+ xDays: {
+ one: "1 day",
+ other: "{{count}} days"
+ },
+ aboutXWeeks: {
+ one: "about 1 week",
+ other: "about {{count}} weeks"
+ },
+ xWeeks: {
+ one: "1 week",
+ other: "{{count}} weeks"
+ },
+ aboutXMonths: {
+ one: "about 1 month",
+ other: "about {{count}} months"
+ },
+ xMonths: {
+ one: "1 month",
+ other: "{{count}} months"
+ },
+ aboutXYears: {
+ one: "about 1 year",
+ other: "about {{count}} years"
+ },
+ xYears: {
+ one: "1 year",
+ other: "{{count}} years"
+ },
+ overXYears: {
+ one: "over 1 year",
+ other: "over {{count}} years"
+ },
+ almostXYears: {
+ one: "almost 1 year",
+ other: "almost {{count}} years"
+ }
+};
+function ox(e) {
+ return function() {
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = t.width ? String(t.width) : e.defaultWidth;
+ return e.formats[n] || e.formats[e.defaultWidth];
+ };
+}
+var ix = {
+ date: ox({
+ formats: {
+ full: "EEEE, MMMM do, y",
+ long: "MMMM do, y",
+ medium: "MMM d, y",
+ short: "MM/dd/yyyy"
+ },
+ defaultWidth: "full"
+ }),
+ time: ox({
+ formats: {
+ full: "h:mm:ss a zzzz",
+ long: "h:mm:ss a z",
+ medium: "h:mm:ss a",
+ short: "h:mm a"
+ },
+ defaultWidth: "full"
+ }),
+ dateTime: ox({
+ formats: {
+ full: "{{date}} 'at' {{time}}",
+ long: "{{date}} 'at' {{time}}",
+ medium: "{{date}}, {{time}}",
+ short: "{{date}}, {{time}}"
+ },
+ defaultWidth: "full"
+ })
+}, ax = {
+ lastWeek: "'last' eeee 'at' p",
+ yesterday: "'yesterday at' p",
+ today: "'today at' p",
+ tomorrow: "'tomorrow at' p",
+ nextWeek: "eeee 'at' p",
+ other: "P"
+};
+function sx(e) {
+ return function(t, n) {
+ var r;
+ if ((n != null && n.context ? String(n.context) : "standalone") === "formatting" && e.formattingValues) {
+ var o = e.defaultFormattingWidth || e.defaultWidth, i = n != null && n.width ? String(n.width) : o;
+ r = e.formattingValues[i] || e.formattingValues[o];
+ } else {
+ var a = e.defaultWidth, s = n != null && n.width ? String(n.width) : e.defaultWidth;
+ r = e.values[s] || e.values[a];
+ }
+ return r[e.argumentCallback ? e.argumentCallback(t) : t];
+ };
+}
+function lx(e) {
+ return function(t) {
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], i = t.match(o);
+ if (!i) return null;
+ var a, s = i[0], l = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(l) ? function(e) {
+ for (var t = 0; t < e.length; t++) if (e[t].test(s)) return t;
+ }(l) : function(e) {
+ for (var t in e) if (e.hasOwnProperty(t) && e[t].test(s)) return t;
+ }(l);
+ return a = e.valueCallback ? e.valueCallback(c) : c, {
+ value: a = n.valueCallback ? n.valueCallback(a) : a,
+ rest: t.slice(s.length)
+ };
+ };
+}
+var cx, ux = {
+ code: "en-US",
+ formatDistance: function(e, t, n) {
+ var r, o = rx[e];
+ return r = typeof o == "string" ? o : t === 1 ? o.one : o.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
+ },
+ formatLong: ix,
+ formatRelative: function(e, t, n, r) {
+ return ax[e];
+ },
+ localize: {
+ ordinalNumber: function(e, t) {
+ var n = Number(e), r = n % 100;
+ if (r > 20 || r < 10) switch (r % 10) {
+ case 1: return n + "st";
+ case 2: return n + "nd";
+ case 3: return n + "rd";
+ }
+ return n + "th";
+ },
+ era: sx({
+ values: {
+ narrow: ["B", "A"],
+ abbreviated: ["BC", "AD"],
+ wide: ["Before Christ", "Anno Domini"]
+ },
+ defaultWidth: "wide"
+ }),
+ quarter: sx({
+ values: {
+ narrow: [
+ "1",
+ "2",
+ "3",
+ "4"
+ ],
+ abbreviated: [
+ "Q1",
+ "Q2",
+ "Q3",
+ "Q4"
+ ],
+ wide: [
+ "1st quarter",
+ "2nd quarter",
+ "3rd quarter",
+ "4th quarter"
+ ]
+ },
+ defaultWidth: "wide",
+ argumentCallback: function(e) {
+ return e - 1;
+ }
+ }),
+ month: sx({
+ values: {
+ narrow: [
+ "J",
+ "F",
+ "M",
+ "A",
+ "M",
+ "J",
+ "J",
+ "A",
+ "S",
+ "O",
+ "N",
+ "D"
+ ],
+ abbreviated: [
+ "Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec"
+ ],
+ wide: [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ defaultWidth: "wide"
+ }),
+ day: sx({
+ values: {
+ narrow: [
+ "S",
+ "M",
+ "T",
+ "W",
+ "T",
+ "F",
+ "S"
+ ],
+ short: [
+ "Su",
+ "Mo",
+ "Tu",
+ "We",
+ "Th",
+ "Fr",
+ "Sa"
+ ],
+ abbreviated: [
+ "Sun",
+ "Mon",
+ "Tue",
+ "Wed",
+ "Thu",
+ "Fri",
+ "Sat"
+ ],
+ wide: [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+ ]
+ },
+ defaultWidth: "wide"
+ }),
+ dayPeriod: sx({
+ values: {
+ narrow: {
+ am: "a",
+ pm: "p",
+ midnight: "mi",
+ noon: "n",
+ morning: "morning",
+ afternoon: "afternoon",
+ evening: "evening",
+ night: "night"
+ },
+ abbreviated: {
+ am: "AM",
+ pm: "PM",
+ midnight: "midnight",
+ noon: "noon",
+ morning: "morning",
+ afternoon: "afternoon",
+ evening: "evening",
+ night: "night"
+ },
+ wide: {
+ am: "a.m.",
+ pm: "p.m.",
+ midnight: "midnight",
+ noon: "noon",
+ morning: "morning",
+ afternoon: "afternoon",
+ evening: "evening",
+ night: "night"
+ }
+ },
+ defaultWidth: "wide",
+ formattingValues: {
+ narrow: {
+ am: "a",
+ pm: "p",
+ midnight: "mi",
+ noon: "n",
+ morning: "in the morning",
+ afternoon: "in the afternoon",
+ evening: "in the evening",
+ night: "at night"
+ },
+ abbreviated: {
+ am: "AM",
+ pm: "PM",
+ midnight: "midnight",
+ noon: "noon",
+ morning: "in the morning",
+ afternoon: "in the afternoon",
+ evening: "in the evening",
+ night: "at night"
+ },
+ wide: {
+ am: "a.m.",
+ pm: "p.m.",
+ midnight: "midnight",
+ noon: "noon",
+ morning: "in the morning",
+ afternoon: "in the afternoon",
+ evening: "in the evening",
+ night: "at night"
+ }
+ },
+ defaultFormattingWidth: "wide"
+ })
+ },
+ match: {
+ ordinalNumber: (cx = {
+ matchPattern: /^(\d+)(th|st|nd|rd)?/i,
+ parsePattern: /\d+/i,
+ valueCallback: function(e) {
+ return parseInt(e, 10);
+ }
+ }, function(e) {
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = e.match(cx.matchPattern);
+ if (!n) return null;
+ var r = n[0], o = e.match(cx.parsePattern);
+ if (!o) return null;
+ var i = cx.valueCallback ? cx.valueCallback(o[0]) : o[0];
+ return {
+ value: i = t.valueCallback ? t.valueCallback(i) : i,
+ rest: e.slice(r.length)
+ };
+ }),
+ era: lx({
+ matchPatterns: {
+ narrow: /^(b|a)/i,
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
+ wide: /^(before christ|before common era|anno domini|common era)/i
+ },
+ defaultMatchWidth: "wide",
+ parsePatterns: { any: [/^b/i, /^(a|c)/i] },
+ defaultParseWidth: "any"
+ }),
+ quarter: lx({
+ matchPatterns: {
+ narrow: /^[1234]/i,
+ abbreviated: /^q[1234]/i,
+ wide: /^[1234](th|st|nd|rd)? quarter/i
+ },
+ defaultMatchWidth: "wide",
+ parsePatterns: { any: [
+ /1/i,
+ /2/i,
+ /3/i,
+ /4/i
+ ] },
+ defaultParseWidth: "any",
+ valueCallback: function(e) {
+ return e + 1;
+ }
+ }),
+ month: lx({
+ matchPatterns: {
+ narrow: /^[jfmasond]/i,
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
+ },
+ defaultMatchWidth: "wide",
+ parsePatterns: {
+ narrow: [
+ /^j/i,
+ /^f/i,
+ /^m/i,
+ /^a/i,
+ /^m/i,
+ /^j/i,
+ /^j/i,
+ /^a/i,
+ /^s/i,
+ /^o/i,
+ /^n/i,
+ /^d/i
+ ],
+ any: [
+ /^ja/i,
+ /^f/i,
+ /^mar/i,
+ /^ap/i,
+ /^may/i,
+ /^jun/i,
+ /^jul/i,
+ /^au/i,
+ /^s/i,
+ /^o/i,
+ /^n/i,
+ /^d/i
+ ]
+ },
+ defaultParseWidth: "any"
+ }),
+ day: lx({
+ matchPatterns: {
+ narrow: /^[smtwf]/i,
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
+ },
+ defaultMatchWidth: "wide",
+ parsePatterns: {
+ narrow: [
+ /^s/i,
+ /^m/i,
+ /^t/i,
+ /^w/i,
+ /^t/i,
+ /^f/i,
+ /^s/i
+ ],
+ any: [
+ /^su/i,
+ /^m/i,
+ /^tu/i,
+ /^w/i,
+ /^th/i,
+ /^f/i,
+ /^sa/i
+ ]
+ },
+ defaultParseWidth: "any"
+ }),
+ dayPeriod: lx({
+ matchPatterns: {
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
+ },
+ defaultMatchWidth: "any",
+ parsePatterns: { any: {
+ am: /^a/i,
+ pm: /^p/i,
+ midnight: /^mi/i,
+ noon: /^no/i,
+ morning: /morning/i,
+ afternoon: /afternoon/i,
+ evening: /evening/i,
+ night: /night/i
+ } },
+ defaultParseWidth: "any"
+ })
+ },
+ options: {
+ weekStartsOn: 0,
+ firstWeekContainsDate: 1
+ }
+}, dx = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, fx = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, px = /^'([^]*?)'?$/, hx = /''/g, gx = /[a-zA-Z]/;
+function mx(e, t, n) {
+ var c, u, d, f, v, y, b, w;
+ Mw(2, arguments);
+ var x = String(t), E = Bw(), S = n?.locale ?? E.locale ?? ux, C = Dw(n?.firstWeekContainsDate ?? (n == null || (c = n.locale) == null || (u = c.options) == null ? void 0 : u.firstWeekContainsDate) ?? E.firstWeekContainsDate ?? ((d = E.locale) == null || (f = d.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1);
+ if (!(C >= 1 && C <= 7)) throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
+ var k = Dw(n?.weekStartsOn ?? (n == null || (v = n.locale) == null || (y = v.options) == null ? void 0 : y.weekStartsOn) ?? E.weekStartsOn ?? ((b = E.locale) == null || (w = b.options) == null ? void 0 : w.weekStartsOn) ?? 0);
+ if (!(k >= 0 && k <= 6)) throw RangeError("weekStartsOn must be between 0 and 6 inclusively");
+ if (!S.localize) throw RangeError("locale must contain localize property");
+ if (!S.formatLong) throw RangeError("locale must contain formatLong property");
+ var _ = Lw(e);
+ if (!function(e) {
+ if (Mw(1, arguments), !function(e) {
+ return Mw(1, arguments), e instanceof Date || Nw(e) === "object" && Object.prototype.toString.call(e) === "[object Date]";
+ }(e) && typeof e != "number") return !1;
+ var t = Lw(e);
+ return !isNaN(Number(t));
+ }(_)) throw RangeError("Invalid time value");
+ var I = function(e, t) {
+ return Mw(2, arguments), function(e, t) {
+ Mw(2, arguments);
+ var n = Lw(e).getTime(), r = Dw(t);
+ return new Date(n + r);
+ }(e, -Dw(t));
+ }(_, function(e) {
+ var t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
+ return t.setUTCFullYear(e.getFullYear()), e.getTime() - t.getTime();
+ }(_)), O = {
+ firstWeekContainsDate: C,
+ weekStartsOn: k,
+ locale: S,
+ _originalDate: _
+ };
+ return x.match(fx).map((function(e) {
+ var t = e[0];
+ return t === "p" || t === "P" ? (0, Qw[t])(e, S.formatLong) : e;
+ })).join("").match(dx).map((function(r) {
+ if (r === "''") return "'";
+ var o, i, a = r[0];
+ if (a === "'") return (i = (o = r).match(px)) ? i[1].replace(hx, "'") : o;
+ var s = Kw[a];
+ if (s) return n != null && n.useAdditionalWeekYearTokens || !function(e) {
+ return tx.indexOf(e) !== -1;
+ }(r) || nx(r, t, String(e)), n != null && n.useAdditionalDayOfYearTokens || !function(e) {
+ return ex.indexOf(e) !== -1;
+ }(r) || nx(r, t, String(e)), s(I, r, S.localize, O);
+ if (a.match(gx)) throw RangeError("Format string contains an unescaped latin alphabet character `" + a + "`");
+ return r;
+ })).join("");
+}
+var vx = /* @__PURE__ */ new Map(), yx = /* @__PURE__ */ new WeakMap(), bx = 0, wx = void 0;
+function xx(e, t, n = {}, r = wx) {
+ if (window.IntersectionObserver === void 0 && r !== void 0) {
+ let o = e.getBoundingClientRect();
+ return t(r, {
+ isIntersecting: r,
+ target: e,
+ intersectionRatio: typeof n.threshold == "number" ? n.threshold : 0,
+ time: 0,
+ boundingClientRect: o,
+ intersectionRect: o,
+ rootBounds: o
+ }), () => {};
+ }
+ let { id: o, observer: i, elements: a } = function(e) {
+ let t = function(e) {
+ return Object.keys(e).sort().filter(((t) => e[t] !== void 0)).map(((t) => {
+ return `${t}_${t === "root" ? (n = e.root, n ? (yx.has(n) || (bx += 1, yx.set(n, bx.toString())), yx.get(n)) : "0") : e[t]}`;
+ var n;
+ })).toString();
+ }(e), n = vx.get(t);
+ if (!n) {
+ let r = /* @__PURE__ */ new Map(), o, i = new IntersectionObserver(((t) => {
+ t.forEach(((t) => {
+ var n;
+ let i = t.isIntersecting && o.some(((e) => t.intersectionRatio >= e));
+ e.trackVisibility && t.isVisible === void 0 && (t.isVisible = i), (n = r.get(t.target)) == null || n.forEach(((e) => {
+ e(i, t);
+ }));
+ }));
+ }), e);
+ o = i.thresholds || (Array.isArray(e.threshold) ? e.threshold : [e.threshold || 0]), n = {
+ id: t,
+ observer: i,
+ elements: r
+ }, vx.set(t, n);
+ }
+ return n;
+ }(n), s = a.get(e) || [];
+ return a.has(e) || a.set(e, s), s.push(t), i.observe(e), function() {
+ s.splice(s.indexOf(t), 1), s.length === 0 && (a.delete(e), i.unobserve(e)), a.size === 0 && (i.disconnect(), vx.delete(o));
+ };
+}
+function Ex({ threshold: e, delay: t, trackVisibility: n, rootMargin: r, root: o, triggerOnce: i, skip: a, initialInView: l, fallbackInView: c, onChange: u } = {}) {
+ let [f, p] = s.useState(null), h = s.useRef(u), [g, m] = s.useState({
+ inView: !!l,
+ entry: void 0
+ });
+ h.current = u, s.useEffect((() => {
+ if (a || !f) return;
+ let s;
+ return s = xx(f, ((e, t) => {
+ m({
+ inView: e,
+ entry: t
+ }), h.current && h.current(e, t), t.isIntersecting && i && s && (s(), s = void 0);
+ }), {
+ root: o,
+ rootMargin: r,
+ threshold: e,
+ trackVisibility: n,
+ delay: t
+ }, c), () => {
+ s && s();
+ };
+ }), [
+ Array.isArray(e) ? e.toString() : e,
+ f,
+ o,
+ r,
+ i,
+ a,
+ n,
+ c,
+ t
+ ]);
+ let v = g.entry?.target, y = s.useRef(void 0);
+ f || !v || i || a || y.current === v || (y.current = v, m({
+ inView: !!l,
+ entry: void 0
+ }));
+ let b = [
+ p,
+ g.inView,
+ g.entry
+ ];
+ return b.ref = b[0], b.inView = b[1], b.entry = b[2], b;
+}
+s.Component;
+var Sx = (0, s.createContext)({
+ assetTypes: [],
+ language: "en_US",
+ onSuccess: function(e, t) {
+ var n = t.selectedFile;
+ return console.log(e, n);
+ },
+ selectionMode: "MultiSelect",
+ hideExternalAccess: !1
+}), Cx = Sx.Provider, kx = function() {
+ return (0, s.useContext)(Sx);
+}, _x = function(e, t) {
+ return _x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
+ e.__proto__ = t;
+ } || function(e, t) {
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
+ }, _x(e, t);
+}, Tx = function() {
+ return Tx = Object.assign || function(e) {
+ for (var t, n = 1, r = arguments.length; n < r; n++) for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
+ return e;
+ }, Tx.apply(this, arguments);
+};
+function Ix(e, t) {
+ var n = {};
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") {
+ var o = 0;
+ for (r = Object.getOwnPropertySymbols(e); o < r.length; o++) t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
+ }
+ return n;
+}
+function Ox(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+}
+function jx(e, t) {
+ var n, r, o, i, a = {
+ label: 0,
+ sent: function() {
+ if (1 & o[0]) throw o[1];
+ return o[1];
+ },
+ trys: [],
+ ops: []
+ };
+ return i = {
+ next: s(0),
+ throw: s(1),
+ return: s(2)
+ }, typeof Symbol == "function" && (i[Symbol.iterator] = function() {
+ return this;
+ }), i;
+ function s(s) {
+ return function(l) {
+ return function(s) {
+ if (n) throw TypeError("Generator is already executing.");
+ for (; i && (i = 0, s[0] && (a = 0)), a;) try {
+ if (n = 1, r && (o = 2 & s[0] ? r.return : s[0] ? r.throw || ((o = r.return) && o.call(r), 0) : r.next) && !(o = o.call(r, s[1])).done) return o;
+ switch (r = 0, o && (s = [2 & s[0], o.value]), s[0]) {
+ case 0:
+ case 1:
+ o = s;
+ break;
+ case 4: return a.label++, {
+ value: s[1],
+ done: !1
+ };
+ case 5:
+ a.label++, r = s[1], s = [0];
+ continue;
+ case 7:
+ s = a.ops.pop(), a.trys.pop();
+ continue;
+ default:
+ if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || s[0] !== 6 && s[0] !== 2)) {
+ a = 0;
+ continue;
+ }
+ if (s[0] === 3 && (!o || s[1] > o[0] && s[1] < o[3])) {
+ a.label = s[1];
+ break;
+ }
+ if (s[0] === 6 && a.label < o[1]) {
+ a.label = o[1], o = s;
+ break;
+ }
+ if (o && a.label < o[2]) {
+ a.label = o[2], a.ops.push(s);
+ break;
+ }
+ o[2] && a.ops.pop(), a.trys.pop();
+ continue;
+ }
+ s = t.call(e, a);
+ } catch (e) {
+ s = [6, e], r = 0;
+ } finally {
+ n = o = 0;
+ }
+ if (5 & s[0]) throw s[1];
+ return {
+ value: s[0] ? s[1] : void 0,
+ done: !0
+ };
+ }([s, l]);
+ };
+ }
+}
+function Px(e, t, n) {
+ if (n || arguments.length === 2) for (var r, o = 0, i = t.length; o < i; o++) !r && o in t || (r ||= Array.prototype.slice.call(t, 0, o), r[o] = t[o]);
+ return e.concat(r || Array.prototype.slice.call(t));
+}
+function Ax(e, t) {
+ return Object.defineProperty ? Object.defineProperty(e, "raw", { value: t }) : e.raw = t, e;
+}
+var Nx = (0, s.createContext)(null);
+function Mx(e) {
+ var t = e.children, n = e.hideLimitedUse, r = n !== void 0 && n, o = (0, s.useState)([]), i = o[0], a = o[1], l = (0, s.useState)([]), c = l[0], u = l[1], d = (0, s.useState)([]), f = d[0], p = d[1], h = (0, s.useState)(), g = h[0], m = h[1], v = (0, s.useState)({}), y = v[0], b = v[1];
+ function w(e) {
+ a((function(t) {
+ return Lx(t, e);
+ }));
+ }
+ function x(e) {
+ a((function(t) {
+ return Dx(t, e);
+ }));
+ }
+ function E(e) {
+ u((function(t) {
+ return Lx(t, e.id);
+ })), b((function(t) {
+ var n;
+ return Tx(Tx({}, t), ((n = {})[e.id] = e, n));
+ }));
+ }
+ function S(e) {
+ u((function(t) {
+ return Dx(t, e.id);
+ })), b((function(t) {
+ var n = t, r = e.id;
+ return Ix(n, [typeof r == "symbol" ? r : r + ""]);
+ }));
+ }
+ function C(e) {
+ p((function(t) {
+ return Lx(t, e);
+ }));
+ }
+ function k(e) {
+ p((function(t) {
+ return Dx(t, e);
+ }));
+ }
+ function _() {
+ a([]), u([]), b({}), p([]);
+ }
+ (0, s.useEffect)((function() {
+ m(!r && void 0);
+ }), [r]);
+ var T = c.map((function(e) {
+ return y[e];
+ })), I = (0, s.useMemo)((function() {
+ return {
+ assetTypes: i,
+ metaproperties: T,
+ tags: f,
+ isLimited: g,
+ addAssetType: w,
+ removeAssetType: x,
+ addMetaproperty: E,
+ removeMetaproperty: S,
+ addTag: C,
+ removeTag: k,
+ clear: _
+ };
+ }), [
+ i,
+ T,
+ f,
+ g
+ ]);
+ return s.default.createElement(Nx.Provider, { value: I }, t);
+}
+function Lx(e, t) {
+ return e.includes(t) ? e : Px(Px([], e, !0), [t], !1);
+}
+function Dx(e, t) {
+ return e.filter((function(e) {
+ return e !== t;
+ }));
+}
+function Rx() {
+ var e = (0, s.useContext)(Nx);
+ if (e === null) throw Error("useAssetFilter must be used with a AssetFilterProvider");
+ return e;
+}
+function zx(e) {
+ return $x[e] ?? e;
+}
+var $x = {};
+function Bx(e) {
+ (0, s.useEffect)((function() {
+ var n = `https://d8ejoa1fys2rk.cloudfront.net/5.0.5/modules/compactview/i18n/${e.slice(0, 2).toLowerCase()}.json`;
+ fetch(n).then((function(e) {
+ return e.json();
+ })).then((function(e) {
+ $x = e;
+ }));
+ }), [e]);
+}
+var Fx = (0, s.createContext)(null), Ux = {
+ assets: "",
+ isLoading: !1
+};
+function Hx(e) {
+ var t = (0, s.useState)(Ux), n = t[0], r = t[1];
+ function o(e, t) {
+ var n = t !== "";
+ r((function(r) {
+ var o;
+ return Tx(Tx({}, r), ((o = {})[e] = t, o.isLoading = n, o));
+ }));
+ }
+ function i(e) {
+ r((function(t) {
+ return Tx(Tx({}, t), { isLoading: e });
+ }));
+ }
+ function a() {
+ r(Ux);
+ }
+ (0, s.useEffect)((function() {
+ o("assets", e.defaultValue ?? "");
+ }), [e.defaultValue]);
+ var l = (0, s.useMemo)((function() {
+ return Tx(Tx({}, n), {
+ setSearch: o,
+ setIsLoading: i,
+ clear: a
+ });
+ }), [n]);
+ return s.default.createElement(Fx.Provider, { value: l }, e.children);
+}
+function Wx() {
+ var e = (0, s.useContext)(Fx);
+ if (e === null) throw Error("useSearchState must be used within a SearchStateContext");
+ return e;
+}
+function Vx(e) {
+ var t = Wx();
+ return {
+ value: t[e],
+ isLoading: t.isLoading,
+ setSearch: function(n) {
+ return t.setSearch(e, n);
+ },
+ setIsLoading: t.setIsLoading
+ };
+}
+function qx(e) {
+ return {
+ tag: "ok",
+ value: e
+ };
+}
+function Gx(e) {
+ return {
+ tag: "error",
+ error: e
+ };
+}
+function Yx(e) {
+ return e.tag === "ok";
+}
+function Zx(e) {
+ return e.tag === "error";
+}
+function Kx(e) {
+ return `https://${e.replace(/^https?:\/\//i, "").replace(/\/+$/i, "")}/`;
+}
+var Xx = "transformBaseURL";
+function Jx(e) {
+ var t;
+ if (e[Xx]) {
+ var n = e, r = Xx, o = n[r], i = Ix(n, [r + ""]);
+ return Tx(Tx({}, i), ((t = {}).transformBaseUrl = Tx({}, o), t));
+ }
+ return e;
+}
+var Qx = /* @__PURE__ */ new Map();
+function eE(e, t, n) {
+ return Ox(this, void 0, void 0, (function() {
+ var r, o, i, a, s, l, c, u;
+ return jx(this, (function(d) {
+ switch (d.label) {
+ case 0:
+ if (!n) return [2, Gx("No authentication provided")];
+ if (r = n.getAccessToken && n.getAccessToken(), (o = n.accountDomain === void 0 ? `https://${window.location.host}` : Kx(n.accountDomain.trim())).charAt(o.length - 1) === "/" && (o = o.slice(0, -1)), i = `${o}:${e}:${JSON.stringify(t)}:${r}`, Qx.has(i)) return [2, qx(Qx.get(i))];
+ a = {
+ Accept: "application/json",
+ "Content-Type": "application/json",
+ "X-Bynder-Integration": "UCV/v2.0.5"
+ }, s = r === void 0 ? a : Tx(Tx({}, a), { Authorization: `Bearer ${r}` }), l = {
+ method: "post",
+ headers: s,
+ body: JSON.stringify({
+ query: e,
+ variables: t
+ })
+ }, d.label = 1;
+ case 1: return d.trys.push([
+ 1,
+ 4,
+ ,
+ 5
+ ]), [4, fetch(`${o}/graphql`, l)];
+ case 2: return [4, d.sent().json()];
+ case 3: return c = d.sent(), u = function(e) {
+ return (e?.searchAssets?.assets)?.nodes.length ? Tx(Tx({}, e), { searchAssets: Tx(Tx({}, e.searchAssets), { assets: Tx(Tx({}, e.searchAssets.assets), { nodes: (e.searchAssets?.assets)?.nodes.map((function(e) {
+ if (e.files) {
+ var t = Jx(e.files);
+ return Tx(Tx({}, e), { files: Tx({}, t) });
+ }
+ return e;
+ })) }) }) }) : e;
+ }(c.data), [3, 5];
+ case 4: return [2, Gx(d.sent())];
+ case 5: return c.errors === void 0 ? (Qx.set(i, u), Qx.size > 50 && Qx.delete(Qx.keys().next().value), [2, qx(u)]) : [2, Gx(c.errors.map((function(e) {
+ return e.message;
+ })).join(","))];
+ }
+ }));
+ }));
+}
+function tE(e) {
+ if (!window.crypto?.subtle) return Promise.reject("Access to the WebCrypto API is restricted to secure origins. Compact View requires HTTPS when used outside localhost (for development).");
+ var n = new TextEncoder().encode(e);
+ return window.crypto.subtle.digest("SHA-256", n);
+}
+function nE() {
+ var e = /* @__PURE__ */ new Uint32Array(28), t = window.crypto.getRandomValues(e);
+ return Array.from(t).map((function(e) {
+ var t = `0${e.toString(16)}`;
+ return t.substring(t.length - 2);
+ })).join("");
+}
+var rE = "42b1eefa-d754-4802-b9c4-bf80d6ab6052", oE = "https://d8ejoa1fys2rk.cloudfront.net", iE = oE + "/5.0.5/modules/compactview/loginCompleted.html", aE = "https://apiv2.webdamdb.com/", sE = [
+ "offline",
+ "asset:read",
+ "collection:read",
+ "meta.assetbank:read"
+];
+function lE(e, t, n) {
+ return Ox(this, void 0, void 0, (function() {
+ var r, o, i, a;
+ return jx(this, (function(s) {
+ switch (s.label) {
+ case 0: r = cE(n) + "token", o = new URLSearchParams({
+ client_id: rE,
+ code_verifier: t,
+ code: e,
+ redirect_uri: iE,
+ grant_type: "authorization_code"
+ }), s.label = 1;
+ case 1: return s.trys.push([
+ 1,
+ 4,
+ ,
+ 5
+ ]), [4, fetch(r, {
+ method: "POST",
+ headers: {
+ Accept: "application/json",
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
+ },
+ body: o
+ })];
+ case 2: return (i = s.sent()).ok ? [4, i.json()] : [2, Gx(`Failed to fetch access token: ${i.status}`)];
+ case 3: return [2, qx({
+ refreshToken: (a = s.sent()).refresh_token,
+ accessToken: a.access_token,
+ expiresIn: a.expires_in
+ })];
+ case 4: return [2, Gx(s.sent().toString())];
+ case 5: return [2];
+ }
+ }));
+ }));
+}
+function cE(e) {
+ return uE() === "webdam" ? aE + "oauth2/" : Kx(e) + "v6/authentication/oauth2/";
+}
+function uE() {
+ return localStorage.getItem("cvp") ?? void 0;
+}
+function dE(e) {
+ return Ox(this, void 0, void 0, (function() {
+ var t, n, r, o, i, a;
+ return jx(this, (function(s) {
+ switch (s.label) {
+ case 0: return t = window.screen, n = t.width / 2 - 285 + window.screenX, r = t.height / 2 - 350 + window.screenY, (o = window.open("", "Bynder Brand Portal", `height=700,width=570,left=${n},top=${r}`)) === null ? [2, Gx("Error opening login window")] : (o.document.head.innerHTML = pE, o.document.body.innerHTML = hE, o.location.href = e, [4, Promise.race([
+ new Promise((function(e) {
+ window.addEventListener("message", (function(t) {
+ t.origin === oE && e(qx(t));
+ }));
+ })),
+ new Promise((function(e) {
+ setTimeout((function() {
+ return e(Gx("Timeout"));
+ }), 6e5);
+ })),
+ (l = o, new Promise((function(e) {
+ var t = setInterval((function() {
+ l.closed && (clearInterval(t), e(Gx("Login window closed")));
+ }), 1e3);
+ })))
+ ])]);
+ case 1: return Zx(i = s.sent()) ? [2, i] : [2, qx({
+ state: (a = new URLSearchParams(i.value.data)).get("state"),
+ code: a.get("code")
+ })];
+ }
+ var l;
+ }));
+ }));
+}
+var fE, pE = "\n<title>Redirecting...</title>\n<style>\n @keyframes cv-spinner-animation {\n to {\n transform:rotate(1turn)\n }\n }\n\n .cv-spinner {\n position: relative;\n display: inline-block;\n padding: 175px 0 100px;\n width: 100%;\n height: auto;\n background: #fff;\n box-sizing: border-box;\n }\n \n .cv-spinner:before {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 40px;\n height: 40px;\n margin-top: -20px;\n margin-left: -20px;\n box-sizing: border-box;\n border-top: 3px solid #7e8890;\n border-right: 3px solid transparent;\n border-radius: 50%;\n content: \"\";\n animation: cv-spinner-animation .8s linear infinite;\n z-index: 3;\n }\n</style>", hE = "<div class=\"cv-spinner\"></div>", gE = { error: console.error }, mE = (0, s.createContext)(null), vE = mE.Provider, yE = function() {
+ var e = (0, s.useContext)(mE);
+ if (!e) throw Error("useRootElement must be used with a RootElementProvider");
+ return e;
+}, bE = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, wE = (fE = Object.create(null), function(e) {
+ return fE[e] === void 0 && (fE[e] = function(e) {
+ return bE.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
+ }(e)), fE[e];
+});
+function xE(e) {
+ var t = yE();
+ return s.default.createElement(Ur, {
+ shouldForwardProp: wE,
+ target: t
+ }, s.default.createElement(El, { zIndexBase: 1e6 }, e.children));
+}
+function EE(e) {
+ var t = e.children, n = e.isContainerMode, r = n !== void 0 && n, o = s.default.useRef(null), i = (0, s.useState)(null), a = i[0], l = i[1];
+ return (0, s.useEffect)((function() {
+ if (o.current !== null) {
+ var e, t, n = function(e) {
+ try {
+ return e.attachShadow({ mode: "open" });
+ } catch {
+ return null;
+ }
+ }(o.current);
+ e = n, t = "@import url(https://d8ejoa1fys2rk.cloudfront.net/5.0.5/includes/css/vendor/font-awesome.min.css);/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}a{background-color:transparent}b{font-weight:bolder}code{font-family:monospace,monospace;font-size:1em}button,input,select{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}progress{vertical-align:baseline}[type=checkbox]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}[hidden]{display:none}dd,h1,p{margin:0}button{background-color:transparent;background-image:none}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}ul{list-style:none;margin:0;padding:0}*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box;border:0 solid rgba(0,34,51,.1)}input::-webkit-input-placeholder{color:#a0aec0}input::-moz-placeholder{color:#a0aec0}input::-ms-input-placeholder{color:#a0aec0}input::placeholder{color:#a0aec0}[role=button],button{cursor:pointer}h1{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,select{padding:0;line-height:inherit;color:inherit}code{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,object,svg,video{display:block;vertical-align:middle}video{max-width:100%;height:auto}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}.bg-ui-0{--bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity))}.bg-ui-500{background-color:rgba(0,34,51,.05)}.hover\\:bg-ui-400:hover{background-color:rgba(0,34,51,.03)}.border-brand-500{--border-opacity:1;border-color:#0af;border-color:rgba(0,170,255,var(--border-opacity))}.rounded{border-radius:5px}.border-2{border-width:2px}.border{border-width:1px}.border-b{border-bottom-width:1px}.last\\:border-b-0:last-child{border-bottom-width:0}.cursor-pointer{cursor:pointer}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:-webkit-box;display:-ms-flexbox;display:flex}.inline-flex{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.grid{display:grid}.contents{display:contents}.hidden{display:none}.flex-col{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.flex-wrap{-ms-flex-wrap:wrap;flex-wrap:wrap}.items-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.self-start{-ms-flex-item-align:start;align-self:flex-start}.justify-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.justify-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.flex-1{-webkit-box-flex:1;-ms-flex:1 1 0%;flex:1 1 0%}.flex-grow{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.flex-shrink-0{-ms-flex-negative:0;flex-shrink:0}.flex-shrink{-ms-flex-negative:1;flex-shrink:1}.font-sans{font-family:SourceSansPro,Source Sans Pro,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-semibold{font-weight:600}.h-4{height:16px}.h-5{height:20px}.h-6{height:24px}.h-8{height:32px}.h-10{height:40px}.h-12{height:48px}.h-20{height:80px}.h-32{height:128px}.h-full{height:100%}.text-xs{font-size:12px}.text-sm{font-size:14px}.text-base{font-size:16px}.text-xl{font-size:20px}.m-2{margin:8px}.my-2{margin-top:8px;margin-bottom:8px}.mx-2{margin-left:8px;margin-right:8px}.mr-1{margin-right:4px}.ml-1{margin-left:4px}.mr-2{margin-right:8px}.mb-2{margin-bottom:8px}.ml-2{margin-left:8px}.mt-3{margin-top:12px}.mr-3{margin-right:12px}.ml-3{margin-left:12px}.mb-4{margin-bottom:16px}.mb-8{margin-bottom:32px}.-mr-2{margin-right:-8px}.max-w-24{max-width:96px}.max-w-32{max-width:128px}.min-w-24{min-width:96px}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.py-1{padding-top:4px;padding-bottom:4px}.py-2{padding-top:8px;padding-bottom:8px}.px-2{padding-left:8px;padding-right:8px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.py-px{padding-top:1px;padding-bottom:1px}.pb-1{padding-bottom:4px}.pb-2{padding-bottom:8px}.pl-3{padding-left:12px}.pt-4{padding-top:16px}.pr-5{padding-right:20px}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-0{top:0}.right-0{right:0}.resize{resize:both}.shadow{-webkit-box-shadow:0 1px 6px 0 rgba(0,34,51,.1),0 0 0 1px rgba(0,34,51,.1);box-shadow:0 1px 6px 0 rgba(0,34,51,.1),0 0 0 1px rgba(0,34,51,.1)}.text-left{text-align:left}.text-right{text-align:right}.text-body-300{color:rgba(0,34,51,.3)}.text-body-400{color:rgba(0,34,51,.5)}.hover\\:text-body-500:hover,.text-body-500{color:rgba(0,34,51,.8)}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.select-none{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.visible{visibility:visible}.break-all{word-break:break-all}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.w-5{width:20px}.w-6{width:24px}.w-10{width:40px}.w-40{width:160px}.w-48{width:192px}.w-56{width:224px}.w-full{width:100%}.z-10{z-index:10}.z-20{z-index:20}.transform{--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;-webkit-transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y))}.transition{-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform}.transition-transform{-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}@-webkit-keyframes spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes ping{75%,to{-webkit-transform:scale(2);transform:scale(2);opacity:0}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{-webkit-transform:translateY(-25%);transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{-webkit-transform:none;transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in-down{0%{opacity:0;-webkit-transform:translateY(-2px);transform:translateY(-2px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes border-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes border-dash{0%{stroke-dasharray:1,100;stroke-dashoffset:0}50%{stroke-dasharray:80,100;stroke-dashoffset:-20}to{stroke-dasharray:80,100;stroke-dashoffset:-48}}.transition-color{-webkit-transition:color .05s linear,background-color .05s linear,border-color .05s linear,opacity .05s linear;transition:color .05s linear,background-color .05s linear,border-color .05s linear,opacity .05s linear}.transition-transform{-webkit-transition:-webkit-transform .6s cubic-bezier(.175,.885,.32,1.15);transition:-webkit-transform .6s cubic-bezier(.175,.885,.32,1.15);transition:transform .6s cubic-bezier(.175,.885,.32,1.15);transition:transform .6s cubic-bezier(.175,.885,.32,1.15),-webkit-transform .6s cubic-bezier(.175,.885,.32,1.15)}.cv-root{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;--bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));font-family:SourceSansPro,Source Sans Pro,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:16px;color:rgba(0,34,51,.8);-webkit-box-sizing:border-box;box-sizing:border-box;position:relative}.cv-root *,.cv-root :after,.cv-root :before{-webkit-box-sizing:inherit;box-sizing:inherit}.cv-container{overflow:hidden;width:100%;height:100%}.cv-container nav:last-of-type{-webkit-box-shadow:0 1px 0 0 rgba(0,34,51,.1),0 1px 6px 0 rgba(0,34,51,.1);box-shadow:0 1px 0 0 rgba(0,34,51,.1),0 1px 6px 0 rgba(0,34,51,.1)}.cv-dropdown{position:fixed;border-width:1px;border-color:rgba(0,34,51,.1);-webkit-animation:fade-in-down .15s ease-out;animation:fade-in-down .15s ease-out;margin-top:4px;margin-bottom:4px;overflow-y:auto;border-radius:5px;-webkit-box-shadow:0 4px 10px 0 rgba(0,34,51,.1);box-shadow:0 4px 10px 0 rgba(0,34,51,.1);z-index:9999999;overflow-y:hidden;-webkit-transition:left .1s ease-out;transition:left .1s ease-out}.card-list{padding-left:8px;padding-right:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-line-pack:start;align-content:flex-start;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.max-h-400{max-height:400px}.max-w-600{max-width:600px}.spinner{-webkit-animation:border-rotate 1s linear infinite;animation:border-rotate 1s linear infinite;z-index:2;position:absolute;top:50%;left:50%;margin:-10px 0 0 -10px;width:20px;height:20px}.spinner circle{stroke:currentColor;stroke-linecap:round;-webkit-animation:border-dash 1.5s ease-in-out infinite;animation:border-dash 1.5s ease-in-out infinite}.fade-in{-webkit-animation:fade-in .15s ease-out;animation:fade-in .15s ease-out}.fade-in-down{-webkit-animation:fade-in-down .15s ease-out;animation:fade-in-down .15s ease-out}.cv-skeleton{overflow:hidden;display:inline-block;position:relative;border-radius:4px;background-color:rgba(0,34,51,.05)}.cv-skeleton:before{position:absolute;height:100%;top:0;-webkit-animation:cv-skeleton-progress 1.5s ease-in-out infinite;animation:cv-skeleton-progress 1.5s ease-in-out infinite;content:\"\";width:500px;left:-500px;background-image:-webkit-gradient(linear,left top,right top,from(hsla(0,0%,100%,0)),color-stop(hsla(0,0%,100%,.6)),to(hsla(0,0%,100%,0)));background-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.6),hsla(0,0%,100%,0))}@keyframes cv-skeleton-progress{0%{left:-500px}to{left:100%}}.fa-lg{line-height:1.05em}.z-a-lot{z-index:999999}button:focus{outline:revert}", SE(e ?? document.head, t), n && SE(document.head, kE), l(n ?? o.current);
+ }
+ }), []), s.default.createElement("div", {
+ ref: o,
+ style: {
+ display: "flex",
+ height: "100%"
+ },
+ "data-testid": "root"
+ }, a && s.default.createElement(vE, { value: a }, s.default.createElement(xE, null, (0, Qa.createPortal)(s.default.createElement(_E, {
+ $isContainerMode: r,
+ "data-testid": "ShadowRootInternalContainer"
+ }, t), a))));
+}
+function SE(e, t) {
+ var n = document.createElement("style"), r = document.createTextNode(t);
+ n.appendChild(r), e.appendChild(n);
+}
+var CE, kE = "\n@font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n src: local('Source Sans Pro Regular'),\n local('SourceSansPro-Regular'),\n url('https://d8ejoa1fys2rk.cloudfront.net/5.0.5/includes/fonts/SourceSans/sourcesanspro-regular.woff2') format('woff2'),\n url('https://d8ejoa1fys2rk.cloudfront.net/5.0.5/includes/fonts/SourceSans/sourcesanspro-regular.woff') format('woff');\n }\n \n @font-face {\n font-family: \"FontAwesome\";\n src: url(\"https://d8ejoa1fys2rk.cloudfront.net/5.0.5/includes/fonts/fontawesome-webfont.woff2?v=4.7.0\") format(\"woff2\"),\n url(\"https://d8ejoa1fys2rk.cloudfront.net/5.0.5/includes/fonts/fontawesome-webfont.woff?v=4.7.0\") format(\"woff\");\n font-weight: 400;\n font-style: normal;\n }\n", _E = ao.div(CE ||= Ax(["\n width: ", ";\n font-family: 'Source Sans Pro';\n"], ["\n width: ", ";\n font-family: 'Source Sans Pro';\n"]), (function(e) {
+ return e.$isContainerMode ? "100%" : "auto";
+})), TE = (0, s.createContext)("parent");
+function IE(e) {
+ var t = e.children, n = e.isContainerMode, r = n !== void 0 && n;
+ return (0, s.useContext)(TE) === "parent" ? s.default.createElement(TE.Provider, { value: "child" }, s.default.createElement(EE, { isContainerMode: r }, t)) : s.default.createElement(s.default.Fragment, null, t);
+}
+var OE = (0, s.createContext)(null), jE = function() {
+ return (0, s.useContext)(OE);
+};
+function PE(e) {
+ var t = e.children, n = e.isOpen, r = n === void 0 || n, o = e.style, i = e.onClose, a = i === void 0 ? function() {} : i, l = (0, s.useState)(null), c = l[0], u = l[1], d = (0, s.useMemo)((function() {
+ return { onClose: a };
+ }), [a]);
+ return (0, s.useEffect)((function() {
+ var e = document.createElement("div");
+ return e.dataset.testId = "CompactViewContainer", document.body.appendChild(e), u(e), function() {
+ e.remove();
+ };
+ }), []), r ? s.default.createElement(OE.Provider, { value: d }, c && s.default.createElement(s.default.Fragment, null, (0, Qa.createPortal)(s.default.createElement(IE, null, s.default.createElement(ME, { className: "z-a-lot" }, s.default.createElement(LE, {
+ style: o,
+ "data-testid": "modal"
+ }, t))), c))) : null;
+}
+var AE, NE, ME = ao.div(AE ||= Ax([
+ "\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n align-items: center;\n padding: ",
+ ";\n position: fixed;\n animation: var(--fade-in-down);\n background: ",
+ ";\n"
+], [
+ "\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n align-items: center;\n padding: ",
+ ";\n position: fixed;\n animation: var(--fade-in-down);\n background: ",
+ ";\n"
+]), po.spacing5, po.gray100a), LE = ao.div(NE ||= Ax(["\n box-shadow: 0 2px 12px 0 rgba(0, 34, 51, 0.1);\n height: 100%;\n width: 100%;\n overflow: hidden;\n border-radius: ", ";\n"], ["\n box-shadow: 0 2px 12px 0 rgba(0, 34, 51, 0.1);\n height: 100%;\n width: 100%;\n overflow: hidden;\n border-radius: ", ";\n"]), po.radiusBase);
+function DE(e) {
+ var t = jE();
+ return s.default.createElement(BE, {
+ className: "cv-root",
+ style: { minHeight: 320 }
+ }, t !== null && s.default.createElement(FE, null, s.default.createElement(il, {
+ variant: "clean",
+ onClick: t.onClose,
+ title: zx("Close"),
+ icon: s.default.createElement(ai, null)
+ })), s.default.createElement(UE, null, e.children));
+}
+var RE, zE, $E, BE = ao.div(RE ||= Ax(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: relative;\n background-color: ", ";\n"], ["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n position: relative;\n background-color: ", ";\n"]), po.gray10), FE = ao.div(zE ||= Ax([
+ "\n position: absolute;\n top: ",
+ ";\n right: ",
+ ";\n"
+], [
+ "\n position: absolute;\n top: ",
+ ";\n right: ",
+ ";\n"
+]), po.spacing4, po.spacing5), UE = ao.div($E ||= Ax(["\n display: flex;\n flex-direction: column;\n font-size: ", ";\n"], ["\n display: flex;\n flex-direction: column;\n font-size: ", ";\n"]), po.fontSize300);
+function HE() {
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement("svg", {
+ viewBox: "0 0 479.438 361.46",
+ className: "w-10 mb-8",
+ style: {
+ width: 40,
+ marginBottom: 32
+ }
+ }, s.default.createElement("path", {
+ d: "\n M365.18 0a114 114 0 00-85.9 38.93l-153.18 153-43.82-43.84a45.18 45.18\n 0 01-11.54-30.75 46.06 46.06 0 0146.34-46.08 44.81 44.81 0 0130.42\n 11.49c2.73 2.42 10.48 10.43 10.48 10.43l48.5-48.51-14-14C172.19 11.43\n 144.48.03 114.3.03 51.24.03 0 51.03 0 114.1a115.08 115.08 0 0028.09\n 75.46l98.35 98.77 205.53-205.5a44.78 44.78 0 0130.58-11.57 46.07 46.07 0\n 0146.06 46.43 45.07 45.07 0 01-11.52 30.5l-136.6 136.57a28.73 28.73 0\n 01-20.83 8.58 28.29 28.29 0 01-20.51-8.92l-10.27-10.16-48.28 48.28 9.88\n 9.72a97.06 97.06 0 0069.38 29.2h.07a96 96 0\n 0069-29.13l142.35-142.67A114.47 114.47 0 00365.18 0z",
+ fill: "#0af"
+ })), s.default.createElement("h1", {
+ className: "text-xl mb-2",
+ style: {
+ fontSize: 20,
+ margin: 0,
+ marginBottom: 8,
+ fontWeight: 400
+ }
+ }, zx("Connect your brand portal")));
+}
+function WE() {
+ return [...arguments].filter(Boolean).join(" ");
+}
+function VE(e) {
+ var t = WE("w-6 h-6 text-body-300", e.className);
+ return s.default.createElement("div", {
+ "data-testid": "spinner",
+ className: t
+ }, s.default.createElement("svg", {
+ className: "spinner",
+ viewBox: "0 0 20 20"
+ }, s.default.createElement("circle", {
+ cx: "10",
+ cy: "10",
+ r: "8",
+ fill: "none",
+ strokeWidth: "3"
+ })));
+}
+function qE(e) {
+ var t = e.status, n = e.isReadOnly, r = e.value, o = e.onChange, i = e.onSubmit;
+ return s.default.createElement(ZE, null, s.default.createElement(Yc, {
+ type: "url",
+ value: r,
+ placeholder: "yourdomain.bynder.com",
+ label: zx("Enter the portal domain"),
+ onChange: o,
+ onKeyDown: function(e) {
+ t === "valid" && e.key === "Enter" && i();
+ },
+ isInvalid: t === "invalid",
+ helperText: t === "invalid" && zx("This portal domain does not exist"),
+ hasClearButton: t !== "validating" && !n,
+ iconRight: t === "validating" ? s.default.createElement(KE, {
+ role: "alert",
+ "aria-live": "polite"
+ }, s.default.createElement(VE, { className: "relative right-0" })) : void 0,
+ isDisabled: n,
+ "data-testid": "login-input"
+ }));
+}
+var GE, YE, ZE = ao.div(GE ||= Ax(["\n margin: ", " 0;\n width: 320px;\n"], ["\n margin: ", " 0;\n width: 320px;\n"]), po.spacing4), KE = ao.div(YE ||= Ax(["\n height: 100%;\n display: flex;\n align-items: center;\n"], ["\n height: 100%;\n display: flex;\n align-items: center;\n"]));
+function XE(e) {
+ return s.default.createElement(il, {
+ variant: "primary",
+ isDisabled: !e.isValidDomain || e.isSubmitting,
+ onClick: e.onClick,
+ isLoading: e.isSubmitting,
+ "data-testid": "login-button"
+ }, zx("Connect"));
+}
+function JE(e) {
+ return s.default.createElement(DE, null, s.default.createElement(HE, null), s.default.createElement(qE, {
+ value: e.domainValue,
+ isReadOnly: !1 === e.isEditable || e.isSubmitting,
+ onChange: e.onChangeDomain,
+ onSubmit: e.onSubmit,
+ status: e.domainStatus
+ }), s.default.createElement(XE, {
+ isValidDomain: e.domainStatus === "valid",
+ isSubmitting: e.isSubmitting,
+ onClick: e.onSubmit
+ }));
+}
+function QE() {
+ return s.default.createElement("svg", {
+ width: "190",
+ height: "130"
+ }, s.default.createElement("defs", null, s.default.createElement("linearGradient", {
+ id: "prefix__b",
+ x1: "100%",
+ x2: "25.598%",
+ y1: "11.782%",
+ y2: "100%"
+ }, s.default.createElement("stop", {
+ offset: "0%",
+ stopColor: "#F8FAFC"
+ }), s.default.createElement("stop", {
+ offset: "100%",
+ stopColor: "#EFF2F4"
+ })), s.default.createElement("rect", {
+ id: "prefix__a",
+ width: "190",
+ height: "130",
+ rx: "3"
+ })), s.default.createElement("g", {
+ fill: "none",
+ fillRule: "evenodd"
+ }, s.default.createElement("mask", {
+ id: "prefix__c",
+ fill: "#fff"
+ }, s.default.createElement("use", { xlinkHref: "#prefix__a" })), s.default.createElement("use", {
+ fill: "url(#prefix__b)",
+ xlinkHref: "#prefix__a"
+ }), s.default.createElement("g", { mask: "url(#prefix__c)" }, s.default.createElement("path", {
+ fill: "#F5A623",
+ d: "M100.296 45.951l23.01 43.23A6 6 0 01118.009 98H71.991a6 6 0 01-5.297-8.82l23.01-43.229a6 6 0 0110.592 0z"
+ }), s.default.createElement("path", {
+ fill: "#FFF",
+ fillRule: "nonzero",
+ d: "M93.21 60h3.58a2 2 0 011.99 2.199l-1.6 16A2 2 0 0195.19 80h-.38a2 2 0 01-1.99-1.801l-1.6-16A2 2 0 0193.21 60zM95 84a3 3 0 110 6 3 3 0 010-6z"
+ })), s.default.createElement("path", {
+ fill: "#EEF1F3",
+ d: "M3 0h184a3 3 0 013 3v13H0V3a3 3 0 013-3z",
+ mask: "url(#prefix__c)"
+ }), s.default.createElement("circle", {
+ cx: "11",
+ cy: "8",
+ r: "3",
+ fill: "#023",
+ fillOpacity: "0.1",
+ mask: "url(#prefix__c)"
+ }), s.default.createElement("circle", {
+ cx: "20",
+ cy: "8",
+ r: "3",
+ fill: "#023",
+ fillOpacity: "0.1",
+ mask: "url(#prefix__c)"
+ }), s.default.createElement("circle", {
+ cx: "29",
+ cy: "8",
+ r: "3",
+ fill: "#023",
+ fillOpacity: "0.1",
+ mask: "url(#prefix__c)"
+ })));
+}
+function eS(e) {
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(QE, null), s.default.createElement(oS, null, zx("Oops! Something went wrong")), s.default.createElement(iS, null, zx("Please try again or get in contact with our customer support.")), s.default.createElement(aS, null, s.default.createElement(il, {
+ variant: "secondary",
+ title: zx("Send report"),
+ onClick: e.onClickSend,
+ isDisabled: e.isReportSent
+ }, e.isReportSent ? zx("Report sent") : zx("Send report...")), s.default.createElement(il, {
+ variant: "primary",
+ title: zx("Try again"),
+ onClick: e.onClickRetry
+ }, zx("Try again"))));
+}
+var tS, nS, rS, oS = ao.h1(tS ||= Ax([
+ "\n margin-top: ",
+ ";\n font-size: ",
+ ";\n"
+], [
+ "\n margin-top: ",
+ ";\n font-size: ",
+ ";\n"
+]), po.spacing8, po.fontSize400), iS = ao.span(nS ||= Ax([
+ "\n margin-top: ",
+ ";\n color: ",
+ ";\n"
+], [
+ "\n margin-top: ",
+ ";\n color: ",
+ ";\n"
+]), po.spacing5, po.colorTextDisabled), aS = ao.div(rS ||= Ax([
+ "\n margin-top: ",
+ ";\n display: flex;\n gap: ",
+ ";\n"
+], [
+ "\n margin-top: ",
+ ";\n display: flex;\n gap: ",
+ ";\n"
+]), po.spacing7, po.spacing3);
+function sS(e) {
+ return s.default.createElement(td, {
+ title: zx("Send error report"),
+ isOpen: e.isOpen,
+ onClose: e.onCancel,
+ actionPrimary: s.default.createElement(il, {
+ variant: "primary",
+ title: zx("Send report"),
+ onClick: e.onDone
+ }, zx("Send report")),
+ actionSecondary: s.default.createElement(il, {
+ variant: "secondary",
+ title: zx("Cancel"),
+ onClick: e.onCancel
+ }, zx("Cancel")),
+ container: e.container
+ }, s.default.createElement(dS, null, zx("We have created a report that you can send us to help us prevent this from happening in the future.")), s.default.createElement(fS, { "data-testid": "error-stack" }, e.error.stack?.split("\n").map((function(e) {
+ return s.default.createElement(s.default.Fragment, { key: e }, e, s.default.createElement("br", null));
+ }))), s.default.createElement(pS, null, zx("We will treat this report as confidential and anonymous.")));
+}
+var lS, cS, uS, dS = ao.div(lS ||= Ax(["\n line-height: ", ";\n"], ["\n line-height: ", ";\n"]), po.lineHeightText), fS = ao.div(cS ||= Ax([
+ "\n margin: ",
+ " 0;\n flex-grow: 1;\n align-self: stretch;\n background-color: ",
+ ";\n border-radius: ",
+ ";\n border: 1px solid ",
+ ";\n line-height: ",
+ ";\n overflow: scroll;\n padding: ",
+ " ",
+ ";\n max-height: 200px;\n"
+], [
+ "\n margin: ",
+ " 0;\n flex-grow: 1;\n align-self: stretch;\n background-color: ",
+ ";\n border-radius: ",
+ ";\n border: 1px solid ",
+ ";\n line-height: ",
+ ";\n overflow: scroll;\n padding: ",
+ " ",
+ ";\n max-height: 200px;\n"
+]), po.spacing5, po.gray25, po.radiusMedium, po.gray200, po.lineHeightText, po.spacing5, po.spacing4), pS = ao.span(uS ||= Ax([
+ "\n color: ",
+ ";\n line-height: ",
+ ";\n font-size: ",
+ ";\n"
+], [
+ "\n color: ",
+ ";\n line-height: ",
+ ";\n font-size: ",
+ ";\n"
+]), po.colorTextDisabled, po.lineHeightBase, po.fontSize75);
+function hS(e) {
+ var t = e.error, n = e.onRetry, r = yE(), o = (0, s.useState)(!1), i = o[0], a = o[1], l = (0, s.useState)(!1), c = l[0], u = l[1];
+ return (0, s.useEffect)((function() {
+ gE.error(t);
+ }), [t]), s.default.createElement("div", { className: "w-full h-full flex flex-col items-center justify-center bg-ui-0 font-sans\n text-base text-body-500" }, s.default.createElement(eS, {
+ isReportSent: c,
+ onClickSend: function() {
+ a(!0);
+ },
+ onClickRetry: n
+ }), s.default.createElement(sS, {
+ isOpen: i,
+ error: t,
+ container: r,
+ onDone: function() {
+ a(!1), u(!0);
+ },
+ onCancel: function() {
+ a(!1);
+ }
+ }));
+}
+var gS = function(e) {
+ function t(t) {
+ var n = e.call(this, t) || this;
+ return n.state = { error: null }, n;
+ }
+ return function(e, t) {
+ if (typeof t != "function" && t !== null) throw TypeError("Class extends value " + String(t) + " is not a constructor or null");
+ function n() {
+ this.constructor = e;
+ }
+ _x(e, t), e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
+ }(t, e), t.getDerivedStateFromError = function(e) {
+ return { error: e };
+ }, t.prototype.render = function() {
+ var e = this;
+ return this.state.error ? s.default.createElement(hS, {
+ error: this.state.error,
+ onRetry: function() {
+ return e.setState({ error: null });
+ }
+ }) : this.props.children;
+ }, t;
+}(s.default.Component);
+function mS() {
+ return s.default.createElement("div", {
+ role: "alert",
+ "aria-live": "polite",
+ className: "bg-ui-0 w-full h-full"
+ }, " ", s.default.createElement(VE, null), " ");
+}
+var vS = (0, s.createContext)(null);
+function yS(e) {
+ var u;
+ Bx(e.language ?? "en_US");
+ var d = function() {
+ var n = (0, s.useState)(void 0), r = n[0], o = n[1], i = (0, s.useState)(localStorage.getItem("cvrt") ?? void 0), a = i[0], l = i[1], c = (0, s.useState)(localStorage.getItem("cvad") ?? void 0), u = c[0], d = c[1], f = (0, s.useState)(y()), p = f[0], h = f[1], g = (0, s.useRef)();
+ function m(e) {
+ o((function() {
+ return e.getAccessToken;
+ })), l(e.refreshToken), d(e.accountDomain), h(y(e.getAccessToken, e.refreshToken)), e.accountDomain && localStorage.setItem("cvad", e.accountDomain), e.refreshToken && localStorage.setItem("cvrt", e.refreshToken), g.current && clearTimeout(g.current), e.expiresIn && (g.current = setTimeout((function() {
+ o(void 0);
+ }), 1e3 * e.expiresIn));
+ }
+ function v() {
+ o(void 0), l(void 0), d(localStorage.getItem("cvad") ?? void 0), h("not-authenticated"), localStorage.removeItem("cvrt"), g.current && clearTimeout(g.current);
+ }
+ function y(e, t) {
+ return e === void 0 && (e = r), t === void 0 && (t = a), e === void 0 ? t === void 0 ? "not-authenticated" : "refreshing" : "authenticated";
+ }
+ return (0, s.useEffect)((function() {
+ return function() {
+ g.current && clearTimeout(g.current);
+ };
+ }), []), (0, s.useEffect)((function() {
+ r && r() || !a || !u || (h("refreshing"), function(e, t) {
+ return Ox(this, void 0, void 0, (function() {
+ var n, r, o, i;
+ return jx(this, (function(a) {
+ switch (a.label) {
+ case 0: n = cE(t) + "token", r = new URLSearchParams({
+ client_id: rE,
+ refresh_token: e,
+ grant_type: "refresh_token"
+ }), a.label = 1;
+ case 1: return a.trys.push([
+ 1,
+ 4,
+ ,
+ 5
+ ]), [4, fetch(n, {
+ method: "POST",
+ headers: {
+ Accept: "application/json",
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
+ },
+ body: r
+ })];
+ case 2: return (o = a.sent()).ok ? [4, o.json()] : [2, Gx(`Failed to fetch refresh token: ${o.status}`)];
+ case 3: return [2, qx({
+ accessToken: (i = a.sent()).access_token,
+ expiresIn: i.expires_in
+ })];
+ case 4: return [2, Gx(a.sent().toString())];
+ case 5: return [2];
+ }
+ }));
+ }));
+ }(a, u).then((function(e) {
+ Yx(e) ? m({
+ getAccessToken: function() {
+ return e.value.accessToken;
+ },
+ expiresIn: e.value.expiresIn,
+ refreshToken: a,
+ accountDomain: u
+ }) : (gE.error(e.error), v());
+ })));
+ }), [
+ r,
+ a,
+ u
+ ]), [
+ {
+ getAccessToken: r,
+ accountDomain: u,
+ status: p
+ },
+ m,
+ v
+ ];
+ }(), f = d[0], p = d[1], h = d[2], g = function(e) {
+ var t = (0, s.useState)(e ?? ""), n = t[0], r = t[1], o = (0, s.useState)(e ? "validating" : "empty"), i = o[0], a = o[1], l = (0, s.useRef)();
+ return (0, s.useEffect)((function() {
+ if (n) {
+ var e = !1;
+ return l.current = setTimeout((function() {
+ (function(e) {
+ return Ox(this, void 0, void 0, (function() {
+ var t, n, r;
+ return jx(this, (function(o) {
+ switch (o.label) {
+ case 0: t = Kx(e.trim()) + "feeds/media/is-bynder-portal/", o.label = 1;
+ case 1: return o.trys.push([
+ 1,
+ 4,
+ ,
+ 5
+ ]), [4, fetch(t)];
+ case 2: return [4, (n = o.sent()).json()];
+ case 3: return r = o.sent(), n.status === 200 && n.headers.get("Content-Type") === "application/json;charset=UTF-8" ? [2, r.webdam ? "webdam" : "bynder"] : [2, "invalid"];
+ case 4: return o.sent(), [2, "invalid"];
+ case 5: return [2];
+ }
+ }));
+ }));
+ })(n).then((function(t) {
+ e || (a(t === "invalid" ? "invalid" : "valid"), localStorage.setItem("cvp", t));
+ }));
+ }), 1e3), function() {
+ e = !0;
+ };
+ }
+ }), [n]), [
+ n,
+ function(e) {
+ l.current && clearTimeout(l.current), r(e), a(e === "" ? "empty" : "validating");
+ },
+ i
+ ];
+ }(e.portal?.url ?? f.accountDomain), m = g[0], v = g[1], y = g[2], b = (0, s.useState)(!1), w = b[0], x = b[1];
+ (0, s.useEffect)((function() {
+ var t;
+ (t = e.authentication) != null && t.hideLogout && !e.authentication?.getAccessToken && gE.error("The hideLogout property can only be used in combination with getAccessToken property");
+ }), [e.authentication?.hideLogout, e.authentication?.getAccessToken]), (0, s.useEffect)((function() {
+ var t;
+ (t = e.authentication) != null && t.getAccessToken && p({
+ getAccessToken: e.authentication.getAccessToken,
+ accountDomain: e.portal?.url
+ });
+ }), [e.authentication?.getAccessToken]), (0, s.useEffect)((function() {
+ var e = !0;
+ return !0 === w && function(e) {
+ return Ox(this, void 0, void 0, (function() {
+ var t, n, r, o, i, a, s, l, c, u, d;
+ return jx(this, (function(f) {
+ switch (f.label) {
+ case 0: t = nE(), f.label = 1;
+ case 1: return f.trys.push([
+ 1,
+ 3,
+ ,
+ 4
+ ]), [4, tE(t)];
+ case 2: return n = f.sent(), [3, 4];
+ case 3: return [2, Gx(f.sent().toString())];
+ case 4: return p = n, r = btoa(String.fromCharCode.apply(null, Array.from(new Uint8Array(p)))).replace(/\+/g, "-").replace(/\//g, "_").replace(/[=]+$/, ""), o = nE(), i = function(e, t, n) {
+ var r = {
+ client_id: rE,
+ code_challenge: e,
+ code_challenge_method: "S256",
+ redirect_uri: iE,
+ response_type: "code",
+ scope: sE.join(" "),
+ domain: "",
+ state: t
+ }, o = "auth?";
+ uE() === "webdam" && (o = "authorize?", delete r.scope, r.domain = n);
+ var i = new URLSearchParams(r);
+ return cE(n) + o + i;
+ }(r, o, e), [4, dE(i)];
+ case 5: return Zx(a = f.sent()) ? [2, a] : a.value.state !== o || a.value.code === null ? [2, Gx("Error logging in")] : [4, lE(a.value.code, t, e)];
+ case 6: return Zx(s = f.sent()) ? [2, s] : (l = s.value, c = l.refreshToken, u = l.accessToken, d = l.expiresIn, [2, qx({
+ accessToken: u,
+ expiresIn: parseFloat(d),
+ refreshToken: c
+ })]);
+ }
+ var p;
+ }));
+ }));
+ }(m).then((function(t) {
+ e && (function(e) {
+ if (Yx(e)) {
+ var t = e.value, n = t.accessToken, r = t.refreshToken, o = t.expiresIn;
+ p({
+ getAccessToken: function() {
+ return n;
+ },
+ refreshToken: r,
+ expiresIn: o,
+ accountDomain: m
+ });
+ } else gE.error(e.error);
+ }(t), x(!1));
+ })), function() {
+ e = !1;
+ };
+ }), [w, m]);
+ var E = Tx(Tx({}, f), {
+ logout: function() {
+ var t;
+ h(), (t = e.onLogout) == null || t.call(e);
+ },
+ hideLogout: !!e.authentication?.getAccessToken && e.authentication.hideLogout
+ });
+ switch (f.status) {
+ case "authenticated": return s.default.createElement(vS.Provider, { value: E }, e.children);
+ case "not-authenticated": return s.default.createElement(IE, { isContainerMode: !0 }, s.default.createElement(JE, {
+ domainValue: m,
+ domainStatus: y,
+ onChangeDomain: v,
+ isSubmitting: w,
+ isEditable: (u = e.portal?.editable) == null || u,
+ onSubmit: function() {
+ x(!0);
+ }
+ }));
+ case "refreshing": return s.default.createElement(mS, null);
+ }
+}
+var bS = function(e) {
+ return s.default.createElement(gS, null, s.default.createElement(yS, Tx({}, e)));
+}, wS = function() {
+ return (0, s.useContext)(vS);
+};
+function xS(e) {
+ var t = e.width, n = t === void 0 ? 100 : t, r = e.className;
+ return s.default.createElement("span", {
+ className: WE("cv-skeleton", r),
+ style: { width: n },
+ "data-testid": "skeleton"
+ }, "");
+}
+function ES(e) {
+ var t = (0, s.useState)(void 0), n = t[0], r = t[1], o = (0, s.useRef)(void 0);
+ function i(t) {
+ o.current !== void 0 && cancelAnimationFrame(o.current), o.current = requestAnimationFrame((function() {
+ var n = t ?? e;
+ if (n !== null) {
+ var o = n.getBoundingClientRect();
+ r({
+ width: o.width,
+ height: o.height,
+ scrollWidth: n.scrollWidth
+ });
+ }
+ }));
+ }
+ return (0, s.useEffect)((function() {
+ i();
+ var e = function() {
+ return i();
+ };
+ return window.addEventListener("resize", e), function() {
+ window.removeEventListener("resize", e), o.current && cancelAnimationFrame(o.current);
+ };
+ }), [e]), {
+ dimensions: n,
+ remeasure: i
+ };
+}
+function SS(e) {
+ return s.default.createElement(kS, { $isVisible: e.isVisible }, s.default.createElement(il, {
+ icon: s.default.createElement(Qo, null),
+ "aria-label": "Next",
+ title: "Next",
+ variant: "clean",
+ isSmall: !0,
+ onClick: e.onClick,
+ "data-testid": "arrow-right"
+ }));
+}
+var CS, kS = ao.div(CS ||= Ax(["\n z-index: 20;\n padding: 0;\n box-shadow: -16px 0px 10px 0px #ffffff;\n\n &:hover {\n box-shadow: -16px 0px 10px 0px #ffffff;\n }\n\n ", "\n"], ["\n z-index: 20;\n padding: 0;\n box-shadow: -16px 0px 10px 0px #ffffff;\n\n &:hover {\n box-shadow: -16px 0px 10px 0px #ffffff;\n }\n\n ", "\n"]), (function(e) {
+ return !e.$isVisible && "display: none;\n ";
+}));
+function _S(e) {
+ return s.default.createElement(IS, { $isVisible: e.isVisible }, s.default.createElement(il, {
+ icon: s.default.createElement(Jo, null),
+ "aria-label": "Previous",
+ title: "Previous",
+ variant: "clean",
+ isSmall: !0,
+ onClick: e.onClick,
+ "data-testid": "arrow-left"
+ }));
+}
+var TS, IS = ao.div(TS ||= Ax(["\n z-index: 20;\n padding: 0;\n box-shadow: 4px 0 13px 13px #fff;\n\n &:hover {\n box-shadow: 4px 0 13px 13px #fff;\n }\n\n ", "\n"], ["\n z-index: 20;\n padding: 0;\n box-shadow: 4px 0 13px 13px #fff;\n\n &:hover {\n box-shadow: 4px 0 13px 13px #fff;\n }\n\n ", "\n"]), (function(e) {
+ return !e.$isVisible && "display: none;\n ";
+}));
+function OS(e) {
+ var t = (0, s.useState)(0), n = t[0], r = t[1], o = (0, s.useRef)(null), i = ES(o.current), a = i.dimensions, l = i.remeasure, c = o.current === null ? 0 : o.current.scrollWidth - o.current.clientWidth, u = a !== void 0 && a.width < a.scrollWidth;
+ (0, s.useEffect)((function() {
+ l(o.current);
+ }), [e.children, o.current]), (0, s.useEffect)((function() {
+ u || r(0);
+ }), [u]);
+ var d = n > 0, f = c > 5 && n !== c;
+ return s.default.createElement("div", { className: WE("inline-flex flex-grow overflow-hidden", e.className) }, u && s.default.createElement(_S, {
+ isVisible: d,
+ onClick: function() {
+ r((function(e) {
+ var t = Math.max(e - 250, 0);
+ return t >= 100 ? t : 0;
+ }));
+ }
+ }), s.default.createElement("div", {
+ className: "overflow-hidden",
+ ref: o
+ }, s.default.createElement("div", {
+ className: "transition-transform inline-flex",
+ style: { transform: `translateX(${-n}px)` },
+ "data-testid": "horizontal-scrollable-el"
+ }, e.children)), u && s.default.createElement(SS, {
+ isVisible: f,
+ onClick: function() {
+ r((function(e) {
+ var t = Math.min(e + 250, c);
+ return t <= c - 100 ? t : c;
+ }));
+ }
+ }), e.static);
+}
+var jS, PS, AS, NS, MS = ao.div(jS ||= Ax([
+ "\n width: 100%;\n font-size: ",
+ ";\n align-items: center;\n cursor: ",
+ ";\n display: ",
+ ";\n\n div:last-of-type {\n flex-grow: 1;\n }\n"
+], [
+ "\n width: 100%;\n font-size: ",
+ ";\n align-items: center;\n cursor: ",
+ ";\n display: ",
+ ";\n\n div:last-of-type {\n flex-grow: 1;\n }\n"
+]), po.fontSize75, (function(e) {
+ return e.$isLoading && !e.$isChecked ? "wait" : "pointer";
+}), (function(e) {
+ return e.$isFlex ? "flex" : "block";
+})), LS = ao.li(PS ||= Ax([
+ "\n padding: ",
+ " ",
+ ";\n\n &:hover {\n background-color: ",
+ ";\n }\n"
+], [
+ "\n padding: ",
+ " ",
+ ";\n\n &:hover {\n background-color: ",
+ ";\n }\n"
+]), po.spacing2, po.spacing5, po.gray25), DS = ao.div(AS ||= Ax([
+ "\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: ",
+ ";\n color: ",
+ ";\n"
+], [
+ "\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: ",
+ ";\n color: ",
+ ";\n"
+]), po.fontSize75, (function(e) {
+ return e.$isChecked ? "inherit" : po.gray500;
+})), RS = ao.span(NS ||= Ax(["\n margin: 1px ", " 1px 0;\n flex-grow: 1;\n max-width: 124px;\n"], ["\n margin: 1px ", " 1px 0;\n flex-grow: 1;\n max-width: 124px;\n"]), po.spacing4);
+function zS(e) {
+ var t = e.selectedOptionIds !== void 0 && e.selectedOptionIds.includes(e.metapropertyOption.id);
+ return s.default.createElement(LS, null, s.default.createElement(MS, {
+ $isChecked: t,
+ $isLoading: !!e.isLoading
+ }, s.default.createElement(gg, {
+ isChecked: t,
+ onChange: function() {
+ t ? e.onRemoveOption() : e.isLoading || e.onAddOption();
+ },
+ "data-testid": "metaproperty-option"
+ }, s.default.createElement(DS, { $isChecked: t }, s.default.createElement(RS, { title: e.metapropertyOption.label }, s.default.createElement(Nd, null, e.metapropertyOption.label)), s.default.createElement("span", { className: "fade-in-down" }, e.metapropertyOption.assetCount)))));
+}
+function $S(e) {
+ return s.default.createElement(US, { "data-testid": "metaproperty-filter-content" }, s.default.createElement("h1", {
+ className: "mb-2 px-4 truncate",
+ title: e.metaproperty.label
+ }, e.metaproperty.label), s.default.createElement(HS, null, e.metaproperty.options.map((function(t) {
+ return s.default.createElement(zS, {
+ key: t.id,
+ metapropertyOption: t,
+ selectedOptionIds: e.selectedOptionIds,
+ isLoading: e.isLoading,
+ onAddOption: function() {
+ return e.onAddOption(t);
+ },
+ onRemoveOption: function() {
+ return e.onRemoveOption(t);
+ }
+ });
+ }))));
+}
+var BS, FS, US = ao.div(BS ||= Ax(["\n padding-top: ", ";\n width: 224px;\n"], ["\n padding-top: ", ";\n width: 224px;\n"]), po.spacing5), HS = ao.ul(FS ||= Ax(["\n max-height: 400px;\n overflow-y: auto;\n padding-bottom: 4px;\n width: 100%;\n"], ["\n max-height: 400px;\n overflow-y: auto;\n padding-bottom: 4px;\n width: 100%;\n"]));
+function WS(e) {
+ var n = (0, s.useRef)(null), r = (0, s.useState)(0)[1];
+ (function(e, t) {
+ var n = yE();
+ (0, s.useEffect)((function() {
+ function r(n) {
+ var r = n.target;
+ e.map((function(e) {
+ return e?.current;
+ })).some((function(e) {
+ return e && e.contains(r);
+ })) || t();
+ }
+ return n?.addEventListener("mousedown", r), function() {
+ return n?.removeEventListener("mousedown", r);
+ };
+ }), [
+ e,
+ t,
+ n
+ ]);
+ })([e.target, n], e.onClickOutside), (0, s.useLayoutEffect)((function() {
+ r(e.target.current === null ? 0 : e.target.current.getBoundingClientRect().x);
+ }), [e.target]);
+ var o = yE(), i = o.querySelector(".cv-root") ?? o;
+ if (o === null || e.target.current === null) return null;
+ var a = e.target.current.getBoundingClientRect(), l = a.x, c = window.innerWidth, u = l + 300 > c ? void 0 : l, d = l + 300 > c ? c - a.width - l : void 0, f = e.direction === "Down" ? a.top + a.height : void 0, p = e.direction === "Up" ? window.innerHeight - a.top : void 0, h = i.getBoundingClientRect(), g = h.width - (u ?? 0) - (d ?? 0), m = h.height - (p ?? 0) - (f ?? 0);
+ u && g < 300 && (u = l + a.width - 300);
+ var v = {
+ left: u,
+ right: d,
+ top: f,
+ bottom: p,
+ maxWidth: g,
+ maxHeight: m,
+ minWidth: 300
+ }, y = WE("cv-root cv-dropdown select-none", e.className);
+ return (0, Qa.createPortal)(s.default.createElement("div", {
+ role: "menu",
+ id: e.id,
+ className: y,
+ ref: n,
+ style: v
+ }, e.children), o);
+}
+function VS(e) {
+ var t = e.buttonKind, n = t === void 0 ? "clean" : t, r = e.direction, o = r === void 0 ? "Down" : r, i = e.isSmall, a = e.fadeIn, l = Ix(e, [
+ "buttonKind",
+ "direction",
+ "isSmall",
+ "fadeIn"
+ ]), c = (0, s.useMemo)((function() {
+ return `dropdownmenu-${Date.now()}-${Math.random().toString(36).substring(2)}`;
+ }), []), u = (0, s.useState)(!1), d = u[0], f = u[1], p = (0, s.useRef)(null), h = function() {
+ return f((function(e) {
+ return !e;
+ }));
+ };
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(GS, { $fadeIn: !!a }, s.default.createElement(il, {
+ variant: n,
+ isSmall: i,
+ onClick: h,
+ ref: p,
+ isDisabled: l.disabled,
+ isPressed: d,
+ "aria-haspopup": !0,
+ "aria-expanded": d,
+ "aria-controls": c,
+ "data-testid": "button"
+ }, s.default.createElement("span", {
+ className: "inline-flex items-center",
+ title: l.alt
+ }, l.title), s.default.createElement(si, { className: "w-6 h-6 ml-1 -mr-2" }))), d && s.default.createElement(WS, {
+ className: l.className,
+ onClickOutside: h,
+ direction: o,
+ target: p,
+ id: c
+ }, l.children(h)));
+}
+var qS, GS = ao.div(qS ||= Ax(["\n text-transform: inherit;\n ", "\n"], ["\n text-transform: inherit;\n ", "\n"]), (function(e) {
+ return e.$fadeIn ? "animation: var(--fade-in-down);" : "";
+}));
+function YS(e) {
+ return s.default.createElement(KS, null, e.smartfilter.metaproperties.map((function(t) {
+ return s.default.createElement($S, {
+ key: t.id,
+ metaproperty: t,
+ selectedOptionIds: e.selectedOptionIds,
+ isLoading: e.isLoading,
+ onAddOption: e.onAddOption,
+ onRemoveOption: e.onRemoveOption
+ });
+ })));
+}
+var ZS, KS = ao.div(ZS ||= Ax(["\n display: flex;\n flex-wrap: wrap;\n gap: ", ";\n overflow: auto;\n"], ["\n display: flex;\n flex-wrap: wrap;\n gap: ", ";\n overflow: auto;\n"]), po.spacing4);
+function XS(e) {
+ var t, n, r = Rx(), o = r.metaproperties.map((function(e) {
+ return e.id;
+ })), i = (t = e.metapropertyFilters.filter((function(e) {
+ return e.__typename === "Metaproperty" || e.metaproperties.length !== 0;
+ })), n = function(e) {
+ return e.__typename === "Metaproperty" ? 1e4 : e.zIndex;
+ }, Px([], t, !0).sort((function(e, t) {
+ return n(e) - n(t);
+ })));
+ return s.default.createElement(s.default.Fragment, null, i.map((function(t) {
+ return s.default.createElement(VS, {
+ key: t.id,
+ title: s.default.createElement(JS, { filter: t }),
+ alt: t.label,
+ isSmall: !0,
+ fadeIn: !0
+ }, (function() {
+ return s.default.createElement(s.default.Fragment, null, e.isLoading && s.default.createElement(VE, { className: "absolute top-0 right-0 mr-2 mt-3 bg-ui-0" }), t.__typename === "Metaproperty" ? s.default.createElement($S, {
+ metaproperty: t,
+ selectedOptionIds: o,
+ isLoading: e.isLoading,
+ onAddOption: r.addMetaproperty,
+ onRemoveOption: r.removeMetaproperty
+ }) : s.default.createElement(YS, {
+ smartfilter: t,
+ selectedOptionIds: o,
+ isLoading: e.isLoading,
+ onAddOption: r.addMetaproperty,
+ onRemoveOption: r.removeMetaproperty
+ }));
+ }));
+ })));
+}
+function JS(e) {
+ var t = e.filter;
+ return s.default.createElement(s.default.Fragment, null, t.__typename === "Smartfilter" && t.icon && s.default.createElement("i", { className: WE("fa fa-lg mr-2", t.icon) }), s.default.createElement("span", {
+ className: "max-w-24 truncate",
+ "data-testid": "metaproperty-filter"
+ }, t.label));
+}
+function QS(e) {
+ var t = Rx(), n = t.tags.includes(e.tag.name);
+ return s.default.createElement(tC, {
+ key: e.tag.id,
+ size: "s",
+ onClick: function() {
+ n ? t.removeTag(e.tag.name) : e.isLoading || t.addTag(e.tag.name);
+ },
+ "data-testid": "tag-item",
+ $active: n
+ }, s.default.createElement("span", { className: "max-w-32 truncate" }, e.tag.name), s.default.createElement("span", { className: "text-body-400 ml-2" }, e.tag.assetCount));
+}
+var eC, tC = ao(Cp)(eC ||= Ax([
+ "\n background-color: ",
+ ";\n border: 1px solid var(--gray50);\n transition: color 0.05s linear, background-color 0.05s linear, border-color 0.05s linear,\n opacity 0.05s linear;\n margin-right: ",
+ ";\n margin-bottom: ",
+ ";\n"
+], [
+ "\n background-color: ",
+ ";\n border: 1px solid var(--gray50);\n transition: color 0.05s linear, background-color 0.05s linear, border-color 0.05s linear,\n opacity 0.05s linear;\n margin-right: ",
+ ";\n margin-bottom: ",
+ ";\n"
+]), (function(e) {
+ return e.$active ? po.gray50 : "transparent";
+}), po.spacing3, po.spacing3);
+function nC(e) {
+ var t = Px([], e.tags, !0).sort((function(e, t) {
+ return t.assetCount - e.assetCount;
+ }));
+ return s.default.createElement(VS, {
+ title: s.default.createElement(rC, null),
+ className: "pt-4 pb-1 overflow-hidden max-w-600",
+ isSmall: !0,
+ fadeIn: !0
+ }, (function() {
+ return s.default.createElement(s.default.Fragment, null, e.isLoading && s.default.createElement(VE, { className: "absolute top-0 right-0 mr-2 mt-3 bg-ui-0" }), s.default.createElement("h1", { className: "px-4 mb-4" }, " ", zx("Tags"), " "), s.default.createElement("div", { className: "flex flex-wrap px-4 -mr-2" }, t.map((function(t) {
+ return s.default.createElement(QS, {
+ key: t.id,
+ tag: t,
+ isLoading: e.isLoading
+ });
+ }))));
+ }));
+}
+function rC() {
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(Fi, { className: "mr-2 inline w-6 h-6" }), s.default.createElement("span", { "data-testid": "tags-filter" }, zx("Tags")));
+}
+function oC(e) {
+ return zx({
+ AUDIO: "Audio",
+ DOCUMENT: "Document",
+ IMAGE: "Image",
+ VIDEO: "Video",
+ ARCHIVE: "Archive"
+ }[e]);
+}
+function iC(e) {
+ switch (e) {
+ case "AUDIO": return Wi;
+ case "DOCUMENT": return wi;
+ case "IMAGE": return ii;
+ case "VIDEO": return Hi;
+ case "ARCHIVE": return Ko;
+ }
+}
+function aC(e) {
+ var t = Rx(), n = t.assetTypes.includes(e.type), r = iC(e.type);
+ return s.default.createElement(LS, { "data-testid": "advanced-options" }, s.default.createElement(MS, {
+ $isChecked: n,
+ $isLoading: e.isLoading
+ }, s.default.createElement(gg, {
+ isChecked: n,
+ onChange: function() {
+ n ? t.removeAssetType(e.type) : t.addAssetType(e.type);
+ },
+ "data-testid": `${oC(e.type)}-filter`
+ }, s.default.createElement(DS, { $isChecked: n }, s.default.createElement(r, null), s.default.createElement(lC, null, oC(e.type)), s.default.createElement("span", { className: "fade-in-down" }, e.count)))));
+}
+var sC, lC = ao.div(sC ||= Ax(["\n margin: 1px ", ";\n flex-grow: 1;\n"], ["\n margin: 1px ", ";\n flex-grow: 1;\n"]), po.spacing3);
+function cC(e) {
+ var t = kx().assetTypes, n = t.filter((function(t) {
+ return dC(e.count, t) > 0;
+ }));
+ return t.length === 0 || n.length === 0 ? null : s.default.createElement(VS, {
+ title: s.default.createElement(uC, null),
+ className: "pt-4 pb-1",
+ isSmall: !0,
+ fadeIn: !0
+ }, (function() {
+ return s.default.createElement(s.default.Fragment, null, e.isLoading && s.default.createElement(VE, { className: "absolute top-0 right-0 mr-2 mt-3 bg-ui-0" }), s.default.createElement("h1", { className: "px-4 mb-4" }, zx("Type")), s.default.createElement("ul", null, n.map((function(t) {
+ return s.default.createElement(aC, {
+ key: t,
+ type: t,
+ count: dC(e.count, t),
+ isLoading: e.isLoading
+ });
+ }))));
+ }));
+}
+function uC() {
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(Yo, { className: "mr-2 inline w-6 h-6" }), zx("Advanced"));
+}
+function dC(e, t) {
+ switch (t) {
+ case "AUDIO": return e.audio;
+ case "DOCUMENT": return e.document;
+ case "IMAGE": return e.image;
+ case "VIDEO": return e.video;
+ case "ARCHIVE": return e.archive;
+ }
+}
+function fC() {
+ var e = Rx(), t = Vx("assets").value, n = kx(), r = n.assetTypes, o = n.language;
+ Bx(o);
+ var i = function(e) {
+ var t = this, n = wS(), r = (0, s.useState)({
+ tag: "Loading",
+ value: null
+ }), o = r[0], i = r[1], a = !1;
+ return (0, s.useEffect)((function() {
+ return Ox(t, void 0, void 0, (function() {
+ var t, r, o, s, l, c;
+ return jx(this, (function(d) {
+ switch (d.label) {
+ case 0: return i((function(e) {
+ return {
+ tag: "Loading",
+ value: e.tag === "Failure" ? null : e.value
+ };
+ })), r = e.searchTerm, o = e.allAssetTypes, s = e.language, l = {
+ filter: {
+ assetType_in: (t = e.filter).assetTypes ?? o,
+ collectionId: null,
+ metapropertyOptionId_in: t.metaproperties.map((function(e) {
+ return e.id;
+ })),
+ searchTerm: r,
+ tagNames_in: t.tags,
+ isLimitedUse: t.isLimited
+ },
+ language: s
+ }, [4, eE("\nquery searchAssets($filter: AssetFilter!, $language: String!) {\n searchAssets(filter: $filter) {\n tags {\n nodes {\n id\n name\n assetCount\n }\n }\n metapropertyFilters {\n nodes {\n __typename\n ... on Smartfilter {\n id\n label(language: $language)\n metaproperties {\n id\n label(language: $language)\n options {\n id\n label(language: $language)\n assetCount\n }\n }\n icon\n zIndex\n }\n ... on Metaproperty {\n id\n label(language: $language)\n options {\n id\n label(language: $language)\n assetCount\n }\n }\n }\n }\n count {\n assetType {\n image\n video\n audio\n document\n archive\n }\n }\n }\n }", l, n)];
+ case 1: return c = d.sent(), a || (Zx(c) ? i({
+ tag: "Failure",
+ value: c.error
+ }) : i({
+ tag: "Loaded",
+ value: c.value
+ })), [2];
+ }
+ }));
+ })), function() {
+ a = !0;
+ };
+ }), [
+ e.filter.assetTypes,
+ e.filter.metaproperties,
+ e.filter.tags,
+ e.searchTerm
+ ]), {
+ data: o,
+ isLoading: o.tag === "Loading"
+ };
+ }({
+ filter: e,
+ searchTerm: t || null,
+ allAssetTypes: r,
+ language: o
+ }), a = i.data, l = i.isLoading;
+ if (a.tag === "Failure" || !a.value) return s.default.createElement("nav", { className: "flex justify-between bg-ui-0 px-4 py-2 z-20" }, s.default.createElement(pC, null));
+ var c = a.value.searchAssets, u = c.metapropertyFilters, d = c.tags, f = c.count;
+ return s.default.createElement("nav", {
+ className: "flex justify-between bg-ui-0 px-4 py-2 z-20",
+ "data-testid": "filter-nav"
+ }, s.default.createElement(OS, { className: "h-8" }, u && u.nodes.length > 0 && s.default.createElement(XS, {
+ metapropertyFilters: u.nodes,
+ isLoading: l
+ }), d && d.nodes.length > 0 && s.default.createElement(nC, {
+ tags: d.nodes,
+ isLoading: l
+ }), s.default.createElement(cC, {
+ isLoading: l,
+ count: f.assetType
+ })));
+}
+function pC() {
+ return s.default.createElement("div", { className: "inline-flex items-center" }, s.default.createElement(xS, {
+ className: "h-4 ml-2 mr-2 my-2",
+ width: 100
+ }), s.default.createElement(xS, {
+ className: "h-4 ml-2 mr-2 my-2",
+ width: 80
+ }), s.default.createElement(xS, {
+ className: "h-4 ml-2 mr-2 my-2",
+ width: 110
+ }));
+}
+var hC = (0, s.createContext)(null), gC = {
+ field: "CREATED_AT",
+ direction: "DESC"
+};
+function mC(e) {
+ var t = (0, s.useState)(gC), n = t[0], r = t[1];
+ function o(e) {
+ r(e);
+ }
+ function i() {
+ r(gC);
+ }
+ var a = (0, s.useMemo)((function() {
+ return {
+ assets: n,
+ setOrdering: o,
+ reset: i
+ };
+ }), [n]);
+ return s.default.createElement(hC.Provider, { value: a }, e.children);
+}
+function vC(e) {
+ var t = function() {
+ var e = (0, s.useContext)(hC);
+ if (e === null) throw Error("useOrdering must be used with a OrderingProvider");
+ return e;
+ }();
+ return [t[e], function(e) {
+ return t.setOrdering(e);
+ }];
+}
+var yC = "\nfragment DisplayAsset on Asset {\n __typename\n id\n derivatives {\n thumbnail\n }\n extensions\n name\n url\n isArchived\n isWatermarked\n isLimitedUse\n files\n metaproperties {\n nodes {\n id\n label(language: $language)\n showInGridView\n showInListView\n zIndex\n options {\n id\n label(language: $language)\n assetCount\n }\n }\n }\n textMetaproperties {\n name\n value\n type\n label\n zIndex\n showInGridView\n showInListView\n }\n}", bC = `
+ query searchAssets(\$filter: AssetFilter!, \$after: Cursor, \$orderBy: AssetOrder!, \$language: String) {
+ searchAssets(filter: \$filter) {
+ assets(after: \$after, first: 50, orderBy: \$orderBy) {
+ nodes {
+ __typename
+ ...DisplayAsset
+ }
+ totalCount
+ pageInfo {
+ endCursor
+ hasNextPage
+ }
+ }
+ }
+ }
+ ${yC}
+`, wC = function(e, t) {
+ var r = t ?? e;
+ if (r.tag !== "Failure") return r.value?.searchAssets.assets;
+}, xC = function(e) {
+ return e ? e.map((function(e) {
+ return e.id;
+ })) : null;
+};
+function EC(e, t, n) {
+ return Ox(this, void 0, void 0, (function() {
+ var r;
+ return jx(this, (function(o) {
+ switch (o.label) {
+ case 0: return [4, eE(`
+ query getAssetsById(\$ids: [ID!]!, \$language: String) {
+ nodes(ids: \$ids) {
+ __typename
+ id
+ ...on Asset {
+ ...DisplayAsset
+ files
+ }
+ }
+ }
+ ${yC}`, {
+ ids: e,
+ language: n
+ }, t)];
+ case 1: return Zx(r = o.sent()) ? [2, r] : [2, qx(r.value.nodes)];
+ }
+ }));
+ }));
+}
+var SC = (0, s.createContext)(null);
+function CC(e) {
+ var t = (0, s.useState)([]), n = t[0], r = t[1], o = (0, s.useState)(), i = o[0], a = o[1], l = function(e) {
+ var t = this, n = (0, s.useState)([]), r = n[0], o = n[1], i = kx(), a = i.selectionMode, l = i.language, c = wS(), u = !1;
+ return (0, s.useEffect)((function() {
+ if (e) {
+ var n = e ?? [];
+ a !== "MultiSelect" && (n = n[0] ? [n[0]] : []), r = n, Ox(t, void 0, void 0, (function() {
+ var e, t;
+ return jx(this, (function(i) {
+ switch (i.label) {
+ case 0: return r.length ? [4, EC(r, c, l)] : [3, 2];
+ case 1: e = i.sent(), u || Zx(e) || ((t = e.value) == null || t.sort((function(e, t) {
+ return r.indexOf(e.id) - r.indexOf(t.id);
+ })), o(e.value ?? [])), i.label = 2;
+ case 2: return [2];
+ }
+ }));
+ }));
+ }
+ var r;
+ return function() {
+ u = !0;
+ };
+ }), [e]), r;
+ }(i), c = kx().selectionMode;
+ function u() {
+ r([]);
+ }
+ function d(e) {
+ r((function(t) {
+ var n = e.filter((function(e) {
+ return !kC(t, e);
+ }));
+ return Px(Px([], t, !0), n.map((function(e) {
+ return {
+ type: "asset",
+ value: e
+ };
+ })), !0);
+ }));
+ }
+ function f(e) {
+ var t;
+ c === "MultiSelect" ? r((function(t) {
+ var n = e.filter((function(e) {
+ return !kC(t, e);
+ })), r = e.filter((function(e) {
+ return kC(t, e);
+ }));
+ return Px(Px([], t.filter((function(e) {
+ return !r.some((function(t) {
+ return t.id === e.value.id;
+ }));
+ })), !0), n.map((function(e) {
+ return {
+ type: "asset",
+ value: e
+ };
+ })), !0);
+ })) : (t = e[0], n.some((function(e) {
+ return e.value.id === t.id;
+ })) ? r([]) : r([{
+ type: "asset",
+ value: t
+ }]));
+ }
+ (0, s.useEffect)((function() {
+ a((e.preselectedAssetIds ?? []).filter((function(e) {
+ return !!e;
+ })).map((function(e) {
+ return window.btoa("(Asset_id " + e + ")");
+ })));
+ }), [e.preselectedAssetIds]), (0, s.useEffect)((function() {
+ d(l);
+ }), [l]);
+ var p = (0, s.useMemo)((function() {
+ return {
+ selection: n,
+ preselectedAssetIds: i,
+ clear: u,
+ selectAssets: d,
+ toggleAssets: f
+ };
+ }), [n]);
+ return s.default.createElement(SC.Provider, { value: p }, e.children);
+}
+function kC(e, t) {
+ return e.some((function(e) {
+ return e.value.id === t.id;
+ }));
+}
+function _C() {
+ var e = (0, s.useContext)(SC);
+ if (e === null) throw Error("useSelection must be used with a SelectionProvider");
+ return e;
+}
+function TC() {
+ var e = Vx("assets"), t = e.value, n = e.isLoading, r = Ho(e.setSearch, 500), o = (0, s.useState)(t), i = o[0], a = o[1];
+ (0, s.useEffect)((function() {
+ a(t);
+ }), [t]), (0, s.useEffect)((function() {
+ return function() {
+ r.flush();
+ };
+ }), [r]);
+ var l = zx("Search for assets");
+ return s.default.createElement(OC, null, s.default.createElement(Gl, {
+ value: i,
+ placeholder: l,
+ "aria-label": l,
+ onChange: function(e) {
+ a(t = e), r(t);
+ return;
+ var t;
+ },
+ "data-testid": "search-input",
+ icon: s.default.createElement(Mi, null),
+ iconRight: n ? s.default.createElement("div", {
+ role: "alert",
+ "aria-live": "polite"
+ }, s.default.createElement(VE, { className: "relative right-0" })) : void 0,
+ hasClearButton: !n && !!t
+ }));
+}
+var IC, OC = ao.div(IC ||= Ax(["\n width: 100%;\n max-width: 440px;\n"], ["\n width: 100%;\n max-width: 440px;\n"]));
+function jC() {
+ var e = function() {
+ return (0, s.useContext)(vS)?.status === "authenticated" || !1;
+ }(), t = jE(), n = wS(), r = kx().assetFilter;
+ return e || t || r === void 0 ? s.default.createElement(LC, null, s.default.createElement(MC, null), s.default.createElement(TC, null), s.default.createElement(DC, null, e && !n?.hideLogout && s.default.createElement(il, {
+ variant: "clean",
+ onClick: function() {
+ return n?.logout();
+ },
+ rightIcon: s.default.createElement(bi, null)
+ }, zx("Log out")), t && s.default.createElement(il, {
+ variant: "clean",
+ onClick: function() {
+ return t.onClose();
+ },
+ title: zx("Close"),
+ icon: s.default.createElement(ai, null)
+ }))) : null;
+}
+var PC, AC, NC, MC = ao.div(PC ||= Ax(["\n display: inline-flex;\n margin-right: auto;\n"], ["\n display: inline-flex;\n margin-right: auto;\n"])), LC = ao.nav(AC ||= Ax([
+ "\n display: flex;\n justify-content: space-between;\n background: ",
+ ";\n padding: ",
+ " ",
+ ";\n z-index: 30;\n"
+], [
+ "\n display: flex;\n justify-content: space-between;\n background: ",
+ ";\n padding: ",
+ " ",
+ ";\n z-index: 30;\n"
+]), po.gray10, po.spacing5, po.spacing4), DC = ao.div(NC ||= Ax(["\n display: inline-flex;\n margin-left: auto;\n"], ["\n display: inline-flex;\n margin-left: auto;\n"]));
+function RC() {
+ return s.default.createElement("svg", {
+ viewBox: "0 5 60 82",
+ className: "h-20"
+ }, s.default.createElement("defs", null, s.default.createElement("filter", {
+ x: "-1.7%",
+ y: "-1.2%",
+ width: "103.3%",
+ height: "105%",
+ filterUnits: "objectBoundingBox",
+ id: "prefix__a"
+ }, s.default.createElement("feOffset", {
+ dy: "2",
+ in: "SourceAlpha",
+ result: "shadowOffsetOuter1"
+ }), s.default.createElement("feColorMatrix", {
+ values: "0 0 0 0 0 0 0 0 0 0.133333333 0 0 0 0 0.2 0 0 0 0.05 0",
+ in: "shadowOffsetOuter1"
+ })), s.default.createElement("filter", {
+ x: "-5%",
+ y: "-5%",
+ width: "110%",
+ height: "120%",
+ filterUnits: "objectBoundingBox",
+ id: "prefix__c"
+ }, s.default.createElement("feOffset", {
+ dy: "2",
+ in: "SourceAlpha",
+ result: "shadowOffsetOuter1"
+ }), s.default.createElement("feColorMatrix", {
+ values: "0 0 0 0 0 0 0 0 0 0.133333333 0 0 0 0 0.2 0 0 0 0.05 0",
+ in: "shadowOffsetOuter1"
+ })), s.default.createElement("path", {
+ d: "M5 5h35l20 20v55a5 5 0 01-5 5H5a5 5 0 01-5-5V10a5 5 0 015-5z",
+ id: "prefix__b"
+ }), s.default.createElement("path", {
+ d: "M40 5l20 20H45a5 5 0 01-5-5V5z",
+ id: "prefix__d"
+ })), s.default.createElement("g", {
+ fill: "none",
+ fillRule: "evenodd"
+ }, s.default.createElement("use", {
+ fill: "#000",
+ filter: "url(#prefix__a)",
+ xlinkHref: "#prefix__b"
+ }), s.default.createElement("use", {
+ fill: "#FFF",
+ xlinkHref: "#prefix__b"
+ }), s.default.createElement("g", { fillRule: "nonzero" }, s.default.createElement("use", {
+ fill: "#000",
+ filter: "url(#prefix__c)",
+ xlinkHref: "#prefix__d"
+ }), s.default.createElement("use", {
+ fill: "#FFF",
+ xlinkHref: "#prefix__d"
+ }))));
+}
+function zC(e) {
+ return s.default.createElement(VC, null, s.default.createElement(qC, null, s.default.createElement(RC, null), s.default.createElement(GC, null)), s.default.createElement(YC, null, zx("No results found")), s.default.createElement(ZC, null, zx("Try adjusting the filter to find assets.")), s.default.createElement(KC, null, s.default.createElement(il, {
+ variant: "primary",
+ title: zx("Reset filters"),
+ onClick: e.onReset
+ }, zx("Reset filters"))));
+}
+var $C, BC, FC, UC, HC, WC, VC = ao.div($C ||= Ax(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"], ["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"])), qC = ao.div(BC ||= Ax(["\n background-color: ", ";\n border-radius: 50%;\n width: 160px;\n height: 160px;\n display: flex;\n justify-content: center;\n align-items: center;\n"], ["\n background-color: ", ";\n border-radius: 50%;\n width: 160px;\n height: 160px;\n display: flex;\n justify-content: center;\n align-items: center;\n"]), po.gray25), GC = ao(Mi)(FC ||= Ax([
+ "\n position: absolute;\n margin: ",
+ " 0 0 1px;\n color: ",
+ ";\n width: 36px;\n height: 36px;\n"
+], [
+ "\n position: absolute;\n margin: ",
+ " 0 0 1px;\n color: ",
+ ";\n width: 36px;\n height: 36px;\n"
+]), po.spacing2, po.gray300), YC = ao.h1(UC ||= Ax([
+ "\n margin-top: ",
+ ";\n font-size: ",
+ ";\n"
+], [
+ "\n margin-top: ",
+ ";\n font-size: ",
+ ";\n"
+]), po.spacing6, po.fontSize400), ZC = ao.span(HC ||= Ax([
+ "\n margin-top: ",
+ ";\n color: ",
+ ";\n"
+], [
+ "\n margin-top: ",
+ ";\n color: ",
+ ";\n"
+]), po.spacing5, po.colorTextDisabled), KC = ao.div(WC ||= Ax(["\n margin-top: ", ";\n"], ["\n margin-top: ", ";\n"]), po.spacing7);
+function XC(e) {
+ return s.default.createElement(QC, {
+ icon: e.icon,
+ size: "s",
+ onDelete: e.onClick,
+ "data-testid": `selected-filter:${e.title}`
+ }, e.title);
+}
+var JC, QC = ao(Cp)(JC ||= Ax(["\n background-color: transparent;\n margin-right: ", ";\n border: 1px solid var(--gray50);\n box-shadow: 0 1px 6px -2px rgba(0, 34, 51, 0.1);\n"], ["\n background-color: transparent;\n margin-right: ", ";\n border: 1px solid var(--gray50);\n box-shadow: 0 1px 6px -2px rgba(0, 34, 51, 0.1);\n"]), po.spacing3);
+function ek() {
+ var e = Rx(), t = e.metaproperties.length === 0 && e.assetTypes.length === 0 && e.tags.length === 0 ? void 0 : s.default.createElement(nk, null, s.default.createElement(il, {
+ variant: "clean",
+ isSmall: !0,
+ onClick: e.clear
+ }, zx("Clear filters")));
+ return s.default.createElement("div", { "data-testid": "selected-filter-list" }, s.default.createElement(OS, {
+ className: "ml-2",
+ static: t
+ }, e.assetTypes.map((function(t) {
+ var n = iC(t);
+ return s.default.createElement(XC, {
+ key: t,
+ onClick: function() {
+ return e.removeAssetType(t);
+ },
+ title: oC(t),
+ icon: s.default.createElement(n, { className: "w-5 h-5 mr-1" })
+ });
+ })), e.metaproperties.map((function(t) {
+ return s.default.createElement(XC, {
+ key: t.id,
+ onClick: function() {
+ return e.removeMetaproperty(t);
+ },
+ title: t.label
+ });
+ })), e.tags.map((function(t) {
+ return s.default.createElement(XC, {
+ key: t,
+ onClick: function() {
+ return e.removeTag(t);
+ },
+ title: t
+ });
+ }))));
+}
+var tk, nk = ao.div(tk ||= Ax(["\n flex-shrink: 0;\n animation: var(--fade-in-down);\n"], ["\n flex-shrink: 0;\n animation: var(--fade-in-down);\n"]));
+function rk(e, t, n) {
+ return (e === 1 ? t : n).replace("{}", e.toString());
+}
+var ok = [
+ "xls",
+ "xlsx",
+ "ppt",
+ "pdf",
+ "pptx",
+ "indd",
+ "mp4",
+ "wav",
+ "docx",
+ "doc",
+ "numbers",
+ "pages",
+ "otf",
+ "txt",
+ "ttf",
+ "mov",
+ "avi",
+ "mpeg",
+ "webm",
+ "fla",
+ "aiff",
+ "mp3",
+ "m4r",
+ "zip",
+ "rar"
+];
+function ik(e) {
+ if (e.derivatives.thumbnail) return e.derivatives.thumbnail;
+ var t = e.extensions[0];
+ return ok.includes(t) ? `https://d8ejoa1fys2rk.cloudfront.net/includes/img/placeholder/medium/${t}.jpg` : `https://d8ejoa1fys2rk.cloudfront.net${t === "aif" ? "/includes/img/placeholder/medium/aiff.jpg" : t === "m4a" ? "/includes/img/placeholder/medium/m4r.jpg" : "/includes/img/common/no-image.png"}`;
+}
+function ak(e) {
+ var t = e.extensions[0];
+ return t?.toUpperCase() === "JPG" ? "JPEG" : t?.toUpperCase();
+}
+var sk, lk, ck, uk, dk = function(e, t) {
+ return e.zIndex && !t.zIndex ? -1 : !e.zIndex && t.zIndex ? 1 : e.zIndex || t.zIndex ? e.zIndex - t.zIndex : 0;
+}, fk = function(e) {
+ var t = function(e, t) {
+ e === void 0 && (e = []), t === void 0 && (t = []);
+ var n = e.map((function(e) {
+ var t = e.label, n = e.options, r = e.zIndex;
+ return {
+ label: t,
+ value: n.map((function(e) {
+ return e.label;
+ })).join(", "),
+ zIndex: r
+ };
+ })), r = t.map((function(e) {
+ var t = e.label, n = e.value, r = e.type, o = e.zIndex;
+ return {
+ label: t,
+ value: r === "date" ? mx(new Date(n), "dd MMMM yyyy") : n,
+ zIndex: o
+ };
+ }));
+ return Px(Px([], n, !0), r, !0).sort(dk);
+ }(e.metaproperties, e.textMetaproperties);
+ return t?.length ? s.default.createElement(op.AdditionalInfo, null, s.default.createElement(pk, null, t.map((function(e) {
+ var t = e.label, n = e.value, r = function(e) {
+ return e.length <= 100 ? e : e.slice(0, 100) + "...";
+ }(n);
+ return s.default.createElement(hk, {
+ key: t,
+ "data-testid": "asset-card-metaproperty"
+ }, s.default.createElement(gk, null, t, ":"), s.default.createElement(mk, { title: n }, r));
+ })))) : null;
+}, pk = ao.dl(sk ||= Ax(["\n color: rgba(0, 34, 51, 0.5);\n font-size: ", ";\n display: flex;\n flex-direction: column;\n grid-row-gap: 1px;\n row-gap: 1px;\n margin: 0;\n"], ["\n color: rgba(0, 34, 51, 0.5);\n font-size: ", ";\n display: flex;\n flex-direction: column;\n grid-row-gap: 1px;\n row-gap: 1px;\n margin: 0;\n"]), po.fontSize75), hk = ao.div(lk ||= Ax(["\n display: flex;\n flex-wrap: wrap;\n"], ["\n display: flex;\n flex-wrap: wrap;\n"])), gk = ao.dt(ck ||= Ax(["\n color: rgba(0, 34, 51, 0.3);\n padding-right: 4px;\n margin: 0;\n"], ["\n color: rgba(0, 34, 51, 0.3);\n padding-right: 4px;\n margin: 0;\n"])), mk = ao.dd(uk ||= Ax(["\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0;\n"], ["\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0;\n"]));
+function vk(e) {
+ var t = e.className, n = e.fadeIn, r = n === void 0 || n, o = e.asset, i = e.isSelected, a = e.isOutlined, l = e.onClick, c = e.children, u = c === void 0 ? null : c, d = kx().hideExternalAccess, f = (0, s.useState)(), p = f[0], h = f[1], g = (0, s.useState)(), m = g[0], v = g[1], y = function(e) {
+ return [
+ e.isArchived && zx("archived"),
+ e.isWatermarked && zx("watermarked"),
+ e.isLimitedUse && zx("limited")
+ ].filter((function(e) {
+ return e;
+ })).join(", ");
+ }(o), b = ak(o);
+ (0, s.useEffect)((function() {
+ h(o.metaproperties?.nodes.filter((function(e) {
+ return e.showInGridView || e.showInListView;
+ })));
+ }), [o.metaproperties]), (0, s.useEffect)((function() {
+ v(o.textMetaproperties?.filter((function(e) {
+ return e.showInGridView || e.showInListView;
+ })));
+ }), [o.textMetaproperties]);
+ var w = function(e) {
+ l !== void 0 && (e.stopPropagation(), l(o, e));
+ };
+ return s.default.createElement(xk, {
+ id: o.id,
+ $isOutlined: i || a,
+ $fadeIn: r,
+ className: WE("group", t),
+ "data-drag-select-id": o.id
+ }, s.default.createElement(op, {
+ selectButtonAriaLabel: zx(i ? "Deselect" : "Select"),
+ onSelect: w,
+ onClick: w,
+ isSelected: i,
+ "aria-selected": i,
+ "data-testid": "asset-card",
+ contextAction: !d && s.default.createElement(op.ContextActionButton, {
+ "aria-label": zx("Open in new tab"),
+ onClick: function() {
+ window.open(o.url, "_blank");
+ }
+ }, s.default.createElement(ji, null))
+ }, s.default.createElement(op.Frame, {
+ icon: y ? s.default.createElement(Ek, { $limitWidth: !!b }, s.default.createElement(Pf, {
+ color: "black-alpha",
+ "data-testid": "asset-tag"
+ }, s.default.createElement(Nd, null, y))) : void 0,
+ "data-testid": "asset-type",
+ badge: b
+ }, s.default.createElement(op.Images, null, ik(o) && s.default.createElement(op.Img, {
+ src: ik(o),
+ alt: o.name,
+ contentResize: "fit"
+ }))), u, s.default.createElement(Sk, { "data-testid": "asset-name" }, o.name), s.default.createElement(fk, {
+ metaproperties: p,
+ textMetaproperties: m
+ })));
+}
+var yk, bk, wk, xk = ao.div(yk ||= Ax([
+ "\n margin: ",
+ ";\n width: 224px;\n align-self: flex-start;\n position: relative;\n ",
+ "\n"
+], [
+ "\n margin: ",
+ ";\n width: 224px;\n align-self: flex-start;\n position: relative;\n ",
+ "\n"
+]), po.spacing3, (function(e) {
+ return e.$fadeIn ? "animation: var(--fade-in-down);" : "";
+})), Ek = ao.div(bk ||= Ax(["\n ", "\n"], ["\n ", "\n"]), (function(e) {
+ return e.$limitWidth && "max-width: 142px;";
+})), Sk = ao.p(wk ||= Ax(["\n width: auto;\n max-width: 100%;\n height: auto;\n line-height: 20px;\n min-height: 20px;\n max-height: 20px;\n padding: var(--card-content-padding);\n transition: all 200ms ease;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n box-sizing: content-box;\n\n &:hover {\n max-height: 80px;\n word-break: break-all;\n white-space: normal;\n }\n"], ["\n width: auto;\n max-width: 100%;\n height: auto;\n line-height: 20px;\n min-height: 20px;\n max-height: 20px;\n padding: var(--card-content-padding);\n transition: all 200ms ease;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n box-sizing: content-box;\n\n &:hover {\n max-height: 80px;\n word-break: break-all;\n white-space: normal;\n }\n"]));
+function Ck(e) {
+ return s.default.createElement(s.default.Fragment, null, Array(e.rows * e.columns).fill(void 0).map((function(t, n) {
+ return s.default.createElement("div", {
+ key: n,
+ className: "m-2 w-56 self-start group relative",
+ "data-testid": "asset-card"
+ }, s.default.createElement(op, null, s.default.createElement(op.Frame, null), s.default.createElement(op.AdditionalInfo, null, s.default.createElement(xS, {
+ width: 70 + (r = n, 16807 * ((r + 20) % 2147483647 + 2147483646) % 2147483647 % 100),
+ className: "h-4"
+ })), e.title));
+ var r;
+ })));
+}
+var kk = {
+ x: null,
+ y: null
+}, _k = "drag-select-container", Tk = function(e) {
+ var t = e.dragContainer, n = e.selectionBoxCustomAttr, r = e.onSelect, o = e.onDeselect, i = e.onDragStart, a = e.onDragEnd, l = (0, s.useState)(kk), c = l[0], u = l[1], d = (0, s.useState)(kk), f = d[0], p = d[1], h = qo(f, 10, {
+ leading: !0,
+ maxWait: 10
+ })[0], g = (0, s.useState)(), m = g[0], v = g[1], y = yE(), b = s.default.useMemo((function() {
+ return Ok(c, h, y.querySelector(".cv-root"));
+ }), [
+ c,
+ h,
+ y
+ ]), w = qo(b, 50, {
+ leading: !1,
+ maxWait: 50
+ })[0], x = (0, s.useState)([]), E = x[0], S = x[1], C = Mk(E), k = (0, s.useRef)(c), _ = (0, s.useRef)(f), T = (0, s.useRef)(k.current.x !== null && k.current.y !== null && _.current.x !== null && _.current.y !== null), I = (0, s.useRef)({
+ shiftKey: !1,
+ metaKey: !1
+ });
+ (0, s.useEffect)((function() {
+ return document.addEventListener("keydown", O, !1), document.addEventListener("keyup", O, !1), function() {
+ document.removeEventListener("keydown", O, !1), document.removeEventListener("keyup", O, !1);
+ };
+ }), []);
+ var O = function(e) {
+ var t = e.shiftKey, n = e.metaKey, r = t || n ? "inverse" : "select";
+ I.current = {
+ shiftKey: t,
+ metaKey: n
+ }, T.current && r !== m && v(r);
+ };
+ (0, s.useEffect)((function() {
+ var e;
+ return typeof i == "function" && T.current ? (O(I.current), i(m ?? "select")) : typeof a != "function" || T.current || (e = setTimeout((function() {
+ return a(m ?? "select");
+ }), 10)), function() {
+ return clearTimeout(e);
+ };
+ }), [T.current, m]);
+ var j = function(e) {
+ k.current = e, u(e), A();
+ }, P = function(e) {
+ _.current = e, p(e), A();
+ }, A = function() {
+ T.current = k.current.x !== null && k.current.y !== null && _.current.x !== null && _.current.y !== null;
+ }, N = (0, s.useCallback)((function(e) {
+ var r = e.clientY, o = e.clientX, i = k.current.x !== null, a = Math.abs(k.current.x ?? 0 - o) >= 1 || Math.abs(k.current.y ?? 0 - r) >= 1;
+ i && a && P({
+ x: o,
+ y: r
+ });
+ }), []), M = (0, s.useCallback)((function() {
+ y.removeEventListener("mousemove", N), y.removeEventListener("mouseup", M), j(kk), P(kk);
+ }), [N, y]), L = (0, s.useCallback)((function(e) {
+ var t = e.clientY, n = e.clientX;
+ e.button === 0 && (y.addEventListener("mousemove", N), y.addEventListener("mouseup", M), j({
+ x: n,
+ y: t
+ }));
+ }), [
+ N,
+ M,
+ y
+ ]);
+ (0, s.useEffect)((function() {
+ var e = y.querySelector(t);
+ return e && (Ak(y), e.addEventListener("mousedown", L)), function() {
+ e && (e.removeEventListener("mousedown", L), Nk(y));
+ };
+ }), [
+ t,
+ L,
+ N,
+ M,
+ y
+ ]), (0, s.useEffect)((function() {
+ var e = y.querySelectorAll("[data-drag-select-id]");
+ S(Array.from(e).reduce((function(e, t) {
+ var n = Pk(t);
+ return t instanceof HTMLElement && jk(n, w) && t.dataset.dragSelectId && e.push(t.dataset.dragSelectId), e;
+ }), []));
+ }), [w, y]), (0, s.useEffect)((function() {
+ if (C && C !== E && T.current) {
+ var e = E.filter((function(e) {
+ return !C.includes(e);
+ })), t = C.filter((function(e) {
+ return !E.includes(e);
+ }));
+ e.length && r(e), t.length && o(t);
+ }
+ }), [
+ E,
+ C,
+ r,
+ o,
+ T
+ ]);
+ var D = y.querySelector(`#${_k}`);
+ return T.current && D ? (0, Qa.createPortal)(s.default.createElement("div", Tx({}, n, {
+ style: n.style ? Tx(Tx(Tx({}, Ik), n.style), b) : Tx(Tx({}, Ik), b),
+ "data-testid": "drag-selection"
+ })), D) : null;
+}, Ik = {
+ position: "absolute",
+ zIndex: 100
+}, Ok = function(e, t, n) {
+ if (!(e.x && e.y && t.x && t.y && n)) return {
+ left: 0,
+ top: 0,
+ height: 0,
+ width: 0
+ };
+ var r = n.getBoundingClientRect(), o = Math.max(t.x, 0), i = Math.min(e.x, o);
+ i = Math.max(i, r.left + 4);
+ var a = Math.min(e.y, t.y), s = Math.abs(t.y - e.y), l = Math.abs(o - e.x), c = r.width + r.left - i - 4;
+ return {
+ left: i,
+ top: a,
+ height: s,
+ width: l = Math.min(l, c)
+ };
+}, jk = function(e, t) {
+ return e.left <= t.left + t.width && e.left + e.width >= t.left && e.top <= t.top + t.height && e.top + e.height >= t.top;
+}, Pk = function(e) {
+ var t = e.getBoundingClientRect();
+ return {
+ left: t.left,
+ top: t.top + window.scrollY,
+ height: t.height,
+ width: t.width
+ };
+}, Ak = function(e) {
+ var t = document.createElement("div");
+ t.id = _k, e.appendChild(t);
+}, Nk = function(e) {
+ var t = e.querySelector(`#${_k}`);
+ t && t.remove();
+}, Mk = function(e) {
+ var t = (0, s.useRef)();
+ return (0, s.useEffect)((function() {
+ t.current = e;
+ })), t.current;
+};
+function Lk(e) {
+ var t = Ex(), n = t[0], r = t[1];
+ return (0, s.useEffect)((function() {
+ r && !e.isLoading && e.hasNextPage && e.loadMore();
+ }), [r]), s.default.createElement(s.default.Fragment, null, e.children, e.hasNextPage && s.default.createElement("div", {
+ className: "relative h-32 w-full",
+ ref: n,
+ "data-testid": "loading-element"
+ }, s.default.createElement(VE, { className: WE(!r && "hidden") })));
+}
+function Dk(e) {
+ var n = e.assets, r = e.count, o = e.hasNextPage, i = o !== void 0 && o, a = e.isLoading, l = a !== void 0 && a, c = e.loadMore, u = c === void 0 ? function() {} : c, d = e.onSelect, f = d === void 0 ? function() {} : d, p = e.onToggle, h = p === void 0 ? function() {} : p, g = e.emptyStateElement, m = g === void 0 ? null : g, v = e.selectedAssetIds, y = v === void 0 ? [] : v, b = e.selectionMode, w = b === void 0 ? "MultiSelect" : b, x = e.children, E = x === void 0 ? null : x, S = (0, s.useRef)(null), C = ES(S.current).dimensions, k = (0, s.useState)([]), _ = k[0], T = k[1], I = (0, s.useState)("inactive"), O = I[0], j = I[1], P = function(e, t) {
+ return e === void 0 ? t ? [Math.ceil(t.height / 188), Math.round((t.width - 16) / 208)] : [0, 0] : [1, e];
+ }(r, C), A = P[0], N = P[1];
+ function M(e) {
+ return (O !== "inverse" || !y.includes(e.id) || !_.includes(e.id)) && (y.includes(e.id) || _.includes(e.id));
+ }
+ return s.default.createElement("div", {
+ className: "flex flex-col flex-grow overflow-y-auto",
+ ref: S,
+ "data-drag-select-container": !0
+ }, E, s.default.createElement("div", {
+ className: "card-list",
+ role: "listbox"
+ }, n.tag === "Loading" && !n.value && s.default.createElement(Ck, {
+ rows: A,
+ columns: N
+ }), n.tag === "Loaded" && n.value.length === 0 && m, (n.tag === "Loading" && n.value || n.tag === "Loaded") && s.default.createElement(s.default.Fragment, null, w === "MultiSelect" && s.default.createElement(Tk, {
+ dragContainer: "[data-drag-select-container]",
+ selectionBoxCustomAttr: {
+ className: "rounded border-2 border-brand-500",
+ style: { zIndex: 1e6 }
+ },
+ onSelect: function(e) {
+ T((function(t) {
+ return Px(Px([], t, !0), e, !0);
+ }));
+ },
+ onDeselect: function(e) {
+ T((function(t) {
+ return t.filter((function(t) {
+ return !e.includes(t);
+ }));
+ }));
+ },
+ onDragStart: function(e) {
+ j(e);
+ },
+ onDragEnd: function(e) {
+ if (j("inactive"), _.length) {
+ var t = [];
+ _.forEach((function(e) {
+ var r = function(e) {
+ if (n.tag !== "Loading" || n.value) return n.value?.find((function(t) {
+ return e === t.id;
+ }));
+ }(e);
+ r && t.push(r);
+ })), e === "inverse" ? h(t) : f(t), T([]);
+ }
+ }
+ }), s.default.createElement(Lk, {
+ hasNextPage: i,
+ isLoading: l,
+ loadMore: u
+ }, n.value?.map((function(e, t) {
+ return s.default.createElement(vk, {
+ key: e.id,
+ isSelected: M(e),
+ isOutlined: M(e),
+ asset: e,
+ fadeIn: t >= A * N,
+ onClick: function(e, t) {
+ return function(e, t) {
+ if (t.shiftKey && w === "MultiSelect" && n.value?.length) {
+ var a = n.value.findIndex((function(t) {
+ return t.id === e.id;
+ })), s = n.value?.findIndex((function(e) {
+ return e.id === y[y.length - 1];
+ }));
+ s === -1 && (s = 0), f(s < a ? n.value?.slice(s, a + 1) : n.value.slice(a, s + 1));
+ } else h([e]);
+ }(e, t);
+ }
+ });
+ }))))));
+}
+function Rk() {
+ var e = vC("assets"), t = e[0], n = e[1], r = {
+ ASC: zx("Ascending"),
+ DESC: zx("Descending")
+ }, o = {
+ ASC: "DESC",
+ DESC: "ASC"
+ };
+ return s.default.createElement(il, {
+ variant: "clean",
+ isSmall: !0,
+ title: r[t.direction],
+ onClick: function() {
+ n({
+ field: t.field,
+ direction: o[t.direction]
+ });
+ },
+ icon: s.default.createElement($k, { $isAscending: t.direction === "ASC" })
+ });
+}
+var zk, $k = ao($i)(zk ||= Ax([
+ "\n width: ",
+ ";\n height: ",
+ ";\n ",
+ "\n"
+], [
+ "\n width: ",
+ ";\n height: ",
+ ";\n ",
+ "\n"
+]), po.spacing6, po.spacing6, (function(e) {
+ return e.$isAscending && "transform: scaleY(-1)";
+}));
+function Bk(e) {
+ var t = e.selected, n = t !== void 0 && t, r = Ix(e, ["selected"]), o = WE("text-left w-full cursor-pointer flex hover:bg-ui-400 hover:text-body-500 items-center transition-color", n ? "text-body-500" : "text-body-400", r.className);
+ return s.default.createElement("li", null, s.default.createElement("button", {
+ type: "button",
+ className: o,
+ onClick: r.onClick,
+ role: "menuitemradio",
+ "aria-checked": n,
+ tabIndex: -1
+ }, r.children, n && s.default.createElement(li, { className: "w-6 h-6 ml-3 fade-in" })));
+}
+function Fk(e) {
+ var t = e.options, n = t === void 0 ? [
+ "CREATED_AT",
+ "PUBLISHED_AT",
+ "UPDATED_AT",
+ "NAME"
+ ] : t, r = vC("assets"), o = r[0], i = r[1], a = {
+ CREATED_AT: zx("Date added"),
+ NAME: zx("Name"),
+ PUBLISHED_AT: zx("Date published"),
+ UPDATED_AT: zx("Date modified")
+ };
+ return s.default.createElement(Hk, null, s.default.createElement(VS, {
+ className: "py-2",
+ title: a[o.field],
+ alt: zx("Order by")
+ }, (function(e) {
+ return s.default.createElement("ul", null, n.map((function(t) {
+ return s.default.createElement(Bk, {
+ className: "px-4 py-px text-sm",
+ selected: o.field === t,
+ key: a[t],
+ onClick: function() {
+ i({
+ field: t,
+ direction: o.direction
+ }), e();
+ }
+ }, s.default.createElement("span", { className: "flex-grow min-w-24 py-2" }, a[t]));
+ })));
+ })));
+}
+var Uk, Hk = ao.div(Uk ||= Ax(["\n margin-left: auto;\n"], ["\n margin-left: auto;\n"]));
+function Wk(e) {
+ var i = e.connection, a = i.data, l = i.isLoading, c = i.loadMore, u = i.hasNextPage, d = i.executeQuery, f = Wx().setIsLoading, p = kx(), h = _C().selection.filter((function(e) {
+ return e.type === "asset";
+ })).map((function(e) {
+ return e.value.id;
+ })), g = _C(), m = g.selectAssets, v = g.toggleAssets, y = Wx().setSearch, b = Rx();
+ if ((0, s.useEffect)((function() {
+ l || f(!1);
+ }), [l]), a.tag === "Failure") return s.default.createElement(hS, {
+ error: Error(a.value),
+ onRetry: d
+ });
+ var w = a.value?.searchAssets?.assets?.totalCount ?? e.totalCount;
+ return s.default.createElement(Dk, {
+ assets: Vk(a),
+ count: w,
+ isLoading: l,
+ loadMore: c,
+ hasNextPage: u,
+ selectionMode: p.selectionMode,
+ selectedAssetIds: h,
+ onSelect: m,
+ onToggle: v,
+ emptyStateElement: s.default.createElement(zC, { onReset: function() {
+ b.clear(), y("assets", "");
+ } })
+ }, s.default.createElement("div", { className: "flex justify-between items-center px-4 pt-4 pb-2 z-10" }, w !== void 0 && s.default.createElement("span", {
+ className: "flex-shrink-0 text-body-400 fade-in-down",
+ key: w
+ }, rk(w, zx("{} asset"), zx("{} assets"))), e.showActiveFilters && s.default.createElement(ek, null), s.default.createElement(Fk, null), s.default.createElement(Rk, null)));
+}
+function Vk(e) {
+ return e.tag !== "Loading" || e.value ? e.tag === "Loading" ? {
+ tag: e.tag,
+ value: e.value?.searchAssets.assets.nodes
+ } : {
+ tag: e.tag,
+ value: e.value.searchAssets.assets.nodes
+ } : {
+ tag: "Loading",
+ value: void 0
+ };
+}
+function qk() {
+ var e = Rx(), t = e.assetTypes, n = e.metaproperties, r = e.tags, o = e.isLimited, i = Vx("assets").value, a = vC("assets")[0], l = kx(), c = l.assetFilter, u = l.assetTypes, d = l.language, f = function(e) {
+ var a = this, l = wS(), c = (0, s.useState)({
+ tag: "Loading",
+ value: null
+ }), u = c[0], d = c[1], f = !1, p = function(t) {
+ return Ox(a, void 0, void 0, (function() {
+ var n, r;
+ return jx(this, (function(o) {
+ switch (o.label) {
+ case 0: return d((function(e) {
+ return {
+ tag: "Loading",
+ value: e.tag === "Failure" ? null : e.value
+ };
+ })), n = function(e, t) {
+ var a = e.filter, s = e.predefinedFilter, l = e.orderBy, c = e.allAssetTypes, u = e.searchTerm, d = e.language;
+ return {
+ orderBy: l,
+ filter: {
+ assetType_in: (a?.assetTypes?.length ? a.assetTypes : s?.assetType_in) ?? c,
+ metapropertyOptionId_in: xC(a?.metaproperties) ?? s?.metapropertyOptionId_in,
+ searchTerm: u ?? s?.searchTerm ?? null,
+ tagNames_in: a?.tags ?? s?.tagNames_in,
+ isLimitedUse: a?.isLimited
+ },
+ after: t,
+ language: d
+ };
+ }(e, t ?? null), [4, eE(bC, n, l)];
+ case 1: return r = o.sent(), f || (Zx(r) ? d({
+ tag: "Failure",
+ value: r.error
+ }) : h(r, t)), [2];
+ }
+ }));
+ }));
+ }, h = function(e, t) {
+ wC(u) && t ? d((function(t) {
+ var o = wC(t)?.nodes ?? [];
+ return {
+ tag: "Loaded",
+ value: { searchAssets: { assets: Tx(Tx({}, e.value.searchAssets.assets), { nodes: Px(Px([], o, !0), e.value.searchAssets.assets.nodes, !0) }) } }
+ };
+ })) : d({
+ tag: "Loaded",
+ value: e.value
+ });
+ };
+ return (0, s.useEffect)((function() {
+ return p(), function() {
+ f = !0;
+ };
+ }), [
+ e.filter?.assetTypes,
+ e.filter?.metaproperties,
+ e.filter?.tags,
+ e.filter?.isLimited,
+ e.orderBy,
+ e.searchTerm,
+ e.language
+ ]), {
+ data: u,
+ executeQuery: function() {
+ return p();
+ },
+ isLoading: !u || u.tag === "Loading",
+ loadMore: function() {
+ return p(wC(u)?.pageInfo.endCursor);
+ },
+ hasNextPage: !!wC(u)?.pageInfo.hasNextPage
+ };
+ }(c === void 0 ? {
+ filter: {
+ assetTypes: t,
+ metaproperties: n,
+ tags: r,
+ isLimited: o
+ },
+ searchTerm: i,
+ orderBy: a,
+ allAssetTypes: u,
+ language: d
+ } : {
+ predefinedFilter: c,
+ orderBy: a,
+ language: d
+ });
+ return s.default.createElement(Wk, {
+ connection: f,
+ showActiveFilters: c === void 0
+ });
+}
+function Gk(e, t, n) {
+ return n === void 0 && (n = "\n id\n name\n description\n databaseId\n createdAt\n originalUrl\n publishedAt\n tags\n type\n updatedAt\n url\n extensions\n metaproperties {\n nodes {\n name\n type\n options {\n name\n displayLabel\n }\n }\n }\n textMetaproperties {\n name\n value\n }\n derivatives {\n thumbnail\n webImage\n }\n ... on Video {\n previewUrls\n }\n"), Ox(this, void 0, void 0, (function() {
+ var r;
+ return jx(this, (function(o) {
+ switch (o.label) {
+ case 0: return [4, eE(`
+ fragment AddMediaAsset on Asset {
+ ${n}
+ }
+
+ query getAssetById(\$id: ID!) {
+ node(id: \$id) {
+ __typename
+ id
+ ...on Asset {
+ ...AddMediaAsset
+ files
+ }
+ }
+ }`, { id: e }, t)];
+ case 1: return Zx(r = o.sent()) ? [2, r] : [2, qx(r.value.node)];
+ }
+ }));
+ }));
+}
+function Yk(e) {
+ return e.replace(/([a-z0-9])([A-Z])/g, (function(e, t, n) {
+ return `${t} ${n}`;
+ }));
+}
+function Zk(e) {
+ var t = e.asset, n = e.onChange, r = (0, s.useState)({ status: "Loading" }), o = r[0], i = r[1], a = wS(), l = kx().assetFieldSelection;
+ return (0, s.useEffect)((function() {
+ i({ status: "Loading" }), n(void 0), function(e, t, n) {
+ return Ox(this, void 0, void 0, (function() {
+ var r;
+ return jx(this, (function(o) {
+ switch (o.label) {
+ case 0: return [4, Gk(e.id, t, n)];
+ case 1: return Yx(r = o.sent()) && r.value.files ? [2, qx(Jx(r.value.files))] : [2, Gx("Error retrieving asset files")];
+ }
+ }));
+ }));
+ }(t, a, l).then((function(e) {
+ if (Zx(e)) return gE.error(e.error), void i({ status: "Failure" });
+ var t = e.value, r = function(e) {
+ return "transformBaseUrl" in e ? "transformBaseUrl" : "original" in e ? "original" : "webImage";
+ }(t);
+ i({
+ status: "Data",
+ files: t,
+ key: r
+ }), n(t[r]);
+ }));
+ }), [
+ t.id,
+ a,
+ l
+ ]), s.default.createElement(Qk, null, s.default.createElement(VS, {
+ title: s.default.createElement(Kk, { state: o }),
+ buttonKind: "secondary",
+ className: "py-2",
+ direction: "Up",
+ disabled: o.status === "Loading"
+ }, (function(e) {
+ return o.status === "Data" && s.default.createElement("ul", { className: "overflow-y-auto pb-1 max-h-400" }, Object.entries(o.files).map((function(t) {
+ var a = t[0], l = t[1];
+ return s.default.createElement(Bk, {
+ key: a,
+ className: "px-3 py-2",
+ selected: o.key === a,
+ onClick: function() {
+ (function(e) {
+ i((function(t) {
+ return t.status === "Data" ? (setTimeout((function() {
+ return n(t.files[e]);
+ })), Tx(Tx({}, t), { key: e })) : t;
+ }));
+ })(a), e();
+ }
+ }, s.default.createElement("div", {
+ className: "w-10 h-10 mr-3 bg-ui-500 rounded flex items-center\n justify-center font-semibold text-body-400 text-xs\n uppercase",
+ "data-testid": "file-extension"
+ }, a === "transformBaseUrl" ? s.default.createElement(ei, { className: "w-6 h-6" }) : function(e) {
+ if (e) return function(e) {
+ var t = e.match(/filename=(.*?)&/);
+ if (t) {
+ var n = /(?:\.([^.]+))?$/.exec(t[1]);
+ if (n && n[1]) return n[1];
+ }
+ }(e) || function(e) {
+ var t = e.split("/"), n = t[t.length - 1].split(".");
+ if (!(n.length <= 1)) {
+ var r = n[n.length - 1], o = r.indexOf("?");
+ return o === -1 ? r : r.substring(0, o);
+ }
+ }(e);
+ }(l.url) ?? s.default.createElement(ki, { className: "w-6 h-6" })), s.default.createElement("div", { className: "flex-grow w-40" }, s.default.createElement("div", { className: "capitalize text-body-500 truncate" }, Yk(a)), s.default.createElement("div", { className: "text-sm" }, l.width && l.height && `${l.width} x ${l.height} px`, l.width && l.height && l.fileSize && s.default.createElement("span", { className: "mx-2" }, "•"), l.fileSize && function(e) {
+ if (e < 1) return "0 Bytes";
+ var t = Math.floor(Math.log(e) / Math.log(1024));
+ return `${(e / 1024 ** t).toFixed(1)} ${{
+ 0: "Bytes",
+ 1: "kB",
+ 2: "MB",
+ 3: "GB",
+ 4: "TB",
+ 5: "PB",
+ 6: "EB",
+ 7: "ZB",
+ 8: "YB"
+ }[t]}`;
+ }(l.fileSize))));
+ })));
+ })));
+}
+function Kk(e) {
+ var t = e.state;
+ return t.status === "Loading" ? s.default.createElement(xS, {
+ width: 50,
+ className: "h-4"
+ }) : t.status === "Data" ? s.default.createElement(e_, null, t.key === "Custom transformation" && s.default.createElement(mi, null), Yk(t.key)) : s.default.createElement(s.default.Fragment, null, "Error");
+}
+var Xk, Jk, Qk = ao.div(Xk ||= Ax(["\n margin-right: ", ";\n text-transform: capitalize;\n"], ["\n margin-right: ", ";\n text-transform: capitalize;\n"]), po.spacing5), e_ = ao.div(Jk ||= Ax(["\n display: flex;\n gap: ", ";\n align-items: center;\n"], ["\n display: flex;\n gap: ", ";\n align-items: center;\n"]), po.spacing4);
+function t_(e) {
+ var t = e.status, n = e.numberOfSelectedItems;
+ return t === "Done" ? s.default.createElement(li, { "data-testid": "check" }) : t === "Error" ? s.default.createElement(s.default.Fragment, null, zx("Retry")) : s.default.createElement(s.default.Fragment, null, rk(n, zx("Add asset"), zx("Add assets")));
+}
+function n_(e) {
+ var n = kx(), r = n.assetFieldSelection, o = n.onSuccess, i = n.selectionMode, a = _C().preselectedAssetIds, l = wS(), c = (0, s.useRef)(!0), u = (0, s.useState)(i === "SingleSelectFile" ? { status: "WaitingForFileSelection" } : { status: "Ready" }), d = u[0], f = u[1];
+ function p(e, t) {
+ if (Zx(e)) f({ status: "Error" });
+ else {
+ try {
+ var n = Array.isArray(e.value) ? e.value : [e.value];
+ n.sort((function(e, t) {
+ return function(e, t, n) {
+ return n ? !n.includes(e.id) && n.includes(t.id) ? 1 : n.includes(e.id) && !n.includes(t.id) ? -1 : n.indexOf(e.id) - n.indexOf(t.id) : 0;
+ }(e, t, a);
+ })), o(n, { selectedFile: t });
+ } catch (e) {
+ gE.error(e);
+ }
+ c.current && (f({ status: "Done" }), setTimeout((function() {
+ c.current && f({ status: "Ready" });
+ }), 2e3));
+ }
+ }
+ return (0, s.useEffect)((function() {
+ return function() {
+ c.current = !1;
+ };
+ }), []), s.default.createElement(s.default.Fragment, null, i === "SingleSelectFile" && e.selection[0]?.type === "asset" && s.default.createElement(Zk, {
+ asset: e.selection[0].value,
+ onChange: function(e) {
+ f(e === void 0 ? { status: "WaitingForFileSelection" } : {
+ status: "ReadyWithFile",
+ file: e
+ });
+ }
+ }), s.default.createElement(il, {
+ variant: "primary",
+ isDisabled: d.status === "Loading" || d.status === "WaitingForFileSelection",
+ onClick: function() {
+ var n = d.status === "ReadyWithFile" ? d.file : void 0;
+ f({ status: "Loading" }), i !== "MultiSelect" && e.selection[0]?.type === "asset" ? Gk(e.selection[0].value.id, l, r).then((function(e) {
+ p(e, n);
+ })) : function(e, t, n) {
+ return n === void 0 && (n = "\n id\n name\n description\n databaseId\n createdAt\n originalUrl\n publishedAt\n tags\n type\n updatedAt\n url\n metaproperties {\n nodes {\n name\n type\n options {\n name\n displayLabel\n }\n }\n }\n textMetaproperties {\n name\n value\n label\n }\n derivatives {\n thumbnail\n webImage\n }\n ... on Video {\n previewUrls\n }\n"), Ox(this, void 0, void 0, (function() {
+ var r, o, i, a, s, l, c, u, d, f, p, h;
+ return jx(this, (function(g) {
+ switch (g.label) {
+ case 0: return r = `
+ fragment AddMediaAsset on Asset {
+ ${n}
+ }
+
+ query getAssetsById(\$ids: [ID!]!, \$collectionCount: Int) {
+ nodes(ids: \$ids) {
+ __typename
+ id
+ ...on Asset {
+ ...AddMediaAsset
+ files
+ }
+ ...on Collection {
+ assets(first: \$collectionCount) {
+ nodes {
+ __typename
+ id
+ ...AddMediaAsset
+ files
+ }
+ }
+ }
+ }
+ }`, o = { ids: e.map((function(e) {
+ return e.value.id;
+ })) }, [4, eE(r, o, t)];
+ case 1:
+ if (Zx(i = g.sent())) return [2, i];
+ for (a = [], s = 0, l = i.value.nodes; s < l.length; s++) (c = l[s]).__typename === "Collection" ? a.push.apply(a, c.assets.nodes) : a.push(c);
+ for (u = /* @__PURE__ */ new Set(), d = [], f = 0, p = a; f < p.length; f++) h = p[f], u.has(h.id) || (d.push(h), u.add(h.id));
+ return [2, qx(d)];
+ }
+ }));
+ }));
+ }(e.selection, l, r).then((function(e) {
+ p(e, n);
+ }));
+ },
+ "data-testid": "add-button",
+ isLoading: d.status === "Loading"
+ }, s.default.createElement(t_, {
+ status: d.status,
+ numberOfSelectedItems: e.selection.length
+ })));
+}
+function r_(e) {
+ var t = e.title, n = e.onRemove, r = e.children;
+ return s.default.createElement("li", {
+ className: "flex flex-1 h-12 border-b last:border-b-0 pl-3 pr-5 py-1 items-center group relative",
+ title: t
+ }, s.default.createElement(MS, {
+ $isChecked: !0,
+ $isFlex: !0
+ }, s.default.createElement(gg, {
+ "aria-label": zx("Deselect"),
+ id: `deselect-${t}`,
+ isChecked: !0,
+ onChange: n,
+ "data-testid": "metaproperty-option"
+ }), s.default.createElement(i_, { htmlFor: `deselect-${t}` }, r)));
+}
+var o_, i_ = ao.label(o_ ||= Ax([
+ "\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: ",
+ ";\n margin-left: ",
+ ";\n cursor: pointer;\n"
+], [
+ "\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: ",
+ ";\n margin-left: ",
+ ";\n cursor: pointer;\n"
+]), po.fontSize100, po.spacing3);
+function a_(e) {
+ var t = e.asset, n = _C();
+ return s.default.createElement(r_, {
+ title: t.name,
+ onRemove: function() {
+ return n.toggleAssets([t]);
+ }
+ }, s.default.createElement(l_, null, s.default.createElement(Dh, {
+ variant: "preview",
+ imageUrl: ik(t),
+ size: "m"
+ })), s.default.createElement("span", { className: "w-40 mr-2 truncate" }, t.name), ak(t) && s.default.createElement("span", { className: "flex-grow text-body-400 text-sm text-right" }, ak(t)));
+}
+var s_, l_ = ao.div(s_ ||= Ax(["\n margin-right: ", ";\n max-width: 40px;\n"], ["\n margin-right: ", ";\n max-width: 40px;\n"]), po.spacing4);
+function c_(e) {
+ var t = e.selection;
+ return s.default.createElement("ul", {
+ className: "flex flex-col py-2 overflow-y-auto max-h-400",
+ "data-testid": "selected-items-list"
+ }, t.map((function(e) {
+ return s.default.createElement(a_, {
+ key: e.value.id,
+ asset: e.value
+ });
+ })));
+}
+function u_() {
+ var e = _C(), t = e.selection, n = e.clear, r = t.length;
+ return r === 0 ? null : s.default.createElement(p_, { "data-testid": "selection-footer" }, s.default.createElement(h_, null, s.default.createElement(VS, {
+ buttonKind: "secondary",
+ direction: "Up",
+ title: zx("View {} selected").replace("{}", r.toString())
+ }, (function() {
+ return s.default.createElement(c_, { selection: t });
+ })), s.default.createElement(il, {
+ variant: "clean",
+ onClick: n
+ }, zx("Clear selection"))), s.default.createElement(n_, { selection: t }));
+}
+var d_, f_, p_ = ao.div(d_ ||= Ax([
+ "\n display: flex;\n flex-shrink: 0;\n z-index: 10;\n height: ",
+ ";\n padding: ",
+ ";\n align-items: center;\n box-shadow: 0 -1px 0 0 rgba(0, 34, 51, 0.1), 0 -1px 6px 0 rgba(0, 34, 51, 0.1);\n animation: var(--fade-in-down);\n"
+], [
+ "\n display: flex;\n flex-shrink: 0;\n z-index: 10;\n height: ",
+ ";\n padding: ",
+ ";\n align-items: center;\n box-shadow: 0 -1px 0 0 rgba(0, 34, 51, 0.1), 0 -1px 6px 0 rgba(0, 34, 51, 0.1);\n animation: var(--fade-in-down);\n"
+]), po.layoutSpacing5, po.spacing6), h_ = ao.span(f_ ||= Ax(["\n display: flex;\n flex-grow: 1;\n align-items: center;\n gap: ", ";\n"], ["\n display: flex;\n flex-grow: 1;\n align-items: center;\n gap: ", ";\n"]), po.spacing2);
+function g_(e) {
+ var t = e.assetFieldSelection, n = e.assetTypes, r = n === void 0 ? [
+ "IMAGE",
+ "DOCUMENT",
+ "VIDEO",
+ "AUDIO",
+ "ARCHIVE"
+ ] : n, o = e.defaultSearchTerm, i = e.language, a = i === void 0 ? "en_US" : i, l = e.mode, c = l === void 0 ? "SingleSelectFile" : l, u = e.onSuccess, d = u === void 0 ? function(e, t) {
+ var n = t.selectedFile;
+ return console.log(e, n);
+ } : u, f = e.hideExternalAccess, p = e.selectedAssets, h = e.hideLimitedUse, g = e.isContainerMode, m = g !== void 0 && g;
+ Bx(a);
+ var v = {
+ assetFieldSelection: t,
+ assetTypes: r,
+ language: a,
+ onSuccess: d,
+ selectionMode: c,
+ hideExternalAccess: f
+ };
+ return s.default.createElement(gS, null, s.default.createElement(IE, { isContainerMode: m }, s.default.createElement(mC, null, s.default.createElement(Mx, { hideLimitedUse: h }, s.default.createElement(Hx, { defaultValue: o }, s.default.createElement(Cx, { value: v }, s.default.createElement(CC, { preselectedAssetIds: p ?? [] }, s.default.createElement("div", { className: "cv-root cv-container" }, s.default.createElement(jC, null), s.default.createElement(fC, null), s.default.createElement(qk, null), s.default.createElement(u_, null)))))))));
+}
+const m_ = Object.prototype.toString;
+function v_(e) {
+ return function(e, t) {
+ return m_.call(e) === `[object ${t}]`;
+ }(e, "Object");
+}
+function y_(e) {
+ return !!(e && e.then && typeof e.then == "function");
+}
+function b_(e) {
+ return e && e.Math == Math ? e : void 0;
+}
+const w_ = typeof globalThis == "object" && b_(globalThis) || typeof window == "object" && b_(window) || typeof self == "object" && b_(self) || typeof o.g == "object" && b_(o.g) || function() {
+ return this;
+}() || {};
+function x_(e, t, n) {
+ let r = n || w_, o = r.__SENTRY__ = r.__SENTRY__ || {};
+ return o[e] || (o[e] = t());
+}
+function E_() {
+ let e = w_, t = e.crypto || e.msCrypto, n = () => 16 * Math.random();
+ try {
+ if (t && t.randomUUID) return t.randomUUID().replace(/-/g, "");
+ t && t.getRandomValues && (n = () => {
+ let e = /* @__PURE__ */ new Uint8Array(1);
+ return t.getRandomValues(e), e[0];
+ });
+ } catch {}
+ return "10000000100040008000100000000000".replace(/[018]/g, ((e) => (e ^ (15 & n()) >> e / 4).toString(16)));
+}
+function S_() {
+ return Date.now() / 1e3;
+}
+const C_ = function() {
+ let { performance: e } = w_;
+ if (!e || !e.now) return S_;
+ let t = Date.now() - e.now(), n = e.timeOrigin == null ? t : e.timeOrigin;
+ return () => (n + e.now()) / 1e3;
+}();
+(() => {
+ let { performance: e } = w_;
+ if (!e || !e.now) return;
+ let t = 36e5, n = e.now(), r = Date.now(), o = e.timeOrigin ? Math.abs(e.timeOrigin + n - r) : t, i = o < t, a = e.timing && e.timing.navigationStart, s = typeof a == "number" ? Math.abs(a + n - r) : t;
+ (i || s < t) && o <= s && e.timeOrigin;
+})();
+const __ = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, T_ = [
+ "debug",
+ "info",
+ "warn",
+ "error",
+ "log",
+ "assert",
+ "trace"
+], I_ = {};
+function O_(e) {
+ if (!("console" in w_)) return e();
+ let t = w_.console, n = {}, r = Object.keys(I_);
+ r.forEach(((e) => {
+ let r = I_[e];
+ n[e] = t[e], t[e] = r;
+ }));
+ try {
+ return e();
+ } finally {
+ r.forEach(((e) => {
+ t[e] = n[e];
+ }));
+ }
+}
+const j_ = function() {
+ let e = !1, t = {
+ enable: () => {
+ e = !0;
+ },
+ disable: () => {
+ e = !1;
+ },
+ isEnabled: () => e
+ };
+ return __ ? T_.forEach(((n) => {
+ t[n] = (...t) => {
+ e && O_((() => {
+ w_.console[n](`Sentry Logger [${n}]:`, ...t);
+ }));
+ };
+ })) : T_.forEach(((e) => {
+ t[e] = () => {};
+ })), t;
+}(), P_ = "production", A_ = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
+var N_;
+(function(e) {
+ e[e.PENDING = 0] = "PENDING", e[e.RESOLVED = 1] = "RESOLVED", e[e.REJECTED = 2] = "REJECTED";
+})(N_ ||= {});
+var M_ = class M_ {
+ constructor(e) {
+ M_.prototype.__init.call(this), M_.prototype.__init2.call(this), M_.prototype.__init3.call(this), M_.prototype.__init4.call(this), this._state = N_.PENDING, this._handlers = [];
+ try {
+ e(this._resolve, this._reject);
+ } catch (e) {
+ this._reject(e);
+ }
+ }
+ then(e, t) {
+ return new M_(((n, r) => {
+ this._handlers.push([
+ !1,
+ (t) => {
+ if (e) try {
+ n(e(t));
+ } catch (e) {
+ r(e);
+ }
+ else n(t);
+ },
+ (e) => {
+ if (t) try {
+ n(t(e));
+ } catch (e) {
+ r(e);
+ }
+ else r(e);
+ }
+ ]), this._executeHandlers();
+ }));
+ }
+ catch(e) {
+ return this.then(((e) => e), e);
+ }
+ finally(e) {
+ return new M_(((t, n) => {
+ let r, o;
+ return this.then(((t) => {
+ o = !1, r = t, e && e();
+ }), ((t) => {
+ o = !0, r = t, e && e();
+ })).then((() => {
+ o ? n(r) : t(r);
+ }));
+ }));
+ }
+ __init() {
+ this._resolve = (e) => {
+ this._setResult(N_.RESOLVED, e);
+ };
+ }
+ __init2() {
+ this._reject = (e) => {
+ this._setResult(N_.REJECTED, e);
+ };
+ }
+ __init3() {
+ this._setResult = (e, t) => {
+ this._state === N_.PENDING && (y_(t) ? t.then(this._resolve, this._reject) : (this._state = e, this._value = t, this._executeHandlers()));
+ };
+ }
+ __init4() {
+ this._executeHandlers = () => {
+ if (this._state === N_.PENDING) return;
+ let e = this._handlers.slice();
+ this._handlers = [], e.forEach(((e) => {
+ e[0] ||= (this._state === N_.RESOLVED && e[1](this._value), this._state === N_.REJECTED && e[2](this._value), !0);
+ }));
+ };
+ }
+};
+function L_(e, t, n, r = 0) {
+ return new M_(((o, i) => {
+ let a = e[r];
+ if (t === null || typeof a != "function") o(t);
+ else {
+ let s = a({ ...t }, n);
+ A_ && a.id && s === null && j_.log(`Event processor "${a.id}" dropped event`), y_(s) ? s.then(((t) => L_(e, t, n, r + 1).then(o))).then(null, i) : L_(e, s, n, r + 1).then(o).then(null, i);
+ }
+ }));
+}
+function D_(e) {
+ return R_(e, /* @__PURE__ */ new Map());
+}
+function R_(e, t) {
+ if (function(e) {
+ if (!v_(e)) return !1;
+ try {
+ let t = Object.getPrototypeOf(e).constructor.name;
+ return !t || t === "Object";
+ } catch {
+ return !0;
+ }
+ }(e)) {
+ let n = t.get(e);
+ if (n !== void 0) return n;
+ let r = {};
+ t.set(e, r);
+ for (let n of Object.keys(e)) e[n] !== void 0 && (r[n] = R_(e[n], t));
+ return r;
+ }
+ if (Array.isArray(e)) {
+ let n = t.get(e);
+ if (n !== void 0) return n;
+ let r = [];
+ return t.set(e, r), e.forEach(((e) => {
+ r.push(R_(e, t));
+ })), r;
+ }
+ return e;
+}
+function z_(e, t = {}) {
+ if (t.user && (!e.ipAddress && t.user.ip_address && (e.ipAddress = t.user.ip_address), e.did || t.did || (e.did = t.user.id || t.user.email || t.user.username)), e.timestamp = t.timestamp || C_(), t.abnormal_mechanism && (e.abnormal_mechanism = t.abnormal_mechanism), t.ignoreDuration && (e.ignoreDuration = t.ignoreDuration), t.sid && (e.sid = t.sid.length === 32 ? t.sid : E_()), t.init !== void 0 && (e.init = t.init), !e.did && t.did && (e.did = `${t.did}`), typeof t.started == "number" && (e.started = t.started), e.ignoreDuration) e.duration = void 0;
+ else if (typeof t.duration == "number") e.duration = t.duration;
+ else {
+ let t = e.timestamp - e.started;
+ e.duration = t >= 0 ? t : 0;
+ }
+ t.release && (e.release = t.release), t.environment && (e.environment = t.environment), !e.ipAddress && t.ipAddress && (e.ipAddress = t.ipAddress), !e.userAgent && t.userAgent && (e.userAgent = t.userAgent), typeof t.errors == "number" && (e.errors = t.errors), t.status && (e.status = t.status);
+}
+function $_(e) {
+ return e.transaction;
+}
+function B_(e) {
+ let { spanId: t, traceId: n } = e.spanContext(), { data: r, op: o, parent_span_id: i, status: a, tags: s, origin: l } = F_(e);
+ return D_({
+ data: r,
+ op: o,
+ parent_span_id: i,
+ span_id: t,
+ status: a,
+ tags: s,
+ trace_id: n,
+ origin: l
+ });
+}
+function F_(e) {
+ return function(e) {
+ return typeof e.getSpanJSON == "function";
+ }(e) ? e.getSpanJSON() : typeof e.toJSON == "function" ? e.toJSON() : {};
+}
+function U_(e) {
+ let t = K_().getClient();
+ if (!t) return {};
+ let n = function(e, t, n) {
+ let r = t.getOptions(), { publicKey: o } = t.getDsn() || {}, { segment: i } = n && n.getUser() || {}, a = D_({
+ environment: r.environment || P_,
+ release: r.release,
+ user_segment: i,
+ public_key: o,
+ trace_id: e
+ });
+ return t.emit && t.emit("createDsc", a), a;
+ }(F_(e).trace_id || "", t, K_().getScope()), r = $_(e);
+ if (!r) return n;
+ let o = r && r._frozenDynamicSamplingContext;
+ if (o) return o;
+ let { sampleRate: i, source: a } = r.metadata;
+ i != null && (n.sample_rate = `${i}`);
+ let s = F_(r);
+ return a && a !== "url" && (n.transaction = s.description), n.sampled = String(function(e) {
+ let { traceFlags: t } = e.spanContext();
+ return !!(1 & t);
+ }(r)), t.emit && t.emit("createDsc", n), n;
+}
+var H_ = class H_ {
+ constructor() {
+ this._notifyingListeners = !1, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = W_();
+ }
+ static clone(e) {
+ return e ? e.clone() : new H_();
+ }
+ clone() {
+ let e = new H_();
+ return e._breadcrumbs = [...this._breadcrumbs], e._tags = { ...this._tags }, e._extra = { ...this._extra }, e._contexts = { ...this._contexts }, e._user = this._user, e._level = this._level, e._span = this._span, e._session = this._session, e._transactionName = this._transactionName, e._fingerprint = this._fingerprint, e._eventProcessors = [...this._eventProcessors], e._requestSession = this._requestSession, e._attachments = [...this._attachments], e._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, e._propagationContext = { ...this._propagationContext }, e._client = this._client, e;
+ }
+ setClient(e) {
+ this._client = e;
+ }
+ getClient() {
+ return this._client;
+ }
+ addScopeListener(e) {
+ this._scopeListeners.push(e);
+ }
+ addEventProcessor(e) {
+ return this._eventProcessors.push(e), this;
+ }
+ setUser(e) {
+ return this._user = e || {
+ email: void 0,
+ id: void 0,
+ ip_address: void 0,
+ segment: void 0,
+ username: void 0
+ }, this._session && z_(this._session, { user: e }), this._notifyScopeListeners(), this;
+ }
+ getUser() {
+ return this._user;
+ }
+ getRequestSession() {
+ return this._requestSession;
+ }
+ setRequestSession(e) {
+ return this._requestSession = e, this;
+ }
+ setTags(e) {
+ return this._tags = {
+ ...this._tags,
+ ...e
+ }, this._notifyScopeListeners(), this;
+ }
+ setTag(e, t) {
+ return this._tags = {
+ ...this._tags,
+ [e]: t
+ }, this._notifyScopeListeners(), this;
+ }
+ setExtras(e) {
+ return this._extra = {
+ ...this._extra,
+ ...e
+ }, this._notifyScopeListeners(), this;
+ }
+ setExtra(e, t) {
+ return this._extra = {
+ ...this._extra,
+ [e]: t
+ }, this._notifyScopeListeners(), this;
+ }
+ setFingerprint(e) {
+ return this._fingerprint = e, this._notifyScopeListeners(), this;
+ }
+ setLevel(e) {
+ return this._level = e, this._notifyScopeListeners(), this;
+ }
+ setTransactionName(e) {
+ return this._transactionName = e, this._notifyScopeListeners(), this;
+ }
+ setContext(e, t) {
+ return t === null ? delete this._contexts[e] : this._contexts[e] = t, this._notifyScopeListeners(), this;
+ }
+ setSpan(e) {
+ return this._span = e, this._notifyScopeListeners(), this;
+ }
+ getSpan() {
+ return this._span;
+ }
+ getTransaction() {
+ let e = this._span;
+ return e && e.transaction;
+ }
+ setSession(e) {
+ return e ? this._session = e : delete this._session, this._notifyScopeListeners(), this;
+ }
+ getSession() {
+ return this._session;
+ }
+ update(e) {
+ if (!e) return this;
+ let t = typeof e == "function" ? e(this) : e;
+ if (t instanceof H_) {
+ let e = t.getScopeData();
+ this._tags = {
+ ...this._tags,
+ ...e.tags
+ }, this._extra = {
+ ...this._extra,
+ ...e.extra
+ }, this._contexts = {
+ ...this._contexts,
+ ...e.contexts
+ }, e.user && Object.keys(e.user).length && (this._user = e.user), e.level && (this._level = e.level), e.fingerprint.length && (this._fingerprint = e.fingerprint), t.getRequestSession() && (this._requestSession = t.getRequestSession()), e.propagationContext && (this._propagationContext = e.propagationContext);
+ } else if (v_(t)) {
+ let t = e;
+ this._tags = {
+ ...this._tags,
+ ...t.tags
+ }, this._extra = {
+ ...this._extra,
+ ...t.extra
+ }, this._contexts = {
+ ...this._contexts,
+ ...t.contexts
+ }, t.user && (this._user = t.user), t.level && (this._level = t.level), t.fingerprint && (this._fingerprint = t.fingerprint), t.requestSession && (this._requestSession = t.requestSession), t.propagationContext && (this._propagationContext = t.propagationContext);
+ }
+ return this;
+ }
+ clear() {
+ return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._span = void 0, this._session = void 0, this._notifyScopeListeners(), this._attachments = [], this._propagationContext = W_(), this;
+ }
+ addBreadcrumb(e, t) {
+ let n = typeof t == "number" ? t : 100;
+ if (n <= 0) return this;
+ let r = {
+ timestamp: S_(),
+ ...e
+ }, o = this._breadcrumbs;
+ return o.push(r), this._breadcrumbs = o.length > n ? o.slice(-n) : o, this._notifyScopeListeners(), this;
+ }
+ getLastBreadcrumb() {
+ return this._breadcrumbs[this._breadcrumbs.length - 1];
+ }
+ clearBreadcrumbs() {
+ return this._breadcrumbs = [], this._notifyScopeListeners(), this;
+ }
+ addAttachment(e) {
+ return this._attachments.push(e), this;
+ }
+ getAttachments() {
+ return this.getScopeData().attachments;
+ }
+ clearAttachments() {
+ return this._attachments = [], this;
+ }
+ getScopeData() {
+ let { _breadcrumbs: e, _attachments: t, _contexts: n, _tags: r, _extra: o, _user: i, _level: a, _fingerprint: s, _eventProcessors: l, _propagationContext: c, _sdkProcessingMetadata: u, _transactionName: d, _span: f } = this;
+ return {
+ breadcrumbs: e,
+ attachments: t,
+ contexts: n,
+ tags: r,
+ extra: o,
+ user: i,
+ level: a,
+ fingerprint: s || [],
+ eventProcessors: l,
+ propagationContext: c,
+ sdkProcessingMetadata: u,
+ transactionName: d,
+ span: f
+ };
+ }
+ applyToEvent(e, t = {}, n = []) {
+ return function(e, t) {
+ let { fingerprint: n, span: r, breadcrumbs: o, sdkProcessingMetadata: i } = t;
+ (function(e, t) {
+ let { extra: n, tags: r, user: o, contexts: i, level: a, transactionName: s } = t, l = D_(n);
+ l && Object.keys(l).length && (e.extra = {
+ ...l,
+ ...e.extra
+ });
+ let c = D_(r);
+ c && Object.keys(c).length && (e.tags = {
+ ...c,
+ ...e.tags
+ });
+ let u = D_(o);
+ u && Object.keys(u).length && (e.user = {
+ ...u,
+ ...e.user
+ });
+ let d = D_(i);
+ d && Object.keys(d).length && (e.contexts = {
+ ...d,
+ ...e.contexts
+ }), a && (e.level = a), s && (e.transaction = s);
+ })(e, t), r && function(e, t) {
+ e.contexts = {
+ trace: B_(t),
+ ...e.contexts
+ };
+ let n = $_(t);
+ if (n) {
+ e.sdkProcessingMetadata = {
+ dynamicSamplingContext: U_(t),
+ ...e.sdkProcessingMetadata
+ };
+ let r = F_(n).description;
+ r && (e.tags = {
+ transaction: r,
+ ...e.tags
+ });
+ }
+ }(e, r), function(e, t) {
+ var n;
+ e.fingerprint = e.fingerprint ? (n = e.fingerprint, Array.isArray(n) ? n : [n]) : [], t && (e.fingerprint = e.fingerprint.concat(t)), e.fingerprint && !e.fingerprint.length && delete e.fingerprint;
+ }(e, n), function(e, t) {
+ let n = [...e.breadcrumbs || [], ...t];
+ e.breadcrumbs = n.length ? n : void 0;
+ }(e, o), function(e, t) {
+ e.sdkProcessingMetadata = {
+ ...e.sdkProcessingMetadata,
+ ...t
+ };
+ }(e, i);
+ }(e, this.getScopeData()), L_([
+ ...n,
+ ...x_("globalEventProcessors", (() => [])),
+ ...this._eventProcessors
+ ], e, t);
+ }
+ setSDKProcessingMetadata(e) {
+ return this._sdkProcessingMetadata = {
+ ...this._sdkProcessingMetadata,
+ ...e
+ }, this;
+ }
+ setPropagationContext(e) {
+ return this._propagationContext = e, this;
+ }
+ getPropagationContext() {
+ return this._propagationContext;
+ }
+ captureException(e, t) {
+ let n = t && t.event_id ? t.event_id : E_();
+ if (!this._client) return j_.warn("No client configured on scope - will not capture exception!"), n;
+ let r = /* @__PURE__ */ Error("Sentry syntheticException");
+ return this._client.captureException(e, {
+ originalException: e,
+ syntheticException: r,
+ ...t,
+ event_id: n
+ }, this), n;
+ }
+ captureMessage(e, t, n) {
+ let r = n && n.event_id ? n.event_id : E_();
+ if (!this._client) return j_.warn("No client configured on scope - will not capture message!"), r;
+ let o = Error(e);
+ return this._client.captureMessage(e, t, {
+ originalException: e,
+ syntheticException: o,
+ ...n,
+ event_id: r
+ }, this), r;
+ }
+ captureEvent(e, t) {
+ let n = t && t.event_id ? t.event_id : E_();
+ return this._client ? (this._client.captureEvent(e, {
+ ...t,
+ event_id: n
+ }, this), n) : (j_.warn("No client configured on scope - will not capture event!"), n);
+ }
+ _notifyScopeListeners() {
+ this._notifyingListeners ||= (this._notifyingListeners = !0, this._scopeListeners.forEach(((e) => {
+ e(this);
+ })), !1);
+ }
+};
+function W_() {
+ return {
+ traceId: E_(),
+ spanId: E_().substring(16)
+ };
+}
+const V_ = 7.12;
+var G_ = class {
+ constructor(e, t, n, r = V_) {
+ let o, i;
+ this._version = r, t ? o = t : (o = new H_(), o.setClient(e)), n ? i = n : (i = new H_(), i.setClient(e)), this._stack = [{ scope: o }], e && this.bindClient(e), this._isolationScope = i;
+ }
+ isOlderThan(e) {
+ return this._version < e;
+ }
+ bindClient(e) {
+ let t = this.getStackTop();
+ t.client = e, t.scope.setClient(e), e && e.setupIntegrations && e.setupIntegrations();
+ }
+ pushScope() {
+ let e = this.getScope().clone();
+ return this.getStack().push({
+ client: this.getClient(),
+ scope: e
+ }), e;
+ }
+ popScope() {
+ return !(this.getStack().length <= 1 || !this.getStack().pop());
+ }
+ withScope(e) {
+ let t = this.pushScope(), n;
+ try {
+ n = e(t);
+ } catch (e) {
+ throw this.popScope(), e;
+ }
+ return y_(n) ? n.then(((e) => (this.popScope(), e)), ((e) => {
+ throw this.popScope(), e;
+ })) : (this.popScope(), n);
+ }
+ getClient() {
+ return this.getStackTop().client;
+ }
+ getScope() {
+ return this.getStackTop().scope;
+ }
+ getIsolationScope() {
+ return this._isolationScope;
+ }
+ getStack() {
+ return this._stack;
+ }
+ getStackTop() {
+ return this._stack[this._stack.length - 1];
+ }
+ captureException(e, t) {
+ let n = this._lastEventId = t && t.event_id ? t.event_id : E_(), r = /* @__PURE__ */ Error("Sentry syntheticException");
+ return this.getScope().captureException(e, {
+ originalException: e,
+ syntheticException: r,
+ ...t,
+ event_id: n
+ }), n;
+ }
+ captureMessage(e, t, n) {
+ let r = this._lastEventId = n && n.event_id ? n.event_id : E_(), o = Error(e);
+ return this.getScope().captureMessage(e, t, {
+ originalException: e,
+ syntheticException: o,
+ ...n,
+ event_id: r
+ }), r;
+ }
+ captureEvent(e, t) {
+ let n = t && t.event_id ? t.event_id : E_();
+ return e.type || (this._lastEventId = n), this.getScope().captureEvent(e, {
+ ...t,
+ event_id: n
+ }), n;
+ }
+ lastEventId() {
+ return this._lastEventId;
+ }
+ addBreadcrumb(e, t) {
+ let { scope: n, client: r } = this.getStackTop();
+ if (!r) return;
+ let { beforeBreadcrumb: o = null, maxBreadcrumbs: i = 100 } = r.getOptions && r.getOptions() || {};
+ if (i <= 0) return;
+ let a = {
+ timestamp: S_(),
+ ...e
+ }, s = o ? O_((() => o(a, t))) : a;
+ s !== null && (r.emit && r.emit("beforeAddBreadcrumb", s, t), n.addBreadcrumb(s, i));
+ }
+ setUser(e) {
+ this.getScope().setUser(e), this.getIsolationScope().setUser(e);
+ }
+ setTags(e) {
+ this.getScope().setTags(e), this.getIsolationScope().setTags(e);
+ }
+ setExtras(e) {
+ this.getScope().setExtras(e), this.getIsolationScope().setExtras(e);
+ }
+ setTag(e, t) {
+ this.getScope().setTag(e, t), this.getIsolationScope().setTag(e, t);
+ }
+ setExtra(e, t) {
+ this.getScope().setExtra(e, t), this.getIsolationScope().setExtra(e, t);
+ }
+ setContext(e, t) {
+ this.getScope().setContext(e, t), this.getIsolationScope().setContext(e, t);
+ }
+ configureScope(e) {
+ let { scope: t, client: n } = this.getStackTop();
+ n && e(t);
+ }
+ run(e) {
+ let t = Z_(this);
+ try {
+ e(this);
+ } finally {
+ Z_(t);
+ }
+ }
+ getIntegration(e) {
+ let t = this.getClient();
+ if (!t) return null;
+ try {
+ return t.getIntegration(e);
+ } catch {
+ return A_ && j_.warn(`Cannot retrieve integration ${e.id} from the current Hub`), null;
+ }
+ }
+ startTransaction(e, t) {
+ let n = this._callExtensionMethod("startTransaction", e, t);
+ return A_ && !n && (this.getClient() ? j_.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n") : j_.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")), n;
+ }
+ traceHeaders() {
+ return this._callExtensionMethod("traceHeaders");
+ }
+ captureSession(e = !1) {
+ if (e) return this.endSession();
+ this._sendSessionUpdate();
+ }
+ endSession() {
+ let e = this.getStackTop().scope, t = e.getSession();
+ t && function(e) {
+ let t = {};
+ e.status === "ok" && (t = { status: "exited" }), z_(e, t);
+ }(t), this._sendSessionUpdate(), e.setSession();
+ }
+ startSession(e) {
+ let { scope: t, client: n } = this.getStackTop(), { release: r, environment: o = P_ } = n && n.getOptions() || {}, { userAgent: i } = w_.navigator || {}, a = function(e) {
+ let t = C_(), n = {
+ sid: E_(),
+ init: !0,
+ timestamp: t,
+ started: t,
+ duration: 0,
+ status: "ok",
+ errors: 0,
+ ignoreDuration: !1,
+ toJSON: () => function(e) {
+ return D_({
+ sid: `${e.sid}`,
+ init: e.init,
+ started: (/* @__PURE__ */ new Date(1e3 * e.started)).toISOString(),
+ timestamp: (/* @__PURE__ */ new Date(1e3 * e.timestamp)).toISOString(),
+ status: e.status,
+ errors: e.errors,
+ did: typeof e.did == "number" || typeof e.did == "string" ? `${e.did}` : void 0,
+ duration: e.duration,
+ abnormal_mechanism: e.abnormal_mechanism,
+ attrs: {
+ release: e.release,
+ environment: e.environment,
+ ip_address: e.ipAddress,
+ user_agent: e.userAgent
+ }
+ });
+ }(n)
+ };
+ return e && z_(n, e), n;
+ }({
+ release: r,
+ environment: o,
+ user: t.getUser(),
+ ...i && { userAgent: i },
+ ...e
+ }), s = t.getSession && t.getSession();
+ return s && s.status === "ok" && z_(s, { status: "exited" }), this.endSession(), t.setSession(a), a;
+ }
+ shouldSendDefaultPii() {
+ let e = this.getClient(), t = e && e.getOptions();
+ return !!(t && t.sendDefaultPii);
+ }
+ _sendSessionUpdate() {
+ let { scope: e, client: t } = this.getStackTop(), n = e.getSession();
+ n && t && t.captureSession && t.captureSession(n);
+ }
+ _callExtensionMethod(e, ...t) {
+ let n = Y_().__SENTRY__;
+ if (n && n.extensions && typeof n.extensions[e] == "function") return n.extensions[e].apply(this, t);
+ A_ && j_.warn(`Extension method ${e} couldn't be found, doing nothing.`);
+ }
+};
+function Y_() {
+ return w_.__SENTRY__ = w_.__SENTRY__ || {
+ extensions: {},
+ hub: void 0
+ }, w_;
+}
+function Z_(e) {
+ let t = Y_(), n = X_(t);
+ return J_(t, e), n;
+}
+function K_() {
+ let e = Y_();
+ if (e.__SENTRY__ && e.__SENTRY__.acs) {
+ let t = e.__SENTRY__.acs.getCurrentHub();
+ if (t) return t;
+ }
+ return function(e = Y_()) {
+ return t = e, t && t.__SENTRY__ && t.__SENTRY__.hub && !X_(e).isOlderThan(V_) || J_(e, new G_()), X_(e);
+ var t;
+ }(e);
+}
+function X_(e) {
+ return x_("hub", (() => new G_()), e);
+}
+function J_(e, t) {
+ return !!e && ((e.__SENTRY__ = e.__SENTRY__ || {}).hub = t, !0);
+}
+const Q_ = [
+ "user",
+ "level",
+ "extra",
+ "contexts",
+ "tags",
+ "fingerprint",
+ "requestSession",
+ "propagationContext"
+];
+var eT = o(5794), tT = o.n(eT);
+const cT = [];
+for (let e = 0; e < 256; ++e) cT.push((e + 256).toString(16).slice(1));
+typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
+var hT = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
+function gT(e) {
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
+}
+var mT, vT, yT = { exports: {} };
+const wT = gT((mT || (mT = 1, vT = yT, function(e, t) {
+ vT.exports ? vT.exports = t() : e.log = t();
+}(yT.exports, (function() {
+ var e = function() {}, t = "undefined", n = typeof window !== t && typeof window.navigator !== t && /Trident\/|MSIE /.test(window.navigator.userAgent), r = [
+ "trace",
+ "debug",
+ "info",
+ "warn",
+ "error"
+ ], o = {}, i = null;
+ function a(e, t) {
+ var n = e[t];
+ if (typeof n.bind == "function") return n.bind(e);
+ try {
+ return Function.prototype.bind.call(n, e);
+ } catch {
+ return function() {
+ return Function.prototype.apply.apply(n, [e, arguments]);
+ };
+ }
+ }
+ function s() {
+ console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
+ }
+ function l() {
+ for (var n = this.getLevel(), o = 0; o < r.length; o++) {
+ var i = r[o];
+ this[i] = o < n ? e : this.methodFactory(i, n, this.name);
+ }
+ if (this.log = this.debug, typeof console === t && n < this.levels.SILENT) return "No console available for logging";
+ }
+ function c(e) {
+ return function() {
+ typeof console !== t && (l.call(this), this[e].apply(this, arguments));
+ };
+ }
+ function u(r, o, i) {
+ return function(r) {
+ return r === "debug" && (r = "log"), typeof console !== t && (r === "trace" && n ? s : console[r] === void 0 ? console.log === void 0 ? e : a(console, "log") : a(console, r));
+ }(r) || c.apply(this, arguments);
+ }
+ function d(e, n) {
+ var a, s, c, d = this, f = "loglevel";
+ function p() {
+ var e;
+ if (typeof window !== t && f) {
+ try {
+ e = window.localStorage[f];
+ } catch {}
+ if (typeof e === t) try {
+ var n = window.document.cookie, r = encodeURIComponent(f), o = n.indexOf(r + "=");
+ o !== -1 && (e = /^([^;]+)/.exec(n.slice(o + r.length + 1))[1]);
+ } catch {}
+ return d.levels[e] === void 0 && (e = void 0), e;
+ }
+ }
+ function h(e) {
+ var t = e;
+ if (typeof t == "string" && d.levels[t.toUpperCase()] !== void 0 && (t = d.levels[t.toUpperCase()]), typeof t == "number" && t >= 0 && t <= d.levels.SILENT) return t;
+ throw TypeError("log.setLevel() called with invalid level: " + e);
+ }
+ typeof e == "string" ? f += ":" + e : typeof e == "symbol" && (f = void 0), d.name = e, d.levels = {
+ TRACE: 0,
+ DEBUG: 1,
+ INFO: 2,
+ WARN: 3,
+ ERROR: 4,
+ SILENT: 5
+ }, d.methodFactory = n || u, d.getLevel = function() {
+ return c ?? s ?? a;
+ }, d.setLevel = function(e, n) {
+ return c = h(e), !1 !== n && function(e) {
+ var n = (r[e] || "silent").toUpperCase();
+ if (typeof window !== t && f) {
+ try {
+ window.localStorage[f] = n;
+ return;
+ } catch {}
+ try {
+ window.document.cookie = encodeURIComponent(f) + "=" + n + ";";
+ } catch {}
+ }
+ }(c), l.call(d);
+ }, d.setDefaultLevel = function(e) {
+ s = h(e), p() || d.setLevel(e, !1);
+ }, d.resetLevel = function() {
+ c = null, function() {
+ if (typeof window !== t && f) {
+ try {
+ window.localStorage.removeItem(f);
+ } catch {}
+ try {
+ window.document.cookie = encodeURIComponent(f) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
+ } catch {}
+ }
+ }(), l.call(d);
+ }, d.enableAll = function(e) {
+ d.setLevel(d.levels.TRACE, e);
+ }, d.disableAll = function(e) {
+ d.setLevel(d.levels.SILENT, e);
+ }, d.rebuild = function() {
+ if (i !== d && (a = h(i.getLevel())), l.call(d), i === d) for (var e in o) o[e].rebuild();
+ }, a = h(i ? i.getLevel() : "WARN");
+ var g = p();
+ g != null && (c = h(g)), l.call(d);
+ }
+ (i = new d()).getLogger = function(e) {
+ if (typeof e != "symbol" && typeof e != "string" || e === "") throw TypeError("You must supply a name when creating a logger.");
+ var t = o[e];
+ return t ||= o[e] = new d(e, i.methodFactory), t;
+ };
+ var f = typeof window === t ? void 0 : window.log;
+ return i.noConflict = function() {
+ return typeof window !== t && window.log === i && (window.log = f), i;
+ }, i.getLoggers = function() {
+ return o;
+ }, i.default = i, i;
+}))), yT.exports));
+let xT = localStorage.getItem("asset_sdk_verbose") === "true";
+const ET = {};
+wT.setDefaultLevel(xT ? wT.levels.DEBUG : wT.levels.WARN), typeof window < "u" && (window.asset_sdk_logger = {
+ setVerbose: function(e) {
+ xT = e, localStorage.setItem("asset_sdk_verbose", String(!!e));
+ let t = xT ? wT.levels.DEBUG : wT.levels.WARN;
+ wT.setLevel(t), Object.values(ET).forEach(((e) => {
+ e.setLevel(t);
+ }));
+ try {
+ localStorage.setItem("asset_sdk_verbose", String(e));
+ } catch (e) {
+ console.error(`Can't save logger verbosity to localStorage: ${e}`);
+ }
+ },
+ log: wT
+});
+const ST = Object.create(null);
+ST.open = "0", ST.close = "1", ST.ping = "2", ST.pong = "3", ST.message = "4", ST.upgrade = "5", ST.noop = "6";
+const CT = Object.create(null);
+Object.keys(ST).forEach(((e) => {
+ CT[ST[e]] = e;
+}));
+const kT = {
+ type: "error",
+ data: "parser error"
+}, _T = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", TT = typeof ArrayBuffer == "function", IT = (e) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(e) : e && e.buffer instanceof ArrayBuffer, OT = ({ type: e, data: t }, n, r) => _T && t instanceof Blob ? n ? r(t) : jT(t, r) : TT && (t instanceof ArrayBuffer || IT(t)) ? n ? r(t) : jT(new Blob([t]), r) : r(ST[e] + (t || "")), jT = (e, t) => {
+ let n = new FileReader();
+ return n.onload = function() {
+ let e = n.result.split(",")[1];
+ t("b" + (e || ""));
+ }, n.readAsDataURL(e);
+};
+function PT(e) {
+ return e instanceof Uint8Array ? e : e instanceof ArrayBuffer ? new Uint8Array(e) : new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
+}
+let AT;
+const NT = typeof Uint8Array > "u" ? [] : /* @__PURE__ */ new Uint8Array(256);
+for (let e = 0; e < 64; e++) NT["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(e)] = e;
+const MT = typeof ArrayBuffer == "function", LT = (e, t) => {
+ if (typeof e != "string") return {
+ type: "message",
+ data: RT(e, t)
+ };
+ let n = e.charAt(0);
+ return n === "b" ? {
+ type: "message",
+ data: DT(e.substring(1), t)
+ } : CT[n] ? e.length > 1 ? {
+ type: CT[n],
+ data: e.substring(1)
+ } : { type: CT[n] } : kT;
+}, DT = (e, t) => {
+ if (MT) {
+ let n = ((e) => {
+ let t, n, r, o, i, a = .75 * e.length, s = e.length, l = 0;
+ e[e.length - 1] === "=" && (a--, e[e.length - 2] === "=" && a--);
+ let c = new ArrayBuffer(a), u = new Uint8Array(c);
+ for (t = 0; t < s; t += 4) n = NT[e.charCodeAt(t)], r = NT[e.charCodeAt(t + 1)], o = NT[e.charCodeAt(t + 2)], i = NT[e.charCodeAt(t + 3)], u[l++] = n << 2 | r >> 4, u[l++] = (15 & r) << 4 | o >> 2, u[l++] = (3 & o) << 6 | 63 & i;
+ return c;
+ })(e);
+ return RT(n, t);
+ }
+ return {
+ base64: !0,
+ data: e
+ };
+}, RT = (e, t) => t === "blob" ? e instanceof Blob ? e : new Blob([e]) : e instanceof ArrayBuffer ? e : e.buffer;
+let zT;
+function $T(e) {
+ return e.reduce(((e, t) => e + t.length), 0);
+}
+function BT(e, t) {
+ if (e[0].length === t) return e.shift();
+ let n = new Uint8Array(t), r = 0;
+ for (let o = 0; o < t; o++) n[o] = e[0][r++], r === e[0].length && (e.shift(), r = 0);
+ return e.length && r < e[0].length && (e[0] = e[0].slice(r)), n;
+}
+function FT(e) {
+ if (e) return function(e) {
+ for (var t in FT.prototype) e[t] = FT.prototype[t];
+ return e;
+ }(e);
+}
+FT.prototype.on = FT.prototype.addEventListener = function(e, t) {
+ return this._callbacks = this._callbacks || {}, (this._callbacks["$" + e] = this._callbacks["$" + e] || []).push(t), this;
+}, FT.prototype.once = function(e, t) {
+ function n() {
+ this.off(e, n), t.apply(this, arguments);
+ }
+ return n.fn = t, this.on(e, n), this;
+}, FT.prototype.off = FT.prototype.removeListener = FT.prototype.removeAllListeners = FT.prototype.removeEventListener = function(e, t) {
+ if (this._callbacks = this._callbacks || {}, arguments.length == 0) return this._callbacks = {}, this;
+ var n = this._callbacks["$" + e];
+ if (!n) return this;
+ if (arguments.length == 1) return delete this._callbacks["$" + e], this;
+ for (var r, o = 0; o < n.length; o++) if ((r = n[o]) === t || r.fn === t) {
+ n.splice(o, 1);
+ break;
+ }
+ return n.length === 0 && delete this._callbacks["$" + e], this;
+}, FT.prototype.emit = function(e) {
+ this._callbacks = this._callbacks || {};
+ for (var t = Array(arguments.length - 1), n = this._callbacks["$" + e], r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
+ if (n) {
+ r = 0;
+ for (var o = (n = n.slice(0)).length; r < o; ++r) n[r].apply(this, t);
+ }
+ return this;
+}, FT.prototype.emitReserved = FT.prototype.emit, FT.prototype.listeners = function(e) {
+ return this._callbacks = this._callbacks || {}, this._callbacks["$" + e] || [];
+}, FT.prototype.hasListeners = function(e) {
+ return !!this.listeners(e).length;
+};
+const UT = typeof Promise == "function" && typeof Promise.resolve == "function" ? (e) => Promise.resolve().then(e) : (e, t) => t(e, 0), HT = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")();
+function WT(e, ...t) {
+ return t.reduce(((t, n) => (e.hasOwnProperty(n) && (t[n] = e[n]), t)), {});
+}
+const VT = HT.setTimeout, qT = HT.clearTimeout;
+function GT(e, t) {
+ t.useNativeTimers ? (e.setTimeoutFn = VT.bind(HT), e.clearTimeoutFn = qT.bind(HT)) : (e.setTimeoutFn = HT.setTimeout.bind(HT), e.clearTimeoutFn = HT.clearTimeout.bind(HT));
+}
+function YT(e) {
+ return typeof e == "string" ? function(e) {
+ let t = 0, n = 0;
+ for (let r = 0, o = e.length; r < o; r++) t = e.charCodeAt(r), t < 128 ? n += 1 : t < 2048 ? n += 2 : t < 55296 || t >= 57344 ? n += 3 : (r++, n += 4);
+ return n;
+ }(e) : Math.ceil(1.33 * (e.byteLength || e.size));
+}
+function ZT() {
+ return Date.now().toString(36).substring(3) + Math.random().toString(36).substring(2, 5);
+}
+var KT = class extends Error {
+ constructor(e, t, n) {
+ super(e), this.description = t, this.context = n, this.type = "TransportError";
+ }
+}, XT = class extends FT {
+ constructor(e) {
+ super(), this.writable = !1, GT(this, e), this.opts = e, this.query = e.query, this.socket = e.socket, this.supportsBinary = !e.forceBase64;
+ }
+ onError(e, t, n) {
+ return super.emitReserved("error", new KT(e, t, n)), this;
+ }
+ open() {
+ return this.readyState = "opening", this.doOpen(), this;
+ }
+ close() {
+ return (this.readyState === "opening" || this.readyState === "open") && (this.doClose(), this.onClose()), this;
+ }
+ send(e) {
+ this.readyState === "open" && this.write(e);
+ }
+ onOpen() {
+ this.readyState = "open", this.writable = !0, super.emitReserved("open");
+ }
+ onData(e) {
+ let t = LT(e, this.socket.binaryType);
+ this.onPacket(t);
+ }
+ onPacket(e) {
+ super.emitReserved("packet", e);
+ }
+ onClose(e) {
+ this.readyState = "closed", super.emitReserved("close", e);
+ }
+ pause(e) {}
+ createUri(e, t = {}) {
+ return e + "://" + this._hostname() + this._port() + this.opts.path + this._query(t);
+ }
+ _hostname() {
+ let e = this.opts.hostname;
+ return e.indexOf(":") === -1 ? e : "[" + e + "]";
+ }
+ _port() {
+ return this.opts.port && (this.opts.secure && +(this.opts.port !== 443) || !this.opts.secure && Number(this.opts.port) !== 80) ? ":" + this.opts.port : "";
+ }
+ _query(e) {
+ let t = function(e) {
+ let t = "";
+ for (let n in e) e.hasOwnProperty(n) && (t.length && (t += "&"), t += encodeURIComponent(n) + "=" + encodeURIComponent(e[n]));
+ return t;
+ }(e);
+ return t.length ? "?" + t : "";
+ }
+}, JT = class extends XT {
+ constructor() {
+ super(...arguments), this._polling = !1;
+ }
+ get name() {
+ return "polling";
+ }
+ doOpen() {
+ this._poll();
+ }
+ pause(e) {
+ this.readyState = "pausing";
+ let t = () => {
+ this.readyState = "paused", e();
+ };
+ if (this._polling || !this.writable) {
+ let e = 0;
+ this._polling && (e++, this.once("pollComplete", (function() {
+ --e || t();
+ }))), this.writable || (e++, this.once("drain", (function() {
+ --e || t();
+ })));
+ } else t();
+ }
+ _poll() {
+ this._polling = !0, this.doPoll(), this.emitReserved("poll");
+ }
+ onData(e) {
+ ((e, t) => {
+ let n = e.split(""), r = [];
+ for (let e = 0; e < n.length; e++) {
+ let o = LT(n[e], t);
+ if (r.push(o), o.type === "error") break;
+ }
+ return r;
+ })(e, this.socket.binaryType).forEach(((e) => {
+ if (this.readyState === "opening" && e.type === "open" && this.onOpen(), e.type === "close") return this.onClose({ description: "transport closed by the server" }), !1;
+ this.onPacket(e);
+ })), this.readyState !== "closed" && (this._polling = !1, this.emitReserved("pollComplete"), this.readyState === "open" && this._poll());
+ }
+ doClose() {
+ let e = () => {
+ this.write([{ type: "close" }]);
+ };
+ this.readyState === "open" ? e() : this.once("open", e);
+ }
+ write(e) {
+ this.writable = !1, ((e, t) => {
+ let n = e.length, r = Array(n), o = 0;
+ e.forEach(((e, i) => {
+ OT(e, !1, ((e) => {
+ r[i] = e, ++o === n && t(r.join(""));
+ }));
+ }));
+ })(e, ((e) => {
+ this.doWrite(e, (() => {
+ this.writable = !0, this.emitReserved("drain");
+ }));
+ }));
+ }
+ uri() {
+ let e = this.opts.secure ? "https" : "http", t = this.query || {};
+ return !1 !== this.opts.timestampRequests && (t[this.opts.timestampParam] = ZT()), !this.supportsBinary && !t.sid && (t.b64 = 1), this.createUri(e, t);
+ }
+};
+let QT = !1;
+try {
+ QT = typeof XMLHttpRequest < "u" && "withCredentials" in new XMLHttpRequest();
+} catch {}
+const eI = QT;
+function tI() {}
+var nI = class extends JT {
+ constructor(e) {
+ if (super(e), typeof location < "u") {
+ let t = location.protocol === "https:", n = location.port;
+ n ||= t ? "443" : "80", this.xd = typeof location < "u" && e.hostname !== location.hostname || n !== e.port;
+ }
+ }
+ doWrite(e, t) {
+ let n = this.request({
+ method: "POST",
+ data: e
+ });
+ n.on("success", t), n.on("error", ((e, t) => {
+ this.onError("xhr post error", e, t);
+ }));
+ }
+ doPoll() {
+ let e = this.request();
+ e.on("data", this.onData.bind(this)), e.on("error", ((e, t) => {
+ this.onError("xhr poll error", e, t);
+ })), this.pollXhr = e;
+ }
+};
+let rI = class e extends FT {
+ constructor(e, t, n) {
+ super(), this.createRequest = e, GT(this, n), this._opts = n, this._method = n.method || "GET", this._uri = t, this._data = n.data === void 0 ? null : n.data, this._create();
+ }
+ _create() {
+ var t;
+ let n = WT(this._opts, "agent", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "autoUnref");
+ n.xdomain = !!this._opts.xd;
+ let r = this._xhr = this.createRequest(n);
+ try {
+ r.open(this._method, this._uri, !0);
+ try {
+ if (this._opts.extraHeaders) {
+ r.setDisableHeaderCheck && r.setDisableHeaderCheck(!0);
+ for (let e in this._opts.extraHeaders) this._opts.extraHeaders.hasOwnProperty(e) && r.setRequestHeader(e, this._opts.extraHeaders[e]);
+ }
+ } catch {}
+ if (this._method === "POST") try {
+ r.setRequestHeader("Content-type", "text/plain;charset=UTF-8");
+ } catch {}
+ try {
+ r.setRequestHeader("Accept", "*/*");
+ } catch {}
+ (t = this._opts.cookieJar) == null || t.addCookies(r), "withCredentials" in r && (r.withCredentials = this._opts.withCredentials), this._opts.requestTimeout && (r.timeout = this._opts.requestTimeout), r.onreadystatechange = () => {
+ var e;
+ r.readyState === 3 && ((e = this._opts.cookieJar) == null || e.parseCookies(r.getResponseHeader("set-cookie"))), r.readyState === 4 && (r.status === 200 || r.status === 1223 ? this._onLoad() : this.setTimeoutFn((() => {
+ this._onError(typeof r.status == "number" ? r.status : 0);
+ }), 0));
+ }, r.send(this._data);
+ } catch (e) {
+ this.setTimeoutFn((() => {
+ this._onError(e);
+ }), 0);
+ return;
+ }
+ typeof document < "u" && (this._index = e.requestsCount++, e.requests[this._index] = this);
+ }
+ _onError(e) {
+ this.emitReserved("error", e, this._xhr), this._cleanup(!0);
+ }
+ _cleanup(t) {
+ if (!(typeof this._xhr > "u" || this._xhr === null)) {
+ if (this._xhr.onreadystatechange = tI, t) try {
+ this._xhr.abort();
+ } catch {}
+ typeof document < "u" && delete e.requests[this._index], this._xhr = null;
+ }
+ }
+ _onLoad() {
+ let e = this._xhr.responseText;
+ e !== null && (this.emitReserved("data", e), this.emitReserved("success"), this._cleanup());
+ }
+ abort() {
+ this._cleanup();
+ }
+};
+function oI() {
+ for (let e in rI.requests) rI.requests.hasOwnProperty(e) && rI.requests[e].abort();
+}
+rI.requestsCount = 0, rI.requests = {}, typeof document < "u" && (typeof attachEvent == "function" ? attachEvent("onunload", oI) : typeof addEventListener == "function" && addEventListener("onpagehide" in HT ? "pagehide" : "unload", oI, !1));
+const iI = function() {
+ let e = aI({ xdomain: !1 });
+ return e && e.responseType !== null;
+}();
+function aI(e) {
+ let t = e.xdomain;
+ try {
+ if (typeof XMLHttpRequest < "u" && (!t || eI)) return new XMLHttpRequest();
+ } catch {}
+ if (!t) try {
+ return new HT[["Active", "Object"].join("X")]("Microsoft.XMLHTTP");
+ } catch {}
+}
+const sI = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative";
+var lI = class extends XT {
+ get name() {
+ return "websocket";
+ }
+ doOpen() {
+ let e = this.uri(), t = this.opts.protocols, n = sI ? {} : WT(this.opts, "agent", "perMessageDeflate", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "localAddress", "protocolVersion", "origin", "maxPayload", "family", "checkServerIdentity");
+ this.opts.extraHeaders && (n.headers = this.opts.extraHeaders);
+ try {
+ this.ws = this.createSocket(e, t, n);
+ } catch (e) {
+ return this.emitReserved("error", e);
+ }
+ this.ws.binaryType = this.socket.binaryType, this.addEventListeners();
+ }
+ addEventListeners() {
+ this.ws.onopen = () => {
+ this.opts.autoUnref && this.ws._socket.unref(), this.onOpen();
+ }, this.ws.onclose = (e) => this.onClose({
+ description: "websocket connection closed",
+ context: e
+ }), this.ws.onmessage = (e) => this.onData(e.data), this.ws.onerror = (e) => this.onError("websocket error", e);
+ }
+ write(e) {
+ this.writable = !1;
+ for (let t = 0; t < e.length; t++) {
+ let n = e[t], r = t === e.length - 1;
+ OT(n, this.supportsBinary, ((e) => {
+ try {
+ this.doWrite(n, e);
+ } catch {}
+ r && UT((() => {
+ this.writable = !0, this.emitReserved("drain");
+ }), this.setTimeoutFn);
+ }));
+ }
+ }
+ doClose() {
+ typeof this.ws < "u" && (this.ws.onerror = () => {}, this.ws.close(), this.ws = null);
+ }
+ uri() {
+ let e = this.opts.secure ? "wss" : "ws", t = this.query || {};
+ return this.opts.timestampRequests && (t[this.opts.timestampParam] = ZT()), this.supportsBinary || (t.b64 = 1), this.createUri(e, t);
+ }
+};
+const cI = HT.WebSocket || HT.MozWebSocket, uI = {
+ websocket: class extends lI {
+ createSocket(e, t, n) {
+ return sI ? new cI(e, t, n) : t ? new cI(e, t) : new cI(e);
+ }
+ doWrite(e, t) {
+ this.ws.send(t);
+ }
+ },
+ webtransport: class extends XT {
+ get name() {
+ return "webtransport";
+ }
+ doOpen() {
+ try {
+ this._transport = new WebTransport(this.createUri("https"), this.opts.transportOptions[this.name]);
+ } catch (e) {
+ return this.emitReserved("error", e);
+ }
+ this._transport.closed.then((() => {
+ this.onClose();
+ })).catch(((e) => {
+ this.onError("webtransport error", e);
+ })), this._transport.ready.then((() => {
+ this._transport.createBidirectionalStream().then(((e) => {
+ let t = function(e, t) {
+ zT ||= new TextDecoder();
+ let n = [], r = 0, o = -1, i = !1;
+ return new TransformStream({ transform(a, s) {
+ for (n.push(a);;) {
+ if (r === 0) {
+ if ($T(n) < 1) break;
+ let e = BT(n, 1);
+ i = !(128 & ~e[0]), o = 127 & e[0], r = o < 126 ? 3 : o === 126 ? 1 : 2;
+ } else if (r === 1) {
+ if ($T(n) < 2) break;
+ let e = BT(n, 2);
+ o = new DataView(e.buffer, e.byteOffset, e.length).getUint16(0), r = 3;
+ } else if (r === 2) {
+ if ($T(n) < 8) break;
+ let e = BT(n, 8), t = new DataView(e.buffer, e.byteOffset, e.length), i = t.getUint32(0);
+ if (i > 2 ** 21 - 1) {
+ s.enqueue(kT);
+ break;
+ }
+ o = i * 2 ** 32 + t.getUint32(4), r = 3;
+ } else {
+ if ($T(n) < o) break;
+ let e = BT(n, o);
+ s.enqueue(LT(i ? e : zT.decode(e), t)), r = 0;
+ }
+ if (o === 0 || o > e) {
+ s.enqueue(kT);
+ break;
+ }
+ }
+ } });
+ }(2 ** 53 - 1, this.socket.binaryType), n = e.readable.pipeThrough(t).getReader(), r = new TransformStream({ transform(e, t) {
+ (function(e, t) {
+ _T && e.data instanceof Blob ? e.data.arrayBuffer().then(PT).then(t) : TT && (e.data instanceof ArrayBuffer || IT(e.data)) ? t(PT(e.data)) : OT(e, !1, ((e) => {
+ AT ||= new TextEncoder(), t(AT.encode(e));
+ }));
+ })(e, ((n) => {
+ let r = n.length, o;
+ if (r < 126) o = /* @__PURE__ */ new Uint8Array(1), new DataView(o.buffer).setUint8(0, r);
+ else if (r < 65536) {
+ o = /* @__PURE__ */ new Uint8Array(3);
+ let e = new DataView(o.buffer);
+ e.setUint8(0, 126), e.setUint16(1, r);
+ } else {
+ o = /* @__PURE__ */ new Uint8Array(9);
+ let e = new DataView(o.buffer);
+ e.setUint8(0, 127), e.setBigUint64(1, BigInt(r));
+ }
+ e.data && typeof e.data != "string" && (o[0] |= 128), t.enqueue(o), t.enqueue(n);
+ }));
+ } });
+ r.readable.pipeTo(e.writable), this._writer = r.writable.getWriter();
+ let o = () => {
+ n.read().then((({ done: e, value: t }) => {
+ e || (this.onPacket(t), o());
+ })).catch(((e) => {}));
+ };
+ o();
+ let i = { type: "open" };
+ this.query.sid && (i.data = `{"sid":"${this.query.sid}"}`), this._writer.write(i).then((() => this.onOpen()));
+ }));
+ }));
+ }
+ write(e) {
+ this.writable = !1;
+ for (let t = 0; t < e.length; t++) {
+ let n = e[t], r = t === e.length - 1;
+ this._writer.write(n).then((() => {
+ r && UT((() => {
+ this.writable = !0, this.emitReserved("drain");
+ }), this.setTimeoutFn);
+ }));
+ }
+ }
+ doClose() {
+ var e;
+ (e = this._transport) == null || e.close();
+ }
+ },
+ polling: class extends nI {
+ constructor(e) {
+ super(e);
+ let t = e && e.forceBase64;
+ this.supportsBinary = iI && !t;
+ }
+ request(e = {}) {
+ return Object.assign(e, { xd: this.xd }, this.opts), new rI(aI, this.uri(), e);
+ }
+ }
+}, dI = /^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, fI = [
+ "source",
+ "protocol",
+ "authority",
+ "userInfo",
+ "user",
+ "password",
+ "host",
+ "port",
+ "relative",
+ "path",
+ "directory",
+ "file",
+ "query",
+ "anchor"
+];
+function pI(e) {
+ if (e.length > 8e3) throw "URI too long";
+ let t = e, n = e.indexOf("["), r = e.indexOf("]");
+ n != -1 && r != -1 && (e = e.substring(0, n) + e.substring(n, r).replace(/:/g, ";") + e.substring(r, e.length));
+ let o = dI.exec(e || ""), i = {}, a = 14;
+ for (; a--;) i[fI[a]] = o[a] || "";
+ return n != -1 && r != -1 && (i.source = t, i.host = i.host.substring(1, i.host.length - 1).replace(/;/g, ":"), i.authority = i.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), i.ipv6uri = !0), i.pathNames = function(e, t) {
+ let n = t.replace(/\/{2,9}/g, "/").split("/");
+ return (t.slice(0, 1) == "/" || t.length === 0) && n.splice(0, 1), t.slice(-1) == "/" && n.splice(n.length - 1, 1), n;
+ }(0, i.path), i.queryKey = function(e, t) {
+ let n = {};
+ return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, (function(e, t, r) {
+ t && (n[t] = r);
+ })), n;
+ }(0, i.query), i;
+}
+const hI = typeof addEventListener == "function" && typeof removeEventListener == "function", gI = [];
+hI && addEventListener("offline", (() => {
+ gI.forEach(((e) => e()));
+}), !1);
+var mI = class mI extends FT {
+ constructor(e, t) {
+ if (super(), this.binaryType = "arraybuffer", this.writeBuffer = [], this._prevBufferLen = 0, this._pingInterval = -1, this._pingTimeout = -1, this._maxPayload = -1, this._pingTimeoutTime = Infinity, e && typeof e == "object" && (t = e, e = null), e) {
+ let n = pI(e);
+ t.hostname = n.host, t.secure = n.protocol === "https" || n.protocol === "wss", t.port = n.port, n.query && (t.query = n.query);
+ } else t.host && (t.hostname = pI(t.host).host);
+ GT(this, t), this.secure = t.secure == null ? typeof location < "u" && location.protocol === "https:" : t.secure, t.hostname && !t.port && (t.port = this.secure ? "443" : "80"), this.hostname = t.hostname || (typeof location < "u" ? location.hostname : "localhost"), this.port = t.port || (typeof location < "u" && location.port ? location.port : this.secure ? "443" : "80"), this.transports = [], this._transportsByName = {}, t.transports.forEach(((e) => {
+ let t = e.prototype.name;
+ this.transports.push(t), this._transportsByName[t] = e;
+ })), this.opts = Object.assign({
+ path: "/engine.io",
+ agent: !1,
+ withCredentials: !1,
+ upgrade: !0,
+ timestampParam: "t",
+ rememberUpgrade: !1,
+ addTrailingSlash: !0,
+ rejectUnauthorized: !0,
+ perMessageDeflate: { threshold: 1024 },
+ transportOptions: {},
+ closeOnBeforeunload: !1
+ }, t), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query = function(e) {
+ let t = {}, n = e.split("&");
+ for (let e = 0, r = n.length; e < r; e++) {
+ let r = n[e].split("=");
+ t[decodeURIComponent(r[0])] = decodeURIComponent(r[1]);
+ }
+ return t;
+ }(this.opts.query)), hI && (this.opts.closeOnBeforeunload && (this._beforeunloadEventListener = () => {
+ this.transport && (this.transport.removeAllListeners(), this.transport.close());
+ }, addEventListener("beforeunload", this._beforeunloadEventListener, !1)), this.hostname !== "localhost" && (this._offlineEventListener = () => {
+ this._onClose("transport close", { description: "network connection lost" });
+ }, gI.push(this._offlineEventListener))), this.opts.withCredentials && (this._cookieJar = void 0), this._open();
+ }
+ createTransport(e) {
+ let t = Object.assign({}, this.opts.query);
+ t.EIO = 4, t.transport = e, this.id && (t.sid = this.id);
+ let n = Object.assign({}, this.opts, {
+ query: t,
+ socket: this,
+ hostname: this.hostname,
+ secure: this.secure,
+ port: this.port
+ }, this.opts.transportOptions[e]);
+ return new this._transportsByName[e](n);
+ }
+ _open() {
+ if (this.transports.length === 0) return void this.setTimeoutFn((() => {
+ this.emitReserved("error", "No transports available");
+ }), 0);
+ let e = this.opts.rememberUpgrade && mI.priorWebsocketSuccess && this.transports.indexOf("websocket") !== -1 ? "websocket" : this.transports[0];
+ this.readyState = "opening";
+ let t = this.createTransport(e);
+ t.open(), this.setTransport(t);
+ }
+ setTransport(e) {
+ this.transport && this.transport.removeAllListeners(), this.transport = e, e.on("drain", this._onDrain.bind(this)).on("packet", this._onPacket.bind(this)).on("error", this._onError.bind(this)).on("close", ((e) => this._onClose("transport close", e)));
+ }
+ onOpen() {
+ this.readyState = "open", mI.priorWebsocketSuccess = this.transport.name === "websocket", this.emitReserved("open"), this.flush();
+ }
+ _onPacket(e) {
+ if (this.readyState === "opening" || this.readyState === "open" || this.readyState === "closing") switch (this.emitReserved("packet", e), this.emitReserved("heartbeat"), e.type) {
+ case "open":
+ this.onHandshake(JSON.parse(e.data));
+ break;
+ case "ping":
+ this._sendPacket("pong"), this.emitReserved("ping"), this.emitReserved("pong"), this._resetPingTimeout();
+ break;
+ case "error":
+ let t = /* @__PURE__ */ Error("server error");
+ t.code = e.data, this._onError(t);
+ break;
+ case "message": this.emitReserved("data", e.data), this.emitReserved("message", e.data);
+ }
+ }
+ onHandshake(e) {
+ this.emitReserved("handshake", e), this.id = e.sid, this.transport.query.sid = e.sid, this._pingInterval = e.pingInterval, this._pingTimeout = e.pingTimeout, this._maxPayload = e.maxPayload, this.onOpen(), this.readyState !== "closed" && this._resetPingTimeout();
+ }
+ _resetPingTimeout() {
+ this.clearTimeoutFn(this._pingTimeoutTimer);
+ let e = this._pingInterval + this._pingTimeout;
+ this._pingTimeoutTime = Date.now() + e, this._pingTimeoutTimer = this.setTimeoutFn((() => {
+ this._onClose("ping timeout");
+ }), e), this.opts.autoUnref && this._pingTimeoutTimer.unref();
+ }
+ _onDrain() {
+ this.writeBuffer.splice(0, this._prevBufferLen), this._prevBufferLen = 0, this.writeBuffer.length === 0 ? this.emitReserved("drain") : this.flush();
+ }
+ flush() {
+ if (this.readyState !== "closed" && this.transport.writable && !this.upgrading && this.writeBuffer.length) {
+ let e = this._getWritablePackets();
+ this.transport.send(e), this._prevBufferLen = e.length, this.emitReserved("flush");
+ }
+ }
+ _getWritablePackets() {
+ if (!(this._maxPayload && this.transport.name === "polling" && this.writeBuffer.length > 1)) return this.writeBuffer;
+ let e = 1;
+ for (let t = 0; t < this.writeBuffer.length; t++) {
+ let n = this.writeBuffer[t].data;
+ if (n && (e += YT(n)), t > 0 && e > this._maxPayload) return this.writeBuffer.slice(0, t);
+ e += 2;
+ }
+ return this.writeBuffer;
+ }
+ _hasPingExpired() {
+ if (!this._pingTimeoutTime) return !0;
+ let e = Date.now() > this._pingTimeoutTime;
+ return e && (this._pingTimeoutTime = 0, UT((() => {
+ this._onClose("ping timeout");
+ }), this.setTimeoutFn)), e;
+ }
+ write(e, t, n) {
+ return this._sendPacket("message", e, t, n), this;
+ }
+ send(e, t, n) {
+ return this._sendPacket("message", e, t, n), this;
+ }
+ _sendPacket(e, t, n, r) {
+ if (typeof t == "function" && (r = t, t = void 0), typeof n == "function" && (r = n, n = null), this.readyState === "closing" || this.readyState === "closed") return;
+ (n ||= {}).compress = !1 !== n.compress;
+ let o = {
+ type: e,
+ data: t,
+ options: n
+ };
+ this.emitReserved("packetCreate", o), this.writeBuffer.push(o), r && this.once("flush", r), this.flush();
+ }
+ close() {
+ let e = () => {
+ this._onClose("forced close"), this.transport.close();
+ }, t = () => {
+ this.off("upgrade", t), this.off("upgradeError", t), e();
+ }, n = () => {
+ this.once("upgrade", t), this.once("upgradeError", t);
+ };
+ return (this.readyState === "opening" || this.readyState === "open") && (this.readyState = "closing", this.writeBuffer.length ? this.once("drain", (() => {
+ this.upgrading ? n() : e();
+ })) : this.upgrading ? n() : e()), this;
+ }
+ _onError(e) {
+ if (mI.priorWebsocketSuccess = !1, this.opts.tryAllTransports && this.transports.length > 1 && this.readyState === "opening") return this.transports.shift(), this._open();
+ this.emitReserved("error", e), this._onClose("transport error", e);
+ }
+ _onClose(e, t) {
+ if (this.readyState === "opening" || this.readyState === "open" || this.readyState === "closing") {
+ if (this.clearTimeoutFn(this._pingTimeoutTimer), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), hI && (this._beforeunloadEventListener && removeEventListener("beforeunload", this._beforeunloadEventListener, !1), this._offlineEventListener)) {
+ let e = gI.indexOf(this._offlineEventListener);
+ e !== -1 && gI.splice(e, 1);
+ }
+ this.readyState = "closed", this.id = null, this.emitReserved("close", e, t), this.writeBuffer = [], this._prevBufferLen = 0;
+ }
+ }
+};
+mI.protocol = 4;
+var vI = class extends mI {
+ constructor() {
+ super(...arguments), this._upgrades = [];
+ }
+ onOpen() {
+ if (super.onOpen(), this.readyState === "open" && this.opts.upgrade) for (let e = 0; e < this._upgrades.length; e++) this._probe(this._upgrades[e]);
+ }
+ _probe(e) {
+ let t = this.createTransport(e), n = !1;
+ mI.priorWebsocketSuccess = !1;
+ let r = () => {
+ n || (t.send([{
+ type: "ping",
+ data: "probe"
+ }]), t.once("packet", ((e) => {
+ if (!n) if (e.type === "pong" && e.data === "probe") {
+ if (this.upgrading = !0, this.emitReserved("upgrading", t), !t) return;
+ mI.priorWebsocketSuccess = t.name === "websocket", this.transport.pause((() => {
+ n || this.readyState !== "closed" && (c(), this.setTransport(t), t.send([{ type: "upgrade" }]), this.emitReserved("upgrade", t), t = null, this.upgrading = !1, this.flush());
+ }));
+ } else {
+ let e = /* @__PURE__ */ Error("probe error");
+ e.transport = t.name, this.emitReserved("upgradeError", e);
+ }
+ })));
+ };
+ function o() {
+ n || (n = !0, c(), t.close(), t = null);
+ }
+ let i = (e) => {
+ let n = /* @__PURE__ */ Error("probe error: " + e);
+ n.transport = t.name, o(), this.emitReserved("upgradeError", n);
+ };
+ function a() {
+ i("transport closed");
+ }
+ function s() {
+ i("socket closed");
+ }
+ function l(e) {
+ t && e.name !== t.name && o();
+ }
+ let c = () => {
+ t.removeListener("open", r), t.removeListener("error", i), t.removeListener("close", a), this.off("close", s), this.off("upgrading", l);
+ };
+ t.once("open", r), t.once("error", i), t.once("close", a), this.once("close", s), this.once("upgrading", l), this._upgrades.indexOf("webtransport") !== -1 && e !== "webtransport" ? this.setTimeoutFn((() => {
+ n || t.open();
+ }), 200) : t.open();
+ }
+ onHandshake(e) {
+ this._upgrades = this._filterUpgrades(e.upgrades), super.onHandshake(e);
+ }
+ _filterUpgrades(e) {
+ let t = [];
+ for (let n = 0; n < e.length; n++) ~this.transports.indexOf(e[n]) && t.push(e[n]);
+ return t;
+ }
+};
+let yI = class extends vI {
+ constructor(e, t = {}) {
+ let n = typeof e == "object" ? e : t;
+ (!n.transports || n.transports && typeof n.transports[0] == "string") && (n.transports = (n.transports || [
+ "polling",
+ "websocket",
+ "webtransport"
+ ]).map(((e) => uI[e])).filter(((e) => !!e))), super(e, n);
+ }
+};
+const bI = typeof ArrayBuffer == "function", wI = Object.prototype.toString, xI = typeof Blob == "function" || typeof Blob < "u" && wI.call(Blob) === "[object BlobConstructor]", EI = typeof File == "function" || typeof File < "u" && wI.call(File) === "[object FileConstructor]";
+function SI(e) {
+ return bI && (e instanceof ArrayBuffer || ((e) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(e) : e.buffer instanceof ArrayBuffer)(e)) || xI && e instanceof Blob || EI && e instanceof File;
+}
+function CI(e, t) {
+ if (!e || typeof e != "object") return !1;
+ if (Array.isArray(e)) {
+ for (let t = 0, n = e.length; t < n; t++) if (CI(e[t])) return !0;
+ return !1;
+ }
+ if (SI(e)) return !0;
+ if (e.toJSON && typeof e.toJSON == "function" && arguments.length === 1) return CI(e.toJSON(), !0);
+ for (let t in e) if (Object.prototype.hasOwnProperty.call(e, t) && CI(e[t])) return !0;
+ return !1;
+}
+function kI(e) {
+ let t = [], n = e.data, r = e;
+ return r.data = _I(n, t), r.attachments = t.length, {
+ packet: r,
+ buffers: t
+ };
+}
+function _I(e, t) {
+ if (!e) return e;
+ if (SI(e)) {
+ let n = {
+ _placeholder: !0,
+ num: t.length
+ };
+ return t.push(e), n;
+ }
+ if (Array.isArray(e)) {
+ let n = Array(e.length);
+ for (let r = 0; r < e.length; r++) n[r] = _I(e[r], t);
+ return n;
+ }
+ if (typeof e == "object" && !(e instanceof Date)) {
+ let n = {};
+ for (let r in e) Object.prototype.hasOwnProperty.call(e, r) && (n[r] = _I(e[r], t));
+ return n;
+ }
+ return e;
+}
+function TI(e, t) {
+ return e.data = II(e.data, t), delete e.attachments, e;
+}
+function II(e, t) {
+ if (!e) return e;
+ if (e && !0 === e._placeholder) {
+ if (typeof e.num == "number" && e.num >= 0 && e.num < t.length) return t[e.num];
+ throw Error("illegal attachments");
+ }
+ if (Array.isArray(e)) for (let n = 0; n < e.length; n++) e[n] = II(e[n], t);
+ else if (typeof e == "object") for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (e[n] = II(e[n], t));
+ return e;
+}
+const OI = [
+ "connect",
+ "connect_error",
+ "disconnect",
+ "disconnecting",
+ "newListener",
+ "removeListener"
+];
+var jI;
+function PI(e) {
+ return Object.prototype.toString.call(e) === "[object Object]";
+}
+(function(e) {
+ e[e.CONNECT = 0] = "CONNECT", e[e.DISCONNECT = 1] = "DISCONNECT", e[e.EVENT = 2] = "EVENT", e[e.ACK = 3] = "ACK", e[e.CONNECT_ERROR = 4] = "CONNECT_ERROR", e[e.BINARY_EVENT = 5] = "BINARY_EVENT", e[e.BINARY_ACK = 6] = "BINARY_ACK";
+})(jI ||= {});
+var AI = class AI extends FT {
+ constructor(e) {
+ super(), this.reviver = e;
+ }
+ add(e) {
+ let t;
+ if (typeof e == "string") {
+ if (this.reconstructor) throw Error("got plaintext data when reconstructing a packet");
+ t = this.decodeString(e);
+ let n = t.type === jI.BINARY_EVENT;
+ n || t.type === jI.BINARY_ACK ? (t.type = n ? jI.EVENT : jI.ACK, this.reconstructor = new NI(t), t.attachments === 0 && super.emitReserved("decoded", t)) : super.emitReserved("decoded", t);
+ } else {
+ if (!SI(e) && !e.base64) throw Error("Unknown type: " + e);
+ if (!this.reconstructor) throw Error("got binary data when not reconstructing a packet");
+ t = this.reconstructor.takeBinaryData(e), t && (this.reconstructor = null, super.emitReserved("decoded", t));
+ }
+ }
+ decodeString(e) {
+ let t = 0, n = { type: Number(e.charAt(0)) };
+ if (jI[n.type] === void 0) throw Error("unknown packet type " + n.type);
+ if (n.type === jI.BINARY_EVENT || n.type === jI.BINARY_ACK) {
+ let r = t + 1;
+ for (; e.charAt(++t) !== "-" && t != e.length;);
+ let o = e.substring(r, t);
+ if (o != Number(o) || e.charAt(t) !== "-") throw Error("Illegal attachments");
+ n.attachments = Number(o);
+ }
+ if (e.charAt(t + 1) === "/") {
+ let r = t + 1;
+ for (; ++t && e.charAt(t) !== "," && t !== e.length;);
+ n.nsp = e.substring(r, t);
+ } else n.nsp = "/";
+ let r = e.charAt(t + 1);
+ if (r !== "" && Number(r) == r) {
+ let r = t + 1;
+ for (; ++t;) {
+ let n = e.charAt(t);
+ if (n == null || Number(n) != n) {
+ --t;
+ break;
+ }
+ if (t === e.length) break;
+ }
+ n.id = Number(e.substring(r, t + 1));
+ }
+ if (e.charAt(++t)) {
+ let r = this.tryParse(e.substr(t));
+ if (!AI.isPayloadValid(n.type, r)) throw Error("invalid payload");
+ n.data = r;
+ }
+ return n;
+ }
+ tryParse(e) {
+ try {
+ return JSON.parse(e, this.reviver);
+ } catch {
+ return !1;
+ }
+ }
+ static isPayloadValid(e, t) {
+ switch (e) {
+ case jI.CONNECT: return PI(t);
+ case jI.DISCONNECT: return t === void 0;
+ case jI.CONNECT_ERROR: return typeof t == "string" || PI(t);
+ case jI.EVENT:
+ case jI.BINARY_EVENT: return Array.isArray(t) && (typeof t[0] == "number" || typeof t[0] == "string" && OI.indexOf(t[0]) === -1);
+ case jI.ACK:
+ case jI.BINARY_ACK: return Array.isArray(t);
+ }
+ }
+ destroy() {
+ this.reconstructor &&= (this.reconstructor.finishedReconstruction(), null);
+ }
+}, NI = class {
+ constructor(e) {
+ this.packet = e, this.buffers = [], this.reconPack = e;
+ }
+ takeBinaryData(e) {
+ if (this.buffers.push(e), this.buffers.length === this.reconPack.attachments) {
+ let e = TI(this.reconPack, this.buffers);
+ return this.finishedReconstruction(), e;
+ }
+ return null;
+ }
+ finishedReconstruction() {
+ this.reconPack = null, this.buffers = [];
+ }
+};
+const MI = Object.freeze(Object.defineProperty({
+ __proto__: null,
+ Decoder: AI,
+ Encoder: class {
+ constructor(e) {
+ this.replacer = e;
+ }
+ encode(e) {
+ return e.type !== jI.EVENT && e.type !== jI.ACK || !CI(e) ? [this.encodeAsString(e)] : this.encodeAsBinary({
+ type: e.type === jI.EVENT ? jI.BINARY_EVENT : jI.BINARY_ACK,
+ nsp: e.nsp,
+ data: e.data,
+ id: e.id
+ });
+ }
+ encodeAsString(e) {
+ let t = "" + e.type;
+ return (e.type === jI.BINARY_EVENT || e.type === jI.BINARY_ACK) && (t += e.attachments + "-"), e.nsp && e.nsp !== "/" && (t += e.nsp + ","), e.id != null && (t += e.id), e.data != null && (t += JSON.stringify(e.data, this.replacer)), t;
+ }
+ encodeAsBinary(e) {
+ let t = kI(e), n = this.encodeAsString(t.packet), r = t.buffers;
+ return r.unshift(n), r;
+ }
+ },
+ get PacketType() {
+ return jI;
+ },
+ protocol: 5
+}, Symbol.toStringTag, { value: "Module" }));
+function LI(e, t, n) {
+ return e.on(t, n), function() {
+ e.off(t, n);
+ };
+}
+const DI = Object.freeze({
+ connect: 1,
+ connect_error: 1,
+ disconnect: 1,
+ disconnecting: 1,
+ newListener: 1,
+ removeListener: 1
+});
+var RI = class extends FT {
+ constructor(e, t, n) {
+ super(), this.connected = !1, this.recovered = !1, this.receiveBuffer = [], this.sendBuffer = [], this._queue = [], this._queueSeq = 0, this.ids = 0, this.acks = {}, this.flags = {}, this.io = e, this.nsp = t, n && n.auth && (this.auth = n.auth), this._opts = Object.assign({}, n), this.io._autoConnect && this.open();
+ }
+ get disconnected() {
+ return !this.connected;
+ }
+ subEvents() {
+ if (this.subs) return;
+ let e = this.io;
+ this.subs = [
+ LI(e, "open", this.onopen.bind(this)),
+ LI(e, "packet", this.onpacket.bind(this)),
+ LI(e, "error", this.onerror.bind(this)),
+ LI(e, "close", this.onclose.bind(this))
+ ];
+ }
+ get active() {
+ return !!this.subs;
+ }
+ connect() {
+ return this.connected || (this.subEvents(), this.io._reconnecting || this.io.open(), this.io._readyState === "open" && this.onopen()), this;
+ }
+ open() {
+ return this.connect();
+ }
+ send(...e) {
+ return e.unshift("message"), this.emit.apply(this, e), this;
+ }
+ emit(e, ...t) {
+ var o;
+ if (DI.hasOwnProperty(e)) throw Error("\"" + e.toString() + "\" is a reserved event name");
+ if (t.unshift(e), this._opts.retries && !this.flags.fromQueue && !this.flags.volatile) return this._addToQueue(t), this;
+ let i = {
+ type: jI.EVENT,
+ data: t,
+ options: {}
+ };
+ if (i.options.compress = !1 !== this.flags.compress, typeof t[t.length - 1] == "function") {
+ let e = this.ids++, n = t.pop();
+ this._registerAckCallback(e, n), i.id = e;
+ }
+ let a = this.io.engine?.transport?.writable, s = this.connected && !((o = this.io.engine) != null && o._hasPingExpired());
+ return this.flags.volatile && !a || (s ? (this.notifyOutgoingListeners(i), this.packet(i)) : this.sendBuffer.push(i)), this.flags = {}, this;
+ }
+ _registerAckCallback(e, t) {
+ let r = this.flags.timeout ?? this._opts.ackTimeout;
+ if (r === void 0) return void (this.acks[e] = t);
+ let o = this.io.setTimeoutFn((() => {
+ delete this.acks[e];
+ for (let t = 0; t < this.sendBuffer.length; t++) this.sendBuffer[t].id === e && this.sendBuffer.splice(t, 1);
+ t.call(this, /* @__PURE__ */ Error("operation has timed out"));
+ }), r), i = (...e) => {
+ this.io.clearTimeoutFn(o), t.apply(this, e);
+ };
+ i.withError = !0, this.acks[e] = i;
+ }
+ emitWithAck(e, ...t) {
+ return new Promise(((n, r) => {
+ let o = (e, t) => e ? r(e) : n(t);
+ o.withError = !0, t.push(o), this.emit(e, ...t);
+ }));
+ }
+ _addToQueue(e) {
+ let t;
+ typeof e[e.length - 1] == "function" && (t = e.pop());
+ let n = {
+ id: this._queueSeq++,
+ tryCount: 0,
+ pending: !1,
+ args: e,
+ flags: Object.assign({ fromQueue: !0 }, this.flags)
+ };
+ e.push(((e, ...r) => n === this._queue[0] ? (e === null ? (this._queue.shift(), t && t(null, ...r)) : n.tryCount > this._opts.retries && (this._queue.shift(), t && t(e)), n.pending = !1, this._drainQueue()) : void 0)), this._queue.push(n), this._drainQueue();
+ }
+ _drainQueue(e = !1) {
+ if (!this.connected || this._queue.length === 0) return;
+ let t = this._queue[0];
+ t.pending && !e || (t.pending = !0, t.tryCount++, this.flags = t.flags, this.emit.apply(this, t.args));
+ }
+ packet(e) {
+ e.nsp = this.nsp, this.io._packet(e);
+ }
+ onopen() {
+ typeof this.auth == "function" ? this.auth(((e) => {
+ this._sendConnectPacket(e);
+ })) : this._sendConnectPacket(this.auth);
+ }
+ _sendConnectPacket(e) {
+ this.packet({
+ type: jI.CONNECT,
+ data: this._pid ? Object.assign({
+ pid: this._pid,
+ offset: this._lastOffset
+ }, e) : e
+ });
+ }
+ onerror(e) {
+ this.connected || this.emitReserved("connect_error", e);
+ }
+ onclose(e, t) {
+ this.connected = !1, delete this.id, this.emitReserved("disconnect", e, t), this._clearAcks();
+ }
+ _clearAcks() {
+ Object.keys(this.acks).forEach(((e) => {
+ if (!this.sendBuffer.some(((t) => String(t.id) === e))) {
+ let t = this.acks[e];
+ delete this.acks[e], t.withError && t.call(this, /* @__PURE__ */ Error("socket has been disconnected"));
+ }
+ }));
+ }
+ onpacket(e) {
+ if (e.nsp === this.nsp) switch (e.type) {
+ case jI.CONNECT:
+ e.data && e.data.sid ? this.onconnect(e.data.sid, e.data.pid) : this.emitReserved("connect_error", /* @__PURE__ */ Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));
+ break;
+ case jI.EVENT:
+ case jI.BINARY_EVENT:
+ this.onevent(e);
+ break;
+ case jI.ACK:
+ case jI.BINARY_ACK:
+ this.onack(e);
+ break;
+ case jI.DISCONNECT:
+ this.ondisconnect();
+ break;
+ case jI.CONNECT_ERROR:
+ this.destroy();
+ let t = Error(e.data.message);
+ t.data = e.data.data, this.emitReserved("connect_error", t);
+ }
+ }
+ onevent(e) {
+ let t = e.data || [];
+ e.id != null && t.push(this.ack(e.id)), this.connected ? this.emitEvent(t) : this.receiveBuffer.push(Object.freeze(t));
+ }
+ emitEvent(e) {
+ if (this._anyListeners && this._anyListeners.length) {
+ let t = this._anyListeners.slice();
+ for (let n of t) n.apply(this, e);
+ }
+ super.emit.apply(this, e), this._pid && e.length && typeof e[e.length - 1] == "string" && (this._lastOffset = e[e.length - 1]);
+ }
+ ack(e) {
+ let t = this, n = !1;
+ return function(...r) {
+ n || (n = !0, t.packet({
+ type: jI.ACK,
+ id: e,
+ data: r
+ }));
+ };
+ }
+ onack(e) {
+ let t = this.acks[e.id];
+ typeof t == "function" && (delete this.acks[e.id], t.withError && e.data.unshift(null), t.apply(this, e.data));
+ }
+ onconnect(e, t) {
+ this.id = e, this.recovered = t && this._pid === t, this._pid = t, this.connected = !0, this.emitBuffered(), this.emitReserved("connect"), this._drainQueue(!0);
+ }
+ emitBuffered() {
+ this.receiveBuffer.forEach(((e) => this.emitEvent(e))), this.receiveBuffer = [], this.sendBuffer.forEach(((e) => {
+ this.notifyOutgoingListeners(e), this.packet(e);
+ })), this.sendBuffer = [];
+ }
+ ondisconnect() {
+ this.destroy(), this.onclose("io server disconnect");
+ }
+ destroy() {
+ this.subs &&= (this.subs.forEach(((e) => e())), void 0), this.io._destroy(this);
+ }
+ disconnect() {
+ return this.connected && this.packet({ type: jI.DISCONNECT }), this.destroy(), this.connected && this.onclose("io client disconnect"), this;
+ }
+ close() {
+ return this.disconnect();
+ }
+ compress(e) {
+ return this.flags.compress = e, this;
+ }
+ get volatile() {
+ return this.flags.volatile = !0, this;
+ }
+ timeout(e) {
+ return this.flags.timeout = e, this;
+ }
+ onAny(e) {
+ return this._anyListeners = this._anyListeners || [], this._anyListeners.push(e), this;
+ }
+ prependAny(e) {
+ return this._anyListeners = this._anyListeners || [], this._anyListeners.unshift(e), this;
+ }
+ offAny(e) {
+ if (!this._anyListeners) return this;
+ if (e) {
+ let t = this._anyListeners;
+ for (let n = 0; n < t.length; n++) if (e === t[n]) return t.splice(n, 1), this;
+ } else this._anyListeners = [];
+ return this;
+ }
+ listenersAny() {
+ return this._anyListeners || [];
+ }
+ onAnyOutgoing(e) {
+ return this._anyOutgoingListeners = this._anyOutgoingListeners || [], this._anyOutgoingListeners.push(e), this;
+ }
+ prependAnyOutgoing(e) {
+ return this._anyOutgoingListeners = this._anyOutgoingListeners || [], this._anyOutgoingListeners.unshift(e), this;
+ }
+ offAnyOutgoing(e) {
+ if (!this._anyOutgoingListeners) return this;
+ if (e) {
+ let t = this._anyOutgoingListeners;
+ for (let n = 0; n < t.length; n++) if (e === t[n]) return t.splice(n, 1), this;
+ } else this._anyOutgoingListeners = [];
+ return this;
+ }
+ listenersAnyOutgoing() {
+ return this._anyOutgoingListeners || [];
+ }
+ notifyOutgoingListeners(e) {
+ if (this._anyOutgoingListeners && this._anyOutgoingListeners.length) {
+ let t = this._anyOutgoingListeners.slice();
+ for (let n of t) n.apply(this, e.data);
+ }
+ }
+};
+function zI(e) {
+ e ||= {}, this.ms = e.min || 100, this.max = e.max || 1e4, this.factor = e.factor || 2, this.jitter = e.jitter > 0 && e.jitter <= 1 ? e.jitter : 0, this.attempts = 0;
+}
+zI.prototype.duration = function() {
+ var e = this.ms * this.factor ** +this.attempts++;
+ if (this.jitter) {
+ var t = Math.random(), n = Math.floor(t * this.jitter * e);
+ e = 1 & Math.floor(10 * t) ? e + n : e - n;
+ }
+ return 0 | Math.min(e, this.max);
+}, zI.prototype.reset = function() {
+ this.attempts = 0;
+}, zI.prototype.setMin = function(e) {
+ this.ms = e;
+}, zI.prototype.setMax = function(e) {
+ this.max = e;
+}, zI.prototype.setJitter = function(e) {
+ this.jitter = e;
+};
+var $I = class extends FT {
+ constructor(e, t) {
+ super(), this.nsps = {}, this.subs = [], e && typeof e == "object" && (t = e, e = void 0), (t ||= {}).path = t.path || "/socket.io", this.opts = t, GT(this, t), this.reconnection(!1 !== t.reconnection), this.reconnectionAttempts(t.reconnectionAttempts || Infinity), this.reconnectionDelay(t.reconnectionDelay || 1e3), this.reconnectionDelayMax(t.reconnectionDelayMax || 5e3), this.randomizationFactor(t.randomizationFactor ?? .5), this.backoff = new zI({
+ min: this.reconnectionDelay(),
+ max: this.reconnectionDelayMax(),
+ jitter: this.randomizationFactor()
+ }), this.timeout(t.timeout == null ? 2e4 : t.timeout), this._readyState = "closed", this.uri = e;
+ let r = t.parser || MI;
+ this.encoder = new r.Encoder(), this.decoder = new r.Decoder(), this._autoConnect = !1 !== t.autoConnect, this._autoConnect && this.open();
+ }
+ reconnection(e) {
+ return arguments.length ? (this._reconnection = !!e, e || (this.skipReconnect = !0), this) : this._reconnection;
+ }
+ reconnectionAttempts(e) {
+ return e === void 0 ? this._reconnectionAttempts : (this._reconnectionAttempts = e, this);
+ }
+ reconnectionDelay(e) {
+ var t;
+ return e === void 0 ? this._reconnectionDelay : (this._reconnectionDelay = e, (t = this.backoff) == null || t.setMin(e), this);
+ }
+ randomizationFactor(e) {
+ var t;
+ return e === void 0 ? this._randomizationFactor : (this._randomizationFactor = e, (t = this.backoff) == null || t.setJitter(e), this);
+ }
+ reconnectionDelayMax(e) {
+ var t;
+ return e === void 0 ? this._reconnectionDelayMax : (this._reconnectionDelayMax = e, (t = this.backoff) == null || t.setMax(e), this);
+ }
+ timeout(e) {
+ return arguments.length ? (this._timeout = e, this) : this._timeout;
+ }
+ maybeReconnectOnOpen() {
+ !this._reconnecting && this._reconnection && this.backoff.attempts === 0 && this.reconnect();
+ }
+ open(e) {
+ if (~this._readyState.indexOf("open")) return this;
+ this.engine = new yI(this.uri, this.opts);
+ let t = this.engine, n = this;
+ this._readyState = "opening", this.skipReconnect = !1;
+ let r = LI(t, "open", (function() {
+ n.onopen(), e && e();
+ })), o = (t) => {
+ this.cleanup(), this._readyState = "closed", this.emitReserved("error", t), e ? e(t) : this.maybeReconnectOnOpen();
+ }, i = LI(t, "error", o);
+ if (!1 !== this._timeout) {
+ let e = this._timeout, n = this.setTimeoutFn((() => {
+ r(), o(/* @__PURE__ */ Error("timeout")), t.close();
+ }), e);
+ this.opts.autoUnref && n.unref(), this.subs.push((() => {
+ this.clearTimeoutFn(n);
+ }));
+ }
+ return this.subs.push(r), this.subs.push(i), this;
+ }
+ connect(e) {
+ return this.open(e);
+ }
+ onopen() {
+ this.cleanup(), this._readyState = "open", this.emitReserved("open");
+ let e = this.engine;
+ this.subs.push(LI(e, "ping", this.onping.bind(this)), LI(e, "data", this.ondata.bind(this)), LI(e, "error", this.onerror.bind(this)), LI(e, "close", this.onclose.bind(this)), LI(this.decoder, "decoded", this.ondecoded.bind(this)));
+ }
+ onping() {
+ this.emitReserved("ping");
+ }
+ ondata(e) {
+ try {
+ this.decoder.add(e);
+ } catch (e) {
+ this.onclose("parse error", e);
+ }
+ }
+ ondecoded(e) {
+ UT((() => {
+ this.emitReserved("packet", e);
+ }), this.setTimeoutFn);
+ }
+ onerror(e) {
+ this.emitReserved("error", e);
+ }
+ socket(e, t) {
+ let n = this.nsps[e];
+ return n ? this._autoConnect && !n.active && n.connect() : (n = new RI(this, e, t), this.nsps[e] = n), n;
+ }
+ _destroy(e) {
+ let t = Object.keys(this.nsps);
+ for (let e of t) if (this.nsps[e].active) return;
+ this._close();
+ }
+ _packet(e) {
+ let t = this.encoder.encode(e);
+ for (let n = 0; n < t.length; n++) this.engine.write(t[n], e.options);
+ }
+ cleanup() {
+ this.subs.forEach(((e) => e())), this.subs.length = 0, this.decoder.destroy();
+ }
+ _close() {
+ this.skipReconnect = !0, this._reconnecting = !1, this.onclose("forced close");
+ }
+ disconnect() {
+ return this._close();
+ }
+ onclose(e, t) {
+ var n;
+ this.cleanup(), (n = this.engine) == null || n.close(), this.backoff.reset(), this._readyState = "closed", this.emitReserved("close", e, t), this._reconnection && !this.skipReconnect && this.reconnect();
+ }
+ reconnect() {
+ if (this._reconnecting || this.skipReconnect) return this;
+ let e = this;
+ if (this.backoff.attempts >= this._reconnectionAttempts) this.backoff.reset(), this.emitReserved("reconnect_failed"), this._reconnecting = !1;
+ else {
+ let t = this.backoff.duration();
+ this._reconnecting = !0;
+ let n = this.setTimeoutFn((() => {
+ e.skipReconnect || (this.emitReserved("reconnect_attempt", e.backoff.attempts), !e.skipReconnect && e.open(((t) => {
+ t ? (e._reconnecting = !1, e.reconnect(), this.emitReserved("reconnect_error", t)) : e.onreconnect();
+ })));
+ }), t);
+ this.opts.autoUnref && n.unref(), this.subs.push((() => {
+ this.clearTimeoutFn(n);
+ }));
+ }
+ }
+ onreconnect() {
+ let e = this.backoff.attempts;
+ this._reconnecting = !1, this.backoff.reset(), this.emitReserved("reconnect", e);
+ }
+};
+const BI = {};
+function FI(e, t) {
+ typeof e == "object" && (t = e, e = void 0);
+ let n = function(e, t = "", n) {
+ let r = e;
+ n ||= typeof location < "u" && location, e ??= n.protocol + "//" + n.host, typeof e == "string" && (e.charAt(0) === "/" && (e = e.charAt(1) === "/" ? n.protocol + e : n.host + e), /^(https?|wss?):\/\//.test(e) || (e = typeof n < "u" ? n.protocol + "//" + e : "https://" + e), r = pI(e)), r.port || (/^(http|ws)$/.test(r.protocol) ? r.port = "80" : /^(http|ws)s$/.test(r.protocol) && (r.port = "443")), r.path = r.path || "/";
+ let o = r.host.indexOf(":") === -1 ? r.host : "[" + r.host + "]";
+ return r.id = r.protocol + "://" + o + ":" + r.port + t, r.href = r.protocol + "://" + o + (n && n.port === r.port ? "" : ":" + r.port), r;
+ }(e, (t ||= {}).path || "/socket.io"), r = n.source, o = n.id, i = n.path, a = BI[o] && i in BI[o].nsps, s;
+ return t.forceNew || t["force new connection"] || !1 === t.multiplex || a ? s = new $I(r, t) : (BI[o] || (BI[o] = new $I(r, t)), s = BI[o]), n.query && !t.query && (t.query = n.queryKey), s.socket(n.path, t);
+}
+Object.assign(FI, {
+ Manager: $I,
+ Socket: RI,
+ io: FI,
+ connect: FI
+});
+function KI(e) {
+ return (KI = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
+ return typeof e;
+ } : function(e) {
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
+ })(e);
+}
+function XI(e) {
+ var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
+ return XI = function(e) {
+ if (e === null || !function(e) {
+ try {
+ return Function.toString.call(e).indexOf("[native code]") !== -1;
+ } catch {
+ return typeof e == "function";
+ }
+ }(e)) return e;
+ if (typeof e != "function") throw TypeError("Super expression must either be null or a function");
+ if (typeof t < "u") {
+ if (t.has(e)) return t.get(e);
+ t.set(e, n);
+ }
+ function n() {
+ return function(e, t, n) {
+ if (JI()) return Reflect.construct.apply(null, arguments);
+ var r = [null];
+ r.push.apply(r, t);
+ var o = new (e.bind.apply(e, r))();
+ return n && QI(o, n.prototype), o;
+ }(e, arguments, eO(this).constructor);
+ }
+ return n.prototype = Object.create(e.prototype, { constructor: {
+ value: n,
+ enumerable: !1,
+ writable: !0,
+ configurable: !0
+ } }), QI(n, e);
+ }, XI(e);
+}
+function JI() {
+ try {
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
+ } catch {}
+ return (JI = function() {
+ return !!e;
+ })();
+}
+function QI(e, t) {
+ return (QI = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
+ return e.__proto__ = t, e;
+ })(e, t);
+}
+function eO(e) {
+ return (eO = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
+ return e.__proto__ || Object.getPrototypeOf(e);
+ })(e);
+}
+var tO = function() {
+ function e(t) {
+ var n, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
+ if (function(e, t) {
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
+ }(this, e), (n = function(e, t, n) {
+ return t = eO(t), function(e, t) {
+ if (t && (KI(t) === "object" || typeof t == "function")) return t;
+ if (t !== void 0) throw TypeError("Derived constructors may only return object or undefined");
+ return function(e) {
+ if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
+ return e;
+ }(e);
+ }(e, JI() ? Reflect.construct(t, n || [], eO(e).constructor) : t.apply(e, n));
+ }(this, e, [t])).originalRequest = o, n.originalResponse = i, n.causingError = r, r != null && (t += `, caused by ${r.toString()}`), o != null) {
+ var a = o.getHeader("X-Request-ID") || "n/a", s = o.getMethod(), l = o.getURL(), c = i ? i.getStatus() : "n/a", u = i ? i.getBody() || "" : "n/a";
+ t += `, originated from request (method: ${s}, url: ${l}, response code: ${c}, response text: ${u}, request id: ${a})`;
+ }
+ return n.message = t, n;
+ }
+ return function(e, t) {
+ if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function");
+ e.prototype = Object.create(t && t.prototype, { constructor: {
+ value: e,
+ writable: !0,
+ configurable: !0
+ } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && QI(e, t);
+ }(e, XI(Error)), function(e) {
+ return Object.defineProperty(e, "prototype", { writable: !1 }), e;
+ }(e);
+}();
+function nO(e) {
+ return (nO = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
+ return typeof e;
+ } : function(e) {
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
+ })(e);
+}
+function rO(e) {
+ var t = function(e) {
+ if (nO(e) != "object" || !e) return e;
+ var t = e[Symbol.toPrimitive];
+ if (t !== void 0) {
+ var n = t.call(e, "string");
+ if (nO(n) != "object") return n;
+ throw TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return String(e);
+ }(e);
+ return nO(t) == "symbol" ? t : t + "";
+}
+var oO = function() {
+ return function(e, t) {
+ return t && function(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, rO(r.key), r);
+ }
+ }(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
+ }((function e() {
+ (function(e, t) {
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
+ })(this, e);
+ }), [
+ {
+ key: "listAllUploads",
+ value: function() {
+ return Promise.resolve([]);
+ }
+ },
+ {
+ key: "findUploadsByFingerprint",
+ value: function(e) {
+ return Promise.resolve([]);
+ }
+ },
+ {
+ key: "removeUpload",
+ value: function(e) {
+ return Promise.resolve();
+ }
+ },
+ {
+ key: "addUpload",
+ value: function(e, t) {
+ return Promise.resolve(null);
+ }
+ }
+ ]);
+}();
+const iO = typeof Buffer == "function", aO = (typeof TextDecoder == "function" && new TextDecoder(), typeof TextEncoder == "function" ? new TextEncoder() : void 0), sO = Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="), lO = ((() => {
+ let e = {};
+ sO.forEach(((t, n) => e[t] = n));
+})(), String.fromCharCode.bind(String)), cO = (typeof Uint8Array.from == "function" && Uint8Array.from.bind(Uint8Array), (e) => e.replace(/=/g, "").replace(/[+\/]/g, ((e) => e == "+" ? "-" : "_"))), uO = typeof btoa == "function" ? (e) => btoa(e) : iO ? (e) => Buffer.from(e, "binary").toString("base64") : (e) => {
+ let t, n, r, o, i = "", a = e.length % 3;
+ for (let a = 0; a < e.length;) {
+ if ((n = e.charCodeAt(a++)) > 255 || (r = e.charCodeAt(a++)) > 255 || (o = e.charCodeAt(a++)) > 255) throw TypeError("invalid character found");
+ t = n << 16 | r << 8 | o, i += sO[t >> 18 & 63] + sO[t >> 12 & 63] + sO[t >> 6 & 63] + sO[63 & t];
+ }
+ return a ? i.slice(0, a - 3) + "===".substring(a) : i;
+}, dO = iO ? (e) => Buffer.from(e).toString("base64") : (e) => {
+ let t = [];
+ for (let n = 0, r = e.length; n < r; n += 4096) t.push(lO.apply(null, e.subarray(n, n + 4096)));
+ return uO(t.join(""));
+}, fO = (e) => {
+ if (e.length < 2) return (t = e.charCodeAt(0)) < 128 ? e : t < 2048 ? lO(192 | t >>> 6) + lO(128 | 63 & t) : lO(224 | t >>> 12 & 15) + lO(128 | t >>> 6 & 63) + lO(128 | 63 & t);
+ var t = 65536 + 1024 * (e.charCodeAt(0) - 55296) + (e.charCodeAt(1) - 56320);
+ return lO(240 | t >>> 18 & 7) + lO(128 | t >>> 12 & 63) + lO(128 | t >>> 6 & 63) + lO(128 | 63 & t);
+}, pO = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, hO = iO ? (e) => Buffer.from(e, "utf8").toString("base64") : aO ? (e) => dO(aO.encode(e)) : (e) => uO(((e) => e.replace(pO, fO))(e)), gO = (e, t = !1) => t ? cO(hO(e)) : hO(e);
+var mO, vO, yO, bO, wO, xO = {};
+const SO = gT(function() {
+ if (wO) return bO;
+ wO = 1;
+ var e = (vO || (vO = 1, mO = function(e, t) {
+ if (t = t.split(":")[0], !(e = +e)) return !1;
+ switch (t) {
+ case "http":
+ case "ws": return e !== 80;
+ case "https":
+ case "wss": return e !== 443;
+ case "ftp": return e !== 21;
+ case "gopher": return e !== 70;
+ case "file": return !1;
+ }
+ return e !== 0;
+ }), mO), t = function() {
+ if (yO) return xO;
+ yO = 1;
+ var e = Object.prototype.hasOwnProperty;
+ function t(e) {
+ try {
+ return decodeURIComponent(e.replace(/\+/g, " "));
+ } catch {
+ return null;
+ }
+ }
+ function n(e) {
+ try {
+ return encodeURIComponent(e);
+ } catch {
+ return null;
+ }
+ }
+ return xO.stringify = function(t, r) {
+ r ||= "";
+ var o, i, a = [];
+ for (i in typeof r != "string" && (r = "?"), t) if (e.call(t, i)) {
+ if (!(o = t[i]) && (o == null || isNaN(o)) && (o = ""), i = n(i), o = n(o), i === null || o === null) continue;
+ a.push(i + "=" + o);
+ }
+ return a.length ? r + a.join("&") : "";
+ }, xO.parse = function(e) {
+ for (var n, r = /([^=?#&]+)=?([^&]*)/g, o = {}; n = r.exec(e);) {
+ var i = t(n[1]), a = t(n[2]);
+ i === null || a === null || i in o || (o[i] = a);
+ }
+ return o;
+ }, xO;
+ }(), n = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/, r = /[\n\r\t]/g, o = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//, i = /:\d+$/, a = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i, s = /^[a-zA-Z]:/;
+ function l(e) {
+ return (e || "").toString().replace(n, "");
+ }
+ var c = [
+ ["#", "hash"],
+ ["?", "query"],
+ function(e, t) {
+ return f(t.protocol) ? e.replace(/\\/g, "/") : e;
+ },
+ ["/", "pathname"],
+ [
+ "@",
+ "auth",
+ 1
+ ],
+ [
+ NaN,
+ "host",
+ void 0,
+ 1,
+ 1
+ ],
+ [
+ /:(\d*)$/,
+ "port",
+ void 0,
+ 1
+ ],
+ [
+ NaN,
+ "hostname",
+ void 0,
+ 1,
+ 1
+ ]
+ ], u = {
+ hash: 1,
+ query: 1
+ };
+ function d(e) {
+ var t, n = (typeof window < "u" ? window : typeof hT < "u" ? hT : typeof self < "u" ? self : {}).location || {}, r = {}, i = typeof (e ||= n);
+ if (e.protocol === "blob:") r = new h(unescape(e.pathname), {});
+ else if (i === "string") for (t in r = new h(e, {}), u) delete r[t];
+ else if (i === "object") {
+ for (t in e) t in u || (r[t] = e[t]);
+ r.slashes === void 0 && (r.slashes = o.test(e.href));
+ }
+ return r;
+ }
+ function f(e) {
+ return e === "file:" || e === "ftp:" || e === "http:" || e === "https:" || e === "ws:" || e === "wss:";
+ }
+ function p(e, t) {
+ e = (e = l(e)).replace(r, ""), t ||= {};
+ var n, o = a.exec(e), i = o[1] ? o[1].toLowerCase() : "", s = !!o[2], c = !!o[3], u = 0;
+ return s ? c ? (n = o[2] + o[3] + o[4], u = o[2].length + o[3].length) : (n = o[2] + o[4], u = o[2].length) : c ? (n = o[3] + o[4], u = o[3].length) : n = o[4], i === "file:" ? u >= 2 && (n = n.slice(2)) : f(i) ? n = o[4] : i ? s && (n = n.slice(2)) : u >= 2 && f(t.protocol) && (n = o[4]), {
+ protocol: i,
+ slashes: s || f(i),
+ slashesCount: u,
+ rest: n
+ };
+ }
+ function h(n, o, i) {
+ if (n = (n = l(n)).replace(r, ""), !(this instanceof h)) return new h(n, o, i);
+ var a, u, g, m, v, y, b = c.slice(), w = typeof o, x = this, E = 0;
+ for (w !== "object" && w !== "string" && (i = o, o = null), i && typeof i != "function" && (i = t.parse), a = !(u = p(n || "", o = d(o))).protocol && !u.slashes, x.slashes = u.slashes || a && o.slashes, x.protocol = u.protocol || o.protocol || "", n = u.rest, (u.protocol === "file:" && (u.slashesCount !== 2 || s.test(n)) || !u.slashes && (u.protocol || u.slashesCount < 2 || !f(x.protocol))) && (b[3] = [/(.*)/, "pathname"]); E < b.length; E++) typeof (m = b[E]) == "function" ? n = m(n, x) : (g = m[0], y = m[1], g == g ? typeof g == "string" ? ~(v = g === "@" ? n.lastIndexOf(g) : n.indexOf(g)) && (typeof m[2] == "number" ? (x[y] = n.slice(0, v), n = n.slice(v + m[2])) : (x[y] = n.slice(v), n = n.slice(0, v))) : (v = g.exec(n)) && (x[y] = v[1], n = n.slice(0, v.index)) : x[y] = n, x[y] = x[y] || a && m[3] && o[y] || "", m[4] && (x[y] = x[y].toLowerCase()));
+ i && (x.query = i(x.query)), a && o.slashes && x.pathname.charAt(0) !== "/" && (x.pathname !== "" || o.pathname !== "") && (x.pathname = function(e, t) {
+ if (e === "") return t;
+ for (var n = (t || "/").split("/").slice(0, -1).concat(e.split("/")), r = n.length, o = n[r - 1], i = !1, a = 0; r--;) n[r] === "." ? n.splice(r, 1) : n[r] === ".." ? (n.splice(r, 1), a++) : a && (r === 0 && (i = !0), n.splice(r, 1), a--);
+ return i && n.unshift(""), (o === "." || o === "..") && n.push(""), n.join("/");
+ }(x.pathname, o.pathname)), x.pathname.charAt(0) !== "/" && f(x.protocol) && (x.pathname = "/" + x.pathname), e(x.port, x.protocol) || (x.host = x.hostname, x.port = ""), x.username = x.password = "", x.auth &&= (~(v = x.auth.indexOf(":")) ? (x.username = x.auth.slice(0, v), x.username = encodeURIComponent(decodeURIComponent(x.username)), x.password = x.auth.slice(v + 1), x.password = encodeURIComponent(decodeURIComponent(x.password))) : x.username = encodeURIComponent(decodeURIComponent(x.auth)), x.password ? x.username + ":" + x.password : x.username), x.origin = x.protocol !== "file:" && f(x.protocol) && x.host ? x.protocol + "//" + x.host : "null", x.href = x.toString();
+ }
+ return h.prototype = {
+ set: function(n, r, o) {
+ var a = this;
+ switch (n) {
+ case "query":
+ typeof r == "string" && r.length && (r = (o || t.parse)(r)), a[n] = r;
+ break;
+ case "port":
+ a[n] = r, e(r, a.protocol) ? r && (a.host = a.hostname + ":" + r) : (a.host = a.hostname, a[n] = "");
+ break;
+ case "hostname":
+ a[n] = r, a.port && (r += ":" + a.port), a.host = r;
+ break;
+ case "host":
+ a[n] = r, i.test(r) ? (r = r.split(":"), a.port = r.pop(), a.hostname = r.join(":")) : (a.hostname = r, a.port = "");
+ break;
+ case "protocol":
+ a.protocol = r.toLowerCase(), a.slashes = !o;
+ break;
+ case "pathname":
+ case "hash":
+ if (r) {
+ var s = n === "pathname" ? "/" : "#";
+ a[n] = r.charAt(0) === s ? r : s + r;
+ } else a[n] = r;
+ break;
+ case "username":
+ case "password":
+ a[n] = encodeURIComponent(r);
+ break;
+ case "auth":
+ var l = r.indexOf(":");
+ ~l ? (a.username = r.slice(0, l), a.username = encodeURIComponent(decodeURIComponent(a.username)), a.password = r.slice(l + 1), a.password = encodeURIComponent(decodeURIComponent(a.password))) : a.username = encodeURIComponent(decodeURIComponent(r));
+ }
+ for (var u = 0; u < c.length; u++) {
+ var d = c[u];
+ d[4] && (a[d[1]] = a[d[1]].toLowerCase());
+ }
+ return a.auth = a.password ? a.username + ":" + a.password : a.username, a.origin = a.protocol !== "file:" && f(a.protocol) && a.host ? a.protocol + "//" + a.host : "null", a.href = a.toString(), a;
+ },
+ toString: function(e) {
+ (!e || typeof e != "function") && (e = t.stringify);
+ var n, r = this, o = r.host, a = r.protocol;
+ a && a.charAt(a.length - 1) !== ":" && (a += ":");
+ var s = a + (r.protocol && r.slashes || f(r.protocol) ? "//" : "");
+ return r.username ? (s += r.username, r.password && (s += ":" + r.password), s += "@") : r.password ? (s += ":" + r.password, s += "@") : r.protocol !== "file:" && f(r.protocol) && !o && r.pathname !== "/" && (s += "@"), (o[o.length - 1] === ":" || i.test(r.hostname) && !r.port) && (o += ":"), s += o + r.pathname, (n = typeof r.query == "object" ? e(r.query) : r.query) && (s += n.charAt(0) === "?" ? n : "?" + n), r.hash && (s += r.hash), s;
+ }
+ }, h.extractProtocol = p, h.location = d, h.trimLeft = l, h.qs = t, bO = h;
+}());
+function CO() {
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
+ CO = function() {
+ return t;
+ };
+ var e, t = {}, n = Object.prototype, r = n.hasOwnProperty, o = Object.defineProperty || function(e, t, n) {
+ e[t] = n.value;
+ }, i = typeof Symbol == "function" ? Symbol : {}, a = i.iterator || "@@iterator", s = i.asyncIterator || "@@asyncIterator", l = i.toStringTag || "@@toStringTag";
+ function c(e, t, n) {
+ return Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0
+ }), e[t];
+ }
+ try {
+ c({}, "");
+ } catch {
+ c = function(e, t, n) {
+ return e[t] = n;
+ };
+ }
+ function u(e, t, n, r) {
+ var i = t && t.prototype instanceof v ? t : v, a = Object.create(i.prototype);
+ return o(a, "_invoke", { value: _(e, n, new j(r || [])) }), a;
+ }
+ function d(e, t, n) {
+ try {
+ return {
+ type: "normal",
+ arg: e.call(t, n)
+ };
+ } catch (e) {
+ return {
+ type: "throw",
+ arg: e
+ };
+ }
+ }
+ t.wrap = u;
+ var f = "suspendedStart", p = "suspendedYield", h = "executing", g = "completed", m = {};
+ function v() {}
+ function y() {}
+ function b() {}
+ var w = {};
+ c(w, a, (function() {
+ return this;
+ }));
+ var x = Object.getPrototypeOf, E = x && x(x(P([])));
+ E && E !== n && r.call(E, a) && (w = E);
+ var S = b.prototype = v.prototype = Object.create(w);
+ function C(e) {
+ [
+ "next",
+ "throw",
+ "return"
+ ].forEach((function(t) {
+ c(e, t, (function(e) {
+ return this._invoke(t, e);
+ }));
+ }));
+ }
+ function k(e, t) {
+ function n(o, i, a, s) {
+ var l = d(e[o], e, i);
+ if (l.type !== "throw") {
+ var c = l.arg, u = c.value;
+ return u && TO(u) == "object" && r.call(u, "__await") ? t.resolve(u.__await).then((function(e) {
+ n("next", e, a, s);
+ }), (function(e) {
+ n("throw", e, a, s);
+ })) : t.resolve(u).then((function(e) {
+ c.value = e, a(c);
+ }), (function(e) {
+ return n("throw", e, a, s);
+ }));
+ }
+ s(l.arg);
+ }
+ var i;
+ o(this, "_invoke", { value: function(e, r) {
+ function o() {
+ return new t((function(t, o) {
+ n(e, r, t, o);
+ }));
+ }
+ return i = i ? i.then(o, o) : o();
+ } });
+ }
+ function _(t, n, r) {
+ var o = f;
+ return function(i, a) {
+ if (o === h) throw Error("Generator is already running");
+ if (o === g) {
+ if (i === "throw") throw a;
+ return {
+ value: e,
+ done: !0
+ };
+ }
+ for (r.method = i, r.arg = a;;) {
+ var s = r.delegate;
+ if (s) {
+ var l = T(s, r);
+ if (l) {
+ if (l === m) continue;
+ return l;
+ }
+ }
+ if (r.method === "next") r.sent = r._sent = r.arg;
+ else if (r.method === "throw") {
+ if (o === f) throw o = g, r.arg;
+ r.dispatchException(r.arg);
+ } else r.method === "return" && r.abrupt("return", r.arg);
+ o = h;
+ var c = d(t, n, r);
+ if (c.type === "normal") {
+ if (o = r.done ? g : p, c.arg === m) continue;
+ return {
+ value: c.arg,
+ done: r.done
+ };
+ }
+ c.type === "throw" && (o = g, r.method = "throw", r.arg = c.arg);
+ }
+ };
+ }
+ function T(t, n) {
+ var r = n.method, o = t.iterator[r];
+ if (o === e) return n.delegate = null, r === "throw" && t.iterator.return && (n.method = "return", n.arg = e, T(t, n), n.method === "throw") || r !== "return" && (n.method = "throw", n.arg = /* @__PURE__ */ TypeError("The iterator does not provide a '" + r + "' method")), m;
+ var i = d(o, t.iterator, n.arg);
+ if (i.type === "throw") return n.method = "throw", n.arg = i.arg, n.delegate = null, m;
+ var a = i.arg;
+ return a ? a.done ? (n[t.resultName] = a.value, n.next = t.nextLoc, n.method !== "return" && (n.method = "next", n.arg = e), n.delegate = null, m) : a : (n.method = "throw", n.arg = /* @__PURE__ */ TypeError("iterator result is not an object"), n.delegate = null, m);
+ }
+ function I(e) {
+ var t = { tryLoc: e[0] };
+ 1 in e && (t.catchLoc = e[1]), 2 in e && (t.finallyLoc = e[2], t.afterLoc = e[3]), this.tryEntries.push(t);
+ }
+ function O(e) {
+ var t = e.completion || {};
+ t.type = "normal", delete t.arg, e.completion = t;
+ }
+ function j(e) {
+ this.tryEntries = [{ tryLoc: "root" }], e.forEach(I, this), this.reset(!0);
+ }
+ function P(t) {
+ if (t || t === "") {
+ var n = t[a];
+ if (n) return n.call(t);
+ if (typeof t.next == "function") return t;
+ if (!isNaN(t.length)) {
+ var o = -1, i = function n() {
+ for (; ++o < t.length;) if (r.call(t, o)) return n.value = t[o], n.done = !1, n;
+ return n.value = e, n.done = !0, n;
+ };
+ return i.next = i;
+ }
+ }
+ throw TypeError(TO(t) + " is not iterable");
+ }
+ return y.prototype = b, o(S, "constructor", {
+ value: b,
+ configurable: !0
+ }), o(b, "constructor", {
+ value: y,
+ configurable: !0
+ }), y.displayName = c(b, l, "GeneratorFunction"), t.isGeneratorFunction = function(e) {
+ var t = typeof e == "function" && e.constructor;
+ return !!t && (t === y || (t.displayName || t.name) === "GeneratorFunction");
+ }, t.mark = function(e) {
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, b) : (e.__proto__ = b, c(e, l, "GeneratorFunction")), e.prototype = Object.create(S), e;
+ }, t.awrap = function(e) {
+ return { __await: e };
+ }, C(k.prototype), c(k.prototype, s, (function() {
+ return this;
+ })), t.AsyncIterator = k, t.async = function(e, n, r, o, i) {
+ i === void 0 && (i = Promise);
+ var a = new k(u(e, n, r, o), i);
+ return t.isGeneratorFunction(n) ? a : a.next().then((function(e) {
+ return e.done ? e.value : a.next();
+ }));
+ }, C(S), c(S, l, "Generator"), c(S, a, (function() {
+ return this;
+ })), c(S, "toString", (function() {
+ return "[object Generator]";
+ })), t.keys = function(e) {
+ var t = Object(e), n = [];
+ for (var r in t) n.push(r);
+ return n.reverse(), function e() {
+ for (; n.length;) {
+ var r = n.pop();
+ if (r in t) return e.value = r, e.done = !1, e;
+ }
+ return e.done = !0, e;
+ };
+ }, t.values = P, j.prototype = {
+ constructor: j,
+ reset: function(t) {
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = e, this.done = !1, this.delegate = null, this.method = "next", this.arg = e, this.tryEntries.forEach(O), !t) for (var n in this) n.charAt(0) === "t" && r.call(this, n) && !isNaN(+n.slice(1)) && (this[n] = e);
+ },
+ stop: function() {
+ this.done = !0;
+ var e = this.tryEntries[0].completion;
+ if (e.type === "throw") throw e.arg;
+ return this.rval;
+ },
+ dispatchException: function(t) {
+ if (this.done) throw t;
+ var n = this;
+ function o(r, o) {
+ return s.type = "throw", s.arg = t, n.next = r, o && (n.method = "next", n.arg = e), !!o;
+ }
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var a = this.tryEntries[i], s = a.completion;
+ if (a.tryLoc === "root") return o("end");
+ if (a.tryLoc <= this.prev) {
+ var l = r.call(a, "catchLoc"), c = r.call(a, "finallyLoc");
+ if (l && c) {
+ if (this.prev < a.catchLoc) return o(a.catchLoc, !0);
+ if (this.prev < a.finallyLoc) return o(a.finallyLoc);
+ } else if (l) {
+ if (this.prev < a.catchLoc) return o(a.catchLoc, !0);
+ } else {
+ if (!c) throw Error("try statement without catch or finally");
+ if (this.prev < a.finallyLoc) return o(a.finallyLoc);
+ }
+ }
+ }
+ },
+ abrupt: function(e, t) {
+ for (var n = this.tryEntries.length - 1; n >= 0; --n) {
+ var o = this.tryEntries[n];
+ if (o.tryLoc <= this.prev && r.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
+ var i = o;
+ break;
+ }
+ }
+ i && (e === "break" || e === "continue") && i.tryLoc <= t && t <= i.finallyLoc && (i = null);
+ var a = i ? i.completion : {};
+ return a.type = e, a.arg = t, i ? (this.method = "next", this.next = i.finallyLoc, m) : this.complete(a);
+ },
+ complete: function(e, t) {
+ if (e.type === "throw") throw e.arg;
+ return e.type === "break" || e.type === "continue" ? this.next = e.arg : e.type === "return" ? (this.rval = this.arg = e.arg, this.method = "return", this.next = "end") : e.type === "normal" && t && (this.next = t), m;
+ },
+ finish: function(e) {
+ for (var t = this.tryEntries.length - 1; t >= 0; --t) {
+ var n = this.tryEntries[t];
+ if (n.finallyLoc === e) return this.complete(n.completion, n.afterLoc), O(n), m;
+ }
+ },
+ catch: function(e) {
+ for (var t = this.tryEntries.length - 1; t >= 0; --t) {
+ var n = this.tryEntries[t];
+ if (n.tryLoc === e) {
+ var r = n.completion;
+ if (r.type === "throw") {
+ var o = r.arg;
+ O(n);
+ }
+ return o;
+ }
+ }
+ throw Error("illegal catch attempt");
+ },
+ delegateYield: function(t, n, r) {
+ return this.delegate = {
+ iterator: P(t),
+ resultName: n,
+ nextLoc: r
+ }, this.method === "next" && (this.arg = e), m;
+ }
+ }, t;
+}
+function kO(e, t, n, r, o, i, a) {
+ try {
+ var s = e[i](a), l = s.value;
+ } catch (e) {
+ n(e);
+ return;
+ }
+ s.done ? t(l) : Promise.resolve(l).then(r, o);
+}
+function _O(e, t) {
+ return function(e) {
+ if (Array.isArray(e)) return e;
+ }(e) || function(e, t) {
+ var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
+ if (n != null) {
+ var r, o, i, a, s = [], l = !0, c = !1;
+ try {
+ if (i = (n = n.call(e)).next, t !== 0) for (; !(l = (r = i.call(n)).done) && (s.push(r.value), s.length !== t); l = !0);
+ } catch (e) {
+ c = !0, o = e;
+ } finally {
+ try {
+ if (!l && n.return != null && (a = n.return(), Object(a) !== a)) return;
+ } finally {
+ if (c) throw o;
+ }
+ }
+ return s;
+ }
+ }(e, t) || IO(e, t) || function() {
+ throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }();
+}
+function TO(e) {
+ return (TO = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
+ return typeof e;
+ } : function(e) {
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
+ })(e);
+}
+function IO(e, t) {
+ if (e) {
+ if (typeof e == "string") return OO(e, t);
+ var n = Object.prototype.toString.call(e).slice(8, -1);
+ if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return OO(e, t);
+ }
+}
+function OO(e, t) {
+ (t == null || t > e.length) && (t = e.length);
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
+ return r;
+}
+function jO(e, t) {
+ var n = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var r = Object.getOwnPropertySymbols(e);
+ t && (r = r.filter((function(t) {
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
+ }))), n.push.apply(n, r);
+ }
+ return n;
+}
+function PO(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = arguments[t] == null ? {} : arguments[t];
+ t % 2 ? jO(Object(n), !0).forEach((function(t) {
+ AO(e, t, n[t]);
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : jO(Object(n)).forEach((function(t) {
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
+ }));
+ }
+ return e;
+}
+function AO(e, t, n) {
+ return (t = MO(t)) in e ? Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0
+ }) : e[t] = n, e;
+}
+function NO(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, MO(r.key), r);
+ }
+}
+function MO(e) {
+ var t = function(e) {
+ if (TO(e) != "object" || !e) return e;
+ var t = e[Symbol.toPrimitive];
+ if (t !== void 0) {
+ var n = t.call(e, "string");
+ if (TO(n) != "object") return n;
+ throw TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return String(e);
+ }(e);
+ return TO(t) == "symbol" ? t : t + "";
+}
+var LO = "tus-v1", DO = "ietf-draft-03", RO = "ietf-draft-05", zO = {
+ endpoint: null,
+ uploadUrl: null,
+ metadata: {},
+ metadataForPartialUploads: {},
+ fingerprint: null,
+ uploadSize: null,
+ onProgress: null,
+ onChunkComplete: null,
+ onSuccess: null,
+ onError: null,
+ onUploadUrlAvailable: null,
+ overridePatchMethod: !1,
+ headers: {},
+ addRequestId: !1,
+ onBeforeRequest: null,
+ onAfterResponse: null,
+ onShouldRetry: qO,
+ chunkSize: Infinity,
+ retryDelays: [
+ 0,
+ 1e3,
+ 3e3,
+ 5e3
+ ],
+ parallelUploads: 1,
+ parallelUploadBoundaries: null,
+ storeFingerprintForResuming: !0,
+ removeFingerprintOnSuccess: !1,
+ uploadLengthDeferred: !1,
+ uploadDataDuringCreation: !1,
+ urlStorage: null,
+ fileReader: null,
+ httpStack: null,
+ protocol: LO
+}, $O = function() {
+ function e(t, n) {
+ (function(e, t) {
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
+ })(this, e), "resume" in n && console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."), this.options = n, this.options.chunkSize = Number(this.options.chunkSize), this._urlStorage = this.options.urlStorage, this.file = t, this.url = null, this._req = null, this._fingerprint = null, this._urlStorageKey = null, this._offset = null, this._aborted = !1, this._size = null, this._source = null, this._retryAttempt = 0, this._retryTimeout = null, this._offsetBeforeRetry = 0, this._parallelUploads = null, this._parallelUploadUrls = null;
+ }
+ return function(e, t, n) {
+ return t && NO(e.prototype, t), n && NO(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
+ }(e, [
+ {
+ key: "findPreviousUploads",
+ value: function() {
+ var e = this;
+ return this.options.fingerprint(this.file, this.options).then((function(t) {
+ return e._urlStorage.findUploadsByFingerprint(t);
+ }));
+ }
+ },
+ {
+ key: "resumeFromPreviousUpload",
+ value: function(e) {
+ this.url = e.uploadUrl || null, this._parallelUploadUrls = e.parallelUploadUrls || null, this._urlStorageKey = e.urlStorageKey;
+ }
+ },
+ {
+ key: "start",
+ value: function() {
+ var e = this, t = this.file;
+ if (t) if ([
+ LO,
+ DO,
+ RO
+ ].includes(this.options.protocol)) if (this.options.endpoint || this.options.uploadUrl || this.url) {
+ var n = this.options.retryDelays;
+ if (n == null || Object.prototype.toString.call(n) === "[object Array]") {
+ if (this.options.parallelUploads > 1) for (var r = 0, o = [
+ "uploadUrl",
+ "uploadSize",
+ "uploadLengthDeferred"
+ ]; r < o.length; r++) {
+ var i = o[r];
+ if (this.options[i]) return void this._emitError(/* @__PURE__ */ Error(`tus: cannot use the ${i} option when parallelUploads is enabled`));
+ }
+ if (this.options.parallelUploadBoundaries) {
+ if (this.options.parallelUploads <= 1) return void this._emitError(/* @__PURE__ */ Error("tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled"));
+ if (this.options.parallelUploads !== this.options.parallelUploadBoundaries.length) return void this._emitError(/* @__PURE__ */ Error("tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`"));
+ }
+ this.options.fingerprint(t, this.options).then((function(n) {
+ return e._fingerprint = n, e._source ? e._source : e.options.fileReader.openFile(t, e.options.chunkSize);
+ })).then((function(t) {
+ if (e._source = t, e.options.uploadLengthDeferred) e._size = null;
+ else if (e.options.uploadSize != null) {
+ if (e._size = Number(e.options.uploadSize), Number.isNaN(e._size)) return void e._emitError(/* @__PURE__ */ Error("tus: cannot convert `uploadSize` option into a number"));
+ } else if (e._size = e._source.size, e._size == null) return void e._emitError(/* @__PURE__ */ Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));
+ e.options.parallelUploads > 1 || e._parallelUploadUrls != null ? e._startParallelUpload() : e._startSingleUpload();
+ })).catch((function(t) {
+ e._emitError(t);
+ }));
+ } else this._emitError(/* @__PURE__ */ Error("tus: the `retryDelays` option must either be an array or null"));
+ } else this._emitError(/* @__PURE__ */ Error("tus: neither an endpoint or an upload URL is provided"));
+ else this._emitError(/* @__PURE__ */ Error(`tus: unsupported protocol ${this.options.protocol}`));
+ else this._emitError(/* @__PURE__ */ Error("tus: no file or stream to upload provided"));
+ }
+ },
+ {
+ key: "_startParallelUpload",
+ value: function() {
+ var n = this, r = this._size, o = 0;
+ this._parallelUploads = [];
+ var i = this._parallelUploadUrls == null ? this.options.parallelUploads : this._parallelUploadUrls.length, a = this.options.parallelUploadBoundaries ?? function(e, t) {
+ for (var n = Math.floor(e / t), r = [], o = 0; o < t; o++) r.push({
+ start: n * o,
+ end: n * (o + 1)
+ });
+ return r[t - 1].end = e, r;
+ }(this._source.size, i);
+ this._parallelUploadUrls && a.forEach((function(e, t) {
+ e.uploadUrl = n._parallelUploadUrls[t] || null;
+ })), this._parallelUploadUrls = Array(a.length);
+ var s, l = a.map((function(t, i) {
+ var s = 0;
+ return n._source.slice(t.start, t.end).then((function(l) {
+ var c = l.value;
+ return new Promise((function(l, u) {
+ var f = new e(c, PO(PO({}, n.options), {}, {
+ uploadUrl: t.uploadUrl || null,
+ storeFingerprintForResuming: !1,
+ removeFingerprintOnSuccess: !1,
+ parallelUploads: 1,
+ parallelUploadBoundaries: null,
+ metadata: n.options.metadataForPartialUploads,
+ headers: PO(PO({}, n.options.headers), {}, { "Upload-Concat": "partial" }),
+ onSuccess: l,
+ onError: u,
+ onProgress: function(e) {
+ o = o - s + e, s = e, n._emitProgress(o, r);
+ },
+ onUploadUrlAvailable: function() {
+ n._parallelUploadUrls[i] = f.url, n._parallelUploadUrls.filter((function(e) {
+ return !!e;
+ })).length === a.length && n._saveUploadInUrlStorage();
+ }
+ }));
+ f.start(), n._parallelUploads.push(f);
+ }));
+ }));
+ }));
+ Promise.all(l).then((function() {
+ (s = n._openRequest("POST", n.options.endpoint)).setHeader("Upload-Concat", `final;${n._parallelUploadUrls.join(" ")}`);
+ var e = BO(n.options.metadata);
+ return e !== "" && s.setHeader("Upload-Metadata", e), n._sendRequest(s, null);
+ })).then((function(e) {
+ if (FO(e.getStatus(), 200)) {
+ var t = e.getHeader("Location");
+ t == null ? n._emitHttpError(s, e, "tus: invalid or missing Location header") : (n.url = GO(n.options.endpoint, t), `${n.url}`, n._emitSuccess(e));
+ } else n._emitHttpError(s, e, "tus: unexpected response while creating upload");
+ })).catch((function(e) {
+ n._emitError(e);
+ }));
+ }
+ },
+ {
+ key: "_startSingleUpload",
+ value: function() {
+ this._aborted = !1, this.url == null ? this.options.uploadUrl == null ? this._createUpload() : (`${this.options.uploadUrl}`, this.url = this.options.uploadUrl, this._resumeUpload()) : (`${this.url}`, this._resumeUpload());
+ }
+ },
+ {
+ key: "abort",
+ value: function(t) {
+ var n = this;
+ if (this._parallelUploads != null) {
+ var r, o = function(e) {
+ var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
+ if (!t) {
+ if (Array.isArray(e) || (t = IO(e))) {
+ t && (e = t);
+ var n = 0, r = function() {};
+ return {
+ s: r,
+ n: function() {
+ return n >= e.length ? { done: !0 } : {
+ done: !1,
+ value: e[n++]
+ };
+ },
+ e: function(e) {
+ throw e;
+ },
+ f: r
+ };
+ }
+ throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+ var o, i = !0, a = !1;
+ return {
+ s: function() {
+ t = t.call(e);
+ },
+ n: function() {
+ var e = t.next();
+ return i = e.done, e;
+ },
+ e: function(e) {
+ a = !0, o = e;
+ },
+ f: function() {
+ try {
+ !i && t.return != null && t.return();
+ } finally {
+ if (a) throw o;
+ }
+ }
+ };
+ }(this._parallelUploads);
+ try {
+ for (o.s(); !(r = o.n()).done;) r.value.abort(t);
+ } catch (e) {
+ o.e(e);
+ } finally {
+ o.f();
+ }
+ }
+ return this._req !== null && this._req.abort(), this._aborted = !0, this._retryTimeout != null && (clearTimeout(this._retryTimeout), this._retryTimeout = null), t && this.url != null ? e.terminate(this.url, this.options).then((function() {
+ return n._removeFromUrlStorage();
+ })) : Promise.resolve();
+ }
+ },
+ {
+ key: "_emitHttpError",
+ value: function(e, t, n, r) {
+ this._emitError(new tO(n, r, e, t));
+ }
+ },
+ {
+ key: "_emitError",
+ value: function(e) {
+ var t = this;
+ if (!this._aborted) {
+ if (this.options.retryDelays != null && (this._offset != null && this._offset > this._offsetBeforeRetry && (this._retryAttempt = 0), VO(e, this._retryAttempt, this.options))) {
+ var n = this.options.retryDelays[this._retryAttempt++];
+ this._offsetBeforeRetry = this._offset, this._retryTimeout = setTimeout((function() {
+ t.start();
+ }), n);
+ return;
+ }
+ if (typeof this.options.onError != "function") throw e;
+ this.options.onError(e);
+ }
+ }
+ },
+ {
+ key: "_emitSuccess",
+ value: function(e) {
+ this.options.removeFingerprintOnSuccess && this._removeFromUrlStorage(), typeof this.options.onSuccess == "function" && this.options.onSuccess({ lastResponse: e });
+ }
+ },
+ {
+ key: "_emitProgress",
+ value: function(e, t) {
+ typeof this.options.onProgress == "function" && this.options.onProgress(e, t);
+ }
+ },
+ {
+ key: "_emitChunkComplete",
+ value: function(e, t, n) {
+ typeof this.options.onChunkComplete == "function" && this.options.onChunkComplete(e, t, n);
+ }
+ },
+ {
+ key: "_createUpload",
+ value: function() {
+ var e = this;
+ if (this.options.endpoint) {
+ var t = this._openRequest("POST", this.options.endpoint);
+ this.options.uploadLengthDeferred ? t.setHeader("Upload-Defer-Length", "1") : t.setHeader("Upload-Length", `${this._size}`);
+ var n, r = BO(this.options.metadata);
+ r !== "" && t.setHeader("Upload-Metadata", r), this.options.uploadDataDuringCreation && !this.options.uploadLengthDeferred ? (this._offset = 0, n = this._addChunkToRequest(t)) : ((this.options.protocol === DO || this.options.protocol === RO) && t.setHeader("Upload-Complete", "?0"), n = this._sendRequest(t, null)), n.then((function(n) {
+ if (FO(n.getStatus(), 200)) {
+ var r = n.getHeader("Location");
+ if (r != null) return e.url = GO(e.options.endpoint, r), `${e.url}`, typeof e.options.onUploadUrlAvailable == "function" && e.options.onUploadUrlAvailable(), e._size === 0 ? (e._emitSuccess(n), void e._source.close()) : void e._saveUploadInUrlStorage().then((function() {
+ e.options.uploadDataDuringCreation ? e._handleUploadResponse(t, n) : (e._offset = 0, e._performUpload());
+ }));
+ e._emitHttpError(t, n, "tus: invalid or missing Location header");
+ } else e._emitHttpError(t, n, "tus: unexpected response while creating upload");
+ })).catch((function(n) {
+ e._emitHttpError(t, null, "tus: failed to create upload", n);
+ }));
+ } else this._emitError(/* @__PURE__ */ Error("tus: unable to create upload because no endpoint is provided"));
+ }
+ },
+ {
+ key: "_resumeUpload",
+ value: function() {
+ var e = this, t = this._openRequest("HEAD", this.url);
+ this._sendRequest(t, null).then((function(n) {
+ var r = n.getStatus();
+ if (!FO(r, 200)) return r === 423 ? void e._emitHttpError(t, n, "tus: upload is currently locked; retry later") : (FO(r, 400) && e._removeFromUrlStorage(), e.options.endpoint ? (e.url = null, void e._createUpload()) : void e._emitHttpError(t, n, "tus: unable to resume upload (new upload cannot be created without an endpoint)"));
+ var o = Number.parseInt(n.getHeader("Upload-Offset"), 10);
+ if (Number.isNaN(o)) e._emitHttpError(t, n, "tus: invalid or missing offset value");
+ else {
+ var i = Number.parseInt(n.getHeader("Upload-Length"), 10);
+ !Number.isNaN(i) || e.options.uploadLengthDeferred || e.options.protocol !== LO ? (typeof e.options.onUploadUrlAvailable == "function" && e.options.onUploadUrlAvailable(), e._saveUploadInUrlStorage().then((function() {
+ if (o === i) return e._emitProgress(i, i), void e._emitSuccess(n);
+ e._offset = o, e._performUpload();
+ }))) : e._emitHttpError(t, n, "tus: invalid or missing length value");
+ }
+ })).catch((function(n) {
+ e._emitHttpError(t, null, "tus: failed to resume upload", n);
+ }));
+ }
+ },
+ {
+ key: "_performUpload",
+ value: function() {
+ var e, t = this;
+ this._aborted || (this.options.overridePatchMethod ? (e = this._openRequest("POST", this.url)).setHeader("X-HTTP-Method-Override", "PATCH") : e = this._openRequest("PATCH", this.url), e.setHeader("Upload-Offset", `${this._offset}`), this._addChunkToRequest(e).then((function(n) {
+ FO(n.getStatus(), 200) ? t._handleUploadResponse(e, n) : t._emitHttpError(e, n, "tus: unexpected response while uploading chunk");
+ })).catch((function(n) {
+ t._aborted || t._emitHttpError(e, null, `tus: failed to upload chunk at offset ${t._offset}`, n);
+ })));
+ }
+ },
+ {
+ key: "_addChunkToRequest",
+ value: function(e) {
+ var t = this, n = this._offset, r = this._offset + this.options.chunkSize;
+ return e.setProgressHandler((function(e) {
+ t._emitProgress(n + e, t._size);
+ })), this.options.protocol === LO ? e.setHeader("Content-Type", "application/offset+octet-stream") : this.options.protocol === RO && e.setHeader("Content-Type", "application/partial-upload"), (r === Infinity || r > this._size) && !this.options.uploadLengthDeferred && (r = this._size), this._source.slice(n, r).then((function(n) {
+ var r = n.value, o = n.done, i = r != null && r.size ? r.size : 0;
+ t.options.uploadLengthDeferred && o && (t._size = t._offset + i, e.setHeader("Upload-Length", `${t._size}`));
+ var a = t._offset + i;
+ return !t.options.uploadLengthDeferred && o && a !== t._size ? Promise.reject(/* @__PURE__ */ Error(`upload was configured with a size of ${t._size} bytes, but the source is done after ${a} bytes`)) : r === null ? t._sendRequest(e) : ((t.options.protocol === DO || t.options.protocol === RO) && e.setHeader("Upload-Complete", o ? "?1" : "?0"), t._emitProgress(t._offset, t._size), t._sendRequest(e, r));
+ }));
+ }
+ },
+ {
+ key: "_handleUploadResponse",
+ value: function(e, t) {
+ var n = Number.parseInt(t.getHeader("Upload-Offset"), 10);
+ if (!Number.isNaN(n)) return this._emitProgress(n, this._size), this._emitChunkComplete(n - this._offset, n, this._size), this._offset = n, n === this._size ? (this._emitSuccess(t), void this._source.close()) : void this._performUpload();
+ this._emitHttpError(e, t, "tus: invalid or missing offset value");
+ }
+ },
+ {
+ key: "_openRequest",
+ value: function(e, t) {
+ var n = UO(e, t, this.options);
+ return this._req = n, n;
+ }
+ },
+ {
+ key: "_removeFromUrlStorage",
+ value: function() {
+ var e = this;
+ this._urlStorageKey &&= (this._urlStorage.removeUpload(this._urlStorageKey).catch((function(t) {
+ e._emitError(t);
+ })), null);
+ }
+ },
+ {
+ key: "_saveUploadInUrlStorage",
+ value: function() {
+ var e = this;
+ if (!this.options.storeFingerprintForResuming || !this._fingerprint || this._urlStorageKey !== null) return Promise.resolve();
+ var t = {
+ size: this._size,
+ metadata: this.options.metadata,
+ creationTime: (/* @__PURE__ */ new Date()).toString()
+ };
+ return this._parallelUploads ? t.parallelUploadUrls = this._parallelUploadUrls : t.uploadUrl = this.url, this._urlStorage.addUpload(this._fingerprint, t).then((function(t) {
+ e._urlStorageKey = t;
+ }));
+ }
+ },
+ {
+ key: "_sendRequest",
+ value: function(e) {
+ return HO(e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, this.options);
+ }
+ }
+ ], [{
+ key: "terminate",
+ value: function(t) {
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = UO("DELETE", t, n);
+ return HO(r, null, n).then((function(e) {
+ if (e.getStatus() !== 204) throw new tO("tus: unexpected response while terminating upload", null, r, e);
+ })).catch((function(o) {
+ if (o instanceof tO || (o = new tO("tus: failed to terminate upload", o, r, null)), !VO(o, 0, n)) throw o;
+ var i = n.retryDelays[0], a = n.retryDelays.slice(1), s = PO(PO({}, n), {}, { retryDelays: a });
+ return new Promise((function(e) {
+ return setTimeout(e, i);
+ })).then((function() {
+ return e.terminate(t, s);
+ }));
+ }));
+ }
+ }]);
+}();
+function BO(e) {
+ return Object.entries(e).map((function(e) {
+ var t = _O(e, 2), n = t[0], r = t[1];
+ return `${n} ${gO(String(r))}`;
+ })).join(",");
+}
+function FO(e, t) {
+ return e >= t && e < t + 100;
+}
+function UO(e, t, n) {
+ var r = n.httpStack.createRequest(e, t);
+ n.protocol === DO ? r.setHeader("Upload-Draft-Interop-Version", "5") : n.protocol === RO ? r.setHeader("Upload-Draft-Interop-Version", "6") : r.setHeader("Tus-Resumable", "1.0.0");
+ for (var o = n.headers || {}, i = 0, a = Object.entries(o); i < a.length; i++) {
+ var s = _O(a[i], 2), l = s[0], c = s[1];
+ r.setHeader(l, c);
+ }
+ if (n.addRequestId) {
+ var u = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (function(e) {
+ var t = 16 * Math.random() | 0;
+ return (e === "x" ? t : 3 & t | 8).toString(16);
+ }));
+ r.setHeader("X-Request-ID", u);
+ }
+ return r;
+}
+function HO(e, t, n) {
+ return WO.apply(this, arguments);
+}
+function WO() {
+ return WO = function(e) {
+ return function() {
+ var t = this, n = arguments;
+ return new Promise((function(r, o) {
+ var i = e.apply(t, n);
+ function a(e) {
+ kO(i, r, o, a, s, "next", e);
+ }
+ function s(e) {
+ kO(i, r, o, a, s, "throw", e);
+ }
+ a(void 0);
+ }));
+ };
+ }(CO().mark((function e(t, n, r) {
+ var o;
+ return CO().wrap((function(e) {
+ for (;;) switch (e.prev = e.next) {
+ case 0:
+ if (typeof r.onBeforeRequest != "function") {
+ e.next = 3;
+ break;
+ }
+ return e.next = 3, r.onBeforeRequest(t);
+ case 3: return e.next = 5, t.send(n);
+ case 5:
+ if (o = e.sent, typeof r.onAfterResponse != "function") {
+ e.next = 9;
+ break;
+ }
+ return e.next = 9, r.onAfterResponse(t, o);
+ case 9: return e.abrupt("return", o);
+ case 10:
+ case "end": return e.stop();
+ }
+ }), e);
+ }))), WO.apply(this, arguments);
+}
+function VO(e, t, n) {
+ return !(n.retryDelays == null || t >= n.retryDelays.length || e.originalRequest == null) && (n && typeof n.onShouldRetry == "function" ? n.onShouldRetry(e, t, n) : qO(e));
+}
+function qO(e) {
+ var t = e.originalResponse ? e.originalResponse.getStatus() : 0;
+ return (!FO(t, 400) || t === 409 || t === 423) && function() {
+ var e = !0;
+ return typeof navigator < "u" && !1 === navigator.onLine && (e = !1), e;
+ }();
+}
+function GO(e, t) {
+ return new SO(t, e).toString();
+}
+$O.defaultOptions = zO;
+var YO = function() {
+ return typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative";
+};
+function ZO(e) {
+ return new Promise((function(t, n) {
+ var r = new XMLHttpRequest();
+ r.responseType = "blob", r.onload = function() {
+ var e = r.response;
+ t(e);
+ }, r.onerror = function(e) {
+ n(e);
+ }, r.open("GET", e), r.send();
+ }));
+}
+function KO(e) {
+ return (KO = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
+ return typeof e;
+ } : function(e) {
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
+ })(e);
+}
+function XO(e) {
+ var t = function(e) {
+ if (KO(e) != "object" || !e) return e;
+ var t = e[Symbol.toPrimitive];
+ if (t !== void 0) {
+ var n = t.call(e, "string");
+ if (KO(n) != "object") return n;
+ throw TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return String(e);
+ }(e);
+ return KO(t) == "symbol" ? t : t + "";
+}
+var JO = function() {
+ return function(e, t) {
+ return t && function(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, XO(r.key), r);
+ }
+ }(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
+ }((function e(t) {
+ (function(e, t) {
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
+ })(this, e), this._file = t, this.size = t.size;
+ }), [{
+ key: "slice",
+ value: function(e, t) {
+ if (typeof window < "u" && (typeof window.PhoneGap < "u" || typeof window.Cordova < "u" || typeof window.cordova < "u")) return function(e) {
+ return new Promise((function(t, n) {
+ var r = new FileReader();
+ r.onload = function() {
+ t({ value: new Uint8Array(r.result) });
+ }, r.onerror = function(e) {
+ n(e);
+ }, r.readAsArrayBuffer(e);
+ }));
+ }(this._file.slice(e, t));
+ var n = this._file.slice(e, t), r = t >= this.size;
+ return Promise.resolve({
+ value: n,
+ done: r
+ });
+ }
+ }, {
+ key: "close",
+ value: function() {}
+ }]);
+}();
+function QO(e) {
+ return (QO = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
+ return typeof e;
+ } : function(e) {
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
+ })(e);
+}
+function ej(e) {
+ var t = function(e) {
+ if (QO(e) != "object" || !e) return e;
+ var t = e[Symbol.toPrimitive];
+ if (t !== void 0) {
+ var n = t.call(e, "string");
+ if (QO(n) != "object") return n;
+ throw TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return String(e);
+ }(e);
+ return QO(t) == "symbol" ? t : t + "";
+}
+function tj(e) {
+ return e === void 0 ? 0 : e.size === void 0 ? e.length : e.size;
+}
+var nj = function() {
+ return function(e, t) {
+ return t && function(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, ej(r.key), r);
+ }
+ }(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
+ }((function e(t) {
+ (function(e, t) {
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
+ })(this, e), this._buffer = void 0, this._bufferOffset = 0, this._reader = t, this._done = !1;
+ }), [
+ {
+ key: "slice",
+ value: function(e, t) {
+ return e < this._bufferOffset ? Promise.reject(/* @__PURE__ */ Error("Requested data is before the reader's current offset")) : this._readUntilEnoughDataOrDone(e, t);
+ }
+ },
+ {
+ key: "_readUntilEnoughDataOrDone",
+ value: function(e, t) {
+ var n = this, r = t <= this._bufferOffset + tj(this._buffer);
+ if (this._done || r) {
+ var o = this._getDataFromBuffer(e, t), i = o == null && this._done;
+ return Promise.resolve({
+ value: o,
+ done: i
+ });
+ }
+ return this._reader.read().then((function(r) {
+ var o = r.value;
+ return r.done ? n._done = !0 : n._buffer === void 0 ? n._buffer = o : n._buffer = function(e, t) {
+ if (e.concat) return e.concat(t);
+ if (e instanceof Blob) return new Blob([e, t], { type: e.type });
+ if (e.set) {
+ var n = new e.constructor(e.length + t.length);
+ return n.set(e), n.set(t, e.length), n;
+ }
+ throw Error("Unknown data type");
+ }(n._buffer, o), n._readUntilEnoughDataOrDone(e, t);
+ }));
+ }
+ },
+ {
+ key: "_getDataFromBuffer",
+ value: function(e, t) {
+ e > this._bufferOffset && (this._buffer = this._buffer.slice(e - this._bufferOffset), this._bufferOffset = e);
+ var n = tj(this._buffer) === 0;
+ return this._done && n ? null : this._buffer.slice(0, t - e);
+ }
+ },
+ {
+ key: "close",
+ value: function() {
+ this._reader.cancel && this._reader.cancel();
+ }
+ }
+ ]);
+}();
+function rj(e) {
+ return (rj = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
+ return typeof e;
+ } : function(e) {
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
+ })(e);
+}
+function oj() {
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
+ oj = function() {
+ return t;
+ };
+ var e, t = {}, n = Object.prototype, r = n.hasOwnProperty, o = Object.defineProperty || function(e, t, n) {
+ e[t] = n.value;
+ }, i = typeof Symbol == "function" ? Symbol : {}, a = i.iterator || "@@iterator", s = i.asyncIterator || "@@asyncIterator", l = i.toStringTag || "@@toStringTag";
+ function c(e, t, n) {
+ return Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0
+ }), e[t];
+ }
+ try {
+ c({}, "");
+ } catch {
+ c = function(e, t, n) {
+ return e[t] = n;
+ };
+ }
+ function u(e, t, n, r) {
+ var i = t && t.prototype instanceof v ? t : v, a = Object.create(i.prototype);
+ return o(a, "_invoke", { value: _(e, n, new j(r || [])) }), a;
+ }
+ function d(e, t, n) {
+ try {
+ return {
+ type: "normal",
+ arg: e.call(t, n)
+ };
+ } catch (e) {
+ return {
+ type: "throw",
+ arg: e
+ };
+ }
+ }
+ t.wrap = u;
+ var f = "suspendedStart", p = "suspendedYield", h = "executing", g = "completed", m = {};
+ function v() {}
+ function y() {}
+ function b() {}
+ var w = {};
+ c(w, a, (function() {
+ return this;
+ }));
+ var x = Object.getPrototypeOf, E = x && x(x(P([])));
+ E && E !== n && r.call(E, a) && (w = E);
+ var S = b.prototype = v.prototype = Object.create(w);
+ function C(e) {
+ [
+ "next",
+ "throw",
+ "return"
+ ].forEach((function(t) {
+ c(e, t, (function(e) {
+ return this._invoke(t, e);
+ }));
+ }));
+ }
+ function k(e, t) {
+ function n(o, i, a, s) {
+ var l = d(e[o], e, i);
+ if (l.type !== "throw") {
+ var c = l.arg, u = c.value;
+ return u && rj(u) == "object" && r.call(u, "__await") ? t.resolve(u.__await).then((function(e) {
+ n("next", e, a, s);
+ }), (function(e) {
+ n("throw", e, a, s);
+ })) : t.resolve(u).then((function(e) {
+ c.value = e, a(c);
+ }), (function(e) {
+ return n("throw", e, a, s);
+ }));
+ }
+ s(l.arg);
+ }
+ var i;
+ o(this, "_invoke", { value: function(e, r) {
+ function o() {
+ return new t((function(t, o) {
+ n(e, r, t, o);
+ }));
+ }
+ return i = i ? i.then(o, o) : o();
+ } });
+ }
+ function _(t, n, r) {
+ var o = f;
+ return function(i, a) {
+ if (o === h) throw Error("Generator is already running");
+ if (o === g) {
+ if (i === "throw") throw a;
+ return {
+ value: e,
+ done: !0
+ };
+ }
+ for (r.method = i, r.arg = a;;) {
+ var s = r.delegate;
+ if (s) {
+ var l = T(s, r);
+ if (l) {
+ if (l === m) continue;
+ return l;
+ }
+ }
+ if (r.method === "next") r.sent = r._sent = r.arg;
+ else if (r.method === "throw") {
+ if (o === f) throw o = g, r.arg;
+ r.dispatchException(r.arg);
+ } else r.method === "return" && r.abrupt("return", r.arg);
+ o = h;
+ var c = d(t, n, r);
+ if (c.type === "normal") {
+ if (o = r.done ? g : p, c.arg === m) continue;
+ return {
+ value: c.arg,
+ done: r.done
+ };
+ }
+ c.type === "throw" && (o = g, r.method = "throw", r.arg = c.arg);
+ }
+ };
+ }
+ function T(t, n) {
+ var r = n.method, o = t.iterator[r];
+ if (o === e) return n.delegate = null, r === "throw" && t.iterator.return && (n.method = "return", n.arg = e, T(t, n), n.method === "throw") || r !== "return" && (n.method = "throw", n.arg = /* @__PURE__ */ TypeError("The iterator does not provide a '" + r + "' method")), m;
+ var i = d(o, t.iterator, n.arg);
+ if (i.type === "throw") return n.method = "throw", n.arg = i.arg, n.delegate = null, m;
+ var a = i.arg;
+ return a ? a.done ? (n[t.resultName] = a.value, n.next = t.nextLoc, n.method !== "return" && (n.method = "next", n.arg = e), n.delegate = null, m) : a : (n.method = "throw", n.arg = /* @__PURE__ */ TypeError("iterator result is not an object"), n.delegate = null, m);
+ }
+ function I(e) {
+ var t = { tryLoc: e[0] };
+ 1 in e && (t.catchLoc = e[1]), 2 in e && (t.finallyLoc = e[2], t.afterLoc = e[3]), this.tryEntries.push(t);
+ }
+ function O(e) {
+ var t = e.completion || {};
+ t.type = "normal", delete t.arg, e.completion = t;
+ }
+ function j(e) {
+ this.tryEntries = [{ tryLoc: "root" }], e.forEach(I, this), this.reset(!0);
+ }
+ function P(t) {
+ if (t || t === "") {
+ var n = t[a];
+ if (n) return n.call(t);
+ if (typeof t.next == "function") return t;
+ if (!isNaN(t.length)) {
+ var o = -1, i = function n() {
+ for (; ++o < t.length;) if (r.call(t, o)) return n.value = t[o], n.done = !1, n;
+ return n.value = e, n.done = !0, n;
+ };
+ return i.next = i;
+ }
+ }
+ throw TypeError(rj(t) + " is not iterable");
+ }
+ return y.prototype = b, o(S, "constructor", {
+ value: b,
+ configurable: !0
+ }), o(b, "constructor", {
+ value: y,
+ configurable: !0
+ }), y.displayName = c(b, l, "GeneratorFunction"), t.isGeneratorFunction = function(e) {
+ var t = typeof e == "function" && e.constructor;
+ return !!t && (t === y || (t.displayName || t.name) === "GeneratorFunction");
+ }, t.mark = function(e) {
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, b) : (e.__proto__ = b, c(e, l, "GeneratorFunction")), e.prototype = Object.create(S), e;
+ }, t.awrap = function(e) {
+ return { __await: e };
+ }, C(k.prototype), c(k.prototype, s, (function() {
+ return this;
+ })), t.AsyncIterator = k, t.async = function(e, n, r, o, i) {
+ i === void 0 && (i = Promise);
+ var a = new k(u(e, n, r, o), i);
+ return t.isGeneratorFunction(n) ? a : a.next().then((function(e) {
+ return e.done ? e.value : a.next();
+ }));
+ }, C(S), c(S, l, "Generator"), c(S, a, (function() {
+ return this;
+ })), c(S, "toString", (function() {
+ return "[object Generator]";
+ })), t.keys = function(e) {
+ var t = Object(e), n = [];
+ for (var r in t) n.push(r);
+ return n.reverse(), function e() {
+ for (; n.length;) {
+ var r = n.pop();
+ if (r in t) return e.value = r, e.done = !1, e;
+ }
+ return e.done = !0, e;
+ };
+ }, t.values = P, j.prototype = {
+ constructor: j,
+ reset: function(t) {
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = e, this.done = !1, this.delegate = null, this.method = "next", this.arg = e, this.tryEntries.forEach(O), !t) for (var n in this) n.charAt(0) === "t" && r.call(this, n) && !isNaN(+n.slice(1)) && (this[n] = e);
+ },
+ stop: function() {
+ this.done = !0;
+ var e = this.tryEntries[0].completion;
+ if (e.type === "throw") throw e.arg;
+ return this.rval;
+ },
+ dispatchException: function(t) {
+ if (this.done) throw t;
+ var n = this;
+ function o(r, o) {
+ return s.type = "throw", s.arg = t, n.next = r, o && (n.method = "next", n.arg = e), !!o;
+ }
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var a = this.tryEntries[i], s = a.completion;
+ if (a.tryLoc === "root") return o("end");
+ if (a.tryLoc <= this.prev) {
+ var l = r.call(a, "catchLoc"), c = r.call(a, "finallyLoc");
+ if (l && c) {
+ if (this.prev < a.catchLoc) return o(a.catchLoc, !0);
+ if (this.prev < a.finallyLoc) return o(a.finallyLoc);
+ } else if (l) {
+ if (this.prev < a.catchLoc) return o(a.catchLoc, !0);
+ } else {
+ if (!c) throw Error("try statement without catch or finally");
+ if (this.prev < a.finallyLoc) return o(a.finallyLoc);
+ }
+ }
+ }
+ },
+ abrupt: function(e, t) {
+ for (var n = this.tryEntries.length - 1; n >= 0; --n) {
+ var o = this.tryEntries[n];
+ if (o.tryLoc <= this.prev && r.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
+ var i = o;
+ break;
+ }
+ }
+ i && (e === "break" || e === "continue") && i.tryLoc <= t && t <= i.finallyLoc && (i = null);
+ var a = i ? i.completion : {};
+ return a.type = e, a.arg = t, i ? (this.method = "next", this.next = i.finallyLoc, m) : this.complete(a);
+ },
+ complete: function(e, t) {
+ if (e.type === "throw") throw e.arg;
+ return e.type === "break" || e.type === "continue" ? this.next = e.arg : e.type === "return" ? (this.rval = this.arg = e.arg, this.method = "return", this.next = "end") : e.type === "normal" && t && (this.next = t), m;
+ },
+ finish: function(e) {
+ for (var t = this.tryEntries.length - 1; t >= 0; --t) {
+ var n = this.tryEntries[t];
+ if (n.finallyLoc === e) return this.complete(n.completion, n.afterLoc), O(n), m;
+ }
+ },
+ catch: function(e) {
+ for (var t = this.tryEntries.length - 1; t >= 0; --t) {
+ var n = this.tryEntries[t];
+ if (n.tryLoc === e) {
+ var r = n.completion;
+ if (r.type === "throw") {
+ var o = r.arg;
+ O(n);
+ }
+ return o;
+ }
+ }
+ throw Error("illegal catch attempt");
+ },
+ delegateYield: function(t, n, r) {
+ return this.delegate = {
+ iterator: P(t),
+ resultName: n,
+ nextLoc: r
+ }, this.method === "next" && (this.arg = e), m;
+ }
+ }, t;
+}
+function ij(e, t, n, r, o, i, a) {
+ try {
+ var s = e[i](a), l = s.value;
+ } catch (e) {
+ n(e);
+ return;
+ }
+ s.done ? t(l) : Promise.resolve(l).then(r, o);
+}
+function aj(e) {
+ var t = function(e) {
+ if (rj(e) != "object" || !e) return e;
+ var t = e[Symbol.toPrimitive];
+ if (t !== void 0) {
+ var n = t.call(e, "string");
+ if (rj(n) != "object") return n;
+ throw TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return String(e);
+ }(e);
+ return rj(t) == "symbol" ? t : t + "";
+}
+var sj = function() {
+ return function(e, t) {
+ return t && function(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, aj(r.key), r);
+ }
+ }(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
+ }((function e() {
+ (function(e, t) {
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
+ })(this, e);
+ }), [{
+ key: "openFile",
+ value: function() {
+ var e = function(e) {
+ return function() {
+ var t = this, n = arguments;
+ return new Promise((function(r, o) {
+ var i = e.apply(t, n);
+ function a(e) {
+ ij(i, r, o, a, s, "next", e);
+ }
+ function s(e) {
+ ij(i, r, o, a, s, "throw", e);
+ }
+ a(void 0);
+ }));
+ };
+ }(oj().mark((function e(t, n) {
+ var r;
+ return oj().wrap((function(e) {
+ for (;;) switch (e.prev = e.next) {
+ case 0:
+ if (!(YO() && t && typeof t.uri < "u")) {
+ e.next = 11;
+ break;
+ }
+ return e.prev = 1, e.next = 4, ZO(t.uri);
+ case 4: return r = e.sent, e.abrupt("return", new JO(r));
+ case 8: throw e.prev = 8, e.t0 = e.catch(1), /* @__PURE__ */ Error(`tus: cannot fetch \`file.uri\` as Blob, make sure the uri is correct and accessible. ${e.t0}`);
+ case 11:
+ if (!(typeof t.slice == "function" && typeof t.size < "u")) {
+ e.next = 13;
+ break;
+ }
+ return e.abrupt("return", Promise.resolve(new JO(t)));
+ case 13:
+ if (typeof t.read != "function") {
+ e.next = 18;
+ break;
+ }
+ if (n = Number(n), Number.isFinite(n)) {
+ e.next = 17;
+ break;
+ }
+ return e.abrupt("return", Promise.reject(/* @__PURE__ */ Error("cannot create source for stream without a finite value for the `chunkSize` option")));
+ case 17: return e.abrupt("return", Promise.resolve(new nj(t, n)));
+ case 18: return e.abrupt("return", Promise.reject(/* @__PURE__ */ Error("source object may only be an instance of File, Blob, or Reader in this environment")));
+ case 19:
+ case "end": return e.stop();
+ }
+ }), e, null, [[1, 8]]);
+ })));
+ return function(t, n) {
+ return e.apply(this, arguments);
+ };
+ }()
+ }]);
+}();
+function lj(e) {
+ return (lj = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
+ return typeof e;
+ } : function(e) {
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
+ })(e);
+}
+function cj(e, t) {
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
+}
+function uj(e, t, n) {
+ return t && function(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, dj(r.key), r);
+ }
+ }(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
+}
+function dj(e) {
+ var t = function(e) {
+ if (lj(e) != "object" || !e) return e;
+ var t = e[Symbol.toPrimitive];
+ if (t !== void 0) {
+ var n = t.call(e, "string");
+ if (lj(n) != "object") return n;
+ throw TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return String(e);
+ }(e);
+ return lj(t) == "symbol" ? t : t + "";
+}
+var fj = function() {
+ return uj((function e() {
+ cj(this, e);
+ }), [{
+ key: "createRequest",
+ value: function(e, t) {
+ return new pj(e, t);
+ }
+ }, {
+ key: "getName",
+ value: function() {
+ return "XHRHttpStack";
+ }
+ }]);
+}(), pj = function() {
+ return uj((function e(t, n) {
+ cj(this, e), this._xhr = new XMLHttpRequest(), this._xhr.open(t, n, !0), this._method = t, this._url = n, this._headers = {};
+ }), [
+ {
+ key: "getMethod",
+ value: function() {
+ return this._method;
+ }
+ },
+ {
+ key: "getURL",
+ value: function() {
+ return this._url;
+ }
+ },
+ {
+ key: "setHeader",
+ value: function(e, t) {
+ this._xhr.setRequestHeader(e, t), this._headers[e] = t;
+ }
+ },
+ {
+ key: "getHeader",
+ value: function(e) {
+ return this._headers[e];
+ }
+ },
+ {
+ key: "setProgressHandler",
+ value: function(e) {
+ "upload" in this._xhr && (this._xhr.upload.onprogress = function(t) {
+ t.lengthComputable && e(t.loaded);
+ });
+ }
+ },
+ {
+ key: "send",
+ value: function() {
+ var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
+ return new Promise((function(n, r) {
+ e._xhr.onload = function() {
+ n(new hj(e._xhr));
+ }, e._xhr.onerror = function(e) {
+ r(e);
+ }, e._xhr.send(t);
+ }));
+ }
+ },
+ {
+ key: "abort",
+ value: function() {
+ return this._xhr.abort(), Promise.resolve();
+ }
+ },
+ {
+ key: "getUnderlyingObject",
+ value: function() {
+ return this._xhr;
+ }
+ }
+ ]);
+}(), hj = function() {
+ return uj((function e(t) {
+ cj(this, e), this._xhr = t;
+ }), [
+ {
+ key: "getStatus",
+ value: function() {
+ return this._xhr.status;
+ }
+ },
+ {
+ key: "getHeader",
+ value: function(e) {
+ return this._xhr.getResponseHeader(e);
+ }
+ },
+ {
+ key: "getBody",
+ value: function() {
+ return this._xhr.responseText;
+ }
+ },
+ {
+ key: "getUnderlyingObject",
+ value: function() {
+ return this._xhr;
+ }
+ }
+ ]);
+}();
+function gj(e) {
+ return (gj = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
+ return typeof e;
+ } : function(e) {
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
+ })(e);
+}
+function mj(e) {
+ var t = function(e) {
+ if (gj(e) != "object" || !e) return e;
+ var t = e[Symbol.toPrimitive];
+ if (t !== void 0) {
+ var n = t.call(e, "string");
+ if (gj(n) != "object") return n;
+ throw TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return String(e);
+ }(e);
+ return gj(t) == "symbol" ? t : t + "";
+}
+var vj = !1;
+try {
+ vj = "localStorage" in window;
+ var yj = "tusSupport", bj = localStorage.getItem(yj);
+ localStorage.setItem(yj, bj), bj === null && localStorage.removeItem(yj);
+} catch (vT) {
+ if (vT.code !== vT.SECURITY_ERR && vT.code !== vT.QUOTA_EXCEEDED_ERR) throw vT;
+ vj = !1;
+}
+var wj = vj, xj = function() {
+ return function(e, t) {
+ return t && function(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, mj(r.key), r);
+ }
+ }(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
+ }((function e() {
+ (function(e, t) {
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
+ })(this, e);
+ }), [
+ {
+ key: "findAllUploads",
+ value: function() {
+ var e = this._findEntries("tus::");
+ return Promise.resolve(e);
+ }
+ },
+ {
+ key: "findUploadsByFingerprint",
+ value: function(e) {
+ var t = this._findEntries(`tus::${e}::`);
+ return Promise.resolve(t);
+ }
+ },
+ {
+ key: "removeUpload",
+ value: function(e) {
+ return localStorage.removeItem(e), Promise.resolve();
+ }
+ },
+ {
+ key: "addUpload",
+ value: function(e, t) {
+ var r = `tus::${e}::${Math.round(0xe8d4a51000 * Math.random())}`;
+ return localStorage.setItem(r, JSON.stringify(t)), Promise.resolve(r);
+ }
+ },
+ {
+ key: "_findEntries",
+ value: function(e) {
+ for (var t = [], n = 0; n < localStorage.length; n++) {
+ var r = localStorage.key(n);
+ if (r.indexOf(e) === 0) try {
+ var o = JSON.parse(localStorage.getItem(r));
+ o.urlStorageKey = r, t.push(o);
+ } catch {}
+ }
+ return t;
+ }
+ }
+ ]);
+}();
+function Ej(e) {
+ return (Ej = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
+ return typeof e;
+ } : function(e) {
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
+ })(e);
+}
+function Sj() {
+ try {
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
+ } catch {}
+ return (Sj = function() {
+ return !!e;
+ })();
+}
+function Cj(e) {
+ return (Cj = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
+ return e.__proto__ || Object.getPrototypeOf(e);
+ })(e);
+}
+function kj(e, t) {
+ return (kj = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
+ return e.__proto__ = t, e;
+ })(e, t);
+}
+function _j(e, t) {
+ var n = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var r = Object.getOwnPropertySymbols(e);
+ t && (r = r.filter((function(t) {
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
+ }))), n.push.apply(n, r);
+ }
+ return n;
+}
+function Tj(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = arguments[t] == null ? {} : arguments[t];
+ t % 2 ? _j(Object(n), !0).forEach((function(t) {
+ Ij(e, t, n[t]);
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : _j(Object(n)).forEach((function(t) {
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
+ }));
+ }
+ return e;
+}
+function Ij(e, t, n) {
+ return (t = Oj(t)) in e ? Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0
+ }) : e[t] = n, e;
+}
+function Oj(e) {
+ var t = function(e, t) {
+ if (Ej(e) != "object" || !e) return e;
+ var n = e[Symbol.toPrimitive];
+ if (n !== void 0) {
+ var r = n.call(e, t);
+ if (Ej(r) != "object") return r;
+ throw TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return String(e);
+ }(e, "string");
+ return Ej(t) == "symbol" ? t : t + "";
+}
+var Bj = Tj(Tj({}, $O.defaultOptions), {}, {
+ httpStack: new fj(),
+ fileReader: new sj(),
+ urlStorage: wj ? new xj() : new oO(),
+ fingerprint: function(e, t) {
+ return YO() ? Promise.resolve(function(e, t) {
+ var n = e.exif ? function(e) {
+ var t = 0;
+ if (e.length === 0) return t;
+ for (var n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n), t &= t;
+ return t;
+ }(JSON.stringify(e.exif)) : "noexif";
+ return [
+ "tus-rn",
+ e.name || "noname",
+ e.size || "nosize",
+ n,
+ t.endpoint
+ ].join("/");
+ }(e, t)) : Promise.resolve([
+ "tus-br",
+ e.name,
+ e.type,
+ e.size,
+ e.lastModified,
+ t.endpoint
+ ].join("-"));
+ }
+});
+(function() {
+ function e() {
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
+ return function(e, t) {
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
+ }(this, e), function(e, t, n) {
+ return t = Cj(t), function(e, t) {
+ if (t && (Ej(t) === "object" || typeof t == "function")) return t;
+ if (t !== void 0) throw TypeError("Derived constructors may only return object or undefined");
+ return function(e) {
+ if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
+ return e;
+ }(e);
+ }(e, Sj() ? Reflect.construct(t, n || [], Cj(e).constructor) : t.apply(e, n));
+ }(this, e, [t, n = Tj(Tj({}, Bj), n)]);
+ }
+ return function(e, t) {
+ if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function");
+ e.prototype = Object.create(t && t.prototype, { constructor: {
+ value: e,
+ writable: !0,
+ configurable: !0
+ } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && kj(e, t);
+ }(e, $O), function(e, t, n) {
+ return n && function(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, Oj(r.key), r);
+ }
+ }(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
+ }(e, 0, [{
+ key: "terminate",
+ value: function(e) {
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
+ return t = Tj(Tj({}, Bj), t), $O.terminate(e, t);
+ }
+ }]);
+})();
+var Uj, Hj, Wj, Vj, qj = { exports: {} }, Gj = {}, Yj = { exports: {} }, Zj = {};
+/**
+* @license React
+* use-sync-external-store-shim.production.js
+*
+* Copyright (c) Meta Platforms, Inc. and affiliates.
+*
+* This source code is licensed under the MIT license found in the
+* LICENSE file in the root directory of this source tree.
+*/
+/**
+* @license React
+* use-sync-external-store-shim/with-selector.production.js
+*
+* Copyright (c) Meta Platforms, Inc. and affiliates.
+*
+* This source code is licensed under the MIT license found in the
+* LICENSE file in the root directory of this source tree.
+*/
+const Xj = gT((Vj || (Vj = 1, qj.exports = function() {
+ if (Wj) return Gj;
+ Wj = 1;
+ var e = s.default, t = (Hj || (Hj = 1, Yj.exports = function() {
+ if (Uj) return Zj;
+ Uj = 1;
+ var e = s.default, t = typeof Object.is == "function" ? Object.is : function(e, t) {
+ return e === t && (e !== 0 || 1 / e == 1 / t) || e != e && t != t;
+ }, n = e.useState, r = e.useEffect, o = e.useLayoutEffect, i = e.useDebugValue;
+ function a(e) {
+ var n = e.getSnapshot;
+ e = e.value;
+ try {
+ var r = n();
+ return !t(e, r);
+ } catch {
+ return !0;
+ }
+ }
+ var l = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? function(e, t) {
+ return t();
+ } : function(e, t) {
+ var s = t(), l = n({ inst: {
+ value: s,
+ getSnapshot: t
+ } }), c = l[0].inst, u = l[1];
+ return o((function() {
+ c.value = s, c.getSnapshot = t, a(c) && u({ inst: c });
+ }), [
+ e,
+ s,
+ t
+ ]), r((function() {
+ return a(c) && u({ inst: c }), e((function() {
+ a(c) && u({ inst: c });
+ }));
+ }), [e]), i(s), s;
+ };
+ return Zj.useSyncExternalStore = e.useSyncExternalStore === void 0 ? l : e.useSyncExternalStore, Zj;
+ }()), Yj.exports), n = typeof Object.is == "function" ? Object.is : function(e, t) {
+ return e === t && (e !== 0 || 1 / e == 1 / t) || e != e && t != t;
+ }, r = t.useSyncExternalStore, o = e.useRef, i = e.useEffect, a = e.useMemo, l = e.useDebugValue;
+ return Gj.useSyncExternalStoreWithSelector = function(e, t, s, c, u) {
+ var d = o(null);
+ if (d.current === null) {
+ var f = {
+ hasValue: !1,
+ value: null
+ };
+ d.current = f;
+ } else f = d.current;
+ d = a((function() {
+ function e(e) {
+ if (!i) {
+ if (i = !0, r = e, e = c(e), u !== void 0 && f.hasValue) {
+ var t = f.value;
+ if (u(t, e)) return o = t;
+ }
+ return o = e;
+ }
+ if (t = o, n(r, e)) return t;
+ var a = c(e);
+ return u !== void 0 && u(t, a) ? (r = e, t) : (r = e, o = a);
+ }
+ var r, o, i = !1, a = s === void 0 ? null : s;
+ return [function() {
+ return e(t());
+ }, a === null ? void 0 : function() {
+ return e(a());
+ }];
+ }), [
+ t,
+ s,
+ c,
+ u
+ ]);
+ var p = r(e, d[0], d[1]);
+ return i((function() {
+ f.hasValue = !0, f.value = p;
+ }), [p]), l(p), p;
+ }, Gj;
+}()), qj.exports)), { useDebugValue: Jj } = s.default, { useSyncExternalStoreWithSelector: Qj } = Xj;
+var eP = Symbol.for("immer-nothing"), tP = Symbol.for("immer-draftable"), nP = Symbol.for("immer-state");
+function rP(e, ...t) {
+ throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`);
+}
+var oP = Object.getPrototypeOf;
+function iP(e) {
+ return !!e && !!e[nP];
+}
+function aP(e) {
+ var t;
+ return !!e && (lP(e) || Array.isArray(e) || !!e[tP] || !((t = e.constructor) == null || !t[tP]) || pP(e) || hP(e));
+}
+var sP = Object.prototype.constructor.toString();
+function lP(e) {
+ if (!e || typeof e != "object") return !1;
+ let t = oP(e);
+ if (t === null) return !0;
+ let n = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
+ return n === Object || typeof n == "function" && Function.toString.call(n) === sP;
+}
+function cP(e, t) {
+ uP(e) === 0 ? Reflect.ownKeys(e).forEach(((n) => {
+ t(n, e[n], e);
+ })) : e.forEach(((n, r) => t(r, n, e)));
+}
+function uP(e) {
+ let t = e[nP];
+ return t ? t.type_ : Array.isArray(e) ? 1 : pP(e) ? 2 : hP(e) ? 3 : 0;
+}
+function dP(e, t) {
+ return uP(e) === 2 ? e.has(t) : Object.prototype.hasOwnProperty.call(e, t);
+}
+function fP(e, t, n) {
+ let r = uP(e);
+ r === 2 ? e.set(t, n) : r === 3 ? e.add(n) : e[t] = n;
+}
+function pP(e) {
+ return e instanceof Map;
+}
+function hP(e) {
+ return e instanceof Set;
+}
+function gP(e) {
+ return e.copy_ || e.base_;
+}
+function mP(e, t) {
+ if (pP(e)) return new Map(e);
+ if (hP(e)) return new Set(e);
+ if (Array.isArray(e)) return Array.prototype.slice.call(e);
+ let n = lP(e);
+ if (!0 === t || t === "class_only" && !n) {
+ let t = Object.getOwnPropertyDescriptors(e);
+ delete t[nP];
+ let n = Reflect.ownKeys(t);
+ for (let r = 0; r < n.length; r++) {
+ let o = n[r], i = t[o];
+ !1 === i.writable && (i.writable = !0, i.configurable = !0), (i.get || i.set) && (t[o] = {
+ configurable: !0,
+ writable: !0,
+ enumerable: i.enumerable,
+ value: e[o]
+ });
+ }
+ return Object.create(oP(e), t);
+ }
+ {
+ let t = oP(e);
+ if (t !== null && n) return { ...e };
+ let r = Object.create(t);
+ return Object.assign(r, e);
+ }
+}
+function vP(e, t = !1) {
+ return bP(e) || iP(e) || !aP(e) || (uP(e) > 1 && (e.set = e.add = e.clear = e.delete = yP), Object.freeze(e), t && Object.entries(e).forEach((([e, t]) => vP(t, !0)))), e;
+}
+function yP() {
+ rP(2);
+}
+function bP(e) {
+ return Object.isFrozen(e);
+}
+var wP, xP = {};
+function EP(e) {
+ let t = xP[e];
+ return t || rP(0), t;
+}
+function SP() {
+ return wP;
+}
+function CP(e, t) {
+ t && (EP("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
+}
+function kP(e) {
+ _P(e), e.drafts_.forEach(IP), e.drafts_ = null;
+}
+function _P(e) {
+ e === wP && (wP = e.parent_);
+}
+function TP(e) {
+ return wP = function(e, t) {
+ return {
+ drafts_: [],
+ parent_: wP,
+ immer_: t,
+ canAutoFreeze_: !0,
+ unfinalizedDrafts_: 0
+ };
+ }(0, e);
+}
+function IP(e) {
+ let t = e[nP];
+ t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
+}
+function OP(e, t) {
+ t.unfinalizedDrafts_ = t.drafts_.length;
+ let n = t.drafts_[0];
+ return e !== void 0 && e !== n ? (n[nP].modified_ && (kP(t), rP(4)), aP(e) && (e = jP(t, e), t.parent_ || AP(t, e)), t.patches_ && EP("Patches").generateReplacementPatches_(n[nP].base_, e, t.patches_, t.inversePatches_)) : e = jP(t, n, []), kP(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e === eP ? void 0 : e;
+}
+function jP(e, t, n) {
+ if (bP(t)) return t;
+ let r = t[nP];
+ if (!r) return cP(t, ((o, i) => PP(e, r, t, o, i, n))), t;
+ if (r.scope_ !== e) return t;
+ if (!r.modified_) return AP(e, r.base_, !0), r.base_;
+ if (!r.finalized_) {
+ r.finalized_ = !0, r.scope_.unfinalizedDrafts_--;
+ let t = r.copy_, o = t, i = !1;
+ r.type_ === 3 && (o = new Set(t), t.clear(), i = !0), cP(o, ((o, a) => PP(e, r, t, o, a, n, i))), AP(e, t, !1), n && e.patches_ && EP("Patches").generatePatches_(r, n, e.patches_, e.inversePatches_);
+ }
+ return r.copy_;
+}
+function PP(e, t, n, r, o, i, a) {
+ if (iP(o)) {
+ let a = jP(e, o, i && t && t.type_ !== 3 && !dP(t.assigned_, r) ? i.concat(r) : void 0);
+ if (fP(n, r, a), !iP(a)) return;
+ e.canAutoFreeze_ = !1;
+ } else a && n.add(o);
+ if (aP(o) && !bP(o)) {
+ if (!e.immer_.autoFreeze_ && e.unfinalizedDrafts_ < 1) return;
+ jP(e, o), (!t || !t.scope_.parent_) && typeof r != "symbol" && Object.prototype.propertyIsEnumerable.call(n, r) && AP(e, o);
+ }
+}
+function AP(e, t, n = !1) {
+ !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && vP(t, n);
+}
+var NP = {
+ get(e, t) {
+ if (t === nP) return e;
+ let n = gP(e);
+ if (!dP(n, t)) return function(e, t, n) {
+ let o = DP(t, n);
+ return o ? "value" in o ? o.value : o.get?.call(e.draft_) : void 0;
+ }(e, n, t);
+ let r = n[t];
+ return e.finalized_ || !aP(r) ? r : r === LP(e.base_, t) ? (zP(e), e.copy_[t] = $P(r, e)) : r;
+ },
+ has: (e, t) => t in gP(e),
+ ownKeys: (e) => Reflect.ownKeys(gP(e)),
+ set(e, t, n) {
+ let r = DP(gP(e), t);
+ if (r != null && r.set) return r.set.call(e.draft_, n), !0;
+ if (!e.modified_) {
+ let r = LP(gP(e), t), o = r?.[nP];
+ if (o && o.base_ === n) return e.copy_[t] = n, e.assigned_[t] = !1, !0;
+ if (function(e, t) {
+ return e === t ? e !== 0 || 1 / e == 1 / t : e != e && t != t;
+ }(n, r) && (n !== void 0 || dP(e.base_, t))) return !0;
+ zP(e), RP(e);
+ }
+ return e.copy_[t] === n && (n !== void 0 || t in e.copy_) || Number.isNaN(n) && Number.isNaN(e.copy_[t]) || (e.copy_[t] = n, e.assigned_[t] = !0), !0;
+ },
+ deleteProperty: (e, t) => (LP(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_[t] = !1, zP(e), RP(e)) : delete e.assigned_[t], e.copy_ && delete e.copy_[t], !0),
+ getOwnPropertyDescriptor(e, t) {
+ let n = gP(e), r = Reflect.getOwnPropertyDescriptor(n, t);
+ return r && {
+ writable: !0,
+ configurable: e.type_ !== 1 || t !== "length",
+ enumerable: r.enumerable,
+ value: n[t]
+ };
+ },
+ defineProperty() {
+ rP(11);
+ },
+ getPrototypeOf: (e) => oP(e.base_),
+ setPrototypeOf() {
+ rP(12);
+ }
+}, MP = {};
+function LP(e, t) {
+ let n = e[nP];
+ return (n ? gP(n) : e)[t];
+}
+function DP(e, t) {
+ if (!(t in e)) return;
+ let n = oP(e);
+ for (; n;) {
+ let e = Object.getOwnPropertyDescriptor(n, t);
+ if (e) return e;
+ n = oP(n);
+ }
+}
+function RP(e) {
+ e.modified_ || (e.modified_ = !0, e.parent_ && RP(e.parent_));
+}
+function zP(e) {
+ e.copy_ ||= mP(e.base_, e.scope_.immer_.useStrictShallowCopy_);
+}
+function $P(e, t) {
+ let n = pP(e) ? EP("MapSet").proxyMap_(e, t) : hP(e) ? EP("MapSet").proxySet_(e, t) : function(e, t) {
+ let n = Array.isArray(e), r = {
+ type_: +!!n,
+ scope_: t ? t.scope_ : SP(),
+ modified_: !1,
+ finalized_: !1,
+ assigned_: {},
+ parent_: t,
+ base_: e,
+ draft_: null,
+ copy_: null,
+ revoke_: null,
+ isManual_: !1
+ }, o = r, i = NP;
+ n && (o = [r], i = MP);
+ let { revoke: a, proxy: s } = Proxy.revocable(o, i);
+ return r.draft_ = s, r.revoke_ = a, s;
+ }(e, t);
+ return (t ? t.scope_ : SP()).drafts_.push(n), n;
+}
+function BP(e) {
+ if (!aP(e) || bP(e)) return e;
+ let t = e[nP], n;
+ if (t) {
+ if (!t.modified_) return t.base_;
+ t.finalized_ = !0, n = mP(e, t.scope_.immer_.useStrictShallowCopy_);
+ } else n = mP(e, !0);
+ return cP(n, ((e, t) => {
+ fP(n, e, BP(t));
+ })), t && (t.finalized_ = !1), n;
+}
+cP(NP, ((e, t) => {
+ MP[e] = function() {
+ return arguments[0] = arguments[0][0], t.apply(this, arguments);
+ };
+})), MP.deleteProperty = function(e, t) {
+ return MP.set.call(this, e, t, void 0);
+}, MP.set = function(e, t, n) {
+ return NP.set.call(this, e[0], t, n, e[0]);
+};
+var FP = new class {
+ constructor(e) {
+ this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (e, t, n) => {
+ if (typeof e == "function" && typeof t != "function") {
+ let n = t;
+ t = e;
+ let r = this;
+ return function(e = n, ...o) {
+ return r.produce(e, ((e) => t.call(this, e, ...o)));
+ };
+ }
+ let r;
+ if (typeof t != "function" && rP(6), n !== void 0 && typeof n != "function" && rP(7), aP(e)) {
+ let o = TP(this), i = $P(e, void 0), a = !0;
+ try {
+ r = t(i), a = !1;
+ } finally {
+ a ? kP(o) : _P(o);
+ }
+ return CP(o, n), OP(r, o);
+ }
+ if (!e || typeof e != "object") {
+ if (r = t(e), r === void 0 && (r = e), r === eP && (r = void 0), this.autoFreeze_ && vP(r, !0), n) {
+ let t = [], o = [];
+ EP("Patches").generateReplacementPatches_(e, r, t, o), n(t, o);
+ }
+ return r;
+ }
+ rP(1);
+ }, this.produceWithPatches = (e, t) => {
+ if (typeof e == "function") return (t, ...n) => this.produceWithPatches(t, ((t) => e(t, ...n)));
+ let n, r;
+ return [
+ this.produce(e, t, ((e, t) => {
+ n = e, r = t;
+ })),
+ n,
+ r
+ ];
+ }, typeof e?.autoFreeze == "boolean" && this.setAutoFreeze(e.autoFreeze), typeof e?.useStrictShallowCopy == "boolean" && this.setUseStrictShallowCopy(e.useStrictShallowCopy);
+ }
+ createDraft(e) {
+ aP(e) || rP(8), iP(e) && (e = function(e) {
+ return iP(e) || rP(10), BP(e);
+ }(e));
+ let t = TP(this), n = $P(e, void 0);
+ return n[nP].isManual_ = !0, _P(t), n;
+ }
+ finishDraft(e, t) {
+ let n = e && e[nP];
+ (!n || !n.isManual_) && rP(9);
+ let { scope_: r } = n;
+ return CP(r, t), OP(void 0, r);
+ }
+ setAutoFreeze(e) {
+ this.autoFreeze_ = e;
+ }
+ setUseStrictShallowCopy(e) {
+ this.useStrictShallowCopy_ = e;
+ }
+ applyPatches(e, t) {
+ let n;
+ for (n = t.length - 1; n >= 0; n--) {
+ let r = t[n];
+ if (r.path.length === 0 && r.op === "replace") {
+ e = r.value;
+ break;
+ }
+ }
+ n > -1 && (t = t.slice(n + 1));
+ let r = EP("Patches").applyPatches_;
+ return iP(e) ? r(e, t) : this.produce(e, ((e) => r(e, t)));
+ }
+}();
+FP.produce, FP.produceWithPatches.bind(FP), FP.setAutoFreeze.bind(FP), FP.setUseStrictShallowCopy.bind(FP), FP.applyPatches.bind(FP), FP.createDraft.bind(FP), FP.finishDraft.bind(FP);
+var UP = ((e) => (e.Idle = "IDLE", e.Pending = "PENDING", e.Queued = "QUEUED", e.Uploading = "UPLOADING", e.Uploaded = "UPLOADED", e.Cancelled = "CANCELLED", e.Failed = "FAILED", e.Paused = "PAUSED", e))(UP || {});
+UP.Pending, UP.Uploading;
+const { Provider: WP } = (0, s.createContext)(null);
+function VP(e, t) {
+ var n = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var r = Object.getOwnPropertySymbols(e);
+ t && (r = r.filter((function(t) {
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
+ }))), n.push.apply(n, r);
+ }
+ return n;
+}
+function qP(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = arguments[t] == null ? {} : arguments[t];
+ t % 2 ? VP(Object(n), !0).forEach((function(t) {
+ KP(e, t, n[t]);
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : VP(Object(n)).forEach((function(t) {
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
+ }));
+ }
+ return e;
+}
+function GP() {
+ GP = function() {
+ return t;
+ };
+ var e, t = {}, n = Object.prototype, r = n.hasOwnProperty, o = Object.defineProperty || function(e, t, n) {
+ e[t] = n.value;
+ }, i = typeof Symbol == "function" ? Symbol : {}, a = i.iterator || "@@iterator", s = i.asyncIterator || "@@asyncIterator", l = i.toStringTag || "@@toStringTag";
+ function c(e, t, n) {
+ return Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0
+ }), e[t];
+ }
+ try {
+ c({}, "");
+ } catch {
+ c = function(e, t, n) {
+ return e[t] = n;
+ };
+ }
+ function u(e, t, n, r) {
+ var i = t && t.prototype instanceof v ? t : v, a = Object.create(i.prototype);
+ return o(a, "_invoke", { value: _(e, n, new j(r || [])) }), a;
+ }
+ function d(e, t, n) {
+ try {
+ return {
+ type: "normal",
+ arg: e.call(t, n)
+ };
+ } catch (e) {
+ return {
+ type: "throw",
+ arg: e
+ };
+ }
+ }
+ t.wrap = u;
+ var f = "suspendedStart", p = "suspendedYield", h = "executing", g = "completed", m = {};
+ function v() {}
+ function y() {}
+ function b() {}
+ var w = {};
+ c(w, a, (function() {
+ return this;
+ }));
+ var x = Object.getPrototypeOf, E = x && x(x(P([])));
+ E && E !== n && r.call(E, a) && (w = E);
+ var S = b.prototype = v.prototype = Object.create(w);
+ function C(e) {
+ [
+ "next",
+ "throw",
+ "return"
+ ].forEach((function(t) {
+ c(e, t, (function(e) {
+ return this._invoke(t, e);
+ }));
+ }));
+ }
+ function k(e, t) {
+ function n(o, i, a, s) {
+ var l = d(e[o], e, i);
+ if (l.type !== "throw") {
+ var c = l.arg, u = c.value;
+ return u && typeof u == "object" && r.call(u, "__await") ? t.resolve(u.__await).then((function(e) {
+ n("next", e, a, s);
+ }), (function(e) {
+ n("throw", e, a, s);
+ })) : t.resolve(u).then((function(e) {
+ c.value = e, a(c);
+ }), (function(e) {
+ return n("throw", e, a, s);
+ }));
+ }
+ s(l.arg);
+ }
+ var i;
+ o(this, "_invoke", { value: function(e, r) {
+ function o() {
+ return new t((function(t, o) {
+ n(e, r, t, o);
+ }));
+ }
+ return i = i ? i.then(o, o) : o();
+ } });
+ }
+ function _(t, n, r) {
+ var o = f;
+ return function(i, a) {
+ if (o === h) throw Error("Generator is already running");
+ if (o === g) {
+ if (i === "throw") throw a;
+ return {
+ value: e,
+ done: !0
+ };
+ }
+ for (r.method = i, r.arg = a;;) {
+ var s = r.delegate;
+ if (s) {
+ var l = T(s, r);
+ if (l) {
+ if (l === m) continue;
+ return l;
+ }
+ }
+ if (r.method === "next") r.sent = r._sent = r.arg;
+ else if (r.method === "throw") {
+ if (o === f) throw o = g, r.arg;
+ r.dispatchException(r.arg);
+ } else r.method === "return" && r.abrupt("return", r.arg);
+ o = h;
+ var c = d(t, n, r);
+ if (c.type === "normal") {
+ if (o = r.done ? g : p, c.arg === m) continue;
+ return {
+ value: c.arg,
+ done: r.done
+ };
+ }
+ c.type === "throw" && (o = g, r.method = "throw", r.arg = c.arg);
+ }
+ };
+ }
+ function T(t, n) {
+ var r = n.method, o = t.iterator[r];
+ if (o === e) return n.delegate = null, r === "throw" && t.iterator.return && (n.method = "return", n.arg = e, T(t, n), n.method === "throw") || r !== "return" && (n.method = "throw", n.arg = /* @__PURE__ */ TypeError("The iterator does not provide a '" + r + "' method")), m;
+ var i = d(o, t.iterator, n.arg);
+ if (i.type === "throw") return n.method = "throw", n.arg = i.arg, n.delegate = null, m;
+ var a = i.arg;
+ return a ? a.done ? (n[t.resultName] = a.value, n.next = t.nextLoc, n.method !== "return" && (n.method = "next", n.arg = e), n.delegate = null, m) : a : (n.method = "throw", n.arg = /* @__PURE__ */ TypeError("iterator result is not an object"), n.delegate = null, m);
+ }
+ function I(e) {
+ var t = { tryLoc: e[0] };
+ 1 in e && (t.catchLoc = e[1]), 2 in e && (t.finallyLoc = e[2], t.afterLoc = e[3]), this.tryEntries.push(t);
+ }
+ function O(e) {
+ var t = e.completion || {};
+ t.type = "normal", delete t.arg, e.completion = t;
+ }
+ function j(e) {
+ this.tryEntries = [{ tryLoc: "root" }], e.forEach(I, this), this.reset(!0);
+ }
+ function P(t) {
+ if (t || t === "") {
+ var n = t[a];
+ if (n) return n.call(t);
+ if (typeof t.next == "function") return t;
+ if (!isNaN(t.length)) {
+ var o = -1, i = function n() {
+ for (; ++o < t.length;) if (r.call(t, o)) return n.value = t[o], n.done = !1, n;
+ return n.value = e, n.done = !0, n;
+ };
+ return i.next = i;
+ }
+ }
+ throw TypeError(typeof t + " is not iterable");
+ }
+ return y.prototype = b, o(S, "constructor", {
+ value: b,
+ configurable: !0
+ }), o(b, "constructor", {
+ value: y,
+ configurable: !0
+ }), y.displayName = c(b, l, "GeneratorFunction"), t.isGeneratorFunction = function(e) {
+ var t = typeof e == "function" && e.constructor;
+ return !!t && (t === y || (t.displayName || t.name) === "GeneratorFunction");
+ }, t.mark = function(e) {
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, b) : (e.__proto__ = b, c(e, l, "GeneratorFunction")), e.prototype = Object.create(S), e;
+ }, t.awrap = function(e) {
+ return { __await: e };
+ }, C(k.prototype), c(k.prototype, s, (function() {
+ return this;
+ })), t.AsyncIterator = k, t.async = function(e, n, r, o, i) {
+ i === void 0 && (i = Promise);
+ var a = new k(u(e, n, r, o), i);
+ return t.isGeneratorFunction(n) ? a : a.next().then((function(e) {
+ return e.done ? e.value : a.next();
+ }));
+ }, C(S), c(S, l, "Generator"), c(S, a, (function() {
+ return this;
+ })), c(S, "toString", (function() {
+ return "[object Generator]";
+ })), t.keys = function(e) {
+ var t = Object(e), n = [];
+ for (var r in t) n.push(r);
+ return n.reverse(), function e() {
+ for (; n.length;) {
+ var r = n.pop();
+ if (r in t) return e.value = r, e.done = !1, e;
+ }
+ return e.done = !0, e;
+ };
+ }, t.values = P, j.prototype = {
+ constructor: j,
+ reset: function(t) {
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = e, this.done = !1, this.delegate = null, this.method = "next", this.arg = e, this.tryEntries.forEach(O), !t) for (var n in this) n.charAt(0) === "t" && r.call(this, n) && !isNaN(+n.slice(1)) && (this[n] = e);
+ },
+ stop: function() {
+ this.done = !0;
+ var e = this.tryEntries[0].completion;
+ if (e.type === "throw") throw e.arg;
+ return this.rval;
+ },
+ dispatchException: function(t) {
+ if (this.done) throw t;
+ var n = this;
+ function o(r, o) {
+ return s.type = "throw", s.arg = t, n.next = r, o && (n.method = "next", n.arg = e), !!o;
+ }
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var a = this.tryEntries[i], s = a.completion;
+ if (a.tryLoc === "root") return o("end");
+ if (a.tryLoc <= this.prev) {
+ var l = r.call(a, "catchLoc"), c = r.call(a, "finallyLoc");
+ if (l && c) {
+ if (this.prev < a.catchLoc) return o(a.catchLoc, !0);
+ if (this.prev < a.finallyLoc) return o(a.finallyLoc);
+ } else if (l) {
+ if (this.prev < a.catchLoc) return o(a.catchLoc, !0);
+ } else {
+ if (!c) throw Error("try statement without catch or finally");
+ if (this.prev < a.finallyLoc) return o(a.finallyLoc);
+ }
+ }
+ }
+ },
+ abrupt: function(e, t) {
+ for (var n = this.tryEntries.length - 1; n >= 0; --n) {
+ var o = this.tryEntries[n];
+ if (o.tryLoc <= this.prev && r.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
+ var i = o;
+ break;
+ }
+ }
+ i && (e === "break" || e === "continue") && i.tryLoc <= t && t <= i.finallyLoc && (i = null);
+ var a = i ? i.completion : {};
+ return a.type = e, a.arg = t, i ? (this.method = "next", this.next = i.finallyLoc, m) : this.complete(a);
+ },
+ complete: function(e, t) {
+ if (e.type === "throw") throw e.arg;
+ return e.type === "break" || e.type === "continue" ? this.next = e.arg : e.type === "return" ? (this.rval = this.arg = e.arg, this.method = "return", this.next = "end") : e.type === "normal" && t && (this.next = t), m;
+ },
+ finish: function(e) {
+ for (var t = this.tryEntries.length - 1; t >= 0; --t) {
+ var n = this.tryEntries[t];
+ if (n.finallyLoc === e) return this.complete(n.completion, n.afterLoc), O(n), m;
+ }
+ },
+ catch: function(e) {
+ for (var t = this.tryEntries.length - 1; t >= 0; --t) {
+ var n = this.tryEntries[t];
+ if (n.tryLoc === e) {
+ var r = n.completion;
+ if (r.type === "throw") {
+ var o = r.arg;
+ O(n);
+ }
+ return o;
+ }
+ }
+ throw Error("illegal catch attempt");
+ },
+ delegateYield: function(t, n, r) {
+ return this.delegate = {
+ iterator: P(t),
+ resultName: n,
+ nextLoc: r
+ }, this.method === "next" && (this.arg = e), m;
+ }
+ }, t;
+}
+function YP(e, t, n, r, o, i, a) {
+ try {
+ var s = e[i](a), l = s.value;
+ } catch (e) {
+ n(e);
+ return;
+ }
+ s.done ? t(l) : Promise.resolve(l).then(r, o);
+}
+function ZP(e) {
+ return function() {
+ var t = this, n = arguments;
+ return new Promise((function(r, o) {
+ var i = e.apply(t, n);
+ function a(e) {
+ YP(i, r, o, a, s, "next", e);
+ }
+ function s(e) {
+ YP(i, r, o, a, s, "throw", e);
+ }
+ a(void 0);
+ }));
+ };
+}
+function KP(e, t, n) {
+ return (t = function(e) {
+ var t = function(e) {
+ if (typeof e != "object" || !e) return e;
+ var t = e[Symbol.toPrimitive];
+ if (t !== void 0) {
+ var n = t.call(e, "string");
+ if (typeof n != "object") return n;
+ throw TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return String(e);
+ }(e);
+ return typeof t == "symbol" ? t : t + "";
+ }(t)) in e ? Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0
+ }) : e[t] = n, e;
+}
+function XP() {
+ return XP = Object.assign ? Object.assign.bind() : function(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = arguments[t];
+ for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
+ }
+ return e;
+ }, XP.apply(this, arguments);
+}
+function JP(e) {
+ if (e == null) throw TypeError("Cannot destructure " + e);
+}
+function QP(e, t) {
+ if (e == null) return {};
+ var n, r, o = function(e, t) {
+ if (e == null) return {};
+ var n, r, o = {}, i = Object.keys(e);
+ for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || (o[n] = e[n]);
+ return o;
+ }(e, t);
+ if (Object.getOwnPropertySymbols) {
+ var i = Object.getOwnPropertySymbols(e);
+ for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
+ }
+ return o;
+}
+function eA(e, t) {
+ return function(e) {
+ if (Array.isArray(e)) return e;
+ }(e) || function(e, t) {
+ var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
+ if (n != null) {
+ var r, o, i, a, s = [], l = !0, c = !1;
+ try {
+ if (i = (n = n.call(e)).next, t === 0) {
+ if (Object(n) !== n) return;
+ l = !1;
+ } else for (; !(l = (r = i.call(n)).done) && (s.push(r.value), s.length !== t); l = !0);
+ } catch (e) {
+ c = !0, o = e;
+ } finally {
+ try {
+ if (!l && n.return != null && (a = n.return(), Object(a) !== a)) return;
+ } finally {
+ if (c) throw o;
+ }
+ }
+ return s;
+ }
+ }(e, t) || nA(e, t) || function() {
+ throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }();
+}
+function tA(e) {
+ return function(e) {
+ if (Array.isArray(e)) return rA(e);
+ }(e) || function(e) {
+ if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
+ }(e) || nA(e) || function() {
+ throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }();
+}
+function nA(e, t) {
+ if (e) {
+ if (typeof e == "string") return rA(e, t);
+ var n = Object.prototype.toString.call(e).slice(8, -1);
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? rA(e, t) : void 0;
+ }
+}
+function rA(e, t) {
+ (t == null || t > e.length) && (t = e.length);
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
+ return r;
+}
+var oA = ["theme"], iA = (ao.button.withConfig({
+ displayName: "ButtonStyled",
+ componentId: "sc-1kgkg60-0"
+})([
+ "button&,a&{display:flex;flex-wrap:nowrap;flex:0 0 auto;white-space:nowrap;position:relative;min-width:40px;text-align:center;background-position:center;fill:currentColor;text-decoration:none;&:focus{display:flex;}}align-items:center !important;box-sizing:border-box !important;text-shadow:none !important;text-transform:none !important;font-family:",
+ " !important;font-size:",
+ " !important;font-weight:400 !important;line-height:",
+ " !important;border-radius:",
+ ";outline:none !important;border:1px solid transparent !important;cursor:pointer !important;vertical-align:middle;justify-content:center;font-style:normal;transition-duration:0.1s;transition-property:background-color,border-color,box-shadow,color;&:disabled{cursor:default !important;pointer-events:none;}",
+ " ",
+ ";",
+ ""
+], po.fontStackBase, po.fontSizeBase, po.lineHeightBase, po.brandRadiusBase, (function(e) {
+ return e.isFullWidth && "width: 100%;";
+}), (function(e) {
+ return e.isSmall ? ro([
+ "height:32px !important;padding:0 ",
+ " !important;font-size:",
+ " !important;line-height:20px !important;"
+ ], po.spacing4, po.fontSize75) : ro(["height:40px !important;padding:0 ", " !important;"], po.spacing5);
+}), (function(e) {
+ var t = e.theme, n = QP(e, oA);
+ if (n.variant === "primary-dark") {
+ var r = ro([
+ "border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:none !important;"
+ ], po.brandPrimary700, po.brandPrimary700, po.white);
+ return ro([
+ "border-color:transparent;background-color:",
+ ";color:",
+ ";",
+ " &:hover{border-color:",
+ ";background-color:",
+ ";color:",
+ ";box-shadow:",
+ " !important;}&:focus{background-color:",
+ ";color:",
+ ";border-color:",
+ ";box-shadow:0 0 0 3px rgb(",
+ " / 30%) !important;}&:active{",
+ "}&:disabled{border-color:transparent;background-color:",
+ ";color:",
+ ";box-shadow:none !important;}"
+ ], po.brandPrimary500, po.white, n.isPressed && r, po.brandPrimary600, po.brandPrimary600, po.white, po.elevation1, po.brandPrimary500, po.white, po.brandPrimary500, po["brandPrimary500-rgb"], r, po.brandPrimary300, po.white);
+ }
+ if (n.variant === "secondary-dark") {
+ var o = ro(["border-color:transparent !important;background-color:rgba(255,255,255,0.1) !important;color:", " !important;"], t.legacy.colorTextDark);
+ return ro([
+ "color:rgba(255,255,255,0.8) !important;background-color:rgba(255,255,255,0.1) !important;",
+ " &:hover{color:",
+ " !important;background-color:rgba(255,255,255,0.15) !important;}&:focus{border-color:rgba(255,255,255,0.15) !important;}&:active{",
+ "}&:disabled{color:rgba(255,255,255,0.3) !important;background-color:rgba(255,255,255,0.05) !important;border-color:transparent !important;box-shadow:none !important;}"
+ ], n.isPressed && o, t.legacy.colorWhite, o);
+ }
+ if (n.variant === "clean-dark") {
+ var i = ro(["border-color:transparent !important;background-color:rgba(255,255,255,0.05) !important;color:", " !important;cursor:pointer !important;"], t.legacy.colorTextDark);
+ return ro([
+ "color:",
+ ";background-color:transparent !important;border-color:transparent !important;box-shadow:none !important;border-radius:",
+ " !important;",
+ " &:hover{color:#fff !important;background-color:rgba(255,255,255,0.05) !important;}&:focus{border-color:rgba(255,255,255,0.15) !important;}&:active{",
+ "}&:disabled{color:rgba(255,255,255,0.15) !important;background-color:transparent !important;}"
+ ], t.legacy.colorTextDarker, t.legacy.buttonBorderRadius, n.isPressed && i, i);
+ }
+ return "";
+})), ao.div.withConfig({
+ displayName: "Icon",
+ componentId: "sc-1kgkg60-1"
+})(["height:100%;display:flex;align-items:center;"]));
+ao(iA).withConfig({
+ displayName: "LeftIcon",
+ componentId: "sc-1kgkg60-2"
+})([
+ "margin-right:",
+ ";margin-left:calc(",
+ " * -1);"
+], (function(e) {
+ return e.lastChild ? `calc(${po.spacing2} * -1)` : po.spacing3;
+}), po.spacing2), ao(iA).withConfig({
+ displayName: "RightIcon",
+ componentId: "sc-1kgkg60-3"
+})([
+ "margin-right:calc(",
+ " * -1);margin-left:",
+ ";"
+], po.spacing2, po.spacing3);
+var aA, sA = co(["100%{transform:rotate(360deg);}"]), lA = co(["0%{stroke-dasharray:1,100;stroke-dashoffset:0;}50%{stroke-dasharray:80,100;stroke-dashoffset:-20;}100%{stroke-dasharray:80,100;stroke-dashoffset:-48;}"]);
+ao.svg.withConfig({
+ displayName: "Svg",
+ componentId: "sc-2khuyx-0"
+})(["width:24px;height:24px;animation:", " 1s linear infinite;"], sA), ao.circle.withConfig({
+ displayName: "Circle",
+ componentId: "sc-2khuyx-1"
+})(["stroke:currentColor;animation:", " 1.5s ease-in-out infinite;stroke-linecap:round;"], lA), function(e) {
+ e[e.Date = 0] = "Date", e[e.MultiSelect = 1] = "MultiSelect", e[e.Select = 2] = "Select", e[e.Search = 3] = "Search";
+}(aA ||= {});
+var cA, uA, dA, fA = ao.div.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-16awveu-0"
+})(["height:0;position:absolute;bottom:32px;"]), pA = ao(fA).withConfig({
+ displayName: "IconRightContainer",
+ componentId: "sc-16awveu-1"
+})([
+ "right:12px;cursor:pointer;fill:",
+ ";&:focus,&:hover{fill:",
+ ";}"
+], (function(e) {
+ return e.theme.legacy.colorIcon;
+}), (function(e) {
+ return e.theme.legacy.colorIconActive;
+}));
+ao.input.withConfig({
+ displayName: "StyledInput",
+ componentId: "sc-16awveu-2"
+})([
+ "box-sizing:border-box;width:100%;height:40px;font-family:",
+ ";font-size:",
+ ";line-height:",
+ ";color:",
+ ";background:",
+ ";border-radius:5px;outline:none !important;border:1px solid ",
+ ";",
+ " &::placeholder{color:",
+ ";}&:focus,&:hover{& ",
+ "{fill:",
+ " !important;}border:1px solid ",
+ ";}",
+ ";padding-left:",
+ "px;padding-right:",
+ "px;",
+ ";"
+], (function(e) {
+ return e.theme.legacy.fontFamily;
+}), (function(e) {
+ return e.theme.legacy.fontSizeH6;
+}), (function(e) {
+ return e.theme.legacy.lineHeightH6;
+}), (function(e) {
+ return e.theme.legacy.colorText;
+}), (function(e) {
+ return e.theme.legacy.colorBackground;
+}), (function(e) {
+ return e.error ? e.theme.legacy.colorError : e.theme.legacy.colorBorder;
+}), (function(e) {
+ return e.inputType === aA.Select && `
+ background: rgba(0, 34, 51, 0.03) !important;
+ color: transparent !important;
+ text-shadow: 0 0 0 ${e.theme.legacy.colorText};
+ cursor: pointer;
+
+ &:hover {
+ background: rgba(0, 34, 51, 0.03) !important;
+ }
+ `;
+}), (function(e) {
+ return e.theme.legacy.colorTextDisabled;
+}), pA, (function(e) {
+ return e.theme.legacy.colorIconActive;
+}), (function(e) {
+ return e.error ? e.theme.legacy.colorError : e.theme.legacy.colorBorderFocus;
+}), (function(e) {
+ return e.borderless ? "\n border: none !important; /* overrides bynder-custom17 */\n &:focus, &:hover {\n border: none;\n }\n " : "";
+}), (function(e) {
+ return e.hasLeftIcon ? 40 : 16;
+}), (function(e) {
+ return e.hasRightIcon ? 40 : 0;
+}), (function(e) {
+ return e.forceActive ? `border: 1px solid ${e.theme.legacy.colorBorderFocus}` : "";
+})), ao.label.withConfig({
+ displayName: "Label",
+ componentId: "sc-16awveu-3"
+})([
+ "font-weight:normal;font-family:",
+ ";font-size:",
+ ";width:100%;margin-bottom:0px;"
+], (function(e) {
+ return e.theme.legacy.fontFamily;
+}), (function(e) {
+ return e.theme.legacy.fontSizeH6;
+})), ao.p.withConfig({
+ displayName: "ErrorMessage",
+ componentId: "sc-16awveu-4"
+})([
+ "font-size:",
+ ";color:",
+ ";margin-bottom:0;"
+], (function(e) {
+ return e.theme.legacy.fontSizeSmall;
+}), (function(e) {
+ return e.theme.legacy.colorError;
+})), ao.div.withConfig({
+ displayName: "WrapperRelative",
+ componentId: "sc-16awveu-5"
+})(["position:relative;margin-top:", "px;"], (function(e) {
+ return e.isLabeled ? 8 : 0;
+})), ao(fA).withConfig({
+ displayName: "IconErrorContainer",
+ componentId: "sc-16awveu-6"
+})(["fill:", ";"], (function(e) {
+ return e.theme.legacy.colorError;
+})), ao(fA).withConfig({
+ displayName: "InputTypeContainer",
+ componentId: "sc-16awveu-7"
+})(["left:10px;fill:", ";"], (function(e) {
+ return e.theme.legacy.colorIcon;
+})), ao.svg.withConfig({
+ displayName: "Svg",
+ componentId: "sc-16awveu-8"
+})(["display:inline-block,stroke-width:0,stroke:current-color,fill:current-color,font-size:32px,"]), ao.div.withConfig({
+ displayName: "ListContainer",
+ componentId: "sc-16awveu-9"
+})([
+ "width:",
+ ";position:fixed;padding-top:4px;z-index:10;top:",
+ ";"
+], (function(e) {
+ return e.width;
+}), (function(e) {
+ return e.top;
+})), lo([
+ "textarea,input[type='text'],input[type='password'],input[type='datetime'],input[type='datetime-local'],input[type='date'],input[type='month'],input[type='time'],input[type='week'],input[type='number'],input[type='email'],input[type='url'],input[type='search'],input[type='tel'],input[type='color']{height:40px;line-height:",
+ ";margin-bottom:0;padding-top:0;padding-bottom:0;padding-left:",
+ "px;padding-right:",
+ "px;font-size:",
+ ";",
+ " &::placeholder{color:",
+ ";}&:focus,&:hover{&::placeholder{color:",
+ ";}}}"
+], (function(e) {
+ return e.theme.legacy.lineHeightH6;
+}), (function(e) {
+ return e.hasLeftIcon ? 40 : 16;
+}), (function(e) {
+ return e.hasRightIcon ? 40 : 0;
+}), (function(e) {
+ return e.theme.legacy.fontSizeH6;
+}), (function(e) {
+ return e.error ? `border: 1px solid ${e.theme.legacy.colorError};` : "";
+}), (function(e) {
+ return e.theme.legacy.colorTextDisabled;
+}), (function(e) {
+ return e.theme.legacy.colorTextDisabled;
+})), function(e) {
+ e.ArrowDown = "ArrowDown", e.ArrowUp = "ArrowUp", e.Enter = "Enter", e.Backspace = "Backspace", e.Escape = "Escape", e.Tab = "Tab";
+}(cA ||= {}), function(e) {
+ e[e.COLOR = 0] = "COLOR", e[e.GREYSCALE = 1] = "GREYSCALE", e[e.WHITE = 2] = "WHITE";
+}(uA ||= {}), function(e) {
+ e.USER = "USER", e.PROFILE = "PROFILE", e.GROUP = "GROUP";
+}(dA ||= {}), ao.div.withConfig({
+ displayName: "MainContainer",
+ componentId: "sc-167ea0r-0"
+})([
+ "background-color:",
+ ";border:",
+ ";box-shadow:",
+ ";border-radius:5px;padding:8px 0;"
+], (function(e) {
+ return e.dark ? e.theme.legacy.colorBackgroundDark : e.theme.legacy.colorBackground;
+}), (function(e) {
+ return e.borderless ? "none" : `1px solid ${e.theme.legacy.colorBorder}`;
+}), (function(e) {
+ return e.borderless ? "none" : e.theme.legacy.boxShadow;
+}));
+var hA = ao.li.withConfig({
+ displayName: "Li",
+ componentId: "sc-167ea0r-1"
+})(["display:flex;font-size:", ";align-items:center;height:36px;padding:0 16px !important;"], (function(e) {
+ return e.theme.legacy.fontSizeSmall;
+})), gA = ao(hA).withConfig({
+ displayName: "Item",
+ componentId: "sc-167ea0r-2"
+})([
+ "cursor:pointer;&&&{&:active,&:focus,&:hover{color:",
+ ";background-color:",
+ ";outline:none;}}"
+], (function(e) {
+ return e.dark ? e.theme.legacy.colorTextDark : e.theme.legacy.colorTextLightActive;
+}), (function(e) {
+ return e.dark ? e.theme.legacy.colorBackgroundDarkHover : e.theme.legacy.colorBackgroundLight;
+})), mA = (ao(hA).withConfig({
+ displayName: "GroupName",
+ componentId: "sc-167ea0r-3"
+})(["cursor:default;color:", ";"], (function(e) {
+ return e.dark ? e.theme.legacy.colorTextDarker : e.theme.legacy.colorText;
+})), ao(hA).withConfig({
+ displayName: "EmptyState",
+ componentId: "sc-167ea0r-4"
+})(["color:", ";cursor:default;"], (function(e) {
+ return e.theme.legacy.colorText;
+})), ao.ul.withConfig({
+ displayName: "Ul",
+ componentId: "sc-167ea0r-5"
+})([
+ "margin:0;padding:0;list-style-type:none;max-height:",
+ ";overflow-y:auto;",
+ "{color:",
+ ";}"
+], (function(e) {
+ return e.maxHeight || "350px";
+}), gA, (function(e) {
+ return e.dark ? e.theme.legacy.colorTextDark : e.hasGroups ? e.theme.legacy.colorTextLight : e.theme.legacy.colorText;
+})), ao.div.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-167ea0r-6"
+})(["display:flex;margin-right:8px;fill:", ";"], (function(e) {
+ return e.dark ? e.theme.legacy.colorTextDark : e.theme.legacy.colorIcon;
+})), ao.div.withConfig({
+ displayName: "Divider",
+ componentId: "sc-167ea0r-7"
+})(["margin:8px 0;border-bottom:1px solid ", ";width:100%;"], (function(e) {
+ return e.dark ? e.theme.legacy.colorRichBlack30 : e.theme.legacy.colorBorder;
+})), ao.svg.withConfig({
+ displayName: "Svg",
+ componentId: "sc-hfnr8h-0"
+})(["display:inline-block;stroke-width:0;stroke:current-color;fill:current-color;font-size:32px;"]), ao.div.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-6ftogw-0"
+})(["height:0;position:absolute;bottom:32px;"])), vA = ao(mA).withConfig({
+ displayName: "IconRightContainer",
+ componentId: "sc-6ftogw-1"
+})([
+ "right:12px;cursor:",
+ ";fill:",
+ ";&:focus,&:hover{fill:",
+ ";}"
+], (function(e) {
+ return e.disabled ? "not-allowed" : "pointer";
+}), (function(e) {
+ return e.dark ? e.theme.legacy.colorTextDark : e.theme.legacy.colorMutedIcon;
+}), (function(e) {
+ return e.dark ? e.theme.legacy.colorTextDark : e.disabled ? e.theme.legacy.colorMutedIcon : e.theme.legacy.colorMutedIconActive;
+}));
+ao.input.withConfig({
+ displayName: "StyledInput",
+ componentId: "sc-6ftogw-2"
+})([
+ "box-sizing:border-box;width:100%;height:40px !important;font-family:",
+ ";font-size:",
+ " !important;line-height:",
+ " !important;color:",
+ ";cursor:",
+ ";background:",
+ ";border-radius:5px;outline:none !important;border:1px solid ",
+ ";&:focus,&:hover{& ",
+ "{fill:",
+ " !important;}&::placeholder{color:",
+ " !important;}",
+ "}&::placeholder{color:",
+ " !important;}",
+ ";padding-left:",
+ "px !important;padding-right:",
+ "px !important;padding-top:0 !important;padding-bottom:0 !important;margin-bottom:0 !important;",
+ ";"
+], (function(e) {
+ return e.theme.legacy.fontFamily;
+}), (function(e) {
+ return e.theme.legacy.fontSizeH6;
+}), (function(e) {
+ return e.theme.legacy.lineHeightH6;
+}), (function(e) {
+ return e.disabled ? e.theme.legacy.colorTextDisabled : e.theme.legacy.colorText;
+}), (function(e) {
+ return e.disabled ? "not-allowed" : "pointer";
+}), (function(e) {
+ return e.disabled ? po.gray25 : e.theme.legacy.colorBackground;
+}), (function(e) {
+ return e.error ? e.theme.legacy.colorError : e.theme.legacy.colorBorder;
+}), vA, (function(e) {
+ return e.theme.legacy.colorMutedIconActive;
+}), (function(e) {
+ return e.dark ? e.theme.legacy.colorTextDark : e.theme.legacy.colorTextDisabled;
+}), (function(e) {
+ return e.error ? `border: 1px solid ${e.theme.legacy.colorError} !important;` : e.dark ? "" : e.disabled ? `border: 1px solid ${e.theme.legacy.colorBorder} !important;` : `border: 1px solid ${e.theme.legacy.colorBorderFocus} !important;`;
+}), (function(e) {
+ return e.dark ? e.theme.legacy.colorTextDark : e.theme.legacy.colorTextDisabled;
+}), (function(e) {
+ return e.borderless ? ro(["border:none !important;&:focus,&:hover{border:none;}"]) : "";
+}), (function(e) {
+ return e.hasLeftIcon ? 40 : 16;
+}), (function(e) {
+ return e.hasRightIcon ? 40 : 0;
+}), (function(e) {
+ return e.forceActive ? `border: 1px solid ${e.theme.legacy.colorBorderFocus}` : "";
+})), ao.label.withConfig({
+ displayName: "Label",
+ componentId: "sc-6ftogw-3"
+})([
+ "font-weight:normal;font-family:",
+ ";font-size:",
+ ";width:100%;margin-bottom:0px;"
+], (function(e) {
+ return e.theme.legacy.fontFamily;
+}), (function(e) {
+ return e.theme.legacy.fontSizeH6;
+})), ao.p.withConfig({
+ displayName: "ErrorMessage",
+ componentId: "sc-6ftogw-4"
+})([
+ "font-size:",
+ ";color:",
+ ";margin-bottom:0;"
+], (function(e) {
+ return e.theme.legacy.fontSizeSmall;
+}), (function(e) {
+ return e.theme.legacy.colorError;
+})), ao.div.withConfig({
+ displayName: "LabelContainer",
+ componentId: "sc-6ftogw-5"
+})(["width:100%;"]), ao.div.withConfig({
+ displayName: "WrapperRelative",
+ componentId: "sc-6ftogw-6"
+})(["position:relative;margin-top:", "px;"], (function(e) {
+ return e.isLabeled ? 8 : 0;
+})), ao(mA).withConfig({
+ displayName: "IconErrorContainer",
+ componentId: "sc-6ftogw-7"
+})(["fill:", ";"], (function(e) {
+ return e.theme.legacy.colorError;
+})), ao(mA).withConfig({
+ displayName: "IconLeftContainer",
+ componentId: "sc-6ftogw-8"
+})(["left:10px;fill:", ";"], (function(e) {
+ return e.theme.legacy.colorIcon;
+})), ao.div.withConfig({
+ displayName: "ListContainer",
+ componentId: "sc-6ftogw-9"
+})(["position:absolute;padding-top:4px;width:100%;z-index:10;"]), ao.div.withConfig({
+ displayName: "SpinnerBorder",
+ componentId: "sc-1lat4jy-0"
+})(["display:flex;width:24px;height:24px;justify-content:center;align-items:center;svg{animation:borderRotate 1s linear infinite;width:20px;height:20px;circle{stroke:", ";stroke-linecap:round;animation:borderDash 1.5s ease-in-out infinite;}}@keyframes borderRotate{100%{transform:rotate(360deg);}}@keyframes borderDash{0%{stroke-dasharray:1,100;stroke-dashoffset:0;}50%{stroke-dasharray:80,100;stroke-dashoffset:-20;}100%{stroke-dasharray:80,100;stroke-dashoffset:-48;}}"], (function(e) {
+ switch (e.colorMode) {
+ case uA.COLOR: return e.theme.legacy.colorPrimary;
+ case uA.WHITE: return e.theme.legacy.colorWhite30;
+ default: return e.theme.legacy.colorRichBlack30;
+ }
+}));
+var yA = ao.div.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-hv8gko-0"
+})(["position:absolute;height:100%;display:flex;align-items:center;"]);
+ao(yA).withConfig({
+ displayName: "IconRightContainer",
+ componentId: "sc-hv8gko-1"
+})([
+ "top:0;right:12px;",
+ ";fill:",
+ ";&:focus,&:hover{fill:",
+ ";}"
+], (function(e) {
+ return e.onClick && "cursor: pointer;";
+}), (function(e) {
+ return e.theme.legacy.colorIcon;
+}), (function(e) {
+ return e.theme.legacy.colorIconActive;
+})), ao.input.withConfig({
+ displayName: "StyledInput",
+ componentId: "sc-hv8gko-2"
+})([
+ "box-sizing:border-box;width:100%;height:",
+ "px !important;font-family:",
+ ";font-size:",
+ " !important;line-height:",
+ " !important;color:",
+ ";background:",
+ ";border-radius:5px;outline:none !important;border:1px solid ",
+ " !important;&::placeholder{color:",
+ " !important;}&:focus,&:hover:not([disabled]){&::placeholder{color:",
+ " !important;}border:1px solid ",
+ " !important;}",
+ ";padding-left:",
+ "px !important;padding-right:",
+ "px !important;padding-top:0 !important;padding-bottom:0 !important;margin-bottom:0 !important;",
+ ";&&:disabled{background:",
+ ";border-color:",
+ " !important;}"
+], (function(e) {
+ return e.small ? 32 : 40;
+}), (function(e) {
+ return e.theme.legacy.fontFamily;
+}), (function(e) {
+ return e.theme.legacy.fontSizeH6;
+}), (function(e) {
+ return e.theme.legacy.lineHeightH6;
+}), (function(e) {
+ return e.theme.legacy.colorText;
+}), (function(e) {
+ return e.theme.legacy.colorBackground;
+}), (function(e) {
+ return e.error ? e.theme.legacy.colorError : e.theme.legacy.colorBorder;
+}), (function(e) {
+ return e.theme.legacy.colorTextDisabled;
+}), (function(e) {
+ return e.theme.legacy.colorTextDisabled;
+}), (function(e) {
+ return e.error ? e.theme.legacy.colorError : e.theme.legacy.colorBorderFocus;
+}), (function(e) {
+ return e.borderless ? ro(["border:none !important;&:focus,&:hover{border:none;}"]) : "";
+}), (function(e) {
+ return e.hasLeftIcon ? 40 : 16;
+}), (function(e) {
+ return e.hasRightIcon ? 40 : 0;
+}), (function(e) {
+ return e.forceActive && !e.error ? `border: 1px solid ${e.theme.legacy.colorBorderFocus}` : "";
+}), (function(e) {
+ return e.theme.legacy.colorBackgroundLight;
+}), (function(e) {
+ return e.theme.legacy.colorBackgroundLight;
+})), ao.label.withConfig({
+ displayName: "Label",
+ componentId: "sc-hv8gko-3"
+})([
+ "font-weight:normal;font-family:",
+ ";font-size:",
+ ";color:",
+ ";width:100%;margin-bottom:0px;"
+], (function(e) {
+ return e.theme.legacy.fontFamily;
+}), (function(e) {
+ return e.theme.legacy.fontSizeH6;
+}), (function(e) {
+ return e.theme.legacy.colorText;
+})), ao.p.withConfig({
+ displayName: "ErrorMessage",
+ componentId: "sc-hv8gko-4"
+})([
+ "margin:4px 0 0;font-size:",
+ ";line-height:",
+ ";color:",
+ ";"
+], (function(e) {
+ return e.theme.legacy.fontSizeSmall;
+}), (function(e) {
+ return e.theme.legacy.lineHeightSmall;
+}), (function(e) {
+ return e.theme.legacy.colorError;
+})), ao.div.withConfig({
+ displayName: "LabelContainer",
+ componentId: "sc-hv8gko-5"
+})(["width:100%;"]), ao.div.withConfig({
+ displayName: "WrapperRelative",
+ componentId: "sc-hv8gko-6"
+})(["position:relative;margin-top:", "px;"], (function(e) {
+ return e.isLabeled ? 8 : 0;
+})), ao(yA).withConfig({
+ displayName: "IconLeftContainer",
+ componentId: "sc-hv8gko-7"
+})([
+ "top:0;left:10px;fill:",
+ ";color:",
+ ";"
+], (function(e) {
+ return e.theme.legacy.colorIcon;
+}), (function(e) {
+ return e.theme.legacy.colorIcon;
+})), ao.p.withConfig({
+ displayName: "Counter",
+ componentId: "sc-hv8gko-8"
+})([
+ "position:absolute;right:0;font-size:",
+ ";color:",
+ ";margin:4px 0 0 0;text-align:right;"
+], (function(e) {
+ return e.theme.legacy.fontSizeSmall;
+}), (function(e) {
+ return e.theme.legacy.colorTextDisabled;
+})), ao.div.withConfig({
+ displayName: "FixedContainer",
+ componentId: "sc-kc8vou-0"
+})(["position:fixed;z-index:2;"]), ao.div.withConfig({
+ displayName: "StyledItemStatus",
+ componentId: "sc-uhd8g-0"
+})([
+ "padding:0 ",
+ ";color:",
+ ";"
+], po.spacing5, (function(e) {
+ return e.theme.legacy.colorRichBlack30;
+})), ao.div.withConfig({
+ displayName: "StyledUserSearchContainer",
+ componentId: "sc-uhd8g-1"
+})(["position:relative;"]), ao.ul.withConfig({
+ displayName: "StyledUserSearchDropdown",
+ componentId: "sc-uhd8g-2"
+})([
+ "display:block;box-sizing:border-box;overflow-y:auto;padding:",
+ " 0;margin:0;border:none;border-radius:",
+ ";background-color:",
+ ";box-shadow:0 0 0 1px ",
+ ";z-index:1;&:empty{display:none;}> li{list-style:none;}"
+], po.spacing3, (function(e) {
+ return e.theme.legacy.buttonBorderRadius;
+}), (function(e) {
+ return e.theme.legacy.colorWhite;
+}), (function(e) {
+ return e.theme.legacy.colorRichBlack15;
+}));
+var wA = (ao(ao.div.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-uhd8g-3"
+})(["position:absolute;height:0;right:0;bottom:32px;"])).withConfig({
+ displayName: "IconRightContainer",
+ componentId: "sc-uhd8g-4"
+})([
+ "cursor:pointer;fill:",
+ ";&:focus,&:hover{fill:",
+ ";}"
+], (function(e) {
+ return e.theme.legacy.colorIcon;
+}), (function(e) {
+ return e.theme.legacy.colorIconActive;
+})), ao.div.withConfig({
+ displayName: "Container",
+ componentId: "sc-1ozn84q-0"
+})(["padding:8px 0;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;"]), ao.div.withConfig({
+ displayName: "InfoContainer",
+ componentId: "sc-1ozn84q-1"
+})(["flex:1;margin-right:12px;color:", ";min-width:0;"], (function(e) {
+ return e.isDisabled ? e.theme.legacy.colorTextLight : e.theme.legacy.colorText;
+})), ao.div.withConfig({
+ displayName: "NameContainer",
+ componentId: "sc-1ozn84q-2"
+})(["display:flex;"]), ao.div.withConfig({
+ displayName: "Name",
+ componentId: "sc-1ozn84q-3"
+})(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"]), ao.div.withConfig({
+ displayName: "NameSmoked",
+ componentId: "sc-1ozn84q-4"
+})(["color:", ";margin-left:8px;"], (function(e) {
+ return e.theme.legacy.colorTextDisabled;
+})), ao.div.withConfig({
+ displayName: "ExtraInfo",
+ componentId: "sc-1ozn84q-5"
+})(["font-size:14px;color:", ";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"], (function(e) {
+ return e.theme.legacy.colorTextLight;
+})), ao.div.withConfig({
+ displayName: "LoadingPlaceholder",
+ componentId: "sc-1ozn84q-6"
+})(["&:after{content:'';display:flex;width:120px;height:6px;border-radius:4px;margin:3px 0;background-color:", ";}"], (function(e) {
+ return e.theme.legacy.colorRichBlack20;
+})));
+ao(wA).withConfig({
+ displayName: "LoadingName",
+ componentId: "sc-1ozn84q-7"
+})(["&:after{width:120px;background-color:", ";}"], (function(e) {
+ return e.theme.legacy.colorRichBlack20;
+})), ao(wA).withConfig({
+ displayName: "LoadingExtraInfo",
+ componentId: "sc-1ozn84q-8"
+})(["&:after{width:80px;background-color:", ";}"], (function(e) {
+ return e.theme.legacy.colorRichBlack10;
+})), ao.div.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-1ozn84q-9"
+})([
+ "min-width:40px;height:40px;margin-right:8px;display:flex;align-items:center;justify-content:center;border-radius:",
+ ";background-color:",
+ ";fill:",
+ ";"
+], (function(e) {
+ return e.square ? "5px" : "50%";
+}), (function(e) {
+ return e.theme.legacy.colorBackgroundLight;
+}), (function(e) {
+ return e.theme.legacy.colorBackgroundActive;
+})), ao.div.withConfig({
+ displayName: "EntityListContainer",
+ componentId: "sc-1ozn84q-10"
+})(["flex:1;overflow-y:auto;overflow-x:hidden;margin-top:16px;max-height:256px;"]), ao.div.withConfig({
+ displayName: "StyledItemCheck",
+ componentId: "sc-ri03d3-0"
+})([
+ "display:flex;width:28px;height:28px;align-items:center;justify-content:center;border-radius:50%;box-shadow:inset 0 0 0 2px ",
+ ";",
+ " svg{",
+ "}"
+], (function(e) {
+ return e.theme.legacy.colorRichBlack10;
+}), (function(e) {
+ return e.checked && `
+ background-color: ${e.theme.legacy.colorPrimary};
+ box-shadow: none;
+ color: ${e.theme.legacy.colorWhite};
+ `;
+}), (function(e) {
+ return e.checked ? "\n opacity: 1;\n transform: scale(1);\n " : "\n opacity: 0;\n ";
+})), ao.div.withConfig({
+ displayName: "StyledEntityListContainer",
+ componentId: "sc-ri03d3-1"
+})(["", ""], (function(e) {
+ return e.isDisabled && "opacity: 0.6;";
+}));
+var xA, EA, SA = ao.div.withConfig({
+ displayName: "Section",
+ componentId: "sc-ri03d3-2"
+})(["margin:0 0 12px 0;list-style:none;min-width:224px;"]), kA = (ao((ao.div.withConfig({
+ displayName: "SubTitle",
+ componentId: "sc-ri03d3-3"
+})(["margin:8px 0 8px 0;"]), ao.div.withConfig({
+ displayName: "ListContent",
+ componentId: "sc-ri03d3-4"
+})(["padding:8px 0;margin:0;display:flex;flex-direction:row;align-items:center;position:relative;justify-content:flex-start;"]), ao.div.withConfig({
+ displayName: "ListInfo",
+ componentId: "sc-ri03d3-5"
+})(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px;color:", ";"], (function(e) {
+ return e.theme.legacy.colorRichBlack80;
+})), ao.div.withConfig({
+ displayName: "ListTitle",
+ componentId: "sc-ri03d3-6"
+})(["width:100%;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"]))).withConfig({
+ displayName: "ListSecondary",
+ componentId: "sc-ri03d3-7"
+})(["font-size:14px;color:", ";"], (function(e) {
+ return e.theme.legacy.colorRichBlack50;
+})), ao.div.withConfig({
+ displayName: "ListActions",
+ componentId: "sc-ri03d3-8"
+})(["margin-left:auto;display:flex;div + button{margin-left:8px;}"]), ao.div.withConfig({
+ displayName: "ListItem",
+ componentId: "sc-ri03d3-9"
+})([
+ "padding:0 16px;",
+ " ",
+ ""
+], (function(e) {
+ return e.pointer && "\n cursor: pointer;\n ";
+}), (function(e) {
+ return e.isFocused && `
+ background-color: ${e.theme.legacy.colorRichBlack03};
+ `;
+})), ao.div.withConfig({
+ displayName: "ListIcon",
+ componentId: "sc-ri03d3-10"
+})([
+ "width:48px;height:48px;margin:0 8px 0 0;border-radius:5px;position:relative;box-shadow:inset 0 0 0 1px ",
+ ";display:flex;align-items:center;justify-content:center;border-radius:50%;background-color:",
+ ";fill:",
+ ";color:",
+ ";box-shadow:none;> svg{width:24px;height:24px;}"
+], (function(e) {
+ return e.theme.legacy.colorRichBlack10;
+}), (function(e) {
+ return e.theme.legacy.colorRichBlack05;
+}), (function(e) {
+ return e.theme.legacy.colorRichBlack50;
+}), (function(e) {
+ return e.theme.legacy.colorRichBlack50;
+})), ao.span.withConfig({
+ displayName: "SpanSmoke",
+ componentId: "sc-ri03d3-11"
+})(["color:", ";"], (function(e) {
+ return e.theme.legacy.colorRichBlack30;
+})), ao.div.withConfig({
+ displayName: "Icon",
+ componentId: "sc-ri03d3-12"
+})([
+ "background-color:",
+ ";width:24px;height:24px;margin:0 12px 0 0px;border-radius:5px;flex-shrink:0;img{width:24px;height:24px;margin:0 12px 0 0px;border-radius:5px;background-color:",
+ ";}"
+], (function(e) {
+ return !e.withImage && (e.color || e.theme.legacy.colorRichBlack10);
+}), (function(e) {
+ return e.color || e.theme.legacy.colorRichBlack10;
+}))), _A = ao.span.withConfig({
+ displayName: "ComponentIcon",
+ componentId: "sc-ri03d3-13"
+})([
+ "display:flex;width:32px;height:32px;align-items:center;fill:",
+ ";margin-right:8px;justify-content:center;flex-shrink:0;border-radius:5px;",
+ "{margin:0;}> img{width:24px;height:24px;border-radius:5px;}"
+], (function(e) {
+ return e.theme.legacy.colorRichBlack30;
+}), kA);
+ao.div.withConfig({
+ displayName: "TextEllipsis",
+ componentId: "sc-ri03d3-14"
+})(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:initial;"]), ao.div.withConfig({
+ displayName: "MainContainer",
+ componentId: "sc-ri03d3-15"
+})(["display:flex;flex-direction:column;max-height:100%;"]), ao(SA).withConfig({
+ displayName: "EntityListSection",
+ componentId: "sc-ri03d3-16"
+})([
+ "margin-right:calc(",
+ " * -1);padding-right:",
+ ";flex:1;overflow-y:auto;overflow-x:hidden;margin-top:4px;min-height:186px;max-height:256px;margin-bottom:12px;"
+], po.spacing6, po.spacing6), ao.div.withConfig({
+ displayName: "DropdownArrowIconContainer",
+ componentId: "sc-ri03d3-17"
+})(["height:24px;margin:0 calc(", " * -1);"], po.spacing2), function(e) {
+ e.PRIVATE = "PRIVATE", e.RESTRICTED = "RESTRICTED", e.ALL_USERS = "ALL_USERS", e.PUBLIC = "PUBLIC";
+}(xA ||= {}), function(e) {
+ e.LEFT = "left", e.RIGHT = "right", e.CENTER = "center", e.TOP = "top";
+}(EA ||= {}), ao.div.withConfig({
+ displayName: "Dropdown",
+ componentId: "sc-td9xdv-0"
+})(["position:relative;margin-left:0px;"]);
+var TA = ao.div.withConfig({
+ displayName: "DropdownContainer",
+ componentId: "sc-td9xdv-1"
+})([
+ "top:100%;left:0;border-radius:",
+ ";background-color:",
+ ";box-shadow:0 1px 6px 0 ",
+ ";border:1px solid ",
+ ";min-width:170px;overflow:auto;background-clip:padding-box;"
+], (function(e) {
+ return e.theme.legacy.buttonBorderRadius;
+}), (function(e) {
+ return e.theme.legacy.colorWhite;
+}), (function(e) {
+ return e.theme.legacy.colorRichBlack10;
+}), (function(e) {
+ return e.theme.legacy.colorRichBlack05;
+})), IA = (ao.div.withConfig({
+ displayName: "DropdownContent",
+ componentId: "sc-td9xdv-2"
+})([
+ "position:absolute;min-width:",
+ ";",
+ " overflow:auto;background-color:",
+ ";box-shadow:0 1px 8px 0 ",
+ ";border-radius:",
+ ";background-clip:padding-box;z-index:100;",
+ ""
+], (function(e) {
+ return e.small ? "148px" : "200px";
+}), (function(e) {
+ return e.fullWidth && "width: 100%;";
+}), (function(e) {
+ return e.theme.legacy.colorWhite;
+}), (function(e) {
+ return e.theme.legacy.colorRichBlack10;
+}), (function(e) {
+ return e.theme.legacy.buttonBorderRadius;
+}), (function(e) {
+ return function() {
+ switch (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : EA.LEFT) {
+ case EA.RIGHT: return ro(["top:110%;right:0;"]);
+ case EA.CENTER: return ro(["top:110%;left:50%;transform:translateX(-50%);"]);
+ case EA.TOP: return ro(["top:auto;bottom:110%;"]);
+ case EA.LEFT:
+ default: return ro(["top:110%;left:0;"]);
+ }
+ }(e.position);
+})), ao.div.withConfig({
+ displayName: "Entry",
+ componentId: "sc-td9xdv-3"
+})(["margin:0;display:flex;flex-direction:row;align-items:center;position:relative;text-decoration:none;white-space:nowrap;", "{width:24px;}"], _A), ao.span.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-td9xdv-4"
+})(["display:flex;margin:0 -8px 0 auto;fill:", ";svg{margin-left:auto;}"], (function(e) {
+ return e.theme.legacy.colorRichBlack80;
+}))), OA = (ao.li.withConfig({
+ displayName: "DropdownListItem",
+ componentId: "sc-td9xdv-5"
+})([
+ "",
+ " margin:0;height:36px;display:flex;flex-direction:row;align-items:center;position:relative;color:",
+ ";font-size:14px;",
+ " &:hover{background-color:",
+ ";cursor:pointer;color:",
+ ";}list-style:none;",
+ "{fill:",
+ ";color:",
+ ";}",
+ "{margin:0 -8px 0 auto;svg{color:rgba(0,34,51,0.8);}}"
+], (function(e) {
+ return e.woPaddingLeft ? "padding: 0 16px 0 0;" : "padding: 0 16px;";
+}), (function(e) {
+ return e.theme.legacy.colorRichBlack50;
+}), (function(e) {
+ return e.enabled && `color: ${e.theme.legacy.colorRichBlack80};`;
+}), (function(e) {
+ return e.theme.legacy.colorRichBlack03;
+}), (function(e) {
+ return e.theme.legacy.colorRichBlack80;
+}), _A, (function(e) {
+ return e.theme.legacy.colorRichBlack50;
+}), (function(e) {
+ return e.theme.legacy.colorRichBlack50;
+}), IA), ro(["width:32px;height:32px;display:flex;align-items:center;justify-content:center;"])), jA = ro(["margin:0 4px 0 -8px;flex-shrink:0;border-radius:", ";"], (function(e) {
+ return e.theme.legacy.buttonBorderRadius;
+}));
+ao.ul.withConfig({
+ displayName: "DropdownList",
+ componentId: "sc-td9xdv-6"
+})(["list-style:none;padding:8px 0;margin:0;hr{margin:8px 0;}", ""], (function(e) {
+ return e.scrollable && "\n max-height: 300px;\n overflow: scroll;\n ";
+})), ao(TA).withConfig({
+ displayName: "CardDropdownContainer",
+ componentId: "sc-td9xdv-7"
+})(["top:110%;min-width:200px;background-clip:padding-box;align-self:flex-start;min-height:8px;z-index:1;"]), ao.span.withConfig({
+ displayName: "CardDropdownListIcon",
+ componentId: "sc-td9xdv-8"
+})([
+ "",
+ " ",
+ " color:",
+ ";"
+], OA, jA, (function(e) {
+ return e.theme.legacy.colorRichBlack50;
+}));
+var PA = ao.input.withConfig({
+ displayName: "StyledInput",
+ componentId: "sc-1jv4ai7-0"
+})([
+ "flex-grow:2;box-sizing:border-box;height:40px;font-size:",
+ ";line-height:",
+ ";color:",
+ ";background:",
+ ";padding-left:16px;padding-right:40px;input&{\bwidth:156px;outline:none;border:none;border-radius:",
+ ";&:focus,&:hover{border:none;box-shadow:none;}}&::placeholder{color:",
+ ";}"
+], (function(e) {
+ return e.theme.legacy.fontSizeH6;
+}), (function(e) {
+ return e.theme.legacy.lineHeightH6;
+}), (function(e) {
+ return e.theme.legacy.colorText;
+}), (function(e) {
+ return e.theme.legacy.colorBackground;
+}), (function(e) {
+ return e.theme.legacy.buttonBorderRadius;
+}), (function(e) {
+ return e.theme.legacy.colorTextDisabled;
+})), AA = (ao.div.withConfig({
+ displayName: "WrapperRelative",
+ componentId: "sc-1jv4ai7-1"
+})([
+ "position:relative;margin-top:",
+ "px;border-radius:",
+ ";border:1px solid ",
+ ";&:focus,&:hover{border:1px solid ",
+ ";}"
+], (function(e) {
+ return e.isLabeled ? 8 : 0;
+}), (function(e) {
+ return e.theme.legacy.buttonBorderRadius;
+}), (function(e) {
+ return e.isFocused ? e.theme.legacy.colorBorderFocus : e.theme.legacy.colorBorder;
+}), (function(e) {
+ return e.theme.legacy.colorBorderFocus;
+})), ao.div.withConfig({
+ displayName: "WrapperFlex",
+ componentId: "sc-1jv4ai7-2"
+})(["display:flex;align-items:center;flex-wrap:wrap;"]), ao.div.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-1jv4ai7-3"
+})(["height:0;position:absolute;bottom:32px;"]));
+ao(AA).withConfig({
+ displayName: "IconErrorContainer",
+ componentId: "sc-1jv4ai7-4"
+})(["fill:", ";"], (function(e) {
+ return e.theme.legacy.colorError;
+})), ao(AA).withConfig({
+ displayName: "IconRightContainer",
+ componentId: "sc-1jv4ai7-5"
+})([
+ "right:12px;cursor:pointer;fill:",
+ ";&:focus,&:hover{fill:",
+ ";}",
+ ":focus &{fill:",
+ ";}"
+], (function(e) {
+ return e.theme.legacy.colorIcon;
+}), (function(e) {
+ return e.theme.legacy.colorIconActive;
+}), PA, (function(e) {
+ return e.theme.legacy.colorIconActive;
+})), ao.label.withConfig({
+ displayName: "Label",
+ componentId: "sc-1jv4ai7-6"
+})(["font-weight:normal;font-size:", ";width:100%;margin-bottom:0px;"], (function(e) {
+ return e.theme.legacy.fontSizeH6;
+})), ao.p.withConfig({
+ displayName: "ErrorMessage",
+ componentId: "sc-1jv4ai7-7"
+})([
+ "font-size:",
+ ";color:",
+ ";margin-bottom:0;"
+], (function(e) {
+ return e.theme.legacy.fontSizeSmall;
+}), (function(e) {
+ return e.theme.legacy.colorError;
+})), ao.svg.withConfig({
+ displayName: "Svg",
+ componentId: "sc-1jv4ai7-8"
+})(["display:inline-block,stroke-width:0,stroke:current-color,fill:current-color,font-size:32px,"]), ao.div.withConfig({
+ displayName: "ListContainer",
+ componentId: "sc-1jv4ai7-9"
+})([
+ "width:",
+ ";position:fixed;padding-top:4px;z-index:10;top:",
+ ";"
+], (function(e) {
+ return e.width;
+}), (function(e) {
+ return e.top;
+})), ao.div.withConfig({
+ displayName: "ListItem",
+ componentId: "sc-4vrawh-0"
+})(["padding:0 16px;cursor:pointer;", ""], (function(e) {
+ return e.isFocused && ro(["background-color:", ";"], e.theme.legacy.colorRichBlack03);
+}));
+var NA = "44px", MA = (ao.input.withConfig({
+ displayName: "Input",
+ componentId: "sc-1rwvhxx-0"
+})([
+ "flex-grow:2;box-sizing:border-box;height:32px;font-size:",
+ ";line-height:",
+ ";color:",
+ ";background:",
+ ";padding-left:8px;padding-right:8px;input&{width:20%;outline:none;border:none;border-radius:",
+ ";&:focus,&:hover{border:none;box-shadow:none;}}&&::placeholder{color:",
+ ";}"
+], (function(e) {
+ return e.theme.legacy.fontSizeH6;
+}), (function(e) {
+ return e.theme.legacy.lineHeightH6;
+}), (function(e) {
+ return e.theme.legacy.colorText;
+}), (function(e) {
+ return e.theme.legacy.colorBackground;
+}), (function(e) {
+ return e.theme.legacy.buttonBorderRadius;
+}), (function(e) {
+ return e.theme.legacy.colorTextDisabled;
+})), ao.div.withConfig({
+ displayName: "WrapperRelative",
+ componentId: "sc-1rwvhxx-1"
+})([
+ "position:relative;padding:2px;border-radius:",
+ ";border:1px solid ",
+ ";&:focus,&:hover{border:1px solid ",
+ ";}"
+], (function(e) {
+ return e.theme.legacy.buttonBorderRadius;
+}), (function(e) {
+ return e.isFocused ? e.theme.legacy.colorBorderFocus : e.theme.legacy.colorBorder;
+}), (function(e) {
+ return e.theme.legacy.colorBorderFocus;
+})), ao.div.withConfig({
+ displayName: "WrapperFlex",
+ componentId: "sc-1rwvhxx-2"
+})(["display:flex;flex-wrap:wrap;align-items:center;"]), ao.div.withConfig({
+ displayName: "SelectedChip",
+ componentId: "sc-1rwvhxx-3"
+})(["margin:2px;"]), ao.div.withConfig({
+ displayName: "AvailableChip",
+ componentId: "sc-1rwvhxx-4"
+})(["margin:8px 2px 0;"]), ao.div.withConfig({
+ displayName: "AvailableChipContainer",
+ componentId: "sc-1rwvhxx-5"
+})(["display:flex;align-items:flex-start;width:100%;height:", ";scroll-behavior:smooth;overflow-x:scroll;&::-webkit-scrollbar{display:none;}-ms-overflow-style:none;scrollbar-width:none;"], NA), ao.div.withConfig({
+ displayName: "Footer",
+ componentId: "sc-1rwvhxx-6"
+})(["position:relative;z-index:0;"]), ao.div.withConfig({
+ displayName: "Arrow",
+ componentId: "sc-1rwvhxx-7"
+})([
+ "z-index:2;position:absolute;top:8px;display:flex;align-items:center;justify-content:center;width:24px;height:32px;background-color:#fff;border-radius:5px;cursor:pointer;> svg{height:24px;width:24px;fill:",
+ ";}&:hover{background-color:#f2f4f5;> svg{fill:",
+ ";}}&:active{background-color:#e6e9eb;}"
+], (function(e) {
+ return e.theme.legacy.colorIcon;
+}), (function(e) {
+ return e.theme.legacy.colorIconActive;
+}))), LA = (ao(MA).withConfig({
+ displayName: "RightArrow",
+ componentId: "sc-1rwvhxx-8"
+})(["right:0;"]), ao(MA).withConfig({
+ displayName: "LeftArrow",
+ componentId: "sc-1rwvhxx-9"
+})(["left:0;"]), ao.div.withConfig({
+ displayName: "Shadow",
+ componentId: "sc-1rwvhxx-10"
+})(["z-index:1;position:absolute;top:0;width:32px;height:", ";"], NA)), DA = (ao(LA).withConfig({
+ displayName: "RightShadow",
+ componentId: "sc-1rwvhxx-11"
+})(["background:linear-gradient(270deg,#ffffff 0%,rgba(255,255,255,0) 100%);right:24px;"]), ao(LA).withConfig({
+ displayName: "LeftShadow",
+ componentId: "sc-1rwvhxx-12"
+})(["background:linear-gradient(90deg,#ffffff 0%,rgba(255,255,255,0) 100%);left:24px;"]), ao.div.withConfig({
+ displayName: "ArrowBackground",
+ componentId: "sc-1rwvhxx-13"
+})(["z-index:1;position:absolute;top:0;background-color:#fff;border-radius:5px 0 0 5px;height:", ";width:26px;"], NA)), RA = (ao(DA).withConfig({
+ displayName: "ArrowBackgroundRight",
+ componentId: "sc-1rwvhxx-14"
+})(["right:0;"]), ao(DA).withConfig({
+ displayName: "ArrowBackgroundLeft",
+ componentId: "sc-1rwvhxx-15"
+})(["left:-1px;"]), ["isOpen"]), zA = "dat-menu-pointer-events-wrapper";
+function $A(e) {
+ var t = e.presetURL, n = e.alwaysVisible;
+ return s.default.createElement(um, {
+ position: "bottom-right",
+ trigger: function(e) {
+ var t = e.isOpen, r = QP(e, RA);
+ return s.default.createElement(BA, { isVisible: n || t }, s.default.createElement(il, qP(qP({}, r), {}, {
+ variant: "clean",
+ isPressed: t,
+ icon: s.default.createElement(hy, null),
+ "aria-label": "More options"
+ })));
+ }
+ }, s.default.createElement(vy.CopyToClipboard, {
+ text: t,
+ onCopy: function() {
+ eg({
+ title: "Link copied to clipboard",
+ variant: "success"
+ });
+ }
+ }, s.default.createElement(um.Item, {
+ icon: s.default.createElement(Jv, null),
+ onClick: function() {
+ return !1;
+ }
+ }, "Copy Link")), s.default.createElement(um.Divider, null), s.default.createElement(um.Item, {
+ icon: s.default.createElement(qv, null),
+ onClick: function() {
+ window.open(t, "_blank");
+ }
+ }, "Open in new tab"), s.default.createElement(um.Divider, null), s.default.createElement(um.Item, {
+ icon: s.default.createElement(ny, null),
+ onClick: function() {
+ var e = function(e) {
+ var s, l, c, u = "([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})", d = "([^/]*)", f = "(.*)/transform", p = {
+ preset: RegExp(`${f}/([a-zA-Z0-9_-]+)/${u}/([a-zA-Z0-9_-]+)*\$${d}`),
+ transform: RegExp(`${f}/${u}/${d}`)
+ }, h = "";
+ if (p.preset.test(e)) {
+ var g = eA(e.match(p.preset), 5);
+ s = g[1], h = g[2], l = g[3], c = g[4];
+ } else if (p.transform.test(e)) {
+ var m = eA(e.match(p.transform), 4);
+ s = m[1], l = m[2], c = m[3];
+ }
+ var v = (h?.length ?? 0) > 0, y = c?.split("?")[0] ?? "", b = c?.split("?")[1] ?? "", w = b.length > 0 ? "&" : "", x = v ? `${h}-${l}` : y, E = h.length ? `${h}/` : "";
+ return `${s}/transform/${E}${l}/${x}?${b}${w}download=true`;
+ }(t);
+ window.location.replace(e);
+ }
+ }, "Download"));
+}
+var BA = ao.div.withConfig({
+ displayName: "ButtonWrapper",
+ componentId: "sc-1xq1wim-0"
+})([
+ "opacity:",
+ ";",
+ ":hover &,&:focus-within{opacity:1;}"
+], (function(e) {
+ return e.isVisible ? "1" : "0";
+}), "." + zA), FA = function(e) {
+ var t = "", n = e.match(/(https:\/\/(.*))\/transform\/(.*)\/(.*)/);
+ return n && n[3] && (t = n[3]), t;
+}, UA = ao.div.withConfig({
+ displayName: "ItemContainer",
+ componentId: "sc-eq72z0-0"
+})([
+ "padding:",
+ " ",
+ ";display:flex;border-radius:",
+ ";align-items:center;background:",
+ ";",
+ ""
+], po.spacing3, po.spacing4, po.spacing3, (function(e) {
+ return e.isSelected && po.gray25;
+}), (function(e) {
+ return e.isDisabled ? "" : `
+ &:hover {
+ background: ${po.gray25};
+ cursor: pointer;
+ }`;
+})), HA = ao.div.withConfig({
+ displayName: "ItemDetails",
+ componentId: "sc-eq72z0-1"
+})(["display:flex;flex-direction:column;flex:1;min-width:0;"]), WA = ao.p.withConfig({
+ displayName: "Title",
+ componentId: "sc-eq72z0-2"
+})([
+ "font-size:",
+ ";line-height:",
+ ";color:",
+ ";padding:0px ",
+ ";margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"
+], po.fontSize100, po.lineHeightText, po.gray800, po.spacing4), VA = ao.p.withConfig({
+ displayName: "Subtitle",
+ componentId: "sc-eq72z0-3"
+})([
+ "color:",
+ ";font-size:",
+ ";line-height:",
+ ";padding:0px ",
+ ";margin:0;"
+], po.gray600, po.fontSize100, po.lineHeightText, po.spacing4), qA = ao.div.withConfig({
+ displayName: "Container",
+ componentId: "sc-eq72z0-4"
+})(["padding:0px ", ";"], po.spacing4), GA = function(e) {
+ var t = e.name, n = e.onSelect, r = e.subtitle, o = e.isMenuHidden, i = o !== void 0 && o, a = e.isSelected, l = e.baseURL, c = eA(l.split("/transform"), 1)[0], f = `/transform/${t === "Base" ? "" : `${t}/`}${FA(l)}/`, p = YA(c, f);
+ return s.default.createElement(UA, {
+ className: zA,
+ onClick: n,
+ isSelected: a
+ }, s.default.createElement(Dh, {
+ variant: "content",
+ imageUrl: p
+ }), s.default.createElement(HA, null, s.default.createElement(WA, null, t), s.default.createElement(VA, null, r)), !i && s.default.createElement($A, {
+ alwaysVisible: !1,
+ presetURL: `${c}${f}`
+ }));
+}, YA = function(e, t) {
+ return `${e}${t}?io=transform:fit,width:80`;
+}, ZA = s.default.memo(GA), XA = s.default.memo(function(e) {
+ var t = e.name, n = e.id, r = e.baseURL, o = e.onPresetSelected, i = e.selectedPreset, a = e.presets, l = e.presetGroupingActive, c = eA((0, s.useState)(!1), 2), u = c[0], d = c[1], f = u ? s.default.createElement(Xo, null) : s.default.createElement(Qo, null), p = a.filter((function(e) {
+ return e.groupId === n;
+ })), h = p.length > 0;
+ return l ? s.default.createElement(s.default.Fragment, null, s.default.createElement(UA, {
+ className: zA,
+ onClick: h ? function() {
+ return d((function(e) {
+ return !e;
+ }));
+ } : void 0,
+ isSelected: !1,
+ isDisabled: !h
+ }, s.default.createElement(Dh, {
+ size: "m",
+ icon: s.default.createElement(xi, null)
+ }), s.default.createElement(HA, null, s.default.createElement(WA, null, t)), h && f), s.default.createElement(qA, null, u && p.map((function(e) {
+ return s.default.createElement(ZA, {
+ baseURL: r,
+ key: e.id,
+ onSelect: function() {
+ return o(e.name);
+ },
+ name: e.name,
+ subtitle: "",
+ isSelected: i === e.name
+ });
+ })))) : null;
+}), JA = function(e) {
+ var t = e.onPresetSelected, n = e.presets, r = e.selectedPreset, o = e.baseURL, i = e.presetGroupingActive, a = n.filter((function(e) {
+ return e.type === "Preset";
+ })).length;
+ return s.default.createElement(qA, null, s.default.createElement(QA, null, "Base transformation"), s.default.createElement(ZA, {
+ baseURL: o,
+ onSelect: function() {
+ return t("");
+ },
+ name: "Base",
+ isMenuHidden: !0,
+ subtitle: "",
+ isSelected: r === ""
+ }), a > 0 && s.default.createElement(QA, null, a, " Presets"), n.sort((function(e, t) {
+ return e.name.localeCompare(t.name);
+ })).map((function(e) {
+ var a, l = e.name === r, c = e.type === "Group";
+ return i && (e == null || (a = e.groupId) == null ? void 0 : a.length) > 0 ? null : c ? s.default.createElement(XA, {
+ key: e.id,
+ name: e.name,
+ id: e.id,
+ baseURL: o,
+ onPresetSelected: t,
+ selectedPreset: r,
+ presets: n,
+ presetGroupingActive: i
+ }) : s.default.createElement(ZA, {
+ baseURL: o,
+ key: e.id,
+ onSelect: function() {
+ return t(e.name);
+ },
+ name: e.name,
+ subtitle: "",
+ isSelected: l
+ });
+ })));
+}, QA = ao.p.withConfig({
+ displayName: "ListGroupTitle",
+ componentId: "sc-yqslcx-0"
+})([
+ "color:",
+ ";font-size:",
+ ";margin-bottom:",
+ ";padding:0 ",
+ ";"
+], po.gray800, po.spacing5, po.spacing5, po.spacing4), eN = s.default.memo(JA);
+function tN(e) {
+ return e ? e[0].toUpperCase() + e.split("").splice(1).join("").toLocaleLowerCase() : "";
+}
+var nN, rN = function(e) {
+ switch (e.type) {
+ case "fill":
+ case "crop": return s.default.createElement(mi, null);
+ case "fit": return s.default.createElement(ei, null);
+ case "extend": return s.default.createElement(Zv, null);
+ case "scale": return s.default.createElement(ty, null);
+ case "rotate": return s.default.createElement(uy, null);
+ case "flip":
+ case "mirror": return s.default.createElement(hi, null);
+ case "border": return s.default.createElement(ri, null);
+ case "background": return s.default.createElement(ti, null);
+ case "trim": return s.default.createElement(vi, null);
+ case "opacity": return s.default.createElement(Oi, null);
+ case "sepia": return s.default.createElement(fi, null);
+ case "contrast": return s.default.createElement(gi, null);
+ case "brightness": return s.default.createElement(ey, null);
+ case "grayscale": return s.default.createElement(dy, null);
+ case "blur": return s.default.createElement(ni, null);
+ case "sharpness": return s.default.createElement(Di, null);
+ case "saturation": return s.default.createElement(oy, null);
+ case "text": return s.default.createElement(Ei, null);
+ case "image": return s.default.createElement(_i, null);
+ case "box": return s.default.createElement(pi, null);
+ case "advanced": return s.default.createElement(Li, null);
+ case "multiple": return s.default.createElement(Kv, null);
+ case "removebg": return s.default.createElement(Ni, null);
+ default: return null;
+ }
+};
+function oN(e) {
+ var t = e.children, n = e.label, r = e.helpText;
+ return s.default.createElement(iN, null, s.default.createElement(Vc.Label, null, n), t, s.default.createElement(Vc.HelperText, null, r));
+}
+(function(e) {
+ e.fill = "fill", e.crop = "crop", e.fit = "fit", e.extend = "extend", e.scale = "scale", e.rotate = "rotate", e.flip = "flip", e.mirror = "mirror", e.border = "border", e.background = "background", e.removebg = "removebg", e.trim = "trim", e.empty = "";
+})(nN ||= {});
+var iN = ao(Vc.Group).withConfig({
+ displayName: "FormGroup",
+ componentId: "sc-uzgeip-0"
+})(["height:fit-content;"]), aN = {
+ transformation: null,
+ group: null,
+ label: "Select a transform"
+}, sN = [
+ {
+ label: "Background",
+ transformation: nN.background,
+ group: "transform"
+ },
+ {
+ label: "Border",
+ transformation: nN.border,
+ group: "transform"
+ },
+ {
+ label: "Crop",
+ transformation: nN.crop,
+ group: "transform",
+ description: "Extracts a region of the specified dimensions from the original image without first resizing it."
+ },
+ {
+ label: "Remove Background",
+ transformation: nN.removebg,
+ group: "transform",
+ description: "We will use the available clipping path information to mask the image, and remove the background."
+ },
+ {
+ label: "Extend",
+ transformation: nN.extend,
+ group: "transform",
+ description: "Resizes the image to fit inside the bounding box specified by the dimensions, maintaining the aspect ratio, and extends the canvas if the resized image does not fill the whole area."
+ },
+ {
+ label: "Fill",
+ transformation: nN.fill,
+ group: "transform",
+ description: "Resizes the image to fill the specified dimensions without distortion. The image may be cropped as a result."
+ },
+ {
+ label: "Fit",
+ transformation: nN.fit,
+ group: "transform",
+ description: "Resizes the image to fit inside the bounding box specified by the dimensions, maintaining the aspect ratio."
+ },
+ {
+ label: "Flip",
+ transformation: nN.flip,
+ secondaryTransformation: nN.mirror,
+ group: "transform"
+ },
+ {
+ label: "Rotate",
+ transformation: nN.rotate,
+ group: "transform"
+ },
+ {
+ label: "Scale",
+ transformation: nN.scale,
+ group: "transform",
+ description: "Resizes the image to the specified dimensions without necessarily retaining the original aspect ratio."
+ },
+ {
+ label: "Trim",
+ transformation: nN.trim,
+ group: "transform",
+ description: "Removes any transparent or white colored areas at the edges of an image."
+ },
+ {
+ label: "Text overlay",
+ transformation: "text",
+ group: "overlay"
+ },
+ {
+ label: "Image overlay",
+ transformation: "image",
+ group: "overlay"
+ },
+ {
+ label: "Color overlay",
+ transformation: "box",
+ group: "overlay"
+ },
+ {
+ label: "Opacity",
+ transformation: "opacity",
+ group: "filter"
+ },
+ {
+ label: "Sepia",
+ transformation: "sepia",
+ group: "filter"
+ },
+ {
+ label: "Contrast",
+ transformation: "contrast",
+ group: "filter"
+ },
+ {
+ label: "Brightness",
+ transformation: "brightness",
+ group: "filter"
+ },
+ {
+ label: "Grayscale",
+ transformation: "grayscale",
+ group: "filter"
+ },
+ {
+ label: "Blur",
+ transformation: "blur",
+ group: "filter"
+ },
+ {
+ label: "Sharpness",
+ transformation: "sharpness",
+ group: "filter"
+ },
+ {
+ label: "Saturation",
+ transformation: "saturation",
+ group: "filter"
+ }
+];
+function lN(e) {
+ var n = sN.find((function(t) {
+ return [t.transformation, t.secondaryTransformation].includes(e.transformation);
+ })) || aN;
+ return s.default.createElement(oN, {
+ label: "Transformation",
+ helpText: n.description ?? ""
+ }, s.default.createElement(fm, {
+ "aria-label": "Transformation",
+ onChange: function(t) {
+ var n = sN.find((function(e) {
+ return [e.transformation, e.secondaryTransformation].includes(t);
+ })).group;
+ e.onChange({
+ group: n,
+ transformation: t
+ });
+ },
+ label: n.label,
+ value: n.transformation,
+ icon: s.default.createElement(rN, { type: n.transformation })
+ }, s.default.createElement(fm.SectionTitle, null, "Transforms"), sN.filter((function(e) {
+ return e.group === "transform";
+ })).map((function(e) {
+ return s.default.createElement(fm.Item, {
+ value: e.transformation,
+ key: e.transformation,
+ icon: s.default.createElement(rN, { type: e.transformation })
+ }, e.label);
+ })), s.default.createElement(fm.Divider, null), s.default.createElement(fm.SectionTitle, null, "Filters"), sN.filter((function(e) {
+ return e.group === "filter";
+ })).map((function(e) {
+ return s.default.createElement(fm.Item, {
+ value: e.transformation,
+ key: e.transformation,
+ icon: s.default.createElement(rN, { type: e.transformation })
+ }, e.label);
+ })), s.default.createElement(fm.Divider, null), s.default.createElement(fm.SectionTitle, null, "Overlay"), sN.filter((function(e) {
+ return e.group === "overlay";
+ })).map((function(e) {
+ return s.default.createElement(fm.Item, {
+ value: e.transformation,
+ key: e.transformation,
+ icon: s.default.createElement(rN, { type: e.transformation })
+ }, e.label);
+ }))));
+}
+var cN, uN = function(e) {
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1e3;
+ if (!function(e) {
+ return typeof e == "number" && !isNaN(e);
+ }(e)) return 0;
+ var r = Math.trunc(Math.abs(e));
+ return r <= t ? r : t;
+}, dN = function(e) {
+ return e && e > 0 ? e.toString() : "";
+}, fN = {
+ type: "Preset",
+ name: "",
+ description: "",
+ content: {
+ format: "",
+ quality: 75,
+ io: []
+ },
+ isValid: !0,
+ groupId: "",
+ redirectPublicLinks: !1
+}, pN = {
+ id: "",
+ transform: null,
+ overlay: null,
+ filter: null
+};
+(function(e) {
+ e[e.transformations = 0] = "transformations", e[e.presets = 1] = "presets";
+})(cN ||= {});
+var hN = "Open Sans", gN = "opensans", mN = {
+ type: "Preset",
+ groupId: "",
+ name: "",
+ content: { io: [] },
+ redirectPublicLinks: !1
+}, vN = {
+ id: "",
+ transform: null,
+ overlay: null,
+ filter: null
+}, yN = function(e) {
+ switch (e) {
+ case "fill":
+ case "fit":
+ case "scale": return qP(qP({}, vN), {}, {
+ height: 1e3,
+ width: 1e3
+ });
+ case "extend": return qP(qP({}, vN), {}, {
+ height: 1e3,
+ width: 1e3,
+ background: "FFFFFF"
+ });
+ case "crop": return qP(qP({}, vN), {}, {
+ height: 1e3,
+ width: 1e3,
+ path: "square"
+ });
+ case "background": return qP(qP({}, vN), {}, { color: "FFFFFF" });
+ case "border": return qP(qP({}, vN), {}, {
+ color: "FFFFFF",
+ width: 1
+ });
+ case "rotate": return qP(qP({}, vN), {}, { angle: 0 });
+ case "opacity": return qP(qP({}, vN), {}, { amount: 100 });
+ case "blur": return qP(qP({}, vN), {}, { radius: 0 });
+ case "text": return qP(qP({}, vN), {}, {
+ content: "",
+ font: hN,
+ size: 64,
+ color: "FFFFFFFF",
+ gravity: "center",
+ padding: 20,
+ angle: 0
+ });
+ case "image": return qP(qP({}, vN), {}, {
+ opacity: 50,
+ angle: 0,
+ gravity: "center"
+ });
+ case "box": return qP(qP({}, vN), {}, {
+ color: "00AAFF",
+ opacity: 50
+ });
+ case "brightness":
+ case "contrast":
+ case "sharpness":
+ case "saturation": return qP(qP({}, vN), {}, { amount: 0 });
+ }
+};
+function bN(e, t) {
+ var n, r = function() {
+ return e.content.io.map((function(e) {
+ return qP({}, e);
+ }));
+ };
+ switch (t.type) {
+ case "init": return function(e) {
+ var t;
+ if (e) {
+ var n = qP({}, e);
+ return n == null || (t = n.content) == null || (t = t.io) == null || t.forEach((function(e) {
+ e.id ||= qc();
+ })), n;
+ }
+ }(t.payload) || fN;
+ case "edit": return qP(qP({ isValid: !0 }, t.payload), {}, { content: qP(qP({}, t.payload.content), {}, { io: t.payload.content.io.map((function(e) {
+ return qP(qP({}, e), {}, { id: qc() });
+ })) }) });
+ case "addTransformation": return qP(qP({}, e), {}, { content: qP(qP({}, e.content), {}, { io: [].concat(tA(r()), [qP(qP({}, vN), {}, {
+ id: t.payload.id,
+ transform: nN.fill
+ })]) }) });
+ case "deleteTransformation": return qP(qP({}, e), {}, { content: qP(qP({}, e.content), {}, { io: e.content.io.filter((function(e) {
+ return e.id !== t.payload.id;
+ })) }) });
+ case "isValid":
+ case "name":
+ case "description": return qP(qP({}, e), {}, (KP(n = {}, t.type, t.payload), KP(n, "content", qP(qP({}, e.content), {}, { io: r() })), n));
+ case "redirectPublicLinksTnPreset": return qP(qP({}, e), {}, { redirectPublicLinks: t.payload });
+ case "format":
+ case "quality": return qP(qP({}, e), {}, { content: qP(qP({}, e.content), {}, KP({ io: r() }, t.type, t.payload)) });
+ case "focuspoint": return qP(qP({}, e), {}, { content: qP(qP({}, e.content), {}, KP({ io: r() }, t.type, t.payload.value)) });
+ case "transformation": return qP(qP({}, e), {}, { content: qP(qP({}, e.content), {}, { io: e.content.io.map((function(e) {
+ return e.id === t.payload.id ? qP(qP({}, yN(t.payload.value)), {}, KP({ id: e.id }, t.payload.group, t.payload.value)) : qP({}, e);
+ })) }) });
+ case "gravity":
+ case "width":
+ case "height":
+ case "x":
+ case "y":
+ case "path":
+ case "content":
+ case "font":
+ case "fontType":
+ case "size":
+ case "color":
+ case "padding":
+ case "angle":
+ case "radius":
+ case "amount":
+ case "softness":
+ case "background":
+ case "blur": return qP(qP({}, e), {}, { content: qP(qP({}, e.content), {}, { io: e.content.io.map((function(e) {
+ return e.id === t.payload.id ? qP(qP({}, e), {}, KP({}, t.type, t.payload.value)) : qP({}, e);
+ })) }) });
+ case "opacity":
+ case "asset": return qP(qP({}, e), {}, { content: qP(qP({}, e.content), {}, { io: e.content.io.map((function(e) {
+ return e.id === t.payload.id ? qP(qP({}, e), {}, KP({}, t.type, t.payload.value.toString())) : qP({}, e);
+ })) }) });
+ case "groupId": return qP(qP({}, e), {}, { groupId: t.payload });
+ default: return e;
+ }
+}
+var wN = s.default.createContext({}), xN = function() {
+ return (0, s.useContext)(wN);
+}, EN = function(e) {
+ var t = e.children, n = eA((0, s.useReducer)(bN, mN), 2), r = n[0], o = n[1], i = (0, s.useMemo)((function() {
+ return {
+ transformationsState: r,
+ transformationsDispatch: o
+ };
+ }), [r, o]);
+ return s.default.createElement(wN.Provider, { value: i }, t);
+};
+function SN(e) {
+ var t = e.id, n = e.height, r = n === void 0 ? 0 : n, o = e.width, i = o === void 0 ? 0 : o, a = e.showLock, l = a !== void 0 && a, c = xN().transformationsDispatch, u = eA((0, s.useState)(!1), 2), d = u[0], f = u[1], p = eA((0, s.useState)(1), 2), h = p[0], g = p[1], m = s.default.createElement(kN, null, d ? s.default.createElement(Yv, null) : s.default.createElement(Gv, null)), v = dN(i), y = dN(r);
+ return s.default.createElement(oN, { label: "Dimensions" }, s.default.createElement(CN, null, s.default.createElement(_N, null, s.default.createElement(Gl, {
+ "aria-label": "Dimensions width",
+ placeholder: "1000",
+ icon: s.default.createElement(TN, null, "W"),
+ value: v,
+ onChange: function(e) {
+ var o = uN(parseInt(e, 10), 9e3);
+ c({
+ type: "width",
+ payload: {
+ value: o,
+ id: t
+ }
+ }), d ? c({
+ type: "height",
+ payload: {
+ value: o / h,
+ id: t
+ }
+ }) : g(r && o ? o / r : 1);
+ },
+ iconRight: s.default.createElement("span", null, "px")
+ })), l ? s.default.createElement(il, {
+ variant: "clean",
+ onClick: function() {
+ f((function(e) {
+ return !e;
+ }));
+ },
+ icon: m,
+ title: "Lock ratio"
+ }) : s.default.createElement(IN, null), s.default.createElement(_N, null, s.default.createElement(Gl, {
+ "aria-label": "Dimensions height",
+ placeholder: "1000",
+ icon: s.default.createElement(TN, null, "H"),
+ value: y,
+ onChange: function(e) {
+ var r = uN(parseInt(e, 10), 9e3);
+ c({
+ type: "height",
+ payload: {
+ value: r,
+ id: t
+ }
+ }), d ? c({
+ type: "width",
+ payload: {
+ value: r * h,
+ id: t
+ }
+ }) : g(i && r ? i / r : 1);
+ },
+ iconRight: s.default.createElement("span", null, "px")
+ }))));
+}
+var CN = ao.div.withConfig({
+ displayName: "SpaceBetween",
+ componentId: "sc-zla2g2-0"
+})(["display:flex;align-items:center;justify-content:space-between;"]), kN = ao.div.withConfig({
+ displayName: "IconContainer",
+ componentId: "sc-zla2g2-1"
+})(["color:", ";"], po.gray400a), _N = ao.div.withConfig({
+ displayName: "FlexInput",
+ componentId: "sc-zla2g2-2"
+})(["min-width:0;"]), TN = ao.div.withConfig({
+ displayName: "IconText",
+ componentId: "sc-zla2g2-3"
+})(["display:flex;justify-content:center;width:", ";"], po.spacing6), IN = ao.div.withConfig({
+ displayName: "Space",
+ componentId: "sc-zla2g2-4"
+})(["width:", ";"], po.spacing4);
+function ON(e) {
+ var t = e.onChange, n = e.value, r = n === void 0 ? 0 : n, o = e.label, i = e.min, a = e.max;
+ return s.default.createElement(oN, { label: o }, s.default.createElement(Pm, {
+ value: r,
+ onChange: t,
+ min: i,
+ max: a,
+ inputPosition: "right"
+ }));
+}
+function jN(e) {
+ var t = e.io, n = xN().transformationsDispatch;
+ return s.default.createElement(oN, { label: "Angle" }, s.default.createElement(Gl, {
+ type: "number",
+ placeholder: "0",
+ onChange: function(e) {
+ return n({
+ type: "angle",
+ payload: {
+ value: parseInt(e, 10),
+ id: t.id
+ }
+ });
+ },
+ value: t.angle ? t.angle.toString() : "",
+ icon: s.default.createElement(Zo, null),
+ iconRight: s.default.createElement("span", null, "°")
+ }));
+}
+var PN = [
+ {
+ value: "top",
+ label: "Top"
+ },
+ {
+ value: "center",
+ label: "Center"
+ },
+ {
+ value: "bottom",
+ label: "Bottom"
+ }
+], AN = [
+ {
+ value: "left",
+ label: "Left"
+ },
+ {
+ value: "center",
+ label: "Center"
+ },
+ {
+ value: "right",
+ label: "Right"
+ }
+];
+function NN(e) {
+ var t = e.label, n = e.gravity, r = e.onChange, o = AN.findIndex((function(e) {
+ return e.value === function(e) {
+ return [
+ "topleft",
+ "left",
+ "bottomleft"
+ ].includes(e) ? "left" : [
+ "topright",
+ "right",
+ "bottomright"
+ ].includes(e) ? "right" : "center";
+ }(n);
+ })), i = PN.findIndex((function(e) {
+ return e.value === function(e) {
+ return [
+ "topleft",
+ "top",
+ "topright"
+ ].includes(e) ? "top" : [
+ "bottomleft",
+ "bottom",
+ "bottomright"
+ ].includes(e) ? "bottom" : "center";
+ }(n);
+ })), a = eA((0, s.useState)(AN[o]), 2), l = a[0], c = a[1], u = eA((0, s.useState)(PN[i]), 2), d = u[0], f = u[1], p = function(e) {
+ switch (r(e), e) {
+ case "topleft":
+ f(PN.find((function(e) {
+ return e.value === "top";
+ }))), c(AN.find((function(e) {
+ return e.value === "left";
+ })));
+ break;
+ case "top":
+ f(PN.find((function(e) {
+ return e.value === "top";
+ }))), c(AN.find((function(e) {
+ return e.value === "center";
+ })));
+ break;
+ case "topright":
+ f(PN.find((function(e) {
+ return e.value === "top";
+ }))), c(AN.find((function(e) {
+ return e.value === "right";
+ })));
+ break;
+ case "left":
+ f(PN.find((function(e) {
+ return e.value === "center";
+ }))), c(AN.find((function(e) {
+ return e.value === "left";
+ })));
+ break;
+ case "center":
+ f(PN.find((function(e) {
+ return e.value === "center";
+ }))), c(AN.find((function(e) {
+ return e.value === "center";
+ })));
+ break;
+ case "right":
+ f(PN.find((function(e) {
+ return e.value === "center";
+ }))), c(AN.find((function(e) {
+ return e.value === "right";
+ })));
+ break;
+ case "bottomleft":
+ f(PN.find((function(e) {
+ return e.value === "bottom";
+ }))), c(AN.find((function(e) {
+ return e.value === "left";
+ })));
+ break;
+ case "bottom":
+ f(PN.find((function(e) {
+ return e.value === "bottom";
+ }))), c(AN.find((function(e) {
+ return e.value === "center";
+ })));
+ break;
+ case "bottomright": f(PN.find((function(e) {
+ return e.value === "bottom";
+ }))), c(AN.find((function(e) {
+ return e.value === "right";
+ })));
+ }
+ };
+ return s.default.createElement(oN, { label: t }, s.default.createElement(Bs, null, s.default.createElement(RN, null, s.default.createElement($N, {
+ alignItems: "center",
+ justifyContent: "space-between",
+ wrap: "wrap"
+ }, s.default.createElement(BN, {
+ isSelected: n === "topleft",
+ onClick: function() {
+ return p("topleft");
+ }
+ }), s.default.createElement(BN, {
+ isSelected: n === "top",
+ onClick: function() {
+ return p("top");
+ }
+ }), s.default.createElement(BN, {
+ isSelected: n === "topright",
+ onClick: function() {
+ return p("topright");
+ }
+ }), s.default.createElement(BN, {
+ isSelected: n === "left",
+ onClick: function() {
+ return p("left");
+ }
+ }), s.default.createElement(BN, {
+ isSelected: n === "center",
+ onClick: function() {
+ return p("center");
+ }
+ }), s.default.createElement(BN, {
+ isSelected: n === "right",
+ onClick: function() {
+ return p("right");
+ }
+ }), s.default.createElement(BN, {
+ isSelected: n === "bottomleft",
+ onClick: function() {
+ return p("bottomleft");
+ }
+ }), s.default.createElement(BN, {
+ isSelected: n === "bottom",
+ onClick: function() {
+ return p("bottom");
+ }
+ }), s.default.createElement(BN, {
+ isSelected: n === "bottomright",
+ onClick: function() {
+ return p("bottomright");
+ }
+ }))), s.default.createElement(zN, {
+ direction: "column",
+ justifyContent: "space-between"
+ }, s.default.createElement(fm, {
+ "aria-label": "Horizontal position",
+ onChange: function(e) {
+ switch (c(AN.find((function(t) {
+ return t.value === e;
+ }))), e) {
+ case "left":
+ d.value === "top" && r("topleft"), d.value === "center" && r("left"), d.value === "bottom" && r("bottomleft");
+ break;
+ case "center":
+ d.value === "top" && r("top"), d.value === "center" && r("center"), d.value === "bottom" && r("bottom");
+ break;
+ case "right": d.value === "top" && r("topright"), d.value === "center" && r("right"), d.value === "bottom" && r("bottomright");
+ }
+ },
+ value: l.value,
+ label: l.label,
+ icon: s.default.createElement(Ci, null)
+ }, AN.map((function(e) {
+ return s.default.createElement(fm.Item, {
+ value: e.value,
+ key: e.value
+ }, e.label);
+ }))), s.default.createElement(fm, {
+ "aria-label": "Vertical position",
+ onChange: function(e) {
+ switch (f(PN.find((function(t) {
+ return t.value === e;
+ }))), e) {
+ case "top":
+ l.value === "left" && r("topleft"), l.value === "center" && r("top"), l.value === "right" && r("topright");
+ break;
+ case "center":
+ l.value === "left" && r("left"), l.value === "center" && r("center"), l.value === "right" && r("right");
+ break;
+ case "bottom": l.value === "left" && r("bottomleft"), l.value === "center" && r("bottom"), l.value === "right" && r("bottomright");
+ }
+ },
+ value: d.value,
+ label: d.label,
+ icon: s.default.createElement(Ui, null)
+ }, PN.map((function(e) {
+ return s.default.createElement(fm.Item, {
+ value: e.value,
+ key: e.value
+ }, e.label);
+ }))))));
+}
+var DN, RN = ao.div.withConfig({
+ displayName: "SquareFlexContainer",
+ componentId: "sc-ci11hg-0"
+})(["width:92px;margin-right:16px;"]), zN = ao(Bs).withConfig({
+ displayName: "DropdownFlex",
+ componentId: "sc-ci11hg-1"
+})(["height:92px;"]), $N = ao(Bs).withConfig({
+ displayName: "SquareFlex",
+ componentId: "sc-ci11hg-2"
+})([
+ "width:92px;height:92px;padding:5px;margin-right:",
+ ";background:",
+ ";border:1px solid ",
+ ";box-sizing:border-box;border-radius:",
+ ";"
+], po.spacing5, po.gray25, po.gray100a, po.radiusMedium), BN = ao.div.withConfig({
+ displayName: "Spot",
+ componentId: "sc-ci11hg-3"
+})([
+ "width:24px;height:24px;background:",
+ ";border:1px solid ",
+ ";box-sizing:border-box;border-radius:",
+ ";&:hover{background-color:",
+ ";cursor:pointer;}",
+ ""
+], po.gray10, po.gray100a, po.radiusSmall, po.gray25a, (function(e) {
+ return e.isSelected && ro([
+ "border:2px solid ",
+ ";background:",
+ ";"
+ ], po.blue500, po.blue100);
+}));
+function FN(e) {
+ if (e.length === 2) return Math.floor(Math.round(parseInt(e, 16) / 255 * 100));
+}
+function UN(e) {
+ var n = e.io, r = e.ioColorProp, o = r === void 0 ? "color" : r, i = e.label, a = i === void 0 ? "Color" : i, l = e.dispatchType, c = l === void 0 ? "color" : l, u = xN().transformationsDispatch;
+ function d() {
+ return n[o].toString() ?? "";
+ }
+ return s.default.createElement(oN, { label: a }, s.default.createElement(Bs, null, s.default.createElement(_v, {
+ onChange: function(e) {
+ var t, r, o = e.color, i = e.opacity, a = Math.min(100, i);
+ u({
+ type: c,
+ payload: {
+ value: `${o[0] === "#" ? o.substring(1) : o}${t = a.toString(), (r = Math.round(255 * parseInt(t, 10) / 100).toString(16).toUpperCase()).length < 2 ? `0${r}` : r}`.toUpperCase(),
+ id: n.id
+ }
+ });
+ },
+ value: {
+ color: `#${d().substring(0, 6).toUpperCase()}`,
+ opacity: FN(d().substring(6)) ?? 100
+ },
+ trigger: function(e) {
+ var r = XP({}, (JP(e), e));
+ return s.default.createElement(Gl, {
+ maxLength: 8,
+ value: d()?.toUpperCase(),
+ prefix: "#",
+ isInvalid: !(/* @__PURE__ */ RegExp("^[a-fA-F0-9]{8}$|^[a-fA-F0-9]{6}$|^[a-fA-F0-9]{3}$")).test(n[o].toString()),
+ icon: s.default.createElement(Ul, qP(qP({ label: "Color Thumbnail" }, r), {}, {
+ onClick: function(e) {
+ e.stopPropagation(), r.onClick();
+ },
+ icon: s.default.createElement(Dh, {
+ variant: "content",
+ backgroundColor: `#${d()}`,
+ shape: "circle",
+ size: "xs"
+ })
+ })),
+ onChange: function(e) {
+ u({
+ type: c,
+ payload: {
+ value: e,
+ id: n.id
+ }
+ });
+ }
+ });
+ }
+ })));
+}
+var HN = function(e) {
+ return e.data;
+}, WN = function(e) {
+ if (e.response) {
+ var t = e.response.data;
+ throw t != null && t.error ? t.error : t;
+ }
+ throw e.request ? Error("Server is not responding, please try again") : e.message;
+}, VN = document.querySelector("meta[name=\"x-csrf-token\"]")?.getAttribute("content"), qN = {
+ "cache-control": "no-cache",
+ pragma: "no-cache",
+ "x-csrf-token": window?.csrf || ((DN = window) == null || (DN = DN.Bynder) == null ? void 0 : DN.csrf_token) || VN
+}, GN = Pw.create({ headers: qN });
+function YN(e, t) {
+ return GN.get(e, t).then(HN).catch(WN);
+}
+var ZN = function(e, t, n) {
+ return YN("/v7/fonts/", { params: qP(qP({}, e ? { pageSize: e } : null), n ? { searchTerm: n } : null) });
+}, KN = function(e) {
+ var t = e.fontFamilyLabel, n = e.defaultFontFamilyLabel, r = e.fontFamily, o = e.setFontFamily, i = e.availableFonts, a = e.availableUploadedFonts, l = e.defaultFont, c = e.isDisabled, u = e.actionButton, d = u === void 0 ? null : u, f = eA((0, s.useState)(""), 2), p = f[0], h = f[1], g = function(e) {
+ var t = e.searchFont, n = e.availableFonts, r = e.availableUploadedFonts, o = e.defaultFont, i = eA((0, s.useState)(n), 2), a = i[0], l = i[1], c = eA((0, s.useState)(r), 2), u = c[0], d = c[1], f = eA((0, s.useState)(!1), 2), p = f[0], h = f[1], g = eA((0, s.useState)(!1), 2), m = g[0], v = g[1];
+ (0, s.useEffect)((function() {
+ l(n), d(r);
+ }), [n, r]);
+ var y = zv((function(e) {
+ h(!0), ZN(20, 0, e).then((function(t) {
+ var n = t.fonts;
+ d(e ? u.filter((function(t) {
+ return t.searchable_font_family_name.includes(e);
+ })) : r), l(e ? n : [o].concat(tA(n)));
+ })).catch((function(e) {
+ eg({
+ title: e.toString(),
+ variant: "error"
+ }), console.error("error=", e);
+ })).finally((function() {
+ h(!1);
+ }));
+ }), 500);
+ return (0, s.useEffect)((function() {
+ t.length > 0 && y(t), m && (y(t), v(!1));
+ }), [
+ m,
+ t,
+ y
+ ]), {
+ fontResults: a,
+ fontUploadedResults: u,
+ isLoading: p,
+ setClearFont: v
+ };
+ }({
+ searchFont: p,
+ availableFonts: i,
+ availableUploadedFonts: a,
+ defaultFont: l
+ }), m = g.fontResults, v = g.fontUploadedResults, y = g.isLoading, b = g.setClearFont, w = (0, s.useMemo)((function() {
+ return qc();
+ }), []);
+ function x() {
+ h(""), b(!0);
+ }
+ var E = function(e) {
+ return e.length > 0 ? e.map((function(e) {
+ return s.default.createElement(fm.Item, {
+ key: e.font_id,
+ value: e.font_id
+ }, e.font_family_name);
+ })) : s.default.createElement(fm.Text, null, "No Results");
+ }, S = function() {
+ return s.default.createElement(fm.Text, null, "Loading");
+ };
+ return s.default.createElement(Vc.Group, null, s.default.createElement(Vc.Label, { id: w }, t), s.default.createElement(XN, { condition: !!d }, s.default.createElement(fm, {
+ "aria-labelledby": w,
+ value: r.font_id,
+ onChange: function(e) {
+ var t = v.find((function(t) {
+ return t.font_id === e;
+ }));
+ if (t) o(t);
+ else {
+ var n = m.find((function(t) {
+ return t.font_id === e;
+ }));
+ n && o(n);
+ }
+ },
+ label: r.font_family_name || n,
+ isDisabled: c
+ }, s.default.createElement(fm.SearchInput, {
+ value: p,
+ onChange: h,
+ onBlur: x,
+ onKeyDown: function(e) {
+ e.key === "Backspace" && p.length <= 1 && x();
+ },
+ placeholder: "Search",
+ "aria-label": "Search Options"
+ }), s.default.createElement(fm.SectionTitle, null, "Uploaded Fonts"), y ? S() : E(v), s.default.createElement(fm.Divider, null), s.default.createElement(fm.SectionTitle, null, "Available Fonts"), y ? S() : E(m)), d));
+}, XN = function(e) {
+ var t = e.condition, n = e.children;
+ return t ? s.default.createElement(JN, null, n) : n;
+}, JN = ao.div.withConfig({
+ displayName: "Wrapper",
+ componentId: "sc-swectq-0"
+})(["display:flex;gap:", ";> div{flex:1 1 auto;}"], po.spacing3), QN = ["Regular"];
+function eM(e) {
+ var a = e.io, l = xN().transformationsDispatch, c = eA((0, s.useState)(), 2), u = c[0], d = c[1], f = eA((0, s.useState)([]), 2), p = f[0], h = f[1], g = eA((0, s.useState)([]), 2), m = g[0], v = g[1];
+ (0, s.useEffect)((function() {
+ Promise.all([ZN(20), YN("/v7/fonts/portal/")]).then((function(e) {
+ var t = eA(e, 2), n = t[0], r = t[1];
+ v(n.fonts), h(r);
+ }));
+ }), []);
+ var y = {
+ font_id: a.font ?? gN,
+ font_family_name: a.font ?? hN,
+ variants: [],
+ searchable_font_family_name: a.font ?? gN
+ };
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(oN, { label: "Text" }, s.default.createElement(Nv, {
+ placeholder: "Add Text Here",
+ value: a.content,
+ onChange: function(e) {
+ return l({
+ type: "content",
+ payload: {
+ value: e,
+ id: a.id
+ }
+ });
+ }
+ })), s.default.createElement(oN, { label: "Font" }, s.default.createElement(KN, {
+ fontFamilyLabel: "",
+ defaultFontFamilyLabel: "",
+ fontFamily: u ?? y,
+ setFontFamily: function(e) {
+ d(e), l({
+ type: "font",
+ payload: {
+ value: e.font_family_name,
+ id: a.id
+ }
+ });
+ },
+ availableFonts: m,
+ availableUploadedFonts: p,
+ defaultFont: y
+ })), s.default.createElement(oN, { label: "" }, s.default.createElement(Bs, null, s.default.createElement(tM, null, s.default.createElement(fm, {
+ "aria-label": "Font style",
+ value: a.fontType,
+ label: a.fontType,
+ onChange: function(e) {
+ return l({
+ type: "fontType",
+ payload: {
+ value: e,
+ id: a.id
+ }
+ });
+ },
+ isDisabled: !0
+ }, QN.map((function(e) {
+ return s.default.createElement(fm.Item, {
+ value: e,
+ key: e
+ }, e);
+ })))), s.default.createElement(nM, null, s.default.createElement(Gl, {
+ type: "number",
+ value: a.size?.toString(),
+ iconRight: s.default.createElement("span", null, "px"),
+ onChange: function(e) {
+ return l({
+ type: "size",
+ payload: {
+ value: parseInt(e, 10),
+ id: a.id
+ }
+ });
+ }
+ })))), s.default.createElement(UN, {
+ label: "Text color",
+ io: a
+ }), s.default.createElement(NN, {
+ label: "Position",
+ gravity: a.gravity,
+ onChange: function(e) {
+ return l({
+ type: "gravity",
+ payload: {
+ value: e,
+ id: a.id
+ }
+ });
+ }
+ }), s.default.createElement(oN, { label: "Padding" }, s.default.createElement(Gl, {
+ type: "number",
+ value: a.padding?.toString(),
+ iconRight: s.default.createElement("span", null, "px"),
+ onChange: function(e) {
+ return l({
+ type: "padding",
+ payload: {
+ value: parseInt(e, 10),
+ id: a.id
+ }
+ });
+ }
+ })), s.default.createElement(jN, { io: a }));
+}
+var tM = ao.div.withConfig({
+ displayName: "FontTypeContainer",
+ componentId: "sc-1w95sy3-0"
+})(["width:210px;margin-right:", ";"], po.spacing4), nM = ao.div.withConfig({
+ displayName: "FontSizeContainer",
+ componentId: "sc-1w95sy3-1"
+})(["width:76px;"]);
+function rM(e) {
+ var t = e.io;
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(SN, {
+ width: t.width,
+ height: t.height,
+ id: t.id
+ }), s.default.createElement(UN, {
+ io: t,
+ label: "Background",
+ dispatchType: "background",
+ ioColorProp: "background"
+ }));
+}
+var oM = [{
+ label: "Rectangle",
+ path: "square",
+ icon: s.default.createElement(ay, null)
+}, {
+ label: "Ellipse",
+ path: "circle",
+ icon: s.default.createElement(ly, null)
+}], iM = [{
+ label: "Clipping Path",
+ path: "clippingpath",
+ icon: s.default.createElement(Pi, null)
+}];
+function aM(e) {
+ var n = e.onChange, r = e.shape, o = oM.find((function(e) {
+ return e.path === r;
+ })) ?? iM.find((function(e) {
+ return e.path === r;
+ }));
+ return s.default.createElement(oN, { label: "Path" }, s.default.createElement(fm, qP({
+ "aria-label": "Path",
+ onChange: n,
+ value: r
+ }, o), oM.map((function(e) {
+ return s.default.createElement(fm.Item, {
+ value: e.path,
+ key: e.path,
+ icon: e.icon
+ }, e.label);
+ })), s.default.createElement(fm.Divider, null), iM.map((function(e) {
+ return s.default.createElement(fm.Item, {
+ value: e.path,
+ key: e.path,
+ icon: e.icon
+ }, e.label);
+ }))));
+}
+function sM(e) {
+ var t = e.onChange, n = eA(e.focusPoint || [], 2), r = n[0], o = n[1], i = function(e, n) {
+ var i = typeof e == "string" ? parseFloat(e) : e, a = i >= 100 ? 100 : i;
+ t([n === "x" ? a : r, n === "y" ? a : o]);
+ };
+ return s.default.createElement(uM, {
+ justifyContent: "space-between",
+ gap: "3",
+ alignItems: "center"
+ }, s.default.createElement(cM, null, s.default.createElement(Gl, {
+ "aria-label": "Focus point position X",
+ placeholder: "50",
+ type: "number",
+ value: r?.toString() || "",
+ icon: s.default.createElement(lM, null, "X"),
+ iconRight: s.default.createElement("span", null, "%"),
+ onChange: function(e) {
+ return i(e, "x");
+ }
+ })), s.default.createElement(lM, null, "×"), s.default.createElement(cM, null, s.default.createElement(Gl, {
+ "aria-label": "Focus point position Y",
+ placeholder: "50",
+ type: "number",
+ value: o?.toString() || "",
+ icon: s.default.createElement(lM, null, "Y"),
+ iconRight: s.default.createElement("span", null, "%"),
+ onChange: function(e) {
+ return i(e, "y");
+ }
+ })));
+}
+var lM = ao.div.withConfig({
+ displayName: "IconText",
+ componentId: "sc-19e3sbn-0"
+})(["display:flex;justify-content:center;width:24px;"]), cM = ao.div.withConfig({
+ displayName: "FlexInput",
+ componentId: "sc-19e3sbn-1"
+})(["min-width:0;"]), uM = ao(Bs).withConfig({
+ displayName: "StyledFlex",
+ componentId: "sc-19e3sbn-2"
+})(["margin-bottom:", ";"], po.spacing2), dM = [
+ {
+ label: "Focus point",
+ focus: "point",
+ icon: s.default.createElement(iy, null)
+ },
+ {
+ label: "Override focus point",
+ focus: "override",
+ icon: s.default.createElement(sy, null)
+ },
+ {
+ label: "Gravity",
+ focus: "gravity",
+ icon: s.default.createElement(Aw, null)
+ }
+];
+function fM(e) {
+ var t = e.type, n = e.gravity, r = e.onChangeGravity, o = e.onChangeFocus, i = e.focusPoint, a = e.showEditor, l = e.setShowEditor, c = eA((0, s.useState)(!1), 2), u = c[0], d = c[1], f = eA((0, s.useState)(!1), 2), p = f[0], h = f[1], g = eA((0, s.useState)(null), 2), m = g[0], v = g[1];
+ (0, s.useEffect)((function() {
+ var e, t, r;
+ m || (i ? (r = dM.find((function(e) {
+ return e.focus === "override";
+ })), v(r), h(!0)) : n ? (t = dM.find((function(e) {
+ return e.focus === "gravity";
+ })), v(t)) : (e = dM.find((function(e) {
+ return e.focus === "point";
+ })), v(e)));
+ }), [
+ i,
+ n,
+ m
+ ]);
+ var y = {
+ gravity: "Select the direction from where the transformation is being applied.",
+ override: "Select a new focus point by editing the percentages below or directly clicking on the asset with the editor.",
+ point: "Uses the predefined focus point of the asset."
+ };
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(oN, {
+ label: "Focus",
+ helpText: y[m?.focus] || y.point
+ }, s.default.createElement(fm, qP(qP({
+ "aria-label": "Focus",
+ onChange: function(e) {
+ var t = e === "gravity", n = e === "override", i = e === "point";
+ l && l({ show: !1 }), v(dM.find((function(t) {
+ return t.focus === e;
+ }))), d(t), h(n), !n && l && l({ show: !1 }), i && o(void 0), t ? (r("center"), o(void 0)) : r(null);
+ }
+ }, m), {}, { value: m?.focus }), dM.map((function(e) {
+ return s.default.createElement(s.default.Fragment, { key: e.focus }, e.focus === "gravity" ? s.default.createElement(fm.Divider, null) : null, s.default.createElement(fm.Item, {
+ value: e.focus,
+ icon: e.icon
+ }, e.label));
+ })))), u && s.default.createElement(NN, {
+ label: "Gravity",
+ gravity: n,
+ onChange: r
+ }), p && s.default.createElement(s.default.Fragment, null, s.default.createElement(sM, {
+ onChange: o,
+ focusPoint: i
+ }), l && s.default.createElement(pM, {
+ isChecked: a.type === t && a.show,
+ isDisabled: a.type && a.type !== t,
+ onChange: function() {
+ a.type && a.type !== t || l({
+ type: a.show ? void 0 : t,
+ show: !a.show
+ });
+ }
+ }, s.default.createElement(Bs, {
+ gap: "4",
+ direction: "row",
+ alignItems: "center"
+ }, s.default.createElement(cy, null), s.default.createElement("span", null, "Show real time editor")))));
+}
+var pM = ao(Dd).withConfig({
+ displayName: "StyledSwitch",
+ componentId: "sc-18kzar2-0"
+})(["margin-top:", ";"], po.spacing5);
+function hM(e) {
+ var t = e.io, n = e.focuspoint, r = e.setShowEditor, o = e.showEditor, i = xN().transformationsDispatch;
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(aM, {
+ shape: t.path,
+ onChange: function(e) {
+ return i({
+ type: "path",
+ payload: {
+ value: e,
+ id: t.id
+ }
+ });
+ }
+ }), t.path !== "clippingpath" && s.default.createElement(s.default.Fragment, null, s.default.createElement(SN, {
+ width: t.width,
+ height: t.height,
+ id: t.id
+ }), s.default.createElement(fM, {
+ onChangeGravity: function(e) {
+ i({
+ type: "gravity",
+ payload: {
+ value: e,
+ id: t.id
+ }
+ });
+ },
+ onChangeFocus: function(e) {
+ i({
+ type: "focuspoint",
+ payload: {
+ value: e,
+ id: t.id
+ }
+ });
+ },
+ gravity: t.gravity,
+ focusPoint: n,
+ showEditor: o,
+ setShowEditor: r,
+ type: "crop"
+ })), t.path === "circle" && s.default.createElement(ON, {
+ label: "Blur",
+ value: t.blur,
+ min: 0,
+ max: 100,
+ onChange: function(e) {
+ return i({
+ type: "blur",
+ payload: {
+ value: e,
+ id: t.id
+ }
+ });
+ }
+ }));
+}
+function gM(e) {
+ var t = e.io, n = xN().transformationsDispatch, r = dN(t.width);
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(UN, { io: t }), s.default.createElement(oN, { label: "Border" }, s.default.createElement(Gl, {
+ placeholder: "1",
+ onChange: function(e) {
+ n({
+ type: "width",
+ payload: {
+ value: uN(parseInt(e, 10), 500),
+ id: t.id
+ }
+ });
+ },
+ value: r,
+ icon: s.default.createElement(oi, null),
+ iconRight: s.default.createElement("span", null, "px")
+ })));
+}
+function mM(e) {
+ var t = e.io, n = e.focusPoint, r = e.setShowEditor, o = e.showEditor, i = xN().transformationsDispatch;
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(SN, {
+ width: t.width,
+ height: t.height,
+ id: t.id
+ }), s.default.createElement(fM, {
+ onChangeGravity: function(e) {
+ i({
+ type: "gravity",
+ payload: {
+ value: e,
+ id: t.id
+ }
+ });
+ },
+ onChangeFocus: function(e) {
+ i({
+ type: "focuspoint",
+ payload: {
+ value: e,
+ id: t.id
+ }
+ });
+ },
+ gravity: t.gravity,
+ focusPoint: n,
+ setShowEditor: r,
+ showEditor: o,
+ type: "fill"
+ }));
+}
+function vM(e) {
+ var t = e.io, n = xN().transformationsDispatch;
+ return s.default.createElement(ON, {
+ label: tN(t.filter),
+ min: -100,
+ max: 100,
+ value: t.amount,
+ onChange: function(e) {
+ return n({
+ type: "amount",
+ payload: {
+ value: e,
+ id: t.id
+ }
+ });
+ }
+ });
+}
+function yM(e) {
+ var t = e.io, n = xN().transformationsDispatch;
+ return s.default.createElement(ON, {
+ label: "Blur",
+ min: 0,
+ max: 100,
+ value: t.radius,
+ onChange: function(e) {
+ return n({
+ type: "radius",
+ payload: {
+ value: e,
+ id: t.id
+ }
+ });
+ }
+ });
+}
+function bM(e) {
+ var t = e.io;
+ return s.default.createElement(UN, { io: t });
+}
+function wM(e) {
+ var t = e.io, n = xN().transformationsDispatch, r = dN(t.padding);
+ return s.default.createElement(oN, { label: "Padding" }, s.default.createElement(Bs, null, s.default.createElement(EM, null, s.default.createElement(Gl, {
+ placeholder: "1",
+ onChange: function(e) {
+ n({
+ type: "padding",
+ payload: {
+ value: uN(parseInt(e, 10), 3e3),
+ id: t.id
+ }
+ });
+ },
+ value: r,
+ icon: s.default.createElement(oi, null),
+ iconRight: s.default.createElement("span", null, "px")
+ }))));
+}
+var xM, EM = ao.div.withConfig({
+ displayName: "FlexInputColor",
+ componentId: "sc-13pc6c3-0"
+})(["min-width:0;margin-right:", ";"], po.spacing4);
+function SM(e) {
+ var t = e.io, n = xN().transformationsDispatch, r = _M?.[t.transform];
+ return s.default.createElement(oN, { label: "Flip" }, s.default.createElement(CM, null, s.default.createElement(fm, {
+ "aria-label": "Flip",
+ value: t.transform,
+ onChange: function(e) {
+ n({
+ type: "transformation",
+ payload: {
+ group: "transform",
+ value: e,
+ id: t.id
+ }
+ });
+ },
+ label: r.label,
+ icon: r.icon
+ }, [nN.mirror, nN.flip].map((function(e) {
+ return s.default.createElement(fm.Item, {
+ value: e,
+ key: e,
+ icon: _M[e].icon
+ }, _M[e].label);
+ })))));
+}
+var CM = ao.div.withConfig({
+ displayName: "FlexInputColor",
+ componentId: "sc-keyng0-0"
+})(["min-width:88px;margin-right:", ";"], po.spacing4), kM = ao(my).withConfig({
+ displayName: "IconHorizontal",
+ componentId: "sc-keyng0-1"
+})(["transform:rotate(90deg);"]), _M = (KP(xM = {}, nN.flip, {
+ label: "Flip vertically",
+ value: nN.flip,
+ icon: s.default.createElement(my, null)
+}), KP(xM, nN.mirror, {
+ label: "Flip horizontally",
+ value: nN.mirror,
+ icon: s.default.createElement(kM, null)
+}), xM), TM = function(e) {
+ var t = e.toLowerCase().split("-");
+ return t.splice(3, 1, t[3].substring(0, 4), t[3].substring(4)), t.join("-");
+}, IM = function(e) {
+ return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e);
+};
+function OM(e) {
+ var t = e.io, n = xN().transformationsDispatch, r = eA((0, s.useState)(!1), 2), o = r[0], i = r[1], a = eA((0, s.useState)(!1), 2), l = a[0], c = a[1], u = eA((0, s.useState)({
+ name: "",
+ thumbnail: "",
+ coldfusionUUID: ""
+ }), 2), d = u[0], f = u[1], p = eA((0, s.useState)(void 0), 2), h = p[0], g = p[1], m = t.asset && t.asset.length && d.thumbnail === "", v = function() {
+ var e = eA((0, s.useState)(""), 2), t = e[0], n = e[1], r = function() {
+ var e = ZP(GP().mark((function e() {
+ var t;
+ return GP().wrap((function(e) {
+ for (;;) switch (e.prev = e.next) {
+ case 0: return e.next = 2, (0, ll.getJWT)();
+ case 2: t = e.sent, n(t);
+ case 4:
+ case "end": return e.stop();
+ }
+ }), e);
+ })));
+ return function() {
+ return e.apply(this, arguments);
+ };
+ }();
+ return (0, s.useEffect)((function() {
+ r();
+ }), []), function() {
+ return t;
+ };
+ }();
+ return (0, s.useEffect)((function() {
+ var e, n, r;
+ m && (e = t.asset, n = function(e) {
+ if (!IM(e)) throw Error(`The value is not a UUID: ${e}`);
+ return `${e.substring(0, 23)}${e.substring(24)}`.toUpperCase();
+ }(e), c(!0), (r = n, YN("/api/v4/media/" + r)).then((function(e) {
+ var t = e.name, r = e.thumbnails.mini;
+ f({
+ name: t,
+ thumbnail: r,
+ coldfusionUUID: n
+ });
+ })).finally((function() {
+ c(!1);
+ })));
+ }), [m, t.asset]), (0, s.useEffect)((function() {
+ v() && g({
+ getAccessToken: v,
+ hideLogout: !0
+ });
+ }), [v()]), s.default.createElement(oN, { label: "Image" }, s.default.createElement(s.default.Fragment, null, s.default.createElement(jM, {
+ className: zA,
+ onClick: function() {
+ return i(!0);
+ },
+ isSelected: !d.thumbnail.length
+ }, d.thumbnail.length || m ? s.default.createElement(Dh, {
+ variant: "content",
+ imageUrl: d.thumbnail,
+ backgroundColor: "rgb(255 255 255 / 0%)"
+ }, s.default.createElement(Dh.Overlay, { isLoading: l })) : s.default.createElement(il, {
+ title: "Edit",
+ icon: s.default.createElement(Xv, null)
+ }), s.default.createElement(PM, null, s.default.createElement(AM, null, l ? "Loading" : d.name.length ? d.name : "Choose asset"))), s.default.createElement(PE, {
+ isOpen: o,
+ onClose: function() {
+ return i(!1);
+ }
+ }, s.default.createElement(bS, { authentication: h }, s.default.createElement(g_, {
+ mode: "SingleSelectFile",
+ language: document.querySelector("html").getAttribute("lang") || "en",
+ assetTypes: ["IMAGE"],
+ selectedAssets: d.coldfusionUUID.length ? [d.coldfusionUUID] : [],
+ onSuccess: function(e) {
+ var r, o = e[0], a = o.url, s = o.derivatives.thumbnail, l = o.name, c = a || "", u = (r = c.match(/(.*)\?mediaId=(.*)/)) ? r[2] : "", d = s || c;
+ i(!1), f({
+ name: l,
+ thumbnail: d,
+ coldfusionUUID: u
+ }), n({
+ type: "asset",
+ payload: {
+ value: TM(u),
+ id: t.id
+ }
+ });
+ },
+ assetFieldSelection: "\n databaseId\n name\n url\n derivatives {\n thumbnail\n }"
+ })))));
+}
+var jM = ao.div.withConfig({
+ displayName: "ItemContainer",
+ componentId: "sc-bmwf6h-0"
+})([
+ "padding:",
+ " ",
+ ";display:flex;border-radius:",
+ ";align-items:center;background:",
+ ";&:hover{background:",
+ ";cursor:pointer;}"
+], po.spacing3, po.spacing4, po.spacing3, (function(e) {
+ return e.isSelected && po.gray25;
+}), po.gray25), PM = ao.div.withConfig({
+ displayName: "ItemDetails",
+ componentId: "sc-bmwf6h-1"
+})(["display:flex;flex-direction:column;flex:1;min-width:0;"]), AM = ao.p.withConfig({
+ displayName: "Title",
+ componentId: "sc-bmwf6h-2"
+})([
+ "font-size:",
+ ";line-height:",
+ ";color:",
+ ";padding:0px ",
+ ";margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"
+], po.fontSize100, po.lineHeightText, po.gray800, po.spacing4);
+function NM(e) {
+ var n = e.io, r = xN().transformationsDispatch;
+ return s.default.createElement(oN, { label: "Opacity" }, s.default.createElement(Gl, {
+ type: "number",
+ placeholder: "100",
+ onChange: function(e) {
+ var t = parseInt(e, 10);
+ r({
+ type: "opacity",
+ payload: {
+ value: isNaN(t) ? 100 : t,
+ id: n.id
+ }
+ });
+ },
+ value: n.opacity?.toString() || "",
+ iconRight: s.default.createElement("span", null, "%")
+ }));
+}
+function MM(e) {
+ var t = e.io, n = xN().transformationsDispatch;
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(OM, { io: t }), s.default.createElement(NM, { io: t }), s.default.createElement(NN, {
+ label: "Position",
+ gravity: t.gravity,
+ onChange: function(e) {
+ return n({
+ type: "gravity",
+ payload: {
+ value: e,
+ id: t.id
+ }
+ });
+ }
+ }), s.default.createElement(jN, { io: t }));
+}
+function LM(e) {
+ var t = e.color, n = e.onChange, r = e.onChangeValidation, o = eA((0, s.useState)(!0), 2), i = o[0], a = o[1], l = function(e) {
+ c(!!function(e) {
+ var t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (function(e, t, n, r) {
+ return t + t + n + n + r + r;
+ })), n = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
+ return n ? `(${parseInt(n[1], 16).toString()}, ${parseInt(n[2], 16).toString()}, ${parseInt(n[3], 16).toString()})` : "";
+ }(e)), n(e);
+ }, c = function(e) {
+ a(e), r(e);
+ };
+ return s.default.createElement(_v, {
+ onChange: function(e) {
+ l(e.substring(1).toUpperCase());
+ },
+ value: `#${t}`,
+ trigger: function(e) {
+ var n = XP({}, (JP(e), e));
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(Gl, {
+ isInvalid: !i,
+ maxLength: 6,
+ value: t?.toUpperCase(),
+ prefix: "#",
+ icon: s.default.createElement(Ul, qP(qP({ label: "Color Thumbnail" }, n), {}, {
+ onClick: function(e) {
+ e.stopPropagation(), n.onClick();
+ },
+ icon: s.default.createElement(Dh, {
+ variant: "content",
+ backgroundColor: `#${t}`,
+ shape: "circle",
+ size: "xs"
+ })
+ })),
+ onChange: l
+ }), !i && s.default.createElement(Vc.HelperText, { isInvalid: !i }, "Please type a valid hex value"));
+ }
+ });
+}
+function DM(e) {
+ var t = e.io, n = xN().transformationsDispatch;
+ return s.default.createElement(oN, { label: "Color" }, s.default.createElement(Bs, null, s.default.createElement(RM, null, s.default.createElement(LM, {
+ color: t.color,
+ onChange: function(e) {
+ n({
+ type: "color",
+ payload: {
+ value: e,
+ id: t.id
+ }
+ });
+ },
+ onChangeValidation: function(e) {
+ n({
+ type: "isValid",
+ payload: e
+ });
+ }
+ })), s.default.createElement(zM, null, s.default.createElement(Gl, {
+ type: "number",
+ placeholder: "100",
+ onChange: function(e) {
+ n({
+ type: "opacity",
+ payload: {
+ value: parseInt(isNaN(parseInt(e, 10)) ? "0" : e, 10),
+ id: t.id
+ }
+ });
+ },
+ value: t.opacity.toString(),
+ iconRight: s.default.createElement("span", null, "%")
+ }))));
+}
+var RM = ao.div.withConfig({
+ displayName: "FlexInputColor",
+ componentId: "sc-lch2dr-0"
+})(["min-width:0;margin-right:", ";"], po.spacing4), zM = ao.div.withConfig({
+ displayName: "FlexInput",
+ componentId: "sc-lch2dr-1"
+})(["min-width:0;"]);
+function $M(e) {
+ var t = e.io, n = e.focusPoint, r = e.showEditor, o = e.setShowEditor, i = xN().transformationsDispatch, a = [
+ "contrast",
+ "brightness",
+ "sharpness",
+ "saturation"
+ ].includes(t.filter), l = t.transform || t.overlay || t.filter;
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(lN, {
+ transformation: l,
+ onChange: function(e) {
+ o && o({ show: !1 }), i({
+ type: "transformation",
+ payload: {
+ group: e.group,
+ value: e.transformation,
+ id: t.id
+ }
+ });
+ }
+ }), (t.transform === nN.flip || t.transform === nN.mirror) && s.default.createElement(SM, { io: t }), (t.transform === nN.fit || t.transform === nN.scale) && s.default.createElement(SN, {
+ width: t.width,
+ height: t.height,
+ id: t.id
+ }), t.transform === nN.fill && s.default.createElement(mM, {
+ io: t,
+ focusPoint: n,
+ setShowEditor: o,
+ showEditor: r
+ }), t.transform === nN.background && s.default.createElement(bM, { io: t }), t.transform === nN.rotate && s.default.createElement(jN, { io: t }), t.transform === nN.border && s.default.createElement(gM, { io: t }), t.transform === nN.extend && s.default.createElement(rM, { io: t }), t.transform === nN.crop && s.default.createElement(hM, {
+ io: t,
+ focuspoint: n,
+ setShowEditor: o,
+ showEditor: r
+ }), t.transform === nN.trim && s.default.createElement(wM, { io: t }), t.overlay === "text" && s.default.createElement(eM, { io: t }), t.overlay === "image" && s.default.createElement(MM, { io: t }), t.overlay === "box" && s.default.createElement(DM, { io: t }), t.filter === "blur" && s.default.createElement(yM, { io: t }), t.filter === "opacity" && s.default.createElement(vM, { io: t }), a && s.default.createElement(ON, {
+ label: tN(t.filter),
+ min: -100,
+ max: 100,
+ value: t.amount,
+ onChange: function(e) {
+ return i({
+ type: "amount",
+ payload: {
+ value: e,
+ id: t.id
+ }
+ });
+ }
+ }));
+}
+var BM = [
+ {
+ label: "Auto (recommended)",
+ value: ""
+ },
+ {
+ label: "WebP",
+ value: "webp"
+ },
+ {
+ label: "JPG",
+ value: "jpg"
+ },
+ {
+ label: "PNG",
+ value: "png"
+ },
+ {
+ label: "AVIF",
+ value: "avif"
+ }
+], FM = [
+ {
+ label: "Very High",
+ value: "95"
+ },
+ {
+ label: "High",
+ value: "85"
+ },
+ {
+ label: "Medium (Auto)",
+ value: "75"
+ },
+ {
+ label: "Low",
+ value: "65"
+ }
+];
+function UM(e) {
+ var r = e.options, o = xN().transformationsDispatch, i = "custom", a = eA((0, s.useState)(!1), 2), l = a[0], c = a[1], u = BM.find((function(e) {
+ return e.value === r.format;
+ }))?.label || "Select Format", d = l ? "Custom" : FM.find((function(e) {
+ return e.value === String(r.quality);
+ }))?.label || "Select Quality";
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(oN, {
+ label: "Format",
+ helpText: "Set the output format"
+ }, s.default.createElement(fm, {
+ "aria-label": "Format",
+ onChange: function(e) {
+ e === i ? c(!0) : o({
+ type: "format",
+ payload: e
+ });
+ },
+ label: u,
+ value: r.format
+ }, BM.map((function(e) {
+ return s.default.createElement(fm.Item, {
+ value: e.value,
+ key: e.value
+ }, e.label);
+ })))), s.default.createElement(oN, { label: "Quality" }, s.default.createElement(fm, {
+ "aria-label": "Quality",
+ onChange: function(e) {
+ var t = e === i;
+ c(t), o({
+ type: "quality",
+ payload: t ? 100 : Number(e)
+ });
+ },
+ label: d,
+ value: String(r.quality)
+ }, FM.map((function(e) {
+ return s.default.createElement(fm.Item, {
+ value: e.value,
+ key: e.label
+ }, e.label);
+ })), s.default.createElement(fm.Divider, null), s.default.createElement(fm.Item, {
+ value: i,
+ key: "Custom"
+ }, "Custom"))), l && s.default.createElement(oN, { label: "" }, s.default.createElement(Pm, {
+ value: r.quality,
+ min: 60,
+ max: 100,
+ onChange: function(e) {
+ o({
+ type: "quality",
+ payload: Number(e)
+ });
+ },
+ inputPosition: "right"
+ })));
+}
+function HM(e) {
+ var t = eA((0, s.useState)(), 2), n = t[0], r = t[1];
+ return (0, s.useEffect)((function() {
+ var t;
+ (t = e, YN(`/v7/featuretreatments/treatment/${t}`)).then((function(e) {
+ r(e.treatment);
+ })).catch((function(t) {
+ var n;
+ r("control"), console.error(`Something went wrong while fetching the ${e} Split treatment`, t), n = t, K_().captureException(n, function(e) {
+ if (e) return function(e) {
+ return e instanceof H_ || typeof e == "function";
+ }(e) || function(e) {
+ return Object.keys(e).some(((e) => Q_.includes(e)));
+ }(e) ? { captureContext: e } : e;
+ }(void 0));
+ }));
+ }), [e]), n;
+}
+var WM = function(e) {
+ var t, n = e.showEditor, r = e.setShowEditor, o = e.isFromPresets, i = eA((0, s.useState)([]), 2), a = i[0], l = i[1], c = eA((0, s.useState)(!1), 2), u = c[0], d = c[1], f = xN(), p = f.transformationsState, h = f.transformationsDispatch, g = HM("redirect_public_links_to_dat") === "on";
+ return s.default.createElement(om, null, p.content.io.map((function(e, t) {
+ var o, i = a.includes(e.id), c = e.transform || e.overlay || e.filter, u = tN((o = c) === nN.mirror ? nN.flip : o) || "New transformation", d = VM(e);
+ return s.default.createElement(s.default.Fragment, { key: `${e.id}-${t}` }, s.default.createElement(om.Item, {
+ subtext: d,
+ thumbnail: s.default.createElement(Dh, {
+ variant: "clean",
+ icon: s.default.createElement(rN, { type: c }),
+ shape: "square"
+ }),
+ rightElements: s.default.createElement(qM, {
+ isExpanded: i,
+ onDeleteClick: function(t) {
+ r && ["fill", "crop"].includes(c) && r({ show: !1 }), function(e, t) {
+ e.stopPropagation(), h({
+ type: "deleteTransformation",
+ payload: { id: t }
+ });
+ }(t, e.id);
+ }
+ }),
+ onClick: function() {
+ t = e.id, a.includes(t) ? l((function(e) {
+ return e.filter((function(e) {
+ return e !== t;
+ }));
+ })) : l((function(e) {
+ return [].concat(tA(e), [t]);
+ }));
+ return;
+ var t;
+ }
+ }, u), i && s.default.createElement($M, {
+ io: e,
+ focusPoint: p.content.focuspoint,
+ showEditor: n,
+ setShowEditor: r,
+ key: `${e.id}-transformation`
+ }), s.default.createElement(om.Divider, { key: `${e.id}-divider` }));
+ })), s.default.createElement(om.Item, {
+ key: "add-button",
+ onClick: function() {
+ var e = qc();
+ h({
+ type: "addTransformation",
+ payload: { id: e }
+ }), l((function(t) {
+ return [].concat(tA(t), [e]);
+ })), r && r({ show: !1 });
+ },
+ thumbnail: s.default.createElement(Dh, {
+ icon: s.default.createElement(Xv, null),
+ shape: "square"
+ })
+ }, "Add transformation"), s.default.createElement(om.Divider, { key: "add-button-divider" }), s.default.createElement(om.Item, {
+ key: "advanced-button",
+ subtext: `Format: ${((t = p.content) == null || (t = t.format) == null ? void 0 : t.toUpperCase()) || "Auto"} • Quality: ${p.content.quality}`,
+ thumbnail: s.default.createElement(Dh, {
+ variant: "clean",
+ icon: s.default.createElement(rN, { type: "advanced" }),
+ shape: "square"
+ }),
+ rightElements: u ? s.default.createElement(fy, null) : s.default.createElement(py, null),
+ onClick: function() {
+ d(!u);
+ }
+ }, "Output options"), u && s.default.createElement(UM, {
+ options: p.content,
+ key: "advanced-options"
+ }), s.default.createElement(om.Divider, { key: "redirect-public-links-divider" }), g && o && s.default.createElement(om.Item, {
+ checkedVariant: "switch",
+ onClick: function() {
+ h({
+ type: "redirectPublicLinksTnPreset",
+ payload: !p.redirectPublicLinks
+ });
+ },
+ isChecked: p.redirectPublicLinks
+ }, "Redirect public links"));
+}, VM = function(e) {
+ var t = "Focus Point";
+ e.gravity && (t = tN(e.gravity));
+ var n = e.width && e.height ? `${e.width} × ${e.height} px ` : "", r = t ? `Focus: ${t}` : "", o = e.color ? `Color: #${e.color}` : "", i = e.background ? `Background: #${e.background}` : "", a = e.path ? `Shape: ${e.path}` : "", s = e.blur ? `Blur: ${e.blur}` : "", l = e.amount ? `Amount: ${e.amount}` : "";
+ switch (e.transform || e.filter) {
+ case "fill": return `${n} ${r && n && "• " + r}`;
+ case "background": return o;
+ case "border": return `${o} • Width: ${e.width}px`;
+ case "crop": return `${n} • ${a} ${i && "• " + i} ${s && "• " + s}`;
+ case "extend": return `${n} ${i && "• " + i}`;
+ case "fit":
+ case "scale": return n;
+ case "flip": return "Flip vertically";
+ case "mirror": return "Flip horizontally";
+ case "rotate": return `Angle: ${e.angle || 0}°`;
+ case "opacity":
+ case "contrast":
+ case "brightness":
+ case "blur":
+ case "sharpness":
+ case "saturation": return l;
+ default: return "";
+ }
+}, qM = function(e) {
+ var t = e.isExpanded, n = e.onDeleteClick;
+ return s.default.createElement(Bs, { alignItems: "center" }, s.default.createElement(Ml, { content: "Remove transformation" }, s.default.createElement(il, {
+ variant: "clean",
+ icon: s.default.createElement(Vv, {
+ fill: po.gray400a,
+ onClick: n
+ }),
+ "aria-label": "Delete"
+ })), t ? s.default.createElement(fy, null) : s.default.createElement(py, null));
+};
+function GM(e) {
+ var n, r = e.showEditor, o = e.setShowEditor, i = ((n = xN().transformationsState.content) == null || (n = n.io) == null ? void 0 : n.length) ?? 0;
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(YM, null, s.default.createElement(KM, null, "Transformations"), s.default.createElement(XM, null, i === 1 ? `${i} transformation applied` : i > 1 ? `${i} transformations applied` : "No transformations")), s.default.createElement(ZM, null, s.default.createElement(WM, {
+ isFromPresets: !1,
+ showEditor: r,
+ setShowEditor: o
+ })));
+}
+var YM = ao.div.withConfig({
+ displayName: "TitleContainer",
+ componentId: "sc-tlsynt-0"
+})([
+ "padding-top:",
+ ";background-color:",
+ ";padding-bottom:",
+ ";position:absolute;width:100%;z-index:1;"
+], po.spacing6, po.white, po.spacing4), ZM = ao.div.withConfig({
+ displayName: "ListContainer",
+ componentId: "sc-tlsynt-1"
+})(["margin-top:", ";"], "76px"), KM = ao.div.withConfig({
+ displayName: "Title",
+ componentId: "sc-tlsynt-2"
+})(["font-size:16px;line-height:20px;color:", ";"], po.gray800), XM = ao.div.withConfig({
+ displayName: "SubTitle",
+ componentId: "sc-tlsynt-3"
+})(["font-size:14px;line-height:20px;color:", ";"], po.gray600), JM = function() {
+ return s.default.createElement(eL, null, s.default.createElement(nL, null), s.default.createElement(rL, null, s.default.createElement(oL, { large: !0 }), s.default.createElement(oL, null)));
+}, QM = function() {
+ return s.default.createElement(iL, null);
+}, eL = ao.div.withConfig({
+ displayName: "LoaderContainer",
+ componentId: "sc-1vpf7m8-0"
+})(["display:flex;align-items:center;padding:12px;"]), tL = co([
+ "0%{background-color:",
+ "}100%{background-color:",
+ "}"
+], po.gray50a, po.gray100a), nL = ao.div.withConfig({
+ displayName: "ThumbnailLoader",
+ componentId: "sc-1vpf7m8-1"
+})(["width:50px;height:50px;border-radius:4px;animation:", " 1s linear infinite alternate;"], tL), rL = ao.div.withConfig({
+ displayName: "ContentLoader",
+ componentId: "sc-1vpf7m8-2"
+})(["display:flex;flex-direction:column;height:100%;margin-left:", ";"], po.spacing4), oL = ao.div.withConfig({
+ displayName: "Content",
+ componentId: "sc-1vpf7m8-3"
+})([
+ "height:10px;margin-bottom:",
+ ";width:",
+ ";border-radius:",
+ ";animation:",
+ " 1s linear infinite alternate;"
+], po.spacing3, (function(e) {
+ return e.large ? "110px" : "60px";
+}), po.radiusSmall, tL), iL = ao.div.withConfig({
+ displayName: "LoadImageSkeleton",
+ componentId: "sc-1vpf7m8-4"
+})(["width:240px;height:320px;animation:", " 1s linear infinite alternate;"], tL), aL = function(e) {
+ var t = e.onPresetSelected, n = e.activeTab, r = e.presets, o = e.selectedPreset, i = e.isLoading, a = e.baseURL, l = e.canViewPresets, c = e.canViewTransformations, u = e.showEditor, d = e.setShowEditor, f = xN(), p = f.transformationsState, h = f.transformationsDispatch, g = HM("dat_presets_grouping") === "on";
+ return (0, s.useEffect)((function() {
+ var e, t, r, o = !(p != null && (e = p.content) != null && (e = e.io) != null && e.length) && (p == null || (t = p.content) == null ? void 0 : t.quality) === fN.content.quality && (p == null || (r = p.content) == null ? void 0 : r.format) === fN.content.format;
+ n === cN.transformations && o && h({ type: "init" });
+ }), [
+ n,
+ h,
+ p
+ ]), s.default.createElement(sL, { direction: "column" }, n === cN.presets ? l ? i ? s.default.createElement(s.default.Fragment, null, Array.from([
+ ,
+ ,
+ ,
+ ,
+ ,
+ ].keys()).map((function(e) {
+ return s.default.createElement(JM, { key: `preset-skeleton-${e}` });
+ }))) : s.default.createElement(eN, {
+ baseURL: a,
+ presets: r,
+ onPresetSelected: t,
+ selectedPreset: o,
+ presetGroupingActive: g
+ }) : null : c ? s.default.createElement(lL, null, s.default.createElement(GM, {
+ showEditor: u,
+ setShowEditor: d
+ })) : null);
+}, sL = ao(Bs).withConfig({
+ displayName: "SidebarContainer",
+ componentId: "sc-n1gktg-0"
+})(["width:336px;overflow-y:auto;overflow-x:hidden;background:", ";flex:none;box-shadow:-1px 0px 0px rgba(0,34,51,0.1);height:100%;"], po.white), lL = ao.div.withConfig({
+ displayName: "TransformationsContainer",
+ componentId: "sc-n1gktg-1"
+})(["padding:0 ", ";"], po.spacing6);
+function cL(e) {
+ var t = e.url, n = (0, s.useRef)(null);
+ return (0, s.useLayoutEffect)((function() {
+ n.current.scrollLeft = n.current.scrollWidth;
+ }), [t]), s.default.createElement(uL, null, s.default.createElement(dL, null, s.default.createElement(fL, null, s.default.createElement(gy, null)), s.default.createElement(pL, {
+ ref: n,
+ onClick: function() {
+ window.open(t, "_blank").focus();
+ }
+ }, s.default.createElement(gL, null, t))), s.default.createElement(hL, null, s.default.createElement(Ml, { content: "Copy URL" }, s.default.createElement(vy.CopyToClipboard, {
+ text: t,
+ onCopy: function() {
+ eg({
+ title: "Link copied to the clipboard",
+ variant: "success"
+ });
+ }
+ }, s.default.createElement(il, {
+ variant: "clean",
+ icon: s.default.createElement(Qv, null),
+ "aria-label": "Copy to clipboard"
+ }))), s.default.createElement($A, {
+ alwaysVisible: !0,
+ presetURL: t
+ })));
+}
+var uL = ao.div.withConfig({
+ displayName: "Container",
+ componentId: "sc-ucc5ld-0"
+})([
+ "height:50px;background-color:",
+ ";border-radius:",
+ ";display:flex;align-items:center;justify-content:space-between;box-shadow:",
+ ";min-width:0;min-height:0;"
+], po.white, po.radiusLarge, po.elevationStatic), dL = ao.div.withConfig({
+ displayName: "SideContainer",
+ componentId: "sc-ucc5ld-1"
+})(["display:flex;align-items:center;min-width:0;min-height:0;"]), fL = ao.div.withConfig({
+ displayName: "PublicIconContainer",
+ componentId: "sc-ucc5ld-2"
+})([
+ "margin-left:",
+ ";margin-right:",
+ ";fill:",
+ ";"
+], po.spacing5, po.spacing4, po.gray600), pL = ao.div.withConfig({
+ displayName: "LinkContainer",
+ componentId: "sc-ucc5ld-3"
+})([
+ "color:",
+ ";font-size:",
+ ";cursor:pointer;overflow:scroll;white-space:nowrap;width:100%;height:100%;display:flex;&::-webkit-scrollbar{display:none;}-ms-overflow-style:none;scrollbar-width:none;"
+], po.gray800, po.fontSize100), hL = ao.div.withConfig({
+ displayName: "ButtonsContainer",
+ componentId: "sc-ucc5ld-4"
+})(["display:flex;width:100px;padding-right:", ";"], po.spacing2), gL = ao.span.withConfig({
+ displayName: "Link",
+ componentId: "sc-ucc5ld-5"
+})(["display:flex;align-items:center;justify-content:center;height:100%;"]), mL = ao.div.withConfig({
+ displayName: "ImageWrapper",
+ componentId: "sc-1w8edrw-0"
+})(["display:flex;justify-content:center;align-items:center;flex:1;min-height:0;position:relative;", ";"], (function(e) {
+ return e.hideBottomBar && ro(["margin-bottom:", ";"], po.spacing8);
+})), vL = ao.img.withConfig({
+ displayName: "Image",
+ componentId: "sc-1w8edrw-1"
+})([
+ "display:",
+ ";max-width:100%;max-height:100%;background:",
+ ";"
+], (function(e) {
+ return e.isImageLoading ? "none" : "block";
+}), `repeating-conic-gradient(${po.gray100a} 0% 25%, transparent 0% 50%) 50% / 14px 14px`), yL = function(e) {
+ var t = e.point, n = e.renderedSize, r = e.background;
+ if (n) {
+ var o = t - n / 2, i = r - n;
+ return o < 0 ? 0 : o > i ? i : o;
+ }
+}, bL = ao.div.withConfig({
+ displayName: "DivStyled",
+ componentId: "sc-1sqkkxm-0"
+})([
+ "position:absolute;top:0;left:auto;right:auto;bottom:0;right:0;z-index:9;text-align:center;height:",
+ "px;width:",
+ "px;"
+], (function(e) {
+ return e.height || 0;
+}), (function(e) {
+ return e.width || 0;
+})), wL = ao.img.withConfig({
+ displayName: "StyledImage",
+ componentId: "sc-1sqkkxm-1"
+})([
+ "display:",
+ ";max-width:100%;max-height:100%;background:",
+ ";position:absolute;top:0;left:0;opacity:1;max-width:auto;max-height:auto;height:",
+ ";width:",
+ ";"
+], (function(e) {
+ return e.isImageLoading ? "none" : "block";
+}), `repeating-conic-gradient(${po.gray100a} 0% 25%, transparent 0% 50%) 50% / 14px 14px`, (function(e) {
+ var t = e.height;
+ return t ? t + "px" : "auto";
+}), (function(e) {
+ var t = e.width;
+ return t ? t + "px" : "auto";
+})), xL = ao(bL).withConfig({
+ displayName: "DraggableWrapper",
+ componentId: "sc-1sqkkxm-2"
+})(["z-index:100;"]), EL = ao(wL).withConfig({
+ displayName: "PreviewImage",
+ componentId: "sc-1sqkkxm-3"
+})([
+ "visibility:",
+ ";top:",
+ "px;left:",
+ "px;"
+], (function(e) {
+ return e.displayNone ? "hidden" : "visible";
+}), (function(e) {
+ return e.top || 0;
+}), (function(e) {
+ return e.left || 0;
+})), SL = ao.div.withConfig({
+ displayName: "Wrapper",
+ componentId: "sc-1sqkkxm-4"
+})(["display:flex;justify-content:center;text-align:center,position:relative;width:100%;background-color:#f1f1f1;"]), CL = ao(tT()).withConfig({
+ displayName: "StyledDraggable",
+ componentId: "sc-1sqkkxm-5"
+})(["position:absolute;top:0;bottom:0;left:0;right:0;"]), kL = ao.img.withConfig({
+ displayName: "StyledBackground",
+ componentId: "sc-1sqkkxm-6"
+})([
+ "display:",
+ ";max-width:100%;max-height:100%;background:",
+ ";opacity:0.5;display:block;"
+], (function(e) {
+ return e.isImageLoading ? "none" : "block";
+}), `repeating-conic-gradient(${po.gray100a} 0% 25%, transparent 0% 50%) 50% / 14px 14px`), _L = ao.div.withConfig({
+ displayName: "DivFocusPoint",
+ componentId: "sc-1sqkkxm-7"
+})(["position:absolute;cursor:move;height:80px;width:80px;margin:-40px;user-select:none;"]), TL = ao.div.withConfig({
+ displayName: "StyledPreviewWrapper",
+ componentId: "sc-1sqkkxm-8"
+})([
+ "display:flex;justify-content:center;text-align:center;overflow:hidden;position:absolute;top:0;height:",
+ ";width:",
+ ";"
+], (function(e) {
+ var t = e.height;
+ return t ? t + "px" : "auto";
+}), (function(e) {
+ var t = e.width;
+ return t ? t + "px" : "auto";
+})), OL = ao(ao(EL).withConfig({
+ displayName: "FillPreview",
+ componentId: "sc-1sqkkxm-9"
+})(["object-fit:cover;width:100%;height:100%;object-fit:contain;"])).withConfig({
+ displayName: "FillPreviewInvisible",
+ componentId: "sc-1sqkkxm-10"
+})(["visibility:hidden;opacity:0;"]), jL = ao.div.withConfig({
+ displayName: "FillPreviewWrapper",
+ componentId: "sc-1sqkkxm-11"
+})([
+ "position:absolute;background-image:url('",
+ "');background-size:cover;background-position:",
+ ";height:",
+ ";width:",
+ ";top:",
+ "px;left:",
+ "px;"
+], (function(e) {
+ return e.background;
+}), (function(e) {
+ return e.backgroundPosition;
+}), (function(e) {
+ var t = e.height;
+ return t ? t + "px" : "auto";
+}), (function(e) {
+ var t = e.width;
+ return t ? t + "px" : "auto";
+}), (function(e) {
+ return e.top || 0;
+}), (function(e) {
+ return e.left || 0;
+})), PL = ao.div.withConfig({
+ displayName: "EditorMainDiv",
+ componentId: "sc-1sqkkxm-12"
+})(["position:relative;display:flex;justify-content:center;text-align:center;max-height:100%;width:100%;"]);
+function AL() {
+ return s.default.createElement("svg", {
+ width: "80",
+ height: "80",
+ viewBox: "0 0 80 80",
+ fill: "none",
+ xmlns: "http://www.w3.org/2000/svg"
+ }, s.default.createElement("circle", {
+ cx: "40",
+ cy: "40",
+ r: "39.5",
+ stroke: "white"
+ }), s.default.createElement("circle", {
+ cx: "1",
+ cy: "1",
+ r: "1",
+ transform: "matrix(1 0 0 -1 39 41)",
+ fill: "white"
+ }));
+}
+function NL(e) {
+ var t = e.url, n = e.isLoading, r = e.backgroundSize, o = e.setIsLoading, i = e.trackPos, a = e.focuspoint, l = e.type, c = e.baseURL, u = eA((0, s.useState)({}), 2), d = u[0], f = u[1], p = eA((0, s.useState)(!0), 2), h = p[0], g = p[1], m = eA(a || [50, 50], 2), v = m[0], y = m[1], w = eA(function(e, t) {
+ var n = eA(t, 2), r = n[0], o = n[1], i = e.clientWidth * r / 100, a = e.clientHeight * o / 100;
+ return [Math.ceil(i || 0), Math.ceil(a || 0)];
+ }(r, [v, y]), 2), x = w[0], E = w[1], S = function(e) {
+ var t = e.backgroundSize, n = e.renderedImageSize, r = e.type, o = eA(e.focuspoint, 2), i = o[0], a = o[1];
+ if (!t.naturalHeight) return {
+ top: 0,
+ left: 0
+ };
+ if (r === "crop") {
+ var s = yL({
+ point: i,
+ renderedSize: n.clientWidth,
+ background: t.clientWidth
+ });
+ return {
+ top: yL({
+ point: a,
+ renderedSize: n.clientHeight,
+ background: t.clientHeight
+ }),
+ left: s
+ };
+ }
+ var l = t.naturalWidth / t.naturalHeight > n.naturalWidth / n.naturalHeight;
+ return Math.ceil(n.naturalWidth / n.naturalHeight) === Math.ceil(t.naturalWidth / t.naturalHeight) ? {
+ top: 0,
+ left: 0
+ } : l ? {
+ top: 0,
+ left: i - n.clientWidth / 2
+ } : {
+ top: a - n.clientHeight / 2,
+ left: 0
+ };
+ }({
+ type: l,
+ backgroundSize: r,
+ renderedImageSize: d,
+ focuspoint: [x || 0, E || 0]
+ }), C = S.top, k = S.left, _ = function(e) {
+ o(!1), function(e) {
+ var t, n, r = e.backgroundSize, o = e.setRenderedImageSize, i = e.type, a = e.img.target, s = a.naturalHeight, l = a.naturalWidth, c = l / s;
+ if (i === "crop") t = r.clientWidth * l / r.naturalWidth, n = r.clientHeight * s / r.naturalHeight;
+ else {
+ t = r.clientWidth;
+ var u = l * (n = r.clientHeight) == s * t;
+ n * l < t * s ? t = Math.floor(n * c) : u || (n = Math.floor(t / c));
+ }
+ o({
+ clientWidth: t,
+ clientHeight: n,
+ naturalHeight: s,
+ naturalWidth: l
+ });
+ }({
+ img: e,
+ setRenderedImageSize: f,
+ backgroundSize: r,
+ type: l
+ });
+ }, T = v === void 0 || y === void 0 || C === void 0 || k === void 0, I = function(e, t, n) {
+ return e < 0 ? 0 : e <= t - n ? e : t - n;
+ };
+ return s.default.createElement(TL, {
+ width: r.clientWidth,
+ height: r.clientHeight
+ }, s.default.createElement(bL, {
+ width: r.clientWidth,
+ height: r.clientHeight
+ }, l === "crop" ? s.default.createElement(EL, {
+ isImageLoading: n || !h,
+ displayNone: T,
+ width: d.clientWidth,
+ height: d.clientHeight,
+ top: C,
+ left: k,
+ src: t,
+ onLoad: _
+ }) : s.default.createElement(s.default.Fragment, null, s.default.createElement(OL, {
+ isImageLoading: n && !h,
+ top: C,
+ left: k,
+ src: t,
+ onLoad: _
+ }), s.default.createElement(jL, {
+ top: I(C, r.clientHeight, d.clientHeight),
+ left: I(k, r.clientWidth, d.clientWidth),
+ background: c,
+ backgroundPosition: `-${I(k, r.clientWidth, d.clientWidth)}px -${I(C, r.clientHeight, d.clientHeight)}px`,
+ height: d.clientHeight,
+ width: d.clientWidth
+ }))), s.default.createElement(xL, {
+ width: r.clientWidth,
+ height: r.clientHeight
+ }, s.default.createElement(CL, {
+ bounds: "parent",
+ position: {
+ x,
+ y: E
+ },
+ onStart: function() {
+ o(!0), g(!1);
+ },
+ onStop: function(e, t) {
+ i(t), g(!0);
+ }
+ }, s.default.createElement(_L, null, s.default.createElement(AL, null)))));
+}
+function ML(e, t) {
+ var n = [], r = e.content, o = r.io, i = r.format, a = r.quality, s = r.focuspoint;
+ if (o.forEach((function(e) {
+ n.push(function(e) {
+ return {
+ key: "io",
+ value: Object.keys(e).filter((function(t) {
+ return t !== "id" && e[t] !== null;
+ })).map((function(t) {
+ return `${t}:${e[t]}`;
+ })).join(",")
+ };
+ }(e));
+ })), typeof s == "string" && n.push({
+ key: "focuspoint",
+ value: s
+ }), Array.isArray(s)) {
+ var l = eA(s, 2), c = l[0], u = l[1];
+ (c || u) && n.push({
+ key: "focuspoint",
+ value: `${(c || 50) / 100},${(u || 50) / 100}`
+ });
+ }
+ return i && n.push({
+ key: "format",
+ value: i
+ }), a && a !== t.content.quality && n.push({
+ key: "quality",
+ value: a.toString()
+ }), n.map((function(e) {
+ return `${e.key}=${e.value}`;
+ })).join("&");
+}
+function LL(e) {
+ var t = e.url, n = e.baseURL, r = e.isLoading, o = e.setIsLoading, i = e.type, a = e.defaultValues, l = xN(), c = l.transformationsState, u = l.transformationsDispatch, d = eA((0, s.useState)({}), 2), f = d[0], p = d[1], h = eA((0, s.useState)(n), 2), g = h[0], m = h[1], v = eA((0, s.useState)(!0), 2), y = v[0], b = v[1], w = eA((0, s.useState)(!1), 2), x = w[0], E = w[1], S = (0, s.useMemo)((function() {
+ return qP(qP({}, c), {}, { content: qP(qP({}, c.content), {}, {
+ focuspoint: void 0,
+ io: c.content.io.filter((function(e) {
+ var t = e.transform;
+ return !["crop", "fill"].includes(t);
+ }))
+ }) });
+ }), [c]);
+ (0, s.useEffect)((function() {
+ m(`${n}?${ML(S, a)}`), b(!1);
+ }), [
+ a,
+ S,
+ n
+ ]);
+ var C = c.content.focuspoint;
+ return s.default.createElement(PL, { className: "Editor Main" }, s.default.createElement(SL, null, s.default.createElement(kL, {
+ id: "backgroundImage",
+ src: g || n,
+ alt: "",
+ isImageLoading: r || y,
+ onLoad: function(e) {
+ var t = e.target, n = t.clientHeight, r = t.clientWidth, o = t.naturalHeight, i = t.naturalWidth;
+ p({
+ clientHeight: n,
+ clientWidth: r,
+ naturalHeight: o,
+ naturalWidth: i
+ }), x || E(!0);
+ }
+ }), x && s.default.createElement(NL, {
+ type: i,
+ url: t,
+ baseURL: g || n,
+ isLoading: r,
+ backgroundSize: f,
+ setIsLoading: o,
+ trackPos: function(e) {
+ var r = eA(function(e, t) {
+ var n = eA(t, 2), r = n[0], o = n[1], i = r / e.clientWidth * 100, a = o / e.clientHeight * 100;
+ return [Math.ceil(i || 0), Math.ceil(a || 0)];
+ }(f, [e.x || 0, e.y || 0]), 2);
+ (function(e) {
+ u({
+ type: "focuspoint",
+ payload: {
+ value: e,
+ id: c.content.io[0].id
+ }
+ });
+ })([r[0] || 0, r[1] || 0]);
+ },
+ focuspoint: C
+ })));
+}
+function DL(e) {
+ var t = e.mediaInfo, n = e.url, r = e.canViewTransformations, o = e.hideBottomBar, i = e.activeTab, a = e.onBack, l = e.onDone, c = e.onApply, u = e.onShowTransformations, d = e.hasActiveChanges, f = e.showEditor, p = e.defaultValues, h = t.name, g = t.extension, m = t.baseURL, v = eA((0, s.useState)(!0), 2), y = v[0], b = v[1], w = (0, s.useMemo)((function() {
+ return function(e) {
+ if (!e) return "";
+ var t = new URL(e);
+ return t.searchParams.set(`${Date.now()}`, ""), t.toString();
+ }(n);
+ }), [n]), x = (0, s.useRef)();
+ return (0, s.useEffect)((function() {
+ var e;
+ b(!0), (e = x.current) == null || e.blur();
+ }), [n]), s.default.createElement(RL, null, s.default.createElement(zL, {
+ justifyContent: "space-between",
+ alignItems: "center"
+ }, s.default.createElement($L, null, s.default.createElement(il, {
+ ref: x,
+ variant: "clean",
+ icon: s.default.createElement(ry, null),
+ "aria-label": "Go back",
+ onClick: a
+ })), s.default.createElement(FL, null, h, ".", g), i === cN.presets && r && s.default.createElement(HL, {
+ variant: "clean",
+ onClick: u,
+ icon: s.default.createElement(Yo, null)
+ }, "Transform"), i === cN.transformations && (typeof c == "function" && d ? s.default.createElement(BL, null, s.default.createElement(HL, {
+ variant: "primary",
+ onClick: c
+ }, "Apply transformations")) : s.default.createElement(HL, {
+ variant: "primary",
+ onClick: l
+ }, "Done"))), f.show ? s.default.createElement(mL, { hideBottomBar: o }, m && s.default.createElement(LL, {
+ type: f.type,
+ baseURL: m,
+ url: w,
+ isLoading: y,
+ setIsLoading: b,
+ defaultValues: p
+ })) : s.default.createElement(mL, { hideBottomBar: o }, n && s.default.createElement(vL, {
+ "data-testid": "previewImage",
+ src: w,
+ alt: "",
+ isImageLoading: y,
+ onLoad: function() {
+ b(!1);
+ }
+ }), y && s.default.createElement(QM, null)), !o && s.default.createElement(UL, null, s.default.createElement(cL, { url: n })));
+}
+var RL = ao.div.withConfig({
+ displayName: "Container",
+ componentId: "sc-dpw9jp-0"
+})(["display:flex;flex-direction:column;width:100%;height:100%;min-height:0;min-width:0;"]), zL = ao(Bs).withConfig({
+ displayName: "TopbarContainer",
+ componentId: "sc-dpw9jp-1"
+})(["height:90px;width:100%;"]), $L = ao.div.withConfig({
+ displayName: "ButtonBackContainer",
+ componentId: "sc-dpw9jp-2"
+})(["margin-left:", ";"], po.layoutSpacing1), BL = ao.div.withConfig({
+ displayName: "TransformationButtonContainer",
+ componentId: "sc-dpw9jp-3"
+})(["display:flex;gap:", ";"], po.spacing4), FL = ao.span.withConfig({
+ displayName: "ImageName",
+ componentId: "sc-dpw9jp-4"
+})([
+ "font-size:",
+ ";width:100%;line-height:24px;margin-left:",
+ ";"
+], po.fontSize200, po.spacing4), UL = ao.div.withConfig({
+ displayName: "BottomContainer",
+ componentId: "sc-dpw9jp-5"
+})(["padding:", ";"], po.spacing5), HL = ao(il).withConfig({
+ displayName: "TransformButton",
+ componentId: "sc-dpw9jp-6"
+})(["float:right;margin-right:", ";"], po.layoutSpacing1), WL = ["content"], VL = function(e) {
+ return e.content.io.map((function(e) {
+ return qP({}, e);
+ }));
+};
+function qL(e) {
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], n = qP(qP({}, fN), {}, { content: qP(qP({}, fN.content), {}, { io: t }) }), r = eA((0, s.useState)([]), 2), o = r[0], i = r[1], a = eA((0, s.useState)({}), 2), l = a[0], c = a[1], u = eA((0, s.useState)(!1), 2), d = u[0], f = u[1], p = eA((0, s.useReducer)(GL, n), 2), h = p[0], g = p[1], m = (0, s.useRef)(!0);
+ (0, s.useEffect)((function() {
+ return e && (f(!0), v()), function() {
+ m.current = !1;
+ };
+ }), [e]);
+ var v = function() {
+ YN("/v7/dat/presets/").then((function(e) {
+ m.current && (i(function(e) {
+ var n, r = e.presets.map((function(e) {
+ var t = e.content;
+ return qP(qP({}, QP(e, WL)), {}, {
+ type: "Preset",
+ content: t && JSON.parse(t)
+ });
+ })), o = (e == null || (n = e.groups) == null ? void 0 : n.map((function(e) {
+ return qP(qP({}, XP({}, (JP(e), e))), {}, { type: "Group" });
+ }))) ?? [];
+ return r.concat(o);
+ }(e)), c(function(e) {
+ var t = e.groups.reduce((function(e, t) {
+ return qP(qP({}, e), {}, KP({}, t.id, qP(qP({}, t), {}, { presetCount: 0 })));
+ }), {});
+ return e.presets.forEach((function(e) {
+ var n = e.groupId;
+ if (n && t[n]) {
+ var r = t[n].presetCount;
+ t[n].presetCount = r + 1;
+ }
+ })), t;
+ }(e)), f(!1));
+ })).catch((function(e) {
+ m.current && (f(!1), eg({
+ title: e.toString(),
+ variant: "error",
+ isPersistent: !0
+ }));
+ }));
+ };
+ return {
+ presetsOrGroups: o,
+ setPresetsOrGroups: i,
+ setGroups: c,
+ groups: l,
+ preset: h,
+ dispatch: g,
+ isLoading: d,
+ defaultValues: n
+ };
+}
+function GL(e, t) {
+ var n, r, o, i;
+ switch (t.type) {
+ case "init": return fN;
+ case "edit": return qP(qP({ isValid: !0 }, t.payload), {}, {
+ content: qP(qP({}, t.payload.content), {}, { io: t.payload.content.io.map((function(e) {
+ return qP(qP({}, e), {}, { id: qc() });
+ })) }),
+ redirectPublicLinks: t.payload.redirectPublicLinks || !1
+ });
+ case "addTransformation": return i = (r = {
+ preset: e,
+ ioId: t.payload.id
+ }).ioId, qP(qP({}, o = r.preset), {}, { content: qP(qP({}, o.content), {}, { io: [].concat(tA(VL(o)), [qP(qP({}, pN), {}, {
+ id: i,
+ transform: nN.fill
+ })]) }) });
+ case "deleteTransformation": return function(e) {
+ var t = e.preset, n = e.ioId;
+ return qP(qP({}, t), {}, { content: qP(qP({}, t.content), {}, { io: t.content.io.filter((function(e) {
+ return e.id !== n;
+ })) }) });
+ }({
+ preset: e,
+ ioId: t.payload.id
+ });
+ case "isValid":
+ case "name":
+ case "description": return qP(qP({}, e), {}, (KP(n = {}, t.type, t.payload), KP(n, "content", qP(qP({}, e.content), {}, { io: VL(e) })), n));
+ case "format":
+ case "quality": return qP(qP({}, e), {}, { content: qP(qP({}, e.content), {}, KP({ io: VL(e) }, t.type, t.payload)) });
+ case "focuspoint": return qP(qP({}, e), {}, { content: qP(qP({}, e.content), {}, KP({ io: VL(e) }, t.type, t.payload.value)) });
+ case "transformation": return qP(qP({}, e), {}, { content: qP(qP({}, e.content), {}, { io: e.content.io.map((function(e) {
+ return e.id === t.payload.id ? qP(qP({}, yN(t.payload.value)), {}, KP({ id: e.id }, t.payload.group, t.payload.value)) : qP({}, e);
+ })) }) });
+ case "gravity":
+ case "width":
+ case "height":
+ case "x":
+ case "y":
+ case "path":
+ case "content":
+ case "font":
+ case "fontType":
+ case "size":
+ case "color":
+ case "padding":
+ case "angle":
+ case "radius":
+ case "amount":
+ case "softness":
+ case "background":
+ case "blur": return qP(qP({}, e), {}, { content: qP(qP({}, e.content), {}, { io: e.content.io.map((function(e) {
+ return e.id === t.payload.id ? qP(qP({}, e), {}, KP({}, t.type, t.payload.value)) : qP({}, e);
+ })) }) });
+ case "opacity":
+ case "asset": return qP(qP({}, e), {}, { content: qP(qP({}, e.content), {}, { io: e.content.io.map((function(e) {
+ return e.id === t.payload.id ? qP(qP({}, e), {}, KP({}, t.type, t.payload.value.toString())) : qP({}, e);
+ })) }) });
+ case "groupId": return qP(qP({}, e), {}, { groupId: t.payload });
+ default: return e;
+ }
+}
+function YL(e) {
+ var t, n, r = e.mediaInfo, o = e.canViewPresets, i = e.canViewTransformations, a = e.hideBottomBar, l = a !== void 0 && a, c = e.initialTransformations, u = e.onDone, d = e.onApply, f = e.onBack, p = o ? cN.presets : cN.transformations, h = eA((0, s.useState)(r.baseURL), 2), g = h[0], m = h[1], v = eA((0, s.useState)(p), 2), y = v[0], b = v[1], w = eA((0, s.useState)(""), 2), x = w[0], E = w[1], S = eA((0, s.useState)({ show: !1 }), 2), C = S[0], k = S[1], _ = xN(), T = _.transformationsState, I = _.transformationsDispatch, O = qL(o, c), j = O.presetsOrGroups, P = O.isLoading, A = O.defaultValues, N = r.baseURL.split("/"), M = N[N.length - 1], L = T.content.io.length > 0, D = zv((function() {
+ var e = T.content.io.length > 0, t = T.content.format !== fN.content.format || T.content.quality !== fN.content.quality;
+ if (e || t) {
+ var n = ML(T, A);
+ m(`${r.baseURL}?${n}`);
+ } else m(r.baseURL);
+ }), 500);
+ return (0, s.useEffect)((function() {
+ return D(), function() {
+ return D.cancel();
+ };
+ }), [
+ D,
+ T,
+ r.baseURL
+ ]), (0, s.useEffect)((function() {
+ var e, t;
+ I({
+ type: "focuspoint",
+ payload: {
+ value: [Math.floor(100 * (r == null || (e = r.activeOriginalFocusPoint) == null ? void 0 : e.x) / r.width), Math.floor(100 * (r == null || (t = r.activeOriginalFocusPoint) == null ? void 0 : t.y) / r.height)],
+ id: void 0
+ }
+ });
+ }), [
+ r == null || (t = r.activeOriginalFocusPoint) == null ? void 0 : t.x,
+ r == null || (n = r.activeOriginalFocusPoint) == null ? void 0 : n.y,
+ r.height,
+ r.width,
+ I
+ ]), (0, s.useEffect)((function() {
+ o || i && b(cN.transformations);
+ }), [o, i]), s.default.createElement(ZL, null, s.default.createElement(KL, { alignItems: "stretch" }, s.default.createElement(DL, {
+ mediaInfo: r,
+ url: g,
+ canViewTransformations: i,
+ activeTab: y,
+ onApply: d ? function() {
+ return d(g, T);
+ } : void 0,
+ onBack: function() {
+ return f(g, T);
+ },
+ hasActiveChanges: L,
+ onDone: function() {
+ var e = !o && !L;
+ k && k({ show: !1 }), e ? u(g, T) : o && b(cN.presets);
+ },
+ onShowTransformations: function() {
+ i && b(cN.transformations);
+ },
+ hideBottomBar: l,
+ showEditor: C,
+ defaultValues: A
+ }), s.default.createElement(aL, {
+ onPresetSelected: function(e) {
+ e === "" ? (I({ type: "init" }), m(r.baseURL)) : m(r.baseURL.split("/transform")[0] + `/transform/${e}/${FA(r.baseURL)}/${M}`), E(e);
+ },
+ activeTab: y,
+ presets: j,
+ selectedPreset: x,
+ isLoading: P,
+ baseURL: r.baseURL,
+ canViewPresets: o,
+ canViewTransformations: i,
+ setShowEditor: k,
+ showEditor: C
+ })));
+}
+var ZL = ao.div.withConfig({
+ displayName: "MainWrapper",
+ componentId: "sc-inplsu-0"
+})(["overflow:hidden;height:100%;width:100%;"]), KL = ao(Bs).withConfig({
+ displayName: "StyledFlex",
+ componentId: "sc-inplsu-1"
+})(["position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;"]);
+ao(gg).withConfig({
+ displayName: "StyledCheckbox",
+ componentId: "sc-bpy0n2-0"
+})([
+ "padding-top:",
+ ";padding-bottom:",
+ ";"
+], po.spacing3, po.spacing3), ao(Bs).withConfig({
+ displayName: "PresetNameIconContainer",
+ componentId: "sc-1xqeu8r-0"
+})(["padding-left:", ";"], (function(e) {
+ return e.belongsToAGroup ? po.spacing5 : "0";
+})), ao.div.withConfig({
+ displayName: "DateContainer",
+ componentId: "sc-1xqeu8r-1"
+})([
+ "font-size:",
+ ";color:",
+ ";"
+], po.fontSize75, po.gray600), ao.div.withConfig({
+ displayName: "Name",
+ componentId: "sc-1xqeu8r-2"
+})([
+ "font-size:",
+ ";color:",
+ ";flex:1;"
+], po.fontSize100, po.gray800), ao(Bs).withConfig({
+ displayName: "DescriptionContainer",
+ componentId: "sc-1xqeu8r-3"
+})(["flex-direction:column;flex:1;padding:0 ", ";"], po.spacing4), ao.div.withConfig({
+ displayName: "Description",
+ componentId: "sc-1xqeu8r-4"
+})([
+ "font-size:",
+ ";color:",
+ ";"
+], po.fontSize75, po.gray600), ao(Bs).withConfig({
+ displayName: "Actions",
+ componentId: "sc-1xqeu8r-5"
+})(["margin-left:", ";justify-content:end;"], po.spacing4), ao(Bs).withConfig({
+ displayName: "GroupNameIconContainer",
+ componentId: "sc-1wo12bf-0"
+})([""]), ao(Bs).withConfig({
+ displayName: "PresetGroupHeader",
+ componentId: "sc-n34u1w-0"
+})([
+ "z-index:1;position:sticky;z-index:1;top:var(--pageHeaderTopPosition);margin-bottom:",
+ ";padding:",
+ " ",
+ ";background:",
+ ";"
+], po.spacing7, po.spacing5, po.spacing6, po.white), ao(Bs).withConfig({
+ displayName: "PresetGroupHeaderTitle",
+ componentId: "sc-n34u1w-1"
+})(["flex:1 0 0;align-self:stretch;height:40px;"]), ao.label.withConfig({
+ displayName: "HeaderText",
+ componentId: "sc-n34u1w-2"
+})(["", " min-width:200px;flex:1 0 0;"], Vi.uiTextL), ao.header.withConfig({
+ displayName: "Header",
+ componentId: "sc-1ty8ai5-0"
+})([
+ "position:sticky;z-index:1;top:var(--pageHeaderTopPosition);display:flex;gap:",
+ ";justify-content:space-between;align-items:center;margin-bottom:",
+ ";padding:",
+ " ",
+ ";background:",
+ ";"
+], po.spacing4, po.spacing7, po.spacing5, po.spacing6, po.white), ao.h3.withConfig({
+ displayName: "Title",
+ componentId: "sc-1ty8ai5-1"
+})(["", " margin:0;"], Vi.uiTextL);
+var XL = ao.p.withConfig({
+ displayName: "Text",
+ componentId: "sc-17jdf49-0"
+})([
+ "",
+ " color:",
+ ";margin:0;"
+], Vi.uiTextS, po.gray800a);
+ao(XL).withConfig({
+ displayName: "SubTitle",
+ componentId: "sc-17jdf49-1"
+})(["", " font-weight:bold;margin:0;margin-bottom:0;"], Vi.uiTextS), ao(XL).withConfig({
+ displayName: "Title",
+ componentId: "sc-17jdf49-2"
+})([
+ "",
+ " font-weight:bold;margin:0;margin-bottom:",
+ ";"
+], Vi.uiTextS, po.spacing3), ao.p.withConfig({
+ displayName: "TransparentText",
+ componentId: "sc-17jdf49-3"
+})([
+ "",
+ " color:",
+ ";margin-bottom:",
+ ";margin-top:",
+ ";height:20px;"
+], Vi.uiTextS, po.gray400a, po.spacing1, po.spacing1), ao.div.withConfig({
+ displayName: "TitleIconWrapper",
+ componentId: "sc-17jdf49-4"
+})(["display:flex;align-items:center;display:flex;padding:", " 0px;"], po.spacing3);
+var JL, QL, eD, tD, nD, rD, oD, iD, aD, sD, lD, cD = function(e) {
+ return ao(e).withConfig({ componentId: "sc-17jdf49-5" })([
+ "margin-right:",
+ ";width:14px;height:14px;color:",
+ ";"
+ ], po.spacing3, po.gray800a);
+};
+function uD() {
+ return (uD = ZP(GP().mark((function e(t) {
+ var n;
+ return GP().wrap((function(e) {
+ for (;;) switch (e.prev = e.next) {
+ case 0:
+ e.next = 2;
+ break;
+ case 2: return e.prev = 2, e.next = 5, (0, ll.getJWT)();
+ case 5:
+ if (n = e.sent) {
+ e.next = 8;
+ break;
+ }
+ return e.abrupt("return", t);
+ case 8: return e.abrupt("return", qP(qP({}, t), {}, { headers: qP(qP({}, t.headers), {}, { Authorization: `Bearer ${n}` }) }));
+ case 11: return e.prev = 11, e.t0 = e.catch(2), e.abrupt("return", Promise.reject(e.t0));
+ case 14:
+ case "end": return e.stop();
+ }
+ }), e, null, [[2, 11]]);
+ })))).apply(this, arguments);
+}
+ao(Bs).attrs((function() {
+ return {
+ justifyContent: "space-between",
+ alignItems: "center",
+ gap: "1"
+ };
+})).withConfig({
+ displayName: "StyledFlex",
+ componentId: "sc-17jdf49-6"
+})([
+ "margin:0;padding:0;height:20px;margin-bottom:",
+ ";",
+ "{max-width:200px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}"
+], po.spacing1, XL), ao.div.withConfig({
+ displayName: "ButtonWrapper",
+ componentId: "sc-17jdf49-7"
+})(["margin:", " 0 0 0;display:flex;justify-content:center;"], po.spacing5), ao.div.withConfig({
+ displayName: "MainWrapper",
+ componentId: "sc-17jdf49-8"
+})(["margin-bottom:", ";"], po.spacing7), ao.div.withConfig({
+ displayName: "HeadingL",
+ componentId: "sc-17jdf49-9"
+})([
+ "",
+ " color:",
+ ";margin:0;"
+], Vi.headingL, po.colorText), ao.div.withConfig({
+ displayName: "HeadingM",
+ componentId: "sc-17jdf49-10"
+})([
+ "",
+ " color:",
+ ";margin:0;"
+], Vi.headingM, po.colorTextMuted), cD(cy), cD((function({ size: e = "24px", style: t = {}, ...n }) {
+ let r = {
+ verticalAlign: "middle",
+ ...t
+ };
+ return (0, Go.jsx)("svg", {
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "currentColor",
+ viewBox: "0 0 24 24",
+ width: e,
+ height: e,
+ style: r,
+ "aria-hidden": "true",
+ ...n,
+ children: (0, Go.jsx)("path", {
+ fill: "currentColor",
+ d: "M4.646 18.015a1.5 1.5 0 0 1 2.322-1.9A6.5 6.5 0 1 0 12 5.5a1.5 1.5 0 0 1 0-3.001 9.5 9.5 0 1 1-7.354 15.515Z"
+ })
+ });
+})), cD((function(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z" }
+ }]
+ })(e);
+})), cD((function(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0V0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20a2 2 0 002 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2zm-7 5h5v5h-5z" }
+ }]
+ })(e);
+})), cD((function(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0V0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M17 15h2V7c0-1.1-.9-2-2-2H9v2h8v8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2H7z" }
+ }]
+ })(e);
+})), ao.div.withConfig({
+ displayName: "NumbersFlex",
+ componentId: "sc-17jdf49-11"
+})(["display:flex;align-items:baseline;gap:", ";"], po.spacing3), function(e) {
+ e.totalViews = "Total views", e.website = "Website", e.datPresets = "DAT Presets", e.transformations = "Transformations", e.typeOfUrl = "Type of URL";
+}(JL ||= {}), function(e) {
+ e.table = "table", e.graph = "graph";
+}(QL ||= {}), function(e) {
+ e.timestamp = "timestamp", e.website = "website", e.transformation = "transformation", e.preset = "preset";
+}(eD ||= {}), function(e) {
+ e.views = "views", e.use = "use";
+}(tD ||= {}), function(e) {
+ e.viewsOverTime = "viewsOverTime", e.websitesOverTime = "websitesOverTime", e.transformations = "transformations", e.presets = "presets";
+}(nD ||= {}), GN.interceptors.request.use((function(e) {
+ return function(e) {
+ return uD.apply(this, arguments);
+ }(e);
+}), (function(e) {
+ return Promise.reject(e);
+})), KP(rD = {}, nD.viewsOverTime, ""), KP(rD, nD.websitesOverTime, "&aggregation=website"), KP(rD, nD.transformations, "&aggregation=transformations"), KP(rD, nD.presets, "&aggregation=presets"), function(e) {
+ e.metricType = "Metric Type", e.visualization = "Visualization", e.metricsModal = "Metrics Modal", e.statisticsTab = "Statistics Tab";
+}(oD ||= {}), function(e) {
+ e.selected = "Selected", e.opened = "Opened", e.closed = "Closed";
+}(iD ||= {}), ao.span.withConfig({
+ displayName: "WhiteText",
+ componentId: "sc-1leozr3-0"
+})(["color:", " !important;"], po.colorText), ao.span.withConfig({
+ displayName: "GrayText",
+ componentId: "sc-1leozr3-1"
+})(["color:", " !important;"], po.colorTextMuted), ao.div.withConfig({
+ displayName: "TooltipGuide",
+ componentId: "sc-ikpb3e-0"
+})([
+ "width:10px;height:10px;postion:absolute;top:",
+ "px;left:",
+ "px;"
+], (function(e) {
+ return e.top || 0;
+}), (function(e) {
+ return e.left || 0;
+})), ao.div.withConfig({
+ displayName: "Wrapper",
+ componentId: "sc-1eva1zc-0"
+})(["height:350px;width:100%;max-width:", ";position:relative;"], (function(e) {
+ return e.maxWidth || "auto";
+})), JL.totalViews, KP(aD = {}, nD.websitesOverTime, {
+ sortingColumn: tD.views,
+ isAscending: !1,
+ dateFiltering: { interval: "months" }
+}), KP(aD, nD.transformations, {
+ sortingColumn: tD.use,
+ isAscending: !1,
+ dateFiltering: { interval: "months" }
+}), KP(aD, nD.viewsOverTime, {
+ sortingColumn: eD.timestamp,
+ isAscending: !1,
+ dateFiltering: { interval: "months" }
+}), KP(aD, nD.presets, {
+ sortingColumn: tD.views,
+ isAscending: !1,
+ dateFiltering: { interval: "months" }
+}), KP(sD = {}, nD.viewsOverTime, {
+ key: eD.timestamp,
+ value: tD.views
+}), KP(sD, nD.websitesOverTime, {
+ key: eD.website,
+ value: tD.views
+}), KP(sD, nD.transformations, {
+ key: eD.transformation,
+ value: tD.use
+}), KP(sD, nD.presets, {
+ key: eD.preset,
+ value: tD.views
+}), KP(lD = {}, eD.timestamp, "Month"), KP(lD, eD.website, "Website"), KP(lD, eD.transformation, "Transformation"), KP(lD, eD.preset, "Preset"), KP(lD, tD.views, "Views"), KP(lD, tD.use, "Usage"), ao.div.withConfig({
+ displayName: "Container",
+ componentId: "sc-12s3spg-0"
+})([
+ "display:flex;flex:none;flex-grow:1;flex-direction:column;gap:",
+ ";align-items:flex-start;order:0;padding:",
+ " 0;"
+], po.spacing2, po.spacing5), ao.div.withConfig({
+ displayName: "ItemsRow",
+ componentId: "sc-12s3spg-1"
+})([
+ "display:flex;flex:none;flex-grow:0;flex-direction:row;gap:",
+ ";align-items:flex-start;order:0;height:68px;padding:0 ",
+ ";border-radius:5px;"
+], po.spacing2, po.spacing5);
+var dD = ao.div.withConfig({
+ displayName: "ItemUnselected",
+ componentId: "sc-12s3spg-2"
+})([
+ "flex:none;flex-grow:1;order:0;width:",
+ ";height:68px;border-radius:5px;background:",
+ ";cursor:pointer;&:hover{background-color:",
+ ";color:",
+ ";}",
+ ""
+], (function(e) {
+ return e.itemsPerRow === 3 ? "165px" : "123px";
+}), po.gray25, po.gray50, po.gray800, (function(e) {
+ return e.isDotted ? `
+ ::after {
+ content: '.';
+ position: relative;
+ bottom: ${po.spacing5};
+ display: grid;
+ width: 4px;
+ height: 4px;
+ padding: 0;
+ border-radius: 4px;
+ background: #09f;
+ color: #09f0;
+ left: ${e.itemsPerRow === 3 ? "80px" : "60px"};
+ }
+ ` : "";
+}));
+ao(dD).withConfig({
+ displayName: "ItemSelected",
+ componentId: "sc-12s3spg-3"
+})([
+ "background:",
+ ";color:",
+ ";&:hover{background-color:",
+ ";color:",
+ ";}",
+ ""
+], po.blue500, po.white, po.blue600, po.white, (function(e) {
+ return e.isDotted ? `
+ ::after {
+ background: ${po.white};
+ }
+ ` : "";
+})), ao(dD).withConfig({
+ displayName: "ItemInBetween",
+ componentId: "sc-12s3spg-4"
+})([
+ "background:",
+ ";color:",
+ ";&:hover{background-color:",
+ ";}"
+], po.blue100, po.gray800, po.blue200), ao.div.withConfig({
+ displayName: "ItemText",
+ componentId: "sc-12s3spg-5"
+})(["position:relative;display:flex;flex-direction:column;align-items:center;height:40px;padding-top:14px;padding-bottom:14px;", " letter-spacing:0.01em;text-align:center;"], Vi.uiTextM), ao.div.withConfig({
+ displayName: "StyledContainer",
+ componentId: "sc-zdosa4-0"
+})(["min-width:500px;.rdp-months{display:flex;gap:16px;}"]), ao(Bs).withConfig({
+ displayName: "FooterContainer",
+ componentId: "sc-zdosa4-1"
+})(["margin-top:", ";"], po.spacing4), ao((function(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M23 8c0 1.1-.9 2-2 2a1.7 1.7 0 01-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56A1.7 1.7 0 0119 8c0-1.1.9-2 2-2s2 .9 2 2z" }
+ }]
+ })(e);
+})).withConfig({
+ displayName: "GraphIcon",
+ componentId: "sc-1a1xt2-0"
+})(["width:22px;"]), ao((function(e) {
+ return Hv({
+ tag: "svg",
+ attr: { viewBox: "0 0 24 24" },
+ child: [{
+ tag: "path",
+ attr: {
+ fill: "none",
+ d: "M0 0h24v24H0z"
+ }
+ }, {
+ tag: "path",
+ attr: { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 8h-6V5h6v6zm-8-6v6H5V5h6zm-6 8h6v6H5v-6zm8 6v-6h6v6h-6z" }
+ }]
+ })(e);
+})).withConfig({
+ displayName: "TableIcon",
+ componentId: "sc-1a1xt2-1"
+})(["width:18px;height:18px;"]);
+var fD, pD, hD, gD;
+ao(ao(il).withConfig({
+ displayName: "ButtonGroupButton",
+ componentId: "sc-1a1xt2-2"
+})(["display:flex;flex-direction:row;justify-content:center;width:46px;height:36px;border-radius:", ";align-items:center;padding:0px 10px;"], po.radiusMedium)).withConfig({
+ displayName: "ActiveButtonGroupButton",
+ componentId: "sc-1a1xt2-3"
+})([
+ "background:",
+ ";box-shadow:",
+ ";"
+], po.gray10, po.elevationStatic), ao.div.withConfig({
+ displayName: "ButtonGroup",
+ componentId: "sc-1a1xt2-4"
+})([
+ "display:flex;flex-direction:row;justify-content:center;align-items:center;padding:",
+ ";gap:",
+ ";width:98px;height:",
+ ";background:",
+ ";border-radius:",
+ ";"
+], po.spacing1, po.spacing1, po.spacing8, po.gray50a, po.radiusLarge), ao.div.withConfig({
+ displayName: "Left",
+ componentId: "sc-1a1xt2-5"
+})([
+ "display:flex;flex-direction:row;align-items:center;padding:0;gap:",
+ ";height:",
+ ";"
+], po.spacing3, po.spacing8), ao(Bs).withConfig({
+ displayName: "Filters",
+ componentId: "sc-1a1xt2-6"
+})([
+ "padding:",
+ " ",
+ " ",
+ " 0;height:56px;"
+], po.spacing3, po.spacing6, po.spacing3), ao.div.withConfig({
+ displayName: "StyledDropdown",
+ componentId: "sc-1a1xt2-7"
+})(["& > div{z-index:1;}"]), lo(["#layers > div{z-index:1032;}"]), ao.div.withConfig({
+ displayName: "Wrapper",
+ componentId: "sc-iweq3l-0"
+})(["padding:", " 0 0 0;"], po.spacing6), nD.viewsOverTime, po.blue900, po.blue100, po.blue500, po.teal500, po.purple500, po.magenta500, po.yellow500, po.teal700, po.magenta300, po.purple300, ao.div.withConfig({
+ displayName: "WebsiteContainer",
+ componentId: "sc-lus667-0"
+})(["color:#99a7ad;"]), ao.div.withConfig({
+ displayName: "ViewsContainer",
+ componentId: "sc-lus667-1"
+})(["color:#ffffff;"]), ao.div.withConfig({
+ displayName: "TooltipContainer",
+ componentId: "sc-lus667-2"
+})(["flex-direction:column;align-items:flex-start;padding:8px 12px;gap:8px;background:rgba(0,34,51,0.9);box-shadow:0px 0px 1px rgba(0,34,51,0.1),0px 2px 4px -1px rgba(0,34,51,0.1);border-radius:5px;flex:none;order:1;flex-grow:0;z-index:1;"]), ao.i.withConfig({
+ displayName: "Icon",
+ componentId: "sc-24wsyz-0"
+})(["padding:0;margin:0;display:inline-block;width:16px;height:16px;background:", ";"], (function(e) {
+ return e.color;
+})), ao.div.withConfig({
+ displayName: "Wrapper",
+ componentId: "sc-24wsyz-1"
+})(["padding:", ";min-width:240px;"], po.spacing4), nD.websitesOverTime, nD.transformations, nD.presets, ao.div.withConfig({
+ displayName: "MinHeightDiv",
+ componentId: "sc-gqtbev-0"
+})(["min-height:488px;"]), ao.span.withConfig({
+ displayName: "BoldVerticalNavTitle",
+ componentId: "sc-16u0rfh-0"
+})(["font-weight:600;"]), ao.div.withConfig({
+ displayName: "DivWithBottomPadding",
+ componentId: "sc-16u0rfh-1"
+})(["margin-bottom:", ";"], po.spacing6), JL.totalViews, JL.website, JL.transformations, function(e) {
+ e.property = "property", e.status = "status", e.migratedAssets = "migratedAssets", e.initiatedBy = "initiatedBy", e.startTime = "startTime", e.endTime = "endTime", e.note = "note", e.id = "id", e.accountId = "accountId", e.totalAssets = "totalAssets";
+}(pD ||= {}), function(e) {
+ e.failed = "failed", e.inProgress = "in progress", e.completed = "completed", e.test = "test";
+}(hD ||= {}), KP(fD = {}, pD.property, "Property"), KP(fD, pD.status, "Status"), KP(fD, pD.migratedAssets, "Affected assets"), KP(fD, pD.initiatedBy, "Initiated by"), KP(fD, pD.startTime, "Start time"), KP(fD, pD.endTime, "End time"), KP(fD, pD.note, "Note"), KP(fD, pD.id, "Task ID"), KP(fD, pD.accountId, "Account ID"), pD.property, pD.status, pD.migratedAssets, pD.initiatedBy, pD.startTime, pD.endTime, pD.note, pD.id, pD.accountId, KP(gD = {}, pD.property, "Property"), KP(gD, pD.status, "Status"), KP(gD, pD.migratedAssets, "Affected assets"), KP(gD, pD.initiatedBy, "Initiated by"), KP(gD, pD.startTime, "Start time"), KP(gD, pD.endTime, "End time"), KP(gD, pD.note, "Note"), KP(gD, pD.id, "Task ID"), KP(gD, pD.accountId, "Account ID"), ao.div.withConfig({
+ displayName: "TableWrapper",
+ componentId: "sc-k1dhhi-0"
+})(["width:", "px;"], (function(e) {
+ return 220 * e.colsnumber;
+})), ao.label.withConfig({
+ displayName: "TextM",
+ componentId: "sc-k1dhhi-1"
+})(["", ""], Vi.uiTextM), ao.div.withConfig({
+ displayName: "Wrapper",
+ componentId: "sc-k1dhhi-2"
+})(["overflow-x:scroll;width:100%;"]), ao.h2.withConfig({
+ displayName: "TextL",
+ componentId: "sc-k1dhhi-3"
+})(["", ""], Vi.uiTextL), ao.div.withConfig({
+ displayName: "Hidden",
+ componentId: "sc-1q2e3yp-0"
+})(["display:none;"]), ao.span.withConfig({
+ displayName: "PaddedSpan",
+ componentId: "sc-1q2e3yp-1"
+})(["padding-left:8px;"]), ao.label.withConfig({
+ displayName: "HeadingM",
+ componentId: "sc-1q2e3yp-2"
+})(["", ""], Vi.headingM), ao.label.withConfig({
+ displayName: "TextM",
+ componentId: "sc-1q2e3yp-3"
+})(["", ""], Vi.uiTextM), ao.label.withConfig({
+ displayName: "TextS",
+ componentId: "sc-1q2e3yp-4"
+})(["", ""], Vi.uiTextS);
+var vD = (ao.div.withConfig({
+ displayName: "WidthHeightFlex",
+ componentId: "sc-rwsoao-0"
+})([
+ "display:flex;padding-top:",
+ ";padding-left:",
+ ";align-self:stretch;gap:",
+ ";"
+], po.spacing3, po.spacing6, po.spacing2), ao.div.withConfig({
+ displayName: "BaseFlexFrame",
+ componentId: "sc-rwsoao-1"
+})([
+ "margin-bottom:",
+ ";padding:",
+ ";background:",
+ ";border-radius:",
+ ";"
+], po.spacing4, po.spacing4, po.gray25a, po.radiusMedium));
+ao(vD).withConfig({
+ displayName: "AdaptiveVideoLinksFlex",
+ componentId: "sc-rwsoao-2"
+})([
+ "border-radius:",
+ ";display:flex;flex-direction:column;gap:",
+ ";"
+], po.radiusMedium, po.spacing3), ao(vD).withConfig({
+ displayName: "CodeControlsFlex",
+ componentId: "sc-rwsoao-3"
+})(["display:flex;justify-content:stretch;padding:0;gap:", ";"], po.spacing3), ao(vD).withConfig({
+ displayName: "CodeSnippetFlex",
+ componentId: "sc-rwsoao-4"
+})(["padding:0;"]), ao.span.withConfig({
+ displayName: "GrayText",
+ componentId: "sc-rwsoao-5"
+})(["color:", ";"], po.gray600a), ao.div.withConfig({
+ displayName: "AdvancedLinkContainer",
+ componentId: "sc-rwsoao-6"
+})(["display:flex;justify-content:space-between;"]), ao(Gl).withConfig({
+ displayName: "WidthHeightInput",
+ componentId: "sc-rwsoao-7"
+})([
+ "background:",
+ ";padding:0 ",
+ ";"
+], po.gray25a, po.spacing5), ao(il).withConfig({
+ displayName: "ButtonWith3PercentBackground",
+ componentId: "sc-rwsoao-8"
+})(["background:", " !important;"], po.gray25a), ao.div.withConfig({
+ displayName: "CopyCodeDiv",
+ componentId: "sc-rwsoao-9"
+})(["flex:1;"]), ao.div.withConfig({
+ displayName: "ShowCodeDiv",
+ componentId: "sc-rwsoao-10"
+})(["flex:0 0 auto;"]), ao(Gl).withConfig({
+ displayName: "AdaptiveFormatInput",
+ componentId: "sc-rwsoao-11"
+})(["background-color:", ";"], po.gray25a), ao.label.withConfig({
+ displayName: "Label",
+ componentId: "sc-rwsoao-12"
+})(["color:", ";padding:0;"], po.gray1000), ao.div.withConfig({
+ displayName: "SizeInputContainer",
+ componentId: "sc-rwsoao-13"
+})(["min-width:0;"]), ao.div.withConfig({
+ displayName: "ContainerForSubtitleToUpload",
+ componentId: "sc-67ufnh-0"
+})([
+ "margin-bottom:",
+ ";padding:",
+ " ",
+ " ",
+ " ",
+ ";background:",
+ ";border-radius:",
+ ";display:flex;flex-direction:column;"
+], po.spacing4, po.spacing3, po.spacing3, po.spacing3, po.spacing4, po.gray25a, po.radiusMedium), ao.div.withConfig({
+ displayName: "TopRowForSubtitleToUpload",
+ componentId: "sc-67ufnh-1"
+})(["display:flex;justify-content:stretch;gap:", ";align-items:center;"], po.spacing3), ao.div.withConfig({
+ displayName: "UploadedSubtitleRowFlex",
+ componentId: "sc-67ufnh-2"
+})([
+ "margin-bottom:",
+ ";padding:",
+ " ",
+ " ",
+ " ",
+ ";background:",
+ ";border-radius:",
+ ";display:flex;justify-content:stretch;gap:",
+ ";align-items:center;"
+], po.spacing4, po.spacing3, po.spacing3, po.spacing3, po.spacing4, po.gray25a, po.radiusMedium, po.spacing3), ao.div.withConfig({
+ displayName: "ScalingDiv",
+ componentId: "sc-67ufnh-3"
+})(["min-width:0;display:flex;flex:1;"]);
+var yD, bD = ao.div.withConfig({
+ displayName: "NonScalingDiv",
+ componentId: "sc-67ufnh-4"
+})(["display:flex;flex:0 0 auto;"]);
+function wD({ transformBaseUrl: e, assetName: t, extension: n, transformation: r, setTransformation: o, closeDat: i }) {
+ let l = mc(), [c, u] = (0, s.useState)(), [d, f] = (0, s.useState)();
+ (0, s.useEffect)((() => {
+ let e = l.querySelector(".cv-root");
+ e && u(e);
+ }), [l]);
+ let p = (e, t) => {
+ e && r && o({
+ url: e,
+ preset: t,
+ asset: r.asset
+ }), i();
+ }, h = (e, t) => {
+ m(t) && r ? f({
+ url: e,
+ preset: t,
+ asset: r.asset
+ }) : p(e, t);
+ }, g = () => f(void 0), m = (e) => e.content.io.length > 0;
+ return c ? (0, Qa.createPortal)(s.default.createElement(xD, null, s.default.createElement(ED, {
+ mediaInfo: {
+ extension: n,
+ baseURL: e,
+ name: t,
+ width: 1,
+ height: 1
+ },
+ canViewPresets: !1,
+ canViewTransformations: !0,
+ hideBottomBar: !0,
+ onApply: p,
+ onDone: h,
+ onBack: h,
+ initialTransformations: (r?.preset)?.content.io
+ }), s.default.createElement(ed, {
+ isOpen: !!d,
+ title: "Transformations not yet applied",
+ container: c,
+ onClose: g,
+ actionPrimary: s.default.createElement(il, {
+ variant: "primary",
+ onClick: () => {
+ p(d?.url, d?.preset), g();
+ }
+ }, "Apply transformations"),
+ actionSecondary: s.default.createElement(il, {
+ variant: "secondary",
+ onClick: g
+ }, "Cancel"),
+ actionTertiary: s.default.createElement(il, {
+ variant: "secondary",
+ onClick: () => {
+ o(void 0), g(), i();
+ }
+ }, "Discard changes")
+ }, "Transformations not yet applied. Do you want to apply transformations now, or discard changes?")), c) : null;
+}
+ao(bD).withConfig({
+ displayName: "SpinnerContainer",
+ componentId: "sc-67ufnh-5"
+})(["color:", ";display:flex;"], po.gray400a), ao.span.withConfig({
+ displayName: "GrayText",
+ componentId: "sc-67ufnh-6"
+})(["color:", ";"], po.gray600a), ao(il).withConfig({
+ displayName: "ButtonWith3PercentBackground",
+ componentId: "sc-67ufnh-7"
+})(["background:", " !important;"], po.gray25a), ao.div.withConfig({
+ displayName: "Wrapper",
+ componentId: "sc-67ufnh-8"
+})(["display:flex;width:100%;flex-direction:column;"]), ao.div.withConfig({
+ displayName: "NoSubtitlesText",
+ componentId: "sc-67ufnh-9"
+})(["margin-bottom:", ";"], po.spacing3), ao(bD).withConfig({
+ displayName: "FileNameContainer",
+ componentId: "sc-67ufnh-10"
+})(["width:", ";"], (function(e) {
+ return e.hasicon === "true" ? "239px" : "273px";
+})), ao(il).withConfig({
+ displayName: "StyledButton",
+ componentId: "sc-67ufnh-11"
+})(["cursor:default;"]), ao(bD).withConfig({
+ displayName: "ErrorIconContainer",
+ componentId: "sc-67ufnh-12"
+})(["color:", ";width:24px;"], po.red500), ao(bD).withConfig({
+ displayName: "WarningIconContainer",
+ componentId: "sc-67ufnh-13"
+})([
+ "background:",
+ ";width:20px;height:20px;color:",
+ ";border-radius:50%;"
+], po.yellow500, po.white), ao(Ti).withConfig({
+ displayName: "WarningIcon",
+ componentId: "sc-67ufnh-14"
+})(["width:20px;height:20px;"]), ao.div.withConfig({
+ displayName: "ErrorText",
+ componentId: "sc-67ufnh-15"
+})(["color:", ";"], po.red500), ao.div.withConfig({
+ displayName: "WarningText",
+ componentId: "sc-67ufnh-16"
+})(["color:", ";"], po.yellow500), ao.input.withConfig({
+ displayName: "HiddenInput",
+ componentId: "sc-b7ygyg-0"
+})(["display:none !important;"]), function(e) {
+ e[e.INCORRECT_CONTENT_TYPE = 0] = "INCORRECT_CONTENT_TYPE", e[e.MULTIPLE_FILES = 1] = "MULTIPLE_FILES";
+}(yD ||= {}), ao(Rv).withConfig({
+ displayName: "FullWidthCombobox",
+ componentId: "sc-aj9bpd-0"
+})(["width:100%;"]);
+const xD = ao.div`
+ background-color: ${po.white};
+ z-index: 999999;
+ overflow: hidden;
+ border-radius: ${po.radiusBase};
+ display: flex;
+ flex-direction: column;
+ align-items: stretch;
+ box-shadow: 0 2px 12px 0 rgba(0, 34, 51, 0.1);
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+`, ED = ao((function(e) {
+ return s.default.createElement(EN, null, s.default.createElement(YL, qP({}, e)));
+}))`
+ height: 100%;
+ width: 100%;
+`, SD = (0, s.createContext)(null);
+function CD(e) {
+ let [t, n] = (0, s.useState)(), [r, o] = (0, s.useState)(""), [i, a] = (0, s.useState)(""), [l, c] = (0, s.useState)(""), u = (e, t, r) => {
+ o(e), c(r), a(t.extensions[0] || ""), n(((n) => ({
+ preset: n?.asset.id === t.id ? n.preset : void 0,
+ url: e,
+ asset: t
+ })));
+ }, d = (0, s.useMemo)((() => ({
+ transformation: t,
+ setTransformation: n,
+ openDat: u,
+ closeDat: () => o("")
+ })), [t]);
+ return s.default.createElement(SD.Provider, { value: d }, e.children, r && s.default.createElement(wD, {
+ transformBaseUrl: r,
+ assetName: l,
+ extension: i,
+ transformation: t,
+ setTransformation: n,
+ closeDat: () => o("")
+ }));
+}
+function kD() {
+ let e = (0, s.useContext)(SD);
+ if (e === null) throw Error("useTransformations must be used with a DatProvider");
+ return e;
+}
+function _D({ transformBaseUrl: e, asset: t, toggleDropdown: n }) {
+ let { transformation: l, openDat: c } = kD(), [u, d] = (0, s.useState)(), f = l?.preset?.content?.io?.length ?? 0;
+ return (0, s.useEffect)((() => {
+ if (l) {
+ let { url: e } = l, t = "io=transform:fill,width:40,height:40";
+ e.includes("io=transform:fill") && d(e.replace(/io=transform:fill,width:[0-9]+,height:[0-9]+/, t)), d(`${e}&${t}`);
+ }
+ }), [l]), e ? s.default.createElement(s.default.Fragment, null, s.default.createElement(om.Divider, null), s.default.createElement(TD, {
+ thumbnail: l && f !== 0 ? s.default.createElement(Dh, {
+ variant: "content",
+ imageUrl: u,
+ "data-testid": "thumbnail-image"
+ }) : s.default.createElement(Dh, {
+ icon: s.default.createElement(mi, null),
+ "data-testid": "crop-icon"
+ }),
+ rightElements: s.default.createElement(Qo, null),
+ onClick: () => {
+ n(), c(e, t, t.name);
+ },
+ subtext: l && f > 0 ? `${f} transformation${f === 1 ? "" : "s"}` : ""
+ }, "New transformation")) : null;
+}
+const TD = ao(om.Item)`
+ max-width: 100%;
+ width: 340px;
+ margin-left: 0;
+`;
+var ID = function(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+};
+const OD = (0, s.createContext)(null);
+function jD(e) {
+ let [t, n] = (0, s.useState)([]), [r, o] = (0, s.useState)([]), [i, a] = (0, s.useState)(), l = function(e) {
+ let [t, n] = (0, s.useState)([]), { selectionMode: r, language: o, noCache: i } = vo(), a = gd(), l = !1, c = (e) => ID(this, void 0, void 0, (function* () {
+ var t;
+ if (e.length) {
+ let s = yield function(e) {
+ return yp(this, void 0, void 0, (function* () {
+ let { ids: t, auth: n, language: r, noCache: o } = e, s = yield Cd({
+ query: `\n query getAssetsById($ids: [ID!]!, $language: String) {\n nodes(ids: $ids) {\n __typename\n id\n ...on Asset {\n ...DisplayAsset\n files\n }\n }\n }\n ${bp}`,
+ variables: {
+ ids: t,
+ language: r
+ },
+ auth: n,
+ noCache: o
+ });
+ return nc(s) ? s : Ql(s.value.nodes);
+ }));
+ }({
+ ids: e,
+ auth: a,
+ language: o,
+ noCache: i
+ });
+ l || nc(s) || ((t = s.value) == null || t.sort(((t, n) => e.indexOf(t.id) - e.indexOf(n.id))), n(s.value ?? []));
+ }
+ }));
+ return (0, s.useEffect)((() => {
+ if (e) {
+ let t = e ?? [];
+ r !== "MultiSelect" && (t = t[0] ? [t[0]] : []), c(t);
+ }
+ return () => {
+ l = !0;
+ };
+ }), [e]), t;
+ }(i), c = bo(), { transformation: u } = kD();
+ function d(e) {
+ e.tag === "Loaded" && e.value && o(e.value);
+ }
+ function f() {
+ n(((e) => {
+ let t = r.filter(((t) => !e.some(((e) => e.value.id === t.id))));
+ return [...e, ...t.map(((e) => ({
+ type: "asset",
+ value: e
+ })))];
+ }));
+ }
+ function p() {
+ n([]);
+ }
+ function h(e) {
+ n(((t) => {
+ let n = e.filter(((e) => !PD(t, e)));
+ return [...t, ...n.map(((e) => ({
+ type: "asset",
+ value: e
+ })))];
+ }));
+ }
+ function g(e) {
+ var r;
+ c === "MultiSelect" ? n(((t) => {
+ let n = e.filter(((e) => !PD(t, e))), r = e.filter(((e) => PD(t, e)));
+ return [...t.filter(((e) => !r.some(((t) => t.id === e.value.id)))), ...n.map(((e) => ({
+ type: "asset",
+ value: e
+ })))];
+ })) : (r = e[0], t.some(((e) => e.value.id === r.id)) ? n([]) : n([{
+ type: "asset",
+ value: r
+ }]));
+ }
+ function m(e) {
+ n(((t) => PD(t, e) ? t.filter(((t) => t.value.id !== e.id)) : [...t, {
+ type: "collection",
+ value: e
+ }]));
+ }
+ (0, s.useEffect)((() => {
+ a((e.preselectedAssetIds ?? []).filter(((e) => !!e)).map(((e) => window.btoa("(Asset_id " + e + ")"))));
+ }), [e.preselectedAssetIds]), (0, s.useEffect)((() => {
+ h(l);
+ }), [l]), (0, s.useEffect)((() => {
+ u && (p(), h([u?.asset]));
+ }), [u]);
+ let v = (0, s.useMemo)((() => ({
+ selection: t,
+ preselectedAssetIds: i,
+ clear: p,
+ selectAssets: h,
+ toggleAssets: g,
+ toggleCollection: m,
+ selectAll: f,
+ setAllAssets: d
+ })), [t, r]);
+ return s.default.createElement(OD.Provider, { value: v }, e.children);
+}
+function PD(e, t) {
+ return e.some(((e) => e.value.id === t.id));
+}
+function AD() {
+ let e = (0, s.useContext)(OD);
+ if (e === null) throw Error("useSelection must be used with a SelectionProvider");
+ return e;
+}
+function ND({ collection: e, fadeIn: t = !0, isSelected: n, style: r }) {
+ let o = bo(), [, i] = Ro(), a = AD(), { hideExternalAccess: l } = vo();
+ return s.default.createElement(MD, {
+ id: e.id,
+ style: r,
+ $fadeIn: t
+ }, s.default.createElement(op, {
+ contextAction: !l && s.default.createElement(op.ContextActionButton, {
+ "aria-label": Kl("Open in new tab"),
+ onClick: () => {
+ window.open(e.url, "_blank");
+ }
+ }, s.default.createElement(ji, null)),
+ selectButtonAriaLabel: Kl(n ? "Deselect" : "Select"),
+ onSelect: o === "MultiSelect" ? (t) => {
+ t.stopPropagation(), a.toggleCollection(e);
+ } : void 0,
+ isSelected: n,
+ onClick: () => i({
+ page: "collection",
+ collection: e
+ }),
+ "aria-selected": n,
+ "data-testid": "asset-card"
+ }, s.default.createElement(op.Frame, null, s.default.createElement(op.Images, null, e.thumbnailUrls.slice(0, 3).map(((t) => s.default.createElement(op.Img, {
+ key: t,
+ src: t,
+ alt: e.name
+ }))))), s.default.createElement(op.Header, {
+ title: e.name,
+ "data-testid": "asset-name"
+ }), s.default.createElement(LD, null, Of(e.assetCount, Kl("{} asset"), Kl("{} assets")))));
+}
+const MD = ao.div`
+ width: 224px;
+ position: relative;
+ margin: ${po.spacing3};
+ align-self: flex-start;
+ ${(e) => e.$fadeIn ? "animation: var(--fade-in-down);" : ""}
+`, LD = ao.div`
+ padding: 0 0 ${po.spacing4} ${po.spacing5};
+ margin-top: -${po.spacing2};
+ font-size: ${po.fontSize75};
+ color: rgba(0, 34, 51, 0.5);
+`;
+function DD(e) {
+ let [t, n] = (0, s.useState)(void 0), r = (0, s.useRef)(void 0);
+ function o(t) {
+ r.current !== void 0 && cancelAnimationFrame(r.current), r.current = requestAnimationFrame((() => {
+ let r = t ?? e;
+ if (r === null) return;
+ let o = r.getBoundingClientRect();
+ n({
+ width: o.width,
+ height: o.height,
+ scrollWidth: r.scrollWidth
+ });
+ }));
+ }
+ return (0, s.useEffect)((() => {
+ o();
+ let e = () => o();
+ return window.addEventListener("resize", e), () => {
+ window.removeEventListener("resize", e), r.current && cancelAnimationFrame(r.current);
+ };
+ }), [e]), {
+ dimensions: t,
+ remeasure: o
+ };
+}
+function RD(e) {
+ let [t, n] = Ex();
+ return (0, s.useEffect)((() => {
+ n && !e.isLoading && e.hasNextPage && e.loadMore();
+ }), [n]), s.default.createElement(s.default.Fragment, null, e.children, e.hasNextPage && s.default.createElement(zD, {
+ ref: t,
+ "data-testid": "loading-element"
+ }, s.default.createElement(Yl, {
+ isHidden: !n,
+ isRelative: !0
+ })));
+}
+const zD = ao.div`
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ position: relative;
+ height: 128px;
+ width: 100%;
+`;
+function $D() {
+ return s.default.createElement("svg", {
+ viewBox: "0 5 60 82",
+ className: "h-20"
+ }, s.default.createElement("defs", null, s.default.createElement("filter", {
+ x: "-1.7%",
+ y: "-1.2%",
+ width: "103.3%",
+ height: "105%",
+ filterUnits: "objectBoundingBox",
+ id: "prefix__a"
+ }, s.default.createElement("feOffset", {
+ dy: "2",
+ in: "SourceAlpha",
+ result: "shadowOffsetOuter1"
+ }), s.default.createElement("feColorMatrix", {
+ values: "0 0 0 0 0 0 0 0 0 0.133333333 0 0 0 0 0.2 0 0 0 0.05 0",
+ in: "shadowOffsetOuter1"
+ })), s.default.createElement("filter", {
+ x: "-5%",
+ y: "-5%",
+ width: "110%",
+ height: "120%",
+ filterUnits: "objectBoundingBox",
+ id: "prefix__c"
+ }, s.default.createElement("feOffset", {
+ dy: "2",
+ in: "SourceAlpha",
+ result: "shadowOffsetOuter1"
+ }), s.default.createElement("feColorMatrix", {
+ values: "0 0 0 0 0 0 0 0 0 0.133333333 0 0 0 0 0.2 0 0 0 0.05 0",
+ in: "shadowOffsetOuter1"
+ })), s.default.createElement("path", {
+ d: "M5 5h35l20 20v55a5 5 0 01-5 5H5a5 5 0 01-5-5V10a5 5 0 015-5z",
+ id: "prefix__b"
+ }), s.default.createElement("path", {
+ d: "M40 5l20 20H45a5 5 0 01-5-5V5z",
+ id: "prefix__d"
+ })), s.default.createElement("g", {
+ fill: "none",
+ fillRule: "evenodd"
+ }, s.default.createElement("use", {
+ fill: "#000",
+ filter: "url(#prefix__a)",
+ xlinkHref: "#prefix__b"
+ }), s.default.createElement("use", {
+ fill: "#FFF",
+ xlinkHref: "#prefix__b"
+ }), s.default.createElement("g", { fillRule: "nonzero" }, s.default.createElement("use", {
+ fill: "#000",
+ filter: "url(#prefix__c)",
+ xlinkHref: "#prefix__d"
+ }), s.default.createElement("use", {
+ fill: "#FFF",
+ xlinkHref: "#prefix__d"
+ }))));
+}
+function BD(e) {
+ return s.default.createElement(FD, null, s.default.createElement(UD, null, s.default.createElement($D, null), s.default.createElement(HD, null)), s.default.createElement(WD, null, Kl("No results found")), s.default.createElement(VD, null, Kl("Try adjusting the filter to find assets.")), s.default.createElement(qD, null, s.default.createElement(il, {
+ variant: "primary",
+ title: Kl("Reset filters"),
+ onClick: e.onReset
+ }, Kl("Reset filters"))));
+}
+const FD = ao.div`
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+`, UD = ao.div`
+ background-color: ${po.gray25};
+ border-radius: 50%;
+ width: 160px;
+ height: 160px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+`, HD = ao(Mi)`
+ position: absolute;
+ margin: ${po.spacing2} 0 0 1px;
+ color: ${po.gray300};
+ width: 36px;
+ height: 36px;
+`, WD = ao.h1`
+ margin-top: ${po.spacing6};
+ font-size: ${po.fontSize400};
+`, VD = ao.span`
+ margin-top: ${po.spacing5};
+ color: ${po.colorTextDisabled};
+`, qD = ao.div`
+ margin-top: ${po.spacing7};
+`;
+function GD(e) {
+ let [r, o] = (0, s.useState)(null), { dimensions: i } = DD(r), a = function() {
+ let { selection: e } = AD();
+ return e.filter(((e) => e.type === "collection")).map(((e) => e.value.id));
+ }(), { setSearch: l } = Fo(), { data: c, isLoading: u, loadMore: d, hasNextPage: f } = e.connection, p = i === void 0 ? 0 : Math.ceil(i.height / 184), h = i === void 0 ? 0 : Math.round((i.width - 32) / 204);
+ return s.default.createElement("div", {
+ role: "listbox",
+ className: "card-list",
+ ref: (e) => {
+ o(e);
+ }
+ }, (c.tag === "Failure" || c.tag === "Loading" && !c.value) && s.default.createElement(fp, {
+ rows: p,
+ columns: h,
+ title: s.default.createElement(YD, null, "\xA0")
+ }), c.tag === "Loaded" && c.value?.collections.nodes.length === 0 && s.default.createElement(BD, { onReset: () => l("collections", "") }), (c.tag === "Loading" && !!c.value || c.tag === "Loaded" && c.value.collections.nodes.length > 0) && s.default.createElement(RD, {
+ hasNextPage: f,
+ isLoading: u,
+ loadMore: d
+ }, c.value?.collections.nodes.map(((e, t) => s.default.createElement(ND, {
+ key: e.id,
+ isSelected: a.includes(e.id),
+ collection: e,
+ fadeIn: t >= p * h
+ })))));
+}
+const YD = ao.div`
+ margin-top: ${po.spacing3};
+ font-size: ${po.fontSize75};
+`;
+var ZD = function(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+};
+function XD() {
+ let { value: e, setIsLoading: t } = Uo("collections"), n = No.use.collections(), { noCache: r } = vo(), o = function(e, t = !1) {
+ let r = gd(), [o, i] = (0, s.useState)({
+ tag: "Loading",
+ value: null
+ }), a = !1, l = (n) => ZD(this, void 0, void 0, (function* () {
+ i(((e) => ({
+ tag: "Loading",
+ value: e.tag === "Failure" ? null : e.value
+ })));
+ let l = yield Cd({
+ query: "\nquery getCollections($searchTerm: String, $orderBy: CollectionOrder!, $after: Cursor) {\n collections(after: $after, first: 50, filter: {name_contains: $searchTerm, assetCount_gte: 1}, orderBy: $orderBy) {\n nodes {\n id\n name\n assetCount\n thumbnailUrls\n url\n }\n totalCount\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}",
+ variables: Object.assign(Object.assign({}, e), {
+ searchTerm: e.searchTerm ?? null,
+ after: n ?? null
+ }),
+ auth: r,
+ noCache: t
+ });
+ a || (nc(l) ? i({
+ tag: "Failure",
+ value: l.error
+ }) : c(l, n));
+ })), c = (e, t) => {
+ u() && t ? i(((t) => {
+ let o = u(t)?.nodes ?? [];
+ return {
+ tag: "Loaded",
+ value: { collections: Object.assign(Object.assign({}, e.value.collections), { nodes: [...o, ...e.value.collections.nodes] }) }
+ };
+ })) : i({
+ tag: "Loaded",
+ value: e.value
+ });
+ }, u = (e) => {
+ let n = e ?? o;
+ if (n.tag !== "Failure") return n.value?.collections;
+ };
+ return (0, s.useEffect)((() => (l(), () => {
+ a = !0;
+ })), [e.searchTerm, e.orderBy]), {
+ data: o,
+ executeQuery: () => l(),
+ isLoading: !o || o.tag === "Loading",
+ loadMore: () => l(u()?.pageInfo.endCursor),
+ hasNextPage: !!u()?.pageInfo.hasNextPage
+ };
+ }({
+ searchTerm: e,
+ orderBy: n
+ }, r);
+ return (0, s.useEffect)((() => {
+ o.isLoading || t(!1);
+ }), [o.isLoading]), o.data.tag === "Failure" ? s.default.createElement(ad, {
+ error: Error(o.data.value),
+ onRetry: o.executeQuery
+ }) : s.default.createElement(JD, null, s.default.createElement(QD, null, o.data.value && s.default.createElement(eR, null, Of(o.data.value.collections.totalCount, Kl("{} collection"), Kl("{} collections"))), !o.data.value && s.default.createElement("span", { className: "flex-grow" }), s.default.createElement(Ef, { options: ["CREATED_AT", "NAME"] }), s.default.createElement(tf, null)), s.default.createElement(GD, { connection: o }));
+}
+const JD = ao.div`
+ display: flex;
+ flex-direction: column;
+ flex-grow: 1;
+ overflow-y: auto;
+`, QD = ao.div`
+ display: flex;
+ align-items: center;
+ padding: ${po.spacing5} ${po.spacing5} ${po.spacing3} ${po.spacing5};
+ z-index: 10;
+`, eR = ao.span`
+ color: rgba(0, 34, 51, 0.5);
+ flex-shrink: 0;
+ flex-grow: 1;
+ animation: fade-in-down 0.15s ease-out;
+`;
+function tR(e) {
+ return Kl({
+ AUDIO: "Audio",
+ DOCUMENT: "Document",
+ IMAGE: "Image",
+ VIDEO: "Video",
+ ARCHIVE: "Archive"
+ }[e]);
+}
+function nR(e) {
+ switch (e) {
+ case "AUDIO": return Wi;
+ case "DOCUMENT": return wi;
+ case "IMAGE": return ii;
+ case "VIDEO": return Hi;
+ case "ARCHIVE": return Ko;
+ }
+}
+function rR(e) {
+ return s.default.createElement(oR, null, s.default.createElement(il, {
+ icon: s.default.createElement(Qo, null),
+ "aria-label": "Next",
+ title: "Next",
+ variant: "clean",
+ isSmall: !0,
+ onClick: e.onClick,
+ "data-testid": "arrow-right",
+ isDisabled: e.isDisabled
+ }));
+}
+const oR = ao.div`
+ z-index: 20;
+ padding: 0;
+ box-shadow: -16px 0px 10px 0px #ffffff;
+ &:hover {
+ box-shadow: -16px 0px 10px 0px #ffffff;
+ }
+`;
+function iR(e) {
+ return s.default.createElement(aR, null, s.default.createElement(il, {
+ icon: s.default.createElement(Jo, null),
+ "aria-label": "Previous",
+ title: "Previous",
+ variant: "clean",
+ isSmall: !0,
+ onClick: e.onClick,
+ "data-testid": "arrow-left",
+ isDisabled: e.isDisabled
+ }));
+}
+const aR = ao.div`
+ z-index: 20;
+ padding: 0;
+ box-shadow: 4px 0 13px 13px #fff;
+ &:hover {
+ box-shadow: 4px 0 13px 13px #fff;
+ }
+`;
+function sR(e) {
+ let [t, n] = (0, s.useState)(0), r = (0, s.useRef)(null), { dimensions: o, remeasure: i } = DD(r.current), a = r.current === null ? 0 : r.current.scrollWidth - r.current.clientWidth, l = o !== void 0 && Math.ceil(o.width) < o.scrollWidth;
+ (0, s.useEffect)((() => {
+ i(r.current);
+ }), [e.children, r.current]), (0, s.useEffect)((() => {
+ l || n(0);
+ }), [l]);
+ let c = t === 0, u = a > 5 && t !== a;
+ return s.default.createElement(lR, { $isActiveFilter: e.isActiveFilter }, s.default.createElement(cR, { ref: r }, s.default.createElement(uR, {
+ "data-testid": "horizontal-scrollable-el",
+ $scroll: t
+ }, e.children)), l && s.default.createElement(iR, {
+ isDisabled: c,
+ onClick: function() {
+ n(((e) => {
+ let t = Math.max(e - 250, 0);
+ return t >= 100 ? t : 0;
+ }));
+ }
+ }), l && s.default.createElement(rR, {
+ isDisabled: !u,
+ onClick: function() {
+ n(((e) => {
+ let t = Math.min(e + 250, a);
+ return t <= a - 100 ? t : a;
+ }));
+ }
+ }), e.static);
+}
+const lR = ao.div`
+ display: inline-flex;
+ flex-grow: 1;
+ overflow: hidden;
+ height: ${po.spacing7};
+ margin-left: ${(e) => e.$isActiveFilter ? po.spacing3 : 0};
+`, cR = ao.div`
+ overflow: hidden;
+`, uR = ao.div`
+ display: inline-flex;
+ transform: translateX(-${(e) => e.$scroll}px);
+ transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.15);
+`;
+function dR(e) {
+ return s.default.createElement(fR, {
+ icon: e.icon,
+ size: "s",
+ onDelete: e.onClick,
+ "data-testid": `selected-filter:${e.title}`
+ }, e.title);
+}
+const fR = ao(Cp)`
+ background-color: transparent;
+ margin-right: ${po.spacing3};
+ border: 1px solid ${po.gray50};
+ box-shadow: 0 1px 6px -2px rgba(0, 34, 51, 0.1);
+
+ div {
+ svg {
+ width: 20px;
+ height: 20px;
+ margin-right: ${po.spacing2};
+ }
+ }
+`;
+function pR() {
+ let e = ff(), { isSelected: t, setIsSelected: n, isNLSSelected: r, setIsNLSSelected: o, NLSSearchText: i, setNLSSearchText: a } = Pd(), l = Object.values(e.selectedSmartfilterOptions || {}), c = l.length !== 0 || e.assetTypes.length !== 0 || e.tags.length !== 0 || t || r && i ? s.default.createElement(hR, null, s.default.createElement(il, {
+ variant: "clean",
+ isSmall: !0,
+ onClick: () => {
+ e.clear(), n(!1), o(!1), a(void 0);
+ }
+ }, Kl("Clear filters"))) : void 0;
+ return s.default.createElement("div", { "data-testid": "selected-filter-list" }, s.default.createElement(sR, {
+ isActiveFilter: !0,
+ static: c
+ }, e.assetTypes.map(((t) => {
+ let n = nR(t);
+ return s.default.createElement(dR, {
+ key: t,
+ onClick: () => e.removeAssetType(t),
+ title: tR(t),
+ icon: s.default.createElement(n, null)
+ });
+ })), l.map(((t) => Object.values(t).map(((t) => s.default.createElement(dR, {
+ key: t.id,
+ onClick: () => e.removeSmartfilterOption(t.metapropertyName, t.id),
+ title: t.label
+ }))))), e.tags.map(((t) => s.default.createElement(dR, {
+ key: t,
+ onClick: () => e.removeTag(t),
+ title: t
+ }))), (t || r && i) && s.default.createElement(dR, {
+ onClick: () => {
+ n(!1), o(!1), a(void 0);
+ },
+ title: Kl("Show similar")
+ })));
+}
+const hR = ao.div`
+ flex-shrink: 0;
+ animation: var(--fade-in-down);
+`, gR = [
+ "xls",
+ "xlsx",
+ "ppt",
+ "pdf",
+ "pptx",
+ "indd",
+ "mp4",
+ "wav",
+ "docx",
+ "doc",
+ "numbers",
+ "pages",
+ "otf",
+ "txt",
+ "ttf",
+ "mov",
+ "avi",
+ "mpeg",
+ "webm",
+ "fla",
+ "aiff",
+ "mp3",
+ "m4r",
+ "zip",
+ "rar"
+];
+function mR(e) {
+ if (e.derivatives.thumbnail) return e.derivatives.thumbnail;
+ let t = e.extensions[0];
+ return gR.includes(t) ? `https://d8ejoa1fys2rk.cloudfront.net/includes/img/placeholder/medium/${t}.jpg` : t === "aif" ? "https://d8ejoa1fys2rk.cloudfront.net/includes/img/placeholder/medium/aiff.jpg" : t === "m4a" ? "https://d8ejoa1fys2rk.cloudfront.net/includes/img/placeholder/medium/m4r.jpg" : "https://d8ejoa1fys2rk.cloudfront.net/includes/img/common/no-image.png";
+}
+function vR(e) {
+ let t = e.extensions[0];
+ return t?.toUpperCase() === "JPG" ? "JPEG" : t?.toUpperCase();
+}
+var yR = function(e, t) {
+ var n = {};
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") {
+ var o = 0;
+ for (r = Object.getOwnPropertySymbols(e); o < r.length; o++) t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
+ }
+ return n;
+};
+function bR({ transformBaseUrl: e, portalUrl: t, onOpenDAT: n }) {
+ let { hideExternalAccess: r, selectionMode: o } = vo(), i = o === "SingleSelectFile" && e;
+ return !i && r ? null : i || r ? i && r ? s.default.createElement(op.ContextActionButton, {
+ "aria-label": "New transformation",
+ onClick: n
+ }, s.default.createElement(mi, null)) : s.default.createElement(um, {
+ trigger: (e) => {
+ var { isOpen: t } = e, n = yR(e, ["isOpen"]);
+ return s.default.createElement(op.ContextActionButton, Object.assign({
+ "aria-label": "Menu",
+ isPressed: t
+ }, n), s.default.createElement(Ti, null));
+ },
+ isClosedOnScroll: !0
+ }, s.default.createElement(um.Item, {
+ icon: s.default.createElement(ji, null),
+ onClick: () => {
+ window.open(t, "_blank");
+ }
+ }, "Open asset"), s.default.createElement(um.Divider, null), s.default.createElement(um.Item, {
+ icon: s.default.createElement(mi, null),
+ onClick: n
+ }, "New transformation")) : s.default.createElement(op.ContextActionButton, {
+ "aria-label": Kl("Open in new tab"),
+ onClick: () => {
+ window.open(t, "_blank");
+ }
+ }, s.default.createElement(ji, null));
+}
+const wR = (e, t) => e.zIndex && !t.zIndex ? -1 : !e.zIndex && t.zIndex ? 1 : e.zIndex || t.zIndex ? e.zIndex - t.zIndex : 0, xR = ({ metaproperties: e, textMetaproperties: t }) => {
+ let n = ((e = [], t = []) => [...e.map((({ label: e, options: t, zIndex: n }) => ({
+ label: e,
+ value: t.map(((e) => e.label)).join(", "),
+ zIndex: n
+ }))), ...t.map((({ label: e, value: t, type: n, zIndex: r }) => {
+ var o;
+ return {
+ label: e,
+ value: n === "date" ? (o = t) ? isNaN(Date.parse(o)) ? o : new Intl.DateTimeFormat("en-GB", yd).format(new Date(new Date(o).valueOf() + 60 * new Date(o).getTimezoneOffset() * 1e3)) : "" : t,
+ zIndex: r
+ };
+ }))].sort(wR))(e, t);
+ return n?.length ? s.default.createElement(op.AdditionalInfo, null, s.default.createElement(ER, null, n.map((({ label: e, value: t }) => {
+ let n = ((e) => e.length <= 100 ? e : e.slice(0, 100) + "...")(t);
+ return s.default.createElement(SR, {
+ key: e,
+ "data-testid": "asset-card-metaproperty"
+ }, s.default.createElement(CR, null, e, ":"), s.default.createElement(kR, { title: t }, n));
+ })))) : null;
+}, ER = ao.dl`
+ color: rgba(0, 34, 51, 0.5);
+ font-size: ${po.fontSize75};
+ display: flex;
+ flex-direction: column;
+ grid-row-gap: 1px;
+ row-gap: 1px;
+ margin: 0;
+`, SR = ao.div`
+ display: flex;
+ flex-wrap: wrap;
+`, CR = ao.dt`
+ color: rgba(0, 34, 51, 0.3);
+ padding-right: 4px;
+ margin: 0;
+ width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+`, kR = ao.dd`
+ overflow: hidden;
+ text-overflow: ellipsis;
+ margin: 0;
+ width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+`;
+function _R({ className: e, fadeIn: t = !0, asset: n, isSelected: r, isOutlined: o, onClick: i, children: a = null, isSilimilaritySearchEnabled: l = !1, onSimilaritySearch: c }) {
+ let [f, p] = (0, s.useState)(), [h, g] = (0, s.useState)(), { openDat: m, setTransformation: v } = kD(), { theme: y } = vo(), b = function(e) {
+ return [
+ e.isArchived && Kl("archived"),
+ e.isWatermarked && Kl("watermarked"),
+ e.isLimitedUse && Kl("limited")
+ ].filter(((e) => e)).join(", ");
+ }(n), w = vR(n);
+ (0, s.useEffect)((() => {
+ let t = n.metaproperties?.nodes.filter(((e) => e.showInGridView || e.showInListView));
+ p(t);
+ }), [n.metaproperties]), (0, s.useEffect)((() => {
+ let t = n.textMetaproperties?.filter(((e) => e.showInGridView || e.showInListView));
+ g(t);
+ }), [n.textMetaproperties]);
+ let x = (e) => {
+ i !== void 0 && (e.stopPropagation(), v(), i(n, e));
+ };
+ return s.default.createElement(TR, {
+ id: n.id,
+ $theme: y,
+ $isOutlined: (r || o) && y?.colorPrimary !== void 0,
+ $fadeIn: t,
+ className: e,
+ "data-drag-select-id": n.id
+ }, s.default.createElement(op, {
+ contextAction: s.default.createElement(bR, {
+ transformBaseUrl: n.files?.transformBaseUrl?.url,
+ portalUrl: n.url,
+ onOpenDAT: () => m(n.files?.transformBaseUrl?.url, n, n.name)
+ }),
+ selectButtonAriaLabel: Kl(r ? "Deselect" : "Select"),
+ onSelect: x,
+ onClick: x,
+ isSelected: r,
+ "aria-selected": r,
+ "data-testid": "asset-card"
+ }, s.default.createElement(op.Frame, {
+ icon: b ? s.default.createElement(IR, { $limitWidth: !!w }, s.default.createElement(Pf, {
+ color: "black-alpha",
+ "data-testid": "asset-tag"
+ }, s.default.createElement(Nd, null, b))) : void 0,
+ "data-testid": "asset-type",
+ badge: w
+ }, s.default.createElement(op.Images, null, mR(n) && s.default.createElement(op.Img, {
+ src: mR(n),
+ alt: n.name,
+ contentResize: "fit"
+ })), l && n.__typename === "Image" && s.default.createElement(jR, {
+ onClick: (e) => {
+ e.stopPropagation(), c([n.databaseId ? n.databaseId : n.id]);
+ },
+ "data-testid": "similarity-search-indicator",
+ type: "button",
+ "aria-label": "similarity-search-button",
+ className: "showSimilarButton"
+ }, s.default.createElement(Pf, { isSmall: !0 }, Kl("Show similar")))), a, s.default.createElement(OR, { "data-testid": "asset-name" }, n.name), s.default.createElement(xR, {
+ metaproperties: f,
+ textMetaproperties: h
+ })));
+}
+const TR = ao.div`
+ margin: ${po.spacing3};
+ width: 224px;
+ align-self: flex-start;
+ position: relative;
+ ${(e) => e.$fadeIn ? "animation: var(--fade-in-down);" : ""}
+
+ --userComponentCardSelectedColor: ${({ $theme: e }) => e?.colorButtonPrimary};
+ --userComponentCardSelectedColorHover: ${({ $theme: e }) => e?.colorButtonPrimaryHover};
+ --userComponentCardSelectedColorActive: ${({ $theme: e }) => e?.colorButtonPrimaryActive};
+
+ .showSimilarButton {
+ display: none;
+ }
+
+ &:hover .showSimilarButton {
+ display: block;
+ }
+`, IR = ao.div`
+ ${(e) => e.$limitWidth && "max-width: 142px;"}
+ margin-top: ${po.spacing2};
+`, OR = ao.p`
+ width: auto;
+ max-width: 100%;
+ height: auto;
+ line-height: 20px;
+ min-height: 20px;
+ max-height: 20px;
+ padding: 0 ${po.spacing5};
+ margin: ${po.spacing3} 0;
+ transition: all 200ms ease;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ box-sizing: content-box;
+
+ &:hover {
+ max-height: 80px;
+ word-break: break-all;
+ white-space: normal;
+ }
+`, jR = ao.button`
+ background: none;
+ border: none;
+ padding: 0;
+ margin: 0;
+ font: inherit;
+ color: inherit;
+ cursor: pointer;
+ outline: none;
+ text-align: inherit;
+
+ position: absolute;
+ bottom: ${po.spacing4};
+ left: ${po.spacing4};
+ z-index: 1;
+`, PR = {
+ x: null,
+ y: null
+}, AR = "drag-select-container", NR = ({ dragContainer: e, selectionBoxCustomAttr: t, onSelect: n, onDeselect: r, onDragStart: o, onDragEnd: i }) => {
+ let [a, l] = (0, s.useState)(PR), [c, u] = (0, s.useState)(PR), [d] = qo(c, 10, {
+ leading: !0,
+ maxWait: 10
+ }), [f, p] = (0, s.useState)(), h = mc(), g = s.default.useMemo((() => LR(a, d, h.querySelector(".cv-root"))), [
+ a,
+ d,
+ h
+ ]), [m] = qo(g, 50, {
+ leading: !1,
+ maxWait: 50
+ }), [v, y] = (0, s.useState)([]), b = BR(v), w = (0, s.useRef)(a), x = (0, s.useRef)(c), E = (0, s.useRef)(w.current.x !== null && w.current.y !== null && x.current.x !== null && x.current.y !== null), S = (0, s.useRef)({
+ shiftKey: !1,
+ metaKey: !1
+ });
+ (0, s.useEffect)((() => (document.addEventListener("keydown", C, !1), document.addEventListener("keyup", C, !1), () => {
+ document.removeEventListener("keydown", C, !1), document.removeEventListener("keyup", C, !1);
+ })), []);
+ let C = ({ shiftKey: e, metaKey: t }) => {
+ let n = e || t ? "inverse" : "select";
+ S.current = {
+ shiftKey: e,
+ metaKey: t
+ }, E.current && n !== f && p(n);
+ };
+ (0, s.useEffect)((() => {
+ let e;
+ return typeof o == "function" && E.current ? (C(S.current), o(f ?? "select")) : typeof i != "function" || E.current || (e = setTimeout((() => i(f ?? "select")), 10)), () => clearTimeout(e);
+ }), [E.current, f]);
+ let k = (e) => {
+ w.current = e, l(e), T();
+ }, _ = (e) => {
+ x.current = e, u(e), T();
+ }, T = () => {
+ E.current = w.current.x !== null && w.current.y !== null && x.current.x !== null && x.current.y !== null;
+ }, I = (0, s.useCallback)((({ clientY: e, clientX: t }) => {
+ let o = w.current.x !== null, i = Math.abs(w.current.x ?? 0 - t) >= 1 || Math.abs(w.current.y ?? 0 - e) >= 1;
+ o && i && _({
+ x: t,
+ y: e
+ });
+ }), []), O = (0, s.useCallback)((() => {
+ h.removeEventListener("mousemove", I), h.removeEventListener("mouseup", O), k(PR), _(PR);
+ }), [I, h]), j = (0, s.useCallback)((({ clientY: e, clientX: t, button: n }) => {
+ n === 0 && (h.addEventListener("mousemove", I), h.addEventListener("mouseup", O), k({
+ x: t,
+ y: e
+ }));
+ }), [
+ I,
+ O,
+ h
+ ]);
+ (0, s.useEffect)((() => {
+ let t = h.querySelector(e);
+ return t && (zR(h), t.addEventListener("mousedown", j)), () => {
+ t && (t.removeEventListener("mousedown", j), $R(h));
+ };
+ }), [
+ e,
+ j,
+ I,
+ O,
+ h
+ ]), (0, s.useEffect)((() => {
+ let e = h.querySelectorAll("[data-drag-select-id]"), t = Array.from(e).reduce(((e, t) => {
+ let n = RR(t);
+ return t instanceof HTMLElement && DR(n, m) && t.dataset.dragSelectId && e.push(t.dataset.dragSelectId), e;
+ }), []);
+ y(t);
+ }), [m, h]), (0, s.useEffect)((() => {
+ if (!b || b === v || !E.current) return;
+ let e = v.filter(((e) => !b.includes(e))), t = b.filter(((e) => !v.includes(e)));
+ e.length && n(e), t.length && r(t);
+ }), [
+ v,
+ b,
+ n,
+ r,
+ E
+ ]);
+ let P = h.querySelector(`#${AR}`);
+ return E.current && P ? (0, Qa.createPortal)(s.default.createElement("div", Object.assign({}, t, {
+ style: t.style ? Object.assign(Object.assign(Object.assign({}, MR), t.style), g) : Object.assign(Object.assign({}, MR), g),
+ "data-testid": "drag-selection"
+ })), P) : null;
+}, MR = {
+ position: "absolute",
+ zIndex: 100
+}, LR = (e, t, n) => {
+ if (!(e.x && e.y && t.x && t.y && n)) return {
+ left: 0,
+ top: 0,
+ height: 0,
+ width: 0
+ };
+ let r = n.getBoundingClientRect(), o = Math.max(t.x, 0), i = Math.min(e.x, o);
+ i = Math.max(i, r.left + 4);
+ let a = Math.min(e.y, t.y), s = Math.abs(t.y - e.y), l = Math.abs(o - e.x), c = r.width + r.left - i - 4;
+ return l = Math.min(l, c), {
+ left: i,
+ top: a,
+ height: s,
+ width: l
+ };
+}, DR = (e, t) => e.left <= t.left + t.width && e.left + e.width >= t.left && e.top <= t.top + t.height && e.top + e.height >= t.top, RR = (e) => {
+ let t = e.getBoundingClientRect();
+ return {
+ left: t.left,
+ top: t.top + window.scrollY,
+ height: t.height,
+ width: t.width
+ };
+}, zR = (e) => {
+ let t = document.createElement("div");
+ t.id = AR, e.appendChild(t);
+}, $R = (e) => {
+ let t = e.querySelector(`#${AR}`);
+ t && t.remove();
+}, BR = (e) => {
+ let t = (0, s.useRef)();
+ return (0, s.useEffect)((() => {
+ t.current = e;
+ })), t.current;
+};
+var FR = function(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+};
+function UR({ assets: e, count: t, hasNextPage: n = !1, isLoading: r = !1, loadMore: o = () => {}, onSelect: i = () => {}, onToggle: a = () => {}, emptyStateElement: l = null, selectedAssetIds: c = [], selectionMode: u = "MultiSelect", theme: d, children: f = null }) {
+ let h = (0, s.useRef)(null), { dimensions: g } = DD(h.current), [m, v] = (0, s.useState)([]), [y, b] = (0, s.useState)("inactive"), [w, x] = (0, s.useState)(!1), { clear: E } = AD(), { setIsEnabled: S, isEnabled: C, search: k, resetData: _, setIsSelected: T } = Pd(), [I, O] = function(e, t) {
+ return e === void 0 ? t ? [Math.ceil(t.height / 188), Math.round((t.width - 16) / 208)] : [0, 0] : [1, e];
+ }(t, g);
+ (0, s.useEffect)((() => {
+ !w && e.value && e.value.length > 0 && (x(!0), FR(this, void 0, void 0, (function* () {
+ if (e.value && e.value.length > 0) {
+ let t = e.value.find(((e) => e.__typename === "Image")) || e.value[0], n = yield k([t.databaseId]);
+ S(n || !1);
+ }
+ })));
+ }), [
+ w,
+ k,
+ e.value,
+ S
+ ]);
+ let j = (e) => {
+ _(), T(!0), E(), k(e);
+ };
+ function P(e) {
+ return (y !== "inverse" || !c.includes(e.id) || !m.includes(e.id)) && (c.includes(e.id) || m.includes(e.id));
+ }
+ return s.default.createElement(HR, {
+ ref: h,
+ "data-drag-select-container": !0
+ }, f, s.default.createElement("div", {
+ className: "card-list",
+ role: "listbox"
+ }, e.tag === "Loading" && !e.value && s.default.createElement(fp, {
+ rows: I,
+ columns: O
+ }), e.tag === "Loaded" && e.value.length === 0 && l, (e.tag === "Loading" && e.value || e.tag === "Loaded") && s.default.createElement(s.default.Fragment, null, u === "MultiSelect" && s.default.createElement(NR, {
+ dragContainer: "[data-drag-select-container]",
+ selectionBoxCustomAttr: { style: {
+ zIndex: 1e6,
+ borderColor: d?.colorPrimary,
+ borderWidth: "2px",
+ borderRadius: "5px",
+ color: "rgba(0, 34, 51, 0.8)"
+ } },
+ onSelect: function(e) {
+ v(((t) => [...t, ...e]));
+ },
+ onDeselect: function(e) {
+ v(((t) => t.filter(((t) => !e.includes(t)))));
+ },
+ onDragStart: function(e) {
+ b(e);
+ },
+ onDragEnd: function(t) {
+ if (b("inactive"), m.length) {
+ let n = [];
+ m.forEach(((t) => {
+ let r = function(t) {
+ if (e.tag !== "Loading" || e.value) return e.value?.find(((e) => t === e.id));
+ }(t);
+ r && n.push(r);
+ })), t === "inverse" ? a(n) : i(n), v([]);
+ }
+ }
+ }), s.default.createElement(RD, {
+ hasNextPage: n,
+ isLoading: r,
+ loadMore: o
+ }, e.value?.map(((t, n) => s.default.createElement(_R, {
+ isSilimilaritySearchEnabled: C,
+ key: t.id,
+ isSelected: P(t),
+ isOutlined: P(t),
+ asset: t,
+ fadeIn: n >= I * O,
+ onClick: (t, n) => function(t, n) {
+ if (n.shiftKey && u === "MultiSelect" && e.value?.length) {
+ let n = e.value.findIndex(((e) => e.id === t.id)), r = e.value?.findIndex(((e) => e.id === c[c.length - 1]));
+ r === -1 && (r = 0), i(r < n ? e.value?.slice(r, n + 1) : e.value.slice(n, r + 1));
+ } else a([t]);
+ }(t, n),
+ onSimilaritySearch: j
+ })))))));
+}
+const HR = ao.div`
+ display: flex;
+ flex-direction: column;
+ flex-grow: 1;
+ overflow-y: auto;
+`, WR = ({ text: e, position: t = "top", margin: n, marginAmount: r, children: o }) => s.default.createElement(VR, {
+ margin: n,
+ marginAmount: r
+}, o, s.default.createElement(qR, { position: t }, e)), VR = ao.div`
+ position: relative;
+ display: flex;
+
+ ${({ margin: e, marginAmount: t }) => {
+ if (e && t) switch (e) {
+ case "top": return `margin-top: ${po[t]};`;
+ case "bottom": return `margin-bottom: ${po[t]};`;
+ case "left": return `margin-left: ${po[t]};`;
+ case "right": return `margin-right: ${po[t]};`;
+ default: return "";
+ }
+ return "";
+}}
+`, qR = ao.span`
+ visibility: hidden;
+ min-width: max-content;
+ background-color: black;
+ color: #fff;
+ text-align: center;
+ border-radius: 5px;
+ padding: ${po.spacing3} ${po.spacing4};
+ font-size: ${po.fontSize75};
+ position: absolute;
+
+ ${({ position: e }) => {
+ switch (e) {
+ case "bottom": return "\n top: calc(100% + 5px);\n left: 50%;\n transform: translateX(-50%);\n ";
+ case "left": return "\n right: calc(100% + 5px);\n top: 50%;\n transform: translateY(-50%);\n ";
+ case "right": return "\n left: calc(100% + 5px);\n top: 50%;\n transform: translateY(-50%);\n ";
+ default: return "\n bottom: calc(100% + 5px);\n left: 50%;\n transform: translateX(-50%);\n ";
+ }
+}}
+
+ ${VR}:hover & {
+ visibility: visible;
+ }
+`;
+function GR(e) {
+ let { data: i, isLoading: a, loadMore: l, hasNextPage: c, executeQuery: u } = e.connection, { setIsLoading: d } = Fo(), f = vo(), p = function() {
+ let { selection: e } = AD();
+ return e.filter(((e) => e.type === "asset")).map(((e) => e.value.id));
+ }(), { selectAssets: h, toggleAssets: g, setAllAssets: m } = AD(), { setSearch: v } = Fo(), y = ff(), { isNLSSelected: b, NLSSearchText: w, isSelected: x } = Pd();
+ if ((0, s.useEffect)((() => {
+ a || d(!1);
+ }), [a]), (0, s.useEffect)((() => {
+ i.tag !== "Failure" && m(YR(i));
+ }), [i]), i.tag === "Failure") return s.default.createElement(ad, {
+ error: Error(i.value),
+ onRetry: u
+ });
+ let E = i.value?.searchAssets?.assets?.totalCount ?? e.totalCount, S = !!(x || b && w);
+ return s.default.createElement(UR, {
+ assets: YR(i),
+ count: E,
+ isLoading: a,
+ loadMore: l,
+ hasNextPage: c,
+ theme: f.theme,
+ selectionMode: f.selectionMode,
+ selectedAssetIds: p,
+ onSelect: h,
+ onToggle: g,
+ emptyStateElement: s.default.createElement(BD, { onReset: () => {
+ y.clear(), v("assets", ""), v("collection", "");
+ } })
+ }, s.default.createElement(ZR, null, E !== void 0 && s.default.createElement(KR, {
+ "data-testid": "assets-amount",
+ key: E
+ }, Of(E, Kl("{} asset"), Kl("{} assets"))), e.showActiveFilters && s.default.createElement(pR, null), s.default.createElement(Ef, { options: S ? ["NL_SEARCH"] : [
+ "CREATED_AT",
+ "PUBLISHED_AT",
+ "UPDATED_AT",
+ "NAME"
+ ] }), s.default.createElement(tf, { nlSearch: S }), S && s.default.createElement(WR, {
+ text: "You cannot change the sorting criteria while a Visual Similarity filter\n is being applied",
+ position: "left",
+ margin: "left",
+ marginAmount: "spacing3"
+ }, s.default.createElement(yi, null))));
+}
+function YR(e) {
+ return e.tag !== "Loading" || e.value ? e.tag === "Loading" ? {
+ tag: e.tag,
+ value: e.value?.searchAssets.assets.nodes
+ } : {
+ tag: e.tag,
+ value: e.value.searchAssets.assets.nodes
+ } : {
+ tag: "Loading",
+ value: void 0
+ };
+}
+const ZR = ao.div`
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ z-index: 10;
+ padding: ${po.spacing5} ${po.spacing5} ${po.spacing3} ${po.spacing5};
+`, KR = ao.span`
+ color: rgba(0, 34, 51, 0.5);
+ flex-shrink: 0;
+ animation: fade-in-down 0.15s ease-out;
+`;
+function XR(e) {
+ let { value: t } = Uo("collection"), [, n] = Ro(), r = No.use.collection(), { language: o, noCache: i } = vo(), { assetTypes: a, tags: l, isLimited: c, selectedSmartfilterOptions: u } = ff(), { isSelected: d, isNLSSelected: f, NLSSearchText: p, connection: h } = Pd(), g = xp({
+ collection: e.collection,
+ filter: {
+ assetTypes: a,
+ selectedSmartfilterOptions: u,
+ tags: l,
+ isLimited: c
+ },
+ searchTerm: t,
+ orderBy: r,
+ language: o
+ }, i), m = d || f && p;
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(JR, { "data-testid": "collection-toolbar" }, s.default.createElement(QR, {
+ onClick: () => n({ page: "collections" }),
+ type: "button"
+ }, Kl("Collections"), " / "), s.default.createElement("span", null, " ", e.collection.name, " ")), s.default.createElement(GR, {
+ connection: m ? h : g,
+ totalCount: e.collection.assetCount,
+ showActiveFilters: !0
+ }));
+}
+const JR = ao.nav`
+ padding: ${po.spacing5} ${po.spacing5};
+`, QR = ao.button`
+ cursor: pointer;
+ user-select: none;
+ color: rgba(0, 34, 51, 0.5);
+ background-color: transparent;
+ background-image: none;
+ border: 0 solid rgba(0, 34, 51, 0.1);
+ font-size: ${po.fontSize100};
+ padding: 0;
+`;
+var ez = function(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+};
+function nz(e) {
+ return s.default.createElement(rz, {
+ onClick: e.onClick,
+ onKeyDown: (t) => function(e, t) {
+ t && e.key === "Enter" && (e.preventDefault(), t(e));
+ }(t, e.onClick),
+ role: "button",
+ tabIndex: 0,
+ "data-testid": e["data-testid"],
+ loading: e.loading,
+ active: e.active
+ }, e.children);
+}
+const rz = ao.div`
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ flex-shrink: 0;
+ border-radius: calc(infinity * 1px);
+ font-size: ${po.fontSize75};
+ height: ${po.spacing7};
+ padding: 0 ${po.spacing4};
+ transition-property: color, background-color, border-color, opacity;
+ transition-timing-function: linear;
+ transition-duration: 0.05s;
+
+ margin-right: ${po.spacing3};
+ margin-bottom: ${po.spacing3};
+ border: 1px solid rgba(0, 34, 51, 0.1);
+ box-shadow: 0 1px 6px -2px rgba(0, 34, 51, 0.1);
+ cursor: ${({ loading: e, active: t }) => e && !t ? "default" : "pointer"};
+ background-color: ${({ active: e }) => e ? "rgba(0, 34, 51, .05)" : "transparent"};
+`;
+function oz(e) {
+ let t = ff(), n = t.tags.includes(e.tag.name);
+ return s.default.createElement(nz, {
+ key: e.tag.id,
+ loading: e.isLoading,
+ active: n,
+ onClick: function() {
+ n ? t.removeTag(e.tag.name) : e.isLoading || t.addTag(e.tag.name);
+ },
+ "data-testid": "tag-item"
+ }, s.default.createElement(iz, null, e.tag.name), s.default.createElement(az, null, e.tag.assetCount));
+}
+const iz = ao.span`
+ max-with: 128px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+`, az = ao.span`
+ color: rgba(0, 34, 51, 0.5);
+ margin-left: ${po.spacing3};
+`;
+function sz(e) {
+ let t = (n = e.tags, [...n].sort(((e, t) => t.assetCount - e.assetCount)));
+ var n;
+ return s.default.createElement(hf, {
+ title: s.default.createElement(lz, null),
+ isSmall: !0,
+ fadeIn: !0
+ }, (() => s.default.createElement(s.default.Fragment, null, e.isLoading && s.default.createElement(Yl, null), s.default.createElement(cz, null, " ", Kl("Tags"), " "), s.default.createElement(uz, null, t.map(((t) => s.default.createElement(oz, {
+ key: t.id,
+ tag: t,
+ isLoading: e.isLoading
+ })))))));
+}
+function lz() {
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(dz, null), s.default.createElement("span", { "data-testid": "tags-filter" }, Kl("Tags")));
+}
+const cz = ao.h1`
+ padding: ${po.spacing5} ${po.spacing5} 0 ${po.spacing5};
+ margin: 0 0 ${po.spacing5} 0;
+ font-size: ${po.fontSize100};
+`, uz = ao.div`
+ display: flex;
+ flex-wrap: wrap;
+ padding: 0 ${po.spacing5};
+ padding-bottom: ${po.spacing2};
+`, dz = ao(Fi)`
+ display: inline;
+ margin-right: ${po.spacing3};
+ height: ${po.spacing6};
+ width: ${po.spacing6};
+`, fz = ao.div`
+ width: 100%;
+ font-size: ${po.fontSize75};
+ align-items: center;
+ cursor: ${(e) => e.$isLoading && !e.$isChecked ? "wait" : "pointer"};
+ display: ${(e) => e.$isFlex ? "flex" : "block"};
+
+ div:last-of-type {
+ flex-grow: 1;
+ }
+`, pz = ao.li`
+ padding: ${po.spacing3} ${po.spacing5};
+
+ &:hover {
+ background-color: ${po.gray25};
+ }
+`, hz = ao.div`
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ color: ${(e) => e.$isChecked ? "inherit" : po.gray500};
+ font-size: ${po.fontSize100};
+ gap: ${po.spacing4};
+`;
+function gz(e) {
+ let t = ff(), n = t.assetTypes.includes(e.type), r = nR(e.type);
+ return s.default.createElement(pz, { "data-testid": "advanced-options" }, s.default.createElement(fz, {
+ $isChecked: n,
+ $isLoading: e.isLoading
+ }, s.default.createElement(gg, {
+ isChecked: n,
+ onChange: function() {
+ n ? t.removeAssetType(e.type) : t.addAssetType(e.type);
+ },
+ "data-testid": `${tR(e.type)}-filter`
+ }, s.default.createElement(hz, { $isChecked: n }, s.default.createElement(r, null), s.default.createElement(mz, null, tR(e.type)), s.default.createElement("span", { className: "fade-in-down" }, e.count)))));
+}
+ao.span`
+ display: flex;
+ align-items: center;
+ margin: ${po.spacing1} ${po.spacing4} ${po.spacing1} 0;
+ flex-grow: 1;
+`;
+const mz = ao.div`
+ margin: 1px ${po.spacing3};
+ flex-grow: 1;
+`;
+function vz(e) {
+ let { assetTypes: t } = vo(), n = t.filter(((t) => bz(e.count, t) > 0));
+ return t.length === 0 || n.length === 0 ? null : s.default.createElement(wz, {
+ title: s.default.createElement(yz, null),
+ isSmall: !0,
+ fadeIn: !0
+ }, (() => s.default.createElement(s.default.Fragment, null, e.isLoading && s.default.createElement(Yl, null), s.default.createElement(xz, null, Kl("Type")), s.default.createElement(Sz, null, n.map(((t) => s.default.createElement(gz, {
+ key: t,
+ type: t,
+ count: bz(e.count, t),
+ isLoading: e.isLoading
+ })))))));
+}
+function yz() {
+ return s.default.createElement(s.default.Fragment, null, s.default.createElement(Ez, null), Kl("Advanced"));
+}
+function bz(e, t) {
+ switch (t) {
+ case "AUDIO": return e.audio;
+ case "DOCUMENT": return e.document;
+ case "IMAGE": return e.image;
+ case "VIDEO": return e.video;
+ case "ARCHIVE": return e.archive;
+ }
+}
+const wz = ao(hf)``, xz = ao.h1`
+ padding: ${po.spacing5} ${po.spacing5} 0 ${po.spacing5};
+ margin: 0 0 ${po.spacing5} 0;
+ font-size: ${po.fontSize100};
+`, Ez = ao(Yo)`
+ display: inline;
+ margin-right: ${po.spacing3};
+ height: ${po.spacing6};
+ width: ${po.spacing6};
+`, Sz = ao.ul`
+ padding: 0;
+ margin: 0;
+ list-style: none;
+ padding-bottom: ${po.spacing2};
+`, Cz = Pw.create({
+ timeout: 1e4,
+ headers: {
+ Accept: "application/json",
+ "Content-Type": "application/json"
+ }
+}), kz = (e, t) => {
+ return n = void 0, r = void 0, i = function* () {
+ try {
+ return ((e) => e.data)(yield Cz.get(e, t));
+ } catch (e) {
+ throw console.error("GET request error:", e), e;
+ }
+ }, new ((o = void 0) || (o = Promise))((function(e, t) {
+ function a(e) {
+ try {
+ l(i.next(e));
+ } catch (e) {
+ t(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(i.throw(e));
+ } catch (e) {
+ t(e);
+ }
+ }
+ function l(t) {
+ var n;
+ t.done ? e(t.value) : (n = t.value, n instanceof o ? n : new o((function(e) {
+ e(n);
+ }))).then(a, s);
+ }
+ l((i = i.apply(n, r || [])).next());
+ }));
+ var n, r, o, i;
+}, _z = (e, t) => `/api/v4/filters/${e}/metaproperties/${t}`;
+var Tz = function(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+};
+const Iz = ({ auth: e }) => Tz(void 0, void 0, void 0, (function* () {
+ if (!e) throw Error("No authentication provided");
+ let t = e.accountDomain === void 0 ? `https://${window.location.host}` : oc(e.accountDomain.trim());
+ t.charAt(t.length - 1) === "/" && (t = t.slice(0, -1));
+ let n = e.getAccessToken && e.getAccessToken(), r = n === void 0 ? {} : { Authorization: `Bearer ${n}` };
+ try {
+ let e = (yield kz(`${t}/api/v4/smartfilters`, { headers: r })).filter(((e) => e.metaproperties.length > 0));
+ return {
+ filters: e,
+ metaproperties: (o = yield Oz(e, t, r), Object.entries(o).reduce(((e, [t, n]) => {
+ let r = Object.entries(n).reduce(((e, [t, n]) => n.type !== "smart-single" || n.options && n.options.length !== 0 ? Object.assign(Object.assign({}, e), { [t]: n }) : e), {});
+ return Object.keys(r).length > 0 ? Object.assign(Object.assign({}, e), { [t]: r }) : e;
+ }), {}))
+ };
+ } catch (e) {
+ throw Error(`Error fetching initial filters: ${e}`);
+ }
+ var o;
+})), Oz = (e, t, n) => Tz(void 0, void 0, void 0, (function* () {
+ let r = [];
+ for (let o of e) for (let e of o.metaproperties) {
+ let i = `${t}${_z(o.id, e)}?filterKey=savedFilters&limit=30`;
+ r.push(kz(i, { headers: n }).then(((t) => ({
+ id: e,
+ smartfilterID: o.id,
+ response: t
+ }))).catch((() => null)));
+ }
+ let o = yield Promise.allSettled(r), i = {};
+ for (let e of o) if (e.status === "fulfilled" && e.value !== null) {
+ let { id: t, response: n, smartfilterID: r } = e.value;
+ i[r] = i[r] || {}, i[r][t] = n;
+ }
+ return i;
+})), jz = ({ auth: e, filter: t }) => {
+ return n = void 0, r = void 0, i = function* () {
+ var r;
+ if (!e) throw Error("No authentication provided");
+ let o = e.accountDomain === void 0 ? `https://${window.location.host}` : oc(e.accountDomain.trim());
+ o.charAt(o.length - 1) === "/" && (o = o.slice(0, -1));
+ let i = e.getAccessToken && e.getAccessToken(), a = i === void 0 ? {} : { Authorization: `Bearer ${i}` }, s = new URLSearchParams();
+ s.append("total", "false"), s.append("count", "true"), s.append("limit", "0"), t.searchTerm && s.append("keyword", t.searchTerm), t.assetTypes?.length ? s.append("type", t.assetTypes.join(",").toLowerCase()) : s.append("type", "audio,document,image,video"), t.collectionId && s.append("collectionId", t.collectionId), (r = t.tagNames) != null && r.length && s.append("tags", t.tagNames.join(",")), t.isLimitedUse !== void 0 && s.append("keyVisual", t.isLimitedUse ? "1" : "0"), t.metaproperties && Object.entries(t.metaproperties).forEach((([e, t]) => {
+ let n = Object.keys(t);
+ n.length > 0 && s.append(`property_${e}`, n.join(","));
+ }));
+ try {
+ return yield kz(`${o}/api/v4/media?${s.toString()}`, { headers: a });
+ } catch (e) {
+ throw Error(`Error fetching initial filters: ${e}`);
+ }
+ }, new ((o = void 0) || (o = Promise))((function(e, t) {
+ function a(e) {
+ try {
+ l(i.next(e));
+ } catch (e) {
+ t(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(i.throw(e));
+ } catch (e) {
+ t(e);
+ }
+ }
+ function l(t) {
+ var n;
+ t.done ? e(t.value) : (n = t.value, n instanceof o ? n : new o((function(e) {
+ e(n);
+ }))).then(a, s);
+ }
+ l((i = i.apply(n, r || [])).next());
+ }));
+ var n, r, o, i;
+}, Pz = ao.div.withConfig({ shouldForwardProp: (e) => !e.startsWith("margin") && !e.startsWith("padding") }).withConfig({
+ displayName: "BoxStyled",
+ componentId: "sc-180ptwx-0"
+})([
+ "margin:",
+ ";margin-inline:",
+ ";margin-block:",
+ ";margin-top:",
+ ";margin-right:",
+ ";margin-bottom:",
+ ";margin-left:",
+ ";padding:",
+ ";padding-inline:",
+ ";padding-block:",
+ ";padding-top:",
+ ";padding-right:",
+ ";padding-bottom:",
+ ";padding-left:",
+ ";"
+], Az("margin"), Az("marginInline"), Az("marginBlock"), Az("marginTop"), Az("marginRight"), Az("marginBottom"), Az("marginLeft"), Az("padding"), Az("paddingInline"), Az("paddingBlock"), Az("paddingTop"), Az("paddingRight"), Az("paddingBottom"), Az("paddingLeft"));
+function Az(e) {
+ return (t) => t[e] ? po[`spacing${t[e]}`] : void 0;
+}
+ao.span`
+ display: flex;
+ align-items: center;
+ padding: 0 8px;
+ color: rgba(0, 34, 51, 0.8);
+ background-color: #f7f8f9;
+ border: 1px solid rgba(0, 34, 51, 0.1);
+ border-radius: 16px;
+
+ svg {
+ max-width: ${po.spacing5};
+ max-height: ${po.spacing5};
+ margin-right: ${po.spacing2};
+ }
+`, ao.i`
+ margin-right: ${po.spacing4};
+`, ao.div`
+ h1 {
+ padding: ${po.spacing5};
+ margin: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ font-size: ${po.fontSize100};
+ border-bottom: 1px solid rgba(3, 16, 38, 0.1);
+ box-shadow: 0px 0px 1px 0px rgba(3, 16, 38, 0.1), 0px 1px 4px -1px rgba(3, 16, 38, 0.1);
+ }
+`, ao.ul`
+ max-height: 400px;
+ overflow-y: auto;
+ padding: 0;
+ width: 100%;
+ list-style: none;
+ margin: 0;
+`, ao.div`
+ display: flex;
+ flex-wrap: wrap;
+ gap: ${po.spacing4};
+ overflow: auto;
+`;
+const Nz = ({ metaproperty: e, value: t, onChange: n, onOptionSelect: r, autocompleteOptions: o, isLoading: i, selectedOptions: a }) => {
+ let { label: f, name: p, id: h, isMultifilter: g } = e;
+ return s.default.createElement(Mz, null, s.default.createElement(Bs, { direction: "column" }, s.default.createElement(Lz, null, s.default.createElement(Dz, { $isLoading: i }, s.default.createElement(Rz, {
+ "data-testid": "metaproperty-title",
+ $isLoading: i,
+ htmlFor: "Project Code"
+ }, s.default.createElement(Nd, null, f)), s.default.createElement(Gl, {
+ id: "Project Code",
+ placeholder: Kl("Want to search for something?"),
+ value: t,
+ onChange: (e) => {
+ n(h, e);
+ },
+ "data-testid": "autocomplete-input"
+ }), i && s.default.createElement(Yl, { isNotUsingMargin: !0 }))), s.default.createElement(zz, { $autocompleteOptions: o[h]?.metapropertyOptions.length }, o[h] && o[h]?.metapropertyOptions?.length ? s.default.createElement(Bs, { direction: "column" }, o[h]?.metapropertyOptions.map(((e) => s.default.createElement($z, {
+ $isLoading: i,
+ $isSelected: !!a[p]?.[e.id],
+ key: e.id,
+ "data-testid": "autocomplete-option",
+ onClick: () => r(p, e, !!g)
+ }, e.label, a[p]?.[e.id] ? s.default.createElement(Fz, { className: "fade-in-down" }, s.default.createElement(ci, null)) : null)))) : s.default.createElement(Bz, null, Kl("Results will appear here")))));
+}, Mz = ao.div`
+ border-right: 1px solid rgba(3, 16, 38, 0.1);
+ min-width: 224px;
+ height: 100%;
+`, Lz = ao(Vc)`
+ padding: ${po.spacing5};
+ border-bottom: 1px solid rgba(3, 16, 38, 0.1);
+ box-shadow: 0px 0px 1px 0px rgba(3, 16, 38, 0.1), 0px 1px 4px -1px rgba(3, 16, 38, 0.1);
+`, Dz = ao(Vc.Group)`
+ display: flex;
+ flex-direction: column;
+ gap: ${po.spacing5};
+ padding: 0;
+ position: relative;
+
+ label {
+ margin-bottom: 0;
+ }
+
+ input {
+ color: ${(e) => e.$isLoading ? "rgba(3, 16, 38, 0.46)" : "inherit"} !important;
+ min-width: 220px !important;
+ }
+`, Rz = ao(Vc.Label)`
+ color: ${(e) => e.$isLoading ? "rgba(3, 16, 38, 0.46)" : "rgba(3, 16, 38, 0.88)"};
+ font-weight: 600;
+`, zz = ao.div`
+ display: flex;
+ justify-content: ${(e) => e.$autocompleteOptions ? "flex-start" : "center"};
+ align-items: ${(e) => e.$autocompleteOptions ? "flex-start" : "center"};
+ background: ${(e) => e.$autocompleteOptions ? "#fff" : "#f8f8f9"};
+ padding: ${po.spacing3} 0;
+ height: 100%;
+ min-height: 315px;
+`, $z = ao.div`
+ display: ${(e) => e.$isSelected ? "flex" : "block"};
+ justify-content: ${(e) => e.$isSelected ? "space-between" : "flex-start"};
+ cursor: pointer;
+ padding: ${po.spacing3} ${po.spacing5};
+ color: ${(e) => e.$isLoading ? "rgba(3, 16, 38, 0.46)" : "inherit"};
+
+ &:hover {
+ background-color: rgba(3, 16, 38, 0.03);
+ }
+`, Bz = ao.div`
+ color: rgba(3, 16, 38, 0.46);
+`, Fz = ao.span`
+ display: flex;
+ align-items: center;
+ padding: 0 8px;
+ color: rgba(0, 34, 51, 0.8);
+ background-color: #f7f8f9;
+ border: 1px solid rgba(0, 34, 51, 0.1);
+ border-radius: 16px;
+
+ svg {
+ max-width: ${po.spacing5};
+ max-height: ${po.spacing5};
+ margin-right: ${po.spacing2};
+ }
+`, Uz = ({ option: e, onClick: t, metapropertyName: n, isSelected: r, metapropertyMultifilter: o, showCount: i = !0, count: a }) => s.default.createElement(pz, null, s.default.createElement(fz, { $isChecked: r }, s.default.createElement(hz, {
+ $isChecked: r,
+ onClick: () => {
+ t(n, e, o);
+ },
+ "data-testid": "metaproperty-option"
+}, s.default.createElement(Nd, null, e.label), r && !i ? s.default.createElement(ci, null) : null, i && s.default.createElement(Hz, { className: "fade-in-down" }, r ? s.default.createElement(ci, null) : null, " ", a)))), Hz = ao.span`
+ display: flex;
+ align-items: center;
+ padding: 0 8px;
+ color: rgba(0, 34, 51, 0.8);
+ background-color: #f7f8f9;
+ border: 1px solid rgba(0, 34, 51, 0.1);
+ border-radius: 16px;
+
+ svg {
+ max-width: ${po.spacing5};
+ max-height: ${po.spacing5};
+ margin-right: ${po.spacing2};
+ }
+`, Wz = ({ metaproperty: e, smartfilterId: t, onOptionSelect: n, selectedOptions: r, filteredMetaproperty: o }) => {
+ let i = gd(), [a, l] = (0, s.useState)(!1), [c, u] = (0, s.useState)(e.options), [d, f] = (0, s.useState)(e.options.length % 30 == 0);
+ return s.default.createElement(Vz, { "data-testid": "metaproperty-filter-content" }, s.default.createElement(qz, {
+ "data-testid": "metaproperty-title",
+ title: e.label || e.name
+ }, e.label || e.name), s.default.createElement(Gz, null, s.default.createElement(RD, {
+ isLoading: a,
+ hasNextPage: d,
+ loadMore: () => {
+ return n = void 0, r = void 0, a = function* () {
+ l(!0);
+ let n = c[c.length - 1];
+ try {
+ let r = yield (({ auth: e, smartfilterId: t, metapropertyId: n, labelKeyset: r, zindexKeyset: o, mpoKeyset: i }) => {
+ return a = void 0, s = void 0, c = function* () {
+ if (!e) throw Error("No authentication provided");
+ let a = e.accountDomain === void 0 ? `https://${window.location.host}` : oc(e.accountDomain.trim());
+ a.charAt(a.length - 1) === "/" && (a = a.slice(0, -1));
+ let s = e.getAccessToken && e.getAccessToken(), l = s === void 0 ? {} : { Authorization: `Bearer ${s}` };
+ try {
+ return yield kz(`${a}${_z(t, n)}?filterKey=savedFilters&limit=30&labelKeyset=${r}&zindexKeyset=${o}&mpoKeyset=${i}`, { headers: l });
+ } catch (e) {
+ throw Error(`Error fetching initial filters: ${e}`);
+ }
+ }, new ((l = void 0) || (l = Promise))((function(e, t) {
+ function n(e) {
+ try {
+ o(c.next(e));
+ } catch (e) {
+ t(e);
+ }
+ }
+ function r(e) {
+ try {
+ o(c.throw(e));
+ } catch (e) {
+ t(e);
+ }
+ }
+ function o(t) {
+ var o;
+ t.done ? e(t.value) : (o = t.value, o instanceof l ? o : new l((function(e) {
+ e(o);
+ }))).then(n, r);
+ }
+ o((c = c.apply(a, s || [])).next());
+ }));
+ var a, s, l, c;
+ })({
+ auth: i,
+ smartfilterId: t,
+ metapropertyId: e.id,
+ labelKeyset: n.label,
+ zindexKeyset: n.zindex,
+ mpoKeyset: n.id
+ });
+ r.options.length ? (u(((e) => [...e, ...r.options])), f(r.options.length % 30 == 0)) : f(!1);
+ } catch (e) {
+ throw Error(`Error while loading more options: ${e}`);
+ } finally {
+ l(!1);
+ }
+ }, new ((o = void 0) || (o = Promise))((function(e, t) {
+ function i(e) {
+ try {
+ l(a.next(e));
+ } catch (e) {
+ t(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(a.throw(e));
+ } catch (e) {
+ t(e);
+ }
+ }
+ function l(t) {
+ var n;
+ t.done ? e(t.value) : (n = t.value, n instanceof o ? n : new o((function(e) {
+ e(n);
+ }))).then(i, s);
+ }
+ l((a = a.apply(n, r || [])).next());
+ }));
+ var n, r, o, a;
+ }
+ }, c.map(((t) => o[t?.name] ? s.default.createElement(Uz, {
+ key: t.id,
+ option: t,
+ onClick: n,
+ metapropertyName: e.name,
+ isSelected: !!r[e.name]?.[t.id],
+ metapropertyMultifilter: !!e.isMultifilter,
+ count: o[t.name],
+ showCount: e.showCounter
+ }) : null)))));
+}, Vz = ao.div`
+ color: ${po.colorText};
+ width: 282px;
+`, qz = ao.h3`
+ padding: ${po.spacing5};
+ margin: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ font-size: ${po.fontSize100};
+ line-height: ${po.lineHeightText};
+ border-bottom: 1px solid rgba(3, 16, 38, 0.1);
+ box-shadow: 0px 0px 1px 0px rgba(3, 16, 38, 0.1), 0px 1px 4px -1px rgba(3, 16, 38, 0.1);
+`, Gz = ao.ul`
+ max-height: 400px;
+ overflow-y: auto;
+ padding: 0;
+ width: 100%;
+ list-style: none;
+ margin: 0;
+ scrollbar-width: none;
+`, Yz = ({ smartfilters: e, metaproperties: t }) => {
+ let n = ff(), r = gd(), { language: o } = vo(), i = (a = e, [...a].sort(((e, t) => e.zindex - t.zindex)));
+ var a;
+ let [l, c] = (0, s.useState)({}), [u, d] = (0, s.useState)(), [f, p] = (0, s.useState)({}), [h, g] = (0, s.useState)(0), [m, v] = (0, s.useState)(0), [y, b] = (0, s.useState)(!1), w = (0, s.useRef)(null), x = (0, s.useRef)(!1), E = (0, s.useRef)(null), S = (0, s.useRef)(null), C = (0, s.useRef)({});
+ (0, s.useEffect)((() => {
+ w.current && v(w.current.scrollWidth - w.current.clientWidth), n.isDropdownActive || (c({}), d({}));
+ }), [
+ e,
+ w,
+ n
+ ]);
+ let k = h === 0, _ = m > 5 && h !== m;
+ function T() {
+ g(((e) => {
+ let t = Math.max(e - 250, 0);
+ return t >= 100 ? t : 0;
+ }));
+ }
+ function I() {
+ g(((e) => {
+ let t = Math.min(e + 250, m);
+ return t <= m - 100 ? t : m;
+ }));
+ }
+ let O = (e, t) => {
+ return n = void 0, o = void 0, a = function* () {
+ let n;
+ p(((e) => Object.assign(Object.assign({}, e), { [t]: !0 }))), e.length >= 2 && (n = yield (({ metapropertyId: e, auth: t, searchTerm: n, page: r = 1 }) => {
+ return o = void 0, i = void 0, s = function* () {
+ if (!t) throw Error("No authentication provided");
+ let o = t.accountDomain === void 0 ? `https://${window.location.host}` : oc(t.accountDomain.trim());
+ o.charAt(o.length - 1) === "/" && (o = o.slice(0, -1));
+ let i = t.getAccessToken && t.getAccessToken(), a = i === void 0 ? {} : { Authorization: `Bearer ${i}` }, s = yield kz(`${o}/api/v4/filters/autocompleteMetaPropertyOptions?metaPropertyId=${e}&term=${n}&page=${r}&isMicrofrontend=true`, { headers: a });
+ return Object.assign({ id: e }, s);
+ }, new ((a = void 0) || (a = Promise))((function(e, t) {
+ function n(e) {
+ try {
+ l(s.next(e));
+ } catch (e) {
+ t(e);
+ }
+ }
+ function r(e) {
+ try {
+ l(s.throw(e));
+ } catch (e) {
+ t(e);
+ }
+ }
+ function l(t) {
+ var o;
+ t.done ? e(t.value) : (o = t.value, o instanceof a ? o : new a((function(e) {
+ e(o);
+ }))).then(n, r);
+ }
+ l((s = s.apply(o, i || [])).next());
+ }));
+ var o, i, a, s;
+ })({
+ metapropertyId: t,
+ auth: r,
+ searchTerm: e
+ })), d(((e) => Object.assign(Object.assign({}, e), { [t]: n || null }))), p(((e) => Object.assign(Object.assign({}, e), { [t]: !1 })));
+ }, new ((i = void 0) || (i = Promise))((function(e, t) {
+ function r(e) {
+ try {
+ l(a.next(e));
+ } catch (e) {
+ t(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(a.throw(e));
+ } catch (e) {
+ t(e);
+ }
+ }
+ function l(t) {
+ var n;
+ t.done ? e(t.value) : (n = t.value, n instanceof i ? n : new i((function(e) {
+ e(n);
+ }))).then(r, s);
+ }
+ l((a = a.apply(n, o || [])).next());
+ }));
+ var n, o, i, a;
+ }, j = (e, t, r) => {
+ n.selectSmartfilterOption(e, t, r);
+ }, P = (e, t) => {
+ var n;
+ c(((n) => Object.assign(Object.assign({}, n), { [e]: t }))), (n = e, C.current[n] || (C.current[n] = ((e) => {
+ let t;
+ return function(...n) {
+ return t && clearTimeout(t), new Promise(((r, o) => {
+ t = setTimeout((() => {
+ e(...n).then(r).catch(o);
+ }), 500);
+ }));
+ };
+ })(O)), C.current[n])(t, e);
+ }, A = (e) => {
+ E.current = e.clientX, x.current = !1, b(!0);
+ }, N = (e) => {
+ if (x.current) {
+ e.preventDefault();
+ let t = (e) => {
+ e.stopPropagation(), document.removeEventListener("click", t, !0);
+ };
+ document.addEventListener("click", t, {
+ capture: !0,
+ once: !0
+ });
+ }
+ E.current = null, S.current = null, b(!1);
+ }, M = (e) => {
+ if (!y || !w.current || !E.current) return;
+ e.preventDefault(), S.current === null && (S.current = h), E.current && Math.abs(e.clientX - E.current) > 5 && (x.current = !0);
+ let t = -1 * (e.clientX - E.current) + S.current;
+ return g(t <= 16 ? 0 : t + 16 < m ? t : m);
+ };
+ return s.default.createElement(s.default.Fragment, null, i.map(((e) => t[e.id] ? s.default.createElement(hf, {
+ key: e.id,
+ title: e.labels[o] || e.labels.en_US,
+ alt: e.labels[o] || e.labels.en_US,
+ isSmall: !0,
+ fadeIn: !0,
+ isMetapropertyDropdown: !0
+ }, (() => s.default.createElement(Zz, {
+ ref: w,
+ onMouseDown: A,
+ onMouseUp: N,
+ onMouseMove: M
+ }, s.default.createElement(Kz, {
+ $scroll: h,
+ "data-testid": "metaproperty-dropdown-content",
+ $isDragging: y
+ }, e.metaproperties.map(((r) => {
+ let a = t[e.id][r];
+ if (!a || !n.existingFilters?.[a.name] || a.type !== "autocomplete" && (a.type !== "smart-single" && a.type !== "select" || a.options.length === 0)) return null;
+ let c = a.type === "autocomplete" ? s.default.createElement(Nz, {
+ metaproperty: a,
+ value: l[a.id] || "",
+ onChange: P,
+ onOptionSelect: j,
+ autocompleteOptions: u || {},
+ isLoading: f[a.id] || !1,
+ selectedOptions: n.selectedSmartfilterOptions || {}
+ }) : s.default.createElement(Wz, {
+ metaproperty: a,
+ smartfilterId: e.id,
+ onOptionSelect: j,
+ selectedOptions: n.selectedSmartfilterOptions || {},
+ filteredMetaproperty: n.existingFilters?.[a.name]
+ });
+ return s.default.createElement(Xz, { key: r }, c);
+ }))), s.default.createElement(Jz, {
+ direction: "row",
+ justifyContent: "flex-end"
+ }, s.default.createElement(Qz, {
+ title: "Previous",
+ icon: s.default.createElement(Jo, null),
+ onClick: T,
+ "data-testid": "left-arrow",
+ isDisabled: k
+ }), s.default.createElement(Qz, {
+ title: "Next",
+ icon: s.default.createElement(Qo, null),
+ onClick: I,
+ "data-testid": "right-arrow",
+ isDisabled: !_
+ }))))) : null)));
+}, Zz = ao.div`
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+`, Kz = ao.div`
+ display: flex;
+ flex-direction: row;
+ transform: translateX(-${(e) => e.$scroll}px);
+ transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.15);
+ width: fit-content;
+ cursor: ${(e) => e.$isDragging ? "grabbing" : "default"};
+`, Xz = ao((function({ children: e, as: t = "div", ...n }) {
+ return (0, Go.jsx)(Pz, {
+ as: t,
+ ...n,
+ children: e
+ });
+}))`
+ border-right: 1px solid rgba(3, 16, 38, 0.1);
+ max-width: 300px;
+`, Jz = ao(Bs)`
+ padding: ${po.spacing3};
+ border-top: 1px solid rgba(3, 16, 38, 0.1);
+ gap: ${po.spacing3};
+`, Qz = ao(il)`
+ padding: ${po.spacing3};
+ border-radius: 6px;
+ border: 1px solid rgba(3, 16, 38, 0.1);
+ background: rgba(3, 16, 38, 0.03);
+ cursor: pointer;
+`;
+var e$ = function(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+};
+function t$() {
+ let e = ff(), t = Do.use.page(), { value: n } = Uo("assets"), { assetTypes: r, language: o, assetFilter: i, noCache: a, selectionMode: l, selectAllOption: c } = vo(), { clear: u, selectAll: d } = AD(), f = gd(), [p, h] = (0, s.useState)(t.page);
+ Jl(o);
+ let [g, m] = (0, s.useState)(!1), { isSelected: v, isNLSSelected: y, NLSSearchText: b } = Pd(), [w, x] = (0, s.useState)(!1), [E, S] = (0, s.useState)(!1), [C, k] = (0, s.useState)(), [_, T] = (0, s.useState)({}), { data: I, isLoading: O } = function(e, t = !1) {
+ let n = gd(), [r, o] = (0, s.useState)({
+ tag: "Loading",
+ value: null
+ }), i = !1, a = () => ez(this, void 0, void 0, (function* () {
+ o(((e) => ({
+ tag: "Loading",
+ value: e.tag === "Failure" ? null : e.value
+ })));
+ let { filter: r, searchTerm: a, allAssetTypes: s, language: l, predefinedFilter: c } = e, u = hp({
+ filters: r?.assetTypes,
+ predefinedFilters: c?.predefinedAssetType,
+ showToolbar: c?.showToolbar
+ }), d = hp({
+ filters: r?.tags,
+ predefinedFilters: c?.predefinedTagNames,
+ showToolbar: c?.showToolbar
+ }), f = mp(r.selectedSmartfilterOptions), h = yield Cd({
+ query: "\nquery searchAssets($filter: AssetFilter!, $language: String!) {\n searchAssets(filter: $filter) {\n tags {\n nodes {\n id\n name\n assetCount\n }\n }\n count {\n assetType {\n image\n video\n audio\n document\n archive\n }\n }\n }\n }",
+ variables: {
+ filter: {
+ assetType_in: u ?? s,
+ collectionId: e.collectionId || c?.collectionId,
+ metapropertyOptionId_in: f,
+ searchTerm: a,
+ tagNames_in: d,
+ isLimitedUse: r.isLimited
+ },
+ language: l
+ },
+ auth: n,
+ noCache: t
+ });
+ i || (nc(h) ? o({
+ tag: "Failure",
+ value: h.error
+ }) : o({
+ tag: "Loaded",
+ value: h.value
+ }));
+ }));
+ return (0, s.useEffect)((() => (a(), () => {
+ i = !0;
+ })), [
+ e.filter.assetTypes,
+ e.filter.selectedSmartfilterOptions,
+ e.filter.tags,
+ e.searchTerm
+ ]), {
+ data: r,
+ isLoading: r.tag === "Loading"
+ };
+ }({
+ filter: e,
+ searchTerm: n || null,
+ allAssetTypes: r,
+ language: o,
+ predefinedFilter: i,
+ collectionId: t.page === "collection" ? t.collection.id : null
+ }, a);
+ if ((0, s.useEffect)((() => {
+ e$(this, void 0, void 0, (function* () {
+ x(!0);
+ try {
+ let { filters: e, metaproperties: t } = yield Iz({ auth: f });
+ k(e), T(t);
+ } catch {
+ k([]);
+ } finally {
+ x(!1);
+ }
+ }));
+ }), []), (0, s.useEffect)((() => (t.page !== p && (h(t.page), e.clear()), () => {
+ e.clear();
+ })), [p, t.page]), (0, s.useEffect)((() => {
+ let o = !1;
+ return e$(this, void 0, void 0, (function* () {
+ S(!0);
+ try {
+ let i = yield jz({
+ auth: f,
+ filter: {
+ searchTerm: n,
+ assetTypes: r,
+ collectionId: t.page === "collection" ? t.collection.id : void 0,
+ tagNames: e.tags,
+ isLimitedUse: e.isLimited,
+ metaproperties: e.selectedSmartfilterOptions
+ }
+ });
+ o || e.setActiveFiltersState(i);
+ } catch (e) {
+ o || console.error("Error fetching asset counts:", e);
+ } finally {
+ o || S(!1);
+ }
+ })), () => {
+ o = !0;
+ };
+ }), [
+ e.tags,
+ n,
+ r,
+ t.page,
+ e.selectedSmartfilterOptions
+ ]), I.tag === "Failure" || !I.value || w || E) return s.default.createElement(r$, null, s.default.createElement(n$, null));
+ let { tags: j, count: P } = I.value.searchAssets, A = g ? s.default.createElement(il, {
+ onClick: () => {
+ u(), m(!1);
+ },
+ icon: s.default.createElement(Ii, null),
+ title: "",
+ variant: "secondary",
+ "data-testid": "deselect-all"
+ }) : s.default.createElement(il, {
+ onClick: () => {
+ d(), m(!0);
+ },
+ icon: s.default.createElement(Ai, null),
+ title: "",
+ variant: "secondary",
+ "data-testid": "select-all"
+ });
+ return v || y && b ? null : s.default.createElement(r$, { "data-testid": "filter-nav" }, s.default.createElement(sR, null, C && C.length > 0 && s.default.createElement(Yz, {
+ smartfilters: C,
+ metaproperties: _
+ }), j && j.nodes.length > 0 && s.default.createElement(sz, {
+ tags: j.nodes,
+ isLoading: O
+ }), s.default.createElement(vz, {
+ isLoading: O,
+ count: P.assetType
+ })), s.default.createElement(o$, null, l === "MultiSelect" && c && t.page === "assets" && A));
+}
+function n$() {
+ return s.default.createElement(i$, null, s.default.createElement(cp, { width: 100 }), s.default.createElement(cp, { width: 80 }), s.default.createElement(cp, { width: 110 }));
+}
+const r$ = ao.nav`
+ display: flex;
+ justify-content: space-between;
+ background-color: #fff;
+ padding: ${po.spacing3} ${po.spacing4};
+ z-index: 20;
+`, o$ = ao.div`
+ display: flex;
+ align-items: center;
+
+ button {
+ height: initial;
+ background-color: transparent;
+ border: none;
+ padding: 0;
+ }
+`, i$ = ao.div`
+ display: inline-flex;
+ align-items: center;
+`, a$ = lo`${ro`
+ .cv-root {
+ ${(e) => function(e) {
+ let t = ((e) => ({
+ "--componentButtonPrimaryBorderHover": e?.colorButtonPrimaryHover,
+ "--componentButtonPrimaryBorderActive": e?.colorButtonPrimaryActive ?? e?.colorButtonPrimaryHover,
+ "--componentButtonPrimaryBorderFocus": e?.colorButtonPrimary,
+ "--componentButtonPrimaryColor": e?.colorButtonPrimaryLabel,
+ "--componentButtonPrimaryColorHover": e?.colorButtonPrimaryHoverLabel,
+ "--componentButtonPrimaryColorActive": e?.colorButtonPrimaryLabel,
+ "--componentButtonPrimaryColorFocus": e?.colorButtonPrimaryLabel,
+ "--componentButtonPrimaryColorDisabled": e?.colorButtonPrimaryLabel,
+ "--componentButtonPrimaryFill": e?.colorButtonPrimary,
+ "--componentButtonPrimaryFillHover": e?.colorButtonPrimaryHover,
+ "--componentButtonPrimaryFillActive": e?.colorButtonPrimaryActive ?? e?.colorButtonPrimaryHover,
+ "--componentButtonPrimaryFillFocus": e?.colorButtonPrimary
+ }))(e);
+ return Object.entries(t).map(((e) => e.join(":"))).join(";") + ";";
+}(e.theme)}
+ }:
+`}`;
+function s$() {
+ let [e, t] = Ro(), { setIsSelected: n, setIsNLSSelected: r, resetData: o } = Pd(), i = () => {
+ n(!1), r(!1), o();
+ };
+ return s.default.createElement(l$, null, s.default.createElement(il, {
+ isPressed: e.page === "assets",
+ variant: "clean",
+ onClick: () => {
+ t({ page: "assets" }), i();
+ }
+ }, Kl("Assets")), s.default.createElement(il, {
+ isPressed: e.page === "collections",
+ variant: "clean",
+ onClick: () => {
+ t({ page: "collections" }), i();
+ }
+ }, Kl("Collections")));
+}
+const l$ = ao.div`
+ display: inline-flex;
+ margin-right: auto;
+ gap: ${po.spacing2};
+`;
+function c$() {
+ let e = hd(), t = _c(), n = gd(), r = yo(), o = wo(), i = r !== void 0 && !r.showToolbar;
+ return e || t || !i ? s.default.createElement(u$, null, !i && s.default.createElement(s.default.Fragment, null, !o && s.default.createElement(s$, null), s.default.createElement(Jd, null)), s.default.createElement(d$, null, e && !n?.hideLogout && s.default.createElement(il, {
+ variant: "clean",
+ onClick: () => n?.logout(),
+ rightIcon: s.default.createElement(bi, null)
+ }, Kl("Log out")), t && s.default.createElement(il, {
+ variant: "clean",
+ onClick: () => t.onClose(),
+ title: Kl("Close"),
+ icon: s.default.createElement(ai, null)
+ }))) : null;
+}
+const u$ = ao.nav`
+ display: flex;
+ justify-content: space-between;
+ background: ${po.gray10};
+ padding: ${po.spacing4} ${po.spacing4};
+ z-index: 30;
+`, d$ = ao.div`
+ display: inline-flex;
+ margin-left: auto;
+`;
+function f$() {
+ let { assetTypes: e, tags: t, isLimited: n, selectedSmartfilterOptions: r } = ff(), { isSelected: o, isNLSSelected: i, NLSSearchText: a, connection: l } = Pd(), { value: c } = Uo("assets"), u = No.use.assets(), { assetFilter: d, assetTypes: f, language: p, noCache: h } = vo(), g = xp((0, s.useMemo)((() => d === void 0 ? {
+ filter: {
+ assetTypes: e,
+ selectedSmartfilterOptions: r,
+ tags: t,
+ isLimited: n
+ },
+ searchTerm: c,
+ orderBy: u,
+ allAssetTypes: f,
+ language: p
+ } : d && d.showToolbar ? {
+ filter: {
+ assetTypes: e,
+ selectedSmartfilterOptions: r,
+ tags: t,
+ isLimited: n
+ },
+ searchTerm: c,
+ orderBy: u,
+ predefinedFilter: d,
+ allAssetTypes: f,
+ language: p
+ } : {
+ filter: {
+ assetTypes: e,
+ selectedSmartfilterOptions: r,
+ tags: t,
+ isLimited: n
+ },
+ predefinedFilter: d,
+ orderBy: u,
+ language: p
+ }), [
+ e,
+ t,
+ n,
+ c,
+ u,
+ d,
+ f,
+ p,
+ r
+ ]), h), m = o || i && a;
+ return s.default.createElement(GR, {
+ connection: m ? l : g,
+ showActiveFilters: d === void 0 || d && d.showToolbar
+ });
+}
+var p$ = function(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+};
+function g$(e) {
+ return p$(this, void 0, void 0, (function* () {
+ let { assetId: t, auth: n, assetFieldSelection: r = "\n id\n name\n description\n databaseId\n createdAt\n originalUrl\n publishedAt\n tags\n type\n updatedAt\n url\n extensions\n metaproperties {\n nodes {\n name\n type\n options {\n name\n displayLabel\n }\n }\n }\n textMetaproperties {\n name\n value\n }\n derivatives {\n thumbnail\n webImage\n }\n ... on Video {\n previewUrls\n streamingLinks {\n dash,\n hls\n }\n }\n", noCache: o } = e, s = yield Cd({
+ query: `\n fragment AddMediaAsset on Asset {\n ${r}\n }\n\n query getAssetById($id: ID!) {\n node(id: $id) {\n __typename\n id\n ...on Asset {\n ...AddMediaAsset\n files\n }\n }\n }`,
+ variables: { id: t },
+ auth: n,
+ noCache: o,
+ isNewGQL: !0
+ });
+ return nc(s) ? s : Ql(s.value.node);
+ }));
+}
+function m$(e) {
+ return e.replace(/([a-z0-9])([A-Z])/g, ((e, t, n) => `${t} ${n}`));
+}
+var v$ = function(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+};
+const y$ = "Custom transformation", b$ = "adaptiveVideo";
+function w$({ asset: e, onChange: t }) {
+ let [n, r] = (0, s.useState)({ status: "Loading" }), [o, i] = (0, s.useState)(!1), a = (0, s.useRef)(null), l = gd(), { isSelected: c, NLSSearchText: u, isNLSSelected: d } = Pd(), { assetFieldSelection: f, noCache: p, __shouldAddOriginal__: h } = vo(), { transformation: g } = kD();
+ function m(e, n) {
+ r(((r) => {
+ if (r.status !== "Data") return r;
+ let o = Object.assign(Object.assign({}, r), { key: e }), a;
+ if (e === y$ && g) a = { url: g.url };
+ else if (e === b$) {
+ let e = n || r.selectedAdaptiveKey;
+ e && r.streamingLinks && (a = { url: r.streamingLinks[e] }, o.selectedAdaptiveKey = e, i(!n));
+ } else a = r.files[e];
+ return setTimeout((() => t(a))), o;
+ }));
+ }
+ return (0, s.useEffect)((() => {
+ g != null && g.url && n.status === "Data" && m(g.url === n.files?.transformBaseUrl?.url ? "transformBaseUrl" : y$);
+ }), [g]), (0, s.useEffect)((() => {
+ n.status === "Data" && n.key !== b$ && i(!1);
+ }), [n]), (0, s.useEffect)((() => {
+ r({ status: "Loading" }), t(void 0), function(e) {
+ return v$(this, void 0, void 0, (function* () {
+ let { asset: t, auth: n, assetFieldSelection: r, noCache: o, isSimilaritySelected: i } = e, a = yield g$({
+ assetId: i ? vp(t.id) : t.id,
+ auth: n,
+ assetFieldSelection: r,
+ noCache: o
+ });
+ if (tc(a) && a.value.files) {
+ let e = xd(a.value.files), t = a.value.streamingLinks;
+ return Ql({
+ files: e,
+ databaseId: a.value.databaseId || "",
+ streamingLinks: t
+ });
+ }
+ return ec("Error retrieving asset files");
+ }));
+ }({
+ asset: e,
+ auth: l,
+ assetFieldSelection: f,
+ noCache: p,
+ isSimilaritySelected: c || !!u && d
+ }).then(((e) => {
+ if (nc(e)) return pc.error(e.error), void r({ status: "Failure" });
+ let { files: n, streamingLinks: o } = e.value;
+ h && !("original" in n) && (n.original = {
+ url: e.value.databaseId,
+ isFakeOriginal: !0
+ }), o && Object.keys(o).length > 0 && (n[b$] = { url: "Adaptive video" });
+ let i = function(e) {
+ return "adaptiveVideo" in e ? "adaptiveVideo" : "transformBaseUrl" in e ? "transformBaseUrl" : "original" in e ? "original" : "webImage";
+ }(n), a = Object.keys(o || {})[0];
+ r({
+ status: "Data",
+ files: n,
+ key: i,
+ streamingLinks: o,
+ selectedAdaptiveKey: a
+ }), t(i === b$ && o ? { url: o[a] } : n[i]);
+ }));
+ }), [
+ e.id,
+ l,
+ f
+ ]), s.default.createElement(E$, null, s.default.createElement(hf, {
+ title: s.default.createElement(x$, { state: n }),
+ buttonKind: "secondary",
+ isPaddingContent: !0,
+ direction: "Up",
+ disabled: n.status === "Loading"
+ }, ((t) => n.status === "Data" && s.default.createElement(C$, null, Object.entries(n.files).map((([e, r]) => s.default.createElement(bf, {
+ key: e,
+ selected: n.key === e,
+ onClick: () => {
+ m(e), e !== b$ && t();
+ }
+ }, s.default.createElement(k$, { "data-testid": "file-extension" }, e === "transformBaseUrl" ? s.default.createElement(_$, null) : function(e) {
+ if (e) return function(e) {
+ let t = e.match(/filename=(.*?)&/);
+ if (t) {
+ let e = /(?:\.([^.]+))?$/.exec(t[1]);
+ if (e && e[1]) return e[1];
+ }
+ }(e) || function(e) {
+ let t = e.split("/"), n = t[t.length - 1].split(".");
+ if (n.length <= 1) return;
+ let r = n[n.length - 1], o = r.indexOf("?");
+ return o === -1 ? r : r.substring(0, o);
+ }(e);
+ }(r.url) ?? s.default.createElement(T$, null)), s.default.createElement(I$, null, s.default.createElement(O$, null, m$(e), e === b$ && n.selectedAdaptiveKey && s.default.createElement(P$, null, s.default.createElement(Pf, {
+ isSmall: !0,
+ color: "black-alpha"
+ }, n.selectedAdaptiveKey.toUpperCase()))), s.default.createElement(j$, null, r.width && r.height && `${r.width} x ${r.height} px`, r.width && r.height && r.fileSize && s.default.createElement("span", null, "•"), r.fileSize && function(e) {
+ if (e < 1) return "0 Bytes";
+ let t = Math.floor(Math.log(e) / Math.log(1024));
+ return `${(e / 1024 ** t).toFixed(1)} ${{
+ 0: "Bytes",
+ 1: "kB",
+ 2: "MB",
+ 3: "GB",
+ 4: "TB",
+ 5: "PB",
+ 6: "EB",
+ 7: "ZB",
+ 8: "YB"
+ }[t]}`;
+ }(r.fileSize)))))), s.default.createElement(_D, {
+ transformBaseUrl: n.files?.transformBaseUrl?.url,
+ toggleDropdown: t,
+ asset: e
+ })))), n.status === "Data" && n.key === b$ && s.default.createElement(A$, { ref: a }, o && s.default.createElement(of, {
+ isPaddingContent: !0,
+ onClickOutside: () => i(!1),
+ direction: "Up",
+ target: a,
+ "data-testid": "streaming-links-dropdown",
+ id: "streaming-links-dropdown"
+ }, s.default.createElement(C$, null, Object.keys(n.streamingLinks || {}).map(((e) => s.default.createElement(bf, {
+ key: e,
+ selected: n.selectedAdaptiveKey === e,
+ onClick: () => m(b$, e)
+ }, e.toUpperCase())))))));
+}
+function x$({ state: e }) {
+ return e.status === "Loading" ? s.default.createElement(cp, { width: 50 }) : e.status === "Data" ? s.default.createElement(S$, null, e.key === y$ && s.default.createElement(mi, null), m$(e.key)) : s.default.createElement(s.default.Fragment, null, "Error");
+}
+const E$ = ao.div`
+ display: flex;
+ gap: ${po.spacing2};
+ margin-right: ${po.spacing3};
+ text-transform: capitalize;
+ position: relative;
+`, S$ = ao.div`
+ display: flex;
+ gap: ${po.spacing4};
+ align-items: center;
+`, C$ = ao.ul`
+ max-height: 400px;
+ overflow-y: auto;
+ padding: 0 0 ${po.spacing3} 0;
+ list-style: none;
+ margin: 0;
+`, k$ = ao.div`
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: rgba(0, 34, 51, 0.5);
+ font-size: ${po.fontSize50};
+ height: ${po.spacing8};
+ width: ${po.spacing8};
+ text-transform: uppercase;
+ font-weight: 600;
+ border-radius: 5px;
+ background-color: rgba(0, 34, 51, 0.05);
+ margin-right: ${po.spacing4};
+`, _$ = ao(ei)`
+ height: ${po.spacing6};
+ width: ${po.spacing6};
+`, T$ = ao(ki)`
+ height: ${po.spacing6};
+ width: ${po.spacing6};
+`, I$ = ao.div`
+ flex-grow: 1;
+ width: 160px;
+`, O$ = ao.div`
+ text-transform: capitalize;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ color: rgba(0, 34, 51, 0.8);
+`, j$ = ao.div`
+ font-size: ${po.fontSize75};
+
+ & > span {
+ margin: 0 ${po.spacing3};
+ }
+`, P$ = ao.span`
+ margin-left: ${po.spacing2};
+ display: inline-flex;
+ vertical-align: middle;
+`, A$ = ao.div`
+ position: absolute;
+ left: -280px;
+ top: 0;
+ z-index: 1000;
+`, N$ = (e, t) => {
+ let n = [];
+ for (let r = 0; r < e.length; r += t) n.push(e.slice(r, r + t));
+ return n;
+};
+var M$ = function(e, t, n, r) {
+ return new (n ||= Promise)((function(o, i) {
+ function a(e) {
+ try {
+ l(r.next(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function s(e) {
+ try {
+ l(r.throw(e));
+ } catch (e) {
+ i(e);
+ }
+ }
+ function l(e) {
+ var t;
+ e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
+ e(t);
+ }))).then(a, s);
+ }
+ l((r = r.apply(e, t || [])).next());
+ }));
+};
+const D$ = ({ selectedItems: e, auth: t, assetFieldSelection: n, noCache: r, isSimilaritySearchEnabled: o }) => M$(void 0, void 0, void 0, (function* () {
+ let i = `\n fragment AddMediaAsset on Asset {\n ${n}\n }\n\n query getAssetsById($ids: [ID!]!, $collectionCount: Int) {\n nodes(ids: $ids) {\n __typename\n id\n ...on Asset {\n ...AddMediaAsset\n files\n }\n ...on Collection {\n assets(first: $collectionCount) {\n nodes {\n __typename\n id\n ...AddMediaAsset\n files\n }\n }\n }\n }\n }`, a = e.filter(((e) => e.type === "collection")).map(((e) => e.value.assetCount)).reduce(((e, t) => e + t), 0), l = yield Cd({
+ query: i,
+ variables: {
+ ids: e.map(((e) => o ? vp(e.value.id) : e.value.id)),
+ collectionCount: a
+ },
+ auth: t,
+ noCache: r
+ });
+ if (nc(l)) return l;
+ let c = [];
+ for (let e of l.value.nodes) e.__typename === "Collection" ? c.push(...e.assets.nodes) : c.push(e);
+ let u = /* @__PURE__ */ new Set(), d = [];
+ for (let e of c) u.has(e.id) || (d.push(e), u.add(e.id));
+ return Ql(d);
+}));
+function R$({ status: e, numberOfSelectedItems: t }) {
+ return e === "Done" ? s.default.createElement(li, { "data-testid": "check" }) : e === "Error" ? s.default.createElement(s.default.Fragment, null, Kl("Retry")) : s.default.createElement(s.default.Fragment, null, Of(t, Kl("Add asset"), Kl("Add assets")));
+}
+function z$(e) {
+ let { assetFieldSelection: n, onSuccess: r, selectionMode: o, noCache: i } = vo(), { isSelected: a, NLSSearchText: l, isNLSSelected: c } = Pd(), { preselectedAssetIds: u } = AD(), d = gd(), f = (0, s.useRef)(!0), [p, h] = (0, s.useState)(o === "SingleSelectFile" ? { status: "WaitingForFileSelection" } : { status: "Ready" });
+ function g(e, t) {
+ if (nc(e)) h({ status: "Error" });
+ else {
+ try {
+ let n = Array.isArray(e.value) ? e.value : [e.value];
+ n.sort(((e, t) => function(e, t, n) {
+ return n ? !n.includes(e.id) && n.includes(t.id) ? 1 : n.includes(e.id) && !n.includes(t.id) ? -1 : n.indexOf(e.id) - n.indexOf(t.id) : 0;
+ }(e, t, u))), r(n, { selectedFile: t });
+ } catch (e) {
+ pc.error(e);
+ }
+ f.current && (h({ status: "Done" }), setTimeout((() => {
+ f.current && h(((e) => e.status === "ReadyWithFile" ? e : t ? {
+ status: "ReadyWithFile",
+ file: t
+ } : { status: "Ready" }));
+ }), 2e3));
+ }
+ }
+ return (0, s.useEffect)((() => () => {
+ f.current = !1;
+ }), []), s.default.createElement(s.default.Fragment, null, o === "SingleSelectFile" && e.selection[0]?.type === "asset" && s.default.createElement(w$, {
+ asset: e.selection[0].value,
+ onChange: function(e) {
+ h(e === void 0 ? { status: "WaitingForFileSelection" } : {
+ status: "ReadyWithFile",
+ file: e
+ });
+ }
+ }), s.default.createElement(il, {
+ variant: "primary",
+ isDisabled: p.status === "Loading" || p.status === "WaitingForFileSelection",
+ onClick: function() {
+ let r = p.status === "ReadyWithFile" ? p.file : void 0;
+ h({ status: "Loading" }), o !== "MultiSelect" && e.selection[0]?.type === "asset" ? g$({
+ assetId: a || l && c ? vp(e.selection[0].value.id) : e.selection[0].value.id,
+ auth: d,
+ assetFieldSelection: n,
+ noCache: i
+ }).then(((e) => {
+ g(e, r);
+ })) : function(e) {
+ return M$(this, void 0, void 0, (function* () {
+ let { selectedItems: t, auth: n, assetFieldSelection: r = "\n id\n name\n description\n databaseId\n createdAt\n originalUrl\n publishedAt\n tags\n type\n updatedAt\n url\n extensions\n metaproperties {\n nodes {\n name\n type\n options {\n name\n displayLabel\n }\n }\n }\n textMetaproperties {\n name\n value\n label\n }\n derivatives {\n thumbnail\n webImage\n }\n ... on Video {\n previewUrls\n }\n", noCache: o, isSimilaritySearchEnabled: i = !1 } = e;
+ if (t.length <= 280) return D$({
+ selectedItems: t,
+ auth: n,
+ assetFieldSelection: r,
+ noCache: o,
+ isSimilaritySearchEnabled: i
+ });
+ let a = N$(t, 280).map(((e) => D$({
+ selectedItems: e,
+ auth: n,
+ assetFieldSelection: r,
+ noCache: o,
+ isSimilaritySearchEnabled: i
+ }))), s = yield Promise.all(a), l = [];
+ for (let e of s) {
+ if (nc(e)) return e;
+ l.push(...e.value);
+ }
+ return Ql(l);
+ }));
+ }({
+ selectedItems: e.selection,
+ auth: d,
+ assetFieldSelection: n,
+ noCache: i,
+ isSimilaritySearchEnabled: a
+ }).then(((e) => {
+ g(e, r);
+ }));
+ },
+ "data-testid": "add-button",
+ isLoading: p.status === "Loading"
+ }, s.default.createElement(R$, {
+ status: p.status,
+ numberOfSelectedItems: e.selection.length
+ })));
+}
+function $$({ title: e, onRemove: t, children: n }) {
+ return s.default.createElement(B$, { title: e }, s.default.createElement(fz, {
+ $isChecked: !0,
+ $isFlex: !0
+ }, s.default.createElement(gg, {
+ "aria-label": Kl("Deselect"),
+ id: `deselect-${e}`,
+ isChecked: !0,
+ onChange: t,
+ "data-testid": "metaproperty-option"
+ }), s.default.createElement(F$, { htmlFor: `deselect-${e}` }, n)));
+}
+const B$ = ao.li`
+ display: flex;
+ flex: 1 1 0%;
+ align-items: center;
+ position: relative;
+ padding: ${po.spacing2} calc(${po.spacing6} - 4px) ${po.spacing2} ${po.spacing4};
+ height: 48px;
+ border-bottom: 1px solid rgba(0, 34, 51, 0.1);
+`, F$ = ao.label`
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-size: ${po.fontSize100};
+ margin-left: ${po.spacing3};
+ cursor: pointer;
+`;
+function U$({ asset: e }) {
+ let t = AD();
+ return s.default.createElement($$, {
+ title: e.name,
+ onRemove: () => t.toggleAssets([e])
+ }, s.default.createElement(H$, null, s.default.createElement(Dh, {
+ variant: "preview",
+ imageUrl: mR(e),
+ size: "m"
+ })), s.default.createElement(W$, null, e.name), vR(e) && s.default.createElement(V$, null, vR(e)));
+}
+const H$ = ao.div`
+ margin-right: ${po.spacing4};
+ max-width: 40px;
+`, W$ = ao.span`
+ width: 160px;
+ margin-right: ${po.spacing3};
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+`, V$ = ao.span`
+ flex-grow: 1;
+ color: rgba(0, 34, 51, 0.5);
+ font-size: ${po.fontSize75};
+ text-align: right;
+`;
+function q$({ collection: e }) {
+ let t = AD();
+ return s.default.createElement($$, {
+ title: e.name,
+ onRemove: () => t.toggleCollection(e)
+ }, s.default.createElement(G$, null, s.default.createElement(Dh, {
+ variant: "clean",
+ icon: s.default.createElement(di, null)
+ })), s.default.createElement(Y$, null, e.name), s.default.createElement(Z$, null, Of(e.assetCount, Kl("{} asset"), Kl("{} assets"))));
+}
+const G$ = ao.div`
+ margin-right: ${po.spacing4};
+`, Y$ = ao.span`
+ width: 160px;
+ margin-right: ${po.spacing3};
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+`, Z$ = ao.span`
+ flex-grow: 1;
+ color: rgba(0, 34, 51, 0.5);
+ font-size: ${po.fontSize75};
+ text-align: right;
+`;
+function K$({ selection: e }) {
+ return s.default.createElement(X$, { "data-testid": "selected-items-list" }, e.map(((e) => e.type === "asset" ? s.default.createElement(U$, {
+ key: e.value.id,
+ asset: e.value
+ }) : s.default.createElement(q$, {
+ key: e.value.id,
+ collection: e.value
+ }))));
+}
+const X$ = ao.ul`
+ display: flex;
+ flex-direction: column;
+ padding: ${po.spacing3} 0;
+ overflow-y: auto;
+ max-height: 400px;
+ list-style: none;
+ margin: 0;
+
+ li:last-child {
+ border-bottom-width: 0;
+ }
+`;
+function J$() {
+ let { selection: e, clear: t, selectAll: n } = AD(), { selectionMode: r, selectAllOption: o } = vo(), i = Do.use.page(), { setIsSelected: a, isEnabled: l, search: c, resetData: u } = Pd(), d = e.length >= 1 ? e.filter(((e) => e.type === "asset" && e.value.__typename === "Image")).map(((e) => e.value.databaseId ? e.value.databaseId : e.value.id)) : [], f = e.length;
+ return f === 0 ? null : s.default.createElement(Q$, { "data-testid": "selection-footer" }, s.default.createElement(eB, null, s.default.createElement(hf, {
+ buttonKind: "secondary",
+ direction: "Up",
+ title: Kl("View {} selected").replace("{}", f.toString())
+ }, (() => s.default.createElement(K$, { selection: e }))), r === "MultiSelect" && o && i.page === "assets" && s.default.createElement(il, {
+ variant: "secondary",
+ onClick: n
+ }, Kl("Select all")), s.default.createElement(il, {
+ variant: "clean",
+ onClick: t
+ }, Kl("Clear selection"))), r === "MultiSelect" && l && d.length > 0 && s.default.createElement(WR, {
+ text: Kl("Show similar"),
+ margin: "right",
+ marginAmount: "spacing3"
+ }, s.default.createElement(il, {
+ variant: "clean",
+ icon: s.default.createElement(Bi, null),
+ "aria-label": Kl("Show similar"),
+ onClick: () => {
+ u(), a(!0), c(d), t();
+ }
+ })), s.default.createElement(z$, { selection: e }));
+}
+const Q$ = ao.div`
+ display: flex;
+ flex-shrink: 0;
+ z-index: 10;
+ height: ${po.layoutSpacing5};
+ padding: ${po.spacing6};
+ align-items: center;
+ box-shadow: 0 -1px 0 0 rgba(0, 34, 51, 0.1), 0 -1px 6px 0 rgba(0, 34, 51, 0.1);
+ animation: var(--fade-in-down);
+`, eB = ao.span`
+ display: flex;
+ flex-grow: 1;
+ align-items: center;
+ gap: ${po.spacing2};
+`;
+let tB;
+function nB({ assetFieldSelection: e, assetFilter: t, assetTypes: n = [
+ "IMAGE",
+ "AUDIO",
+ "VIDEO",
+ "DOCUMENT",
+ "ARCHIVE"
+], defaultSearchTerm: r, language: o = "en_US", mode: i = "MultiSelect", onSuccess: a = (e, { selectedFile: t }) => console.log(e, t), theme: l, hideExternalAccess: c, selectedAssets: u, hideLimitedUse: d, isContainerMode: f = !1, __shouldAddOriginal__: p, hideSwitch: h = !1, noCache: g = !1, selectAllOption: m = !1 }) {
+ Jl(o);
+ let v = {
+ assetFieldSelection: e,
+ assetFilter: t,
+ assetTypes: n,
+ language: o,
+ onSuccess: a,
+ selectionMode: i,
+ theme: l,
+ hideExternalAccess: c,
+ __shouldAddOriginal__: p,
+ hideSwitch: h,
+ noCache: g,
+ selectAllOption: m
+ };
+ return s.default.createElement(ld, { sentryClient: tB }, s.default.createElement(Cc, { isContainerMode: f }, s.default.createElement(CD, null, s.default.createElement(cf, {
+ hideLimitedUse: d,
+ predefinedFilter: t
+ }, s.default.createElement(Bo, { defaultValue: r }, s.default.createElement(jd, null, s.default.createElement(mo, { value: v }, s.default.createElement(jD, { preselectedAssetIds: u ?? [] }, s.default.createElement(a$, { theme: v.theme }), s.default.createElement("div", { className: "cv-root cv-container" }, s.default.createElement(c$, null), s.default.createElement(rB, null), s.default.createElement(J$, null))))))))));
+}
+function rB() {
+ let e = Do.use.page(), { assetFilter: t } = vo();
+ return s.default.createElement(s.default.Fragment, null, e.page !== "collections" && (t === void 0 || t && t.showToolbar) && s.default.createElement(t$, null), e.page === "assets" && s.default.createElement(f$, null), e.page === "collections" && s.default.createElement(XD, null), e.page === "collection" && s.default.createElement(XR, { collection: e.collection }));
+}
+tB = new class extends We {
+ constructor(e) {
+ (function(e, t, n = [t], r = "npm") {
+ let o = e._metadata || {};
+ o.sdk ||= {
+ name: `sentry.javascript.${t}`,
+ packages: n.map(((e) => ({
+ name: `${r}:@sentry/${e}`,
+ version: je
+ }))),
+ version: je
+ }, e._metadata = o;
+ })(e, "browser", ["browser"], tt.SENTRY_SDK_SOURCE || "npm"), super(e), e.sendClientReports && tt.document && tt.document.addEventListener("visibilitychange", (() => {
+ tt.document.visibilityState === "hidden" && this._flushOutcomes();
+ }));
+ }
+ eventFromException(e, t) {
+ return function(e, t, n, r) {
+ let o = function(e, t, n, r) {
+ let o;
+ if (S(t) && t.error) return Ze(e, t.error);
+ if (C(t) || E(t, "DOMException")) {
+ let i = t;
+ if ("stack" in t) o = Ze(e, t);
+ else {
+ let t = i.name || (C(i) ? "DOMError" : "DOMException"), a = i.message ? `${t}: ${i.message}` : t;
+ o = Qe(e, a, n, r), $(o, a);
+ }
+ return "code" in i && (o.tags = {
+ ...o.tags,
+ "DOMException.code": `${i.code}`
+ }), o;
+ }
+ return x(t) ? Ze(e, t) : _(t) || T(t) ? (o = function(e, t, n, r) {
+ let o = ye(), i = o && o.getOptions().normalizeDepth, a = {
+ exception: { values: [{
+ type: T(t) ? t.constructor.name : "Error",
+ value: et(t, { isUnhandledRejection: r })
+ }] },
+ extra: { __serialized__: K(t, i) }
+ };
+ if (n) {
+ let t = Ke(e, n);
+ t.length && (a.exception.values[0].stacktrace = { frames: t });
+ }
+ return a;
+ }(e, t, n, void 0), B(o, { synthetic: !0 }), o) : (o = Qe(e, t, n, r), $(o, `${t}`, void 0), B(o, { synthetic: !0 }), o);
+ }(e, t, n && n.syntheticException || void 0, r);
+ return B(o), o.level = "error", n && n.event_id && (o.event_id = n.event_id), H(o);
+ }(this._options.stackParser, e, t, this._options.attachStacktrace);
+ }
+ eventFromMessage(e, t = "info", n) {
+ return function(e, t, n = "info", r, o) {
+ let i = Qe(e, t, r && r.syntheticException || void 0, o);
+ return i.level = n, r && r.event_id && (i.event_id = r.event_id), H(i);
+ }(this._options.stackParser, e, t, n, this._options.attachStacktrace);
+ }
+ captureUserFeedback(e) {
+ if (!this._isEnabled()) return void (Ge && m.warn("SDK not enabled, will not capture user feedback."));
+ let t = function(e, { metadata: t, tunnel: n, dsn: r }) {
+ return J({
+ event_id: e.event_id,
+ sent_at: (/* @__PURE__ */ new Date()).toISOString(),
+ ...t && t.sdk && { sdk: {
+ name: t.sdk.name,
+ version: t.sdk.version
+ } },
+ ...!!n && !!r && { dsn: y(r) }
+ }, [function(e) {
+ return [{ type: "user_report" }, e];
+ }(e)]);
+ }(e, {
+ metadata: this.getSdkMetadata(),
+ dsn: this.getDsn(),
+ tunnel: this.getOptions().tunnel
+ });
+ this._sendEnvelope(t);
+ }
+ _prepareEvent(e, t, n) {
+ return e.platform = e.platform || "javascript", super._prepareEvent(e, t, n);
+ }
+ _flushOutcomes() {
+ let e = this._clearOutcomes();
+ if (e.length === 0) return void (Ge && m.log("No outcomes to send"));
+ if (!this._dsn) return void (Ge && m.log("No dsn provided, will not send outcomes"));
+ Ge && m.log("Sending outcomes:", e);
+ let t = (n = e, J((r = this._options.tunnel && y(this._dsn)) ? { dsn: r } : {}, [[{ type: "client_report" }, {
+ timestamp: ue(),
+ discarded_events: n
+ }]]));
+ var n, r;
+ this._sendEnvelope(t);
+ }
+}({
+ dsn: "https://[email protected]/464",
+ autoSessionTracking: !0,
+ tracesSampleRate: 1,
+ integrations: [],
+ stackParser: ft,
+ transport: function(e, t = function() {
+ if (mt) return mt;
+ if ((e = tt.fetch) && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())) return mt = tt.fetch.bind(tt);
+ var e;
+ let t = tt.document, n = tt.fetch;
+ if (t && typeof t.createElement == "function") try {
+ let e = t.createElement("iframe");
+ e.hidden = !0, t.head.appendChild(e);
+ let r = e.contentWindow;
+ r && r.fetch && (n = r.fetch), t.head.removeChild(e);
+ } catch (e) {
+ Ge && m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", e);
+ }
+ return mt = n.bind(tt);
+ }()) {
+ let n = 0, r = 0;
+ return ht(e, (function(o) {
+ let i = o.body.length;
+ n += i, r++;
+ let a = {
+ body: o.body,
+ method: "POST",
+ referrerPolicy: "origin",
+ headers: e.headers,
+ keepalive: n <= 6e4 && r < 15,
+ ...e.fetchOptions
+ };
+ try {
+ return t(e.url, a).then(((e) => (n -= i, r--, {
+ statusCode: e.status,
+ headers: {
+ "x-sentry-rate-limits": e.headers.get("X-Sentry-Rate-Limits"),
+ "retry-after": e.headers.get("Retry-After")
+ }
+ })));
+ } catch (e) {
+ return mt = void 0, n -= i, r--, W(e);
+ }
+ }));
+ }
+}), new Ne(tB);
+var oB = i.Hg, iB = i.az, aB = i.aF;
+function BynderModalLayout(t0) {
+ let $ = c(10), { isOpen, onClose, portalConfig, compactViewOptions, onSuccess } = t0, t1;
+ $[0] !== compactViewOptions || $[1] !== onSuccess ? (t1 = /* @__PURE__ */ jsx(oB, {
+ ...compactViewOptions,
+ onSuccess,
+ mode: "SingleSelectFile"
+ }), $[0] = compactViewOptions, $[1] = onSuccess, $[2] = t1) : t1 = $[2];
+ let t2;
+ $[3] !== portalConfig || $[4] !== t1 ? (t2 = /* @__PURE__ */ jsx(iB, {
+ portal: portalConfig,
+ children: t1
+ }), $[3] = portalConfig, $[4] = t1, $[5] = t2) : t2 = $[5];
+ let t3;
+ return $[6] !== isOpen || $[7] !== onClose || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(aB, {
+ isOpen,
+ onClose,
+ children: t2
+ }), $[6] = isOpen, $[7] = onClose, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
+}
+export { BynderModalLayout as default };
+
+//# sourceMappingURL=BynderModalLayout.js.map
\ No newline at end of file