From 5c76802e9dec6848a2905de0f4dfb3c534cbb79b Mon Sep 17 00:00:00 2001 From: Gianluca Frediani Date: Thu, 10 Aug 2023 16:40:45 +0200 Subject: [PATCH] WIP --- assets/CcField.js | 2621 +++++++++++++++++ assets/new-request-form.js | 3 + assets/vendor.js | 1511 +++++----- package.json | 21 +- rollup.config.mjs | 2 +- .../new-request-form/NewRequestForm.tsx | 9 + .../new-request-form/fields/CcField.tsx | 96 + templates/document_head.hbs | 3 +- yarn.lock | 187 +- 9 files changed, 3683 insertions(+), 770 deletions(-) create mode 100644 assets/CcField.js create mode 100644 src/modules/new-request-form/fields/CcField.tsx diff --git a/assets/CcField.js b/assets/CcField.js new file mode 100644 index 000000000..a48a9d207 --- /dev/null +++ b/assets/CcField.js @@ -0,0 +1,2621 @@ +import { h, y, k as klona, r as reactExports, p, g as a, R as ReactExports, j as jsxRuntimeExports, F as Field, L as Label$1, H as Hint, i as Tag, M as Message, s as styled, l as focusStyles, m as FauxInput, I as Input } from 'vendor'; + +// src/create-anatomy.ts +var createAnatomy = (name, parts = []) => ({ + parts: (...values) => { + if (isEmpty(parts)) { + return createAnatomy(name, values); + } + throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?"); + }, + extendWith: (...values) => createAnatomy(name, [...parts, ...values]), + rename: (newName) => createAnatomy(newName, parts), + keys: () => parts, + build: () => [...new Set(parts)].reduce( + (prev, part) => Object.assign(prev, { + [part]: { + selector: [ + `&[data-scope="${toKebabCase(name)}"][data-part="${toKebabCase(part)}"]`, + `& [data-scope="${toKebabCase(name)}"][data-part="${toKebabCase(part)}"]` + ].join(", "), + attrs: { "data-scope": toKebabCase(name), "data-part": toKebabCase(part) } + } + }), + {} + ) +}); +var toKebabCase = (value) => value.replace(/([A-Z])([A-Z])/g, "$1-$2").replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(); +var isEmpty = (v) => v.length === 0; + +// src/attrs.ts +var dataAttr = (guard) => { + return guard ? "" : void 0; +}; +var ariaAttr = (guard) => { + return guard ? "true" : void 0; +}; + +// src/is-html-element.ts +function isHTMLElement$1(value) { + return typeof value === "object" && value?.nodeType === Node.ELEMENT_NODE && typeof value?.nodeName === "string"; +} + +// src/contains.ts +function contains(parent, child) { + if (!parent || !child) + return false; + if (!isHTMLElement$1(parent) || !isHTMLElement$1(child)) + return false; + return parent === child || parent.contains(child); +} + +// src/create-scope.ts +var getDocument = (node) => { + if (node.nodeType === Node.DOCUMENT_NODE) + return node; + return node.ownerDocument ?? document; +}; +function createScope(methods) { + const screen = { + getRootNode: (ctx) => ctx.getRootNode?.() ?? document, + getDoc: (ctx) => getDocument(screen.getRootNode(ctx)), + getWin: (ctx) => screen.getDoc(ctx).defaultView ?? window, + getActiveElement: (ctx) => screen.getDoc(ctx).activeElement, + getById: (ctx, id) => screen.getRootNode(ctx).getElementById(id) + }; + return { ...screen, ...methods }; +} + +// src/env.ts +var isDocument = (el) => el.nodeType === Node.DOCUMENT_NODE; +function getDocument2(el) { + if (isDocument(el)) + return el; + return el?.ownerDocument ?? document; +} +function getWindow$1(el) { + return el?.ownerDocument.defaultView ?? window; +} + +// src/get-by-id.ts +function itemById(v, id) { + return v.find((node) => node.id === id); +} +function indexOfId(v, id) { + const item = itemById(v, id); + return item ? v.indexOf(item) : -1; +} +function nextById(v, id, loop = true) { + let idx = indexOfId(v, id); + idx = loop ? (idx + 1) % v.length : Math.min(idx + 1, v.length - 1); + return v[idx]; +} +function prevById(v, id, loop = true) { + let idx = indexOfId(v, id); + if (idx === -1) + return loop ? v[v.length - 1] : null; + idx = loop ? (idx - 1 + v.length) % v.length : Math.max(0, idx - 1); + return v[idx]; +} + +// src/get-event-target.ts +function getEventTarget(event) { + return event.composedPath?.()[0] ?? event.target; +} + +// src/query.ts +function queryAll(root, selector) { + return Array.from(root?.querySelectorAll(selector) ?? []); +} +function raf(fn) { + const id = globalThis.requestAnimationFrame(fn); + return () => { + globalThis.cancelAnimationFrame(id); + }; +} + +// src/add-dom-event.ts +var addDomEvent = (target, eventName, handler, options) => { + const node = typeof target === "function" ? target() : target; + node?.addEventListener(eventName, handler, options); + return () => { + node?.removeEventListener(eventName, handler, options); + }; +}; +var isContextMenuEvent = (e) => { + return e.button === 2 || isCtrlKey(e) && e.button === 0; +}; +var isMac = () => /Mac|iPod|iPhone|iPad/.test(window.navigator.platform); +var isCtrlKey = (e) => isMac() ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey; + +// src/fire-event.ts +function fireCustomEvent(el, type, init) { + if (!el) + return; + const win = el.ownerDocument.defaultView || window; + const event = new win.CustomEvent(type, init); + return el.dispatchEvent(event); +} + +// src/get-event-key.ts +var keyMap = { + Up: "ArrowUp", + Down: "ArrowDown", + Esc: "Escape", + " ": "Space", + ",": "Comma", + Left: "ArrowLeft", + Right: "ArrowRight" +}; +var rtlKeyMap = { + ArrowLeft: "ArrowRight", + ArrowRight: "ArrowLeft" +}; +function getEventKey(event, options = {}) { + const { dir = "ltr", orientation = "horizontal" } = options; + let { key } = event; + key = keyMap[key] ?? key; + const isRtl = dir === "rtl" && orientation === "horizontal"; + if (isRtl && key in rtlKeyMap) { + key = rtlKeyMap[key]; + } + return key; +} + +// src/get-native-event.ts +function getNativeEvent(event) { + return event.nativeEvent ?? event; +} + +// src/observe-attributes.ts +function observeAttributes(node, attributes, fn) { + if (!node) + return; + const win = node.ownerDocument.defaultView || window; + const obs = new win.MutationObserver((changes) => { + for (const change of changes) { + if (change.type === "attributes" && change.attributeName && attributes.includes(change.attributeName)) { + fn(change); + } + } + }); + obs.observe(node, { attributes: true, attributeFilter: attributes }); + return () => obs.disconnect(); +} + +// src/input-event.ts +var getWindow = (el) => el.ownerDocument.defaultView || window; +function getDescriptor(el, options) { + const { type, property = "value" } = options; + const proto = getWindow(el)[type].prototype; + return Object.getOwnPropertyDescriptor(proto, property) ?? {}; +} +function dispatchInputValueEvent(el, options) { + if (!el) + return; + const win = getWindow(el); + if (!(el instanceof win.HTMLInputElement)) + return; + const { value, bubbles = true } = options; + const descriptor = getDescriptor(el, { + type: "HTMLInputElement", + property: "value" + }); + descriptor.set?.call(el, value); + const event = new win.Event("input", { bubbles }); + el.dispatchEvent(event); +} +function getClosestForm(el) { + if (isFormElement(el)) + return el.form; + else + return el.closest("form"); +} +function isFormElement(el) { + return el.matches("textarea, input, select, button"); +} +function trackFormReset(el, callback) { + if (!el) + return; + const form = getClosestForm(el); + form?.addEventListener("reset", callback, { passive: true }); + return () => { + form?.removeEventListener("reset", callback); + }; +} +function trackFieldsetDisabled(el, callback) { + const fieldset = el?.closest("fieldset"); + if (!fieldset) + return; + callback(fieldset.disabled); + return observeAttributes(fieldset, ["disabled"], () => callback(fieldset.disabled)); +} +function trackFormControl(el, options) { + if (!el) + return; + const { onFieldsetDisabled, onFormReset } = options; + const cleanups = [ + trackFormReset(el, onFormReset), + trackFieldsetDisabled(el, (disabled) => { + if (disabled) + onFieldsetDisabled(); + }) + ]; + return () => { + cleanups.forEach((cleanup) => cleanup?.()); + }; +} + +// src/index.ts +function copyVisualStyles(fromEl, toEl) { + if (!fromEl) + return; + const win = getWindow$1(fromEl); + const el = win.getComputedStyle(fromEl); + const cssText = "box-sizing:" + el.boxSizing + ";border-left:" + el.borderLeftWidth + " solid red;border-right:" + el.borderRightWidth + " solid red;font-family:" + el.fontFamily + ";font-feature-settings:" + el.fontFeatureSettings + ";font-kerning:" + el.fontKerning + ";font-size:" + el.fontSize + ";font-stretch:" + el.fontStretch + ";font-style:" + el.fontStyle + ";font-variant:" + el.fontVariant + ";font-variant-caps:" + el.fontVariantCaps + ";font-variant-ligatures:" + el.fontVariantLigatures + ";font-variant-numeric:" + el.fontVariantNumeric + ";font-weight:" + el.fontWeight + ";letter-spacing:" + el.letterSpacing + ";margin-left:" + el.marginLeft + ";margin-right:" + el.marginRight + ";padding-left:" + el.paddingLeft + ";padding-right:" + el.paddingRight + ";text-indent:" + el.textIndent + ";text-transform:" + el.textTransform; + toEl.style.cssText += cssText; +} +function createGhostElement(doc) { + var el = doc.createElement("div"); + el.id = "ghost"; + el.style.cssText = "display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;"; + doc.body.appendChild(el); + return el; +} +function autoResizeInput(input) { + if (!input) + return; + const doc = getDocument2(input); + const win = getWindow$1(input); + const ghost = createGhostElement(doc); + copyVisualStyles(input, ghost); + function resize() { + win.requestAnimationFrame(() => { + ghost.innerHTML = input.value; + const rect = win.getComputedStyle(ghost); + input?.style.setProperty("width", rect.width); + }); + } + resize(); + input?.addEventListener("input", resize); + input?.addEventListener("change", resize); + return () => { + doc.body.removeChild(ghost); + input?.removeEventListener("input", resize); + input?.removeEventListener("change", resize); + }; +} + +// src/proxy.ts +var isObject$1 = (x) => typeof x === "object" && x !== null; +var proxyStateMap = /* @__PURE__ */ new WeakMap(); +var refSet = /* @__PURE__ */ new WeakSet(); +var buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), canProxy = (x) => isObject$1(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), defaultHandlePromise = (promise) => { + switch (promise.status) { + case "fulfilled": + return promise.value; + case "rejected": + throw promise.reason; + default: + throw promise; + } +}, snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version, handlePromise = defaultHandlePromise) => { + const cache = snapCache.get(target); + if (cache?.[0] === version) { + return cache[1]; + } + const snap = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target)); + h(snap, true); + snapCache.set(target, [version, snap]); + Reflect.ownKeys(target).forEach((key) => { + const value = Reflect.get(target, key); + if (refSet.has(value)) { + h(value, false); + snap[key] = value; + } else if (value instanceof Promise) { + Object.defineProperty(snap, key, { + get() { + return handlePromise(value); + } + }); + } else if (proxyStateMap.has(value)) { + snap[key] = snapshot(value, handlePromise); + } else { + snap[key] = value; + } + }); + return Object.freeze(snap); +}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1, 1], proxyFunction2 = (initialObject) => { + if (!isObject$1(initialObject)) { + throw new Error("object required"); + } + const found = proxyCache.get(initialObject); + if (found) { + return found; + } + let version = versionHolder[0]; + const listeners = /* @__PURE__ */ new Set(); + const notifyUpdate = (op, nextVersion = ++versionHolder[0]) => { + if (version !== nextVersion) { + version = nextVersion; + listeners.forEach((listener) => listener(op, nextVersion)); + } + }; + let checkVersion = versionHolder[1]; + const ensureVersion = (nextCheckVersion = ++versionHolder[1]) => { + if (checkVersion !== nextCheckVersion && !listeners.size) { + checkVersion = nextCheckVersion; + propProxyStates.forEach(([propProxyState]) => { + const propVersion = propProxyState[1](nextCheckVersion); + if (propVersion > version) { + version = propVersion; + } + }); + } + return version; + }; + const createPropListener = (prop) => (op, nextVersion) => { + const newOp = [...op]; + newOp[1] = [prop, ...newOp[1]]; + notifyUpdate(newOp, nextVersion); + }; + const propProxyStates = /* @__PURE__ */ new Map(); + const addPropListener = (prop, propProxyState) => { + if (listeners.size) { + const remove = propProxyState[3](createPropListener(prop)); + propProxyStates.set(prop, [propProxyState, remove]); + } else { + propProxyStates.set(prop, [propProxyState]); + } + }; + const removePropListener = (prop) => { + const entry = propProxyStates.get(prop); + if (entry) { + propProxyStates.delete(prop); + entry[1]?.(); + } + }; + const addListener = (listener) => { + listeners.add(listener); + if (listeners.size === 1) { + propProxyStates.forEach(([propProxyState, prevRemove], prop) => { + const remove = propProxyState[3](createPropListener(prop)); + propProxyStates.set(prop, [propProxyState, remove]); + }); + } + const removeListener = () => { + listeners.delete(listener); + if (listeners.size === 0) { + propProxyStates.forEach(([propProxyState, remove], prop) => { + if (remove) { + remove(); + propProxyStates.set(prop, [propProxyState]); + } + }); + } + }; + return removeListener; + }; + const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject)); + const handler = { + deleteProperty(target, prop) { + const prevValue = Reflect.get(target, prop); + removePropListener(prop); + const deleted = Reflect.deleteProperty(target, prop); + if (deleted) { + notifyUpdate(["delete", [prop], prevValue]); + } + return deleted; + }, + set(target, prop, value, receiver) { + const hasPrevValue = Reflect.has(target, prop); + const prevValue = Reflect.get(target, prop, receiver); + if (hasPrevValue && (objectIs(prevValue, value) || proxyCache.has(value) && objectIs(prevValue, proxyCache.get(value)))) { + return true; + } + removePropListener(prop); + if (isObject$1(value)) { + value = y(value) || value; + } + let nextValue = value; + if (Object.getOwnPropertyDescriptor(target, prop)?.set) ; else if (value instanceof Promise) { + value.then((v) => { + value.status = "fulfilled"; + value.value = v; + notifyUpdate(["resolve", [prop], v]); + }).catch((e) => { + value.status = "rejected"; + value.reason = e; + notifyUpdate(["reject", [prop], e]); + }); + } else { + if (!proxyStateMap.has(value) && canProxy(value)) { + nextValue = proxy(value); + } + const childProxyState = !refSet.has(nextValue) && proxyStateMap.get(nextValue); + if (childProxyState) { + addPropListener(prop, childProxyState); + } + } + Reflect.set(target, prop, nextValue, receiver); + notifyUpdate(["set", [prop], value, prevValue]); + return true; + } + }; + const proxyObject = newProxy(baseObject, handler); + proxyCache.set(initialObject, proxyObject); + const proxyState = [baseObject, ensureVersion, createSnapshot, addListener]; + proxyStateMap.set(proxyObject, proxyState); + Reflect.ownKeys(initialObject).forEach((key) => { + const desc = Object.getOwnPropertyDescriptor(initialObject, key); + if (desc.get || desc.set) { + Object.defineProperty(baseObject, key, desc); + } else { + proxyObject[key] = initialObject[key]; + } + }); + return proxyObject; +}) => [ + // public functions + proxyFunction2, + // shared state + proxyStateMap, + refSet, + // internal things + objectIs, + newProxy, + canProxy, + defaultHandlePromise, + snapCache, + createSnapshot, + proxyCache, + versionHolder +]; +var [proxyFunction] = buildProxyFunction(); +function proxy(initialObject = {}) { + return proxyFunction(initialObject); +} +function subscribe(proxyObject, callback, notifyInSync) { + const proxyState = proxyStateMap.get(proxyObject); + let promise; + const ops = []; + const addListener = proxyState[3]; + let isListenerActive = false; + const listener = (op) => { + ops.push(op); + if (notifyInSync) { + callback(ops.splice(0)); + return; + } + if (!promise) { + promise = Promise.resolve().then(() => { + promise = void 0; + if (isListenerActive) { + callback(ops.splice(0)); + } + }); + } + }; + const removeListener = addListener(listener); + isListenerActive = true; + return () => { + isListenerActive = false; + removeListener(); + }; +} +function snapshot(proxyObject, handlePromise) { + const proxyState = proxyStateMap.get(proxyObject); + const [target, ensureVersion, createSnapshot] = proxyState; + return createSnapshot(target, ensureVersion(), handlePromise); +} +function ref(obj) { + refSet.add(obj); + return obj; +} + +// src/proxy-computed.ts +function proxyWithComputed(initialObject, computedFns) { + const keys = Object.keys(computedFns); + keys.forEach((key) => { + if (Object.getOwnPropertyDescriptor(initialObject, key)) { + throw new Error("object property already defined"); + } + const computedFn = computedFns[key]; + const { get, set } = typeof computedFn === "function" ? { get: computedFn } : computedFn; + const desc = {}; + desc.get = () => get(snapshot(proxyObject)); + if (set) { + desc.set = (newValue) => set(proxyObject, newValue); + } + Object.defineProperty(initialObject, key, desc); + }); + const proxyObject = proxy(initialObject); + return proxyObject; +} + +// src/subscribe-key.ts +var defaultCompareFn = (prev, next) => Object.is(prev, next); +function subscribeKey(obj, key, fn, sync, compareFn) { + let prev = Reflect.get(snapshot(obj), key); + const isEqual = compareFn || defaultCompareFn; + function onSnapshotChange() { + const snap = snapshot(obj); + if (isEqual(prev, snap[key])) + return; + fn(snap[key]); + prev = Reflect.get(snap, key); + } + return subscribe(obj, onSnapshotChange, sync); +} + +var __defProp = Object.defineProperty; +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __publicField = (obj, key, value) => { + __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); + return value; +}; + +// ../utilities/core/src/array.ts +function clear(v) { + while (v.length > 0) + v.pop(); + return v; +} + +// ../utilities/core/src/functions.ts +var runIfFn = (v, ...a) => { + const res = typeof v === "function" ? v(...a) : v; + return res ?? void 0; +}; +var cast = (v) => v; +var noop = () => { +}; +var uuid = /* @__PURE__ */ (() => { + let id = 0; + return () => { + id++; + return id.toString(36); + }; +})(); +var isArray = (v) => Array.isArray(v); +var isObject = (v) => !(v == null || typeof v !== "object" || isArray(v)); +var isNumber = (v) => typeof v === "number" && !Number.isNaN(v); +var isString = (v) => typeof v === "string"; +var isFunction = (v) => typeof v === "function"; + +// ../utilities/core/src/object.ts +function compact$1(obj) { + if (!isPlainObject$1(obj) || obj === void 0) { + return obj; + } + const keys = Reflect.ownKeys(obj).filter((key) => typeof key === "string"); + const filtered = {}; + for (const key of keys) { + const value = obj[key]; + if (value !== void 0) { + filtered[key] = compact$1(value); + } + } + return filtered; +} +var isPlainObject$1 = (value) => { + return value && typeof value === "object" && value.constructor === Object; +}; + +// ../utilities/core/src/warning.ts +function warn$1(...a) { + const m = a.length === 1 ? a[0] : a[1]; + const c = a.length === 2 ? a[0] : true; + if (c && "production" !== "production") { + console.warn(m); + } +} +function invariant(...a) { + const m = a.length === 1 ? a[0] : a[1]; + const c = a.length === 2 ? a[0] : true; + if (c && "production" !== "production") { + throw new Error(m); + } +} + +// src/deep-merge.ts +function deepMerge(source, ...objects) { + for (const obj of objects) { + const target = compact$1(obj); + for (const key in target) { + if (isObject(obj[key])) { + if (!source[key]) { + source[key] = {}; + } + deepMerge(source[key], obj[key]); + } else { + source[key] = obj[key]; + } + } + } + return source; +} +function structuredClone(v) { + return klona(v); +} +function toEvent(event) { + const obj = isString(event) ? { type: event } : event; + return obj; +} +function toArray(value) { + if (!value) + return []; + return isArray(value) ? value.slice() : [value]; +} +function isGuardHelper(value) { + return isObject(value) && value.predicate != null; +} + +// src/guard-utils.ts +var Truthy = () => true; +function exec(guardMap, ctx, event, meta) { + return (guard) => { + if (isString(guard)) { + return !!guardMap[guard]?.(ctx, event, meta); + } + if (isFunction(guard)) { + return guard(ctx, event, meta); + } + return guard.predicate(guardMap)(ctx, event, meta); + }; +} +function or$1(...conditions) { + return { + predicate: (guardMap) => (ctx, event, meta) => conditions.map(exec(guardMap, ctx, event, meta)).some(Boolean) + }; +} +function and$1(...conditions) { + return { + predicate: (guardMap) => (ctx, event, meta) => conditions.map(exec(guardMap, ctx, event, meta)).every(Boolean) + }; +} +function not$1(condition) { + return { + predicate: (guardMap) => (ctx, event, meta) => { + return !exec(guardMap, ctx, event, meta)(condition); + } + }; +} +function stateIn(...values) { + return (_ctx, _evt, meta) => meta.state.matches(...values); +} +var guards = { or: or$1, and: and$1, not: not$1, stateIn }; +function determineGuardFn(guard, guardMap) { + guard = guard ?? Truthy; + return (context, event, meta) => { + if (isString(guard)) { + const value = guardMap[guard]; + return isFunction(value) ? value(context, event, meta) : value; + } + if (isGuardHelper(guard)) { + return guard.predicate(guardMap)(context, event, meta); + } + return guard?.(context, event, meta); + }; +} +function determineActionsFn(values, guardMap) { + return (context, event, meta) => { + if (isGuardHelper(values)) { + return values.predicate(guardMap)(context, event, meta); + } + return values; + }; +} +function createProxy(config) { + const computedContext = config.computed ?? cast({}); + const initialContext = config.context ?? cast({}); + const state = proxy({ + value: config.initial ?? "", + previousValue: "", + event: cast({}), + previousEvent: cast({}), + context: proxyWithComputed(initialContext, computedContext), + done: false, + tags: [], + hasTag(tag) { + return this.tags.includes(tag); + }, + matches(...value) { + return value.includes(this.value); + }, + can(event) { + return cast(this).nextEvents.includes(event); + }, + get nextEvents() { + const stateEvents = config.states?.[this.value]?.["on"] ?? {}; + const globalEvents = config?.on ?? {}; + return Object.keys({ ...stateEvents, ...globalEvents }); + }, + get changed() { + if (this.event.value === "machine.init" /* Init */ || !this.previousValue) + return false; + return this.value !== this.previousValue; + } + }); + return cast(state); +} + +// src/delay-utils.ts +function determineDelayFn(delay, delaysMap) { + return (context, event) => { + if (isNumber(delay)) + return delay; + if (isFunction(delay)) { + return delay(context, event); + } + if (isString(delay)) { + const value = Number.parseFloat(delay); + if (!Number.isNaN(value)) { + return value; + } + if (delaysMap) { + const valueOrFn = delaysMap?.[delay]; + invariant( + valueOrFn == null, + `[@zag-js/core > determine-delay] Cannot determine delay for \`${delay}\`. It doesn't exist in \`options.delays\`` + ); + return isFunction(valueOrFn) ? valueOrFn(context, event) : valueOrFn; + } + } + }; +} + +// src/transition-utils.ts +function toTarget(target) { + return isString(target) ? { target } : target; +} +function determineTransitionFn(transitions, guardMap) { + return (context, event, meta) => { + return toArray(transitions).map(toTarget).find((transition) => { + const determineGuard = determineGuardFn(transition.guard, guardMap); + const guard = determineGuard(context, event, meta); + return guard ?? transition.target ?? transition.actions; + }); + }; +} + +// src/machine.ts +var Machine = class _Machine { + // Let's get started! + constructor(config, options) { + __publicField(this, "status", "Not Started" /* NotStarted */); + __publicField(this, "state"); + __publicField(this, "initialState"); + __publicField(this, "initialContext"); + __publicField(this, "id"); + __publicField(this, "type", "machine" /* Machine */); + // Cleanup function map (per state) + __publicField(this, "activityEvents", /* @__PURE__ */ new Map()); + __publicField(this, "delayedEvents", /* @__PURE__ */ new Map()); + // state update listeners the user can opt-in for + __publicField(this, "stateListeners", /* @__PURE__ */ new Set()); + __publicField(this, "contextListeners", /* @__PURE__ */ new Set()); + __publicField(this, "eventListeners", /* @__PURE__ */ new Set()); + __publicField(this, "doneListeners", /* @__PURE__ */ new Set()); + __publicField(this, "contextWatchers", /* @__PURE__ */ new Set()); + // Cleanup functions (for `subscribe`) + __publicField(this, "removeStateListener", noop); + __publicField(this, "removeEventListener", noop); + __publicField(this, "removeContextListener", noop); + // For Parent <==> Spawned Actor relationship + __publicField(this, "parent"); + __publicField(this, "children", /* @__PURE__ */ new Map()); + // A map of guard, action, delay implementations + __publicField(this, "guardMap"); + __publicField(this, "actionMap"); + __publicField(this, "delayMap"); + __publicField(this, "activityMap"); + __publicField(this, "sync"); + __publicField(this, "options"); + __publicField(this, "config"); + // Starts the interpreted machine. + __publicField(this, "start", (init) => { + this.state.value = ""; + if (this.status === "Running" /* Running */) { + return this; + } + this.status = "Running" /* Running */; + this.removeStateListener = subscribe( + this.state, + () => { + this.stateListeners.forEach((listener) => { + listener(this.stateSnapshot); + }); + }, + this.sync + ); + this.removeEventListener = subscribeKey( + this.state, + "event", + (event2) => { + this.executeActions(this.config.onEvent, event2); + this.eventListeners.forEach((listener) => { + listener(event2); + }); + }, + this.sync + ); + this.removeContextListener = subscribe( + this.state.context, + () => { + this.log("Context:", this.contextSnapshot); + this.contextListeners.forEach((listener) => { + listener(this.contextSnapshot); + }); + }, + this.sync || this.options.debug + ); + this.setupContextWatchers(); + this.executeActivities(toEvent("machine.start" /* Start */), toArray(this.config.activities), "machine.start" /* Start */); + this.executeActions(this.config.entry, toEvent("machine.start" /* Start */)); + const event = toEvent("machine.init" /* Init */); + const target = isObject(init) ? init.value : init; + const context = isObject(init) ? init.context : void 0; + if (context) { + this.setContext(context); + } + const transition = { + target: target ?? this.config.initial + }; + const next = this.getNextStateInfo(transition, event); + this.initialState = next; + this.performStateChangeEffects(this.state.value, next, event); + return this; + }); + __publicField(this, "setupContextWatchers", () => { + for (const [key, fn] of Object.entries(this.config.watch ?? {})) { + const compareFn = this.options.compareFns?.[key]; + const cleanup = subscribeKey( + this.state.context, + key, + () => { + this.executeActions(fn, this.state.event); + }, + this.sync, + compareFn + ); + this.contextWatchers.add(cleanup); + } + }); + // Stops the interpreted machine + __publicField(this, "stop", () => { + if (this.status === "Stopped" /* Stopped */) + return; + this.performExitEffects(this.state.value, toEvent("machine.stop" /* Stop */)); + this.executeActions(this.config.exit, toEvent("machine.stop" /* Stop */)); + this.setState(""); + this.setEvent("machine.stop" /* Stop */); + this.stopStateListeners(); + this.stopChildren(); + this.stopActivities(); + this.stopDelayedEvents(); + this.stopContextWatchers(); + this.stopEventListeners(); + this.stopContextListeners(); + this.status = "Stopped" /* Stopped */; + return this; + }); + __publicField(this, "stopEventListeners", () => { + this.eventListeners.clear(); + this.removeEventListener(); + }); + __publicField(this, "stopContextListeners", () => { + this.contextListeners.clear(); + this.removeContextListener(); + }); + __publicField(this, "stopStateListeners", () => { + this.removeStateListener(); + this.stateListeners.clear(); + }); + __publicField(this, "stopContextWatchers", () => { + this.contextWatchers.forEach((fn) => fn()); + this.contextWatchers.clear(); + }); + __publicField(this, "stopDelayedEvents", () => { + this.delayedEvents.forEach((state) => { + state.forEach((stop) => stop()); + }); + this.delayedEvents.clear(); + }); + // Cleanup running activities (e.g `setInterval`, invoked callbacks, promises) + __publicField(this, "stopActivities", (state) => { + if (state) { + this.activityEvents.get(state)?.forEach((stop) => stop()); + this.activityEvents.get(state)?.clear(); + this.activityEvents.delete(state); + } else { + this.activityEvents.forEach((state2) => { + state2.forEach((stop) => stop()); + state2.clear(); + }); + this.activityEvents.clear(); + } + }); + /** + * Function to send event to spawned child machine or actor + */ + __publicField(this, "sendChild", (evt, to) => { + const event = toEvent(evt); + const id = runIfFn(to, this.contextSnapshot); + const child = this.children.get(id); + if (!child) { + invariant(`[@zag-js/core] Cannot send '${event.type}' event to unknown child`); + } + child.send(event); + }); + /** + * Function to stop a running child machine or actor + */ + __publicField(this, "stopChild", (id) => { + if (!this.children.has(id)) { + invariant(`[@zag-js/core > stop-child] Cannot stop unknown child ${id}`); + } + this.children.get(id).stop(); + this.children.delete(id); + }); + __publicField(this, "removeChild", (id) => { + this.children.delete(id); + }); + // Stop and delete spawned actors + __publicField(this, "stopChildren", () => { + this.children.forEach((child) => child.stop()); + this.children.clear(); + }); + __publicField(this, "setParent", (parent) => { + this.parent = parent; + }); + __publicField(this, "spawn", (src, id) => { + const actor = runIfFn(src); + if (id) + actor.id = id; + actor.type = "machine.actor" /* Actor */; + actor.setParent(this); + this.children.set(actor.id, cast(actor)); + actor.onDone(() => { + this.removeChild(actor.id); + }).start(); + return cast(ref(actor)); + }); + __publicField(this, "addActivityCleanup", (state, cleanup) => { + if (!state) + return; + if (!this.activityEvents.has(state)) { + this.activityEvents.set(state, /* @__PURE__ */ new Set([cleanup])); + } else { + this.activityEvents.get(state)?.add(cleanup); + } + }); + __publicField(this, "setState", (target) => { + this.state.previousValue = this.state.value; + this.state.value = target; + const stateNode = this.getStateNode(target); + if (target == null) { + clear(this.state.tags); + } else { + this.state.tags = toArray(stateNode?.tags); + } + }); + __publicField(this, "transformContext", (context) => { + this.options?.transformContext?.(context); + return context; + }); + /** + * To used within side effects for React or Vue to update context + */ + __publicField(this, "setContext", (context) => { + if (!context) + return; + deepMerge(this.state.context, this.transformContext(context)); + }); + __publicField(this, "withContext", (context) => { + const transformed = this.transformContext(context); + const newContext = { ...this.config.context, ...compact$1(transformed) }; + return new _Machine({ ...this.config, context: newContext }, this.options); + }); + __publicField(this, "setOptions", (options) => { + const opts = compact$1(options); + this.actionMap = { ...this.actionMap, ...opts.actions }; + this.delayMap = { ...this.delayMap, ...opts.delays }; + this.activityMap = { ...this.activityMap, ...opts.activities }; + this.guardMap = { ...this.guardMap, ...opts.guards }; + }); + __publicField(this, "getStateNode", (state) => { + if (!state) + return; + return this.config.states?.[state]; + }); + __publicField(this, "getNextStateInfo", (transitions, event) => { + const transition = this.determineTransition(transitions, event); + const isTargetless = !transition?.target; + const target = transition?.target ?? this.state.value; + const changed = this.state.value !== target; + const stateNode = this.getStateNode(target); + const reenter = !isTargetless && !changed && !transition?.internal; + const info = { + reenter, + transition, + stateNode, + target, + changed + }; + this.log("NextState:", `[${event.type}]`, this.state.value, "---->", info.target); + return info; + }); + __publicField(this, "getActionFromDelayedTransition", (transition) => { + const event = toEvent("machine.after" /* After */); + const determineDelay = determineDelayFn(transition.delay, this.delayMap); + const delay = determineDelay(this.contextSnapshot, event); + let id; + return { + entry: () => { + id = globalThis.setTimeout(() => { + const next = this.getNextStateInfo(transition, event); + this.performStateChangeEffects(this.state.value, next, event); + }, delay); + }, + exit: () => { + globalThis.clearTimeout(id); + } + }; + }); + /** + * All `after` events leverage `setTimeout` and `clearTimeout`, + * we invoke the `clearTimeout` on exit and `setTimeout` on entry. + * + * To achieve this, we split the `after` defintion into `entry` and `exit` + * functions and append them to the state's `entry` and `exit` actions + */ + __publicField(this, "getDelayedEventActions", (state) => { + const stateNode = this.getStateNode(state); + const event = toEvent("machine.after" /* After */); + if (!stateNode || !stateNode.after) + return; + const entries = []; + const exits = []; + if (isArray(stateNode.after)) { + const transition = this.determineTransition(stateNode.after, event); + if (!transition) + return; + const actions = this.getActionFromDelayedTransition(transition); + entries.push(actions.entry); + exits.push(actions.exit); + } else if (isObject(stateNode.after)) { + for (const delay in stateNode.after) { + const transition = stateNode.after[delay]; + let resolvedTransition = {}; + if (isArray(transition)) { + const picked = this.determineTransition(transition, event); + if (picked) + resolvedTransition = picked; + } else if (isString(transition)) { + resolvedTransition = { target: transition, delay }; + } else { + resolvedTransition = { ...transition, delay }; + } + const actions = this.getActionFromDelayedTransition(resolvedTransition); + entries.push(actions.entry); + exits.push(actions.exit); + } + } + return { entries, exits }; + }); + /** + * Function to executes defined actions. It can accept actions as string + * (referencing `options.actions`) or actual functions. + */ + __publicField(this, "executeActions", (actions, event) => { + const pickedActions = determineActionsFn(actions, this.guardMap)(this.contextSnapshot, event, this.guardMeta); + for (const action of toArray(pickedActions)) { + const fn = isString(action) ? this.actionMap?.[action] : action; + warn$1( + isString(action) && !fn, + `[@zag-js/core > execute-actions] No implementation found for action: \`${action}\`` + ); + fn?.(this.state.context, event, this.meta); + } + }); + /** + * Function to execute running activities and registers + * their cleanup function internally (to be called later on when we exit the state) + */ + __publicField(this, "executeActivities", (event, activities, state) => { + for (const activity of activities) { + const fn = isString(activity) ? this.activityMap?.[activity] : activity; + if (!fn) { + warn$1(`[@zag-js/core > execute-activity] No implementation found for activity: \`${activity}\``); + continue; + } + const cleanup = fn(this.state.context, event, this.meta); + if (cleanup) { + this.addActivityCleanup(state ?? this.state.value, cleanup); + } + } + }); + /** + * Normalizes the `every` definition to transition. `every` can be: + * - An array of possible actions to run (we need to pick the first match based on guard) + * - An object of intervals and actions + */ + __publicField(this, "createEveryActivities", (every, callbackfn) => { + if (!every) + return; + const event = toEvent("machine.every" /* Every */); + if (isArray(every)) { + const picked = toArray(every).find((transition) => { + const delayOrFn = transition.delay; + const determineDelay2 = determineDelayFn(delayOrFn, this.delayMap); + const delay2 = determineDelay2(this.contextSnapshot, event); + const determineGuard = determineGuardFn(transition.guard, this.guardMap); + const guard = determineGuard(this.contextSnapshot, event, this.guardMeta); + return guard ?? delay2 != null; + }); + if (!picked) + return; + const determineDelay = determineDelayFn(picked.delay, this.delayMap); + const delay = determineDelay(this.contextSnapshot, event); + const activity = () => { + const id = globalThis.setInterval(() => { + this.executeActions(picked.actions, event); + }, delay); + return () => { + globalThis.clearInterval(id); + }; + }; + callbackfn(activity); + } else { + for (const interval in every) { + const actions = every?.[interval]; + const determineDelay = determineDelayFn(interval, this.delayMap); + const delay = determineDelay(this.contextSnapshot, event); + const activity = () => { + const id = globalThis.setInterval(() => { + this.executeActions(actions, event); + }, delay); + return () => { + globalThis.clearInterval(id); + }; + }; + callbackfn(activity); + } + } + }); + __publicField(this, "setEvent", (event) => { + this.state.previousEvent = this.state.event; + this.state.event = ref(toEvent(event)); + }); + __publicField(this, "performExitEffects", (current, event) => { + const currentState = this.state.value; + if (currentState === "") + return; + const stateNode = current ? this.getStateNode(current) : void 0; + this.stopActivities(currentState); + const _exit = determineActionsFn(stateNode?.exit, this.guardMap)(this.contextSnapshot, event, this.guardMeta); + const exitActions = toArray(_exit); + const afterExitActions = this.delayedEvents.get(currentState); + if (afterExitActions) { + exitActions.push(...afterExitActions); + } + this.executeActions(exitActions, event); + this.eventListeners.clear(); + }); + __publicField(this, "performEntryEffects", (next, event) => { + const stateNode = this.getStateNode(next); + const activities = toArray(stateNode?.activities); + this.createEveryActivities(stateNode?.every, (activity) => { + activities.unshift(activity); + }); + if (activities.length > 0) { + this.executeActivities(event, activities); + } + const pickedActions = determineActionsFn(stateNode?.entry, this.guardMap)( + this.contextSnapshot, + event, + this.guardMeta + ); + const entryActions = toArray(pickedActions); + const afterActions = this.getDelayedEventActions(next); + if (stateNode?.after && afterActions) { + this.delayedEvents.set(next, afterActions?.exits); + entryActions.push(...afterActions.entries); + } + this.executeActions(entryActions, event); + if (stateNode?.type === "final") { + this.state.done = true; + this.doneListeners.forEach((listener) => { + listener(this.stateSnapshot); + }); + this.stop(); + } + }); + __publicField(this, "performTransitionEffects", (transitions, event) => { + const transition = this.determineTransition(transitions, event); + this.executeActions(transition?.actions, event); + }); + /** + * Performs all the requires side-effects or reactions when + * we move from state A => state B. + * + * The Effect order: + * Exit actions (current state) => Transition actions => Go to state => Entry actions (next state) + */ + __publicField(this, "performStateChangeEffects", (current, next, event) => { + this.setEvent(event); + const changed = next.changed || next.reenter; + if (changed) { + this.performExitEffects(current, event); + } + this.performTransitionEffects(next.transition, event); + this.setState(next.target); + if (changed) { + this.performEntryEffects(next.target, event); + } + }); + __publicField(this, "determineTransition", (transition, event) => { + const fn = determineTransitionFn(transition, this.guardMap); + return fn?.(this.contextSnapshot, event, this.guardMeta); + }); + /** + * Function to send event to parent machine from spawned child + */ + __publicField(this, "sendParent", (evt) => { + if (!this.parent) { + invariant("[@zag-js/core > send-parent] Cannot send event to an unknown parent"); + } + const event = toEvent(evt); + this.parent?.send(event); + }); + __publicField(this, "log", (...args) => { + }); + /** + * Function to send an event to current machine + */ + __publicField(this, "send", (evt) => { + const event = toEvent(evt); + this.transition(this.state.value, event); + }); + __publicField(this, "transition", (state, evt) => { + const stateNode = isString(state) ? this.getStateNode(state) : state?.stateNode; + const event = toEvent(evt); + if (!stateNode && !this.config.on) { + const msg = this.status === "Stopped" /* Stopped */ ? "[@zag-js/core > transition] Cannot transition a stopped machine" : `[@zag-js/core > transition] State does not have a definition for \`state\`: ${state}, \`event\`: ${event.type}`; + warn$1(msg); + return; + } + const transitions = stateNode?.on?.[event.type] ?? this.config.on?.[event.type]; + const next = this.getNextStateInfo(transitions, event); + this.performStateChangeEffects(this.state.value, next, event); + return next.stateNode; + }); + __publicField(this, "subscribe", (listener) => { + this.stateListeners.add(listener); + if (this.status === "Running" /* Running */) { + listener(this.stateSnapshot); + } + return () => { + this.stateListeners.delete(listener); + }; + }); + __publicField(this, "onDone", (listener) => { + this.doneListeners.add(listener); + return this; + }); + __publicField(this, "onTransition", (listener) => { + this.stateListeners.add(listener); + if (this.status === "Running" /* Running */) { + listener(this.stateSnapshot); + } + return this; + }); + __publicField(this, "onChange", (listener) => { + this.contextListeners.add(listener); + return this; + }); + __publicField(this, "onEvent", (listener) => { + this.eventListeners.add(listener); + return this; + }); + this.config = structuredClone(config); + this.options = structuredClone(options ?? {}); + this.id = this.config.id ?? `machine-${uuid()}`; + this.guardMap = this.options?.guards ?? {}; + this.actionMap = this.options?.actions ?? {}; + this.delayMap = this.options?.delays ?? {}; + this.activityMap = this.options?.activities ?? {}; + this.sync = this.options?.sync ?? false; + this.state = createProxy(this.config); + this.initialContext = snapshot(this.state.context); + this.transformContext(this.state.context); + const event = toEvent("machine.created" /* Created */); + this.executeActions(this.config?.created, event); + } + // immutable state value + get stateSnapshot() { + return cast(snapshot(this.state)); + } + getState() { + return this.stateSnapshot; + } + // immutable context value + get contextSnapshot() { + return this.stateSnapshot.context; + } + /** + * A reference to the instance methods of the machine. + * Useful when spawning child machines and managing the communication between them. + */ + get self() { + const self = this; + return { + id: this.id, + send: this.send.bind(this), + sendParent: this.sendParent.bind(this), + sendChild: this.sendChild.bind(this), + stop: this.stop.bind(this), + stopChild: this.stopChild.bind(this), + spawn: this.spawn.bind(this), + get state() { + return self.stateSnapshot; + }, + get initialContext() { + return self.initialContext; + }, + get initialState() { + return self.initialState?.target ?? ""; + } + }; + } + get meta() { + return { + state: this.stateSnapshot, + guards: this.guardMap, + send: this.send.bind(this), + self: this.self, + initialContext: this.initialContext, + initialState: this.initialState?.target ?? "", + getState: () => this.stateSnapshot, + getAction: (key) => this.actionMap[key], + getGuard: (key) => this.guardMap[key] + }; + } + get guardMeta() { + return { + state: this.stateSnapshot + }; + } + get [Symbol.toStringTag]() { + return "Machine"; + } +}; +var createMachine = (config, options) => new Machine(config, options); + +// src/proxy-tab-focus.ts + +// src/shared.ts +var isHTMLElement = (element) => typeof element === "object" && element !== null && element.nodeType === 1; +function isVisible(el) { + if (!isHTMLElement(el)) + return false; + return el.offsetWidth > 0 || el.offsetHeight > 0 || el.getClientRects().length > 0; +} +var focusableSelector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type"; +function isFocusable(element) { + if (!element || element.closest("[inert]")) + return false; + return element.matches(focusableSelector) && isVisible(element); +} + +// src/array.ts +var callAll = (...fns) => (...a) => { + fns.forEach(function(fn) { + fn?.(...a); + }); +}; + +// src/object.ts +function compact(obj) { + if (!isPlainObject(obj) || obj === void 0) { + return obj; + } + const keys = Reflect.ownKeys(obj).filter((key) => typeof key === "string"); + const filtered = {}; + for (const key of keys) { + const value = obj[key]; + if (value !== void 0) { + filtered[key] = compact(value); + } + } + return filtered; +} +var isPlainObject = (value) => { + return value && typeof value === "object" && value.constructor === Object; +}; + +// src/warning.ts +function warn(...a) { + const m = a.length === 1 ? a[0] : a[1]; + const c = a.length === 2 ? a[0] : true; + if (c && "production" !== "production") { + console.warn(m); + } +} + +// src/index.ts + +// src/get-window-frames.ts +function getWindowFrames(win) { + const frames = { + each(cb) { + for (let i = 0; i < win.frames?.length; i += 1) { + const frame = win.frames[i]; + if (frame) + cb(frame); + } + }, + addEventListener(event, listener, options) { + frames.each((frame) => { + try { + frame.document.addEventListener(event, listener, options); + } catch (err) { + console.warn(err); + } + }); + return () => { + try { + frames.removeEventListener(event, listener, options); + } catch (err) { + console.warn(err); + } + }; + }, + removeEventListener(event, listener, options) { + frames.each((frame) => { + try { + frame.document.removeEventListener(event, listener, options); + } catch (err) { + console.warn(err); + } + }); + } + }; + return frames; +} + +// src/index.ts +var POINTER_OUTSIDE_EVENT = "pointerdown.outside"; +var FOCUS_OUTSIDE_EVENT = "focus.outside"; +function isComposedPathFocusable(event) { + const composedPath = event.composedPath() ?? [event.target]; + for (const node of composedPath) { + if (isHTMLElement$1(node) && isFocusable(node)) + return true; + } + return false; +} +var isPointerEvent = (event) => "clientY" in event; +function isEventPointWithin(node, event) { + if (!isPointerEvent(event) || !node) + return false; + const rect = node.getBoundingClientRect(); + if (rect.width === 0 || rect.height === 0) + return false; + return rect.top <= event.clientY && event.clientY <= rect.top + rect.height && rect.left <= event.clientX && event.clientX <= rect.left + rect.width; +} +function trackInteractOutsideImpl(node, options) { + const { exclude, onFocusOutside, onPointerDownOutside, onInteractOutside } = options; + if (!node) + return; + const doc = getDocument2(node); + const win = getWindow$1(node); + const frames = getWindowFrames(win); + function isEventOutside(event) { + const target = getEventTarget(event); + if (!isHTMLElement$1(target)) + return false; + if (contains(node, target)) + return false; + if (isEventPointWithin(node, event)) + return false; + return !exclude?.(target); + } + let clickHandler; + function onPointerDown(event) { + function handler() { + if (!node || !isEventOutside(event)) + return; + if (onPointerDownOutside || onInteractOutside) { + const handler2 = callAll(onPointerDownOutside, onInteractOutside); + node.addEventListener(POINTER_OUTSIDE_EVENT, handler2, { once: true }); + } + fireCustomEvent(node, POINTER_OUTSIDE_EVENT, { + bubbles: false, + cancelable: true, + detail: { + originalEvent: event, + contextmenu: isContextMenuEvent(event), + focusable: isComposedPathFocusable(event) + } + }); + } + if (event.pointerType === "touch") { + frames.removeEventListener("click", handler); + doc.removeEventListener("click", handler); + clickHandler = handler; + doc.addEventListener("click", handler, { once: true }); + frames.addEventListener("click", handler, { once: true }); + } else { + handler(); + } + } + const cleanups = /* @__PURE__ */ new Set(); + const timer = setTimeout(() => { + cleanups.add(frames.addEventListener("pointerdown", onPointerDown, true)); + cleanups.add(addDomEvent(doc, "pointerdown", onPointerDown, true)); + }, 0); + function onFocusin(event) { + if (!node || !isEventOutside(event)) + return; + if (onFocusOutside || onInteractOutside) { + const handler = callAll(onFocusOutside, onInteractOutside); + node.addEventListener(FOCUS_OUTSIDE_EVENT, handler, { once: true }); + } + fireCustomEvent(node, FOCUS_OUTSIDE_EVENT, { + bubbles: false, + cancelable: true, + detail: { + originalEvent: event, + contextmenu: false, + focusable: isFocusable(getEventTarget(event)) + } + }); + } + cleanups.add(addDomEvent(doc, "focusin", onFocusin, true)); + cleanups.add(frames.addEventListener("focusin", onFocusin, true)); + return () => { + clearTimeout(timer); + if (clickHandler) { + frames.removeEventListener("click", clickHandler); + doc.removeEventListener("click", clickHandler); + } + cleanups.forEach((fn) => fn()); + }; +} +function trackInteractOutside(nodeOrFn, options) { + const { defer } = options; + const func = defer ? raf : (v) => v(); + const cleanups = []; + cleanups.push( + func(() => { + const node = typeof nodeOrFn === "function" ? nodeOrFn() : nodeOrFn; + cleanups.push(trackInteractOutsideImpl(node, options)); + }) + ); + return () => { + cleanups.forEach((fn) => fn?.()); + }; +} + +// src/index.ts +var visuallyHiddenStyle = { + border: "0", + clip: "rect(0 0 0 0)", + height: "1px", + margin: "-1px", + overflow: "hidden", + padding: "0", + position: "absolute", + width: "1px", + whiteSpace: "nowrap", + wordWrap: "normal" +}; +function setVisuallyHidden(el) { + Object.assign(el.style, visuallyHiddenStyle); +} + +// src/index.ts +var ID = "__live-region__"; +function createLiveRegion(opts = {}) { + const { level = "polite", document: doc = document, root, delay: _delay = 0 } = opts; + const win = doc.defaultView ?? window; + const parent = root ?? doc.body; + function announce(message, delay) { + const oldRegion = doc.getElementById(ID); + oldRegion?.remove(); + delay = delay ?? _delay; + const region = doc.createElement("span"); + region.id = ID; + region.dataset.liveAnnouncer = "true"; + const role = level !== "assertive" ? "status" : "alert"; + region.setAttribute("aria-live", level); + region.setAttribute("role", role); + setVisuallyHidden(region); + parent.appendChild(region); + win.setTimeout(() => { + region.textContent = message; + }, delay); + } + function destroy() { + const oldRegion = doc.getElementById(ID); + oldRegion?.remove(); + } + return { + announce, + destroy, + toJSON() { + return ID; + } + }; +} + +// src/tags-input.anatomy.ts +var anatomy = createAnatomy("tagsInput").parts( + "root", + "label", + "control", + "input", + "clearTrigger", + "tag", + "tagInput", + "tagDeleteTrigger" +); +var parts = anatomy.build(); +var dom = createScope({ + getRootId: (ctx) => ctx.ids?.root ?? `tags-input:${ctx.id}`, + getInputId: (ctx) => ctx.ids?.input ?? `tags-input:${ctx.id}:input`, + getClearTriggerId: (ctx) => ctx.ids?.clearBtn ?? `tags-input:${ctx.id}:clear-btn`, + getHiddenInputId: (ctx) => `tags-input:${ctx.id}:hidden-input`, + getLabelId: (ctx) => ctx.ids?.label ?? `tags-input:${ctx.id}:label`, + getControlId: (ctx) => ctx.ids?.control ?? `tags-input:${ctx.id}:control`, + getTagId: (ctx, opt) => ctx.ids?.tag?.(opt) ?? `tags-input:${ctx.id}:tag:${opt.value}:${opt.index}`, + getTagDeleteTriggerId: (ctx, opt) => ctx.ids?.tagDeleteTrigger?.(opt) ?? `${dom.getTagId(ctx, opt)}:delete-btn`, + getTagInputId: (ctx, opt) => ctx.ids?.tagInput?.(opt) ?? `${dom.getTagId(ctx, opt)}:input`, + getEditInputId: (ctx) => `${ctx.editedId}:input`, + getTagInputEl: (ctx, opt) => dom.getById(ctx, dom.getTagInputId(ctx, opt)), + getRootEl: (ctx) => dom.getById(ctx, dom.getRootId(ctx)), + getInputEl: (ctx) => dom.getById(ctx, dom.getInputId(ctx)), + getHiddenInputEl: (ctx) => dom.getById(ctx, dom.getHiddenInputId(ctx)), + getEditInputEl: (ctx) => dom.getById(ctx, dom.getEditInputId(ctx)), + getElements: (ctx) => queryAll(dom.getRootEl(ctx), `[data-part=tag]:not([data-disabled])`), + getFirstEl: (ctx) => dom.getElements(ctx)[0], + getLastEl: (ctx) => dom.getElements(ctx)[dom.getElements(ctx).length - 1], + getPrevEl: (ctx, id) => prevById(dom.getElements(ctx), id, false), + getNextEl: (ctx, id) => nextById(dom.getElements(ctx), id, false), + getElAtIndex: (ctx, index) => dom.getElements(ctx)[index], + getIndexOfId: (ctx, id) => indexOfId(dom.getElements(ctx), id), + isInputFocused: (ctx) => dom.getDoc(ctx).activeElement === dom.getInputEl(ctx), + getFocusedTagValue: (ctx) => { + if (!ctx.focusedId) + return null; + const idx = dom.getIndexOfId(ctx, ctx.focusedId); + if (idx === -1) + return null; + return dom.getElements(ctx)[idx].dataset.value ?? null; + }, + setHoverIntent: (el) => { + const tag = el.closest("[data-part=tag]"); + if (!tag) + return; + tag.dataset.deleteIntent = ""; + }, + clearHoverIntent: (el) => { + const tag = el.closest("[data-part=tag]"); + if (!tag) + return; + delete tag.dataset.deleteIntent; + }, + dispatchInputEvent(ctx) { + const inputEl = dom.getHiddenInputEl(ctx); + if (!inputEl) + return; + dispatchInputValueEvent(inputEl, { value: ctx.valueAsString }); + } +}); + +// src/tags-input.connect.ts +function connect(state, send, normalize) { + const isInteractive = state.context.isInteractive; + const isDisabled = state.context.disabled; + const isReadOnly = state.context.readOnly; + const isInvalid = state.context.invalid || state.context.isOverflowing; + const translations = state.context.translations; + const isInputFocused = state.hasTag("focused"); + const isEditingTag = state.matches("editing:tag"); + const isEmpty = state.context.count === 0; + return { + isEmpty, + inputValue: state.context.trimmedInputValue, + value: state.context.value, + valueAsString: state.context.valueAsString, + count: state.context.count, + isAtMax: state.context.isAtMax, + setValue(value) { + send({ type: "SET_VALUE", value }); + }, + clearValue(id) { + if (id) { + send({ type: "CLEAR_TAG", id }); + } else { + send("CLEAR_VALUE"); + } + }, + addValue(value) { + send({ type: "ADD_TAG", value }); + }, + setValueAtIndex(index, value) { + send({ type: "SET_VALUE_AT_INDEX", index, value }); + }, + setInputValue(value) { + send({ type: "SET_INPUT_VALUE", value }); + }, + clearInputValue() { + send({ type: "SET_INPUT_VALUE", value: "" }); + }, + focus() { + dom.getInputEl(state.context)?.focus(); + }, + rootProps: normalize.element({ + dir: state.context.dir, + ...parts.root.attrs, + "data-invalid": dataAttr(isInvalid), + "data-readonly": dataAttr(isReadOnly), + "data-disabled": dataAttr(isDisabled), + "data-focus": dataAttr(isInputFocused), + "data-empty": dataAttr(isEmpty), + id: dom.getRootId(state.context), + onPointerDown() { + if (!isInteractive) + return; + send("POINTER_DOWN"); + } + }), + labelProps: normalize.label({ + ...parts.label.attrs, + "data-disabled": dataAttr(isDisabled), + "data-invalid": dataAttr(isInvalid), + "data-readonly": dataAttr(isReadOnly), + id: dom.getLabelId(state.context), + htmlFor: dom.getInputId(state.context) + }), + controlProps: normalize.element({ + id: dom.getControlId(state.context), + ...parts.control.attrs, + tabIndex: isReadOnly ? 0 : void 0, + "data-disabled": dataAttr(isDisabled), + "data-readonly": dataAttr(isReadOnly), + "data-invalid": dataAttr(isInvalid), + "data-focus": dataAttr(isInputFocused) + }), + inputProps: normalize.input({ + ...parts.input.attrs, + "data-invalid": dataAttr(isInvalid), + "aria-invalid": ariaAttr(isInvalid), + "data-readonly": dataAttr(isReadOnly), + maxLength: state.context.maxLength, + id: dom.getInputId(state.context), + defaultValue: state.context.inputValue, + autoComplete: "off", + autoCorrect: "off", + autoCapitalize: "none", + disabled: isDisabled || isReadOnly, + onChange(event) { + const evt = getNativeEvent(event); + if (evt.inputType === "insertFromPaste") + return; + let value = event.target.value; + if (value.endsWith(state.context.delimiter)) { + send("DELIMITER_KEY"); + } else { + send({ type: "TYPE", value, key: evt.inputType }); + } + }, + onFocus() { + send("FOCUS"); + }, + onPaste(event) { + const value = event.clipboardData.getData("text/plain"); + send({ type: "PASTE", value }); + }, + onKeyDown(event) { + const target = event.currentTarget; + const isCombobox = target.getAttribute("role") === "combobox"; + const isExpanded = target.ariaExpanded === "true"; + const keyMap = { + ArrowDown() { + send("ARROW_DOWN"); + }, + ArrowLeft() { + if (isCombobox && isExpanded) + return; + send("ARROW_LEFT"); + }, + ArrowRight() { + if (state.context.focusedId) { + event.preventDefault(); + } + if (isCombobox && isExpanded) + return; + send("ARROW_RIGHT"); + }, + Escape(event2) { + event2.preventDefault(); + send("ESCAPE"); + }, + Backspace() { + send("BACKSPACE"); + }, + Delete() { + send("DELETE"); + }, + Enter(event2) { + event2.preventDefault(); + send("ENTER"); + } + }; + const key = getEventKey(event, state.context); + const exec = keyMap[key]; + if (exec) { + exec(event); + return; + } + } + }), + hiddenInputProps: normalize.input({ + type: "text", + hidden: true, + name: state.context.name, + form: state.context.form, + id: dom.getHiddenInputId(state.context), + defaultValue: state.context.valueAsString + }), + getTagProps(options) { + const { value } = options; + const id = dom.getTagId(state.context, options); + return normalize.element({ + ...parts.tag.attrs, + id, + hidden: isEditingTag ? state.context.editedId === id : false, + "data-value": value, + "data-disabled": dataAttr(isDisabled), + "data-highlighted": dataAttr(id === state.context.focusedId), + onPointerDown(event) { + if (!isInteractive) + return; + event.preventDefault(); + send({ type: "POINTER_DOWN_TAG", id }); + }, + onDoubleClick() { + if (!isInteractive) + return; + send({ type: "DOUBLE_CLICK_TAG", id }); + } + }); + }, + getTagInputProps(options) { + const id = dom.getTagId(state.context, options); + const active = state.context.editedId === id; + return normalize.input({ + ...parts.tagInput.attrs, + "aria-label": translations.tagEdited(options.value), + "aria-hidden": true, + disabled: isDisabled, + id: dom.getTagInputId(state.context, options), + type: "text", + tabIndex: -1, + hidden: isEditingTag ? !active : true, + defaultValue: active ? state.context.editedTagValue : "", + onChange(event) { + send({ type: "TAG_INPUT_TYPE", value: event.target.value }); + }, + onBlur(event) { + send({ type: "TAG_INPUT_BLUR", target: event.relatedTarget, id }); + }, + onKeyDown(event) { + const keyMap = { + Enter() { + send("TAG_INPUT_ENTER"); + }, + Escape() { + send("TAG_INPUT_ESCAPE"); + } + }; + const exec = keyMap[event.key]; + if (exec) { + event.preventDefault(); + exec(event); + } + } + }); + }, + getTagDeleteTriggerProps(options) { + const id = dom.getTagId(state.context, options); + return normalize.button({ + ...parts.tagDeleteTrigger.attrs, + id: dom.getTagDeleteTriggerId(state.context, options), + type: "button", + disabled: isDisabled, + "aria-label": translations.deleteTagTriggerLabel(options.value), + tabIndex: -1, + onPointerDown(event) { + if (!isInteractive) { + event.preventDefault(); + } + }, + onPointerMove(event) { + if (!isInteractive) + return; + dom.setHoverIntent(event.currentTarget); + }, + onPointerLeave(event) { + if (!isInteractive) + return; + dom.clearHoverIntent(event.currentTarget); + }, + onClick() { + if (!isInteractive) + return; + send({ type: "CLEAR_TAG", id }); + } + }); + }, + clearTriggerProps: normalize.button({ + ...parts.clearTrigger.attrs, + id: dom.getClearTriggerId(state.context), + type: "button", + "data-readonly": dataAttr(isReadOnly), + disabled: isDisabled, + "aria-label": translations.clearTriggerLabel, + hidden: isEmpty, + onClick() { + if (!isInteractive) + return; + send("CLEAR_VALUE"); + } + }) + }; +} +var { and, not, or } = guards; +function machine(userContext) { + const ctx = compact(userContext); + return createMachine( + { + id: "tags-input", + initial: ctx.autoFocus ? "focused:input" : "idle", + context: { + log: { current: null, prev: null }, + inputValue: "", + editedTagValue: "", + focusedId: null, + editedId: null, + initialValue: [], + value: [], + dir: "ltr", + max: Infinity, + liveRegion: null, + blurBehavior: void 0, + addOnPaste: false, + allowEditTag: true, + validate: () => true, + delimiter: ",", + ...ctx, + translations: { + clearTriggerLabel: "Clear all tags", + deleteTagTriggerLabel: (value) => `Delete tag ${value}`, + tagAdded: (value) => `Added tag ${value}`, + tagsPasted: (values) => `Pasted ${values.length} tags`, + tagEdited: (value) => `Editing tag ${value}. Press enter to save or escape to cancel.`, + tagUpdated: (value) => `Tag update to ${value}`, + tagDeleted: (value) => `Tag ${value} deleted`, + tagSelected: (value) => `Tag ${value} selected. Press enter to edit, delete or backspace to remove.`, + ...ctx.translations + } + }, + computed: { + count: (ctx2) => ctx2.value.length, + valueAsString: (ctx2) => JSON.stringify(ctx2.value), + trimmedInputValue: (ctx2) => ctx2.inputValue.trim(), + isInteractive: (ctx2) => !(ctx2.readOnly || ctx2.disabled), + isAtMax: (ctx2) => ctx2.count === ctx2.max, + isOverflowing: (ctx2) => ctx2.count > ctx2.max + }, + watch: { + focusedId: ["invokeOnHighlight", "logFocused"], + isOverflowing: "invokeOnInvalid", + value: ["invokeOnChange", "dispatchChangeEvent"], + log: "announceLog", + inputValue: "syncInputValue", + editedTagValue: "syncEditedTagValue" + }, + activities: ["trackFormControlState"], + exit: ["removeLiveRegion", "clearLog"], + on: { + DOUBLE_CLICK_TAG: { + internal: true, + guard: "allowEditTag", + target: "editing:tag", + actions: ["setEditedId", "initializeEditedTagValue"] + }, + POINTER_DOWN_TAG: { + internal: true, + guard: not("isTagFocused"), + target: "navigating:tag", + actions: ["focusTag", "focusInput"] + }, + SET_INPUT_VALUE: { + actions: ["setInputValue"] + }, + SET_VALUE: { + actions: ["setValue"] + }, + CLEAR_TAG: { + actions: ["deleteTag"] + }, + SET_VALUE_AT_INDEX: { + actions: ["setValueAtIndex"] + }, + CLEAR_VALUE: { + actions: ["clearTags", "clearInputValue", "focusInput"] + }, + ADD_TAG: { + // (!isAtMax || allowOverflow) && !inputValueIsEmpty + guard: and(or(not("isAtMax"), "allowOverflow"), not("isInputValueEmpty")), + actions: ["addTag", "clearInputValue"] + }, + EXTERNAL_BLUR: [ + { guard: "addOnBlur", actions: "raiseAddTagEvent" }, + { guard: "clearOnBlur", actions: "clearInputValue" } + ] + }, + entry: ["setupDocument", "checkValue"], + states: { + idle: { + on: { + FOCUS: "focused:input", + POINTER_DOWN: { + guard: not("hasFocusedId"), + target: "focused:input" + } + } + }, + "focused:input": { + tags: ["focused"], + entry: ["focusInput", "clearFocusedId"], + activities: ["trackInteractOutside"], + on: { + TYPE: { + actions: "setInputValue" + }, + BLUR: [ + { + guard: "addOnBlur", + target: "idle", + actions: "raiseAddTagEvent" + }, + { + guard: "clearOnBlur", + target: "idle", + actions: "clearInputValue" + }, + { target: "idle" } + ], + ENTER: { + actions: ["raiseAddTagEvent"] + }, + DELIMITER_KEY: { + actions: ["raiseAddTagEvent"] + }, + ARROW_LEFT: { + guard: and("hasTags", "isInputCaretAtStart"), + target: "navigating:tag", + actions: "focusLastTag" + }, + BACKSPACE: { + target: "navigating:tag", + guard: and("hasTags", "isInputCaretAtStart"), + actions: "focusLastTag" + }, + PASTE: { + guard: "addOnPaste", + actions: ["setInputValue", "addTagFromPaste"] + } + } + }, + "navigating:tag": { + tags: ["focused"], + activities: ["trackInteractOutside"], + on: { + ARROW_RIGHT: [ + { + guard: and("hasTags", "isInputCaretAtStart", not("isLastTagFocused")), + actions: "focusNextTag" + }, + { target: "focused:input" } + ], + ARROW_LEFT: { + actions: "focusPrevTag" + }, + BLUR: { + target: "idle", + actions: "clearFocusedId" + }, + ENTER: { + guard: and("allowEditTag", "hasFocusedId"), + target: "editing:tag", + actions: ["setEditedId", "initializeEditedTagValue", "focusEditedTagInput"] + }, + ARROW_DOWN: "focused:input", + ESCAPE: "focused:input", + TYPE: { + target: "focused:input", + actions: "setInputValue" + }, + BACKSPACE: [ + { + guard: "isFirstTagFocused", + actions: ["deleteFocusedTag", "focusFirstTag"] + }, + { + actions: ["deleteFocusedTag", "focusPrevTag"] + } + ], + DELETE: { + actions: ["deleteFocusedTag", "focusTagAtIndex"] + } + } + }, + "editing:tag": { + tags: ["editing", "focused"], + entry: "focusEditedTagInput", + activities: ["autoResize"], + on: { + TAG_INPUT_TYPE: { + actions: "setEditedTagValue" + }, + TAG_INPUT_ESCAPE: { + target: "navigating:tag", + actions: ["clearEditedTagValue", "focusInput", "clearEditedId", "focusTagAtIndex"] + }, + TAG_INPUT_BLUR: [ + { + guard: "isInputRelatedTarget", + target: "navigating:tag", + actions: ["clearEditedTagValue", "clearFocusedId", "clearEditedId"] + }, + { + target: "idle", + actions: ["clearEditedTagValue", "clearFocusedId", "clearEditedId", "raiseExternalBlurEvent"] + } + ], + TAG_INPUT_ENTER: { + target: "navigating:tag", + actions: ["submitEditedTagValue", "focusInput", "clearEditedId", "focusTagAtIndex", "invokeOnTagUpdate"] + } + } + } + } + }, + { + guards: { + isInputRelatedTarget: (ctx2, evt) => evt.relatedTarget === dom.getInputEl(ctx2), + isAtMax: (ctx2) => ctx2.isAtMax, + hasFocusedId: (ctx2) => ctx2.focusedId !== null, + isTagFocused: (ctx2, evt) => ctx2.focusedId === evt.id, + isFirstTagFocused: (ctx2) => dom.getFirstEl(ctx2)?.id === ctx2.focusedId, + isLastTagFocused: (ctx2) => dom.getLastEl(ctx2)?.id === ctx2.focusedId, + isInputValueEmpty: (ctx2) => ctx2.trimmedInputValue.length === 0, + hasTags: (ctx2) => ctx2.value.length > 0, + allowOverflow: (ctx2) => !!ctx2.allowOverflow, + autoFocus: (ctx2) => !!ctx2.autoFocus, + addOnBlur: (ctx2) => ctx2.blurBehavior === "add", + clearOnBlur: (ctx2) => ctx2.blurBehavior === "clear", + addOnPaste: (ctx2) => !!ctx2.addOnPaste, + allowEditTag: (ctx2) => !!ctx2.allowEditTag, + isInputCaretAtStart(ctx2) { + const input = dom.getInputEl(ctx2); + if (!input) + return false; + try { + return input.selectionStart === 0 && input.selectionEnd === 0; + } catch (e) { + return input.value === ""; + } + } + }, + activities: { + trackInteractOutside(ctx2, _evt, { send }) { + return trackInteractOutside(dom.getInputEl(ctx2), { + exclude(target) { + return contains(dom.getRootEl(ctx2), target); + }, + onFocusOutside: ctx2.onFocusOutside, + onPointerDownOutside: ctx2.onPointerDownOutside, + onInteractOutside(event) { + ctx2.onInteractOutside?.(event); + if (event.defaultPrevented) + return; + send({ type: "BLUR", src: "interact-outside" }); + } + }); + }, + trackFormControlState(ctx2) { + return trackFormControl(dom.getHiddenInputEl(ctx2), { + onFieldsetDisabled() { + ctx2.disabled = true; + }, + onFormReset() { + ctx2.value = ctx2.initialValue; + } + }); + }, + autoResize(ctx2) { + if (!ctx2.editedTagValue || ctx2.idx == null || !ctx2.allowEditTag) + return; + const input = dom.getTagInputEl(ctx2, { value: ctx2.editedTagValue, index: ctx2.idx }); + return autoResizeInput(input); + } + }, + actions: { + raiseAddTagEvent(_, __, { self }) { + self.send("ADD_TAG"); + }, + raiseExternalBlurEvent(_, evt, { self }) { + self.send({ type: "EXTERNAL_BLUR", id: evt.id }); + }, + invokeOnHighlight(ctx2) { + const value = dom.getFocusedTagValue(ctx2); + ctx2.onHighlight?.({ value }); + }, + invokeOnTagUpdate(ctx2) { + if (!ctx2.idx) + return; + const value = ctx2.value[ctx2.idx]; + ctx2.onTagUpdate?.({ value, index: ctx2.idx }); + }, + invokeOnChange(ctx2) { + ctx2.onChange?.({ values: ctx2.value }); + }, + dispatchChangeEvent(ctx2) { + dom.dispatchInputEvent(ctx2); + }, + setupDocument(ctx2) { + ctx2.liveRegion = createLiveRegion({ + level: "assertive", + document: dom.getDoc(ctx2) + }); + }, + focusNextTag(ctx2) { + if (!ctx2.focusedId) + return; + const next = dom.getNextEl(ctx2, ctx2.focusedId); + if (next) + ctx2.focusedId = next.id; + }, + focusFirstTag(ctx2) { + raf(() => { + const first = dom.getFirstEl(ctx2)?.id; + if (first) + ctx2.focusedId = first; + }); + }, + focusLastTag(ctx2) { + const last = dom.getLastEl(ctx2); + if (last) + ctx2.focusedId = last.id; + }, + focusPrevTag(ctx2) { + if (!ctx2.focusedId) + return; + const prev = dom.getPrevEl(ctx2, ctx2.focusedId); + ctx2.focusedId = prev?.id || null; + }, + focusTag(ctx2, evt) { + ctx2.focusedId = evt.id; + }, + focusTagAtIndex(ctx2) { + raf(() => { + if (ctx2.idx == null) + return; + const el = dom.getElAtIndex(ctx2, ctx2.idx); + if (el) { + ctx2.focusedId = el.id; + ctx2.idx = void 0; + } + }); + }, + deleteTag(ctx2, evt) { + const index = dom.getIndexOfId(ctx2, evt.id); + const value = ctx2.value[index]; + ctx2.log.prev = ctx2.log.current; + ctx2.log.current = { type: "delete", value }; + ctx2.value.splice(index, 1); + }, + deleteFocusedTag(ctx2) { + if (!ctx2.focusedId) + return; + const index = dom.getIndexOfId(ctx2, ctx2.focusedId); + ctx2.idx = index; + const value = ctx2.value[index]; + ctx2.log.prev = ctx2.log.current; + ctx2.log.current = { type: "delete", value }; + ctx2.value.splice(index, 1); + }, + setEditedId(ctx2, evt) { + ctx2.editedId = evt.id ?? ctx2.focusedId; + ctx2.idx = dom.getIndexOfId(ctx2, ctx2.editedId); + }, + clearEditedId(ctx2) { + ctx2.editedId = null; + }, + clearEditedTagValue(ctx2) { + ctx2.editedTagValue = ""; + }, + setEditedTagValue(ctx2, evt) { + ctx2.editedTagValue = evt.value; + }, + submitEditedTagValue(ctx2) { + if (!ctx2.editedId) + return; + const index = dom.getIndexOfId(ctx2, ctx2.editedId); + ctx2.value[index] = ctx2.editedTagValue ?? ""; + ctx2.log.prev = ctx2.log.current; + ctx2.log.current = { type: "update", value: ctx2.editedTagValue }; + }, + setValueAtIndex(ctx2, evt) { + if (evt.value) { + ctx2.value[evt.index] = evt.value; + ctx2.log.prev = ctx2.log.current; + ctx2.log.current = { type: "update", value: evt.value }; + } else { + warn("You need to provide a value for the tag"); + } + }, + initializeEditedTagValue(ctx2) { + if (!ctx2.editedId) + return; + const index = dom.getIndexOfId(ctx2, ctx2.editedId); + ctx2.editedTagValue = ctx2.value[index]; + }, + focusEditedTagInput(ctx2) { + raf(() => { + dom.getEditInputEl(ctx2)?.select(); + }); + }, + setInputValue(ctx2, evt) { + ctx2.inputValue = evt.value; + }, + clearFocusedId(ctx2) { + ctx2.focusedId = null; + }, + focusInput(ctx2) { + raf(() => { + dom.getInputEl(ctx2)?.focus(); + }); + }, + clearInputValue(ctx2) { + ctx2.inputValue = ""; + }, + syncInputValue(ctx2) { + const input = dom.getInputEl(ctx2); + if (!input) + return; + input.value = ctx2.inputValue; + }, + syncEditedTagValue(ctx2, evt) { + const id = ctx2.editedId || ctx2.focusedId || evt.id; + if (!id) + return; + const el = dom.getById(ctx2, `${id}:input`); + if (!el) + return; + el.value = ctx2.editedTagValue; + }, + addTag(ctx2, evt) { + const value = evt.value ?? ctx2.trimmedInputValue; + const guard = ctx2.validate?.({ inputValue: value, values: ctx2.value }); + if (guard) { + ctx2.value.push(value); + ctx2.log.prev = ctx2.log.current; + ctx2.log.current = { type: "add", value }; + } else { + ctx2.onInvalid?.({ reason: "invalidTag" }); + } + }, + addTagFromPaste(ctx2) { + raf(() => { + const value = ctx2.trimmedInputValue; + const guard = ctx2.validate?.({ inputValue: value, values: ctx2.value }); + if (guard) { + const trimmedValue = ctx2.delimiter ? value.split(ctx2.delimiter).map((v) => v.trim()) : [value]; + ctx2.value.push(...trimmedValue); + ctx2.log.prev = ctx2.log.current; + ctx2.log.current = { type: "paste", values: trimmedValue }; + } else { + ctx2.onInvalid?.({ reason: "invalidTag" }); + } + ctx2.inputValue = ""; + }); + }, + clearTags(ctx2) { + ctx2.value = []; + ctx2.log.prev = ctx2.log.current; + ctx2.log.current = { type: "clear" }; + }, + checkValue(ctx2) { + ctx2.initialValue = ctx2.value.slice(); + }, + setValue(ctx2, evt) { + ctx2.value = evt.value; + }, + removeLiveRegion(ctx2) { + ctx2.liveRegion?.destroy(); + }, + invokeOnInvalid(ctx2) { + if (ctx2.isOverflowing) { + ctx2.onInvalid?.({ reason: "rangeOverflow" }); + } + }, + clearLog(ctx2) { + ctx2.log = { prev: null, current: null }; + }, + logFocused(ctx2) { + if (!ctx2.focusedId) + return; + const index = dom.getIndexOfId(ctx2, ctx2.focusedId); + ctx2.log.prev = ctx2.log.current; + ctx2.log.current = { type: "select", value: ctx2.value[index] }; + }, + // queue logs with screen reader and get it announced + announceLog(ctx2) { + if (!ctx2.log.current || ctx2.liveRegion == null) + return; + const region = ctx2.liveRegion; + const { current, prev } = ctx2.log; + let msg; + switch (current.type) { + case "add": + msg = ctx2.translations.tagAdded(current.value); + break; + case "delete": + msg = ctx2.translations.tagDeleted(current.value); + break; + case "update": + msg = ctx2.translations.tagUpdated(current.value); + break; + case "paste": + msg = ctx2.translations.tagsPasted(current.values); + break; + case "select": + msg = ctx2.translations.tagSelected(current.value); + if (prev?.type === "delete") { + msg = `${ctx2.translations.tagDeleted(prev.value)}. ${msg}`; + } else if (prev?.type === "update") { + msg = `${ctx2.translations.tagUpdated(prev.value)}. ${msg}`; + } + break; + } + if (msg) + region.announce(msg); + } + } + } + ); +} + +// src/prop-types.ts +function createNormalizer(fn) { + return new Proxy({}, { + get() { + return fn; + } + }); +} + +var normalizeProps = createNormalizer((v) => v); +var useSafeLayoutEffect = typeof document !== "undefined" ? reactExports.useLayoutEffect : reactExports.useEffect; +var { use } = ReactExports; +function useSnapshot(proxyObject, options) { + const notifyInSync = options?.sync; + const lastSnapshot = reactExports.useRef(); + const lastAffected = reactExports.useRef(); + const currSnapshot = reactExports.useSyncExternalStore( + reactExports.useCallback( + (callback) => { + const unsub = subscribe(proxyObject, callback, notifyInSync); + callback(); + return unsub; + }, + [proxyObject, notifyInSync] + ), + () => { + const nextSnapshot = snapshot(proxyObject, use); + try { + if (lastSnapshot.current && lastAffected.current && !p(lastSnapshot.current, nextSnapshot, lastAffected.current, /* @__PURE__ */ new WeakMap())) { + return lastSnapshot.current; + } + } catch (e) { + } + return nextSnapshot; + }, + () => snapshot(proxyObject, use) + ); + const currAffected = /* @__PURE__ */ new WeakMap(); + reactExports.useEffect(() => { + lastSnapshot.current = currSnapshot; + lastAffected.current = currAffected; + }); + const proxyCache = reactExports.useMemo(() => /* @__PURE__ */ new WeakMap(), []); + return a(currSnapshot, currAffected, proxyCache); +} +function useConstant(fn) { + const ref = reactExports.useRef(); + if (!ref.current) + ref.current = { v: fn() }; + return ref.current.v; +} + +// src/use-machine.ts +function useService(machine, options) { + const { actions, state: hydratedState, context } = options ?? {}; + const service = useConstant(() => { + const instance = typeof machine === "function" ? machine() : machine; + return context ? instance.withContext(context) : instance; + }); + useSafeLayoutEffect(() => { + service.start(hydratedState); + if (service.state.can("SETUP")) { + service.send("SETUP"); + } + return () => { + service.stop(); + }; + }, []); + service.setOptions({ actions }); + service.setContext(context); + return service; +} +function useMachine(machine, options) { + const service = useService(machine, options); + const state = useSnapshot(service.state); + const typedState = state; + return [typedState, service.send, service]; +} + +const EMAIL_REGEX = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; +function CcField({ field }) { + const { label, value, name, error, description, id } = field; + const initialValue = value + ? value.split(",").map((email) => email.trim()) + : []; + const [state, send] = useMachine(machine({ + id, + value: initialValue, + allowEditTag: false, + })); + const api = connect(state, send, normalizeProps); + return (jsxRuntimeExports.jsxs(Field, { ...api.rootProps, children: [jsxRuntimeExports.jsx(Label$1, { ...api.labelProps, children: label }), description && jsxRuntimeExports.jsx(Hint, { children: description }), jsxRuntimeExports.jsxs(Control, { ...api.controlProps, validation: error ? "error" : undefined, children: [api.value.map((email, index) => (jsxRuntimeExports.jsxs("span", { children: [jsxRuntimeExports.jsxs(StyledTag, { ...api.getTagProps({ index, value: email }), size: "large", hue: EMAIL_REGEX.test(email) ? undefined : "red", children: [jsxRuntimeExports.jsx("span", { children: email }), jsxRuntimeExports.jsx(Tag.Close, { ...api.getTagDeleteTriggerProps({ + index, + value: email, + }) })] }), jsxRuntimeExports.jsx("input", { ...api.getTagInputProps({ index, value }) })] }, index))), jsxRuntimeExports.jsx(StyledInput, { isBare: true, ...api.inputProps })] }), error && jsxRuntimeExports.jsx(Message, { validation: "error", children: error }), api.value.map((email) => (jsxRuntimeExports.jsx("input", { type: "hidden", name: name, value: email }, email)))] })); +} +const Control = styled(FauxInput) ` + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: ${(p) => p.theme.space.sm}; +`; +const StyledInput = styled(Input) ` + width: revert; + flex: 1; +`; +const StyledTag = styled(Tag) ` + ${(props) => focusStyles({ + theme: props.theme, + shadowWidth: "sm", + selector: "&[data-highlighted]", +})} +`; + +export { CcField as default }; diff --git a/assets/new-request-form.js b/assets/new-request-form.js index 4dfe55804..618ec0503 100644 --- a/assets/new-request-form.js +++ b/assets/new-request-form.js @@ -74,6 +74,7 @@ const Form = styled.form ` const Footer = styled.div ` margin-top: ${(props) => props.theme.space.md}; `; +const CcField = reactExports.lazy(() => import('CcField')); function NewRequestForm({ ticketForms, requestForm, }) { const { fields, action, http_method, accept_charset, errors, ticket_form_field, ticket_forms_instructions, } = requestForm; const handleSubmit = useSubmitHandler(); @@ -90,6 +91,8 @@ function NewRequestForm({ ticketForms, requestForm, }) { case "organization_id": case "tickettype": return jsxRuntimeExports.jsx(DropDown, { field: field }); + case "cc_email": + return (jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}), children: jsxRuntimeExports.jsx(CcField, { field: field }) })); default: return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}); } diff --git a/assets/vendor.js b/assets/vendor.js index de8b41a90..ac878e619 100644 --- a/assets/vendor.js +++ b/assets/vendor.js @@ -23,109 +23,12 @@ var jsxRuntime = {exports: {}}; var reactJsxRuntime_production_min = {}; -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ - -var objectAssign; -var hasRequiredObjectAssign; - -function requireObjectAssign () { - if (hasRequiredObjectAssign) return objectAssign; - hasRequiredObjectAssign = 1; - /* eslint-disable no-unused-vars */ - var getOwnPropertySymbols = Object.getOwnPropertySymbols; - var hasOwnProperty = Object.prototype.hasOwnProperty; - var propIsEnumerable = Object.prototype.propertyIsEnumerable; - - function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); - } - - function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } - - // Detect buggy property enumeration order in older V8 versions. - - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } - - return true; - } catch (err) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } - } - - objectAssign = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; - - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - - return to; - }; - return objectAssign; -} - var react = {exports: {}}; var react_production_min = {}; -/** @license React v17.0.2 +/** + * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. @@ -139,21 +42,23 @@ var hasRequiredReact_production_min; function requireReact_production_min () { if (hasRequiredReact_production_min) return react_production_min; hasRequiredReact_production_min = 1; -var l=requireObjectAssign(),n=60103,p=60106;react_production_min.Fragment=60107;react_production_min.StrictMode=60108;react_production_min.Profiler=60114;var q=60109,r=60110,t=60112;react_production_min.Suspense=60113;var u=60115,v=60116; - if("function"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w("react.element");p=w("react.portal");react_production_min.Fragment=w("react.fragment");react_production_min.StrictMode=w("react.strict_mode");react_production_min.Profiler=w("react.profiler");q=w("react.provider");r=w("react.context");t=w("react.forward_ref");react_production_min.Suspense=w("react.suspense");u=w("react.memo");v=w("react.lazy");}var x="function"===typeof Symbol&&Symbol.iterator; - function y(a){if(null===a||"object"!==typeof a)return null;a=x&&a[x]||a["@@iterator"];return "function"===typeof a?a:null}function z(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c= - E};k=function(){};exports.unstable_forceFrameRate=function(a){0>a||125>>1,e=a[d];if(void 0!==e&&0I(n,c))void 0!==r&&0>I(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>I(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function I(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var L=[],M=[],N=1,O=null,P=3,Q=!1,R=!1,S=!1; - function T(a){for(var b=J(M);null!==b;){if(null===b.callback)K(M);else if(b.startTime<=a)K(M),b.sortIndex=b.expirationTime,H(L,b);else break;b=J(M);}}function U(a){S=!1;T(a);if(!R)if(null!==J(L))R=!0,f(V);else {var b=J(M);null!==b&&g(U,b.startTime-a);}} - function V(a,b){R=!1;S&&(S=!1,h());Q=!0;var c=P;try{T(b);for(O=J(L);null!==O&&(!(O.expirationTime>b)||a&&!exports.unstable_shouldYield());){var d=O.callback;if("function"===typeof d){O.callback=null;P=O.priorityLevel;var e=d(O.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?O.callback=e:O===J(L)&&K(L);T(b);}else K(L);O=J(L);}if(null!==O)var m=!0;else {var n=J(M);null!==n&&g(U,n.startTime-b);m=!1;}return m}finally{O=null,P=c,Q=!1;}}var W=k;exports.unstable_IdlePriority=5; - exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null;};exports.unstable_continueExecution=function(){R||Q||(R=!0,f(V));};exports.unstable_getCurrentPriorityLevel=function(){return P};exports.unstable_getFirstCallbackNode=function(){return J(L)}; - exports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P;}var c=P;P=b;try{return a()}finally{P=c;}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=W;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3;}var c=P;P=a;try{return b()}finally{P=c;}}; - exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0d?(a.sortIndex=c,H(M,a),null===J(L)&&a===J(M)&&(S?h():S=!0,g(U,c-d))):(a.sortIndex=e,H(L,a),R||Q||(R=!0,f(V)));return a}; - exports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c;}}}; +function f(a,b){var c=a.length;a.push(b);a:for(;0>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b} + function g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if("object"===typeof performance&&"function"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()};}else {var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q};}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D="function"===typeof setTimeout?setTimeout:null,E="function"===typeof clearTimeout?clearTimeout:null,F="undefined"!==typeof setImmediate?setImmediate:null; + "undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t);}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else {var b=h(t);null!==b&&K(H,b.startTime-a);}} + function J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if("function"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?v.callback=e:v===h(r)&&k(r);G(b);}else k(r);v=h(r);}if(null!==v)var w=!0;else {var m=h(t);null!==m&&K(H,m.startTime-b);w=!1;}return w}finally{v=null,y=c,z=!1;}}var N=!1,O=null,L=-1,P=5,Q=-1; + function M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a}; + exports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c;}}}; } (scheduler_production_min)); return scheduler_production_min; } @@ -245,7 +150,8 @@ function requireScheduler () { return scheduler.exports; } -/** @license React v17.0.2 +/** + * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. @@ -259,292 +165,316 @@ var hasRequiredReactDom_production_min; function requireReactDom_production_min () { if (hasRequiredReactDom_production_min) return reactDom_production_min; hasRequiredReactDom_production_min = 1; -var aa=reactExports,m=requireObjectAssign(),r=requireScheduler();function y(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;cb}return !1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g;}var D={}; - "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1);});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1);});["contentEditable","draggable","spellCheck","value"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1);}); - ["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1);});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1);}); - ["checked","multiple","muted","selected"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1);});["capture","download"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1);});["cols","rows","size","span"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1);});["rowSpan","start"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1);});var oa=/[\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()} - "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(oa, - pa);D[b]=new B(b,1,!1,a,null,!1,!1);});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1);});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1);});["tabIndex","crossOrigin"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1);}); - D.xlinkHref=new B("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0);}); - function qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2h||e[g]!==f[h])return "\n"+e[g].replace(" at new "," at ");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c;}return (a=a?a.displayName||a.name:"")?Na(a):""} - function Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na("Lazy");case 13:return Na("Suspense");case 19:return Na("SuspenseList");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return ""}} - function Ra(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ua:return "Fragment";case ta:return "Portal";case xa:return "Profiler";case wa:return "StrictMode";case Ba:return "Suspense";case Ca:return "SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case za:return (a.displayName||"Context")+".Consumer";case ya:return (a._context.displayName||"Context")+".Provider";case Aa:var b=a.render;b=b.displayName||b.name||""; - return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return ""}}function Ta(a){var b=a.type;return (a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)} +var aa=reactExports,ca=requireScheduler();function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;cb}return !1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g;}var z={}; + "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1);});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1);});["contentEditable","draggable","spellCheck","value"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1);}); + ["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1);});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1);}); + ["checked","multiple","muted","selected"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1);});["capture","download"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1);});["cols","rows","size","span"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1);});["rowSpan","start"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1);});var ra=/[\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()} + "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(ra, + sa);z[b]=new v(b,1,!1,a,null,!1,!1);});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1);});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1);});["tabIndex","crossOrigin"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1);}); + z.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0);}); + function ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k="\n"+e[g].replace(" at new "," at ");a.displayName&&k.includes("")&&(k=k.replace("",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c;}return (a=a?a.displayName||a.name:"")?Ma(a):""} + function Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return ""}} + function Qa(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ya:return "Fragment";case wa:return "Portal";case Aa:return "Profiler";case za:return "StrictMode";case Ea:return "Suspense";case Fa:return "SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case Ca:return (a.displayName||"Context")+".Consumer";case Ba:return (a._context.displayName||"Context")+".Provider";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName|| + b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||"Memo";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null} + function Ra(a){var b=a.type;switch(a.tag){case 24:return "Cache";case 9:return (b.displayName||"Context")+".Consumer";case 10:return (b._context.displayName||"Context")+".Provider";case 18:return "DehydratedFragment";case 11:return a=b.render,a=a.displayName||a.name||"",b.displayName||(""!==a?"ForwardRef("+a+")":"ForwardRef");case 7:return "Fragment";case 5:return b;case 4:return "Portal";case 3:return "Root";case 6:return "Text";case 16:return Qa(b);case 8:return b===za?"StrictMode":"Mode";case 22:return "Offscreen"; + case 12:return "Profiler";case 21:return "Scope";case 13:return "Suspense";case 19:return "SuspenseList";case 25:return "TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof b)return b.displayName||b.name||null;if("string"===typeof b)return b}return null}function Sa(a){switch(typeof a){case "boolean":case "number":case "string":case "undefined":return a;case "object":return a;default:return ""}} + function Ta(a){var b=a.type;return (a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)} function Ua(a){var b=Ta(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a);}});Object.defineProperty(a,b,{enumerable:c.enumerable});return {getValue:function(){return d},setValue:function(a){d=""+a;},stopTracking:function(){a._valueTracker= null;delete a[b];}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a));}function Wa(a){if(!a)return !1;var b=a._valueTracker;if(!b)return !0;var c=b.getValue();var d="";a&&(d=Ta(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}} - function Ya(a,b){var c=b.checked;return m({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value};}function $a(a,b){b=b.checked;null!=b&&qa(a,"checked",b,!1);} - function ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c;}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?bb(a,b.type,c):b.hasOwnProperty("defaultValue")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked);} - function cb(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b;}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c);} - function bb(a,b,c){if("number"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c);}function db(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a);});return b}function eb(a,b){a=m({children:void 0},b);if(b=db(b.children))a.children=b;return a} + function Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value};}function ab(a,b){b=b.checked;null!=b&&ta(a,"checked",b,!1);} + function bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c;}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?cb(a,b.type,c):b.hasOwnProperty("defaultValue")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked);} + function db(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b;}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c);} + function cb(a,b,c){if("number"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c);}var eb=Array.isArray; function fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e=c.length))throw Error(y(93));c=c[0];}b=c;}null==b&&(b="");c=b;}a._wrapperState={initialValue:Sa(c)};} - function ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d);}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b);}var kb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"}; - function lb(a){switch(a){case "svg":return "http://www.w3.org/2000/svg";case "math":return "http://www.w3.org/1998/Math/MathML";default:return "http://www.w3.org/1999/xhtml"}}function mb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?lb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a} - var nb,ob=function(a){return "undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)});}:a}(function(a,b){if(a.namespaceURI!==kb.svg||"innerHTML"in a)a.innerHTML=b;else {nb=nb||document.createElement("div");nb.innerHTML=""+b.valueOf().toString()+"";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild);}}); - function pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b;} - var qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0, - floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=["Webkit","ms","Moz","O"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a];});});function sb(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(""+b).trim():b+"px"} - function tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=sb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e;}}var ub=m({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}); - function vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw Error(y(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(y(62));}} - function wb(a,b){if(-1===a.indexOf("-"))return "string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return !1;default:return !0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null; - function Bb(a){if(a=Cb(a)){if("function"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b));}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a;}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;ad?0:1<c;c++)b.push(a);return b} - function $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c;}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d);}finally{(Kb=f)||Mb();}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d));} - function hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0"+b.valueOf().toString()+"";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild);}}); + function ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b;} + var pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0, + zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a];});});function rb(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(""+b).trim():b+"px"} + function sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=rb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e;}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}); + function ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if("object"!==typeof b.dangerouslySetInnerHTML||!("__html"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(p(62));}} + function vb(a,b){if(-1===a.indexOf("-"))return "string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return !1;default:return !0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null; + function Bb(a){if(a=Cb(a)){if("function"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b));}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a;}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304; + function tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824; + default:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)));}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b} + function Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c;}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1; + var Qd=A({},ud,{key:function(a){if(a.key){var b=Md[a.key]||a.key;if("Unidentified"!==b)return b}return "keypress"===a.type?(a=od(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Nd[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(a){return "keypress"===a.type?od(a):0},keyCode:function(a){return "keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return "keypress"=== + a.type?od(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),Rd=rd(Qd),Sd=A({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=A({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=A({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=A({},Ad,{deltaX:function(a){return "deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0}, + deltaY:function(a){return "deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae=ia&&"CompositionEvent"in window,be=null;ia&&"documentMode"in document&&(be=document.documentMode);var ce=ia&&"TextEvent"in window&&!be,de=ia&&(!ae||be&&8=be),ee=String.fromCharCode(32),fe=!1; function ge(a,b){switch(a){case "keyup":return -1!==$d.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return !0;default:return !1}}function he(a){a=a.detail;return "object"===typeof a&&"data"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case "compositionend":return he(b);case "keypress":if(32!==b.which)return null;fe=!0;return ee;case "textInput":return a=b.data,a===ee&&fe?null:a;default:return null}} function ke(a,b){if(ie)return "compositionend"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return {node:c,offset:b-a};a=d;}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode;}c=void 0;}c=Ke(c);}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1} - function Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href;}catch(d){c=!1;}if(c)a=b.contentWindow;else break;b=Xa(a.document);}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)} - var Pe=fa&&"documentMode"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1; - function Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,"selectionStart"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,"onSelect"),0Af||(a.current=zf[Af],zf[Af]=null,Af--);}function I(a,b){Af++;zf[Af]=a.current;a.current=b;}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf; - function Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M);}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c);} - function If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||"Unknown",e));return m({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return !0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c);} - var Lf=null,Mf=null,Nf=r.unstable_runWithPriority,Of=r.unstable_scheduleCallback,Pf=r.unstable_cancelCallback,Qf=r.unstable_shouldYield,Rf=r.unstable_requestPaint,Sf=r.unstable_now,Tf=r.unstable_getCurrentPriorityLevel,Uf=r.unstable_ImmediatePriority,Vf=r.unstable_UserBlockingPriority,Wf=r.unstable_NormalPriority,Xf=r.unstable_LowPriority,Yf=r.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg}; - function eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a);}jg();} - function jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;a=b)return {node:c,offset:b-a};a=d;}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode;}c=void 0;}c=Je(c);}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1} + function Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href;}catch(d){c=!1;}if(c)a=b.contentWindow;else break;b=Xa(a.document);}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)} + function Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c, + d);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)));}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});"function"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1; + function Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,"selectionStart"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,"onSelect"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--);}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b;}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e} + function Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H);}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c);}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||"Unknown",e));return A({},c,d)} + function cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return !0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c);}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a);}function ig(a){fg=!0;hg(a);} + function jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<z?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null=== - n.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q;}if(z===h.length)return c(e,u),l;if(null===u){for(;zz?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q;}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&& - u.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling); - d=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling;}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h);}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else {c(a,d);break}else b(a,d);d=d.sibling;}d= - Wg(f,a.mode,h);d.return=a;a=d;}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||"Component"));}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g); - function dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a);}H(ah);I(ah,b);}function fh(){H(ah);H(bh);H(ch);}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c));}function hh(a){bh.current===a&&(H(ah),H(bh));}var P=Bf(0); - function ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return;}b.sibling.return=b.return;b=b.sibling;}return null}var jh=null,kh=null,lh=!1; - function mh(a,b){var c=nh(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c;}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return !1;default:return !1}} - function ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c);}jh=a;kh=rf(b.firstChild);}else a.flags=a.flags&-1025|2,lh=!1,jh=a;}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a;} - function rh(a){if(a!==jh)return !1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){kh=rf(a.nextSibling);break a}b--;}else "$"!==c&&"$!"!==c&&"$?"!==c||b++;}a=a.nextSibling;}kh=null;}}else kh=jh?rf(a.stateNode.nextSibling):null;return !0} - function sh(){kh=jh=null;lh=!1;}var th=[];function uh(){for(var a=0;af))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e);}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T} - function Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null;}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else {if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a;}return T}function Jh(a,b){return "function"===typeof b?b(a):b} - function Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g;}d.baseQueue=e=f;c.pending=null;}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else {var n={lane:l,action:k.action,eagerReducer:k.eagerReducer, - eagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l;}k=k.next;}while(null!==k&&k!==e);null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d;}return [b.memoizedState,c.dispatch]} - function Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f;}return [f,d]} - function Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350));} - function Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d= - e.entanglements,h=a;0c?98:c,function(){a(!0);});gg(97\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case "dialog":G("cancel",a);G("close",a); - e=d;break;case "iframe":case "object":case "embed":G("load",a);e=d;break;case "video":case "audio":for(e=0;eJi&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432);}else {if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&"hidden"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|= - 64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g);}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&"unstable-defer-without-hiding"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag));} - function Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}} - function Mi(a,b){try{var c="",d=b;do c+=Qa(d),d=d.return;while(d);var e=c;}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack;}return {value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value);}catch(c){setTimeout(function(){throw c;});}}var Oi="function"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b);};return c} - function Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)};}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""});});return c}var Ui="function"===typeof WeakSet?WeakSet:Set; - function Vi(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null);}catch(c){Wi(a,c);}else b.current=null;}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b;}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163));} - function Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d();}a=a.next;}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d;}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d, - b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode;}Eg(c,b,a);}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c)))); - return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163));} - function aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,"function"===typeof d.setProperty?d.setProperty("display","none","important"):d.display="none";else {d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null;d.style.display=sb("display",e);}}else if(6===c.tag)c.stateNode.nodeValue=b?"":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c=== - a)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return;}c.sibling.return=c.return;c=c.sibling;}} - function bj(a,b){if(Mf&&"function"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b);}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else {d=b;try{e();}catch(f){Wi(d,f);}}c=c.next;}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if("function"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount();}catch(f){Wi(b, - f);}break;case 5:Vi(b);break;case 4:cj(a,b);}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null;}function ej(a){return 5===a.tag||3===a.tag||4===a.tag} - function fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return;}throw Error(y(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161));}c.flags&16&&(pb(b,""),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return;}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null=== - c.child||4===c.tag)continue b;else c.child.return=c,c=c.child;}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b);} - function gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling;} - function hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling;} - function cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return;}d=!0;}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else {if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return;}k.sibling.return=k.return;k=k.sibling;}f?(g=e,h=c.stateNode, - 8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode);}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1);}c.sibling.return=c.return;c=c.sibling;}} - function ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;"input"===a&&"radio"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;ee&&(e=g);c&=~f;}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320> - c?4320:1960*nj(c/1960))-c;if(10 component higher in the tree to provide a loading indicator or placeholder to display.");}5!==V&&(V=2);k=Mi(k,h);p= - g;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&("function"===typeof K.getDerivedStateFromError||null!==Q&&"function"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return;}while(null!==p)}Zj(c);}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)} - function Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e);}while(1);qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y);}function Rj(){for(;null!==Y&&!Qf();)bk(Y);}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null;} - function Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d;}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});"function"===typeof t.focus&&t.focus();for(t= - 0;tO()-jj?Qj(a,0):uj|=c);Mj(a,b);}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c));}var ck; - ck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else {ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!== - b?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64;}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if("object"=== - typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b);}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c);}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2); - a=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282)); - d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else {e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;ew?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x;}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x;}if(n.done)return c(e, + m),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){"object"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if("object"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k= + f.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||"object"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling;}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h);}return g(a);case wa:a:{for(l=f.key;null!== + d;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else {c(a,d);break}else b(a,d);d=d.sibling;}d=zh(f,a.mode,h);d.return=a;a=d;}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f);}return "string"===typeof f&&""!==f||"number"===typeof f?(f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d): + (c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a);}E(Eh);G(Eh,b);}function Jh(){E(Eh);E(Fh);E(Gh);} + function Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c));}function Lh(a){Fh.current===a&&(E(Eh),E(Fh));}var M=Uf(0); + function Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return;}b.sibling.return=b.return;b=b.sibling;}return null}var Nh=[]; + function Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b();}finally{C=c,Qh.transition=d;}}function Fi(){return di().memoizedState} + function Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d);}} + function ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else {var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d));}} + function Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b;}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c);}} + var ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308, + 4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return [d.memoizedState,a]},useRef:function(a){var b= + ci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return [b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c();}else {c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c);}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d, + f,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=":"+b+"R"+c;c=Uh++;0\x3c/script>",a=a.removeChild(a.firstChild)): + "string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case "dialog":D("cancel",a);D("close",a);e=d;break;case "iframe":case "object":case "embed":D("load",a);e=d;break;case "video":case "audio":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);}else {if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&"hidden"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g);}if(null!==f.tail)return b=f.tail,f.rendering= + b,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));} + function Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig();}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(), + null;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj="function"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if("function"===typeof c)try{c(null);}catch(d){W(a,b,d);}else c.current=null;}function Nj(a,b,c){try{c();}catch(d){W(a,b,d);}}var Oj=!1; + function Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType;}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+= + q.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y;}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode;}q=y;}c=-1===h||-1===k?null:{start:h,end:k};}else c=null;}c=c||{start:0,end:0};}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break; + case 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w;}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent="":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F);}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return;}n=Oj;Oj=!1;return n} + function Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f);}e=e.next;}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d();}c=c.next;}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c;}"function"===typeof b?b(a):b.current=a;}} + function Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null;}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag} + function Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return;}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child;}if(!(a.flags&2))return a.stateNode}} + function Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling;} + function Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling;}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling;} + function ak(a,b,c){if(lc&&"function"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c);}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0; + Zj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next;}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,"function"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount();}catch(h){W(c,b,h);}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!== + c.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c);}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d));});}} + function dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f;}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else {a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b);}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c));}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c);} + function ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c);}var Wk; + Wk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else {if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1;}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;"object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue= + null,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306, + d,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState= + f,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else {Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c);}b=b.child;}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32), + hj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps; + g=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k;}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return, + c,b);h.lanes|=c;break}k=k.next;}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling;}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return;}f=g;}Yi(a,b,e.children,c);b=b.child;}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c), + b.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)} + function al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null;}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return !(!a||!a.isReactComponent)} + function $k(a){if("function"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2} + function wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext}; c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c} - function Vg(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)ji(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ua:return Xg(c.children,e,f,b);case Ha:g=8;e|=16;break;case wa:g=8;e|=1;break;case xa:return a=nh(12,c,b,e|8),a.elementType=xa,a.type=xa,a.lanes=f,a;case Ba:return a=nh(13,c,b,e),a.type=Ba,a.elementType=Ba,a.lanes=f,a;case Ca:return a=nh(19,c,b,e),a.elementType=Ca,a.lanes=f,a;case Ia:return vi(c,e,f,b);case Ja:return a=nh(24,c,b,e),a.elementType=Ja,a.lanes=f,a;default:if("object"=== - typeof a&&null!==a)switch(a.$$typeof){case ya:g=10;break a;case za:g=9;break a;case Aa:g=11;break a;case Da:g=14;break a;case Ea:g=16;d=null;break a;case Fa:g=22;break a}throw Error(y(130,null==a?a:typeof a,""));}b=nh(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Xg(a,b,c,d){a=nh(7,a,d,b);a.lanes=c;return a}function vi(a,b,c,d){a=nh(23,a,d,b);a.elementType=Ia;a.lanes=c;return a}function Ug(a,b,c){a=nh(6,a,null,b);a.lanes=c;return a} - function Wg(a,b,c){b=nh(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b} - function jk(a,b,c){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=0;this.eventTimes=Zc(0);this.expirationTimes=Zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=Zc(0);this.mutableSourceEagerHydrationData=null;} - function kk(a,b,c){var d=31?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var D=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e;}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&R(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s=x&&(x=t+1),j.set(e,t),T.set(t,e);},B="style["+_+'][data-styled-version="5.3.11"]',M=new RegExp("^"+_+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),G=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(_))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(_,"active"),r.setAttribute("data-styled-version","5.3.11");var i=F();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},q=function(){function e(e){var t=this.element=Y(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return !1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--;},t.getRule=function(e){return e0&&(u+=e+",");})),r+=""+a+c+'{content:"'+u+'"}/*!sc*/\n';}}}return r}(this)},e}(),X=/(a)(d)/gi,Z=function(e){return String.fromCharCode(e+(e>25?39:97))};function K(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Z(t%52)+n;return (Z(t%52)+n).replace(X,"$1-$2")}var Q=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},ee=function(e){return Q(5381,e)};function te(e){for(var t=0;t>>0);if(!t.hasNameForId(r,i)){var a=n(s,"."+i,void 0,r);t.insertRules(r,i,a);}o.push(i),this.staticRulesId=i;}else {for(var c=this.rules.length,u=Q(this.baseHash,n.hash),l="",d=0;d>>0);if(!t.hasNameForId(r,m)){var y=n(l,"."+m,void 0,r);t.insertRules(r,m,y);}o.push(m);}}return o.join(" ")},e}(),oe=/^\s*\/\/.*$/gm,se=[":","[",".","#"];function ie(e){var t,n,r,o,s=void 0===e?S:e,i=s.options,a=void 0===i?S:i,c=s.plugins,u=void 0===c?g:c,l=new stylis_min(a),h=[],p=function(e){function t(t){if(t)try{e(t+"}");}catch(e){}}return function(n,r,o,s,i,a,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t);}}}((function(e){h.push(e);})),f=function(e,r,s){return 0===r&&-1!==se.indexOf(s[n.length])||s.match(o)?e:"."+t};function m(e,s,i,a){void 0===a&&(a="&");var c=e.replace(oe,""),u=s&&i?i+" "+s+" { "+c+" }":c;return t=a,n=s,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),l(i||!s?"":s,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f));},p,function(e){if(-2===e){var t=h;return h=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||R(15),Q(e,t.name)}),5381).toString():"",m}var ae=React__default.createContext();ae.Consumer;var ue=React__default.createContext(),le=(ue.Consumer,new J),de=ie();function he(){return reactExports.useContext(ae)||le}function pe(){return reactExports.useContext(ue)||de}var me=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=de);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"));},this.toString=function(){return R(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t;}return e.prototype.getName=function(e){return void 0===e&&(e=de),this.name+e.hash},e}(),ye=/([A-Z])/,ve=/([A-Z])/g,ge=/^ms-/,Se=function(e){return "-"+e.toLowerCase()};function we(e){return ye.test(e)?e.replace(ve,Se).replace(ge,"-ms-"):e}var Ee=function(e){return null==e||!1===e||""===e};function be(e,n,r,o){if(Array.isArray(e)){for(var s,i=[],a=0,c=e.length;a1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,Re=/(^-|-$)/g;function De(e){return e.replace(Oe,"-").replace(Re,"")}var je=function(e){return K(ee(e)>>>0)};function Te(e){return "string"==typeof e&&("production"==="production")}var xe=function(e){return "function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},ke=function(e){return "__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Ve(e,t,n){var r=e[n];xe(t)&&xe(r)?ze(r,t):e[n]=t;}function ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(t,["componentId"]),s=r&&r+"-"+(Te(e)?e:De(E(e)));return Fe(e,m({},o,{attrs:_,componentId:s}),n)},Object.defineProperty(A,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?ze({},e.defaultProps,t):t;}}),Object.defineProperty(A,"toString",{value:function(){return "."+A.styledComponentId}}),i&&f(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A}var Ye=function(e){return function e(t,r,o){if(void 0===o&&(o=S),!reactIsExports$1.isValidElementType(r))return R(1,String(r));var s=function(){return t(r,o,Ne.apply(void 0,arguments))};return s.withConfig=function(n){return e(t,r,m({},o,{},n))},s.attrs=function(n){return e(t,r,m({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},s}(Fe,e)};["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","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","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","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Ye[e]=Ye(e);}));function $e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var D=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e;}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&R(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s=x&&(x=t+1),j.set(e,t),T.set(t,e);},B="style["+_+'][data-styled-version="5.3.11"]',M=new RegExp("^"+_+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),G=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(_))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(_,"active"),r.setAttribute("data-styled-version","5.3.11");var i=F();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},q=function(){function e(e){var t=this.element=Y(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return !1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--;},t.getRule=function(e){return e0&&(u+=e+",");})),r+=""+a+c+'{content:"'+u+'"}/*!sc*/\n';}}}return r}(this)},e}(),X=/(a)(d)/gi,Z=function(e){return String.fromCharCode(e+(e>25?39:97))};function K(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Z(t%52)+n;return (Z(t%52)+n).replace(X,"$1-$2")}var Q=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},ee=function(e){return Q(5381,e)};function te(e){for(var t=0;t>>0);if(!t.hasNameForId(r,i)){var a=n(s,"."+i,void 0,r);t.insertRules(r,i,a);}o.push(i),this.staticRulesId=i;}else {for(var c=this.rules.length,u=Q(this.baseHash,n.hash),l="",d=0;d>>0);if(!t.hasNameForId(r,m)){var y=n(l,"."+m,void 0,r);t.insertRules(r,m,y);}o.push(m);}}return o.join(" ")},e}(),oe=/^\s*\/\/.*$/gm,se=[":","[",".","#"];function ie(e){var t,n,r,o,s=void 0===e?S:e,i=s.options,a=void 0===i?S:i,c=s.plugins,u=void 0===c?g:c,l=new stylis_min(a),h=[],p=function(e){function t(t){if(t)try{e(t+"}");}catch(e){}}return function(n,r,o,s,i,a,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t);}}}((function(e){h.push(e);})),f=function(e,r,s){return 0===r&&-1!==se.indexOf(s[n.length])||s.match(o)?e:"."+t};function m(e,s,i,a){void 0===a&&(a="&");var c=e.replace(oe,""),u=s&&i?i+" "+s+" { "+c+" }":c;return t=a,n=s,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),l(i||!s?"":s,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f));},p,function(e){if(-2===e){var t=h;return h=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||R(15),Q(e,t.name)}),5381).toString():"",m}var ae=ReactExports.createContext();ae.Consumer;var ue=ReactExports.createContext(),le=(ue.Consumer,new J),de=ie();function he(){return reactExports.useContext(ae)||le}function pe(){return reactExports.useContext(ue)||de}var me=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=de);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"));},this.toString=function(){return R(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t;}return e.prototype.getName=function(e){return void 0===e&&(e=de),this.name+e.hash},e}(),ye=/([A-Z])/,ve=/([A-Z])/g,ge=/^ms-/,Se=function(e){return "-"+e.toLowerCase()};function we(e){return ye.test(e)?e.replace(ve,Se).replace(ge,"-ms-"):e}var Ee=function(e){return null==e||!1===e||""===e};function be(e,n,r,o){if(Array.isArray(e)){for(var s,i=[],a=0,c=e.length;a1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,Re=/(^-|-$)/g;function De(e){return e.replace(Oe,"-").replace(Re,"")}var je=function(e){return K(ee(e)>>>0)};function Te(e){return "string"==typeof e&&("production"==="production")}var xe=function(e){return "function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},ke=function(e){return "__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Ve(e,t,n){var r=e[n];xe(t)&&xe(r)?ze(r,t):e[n]=t;}function ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(t,["componentId"]),s=r&&r+"-"+(Te(e)?e:De(E(e)));return Fe(e,m({},o,{attrs:_,componentId:s}),n)},Object.defineProperty(A,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?ze({},e.defaultProps,t):t;}}),Object.defineProperty(A,"toString",{value:function(){return "."+A.styledComponentId}}),i&&f$1(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A}var Ye=function(e){return function e(t,r,o){if(void 0===o&&(o=S),!reactIsExports$1.isValidElementType(r))return R(1,String(r));var s=function(){return t(r,o,Ne.apply(void 0,arguments))};return s.withConfig=function(n){return e(t,r,m({},o,{},n))},s.attrs=function(n){return e(t,r,m({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},s}(Fe,e)};["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","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","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","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Ye[e]=Ye(e);}));function $e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r { } = _ref; const scopeRef = reactExports.useRef(null); const relativeDocument = useDocument(theme); - const controlledScopeRef = focusVisibleRef === null ? React__default.createRef() : getControlledValue$1(focusVisibleRef, scopeRef); + const controlledScopeRef = focusVisibleRef === null ? ReactExports.createRef() : getControlledValue$1(focusVisibleRef, scopeRef); useFocusVisible({ scope: controlledScopeRef, relativeDocument }); - return React__default.createElement(Ge, _extends$v({ + return ReactExports.createElement(Ge, _extends$v({ theme: theme - }, other), focusVisibleRef === undefined ? React__default.createElement("div", { + }, other), focusVisibleRef === undefined ? ReactExports.createElement("div", { ref: scopeRef }, children) : children); }; @@ -5161,7 +5063,7 @@ var debounce$3 = /*@__PURE__*/getDefaultExportFromCjs(lodash_debounce); * found at http://www.apache.org/licenses/LICENSE-2.0. */ -function composeEventHandlers$1() { +function composeEventHandlers$2() { for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) { fns[_key] = arguments[_key]; } @@ -5175,7 +5077,7 @@ function composeEventHandlers$1() { }); }; } -const KEYS$1 = { +const KEYS$2 = { ALT: 'Alt', ASTERISK: '*', BACKSPACE: 'Backspace', @@ -5203,7 +5105,7 @@ const KEYS$1 = { UNIDENTIFIED: 'Unidentified', UP: 'ArrowUp' }; -var DocumentPosition$1; +var DocumentPosition$2; (function (DocumentPosition) { DocumentPosition[DocumentPosition["DISCONNECTED"] = 1] = "DISCONNECTED"; DocumentPosition[DocumentPosition["PRECEDING"] = 2] = "PRECEDING"; @@ -5211,7 +5113,7 @@ var DocumentPosition$1; DocumentPosition[DocumentPosition["CONTAINS"] = 8] = "CONTAINS"; DocumentPosition[DocumentPosition["CONTAINED_BY"] = 16] = "CONTAINED_BY"; DocumentPosition[DocumentPosition["IMPLEMENTATION_SPECIFIC"] = 32] = "IMPLEMENTATION_SPECIFIC"; -})(DocumentPosition$1 || (DocumentPosition$1 = {})); +})(DocumentPosition$2 || (DocumentPosition$2 = {})); const SLIDER_MIN = 0; const SLIDER_MAX = 100; @@ -5340,7 +5242,7 @@ function useSlider(_ref) { 'data-garden-container-id': 'containers.slider.track', 'data-garden-container-version': '0.1.6', 'aria-disabled': disabled, - onMouseDown: composeEventHandlers$1(onMouseDown, handleMouseDown), + onMouseDown: composeEventHandlers$2(onMouseDown, handleMouseDown), ...other }; }, [disabled, getTrackPosition, maxThumbRef, minThumbRef, position.maxValue, position.minValue, setThumbPosition]); @@ -5355,28 +5257,28 @@ function useSlider(_ref) { if (!disabled) { let value; switch (event.key) { - case KEYS$1.RIGHT: + case KEYS$2.RIGHT: value = (thumb === 'min' ? position.minValue : position.maxValue) + (rtl ? -step : step); break; - case KEYS$1.UP: + case KEYS$2.UP: value = (thumb === 'min' ? position.minValue : position.maxValue) + step; break; - case KEYS$1.LEFT: + case KEYS$2.LEFT: value = (thumb === 'min' ? position.minValue : position.maxValue) - (rtl ? -step : step); break; - case KEYS$1.DOWN: + case KEYS$2.DOWN: value = (thumb === 'min' ? position.minValue : position.maxValue) - step; break; - case KEYS$1.PAGE_UP: + case KEYS$2.PAGE_UP: value = (thumb === 'min' ? position.minValue : position.maxValue) + jump; break; - case KEYS$1.PAGE_DOWN: + case KEYS$2.PAGE_DOWN: value = (thumb === 'min' ? position.minValue : position.maxValue) - jump; break; - case KEYS$1.HOME: + case KEYS$2.HOME: value = min; break; - case KEYS$1.END: + case KEYS$2.END: value = max; break; } @@ -5431,9 +5333,9 @@ function useSlider(_ref) { 'aria-valuemin': thumb === 'min' ? min : position.minValue, 'aria-valuemax': thumb === 'min' ? position.maxValue : max, 'aria-valuenow': thumb === 'min' ? position.minValue : position.maxValue, - onKeyDown: composeEventHandlers$1(onKeyDown, handleKeyDown), - onMouseDown: composeEventHandlers$1(onMouseDown, handleMouseDown), - onTouchStart: composeEventHandlers$1(onTouchStart, handleTouchStart), + onKeyDown: composeEventHandlers$2(onKeyDown, handleKeyDown), + onMouseDown: composeEventHandlers$2(onMouseDown, handleMouseDown), + onTouchStart: composeEventHandlers$2(onTouchStart, handleTouchStart), ...other }; }, [doc, disabled, getTrackPosition, jump, max, min, position.maxValue, position.minValue, rtl, step, setThumbPosition]); @@ -5639,13 +5541,13 @@ const MessageIcon = _ref => { } = _ref; let retVal; if (validation === 'error') { - retVal = React__default.createElement(SvgAlertErrorStroke$1, props); + retVal = ReactExports.createElement(SvgAlertErrorStroke$1, props); } else if (validation === 'success') { - retVal = React__default.createElement(SvgCheckCircleStroke$1, props); + retVal = ReactExports.createElement(SvgCheckCircleStroke$1, props); } else if (validation === 'warning') { - retVal = React__default.createElement(SvgAlertWarningStroke$1, props); + retVal = ReactExports.createElement(SvgAlertWarningStroke$1, props); } else { - retVal = React__default.cloneElement(reactExports.Children.only(children)); + retVal = ReactExports.cloneElement(reactExports.Children.only(children)); } return retVal; }; @@ -5836,7 +5738,7 @@ _ref => { theme, ...props } = _ref; - return React__default.cloneElement(reactExports.Children.only(children), props); + return ReactExports.cloneElement(reactExports.Children.only(children), props); }).attrs({ 'data-garden-id': COMPONENT_ID$B, 'data-garden-version': '8.69.1' @@ -6266,7 +6168,7 @@ const StyledFileIcon = styled(_ref => { theme, ...props } = _ref; - return React__default.cloneElement(reactExports.Children.only(children), props); + return ReactExports.cloneElement(reactExports.Children.only(children), props); }).attrs({ 'data-garden-id': COMPONENT_ID$j$1, 'data-garden-version': '8.69.1' @@ -6830,7 +6732,7 @@ StyledTileLabel.defaultProps = { theme: DEFAULT_THEME }; -const Field$1 = React__default.forwardRef((props, ref) => { +const Field$1 = ReactExports.forwardRef((props, ref) => { const [hasHint, setHasHint] = reactExports.useState(false); const [hasMessage, setHasMessage] = reactExports.useState(false); const [isLabelActive, setIsLabelActive] = reactExports.useState(false); @@ -6865,9 +6767,9 @@ const Field$1 = React__default.forwardRef((props, ref) => { setHasMessage, multiThumbRangeRef }), [propGetters, getInputProps, getMessageProps, isLabelActive, isLabelHovered, hasHint, hasMessage]); - return React__default.createElement(FieldContext$1.Provider, { + return ReactExports.createElement(FieldContext$1.Provider, { value: fieldProps - }, React__default.createElement(StyledField$1, _extends$t({}, props, { + }, ReactExports.createElement(StyledField$1, _extends$t({}, props, { ref: ref }))); }); @@ -6881,7 +6783,7 @@ const useFieldsetContext = () => { const LegendComponent = reactExports.forwardRef((props, ref) => { const fieldsetContext = useFieldsetContext(); - return React__default.createElement(StyledLegend, _extends$t({}, props, fieldsetContext, { + return ReactExports.createElement(StyledLegend, _extends$t({}, props, fieldsetContext, { ref: ref })); }); @@ -6892,9 +6794,9 @@ const FieldsetComponent = reactExports.forwardRef((props, ref) => { const fieldsetContext = reactExports.useMemo(() => ({ isCompact: props.isCompact }), [props.isCompact]); - return React__default.createElement(FieldsetContext.Provider, { + return ReactExports.createElement(FieldsetContext.Provider, { value: fieldsetContext - }, React__default.createElement(StyledFieldset, _extends$t({}, props, { + }, ReactExports.createElement(StyledFieldset, _extends$t({}, props, { ref: ref }))); }); @@ -6910,7 +6812,7 @@ const useInputContext = () => { return reactExports.useContext(InputContext); }; -const Hint$1 = React__default.forwardRef((props, ref) => { +const Hint$1 = ReactExports.forwardRef((props, ref) => { const { hasHint, setHasHint, @@ -6941,13 +6843,13 @@ const Hint$1 = React__default.forwardRef((props, ref) => { if (getHintProps) { combinedProps = getHintProps(combinedProps); } - return React__default.createElement(HintComponent, _extends$t({ + return ReactExports.createElement(HintComponent, _extends$t({ ref: ref }, combinedProps)); }); Hint$1.displayName = 'Hint'; -const Label$1 = React__default.forwardRef((props, ref) => { +const Label$1 = ReactExports.forwardRef((props, ref) => { const fieldContext = useFieldContext$1(); const fieldsetContext = useFieldsetContext(); const type = useInputContext(); @@ -6962,19 +6864,19 @@ const Label$1 = React__default.forwardRef((props, ref) => { } = fieldContext; combinedProps = { ...combinedProps, - onMouseUp: composeEventHandlers$2(props.onMouseUp, () => { + onMouseUp: composeEventHandlers$3(props.onMouseUp, () => { setIsLabelActive(false); }), - onMouseDown: composeEventHandlers$2(props.onMouseDown, () => { + onMouseDown: composeEventHandlers$3(props.onMouseDown, () => { setIsLabelActive(true); }), - onMouseEnter: composeEventHandlers$2(props.onMouseEnter, () => { + onMouseEnter: composeEventHandlers$3(props.onMouseEnter, () => { setIsLabelHovered(true); }), - onMouseLeave: composeEventHandlers$2(props.onMouseLeave, () => { + onMouseLeave: composeEventHandlers$3(props.onMouseLeave, () => { setIsLabelHovered(false); }), - onClick: composeEventHandlers$2(props.onClick, () => { + onClick: composeEventHandlers$3(props.onClick, () => { multiThumbRangeRef.current && multiThumbRangeRef.current.focus(); }) }; @@ -6987,9 +6889,9 @@ const Label$1 = React__default.forwardRef((props, ref) => { }; } if (type === 'radio') { - return React__default.createElement(StyledRadioLabel, _extends$t({ + return ReactExports.createElement(StyledRadioLabel, _extends$t({ ref: ref - }, combinedProps), React__default.createElement(StyledRadioSvg, null), props.children); + }, combinedProps), ReactExports.createElement(StyledRadioSvg, null), props.children); } else if (type === 'checkbox') { const onLabelSelect = e => { const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; @@ -7008,17 +6910,17 @@ const Label$1 = React__default.forwardRef((props, ref) => { }; combinedProps = { ...combinedProps, - onClick: composeEventHandlers$2(combinedProps.onClick, onLabelSelect) + onClick: composeEventHandlers$3(combinedProps.onClick, onLabelSelect) }; - return React__default.createElement(StyledCheckLabel, _extends$t({ + return ReactExports.createElement(StyledCheckLabel, _extends$t({ ref: ref - }, combinedProps), React__default.createElement(StyledCheckSvg, null), React__default.createElement(StyledDashSvg, null), props.children); + }, combinedProps), ReactExports.createElement(StyledCheckSvg, null), ReactExports.createElement(StyledDashSvg, null), props.children); } else if (type === 'toggle') { - return React__default.createElement(StyledToggleLabel, _extends$t({ + return ReactExports.createElement(StyledToggleLabel, _extends$t({ ref: ref - }, combinedProps), React__default.createElement(StyledToggleSvg, null), props.children); + }, combinedProps), ReactExports.createElement(StyledToggleSvg, null), props.children); } - return React__default.createElement(StyledLabel$1, _extends$t({ + return ReactExports.createElement(StyledLabel$1, _extends$t({ ref: ref }, combinedProps)); }); @@ -7031,7 +6933,7 @@ const VALIDATION = ['success', 'warning', 'error']; const FILE_VALIDATION = ['success', 'error']; const FILE_TYPE = ['pdf', 'zip', 'image', 'document', 'spreadsheet', 'presentation', 'generic']; -const Message$1 = React__default.forwardRef((_ref, ref) => { +const Message$1 = ReactExports.forwardRef((_ref, ref) => { let { validation, validationLabel, @@ -7073,9 +6975,9 @@ const Message$1 = React__default.forwardRef((_ref, ref) => { combinedProps = getMessageProps(combinedProps); } const ariaLabel = useText(Message$1, combinedProps, 'validationLabel', validation, validation !== undefined); - return React__default.createElement(MessageComponent, _extends$t({ + return ReactExports.createElement(MessageComponent, _extends$t({ ref: ref - }, combinedProps), validation && React__default.createElement(StyledMessageIcon, { + }, combinedProps), validation && ReactExports.createElement(StyledMessageIcon, { validation: validation, "aria-label": ariaLabel }), children); @@ -7086,7 +6988,7 @@ Message$1.propTypes = { validationLabel: PropTypes.string }; -const Checkbox = React__default.forwardRef((_ref, ref) => { +const Checkbox = ReactExports.forwardRef((_ref, ref) => { let { indeterminate, children, @@ -7116,9 +7018,9 @@ const Checkbox = React__default.forwardRef((_ref, ref) => { if (fieldContext) { combinedProps = fieldContext.getInputProps(combinedProps); } - return React__default.createElement(InputContext.Provider, { + return ReactExports.createElement(InputContext.Provider, { value: "checkbox" - }, React__default.createElement(StyledCheckInput, combinedProps), children); + }, ReactExports.createElement(StyledCheckInput, combinedProps), children); }); Checkbox.displayName = 'Checkbox'; Checkbox.propTypes = { @@ -7131,14 +7033,14 @@ const useInputGroupContext = () => { return reactExports.useContext(InputGroupContext); }; -const Input = React__default.forwardRef((_ref, ref) => { +const Input = ReactExports.forwardRef((_ref, ref) => { let { onSelect, ...props } = _ref; const fieldContext = useFieldContext$1(); const inputGroupContext = useInputGroupContext(); - const onSelectHandler = props.readOnly ? composeEventHandlers$2(onSelect, event => { + const onSelectHandler = props.readOnly ? composeEventHandlers$3(onSelect, event => { event.currentTarget.select(); }) : onSelect; let combinedProps = { @@ -7156,7 +7058,7 @@ const Input = React__default.forwardRef((_ref, ref) => { if (fieldContext) { combinedProps = fieldContext.getInputProps(combinedProps); } - return React__default.createElement(StyledTextInput, combinedProps); + return ReactExports.createElement(StyledTextInput, combinedProps); }); Input.propTypes = { isCompact: PropTypes.bool, @@ -7166,7 +7068,7 @@ Input.propTypes = { }; Input.displayName = 'Input'; -const Radio = React__default.forwardRef((_ref, ref) => { +const Radio = ReactExports.forwardRef((_ref, ref) => { let { children, ...props @@ -7181,16 +7083,16 @@ const Radio = React__default.forwardRef((_ref, ref) => { if (fieldContext) { combinedProps = fieldContext.getInputProps(combinedProps); } - return React__default.createElement(InputContext.Provider, { + return ReactExports.createElement(InputContext.Provider, { value: "radio" - }, React__default.createElement(StyledRadioInput, combinedProps), children); + }, ReactExports.createElement(StyledRadioInput, combinedProps), children); }); Radio.displayName = 'Radio'; Radio.propTypes = { isCompact: PropTypes.bool }; -const Range = React__default.forwardRef((_ref, ref) => { +const Range = ReactExports.forwardRef((_ref, ref) => { let { hasLowerTrack, min, @@ -7216,7 +7118,7 @@ const Range = React__default.forwardRef((_ref, ref) => { reactExports.useEffect(() => { updateBackgroundWidthFromInput(rangeRef.current); }, [rangeRef, updateBackgroundWidthFromInput, props.value]); - const onChange = hasLowerTrack ? composeEventHandlers$2(props.onChange, event => { + const onChange = hasLowerTrack ? composeEventHandlers$3(props.onChange, event => { updateBackgroundWidthFromInput(event.target); }) : props.onChange; let combinedProps = { @@ -7234,7 +7136,7 @@ const Range = React__default.forwardRef((_ref, ref) => { isDescribed: true }); } - return React__default.createElement(StyledRangeInput, combinedProps); + return ReactExports.createElement(StyledRangeInput, combinedProps); }); Range.defaultProps = { hasLowerTrack: true, @@ -7247,7 +7149,7 @@ Range.displayName = 'Range'; const parseStyleValue = value => { return parseInt(value, 10) || 0; }; -const Textarea = React__default.forwardRef((_ref, ref) => { +const Textarea = ReactExports.forwardRef((_ref, ref) => { let { minRows, maxRows, @@ -7333,7 +7235,7 @@ const Textarea = React__default.forwardRef((_ref, ref) => { computedStyle.height = state.height; computedStyle.overflow = state.overflow ? 'hidden' : undefined; } - const onSelectHandler = props.readOnly ? composeEventHandlers$2(onSelect, event => { + const onSelectHandler = props.readOnly ? composeEventHandlers$3(onSelect, event => { event.currentTarget.select(); }) : onSelect; let combinedProps = { @@ -7352,7 +7254,7 @@ const Textarea = React__default.forwardRef((_ref, ref) => { isDescribed: true }); } - return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledTextarea, combinedProps), isAutoResizable && React__default.createElement(StyledTextarea, { + return ReactExports.createElement(ReactExports.Fragment, null, ReactExports.createElement(StyledTextarea, combinedProps), isAutoResizable && ReactExports.createElement(StyledTextarea, { "aria-hidden": true, readOnly: true, isHidden: true, @@ -7375,7 +7277,7 @@ Textarea.propTypes = { }; Textarea.displayName = 'Textarea'; -const Toggle = React__default.forwardRef((_ref, ref) => { +const Toggle = ReactExports.forwardRef((_ref, ref) => { let { children, ...props @@ -7390,9 +7292,9 @@ const Toggle = React__default.forwardRef((_ref, ref) => { if (fieldContext) { combinedProps = fieldContext.getInputProps(combinedProps); } - return React__default.createElement(InputContext.Provider, { + return ReactExports.createElement(InputContext.Provider, { value: "toggle" - }, React__default.createElement(StyledToggleInput, combinedProps), children); + }, ReactExports.createElement(StyledToggleInput, combinedProps), children); }); Toggle.displayName = 'Toggle'; Toggle.propTypes = { @@ -7415,13 +7317,13 @@ var SvgChevronDownStroke$2 = function SvgChevronDownStroke(props) { }))); }; -const StartIconComponent$1 = props => React__default.createElement(StyledTextMediaFigure, _extends$t({ +const StartIconComponent$1 = props => ReactExports.createElement(StyledTextMediaFigure, _extends$t({ position: "start" }, props)); StartIconComponent$1.displayName = 'FauxInput.StartIcon'; const StartIcon$1 = StartIconComponent$1; -const EndIconComponent$1 = props => React__default.createElement(StyledTextMediaFigure, _extends$t({ +const EndIconComponent$1 = props => ReactExports.createElement(StyledTextMediaFigure, _extends$t({ position: "end" }, props)); EndIconComponent$1.displayName = 'FauxInput.EndIcon'; @@ -7437,13 +7339,13 @@ const FauxInputComponent = reactExports.forwardRef((_ref, ref) => { ...props } = _ref; const [isFocused, setIsFocused] = reactExports.useState(false); - const onFocusHandler = composeEventHandlers$2(onFocus, () => { + const onFocusHandler = composeEventHandlers$3(onFocus, () => { setIsFocused(true); }); - const onBlurHandler = composeEventHandlers$2(onBlur, () => { + const onBlurHandler = composeEventHandlers$3(onBlur, () => { setIsFocused(false); }); - return React__default.createElement(StyledTextFauxInput, _extends$t({ + return ReactExports.createElement(StyledTextFauxInput, _extends$t({ onFocus: onFocusHandler, onBlur: onBlurHandler, isFocused: controlledIsFocused === undefined ? isFocused : controlledIsFocused, @@ -7469,7 +7371,7 @@ const FauxInput = FauxInputComponent; FauxInput.EndIcon = EndIcon$1; FauxInput.StartIcon = StartIcon$1; -const Select = React__default.forwardRef((_ref, ref) => { +const Select = ReactExports.forwardRef((_ref, ref) => { let { disabled, isCompact, @@ -7493,14 +7395,14 @@ const Select = React__default.forwardRef((_ref, ref) => { isDescribed: true }); } - return React__default.createElement(StyledSelectWrapper, { + return ReactExports.createElement(StyledSelectWrapper, { isCompact: isCompact, isBare: isBare, validation: validation, focusInset: focusInset - }, React__default.createElement(StyledSelect, combinedProps), !isBare && React__default.createElement(FauxInput.EndIcon, { + }, ReactExports.createElement(StyledSelect, combinedProps), !isBare && ReactExports.createElement(FauxInput.EndIcon, { isDisabled: disabled - }, React__default.createElement(SvgChevronDownStroke$2, null))); + }, ReactExports.createElement(SvgChevronDownStroke$2, null))); }); Select.propTypes = { isCompact: PropTypes.bool, @@ -7572,16 +7474,16 @@ const MultiThumbRange = reactExports.forwardRef((_ref, ref) => { const minPosition = (updatedMinValue - min) / (max - min) * trackRect.width; const maxPosition = (updatedMaxValue - min) / (max - min) * trackRect.width; const sliderBackgroundSize = Math.abs(maxPosition) - Math.abs(minPosition); - return React__default.createElement(StyledSlider, _extends$t({ + return ReactExports.createElement(StyledSlider, _extends$t({ ref: ref, onMouseDown: onSliderMouseDown - }, props), React__default.createElement(StyledSliderTrack, { + }, props), ReactExports.createElement(StyledSliderTrack, { backgroundSize: sliderBackgroundSize, backgroundPosition: theme.rtl ? trackRect.width - maxPosition : minPosition, isDisabled: disabled - }, React__default.createElement(StyledSliderTrackRail, _extends$t({}, trackProps, { + }, ReactExports.createElement(StyledSliderTrackRail, _extends$t({}, trackProps, { ref: trackRailRef - }), React__default.createElement(StyledSliderThumb, _extends$t({}, getMinThumbProps({ + }), ReactExports.createElement(StyledSliderThumb, _extends$t({}, getMinThumbProps({ 'aria-label': updatedMinValue }), { isDisabled: disabled, @@ -7589,7 +7491,7 @@ const MultiThumbRange = reactExports.forwardRef((_ref, ref) => { ref: minThumbRef, "data-garden-active": isLabelActive, "data-garden-hover": isLabelHovered - })), React__default.createElement(StyledSliderThumb, _extends$t({}, getMaxThumbProps({ + })), ReactExports.createElement(StyledSliderThumb, _extends$t({}, getMaxThumbProps({ 'aria-label': updatedMaxValue }), { isDisabled: disabled, @@ -7619,7 +7521,7 @@ const useTilesContext = () => { return reactExports.useContext(TilesContext); }; -const TileComponent = React__default.forwardRef((_ref, ref) => { +const TileComponent = ReactExports.forwardRef((_ref, ref) => { let { children, value, @@ -7636,12 +7538,12 @@ const TileComponent = React__default.forwardRef((_ref, ref) => { onChange: tilesContext.onChange }; } - return React__default.createElement(StyledTile, _extends$t({ + return ReactExports.createElement(StyledTile, _extends$t({ ref: ref, "aria-disabled": disabled, isDisabled: disabled, isSelected: tilesContext && tilesContext.value === value - }, props), children, React__default.createElement(StyledTileInput, _extends$t({}, inputProps, { + }, props), children, ReactExports.createElement(StyledTileInput, _extends$t({}, inputProps, { disabled: disabled, value: value, type: "radio", @@ -7657,7 +7559,7 @@ const Tile = TileComponent; const DescriptionComponent = reactExports.forwardRef((props, ref) => { const tilesContext = useTilesContext(); - return React__default.createElement(StyledTileDescription, _extends$t({ + return ReactExports.createElement(StyledTileDescription, _extends$t({ ref: ref, isCentered: tilesContext && tilesContext.isCentered }, props)); @@ -7667,7 +7569,7 @@ const Description = DescriptionComponent; const IconComponent = reactExports.forwardRef((props, ref) => { const tileContext = useTilesContext(); - return React__default.createElement(StyledTileIcon, _extends$t({ + return ReactExports.createElement(StyledTileIcon, _extends$t({ ref: ref, isCentered: tileContext && tileContext.isCentered }, props)); @@ -7684,7 +7586,7 @@ const LabelComponent = reactExports.forwardRef((props, forwardedRef) => { setTitle(ref.current.textContent || undefined); } }, [ref]); - return React__default.createElement(StyledTileLabel, _extends$t({ + return ReactExports.createElement(StyledTileLabel, _extends$t({ ref: mergeRefs([ref, forwardedRef]), title: title, isCentered: tilesContext && tilesContext.isCentered @@ -7718,9 +7620,9 @@ const TilesComponent = reactExports.forwardRef((_ref, ref) => { name, isCentered }), [handleOnChange, selectedValue, name, isCentered]); - return React__default.createElement(TilesContext.Provider, { + return ReactExports.createElement(TilesContext.Provider, { value: tileContext - }, React__default.createElement("div", _extends$t({ + }, ReactExports.createElement("div", _extends$t({ ref: ref, role: "radiogroup" }, props))); @@ -7741,7 +7643,7 @@ Tiles.Icon = Icon; Tiles.Label = Label$2; Tiles.Tile = Tile; -const InputGroup = React__default.forwardRef((_ref, ref) => { +const InputGroup = ReactExports.forwardRef((_ref, ref) => { let { isCompact, ...props @@ -7749,9 +7651,9 @@ const InputGroup = React__default.forwardRef((_ref, ref) => { const contextValue = reactExports.useMemo(() => ({ isCompact }), [isCompact]); - return React__default.createElement(InputGroupContext.Provider, { + return ReactExports.createElement(InputGroupContext.Provider, { value: contextValue - }, React__default.createElement(StyledInputGroup$1, _extends$t({ + }, ReactExports.createElement(StyledInputGroup$1, _extends$t({ ref: ref, isCompact: isCompact }, props))); @@ -7761,13 +7663,13 @@ InputGroup.propTypes = { isCompact: PropTypes.bool }; -const FileUpload = React__default.forwardRef((_ref, ref) => { +const FileUpload = ReactExports.forwardRef((_ref, ref) => { let { disabled, ...props } = _ref; return ( - React__default.createElement(StyledFileUpload, _extends$t({ + ReactExports.createElement(StyledFileUpload, _extends$t({ ref: ref, "aria-disabled": disabled }, props, { @@ -7786,7 +7688,7 @@ const ItemComponent = reactExports.forwardRef((_ref, ref) => { let { ...props } = _ref; - return React__default.createElement(StyledFileListItem, _extends$t({}, props, { + return ReactExports.createElement(StyledFileListItem, _extends$t({}, props, { ref: ref })); }); @@ -7797,7 +7699,7 @@ const FileListComponent = reactExports.forwardRef((_ref, ref) => { let { ...props } = _ref; - return React__default.createElement(StyledFileList, _extends$t({}, props, { + return ReactExports.createElement(StyledFileList, _extends$t({}, props, { ref: ref })); }); @@ -7844,19 +7746,19 @@ const useFileContext = () => { return reactExports.useContext(FileContext); }; -const CloseComponent$1 = React__default.forwardRef((props, ref) => { +const CloseComponent$1 = ReactExports.forwardRef((props, ref) => { const fileContext = useFileContext(); - const onMouseDown = composeEventHandlers$2(props.onMouseDown, event => event.preventDefault() + const onMouseDown = composeEventHandlers$3(props.onMouseDown, event => event.preventDefault() ); const ariaLabel = useText(CloseComponent$1, props, 'aria-label', 'Close'); - return React__default.createElement(StyledFileClose, _extends$t({ + return ReactExports.createElement(StyledFileClose, _extends$t({ ref: ref, "aria-label": ariaLabel }, props, { type: "button", tabIndex: -1, onMouseDown: onMouseDown - }), fileContext && fileContext.isCompact ? React__default.createElement(SvgXStroke$1$1, null) : React__default.createElement(SvgXStroke$3, null)); + }), fileContext && fileContext.isCompact ? ReactExports.createElement(SvgXStroke$1$1, null) : ReactExports.createElement(SvgXStroke$3, null)); }); CloseComponent$1.displayName = 'File.Close'; const Close$2 = CloseComponent$1; @@ -7897,19 +7799,19 @@ var SvgTrashStroke = function SvgTrashStroke(props) { }))); }; -const DeleteComponent = React__default.forwardRef((props, ref) => { +const DeleteComponent = ReactExports.forwardRef((props, ref) => { const fileContext = useFileContext(); - const onMouseDown = composeEventHandlers$2(props.onMouseDown, event => event.preventDefault() + const onMouseDown = composeEventHandlers$3(props.onMouseDown, event => event.preventDefault() ); const ariaLabel = useText(DeleteComponent, props, 'aria-label', 'Delete'); - return React__default.createElement(StyledFileDelete, _extends$t({ + return ReactExports.createElement(StyledFileDelete, _extends$t({ ref: ref, "aria-label": ariaLabel }, props, { type: "button", tabIndex: -1, onMouseDown: onMouseDown - }), fileContext && fileContext.isCompact ? React__default.createElement(SvgTrashStroke$1, null) : React__default.createElement(SvgTrashStroke, null)); + }), fileContext && fileContext.isCompact ? ReactExports.createElement(SvgTrashStroke$1, null) : ReactExports.createElement(SvgTrashStroke, null)); }); DeleteComponent.displayName = 'File.Delete'; const Delete = DeleteComponent; @@ -8250,26 +8152,26 @@ var SvgFileErrorStroke = function SvgFileErrorStroke(props) { }; const fileIconsDefault = { - pdf: React__default.createElement(SvgFilePdfStroke, null), - zip: React__default.createElement(SvgFileZipStroke, null), - image: React__default.createElement(SvgFileImageStroke, null), - document: React__default.createElement(SvgFileDocumentStroke, null), - spreadsheet: React__default.createElement(SvgFileSpreadsheetStroke, null), - presentation: React__default.createElement(SvgFilePresentationStroke, null), - generic: React__default.createElement(SvgFileGenericStroke, null), - success: React__default.createElement(SvgCheckCircleStroke$1, null), - error: React__default.createElement(SvgFileErrorStroke, null) + pdf: ReactExports.createElement(SvgFilePdfStroke, null), + zip: ReactExports.createElement(SvgFileZipStroke, null), + image: ReactExports.createElement(SvgFileImageStroke, null), + document: ReactExports.createElement(SvgFileDocumentStroke, null), + spreadsheet: ReactExports.createElement(SvgFileSpreadsheetStroke, null), + presentation: ReactExports.createElement(SvgFilePresentationStroke, null), + generic: ReactExports.createElement(SvgFileGenericStroke, null), + success: ReactExports.createElement(SvgCheckCircleStroke$1, null), + error: ReactExports.createElement(SvgFileErrorStroke, null) }; const fileIconsCompact = { - pdf: React__default.createElement(SvgFilePdfStroke$1, null), - zip: React__default.createElement(SvgFileZipStroke$1, null), - image: React__default.createElement(SvgFileImageStroke$1, null), - document: React__default.createElement(SvgFileDocumentStroke$1, null), - spreadsheet: React__default.createElement(SvgFileSpreadsheetStroke$1, null), - presentation: React__default.createElement(SvgFilePresentationStroke$1, null), - generic: React__default.createElement(SvgFileGenericStroke$1, null), - success: React__default.createElement(SvgCheckCircleStroke$2, null), - error: React__default.createElement(SvgFileErrorStroke$1, null) + pdf: ReactExports.createElement(SvgFilePdfStroke$1, null), + zip: ReactExports.createElement(SvgFileZipStroke$1, null), + image: ReactExports.createElement(SvgFileImageStroke$1, null), + document: ReactExports.createElement(SvgFileDocumentStroke$1, null), + spreadsheet: ReactExports.createElement(SvgFileSpreadsheetStroke$1, null), + presentation: ReactExports.createElement(SvgFilePresentationStroke$1, null), + generic: ReactExports.createElement(SvgFileGenericStroke$1, null), + success: ReactExports.createElement(SvgCheckCircleStroke$2, null), + error: ReactExports.createElement(SvgFileErrorStroke$1, null) }; const FileComponent = reactExports.forwardRef((_ref, ref) => { @@ -8285,16 +8187,16 @@ const FileComponent = reactExports.forwardRef((_ref, ref) => { isCompact }), [isCompact]); const validationType = validation || type; - return React__default.createElement(FileContext.Provider, { + return ReactExports.createElement(FileContext.Provider, { value: fileContextValue - }, React__default.createElement(StyledFile, _extends$t({}, props, { + }, ReactExports.createElement(StyledFile, _extends$t({}, props, { isCompact: isCompact, focusInset: focusInset, validation: validation, ref: ref - }), validationType && React__default.createElement(StyledFileIcon, { + }), validationType && ReactExports.createElement(StyledFileIcon, { isCompact: isCompact - }, isCompact ? fileIconsCompact[validationType] : fileIconsDefault[validationType]), reactExports.Children.map(children, child => typeof child === 'string' ? React__default.createElement("span", null, child) : child))); + }, isCompact ? fileIconsCompact[validationType] : fileIconsDefault[validationType]), reactExports.Children.map(children, child => typeof child === 'string' ? ReactExports.createElement("span", null, child) : child))); }); FileComponent.displayName = 'File'; FileComponent.propTypes = { @@ -8307,7 +8209,7 @@ const File = FileComponent; File.Close = Close$2; File.Delete = Delete; -const MediaInput = React__default.forwardRef((_ref, ref) => { +const MediaInput = ReactExports.forwardRef((_ref, ref) => { let { start, end, @@ -8334,22 +8236,22 @@ const MediaInput = React__default.forwardRef((_ref, ref) => { onMouseOut, ...otherWrapperProps } = wrapperProps; - const onFauxInputClickHandler = composeEventHandlers$2(onClick, () => { + const onFauxInputClickHandler = composeEventHandlers$3(onClick, () => { inputRef.current && inputRef.current.focus(); }); - const onFauxInputFocusHandler = composeEventHandlers$2(onFocus, () => { + const onFauxInputFocusHandler = composeEventHandlers$3(onFocus, () => { setIsFocused(true); }); - const onFauxInputBlurHandler = composeEventHandlers$2(onBlur, () => { + const onFauxInputBlurHandler = composeEventHandlers$3(onBlur, () => { setIsFocused(false); }); - const onFauxInputMouseOverHandler = composeEventHandlers$2(onMouseOver, () => { + const onFauxInputMouseOverHandler = composeEventHandlers$3(onMouseOver, () => { setIsHovered(true); }); - const onFauxInputMouseOutHandler = composeEventHandlers$2(onMouseOut, () => { + const onFauxInputMouseOutHandler = composeEventHandlers$3(onMouseOut, () => { setIsHovered(false); }); - const onSelectHandler = readOnly ? composeEventHandlers$2(onSelect, event => { + const onSelectHandler = readOnly ? composeEventHandlers$3(onSelect, event => { event.currentTarget.select(); }) : onSelect; let combinedProps = { @@ -8366,7 +8268,7 @@ const MediaInput = React__default.forwardRef((_ref, ref) => { }); isLabelHovered = fieldContext.isLabelHovered; } - return React__default.createElement(FauxInput, _extends$t({ + return ReactExports.createElement(FauxInput, _extends$t({ tabIndex: null, onClick: onFauxInputClickHandler, onFocus: onFauxInputFocusHandler, @@ -8384,11 +8286,11 @@ const MediaInput = React__default.forwardRef((_ref, ref) => { mediaLayout: true }, otherWrapperProps, { ref: wrapperRef - }), start && React__default.createElement(FauxInput.StartIcon, { + }), start && ReactExports.createElement(FauxInput.StartIcon, { isDisabled: disabled, isFocused: isFocused, isHovered: isHovered || isLabelHovered - }, start), React__default.createElement(StyledTextMediaInput, combinedProps), end && React__default.createElement(FauxInput.EndIcon, { + }, start), ReactExports.createElement(StyledTextMediaInput, combinedProps), end && ReactExports.createElement(FauxInput.EndIcon, { isDisabled: disabled, isFocused: isFocused, isHovered: isHovered || isLabelHovered @@ -8406,6 +8308,66 @@ MediaInput.propTypes = { }; MediaInput.displayName = 'MediaInput'; +/** + * Copyright Zendesk, Inc. + * + * Use of this source code is governed under the Apache License, Version 2.0 + * found at http://www.apache.org/licenses/LICENSE-2.0. + */ + +function composeEventHandlers$1() { + for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) { + fns[_key] = arguments[_key]; + } + return function (event) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + return fns.some(fn => { + fn && fn(event, ...args); + return event && event.defaultPrevented; + }); + }; +} +const KEYS$1 = { + ALT: 'Alt', + ASTERISK: '*', + BACKSPACE: 'Backspace', + COMMA: ',', + DELETE: 'Delete', + DOWN: 'ArrowDown', + END: 'End', + ENTER: 'Enter', + ESCAPE: 'Escape', + HOME: 'Home', + LEFT: 'ArrowLeft', + NUMPAD_ADD: 'Add', + NUMPAD_DECIMAL: 'Decimal', + NUMPAD_DIVIDE: 'Divide', + NUMPAD_ENTER: 'Enter', + NUMPAD_MULTIPLY: 'Multiply', + NUMPAD_SUBTRACT: 'Subtract', + PAGE_DOWN: 'PageDown', + PAGE_UP: 'PageUp', + PERIOD: '.', + RIGHT: 'ArrowRight', + SHIFT: 'Shift', + SPACE: ' ', + TAB: 'Tab', + UNIDENTIFIED: 'Unidentified', + UP: 'ArrowUp' +}; + +var DocumentPosition$1; +(function (DocumentPosition) { + DocumentPosition[DocumentPosition["DISCONNECTED"] = 1] = "DISCONNECTED"; + DocumentPosition[DocumentPosition["PRECEDING"] = 2] = "PRECEDING"; + DocumentPosition[DocumentPosition["FOLLOWING"] = 4] = "FOLLOWING"; + DocumentPosition[DocumentPosition["CONTAINS"] = 8] = "CONTAINS"; + DocumentPosition[DocumentPosition["CONTAINED_BY"] = 16] = "CONTAINED_BY"; + DocumentPosition[DocumentPosition["IMPLEMENTATION_SPECIFIC"] = 32] = "IMPLEMENTATION_SPECIFIC"; +})(DocumentPosition$1 || (DocumentPosition$1 = {})); + /** * Copyright Zendesk, Inc. * @@ -8513,7 +8475,36 @@ function _objectWithoutPropertiesLoose(source, excluded) { return target; } -let e=e=>"object"==typeof e&&null!=e&&1===e.nodeType,t=(e,t)=>(!t||"hidden"!==e)&&("visible"!==e&&"clip"!==e),n=(e,n)=>{if(e.clientHeight{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return !!t&&(t.clientHeightot||o>e&&r=t&&d>=n?o-e-l:r>t&&dn?r-t+i:0,i=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t};var o=(t,o)=>{var r,d,h,f,u,s;if("undefined"==typeof document)return [];let{scrollMode:a,block:c,inline:g,boundary:m,skipOverflowHiddenElements:p}=o,w="function"==typeof m?m:e=>e!==m;if(!e(t))throw new TypeError("Invalid target");let W=document.scrollingElement||document.documentElement,H=[],b=t;for(;e(b)&&w(b);){if(b=i(b),b===W){H.push(b);break}null!=b&&b===document.body&&n(b)&&!n(document.documentElement)||null!=b&&n(b,p)&&H.push(b);}let v=null!=(d=null==(r=window.visualViewport)?void 0:r.width)?d:innerWidth,y=null!=(f=null==(h=window.visualViewport)?void 0:h.height)?f:innerHeight,E=null!=(u=window.scrollX)?u:pageXOffset,M=null!=(s=window.scrollY)?s:pageYOffset,{height:x,width:I,top:C,right:R,bottom:T,left:V}=t.getBoundingClientRect(),k="start"===c||"nearest"===c?C:"end"===c?T:C+x/2,B="center"===g?V+I/2:"end"===g?R:V,D=[];for(let e=0;e=0&&V>=0&&T<=y&&R<=v&&C>=o&&T<=d&&V>=h&&R<=r)return D;let f=getComputedStyle(t),u=parseInt(f.borderLeftWidth,10),s=parseInt(f.borderTopWidth,10),m=parseInt(f.borderRightWidth,10),p=parseInt(f.borderBottomWidth,10),w=0,b=0,O="offsetWidth"in t?t.offsetWidth-t.clientWidth-u-m:0,X="offsetHeight"in t?t.offsetHeight-t.clientHeight-s-p:0,Y="offsetWidth"in t?0===t.offsetWidth?0:i/t.offsetWidth:0,L="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(W===t)w="start"===c?k:"end"===c?k-y:"nearest"===c?l(M,M+y,y,s,p,M+k,M+k+x,x):k-y/2,b="start"===g?B:"center"===g?B-v/2:"end"===g?B-v:l(E,E+v,v,u,m,E+B,E+B+I,I),w=Math.max(0,w+M),b=Math.max(0,b+E);else {w="start"===c?k-o-s:"end"===c?k-d+p+X:"nearest"===c?l(o,d,n,s,p+X,k,k+x,x):k-(o+n/2)+X/2,b="start"===g?B-h-u:"center"===g?B-(h+i/2)+O/2:"end"===g?B-r+m+O:l(h,r,i,u,m+O,B,B+I,I);let{scrollLeft:e,scrollTop:f}=t;w=Math.max(0,Math.min(f+w/L,t.scrollHeight-n/L+X)),b=Math.max(0,Math.min(e+b/Y,t.scrollWidth-i/Y+O)),k+=f-w,B+=e-b;}D.push({el:t,top:w,left:b});}return D}; +var reactIs_production_min = {}; + +/** @license React v17.0.2 + * react-is.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. + */ + +var hasRequiredReactIs_production_min; + +function requireReactIs_production_min () { + if (hasRequiredReactIs_production_min) return reactIs_production_min; + hasRequiredReactIs_production_min = 1; +var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131; + if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden");} + function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=z;reactIs_production_min.Element=A;reactIs_production_min.ForwardRef=B;reactIs_production_min.Fragment=C;reactIs_production_min.Lazy=D;reactIs_production_min.Memo=E;reactIs_production_min.Portal=F;reactIs_production_min.Profiler=G;reactIs_production_min.StrictMode=H; + reactIs_production_min.Suspense=I;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return y(a)===h};reactIs_production_min.isContextProvider=function(a){return y(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return y(a)===k};reactIs_production_min.isFragment=function(a){return y(a)===d};reactIs_production_min.isLazy=function(a){return y(a)===p};reactIs_production_min.isMemo=function(a){return y(a)===n}; + reactIs_production_min.isPortal=function(a){return y(a)===c};reactIs_production_min.isProfiler=function(a){return y(a)===f};reactIs_production_min.isStrictMode=function(a){return y(a)===e};reactIs_production_min.isSuspense=function(a){return y(a)===l};reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1}; + reactIs_production_min.typeOf=y; + return reactIs_production_min; +} + +{ + requireReactIs_production_min(); +} + +let e$1=e=>"object"==typeof e&&null!=e&&1===e.nodeType,t$1=(e,t)=>(!t||"hidden"!==e)&&("visible"!==e&&"clip"!==e),n$1=(e,n)=>{if(e.clientHeight{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return !!t&&(t.clientHeightot||o>e&&r=t&&d>=n?o-e-l:r>t&&dn?r-t+i:0,i$1=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t};var o$1=(t,o)=>{var r,d,h,f,u,s;if("undefined"==typeof document)return [];let{scrollMode:a,block:c,inline:g,boundary:m,skipOverflowHiddenElements:p}=o,w="function"==typeof m?m:e=>e!==m;if(!e$1(t))throw new TypeError("Invalid target");let W=document.scrollingElement||document.documentElement,H=[],b=t;for(;e$1(b)&&w(b);){if(b=i$1(b),b===W){H.push(b);break}null!=b&&b===document.body&&n$1(b)&&!n$1(document.documentElement)||null!=b&&n$1(b,p)&&H.push(b);}let v=null!=(d=null==(r=window.visualViewport)?void 0:r.width)?d:innerWidth,y=null!=(f=null==(h=window.visualViewport)?void 0:h.height)?f:innerHeight,E=null!=(u=window.scrollX)?u:pageXOffset,M=null!=(s=window.scrollY)?s:pageYOffset,{height:x,width:I,top:C,right:R,bottom:T,left:V}=t.getBoundingClientRect(),k="start"===c||"nearest"===c?C:"end"===c?T:C+x/2,B="center"===g?V+I/2:"end"===g?R:V,D=[];for(let e=0;e=0&&V>=0&&T<=y&&R<=v&&C>=o&&T<=d&&V>=h&&R<=r)return D;let f=getComputedStyle(t),u=parseInt(f.borderLeftWidth,10),s=parseInt(f.borderTopWidth,10),m=parseInt(f.borderRightWidth,10),p=parseInt(f.borderBottomWidth,10),w=0,b=0,O="offsetWidth"in t?t.offsetWidth-t.clientWidth-u-m:0,X="offsetHeight"in t?t.offsetHeight-t.clientHeight-s-p:0,Y="offsetWidth"in t?0===t.offsetWidth?0:i/t.offsetWidth:0,L="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(W===t)w="start"===c?k:"end"===c?k-y:"nearest"===c?l$1(M,M+y,y,s,p,M+k,M+k+x,x):k-y/2,b="start"===g?B:"center"===g?B-v/2:"end"===g?B-v:l$1(E,E+v,v,u,m,E+B,E+B+I,I),w=Math.max(0,w+M),b=Math.max(0,b+E);else {w="start"===c?k-o-s:"end"===c?k-d+p+X:"nearest"===c?l$1(o,d,n,s,p+X,k,k+x,x):k-(o+n/2)+X/2,b="start"===g?B-h-u:"center"===g?B-(h+i/2)+O/2:"end"===g?B-r+m+O:l$1(h,r,i,u,m+O,B,B+I,I);let{scrollLeft:e,scrollTop:f}=t;w=Math.max(0,Math.min(f+w/L,t.scrollHeight-n/L+X)),b=Math.max(0,Math.min(e+b/Y,t.scrollWidth-i/Y+O)),k+=f-w,B+=e-b;}D.push({el:t,top:w,left:b});}return D}; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -8553,7 +8544,7 @@ function scrollIntoView(node, menuNode) { if (!node) { return; } - var actions = o(node, { + var actions = o$1(node, { boundary: menuNode, block: 'nearest', scrollMode: 'if-needed' @@ -10084,14 +10075,14 @@ const typeMap = { [useCombobox$1.stateChangeTypes.InputBlur]: 'input:blur', [useCombobox$1.stateChangeTypes.InputChange]: 'input:change', [useCombobox$1.stateChangeTypes.InputFocus]: 'input:focus', - [useCombobox$1.stateChangeTypes.InputKeyDownArrowDown]: `input:keyDown:${KEYS$2.DOWN}`, - [useCombobox$1.stateChangeTypes.InputKeyDownArrowUp]: `input:keyDown:${KEYS$2.UP}`, - [useCombobox$1.stateChangeTypes.InputKeyDownEnd]: `input:keyDown:${KEYS$2.END}`, - [useCombobox$1.stateChangeTypes.InputKeyDownEnter]: `input:keyDown:${KEYS$2.ENTER}`, - [useCombobox$1.stateChangeTypes.InputKeyDownEscape]: `input:keyDown:${KEYS$2.ESCAPE}`, - [useCombobox$1.stateChangeTypes.InputKeyDownHome]: `input:keyDown:${KEYS$2.HOME}`, - [useCombobox$1.stateChangeTypes.InputKeyDownPageDown]: `input:keyDown:${KEYS$2.PAGE_DOWN}`, - [useCombobox$1.stateChangeTypes.InputKeyDownPageUp]: `input:keyDown:${KEYS$2.PAGE_UP}`, + [useCombobox$1.stateChangeTypes.InputKeyDownArrowDown]: `input:keyDown:${KEYS$1.DOWN}`, + [useCombobox$1.stateChangeTypes.InputKeyDownArrowUp]: `input:keyDown:${KEYS$1.UP}`, + [useCombobox$1.stateChangeTypes.InputKeyDownEnd]: `input:keyDown:${KEYS$1.END}`, + [useCombobox$1.stateChangeTypes.InputKeyDownEnter]: `input:keyDown:${KEYS$1.ENTER}`, + [useCombobox$1.stateChangeTypes.InputKeyDownEscape]: `input:keyDown:${KEYS$1.ESCAPE}`, + [useCombobox$1.stateChangeTypes.InputKeyDownHome]: `input:keyDown:${KEYS$1.HOME}`, + [useCombobox$1.stateChangeTypes.InputKeyDownPageDown]: `input:keyDown:${KEYS$1.PAGE_DOWN}`, + [useCombobox$1.stateChangeTypes.InputKeyDownPageUp]: `input:keyDown:${KEYS$1.PAGE_UP}`, [useCombobox$1.stateChangeTypes.ItemClick]: 'option:click', [useCombobox$1.stateChangeTypes.ItemMouseMove]: 'option:mouseMove', [useCombobox$1.stateChangeTypes.MenuMouseLeave]: 'listbox:mouseLeave', @@ -10430,8 +10421,8 @@ const useCombobox = _ref => { }; return { ...triggerProps, - onBlur: composeEventHandlers$2(onBlur, handleBlur), - onClick: composeEventHandlers$2(onClick, handleClick), + onBlur: composeEventHandlers$1(onBlur, handleBlur), + onClick: composeEventHandlers$1(onClick, handleClick), 'aria-controls': isAutocomplete ? triggerProps['aria-controls'] : undefined, 'aria-expanded': undefined, 'aria-disabled': disabled || undefined, @@ -10449,7 +10440,7 @@ const useCombobox = _ref => { } = getFieldInputProps(); const handleKeyDown = event => { event.stopPropagation(); - if (!_isExpanded && (event.key === KEYS$2.SPACE || event.key === KEYS$2.ENTER)) { + if (!_isExpanded && (event.key === KEYS$1.SPACE || event.key === KEYS$1.ENTER)) { openListbox(); } else if (/^(?:\S| ){1}$/u.test(event.key)) { const _matchValue = `${matchValue}${event.key}`; @@ -10485,8 +10476,8 @@ const useCombobox = _ref => { 'aria-disabled': disabled || undefined, disabled: undefined, role: 'combobox', - onBlur: composeEventHandlers$2(onBlur, handleBlur), - onKeyDown: composeEventHandlers$2(onKeyDown, onDownshiftKeyDown, handleKeyDown), + onBlur: composeEventHandlers$1(onBlur, handleBlur), + onKeyDown: composeEventHandlers$1(onKeyDown, onDownshiftKeyDown, handleKeyDown), tabIndex: disabled ? -1 : 0 }; } @@ -10504,7 +10495,7 @@ const useCombobox = _ref => { const handleClick = () => !isEditable && triggerRef.current?.focus(); return { ...labelProps, - onClick: composeEventHandlers$2(onClick, handleClick), + onClick: composeEventHandlers$1(onClick, handleClick), htmlFor: isEditable ? htmlFor : undefined }; }, [getFieldLabelProps, isEditable, triggerRef]); @@ -10532,7 +10523,7 @@ const useCombobox = _ref => { role, 'aria-labelledby': ariaLabeledBy, 'aria-autocomplete': isAutocomplete ? 'list' : undefined, - onClick: composeEventHandlers$2(onClick, handleClick), + onClick: composeEventHandlers$1(onClick, handleClick), ...getFieldInputProps(), ...other }); @@ -10557,7 +10548,7 @@ const useCombobox = _ref => { disabled, readOnly: true, tabIndex: -1, - onFocus: composeEventHandlers$2(onFocus, handleFocus), + onFocus: composeEventHandlers$1(onFocus, handleFocus), ...other }; }, [getDownshiftInputProps, getFieldInputProps, inputRef, triggerRef, disabled, isAutocomplete, isEditable]); @@ -10576,11 +10567,11 @@ const useCombobox = _ref => { } }; const handleKeyDown = event => { - if (event.key === KEYS$2.BACKSPACE || event.key === KEYS$2.DELETE) { + if (event.key === KEYS$1.BACKSPACE || event.key === KEYS$1.DELETE) { setDownshiftSelection(option.value); } else { const triggerContainsTag = event.target instanceof Element && triggerRef.current?.contains(event.target); - if (triggerContainsTag && (event.key === KEYS$2.DOWN || event.key === KEYS$2.UP || event.key === KEYS$2.ESCAPE)) { + if (triggerContainsTag && (event.key === KEYS$1.DOWN || event.key === KEYS$1.UP || event.key === KEYS$1.ESCAPE)) { const inputProps = getDownshiftInputProps(); if (isEditable) { inputRef.current?.focus(); @@ -10596,9 +10587,9 @@ const useCombobox = _ref => { return { 'data-garden-container-id': 'containers.combobox.tag', 'data-garden-container-version': '1.0.0', - onClick: composeEventHandlers$2(onClick, handleClick), - onFocus: composeEventHandlers$2(onFocus, handleFocus), - onKeyDown: composeEventHandlers$2(onKeyDown, handleKeyDown), + onClick: composeEventHandlers$1(onClick, handleClick), + onFocus: composeEventHandlers$1(onFocus, handleFocus), + onKeyDown: composeEventHandlers$1(onKeyDown, handleKeyDown), ...other }; }, [triggerRef, setDownshiftSelection, getDownshiftInputProps, isEditable, _isExpanded, values, setActiveIndex, inputRef]); @@ -10655,7 +10646,7 @@ const useCombobox = _ref => { 'aria-selected': ariaSelected, id: option ? getOptionId(disabledValues.indexOf(option.value), option.disabled) : undefined, ...optionProps, - onMouseDown: composeEventHandlers$2(onMouseDown, handleMouseDown) + onMouseDown: composeEventHandlers$1(onMouseDown, handleMouseDown) }; } return getDownshiftOptionProps({ @@ -10766,7 +10757,7 @@ const StyledAvatar = styled(_ref => { children, ...props } = _ref; - return React__default.cloneElement(reactExports.Children.only(children), props); + return ReactExports.cloneElement(reactExports.Children.only(children), props); }).attrs({ 'data-garden-id': COMPONENT_ID$2$4, 'data-garden-version': '8.69.1' @@ -10893,18 +10884,18 @@ var SvgXStroke$2 = function SvgXStroke(props) { const CloseComponent = reactExports.forwardRef((props, ref) => { const ariaLabel = useText(CloseComponent, props, 'aria-label', 'Remove'); - return React__default.createElement(StyledClose$1, _extends$1$3({ + return ReactExports.createElement(StyledClose$1, _extends$1$3({ ref: ref, "aria-label": ariaLabel }, props, { type: "button", tabIndex: -1 - }), React__default.createElement(SvgXStroke$2, null)); + }), ReactExports.createElement(SvgXStroke$2, null)); }); CloseComponent.displayName = 'Tag.Close'; const Close$1 = CloseComponent; -const AvatarComponent = props => React__default.createElement(StyledAvatar, props); +const AvatarComponent = props => ReactExports.createElement(StyledAvatar, props); AvatarComponent.displayName = 'Tag.Avatar'; const Avatar = AvatarComponent; @@ -10914,7 +10905,7 @@ const TagComponent$1 = reactExports.forwardRef((_ref, ref) => { hue, ...otherProps } = _ref; - return React__default.createElement(StyledTag$1, _extends$1$3({ + return ReactExports.createElement(StyledTag$1, _extends$1$3({ ref: ref, size: size, hue: hue @@ -12539,11 +12530,11 @@ const useTooltip = function (_temp) { } = _temp2 === void 0 ? {} : _temp2; return { tabIndex, - onMouseEnter: composeEventHandlers$2(onMouseEnter, () => openTooltip()), - onMouseLeave: composeEventHandlers$2(onMouseLeave, () => closeTooltip()), - onFocus: composeEventHandlers$2(onFocus, () => openTooltip()), - onBlur: composeEventHandlers$2(onBlur, () => closeTooltip(0)), - onKeyDown: composeEventHandlers$2(onKeyDown, event => { + onMouseEnter: composeEventHandlers$3(onMouseEnter, () => openTooltip()), + onMouseLeave: composeEventHandlers$3(onMouseLeave, () => closeTooltip()), + onFocus: composeEventHandlers$3(onFocus, () => openTooltip()), + onBlur: composeEventHandlers$3(onBlur, () => closeTooltip(0)), + onKeyDown: composeEventHandlers$3(onKeyDown, event => { if (event.keyCode === KEY_CODES.ESCAPE && visibility) { closeTooltip(0); } @@ -12563,8 +12554,8 @@ const useTooltip = function (_temp) { } = _temp3 === void 0 ? {} : _temp3; return { role, - onMouseEnter: composeEventHandlers$2(onMouseEnter, () => openTooltip()), - onMouseLeave: composeEventHandlers$2(onMouseLeave, () => closeTooltip()), + onMouseEnter: composeEventHandlers$3(onMouseEnter, () => openTooltip()), + onMouseLeave: composeEventHandlers$3(onMouseLeave, () => closeTooltip()), 'aria-hidden': !visibility, id: _id, ...other @@ -17279,14 +17270,14 @@ const Tooltip = _ref => { } }, [controlledIsVisible, content]); const popperPlacement = rtl ? getRtlPopperPlacement(placement) : getPopperPlacement(placement); - const singleChild = React__default.Children.only(children); + const singleChild = ReactExports.Children.only(children); const modifiers = { preventOverflow: { boundariesElement: 'window' }, ...popperModifiers }; - return React__default.createElement(Manager, null, React__default.createElement(Reference, null, _ref2 => { + return ReactExports.createElement(Manager, null, ReactExports.createElement(Reference, null, _ref2 => { let { ref } = _ref2; @@ -17294,7 +17285,7 @@ const Tooltip = _ref => { ...singleChild.props, [refKey]: mergeRefs([ref, singleChild.ref ? singleChild.ref : null]) })); - }), React__default.createElement(Popper, { + }), ReactExports.createElement(Popper, { placement: popperPlacement, eventsEnabled: controlledIsVisible && eventsEnabled, modifiers: modifiers @@ -17323,22 +17314,22 @@ const Tooltip = _ref => { hasArrow, placement: currentPlacement, size: computedSize, - onFocus: composeEventHandlers$2(onFocus, () => { + onFocus: composeEventHandlers$3(onFocus, () => { openTooltip(); }), - onBlur: composeEventHandlers$2(onBlur, () => { + onBlur: composeEventHandlers$3(onBlur, () => { closeTooltip(0); }), 'aria-hidden': !controlledIsVisible, type, ...otherTooltipProps }; - const tooltip = React__default.createElement(StyledTooltipWrapper, { + const tooltip = ReactExports.createElement(StyledTooltipWrapper, { ref: controlledIsVisible ? ref : null, style: style, zIndex: zIndex, "aria-hidden": !controlledIsVisible - }, React__default.createElement(StyledTooltip, getTooltipProps(tooltipProps), content)); + }, ReactExports.createElement(StyledTooltip, getTooltipProps(tooltipProps), content)); if (appendToNode) { return reactDomExports.createPortal(tooltip, appendToNode); } @@ -17385,12 +17376,12 @@ function _extends$9() { return _extends$9.apply(this, arguments); } -const Paragraph$1 = reactExports.forwardRef((props, ref) => React__default.createElement(StyledParagraph$1, _extends$9({ +const Paragraph$1 = reactExports.forwardRef((props, ref) => ReactExports.createElement(StyledParagraph$1, _extends$9({ ref: ref }, props))); Paragraph$1.displayName = 'Paragraph'; -const Title$1 = reactExports.forwardRef((props, ref) => React__default.createElement(StyledTitle$1, _extends$9({ +const Title$1 = reactExports.forwardRef((props, ref) => ReactExports.createElement(StyledTitle$1, _extends$9({ ref: ref }, props))); Title$1.displayName = 'Title'; @@ -18022,7 +18013,7 @@ const Listbox = reactExports.forwardRef((_ref, ref) => { } }, [ children, update]); - const Node = React__default.createElement(StyledFloating, { + const Node = ReactExports.createElement(StyledFloating, { "data-garden-animate": isVisible ? 'true' : 'false', isHidden: !isExpanded, position: placement === 'bottom-start' ? 'bottom' : 'top', @@ -18032,7 +18023,7 @@ const Listbox = reactExports.forwardRef((_ref, ref) => { }, zIndex: zIndex, ref: floatingRef - }, React__default.createElement(StyledListbox, _extends$5$1({ + }, ReactExports.createElement(StyledListbox, _extends$5$1({ isCompact: isCompact, maxHeight: maxHeight, minHeight: minHeight, @@ -18108,21 +18099,21 @@ const TagComponent = reactExports.forwardRef((_ref, ref) => { const theme = reactExports.useContext(Be) || DEFAULT_THEME; const doc = useDocument(theme); const handleClick = () => removeSelection(option.value); - return React__default.createElement(StyledTag, _extends$5$1({ + return ReactExports.createElement(StyledTag, _extends$5$1({ "aria-disabled": option.disabled, tabIndex: option.disabled ? undefined : 0 }, tagProps, props, { size: isCompact ? 'medium' : 'large', ref: ref - }), children || React__default.createElement("span", null, text), !option.disabled && (removeLabel ? - React__default.createElement(Tooltip, { + }), children || ReactExports.createElement("span", null, text), !option.disabled && (removeLabel ? + ReactExports.createElement(Tooltip, { appendToNode: doc?.body, content: removeLabel, zIndex: tooltipZIndex - }, React__default.createElement(StyledTag.Close, { + }, ReactExports.createElement(StyledTag.Close, { "aria-label": removeLabel, onClick: handleClick - })) : React__default.createElement(StyledTag.Close, { + })) : ReactExports.createElement(StyledTag.Close, { onClick: handleClick }))); }); @@ -18294,11 +18285,11 @@ const Combobox = reactExports.forwardRef((_ref, ref) => { } = _ref2; const [isFocused, setIsFocused] = reactExports.useState(hasFocus.current); const value = selectedOptions.length - maxTags; - return React__default.createElement(React__default.Fragment, null, selectedOptions.map((option, index) => { + return ReactExports.createElement(ReactExports.Fragment, null, selectedOptions.map((option, index) => { const key = toString(option); const disabled = isDisabled || option.disabled; const hidden = !isFocused && index >= maxTags; - return React__default.createElement(Tag, _extends$5$1({ + return ReactExports.createElement(Tag, _extends$5$1({ key: key, hidden: hidden, onFocus: () => setIsFocused(true), @@ -18308,7 +18299,7 @@ const Combobox = reactExports.forwardRef((_ref, ref) => { }, tooltipZIndex: listboxZIndex ? listboxZIndex + 1 : undefined }, optionTagProps[key])); - }), !isFocused && selectedOptions.length > maxTags && React__default.createElement(StyledTagsButton, { + }), !isFocused && selectedOptions.length > maxTags && ReactExports.createElement(StyledTagsButton, { disabled: isDisabled, isCompact: isCompact, onClick: () => isEditable && inputRef.current?.focus(), @@ -18317,18 +18308,18 @@ const Combobox = reactExports.forwardRef((_ref, ref) => { ref: tagsButtonRef }, renderExpandTags ? renderExpandTags(value) : expandTags?.replace('{{value}}', value.toString()))); }; - return React__default.createElement(ComboboxContext.Provider, { + return ReactExports.createElement(ComboboxContext.Provider, { value: contextValue - }, React__default.createElement(StyledCombobox, _extends$5$1({ + }, ReactExports.createElement(StyledCombobox, _extends$5$1({ isCompact: isCompact }, props, { ref: ref - }), React__default.createElement(StyledTrigger, triggerProps, React__default.createElement(StyledContainer, null, startIcon && React__default.createElement(StyledInputIcon, { + }), ReactExports.createElement(StyledTrigger, triggerProps, ReactExports.createElement(StyledContainer, null, startIcon && ReactExports.createElement(StyledInputIcon, { isLabelHovered: isLabelHovered, isCompact: isCompact - }, startIcon), React__default.createElement(StyledInputGroup, null, isMultiselectable && Array.isArray(selection) && React__default.createElement(Tags, { + }, startIcon), ReactExports.createElement(StyledInputGroup, null, isMultiselectable && Array.isArray(selection) && ReactExports.createElement(Tags, { selectedOptions: selection - }), !(isEditable && hasFocus.current) && React__default.createElement(StyledValue, { + }), !(isEditable && hasFocus.current) && ReactExports.createElement(StyledValue, { isBare: isBare, isCompact: isCompact, isDisabled: isDisabled, @@ -18344,12 +18335,12 @@ const Combobox = reactExports.forwardRef((_ref, ref) => { }, renderValue ? renderValue({ selection, inputValue - }) : inputValue || placeholder), React__default.createElement(StyledInput, inputProps)), (hasChevron || endIcon) && React__default.createElement(StyledInputIcon, { + }) : inputValue || placeholder), ReactExports.createElement(StyledInput, inputProps)), (hasChevron || endIcon) && ReactExports.createElement(StyledInputIcon, { isCompact: isCompact, isEnd: true, isLabelHovered: isLabelHovered, isRotated: hasChevron && isExpanded - }, hasChevron ? React__default.createElement(SvgChevronDownStroke$1, null) : endIcon))), React__default.createElement(Listbox, _extends$5$1({ + }, hasChevron ? ReactExports.createElement(SvgChevronDownStroke$1, null) : endIcon))), ReactExports.createElement(Listbox, _extends$5$1({ appendToNode: listboxAppendToNode, isCompact: isCompact, isExpanded: isExpanded, @@ -18410,9 +18401,9 @@ const Field = reactExports.forwardRef((props, ref) => { hasMessage, setHasMessage }), [labelProps, setLabelProps, hasHint, setHasHint, hasMessage, setHasMessage]); - return React__default.createElement(FieldContext.Provider, { + return ReactExports.createElement(FieldContext.Provider, { value: contextValue - }, React__default.createElement(StyledField, _extends$5$1({}, props, { + }, ReactExports.createElement(StyledField, _extends$5$1({}, props, { ref: ref }))); }); @@ -18426,7 +18417,7 @@ const Hint = reactExports.forwardRef((props, ref) => { setHasHint(true); return () => setHasHint(false); }, [setHasHint]); - return React__default.createElement(StyledHint, _extends$5$1({}, props, { + return ReactExports.createElement(StyledHint, _extends$5$1({}, props, { ref: ref })); }); @@ -18442,10 +18433,10 @@ const Label = reactExports.forwardRef((_ref, ref) => { const { labelProps } = useFieldContext(); - return React__default.createElement(StyledLabel, _extends$5$1({}, labelProps, { - onClick: composeEventHandlers$2(onClick, labelProps?.onClick), - onMouseEnter: composeEventHandlers$2(onMouseEnter, labelProps?.onMouseEnter), - onMouseLeave: composeEventHandlers$2(onMouseLeave, labelProps?.onMouseLeave) + return ReactExports.createElement(StyledLabel, _extends$5$1({}, labelProps, { + onClick: composeEventHandlers$3(onClick, labelProps?.onClick), + onMouseEnter: composeEventHandlers$3(onMouseEnter, labelProps?.onMouseEnter), + onMouseLeave: composeEventHandlers$3(onMouseLeave, labelProps?.onMouseLeave) }, props, { ref: ref })); @@ -18464,7 +18455,7 @@ const Message = reactExports.forwardRef((props, ref) => { setHasMessage(true); return () => setHasMessage(false); }, [setHasMessage]); - return React__default.createElement(StyledMessage, _extends$5$1({}, props, { + return ReactExports.createElement(StyledMessage, _extends$5$1({}, props, { ref: ref })); }); @@ -18557,7 +18548,7 @@ const OptionMetaComponent = reactExports.forwardRef((props, ref) => { const { isDisabled } = useOptionContext(); - return React__default.createElement(StyledOptionMeta, _extends$5$1({ + return ReactExports.createElement(StyledOptionMeta, _extends$5$1({ isDisabled: isDisabled }, props, { ref: ref @@ -18601,13 +18592,13 @@ const OptionComponent = reactExports.forwardRef((_ref, ref) => { const renderActionIcon = iconType => { switch (iconType) { case 'add': - return React__default.createElement(SvgPlusStroke, null); + return ReactExports.createElement(SvgPlusStroke, null); case 'next': - return React__default.createElement(SvgChevronRightStroke, null); + return ReactExports.createElement(SvgChevronRightStroke, null); case 'previous': - return React__default.createElement(SvgChevronLeftStroke, null); + return ReactExports.createElement(SvgChevronLeftStroke, null); default: - return React__default.createElement(SvgCheckLgStroke, null); + return ReactExports.createElement(SvgCheckLgStroke, null); } }; const option = toOption({ @@ -18620,16 +18611,16 @@ const OptionComponent = reactExports.forwardRef((_ref, ref) => { option, ref: mergeRefs([optionRef, ref]) }); - return React__default.createElement(OptionContext.Provider, { + return ReactExports.createElement(OptionContext.Provider, { value: contextValue - }, React__default.createElement(StyledOption, _extends$5$1({ + }, ReactExports.createElement(StyledOption, _extends$5$1({ isActive: isActive, isCompact: isCompact, $type: type - }, props, optionProps), React__default.createElement(StyledOptionTypeIcon, { + }, props, optionProps), ReactExports.createElement(StyledOptionTypeIcon, { isCompact: isCompact, type: type - }, renderActionIcon(type)), icon && React__default.createElement(StyledOptionIcon, null, icon), React__default.createElement(StyledOptionContent, null, children || label || toString({ + }, renderActionIcon(type)), icon && ReactExports.createElement(StyledOptionIcon, null, icon), ReactExports.createElement(StyledOptionContent, null, children || label || toString({ value })))); }); @@ -18667,23 +18658,23 @@ const OptGroup = reactExports.forwardRef((_ref, ref) => { const optGroupProps = getOptGroupProps({ 'aria-label': groupAriaLabel || label }); - return React__default.createElement(StyledOption, _extends$5$1({ + return ReactExports.createElement(StyledOption, _extends$5$1({ isCompact: isCompact, $type: "group", - onMouseDown: composeEventHandlers$2(onMouseDown, handleMouseDown), + onMouseDown: composeEventHandlers$3(onMouseDown, handleMouseDown), role: "none" }, props, { ref: ref - }), React__default.createElement(StyledOptionContent, null, (content || label) && React__default.createElement(StyledOption, { + }), ReactExports.createElement(StyledOptionContent, null, (content || label) && ReactExports.createElement(StyledOption, { as: "div", isCompact: isCompact, $type: "header" - }, icon && React__default.createElement(StyledOptionTypeIcon, { + }, icon && ReactExports.createElement(StyledOptionTypeIcon, { isCompact: isCompact, type: "header" - }, icon), content || label), React__default.createElement(StyledOptGroup, _extends$5$1({ + }, icon), content || label), ReactExports.createElement(StyledOptGroup, _extends$5$1({ isCompact: isCompact - }, optGroupProps), React__default.createElement(StyledSeparator, { + }, optGroupProps), ReactExports.createElement(StyledSeparator, { role: "none" }), children))); }); @@ -19062,7 +19053,7 @@ const StyledIcon$1 = styled(_ref => { theme, ...props } = _ref; - return React__default.cloneElement(reactExports.Children.only(children), props); + return ReactExports.cloneElement(reactExports.Children.only(children), props); }).attrs({ 'data-garden-id': COMPONENT_ID$4$1, 'data-garden-version': '8.69.5' @@ -19296,13 +19287,13 @@ const useSplitButtonContext = () => { return reactExports.useContext(SplitButtonContext); }; -const StartIconComponent = props => React__default.createElement(StyledIcon$1, _extends$2$1({ +const StartIconComponent = props => ReactExports.createElement(StyledIcon$1, _extends$2$1({ position: "start" }, props)); StartIconComponent.displayName = 'Button.StartIcon'; const StartIcon = StartIconComponent; -const EndIconComponent = props => React__default.createElement(StyledIcon$1, _extends$2$1({ +const EndIconComponent = props => ReactExports.createElement(StyledIcon$1, _extends$2$1({ position: "end" }, props)); EndIconComponent.displayName = 'Button.EndIcon'; @@ -19327,7 +19318,7 @@ const ButtonComponent = reactExports.forwardRef((props, ref) => { computedRef = mergeRefs([ computedProps.ref, ref]); } - return React__default.createElement(StyledButton, _extends$2$1({}, computedProps, { + return ReactExports.createElement(StyledButton, _extends$2$1({}, computedProps, { ref: computedRef })); }); @@ -19372,10 +19363,10 @@ const Anchor = reactExports.forwardRef((_ref, ref) => { noIconLabel: 'true' }; const iconAriaLabel = useText(Anchor, checkProps, isExternal ? 'externalIconLabel' : 'noIconLabel', '(opens in a new tab)'); - return React__default.createElement(StyledAnchor, _extends$2$1({ + return ReactExports.createElement(StyledAnchor, _extends$2$1({ ref: ref }, anchorProps), children, isExternal && - React__default.createElement(StyledExternalIcon, { + ReactExports.createElement(StyledExternalIcon, { role: "img", "aria-label": iconAriaLabel, "aria-hidden": undefined @@ -19428,9 +19419,9 @@ const ButtonGroup = reactExports.forwardRef((_ref, ref) => { ...props }) }), [selectedItem, getElementProps]); - return React__default.createElement(ButtonGroupContext.Provider, { + return ReactExports.createElement(ButtonGroupContext.Provider, { value: contextValue - }, React__default.createElement(StyledButtonGroup, _extends$2$1({ + }, ReactExports.createElement(StyledButtonGroup, _extends$2$1({ ref: ref }, getGroupProps(otherProps)), children)); }); @@ -19447,11 +19438,11 @@ const IconButton = reactExports.forwardRef((_ref, ref) => { ...otherProps } = _ref; const focusInset = useSplitButtonContext(); - return React__default.createElement(StyledIconButton, _extends$2$1({ + return ReactExports.createElement(StyledIconButton, _extends$2$1({ ref: ref }, otherProps, { focusInset: otherProps.focusInset || focusInset - }), React__default.createElement(StyledIcon$1, { + }), ReactExports.createElement(StyledIcon$1, { isRotated: isRotated }, children)); }); @@ -19492,9 +19483,9 @@ const ChevronButton = reactExports.forwardRef((_ref, ref) => { let { ...buttonProps } = _ref; - return React__default.createElement(IconButton, _extends$2$1({ + return ReactExports.createElement(IconButton, _extends$2$1({ ref: ref - }, buttonProps), React__default.createElement(SvgChevronDownStroke, null)); + }, buttonProps), ReactExports.createElement(SvgChevronDownStroke, null)); }); ChevronButton.displayName = 'ChevronButton'; ChevronButton.propTypes = IconButton.propTypes; @@ -19509,9 +19500,9 @@ const SplitButton = reactExports.forwardRef((_ref, ref) => { children, ...other } = _ref; - return React__default.createElement(SplitButtonContext.Provider, { + return ReactExports.createElement(SplitButtonContext.Provider, { value: true - }, React__default.createElement(StyledButtonGroup, _extends$2$1({ + }, ReactExports.createElement(StyledButtonGroup, _extends$2$1({ ref: ref }, other), children)); }); @@ -19522,7 +19513,7 @@ const ToggleButton = reactExports.forwardRef((_ref, ref) => { isPressed, ...otherProps } = _ref; - return React__default.createElement(Button, _extends$2$1({ + return ReactExports.createElement(Button, _extends$2$1({ "aria-pressed": isPressed, ref: ref }, otherProps)); @@ -19541,7 +19532,7 @@ const ToggleIconButton = reactExports.forwardRef((_ref, ref) => { isPressed, ...otherProps } = _ref; - return React__default.createElement(IconButton, _extends$2$1({ + return ReactExports.createElement(IconButton, _extends$2$1({ "aria-pressed": isPressed, ref: ref }, otherProps)); @@ -19744,7 +19735,7 @@ const StyledIcon = styled(_ref => { children, ...props } = _ref; - return React__default.cloneElement(reactExports.Children.only(children), props); + return ReactExports.cloneElement(reactExports.Children.only(children), props); }).withConfig({ displayName: "StyledIcon", componentId: "sc-msklws-0" @@ -19972,7 +19963,7 @@ const StyledGlobalAlertIcon = styled(_ref => { children, ...props } = _ref; - return React__default.cloneElement(reactExports.Children.only(children), props); + return ReactExports.cloneElement(reactExports.Children.only(children), props); }).attrs({ 'data-garden-id': COMPONENT_ID$1, 'data-garden-version': '8.69.5' @@ -20133,17 +20124,17 @@ const useNotificationsContext = () => { return reactExports.useContext(NotificationsContext); }; -const Alert = React__default.forwardRef((props, ref) => { +const Alert = ReactExports.forwardRef((props, ref) => { const hue = validationHues[props.type]; const Icon = validationIcons[props.type]; - return React__default.createElement(NotificationsContext.Provider, { + return ReactExports.createElement(NotificationsContext.Provider, { value: hue - }, React__default.createElement(StyledAlert, _extends$6({ + }, ReactExports.createElement(StyledAlert, _extends$6({ ref: ref, hue: hue - }, props), React__default.createElement(StyledIcon, { + }, props), ReactExports.createElement(StyledIcon, { hue: hue - }, React__default.createElement(Icon, null)), props.children)); + }, ReactExports.createElement(Icon, null)), props.children)); }); Alert.displayName = 'Alert'; Alert.propTypes = { @@ -20157,22 +20148,22 @@ const Notification = reactExports.forwardRef((_ref, ref) => { } = _ref; const Icon = props.type ? validationIcons[props.type] : SvgInfoStroke; const hue = props.type && validationHues[props.type]; - return React__default.createElement(StyledNotification, _extends$6({ + return ReactExports.createElement(StyledNotification, _extends$6({ ref: ref, type: props.type, isFloating: true }, props, { role: role === undefined ? 'status' : role - }), props.type && React__default.createElement(StyledIcon, { + }), props.type && ReactExports.createElement(StyledIcon, { hue: hue - }, React__default.createElement(Icon, null)), props.children); + }, ReactExports.createElement(Icon, null)), props.children); }); Notification.displayName = 'Notification'; Notification.propTypes = { type: PropTypes.oneOf(TYPE) }; -const Well = React__default.forwardRef((props, ref) => React__default.createElement(StyledWell, _extends$6({ +const Well = ReactExports.forwardRef((props, ref) => ReactExports.createElement(StyledWell, _extends$6({ ref: ref }, props))); Well.displayName = 'Well'; @@ -20198,23 +20189,23 @@ var SvgXStroke$1 = function SvgXStroke(props) { }))); }; -const Close = React__default.forwardRef((props, ref) => { +const Close = ReactExports.forwardRef((props, ref) => { const ariaLabel = useText(Close, props, 'aria-label', 'Close'); const hue = useNotificationsContext(); - return React__default.createElement(StyledClose, _extends$6({ + return ReactExports.createElement(StyledClose, _extends$6({ ref: ref, hue: hue, "aria-label": ariaLabel - }, props), React__default.createElement(SvgXStroke$1, null)); + }, props), ReactExports.createElement(SvgXStroke$1, null)); }); Close.displayName = 'Close'; -const Paragraph = React__default.forwardRef((props, ref) => React__default.createElement(StyledParagraph, _extends$6({ +const Paragraph = ReactExports.forwardRef((props, ref) => ReactExports.createElement(StyledParagraph, _extends$6({ ref: ref }, props))); Paragraph.displayName = 'Paragraph'; -const Title = React__default.forwardRef((props, ref) => React__default.createElement(StyledTitle, _extends$6({ +const Title = ReactExports.forwardRef((props, ref) => ReactExports.createElement(StyledTitle, _extends$6({ ref: ref }, props))); Title.displayName = 'Title'; @@ -20299,7 +20290,7 @@ const GlobalAlertButton = reactExports.forwardRef((_ref, ref) => { const { type } = useGlobalAlertContext(); - return React__default.createElement(StyledGlobalAlertButton, _extends$6({ + return ReactExports.createElement(StyledGlobalAlertButton, _extends$6({ ref: ref, alertType: type }, props, { @@ -20334,10 +20325,10 @@ const GlobalAlertClose = reactExports.forwardRef((props, ref) => { type } = useGlobalAlertContext(); const label = useText(GlobalAlertClose, props, 'aria-label', 'Close'); - return React__default.createElement(StyledGlobalAlertClose, _extends$6({ + return ReactExports.createElement(StyledGlobalAlertClose, _extends$6({ ref: ref, alertType: type - }, props), React__default.createElement(SvgXStroke, { + }, props), ReactExports.createElement(SvgXStroke, { role: "img", "aria-label": label })); @@ -20345,7 +20336,7 @@ const GlobalAlertClose = reactExports.forwardRef((props, ref) => { GlobalAlertClose.displayName = 'GlobalAlert.Close'; const GlobalAlertContent = reactExports.forwardRef((props, ref) => { - return React__default.createElement(StyledGlobalAlertContent, _extends$6({ + return ReactExports.createElement(StyledGlobalAlertContent, _extends$6({ ref: ref }, props)); }); @@ -20355,7 +20346,7 @@ const GlobalAlertTitle = reactExports.forwardRef((props, ref) => { const { type } = useGlobalAlertContext(); - return React__default.createElement(StyledGlobalAlertTitle, _extends$6({ + return ReactExports.createElement(StyledGlobalAlertTitle, _extends$6({ alertType: type, ref: ref }, props)); @@ -20370,19 +20361,19 @@ const GlobalAlertComponent = reactExports.forwardRef((_ref, ref) => { type, ...props } = _ref; - return React__default.createElement(GlobalAlertContext.Provider, { + return ReactExports.createElement(GlobalAlertContext.Provider, { value: reactExports.useMemo(() => ({ type }), [type]) - }, React__default.createElement(StyledGlobalAlert, _extends$6({ + }, ReactExports.createElement(StyledGlobalAlert, _extends$6({ ref: ref, role: "status", alertType: type }, props), { - success: React__default.createElement(StyledGlobalAlertIcon, null, React__default.createElement(SvgCheckCircleStroke, null)), - error: React__default.createElement(StyledGlobalAlertIcon, null, React__default.createElement(SvgAlertErrorStroke, null)), - warning: React__default.createElement(StyledGlobalAlertIcon, null, React__default.createElement(SvgAlertWarningStroke, null)), - info: React__default.createElement(StyledGlobalAlertIcon, null, React__default.createElement(SvgInfoStroke, null)) + success: ReactExports.createElement(StyledGlobalAlertIcon, null, ReactExports.createElement(SvgCheckCircleStroke, null)), + error: ReactExports.createElement(StyledGlobalAlertIcon, null, ReactExports.createElement(SvgAlertErrorStroke, null)), + warning: ReactExports.createElement(StyledGlobalAlertIcon, null, ReactExports.createElement(SvgAlertWarningStroke, null)), + info: ReactExports.createElement(StyledGlobalAlertIcon, null, ReactExports.createElement(SvgInfoStroke, null)) }[type], props.children)); }); GlobalAlertComponent.displayName = 'GlobalAlert'; @@ -20395,4 +20386,60 @@ GlobalAlert.propTypes = { type: PropTypes.oneOf(TYPE).isRequired }; -export { Alert as A, Button as B, Combobox as C, DEFAULT_THEME as D, Field$1 as F, Hint$1 as H, Input as I, Label$1 as L, Message$1 as M, Option as O, Textarea as T, Field as a, Label as b, Hint as c, Message as d, reactDomExports as e, ThemeProvider as f, jsxRuntimeExports as j, reactExports as r, styled as s }; +const e=Symbol(),t=Symbol(),r="a",n="w";let o=(e,t)=>new Proxy(e,t);const s=Object.getPrototypeOf,c=new WeakMap,l=e=>e&&(c.has(e)?c.get(e):s(e)===Object.prototype||s(e)===Array.prototype),f=e=>"object"==typeof e&&null!==e,i=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(e=>{e.configurable=!0;}),Object.create(s(e),t)},u=e=>e[t]||e,a=(s,c,f,p)=>{if(!l(s))return s;let g=p&&p.get(s);if(!g){const e=u(s);g=(e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(e=>!e.configurable&&!e.writable))(e)?[e,i(e)]:[e],null==p||p.set(s,g);}const[y,h]=g;let w=f&&f.get(y);return w&&w[1].f===!!h||(w=((o,s)=>{const c={f:s};let l=!1;const f=(e,t)=>{if(!l){let s=c[r].get(o);if(s||(s={},c[r].set(o,s)),e===n)s[n]=!0;else {let r=s[e];r||(r=new Set,s[e]=r),r.add(t);}}},i={get:(e,n)=>n===t?o:(f("k",n),a(Reflect.get(e,n),c[r],c.c,c.t)),has:(t,n)=>n===e?(l=!0,c[r].delete(o),!0):(f("h",n),Reflect.has(t,n)),getOwnPropertyDescriptor:(e,t)=>(f("o",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(f(n),Reflect.ownKeys(e))};return s&&(i.set=i.deleteProperty=()=>!1),[i,c]})(y,!!h),w[1].p=o(h||y,w[0]),f&&f.set(y,w)),w[1][r]=c,w[1].c=f,w[1].t=p,w[1].p},p=(e,t,r,o)=>{if(Object.is(e,t))return !1;if(!f(e)||!f(t))return !0;const s=r.get(u(e));if(!s)return !0;if(o){const r=o.get(e);if(r&&r.n===t)return r.g;o.set(e,{n:t,g:!1});}let c=null;try{for(const r of s.h||[])if(c=Reflect.has(e,r)!==Reflect.has(t,r),c)return c;if(!0===s[n]){if(c=((e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((e,t)=>e!==n[t])})(e,t),c)return c}else for(const r of s.o||[])if(c=!!Reflect.getOwnPropertyDescriptor(e,r)!=!!Reflect.getOwnPropertyDescriptor(t,r),c)return c;for(const n of s.k||[])if(c=p(e[n],t[n],r,o),c)return c;return null===c&&(c=!0),c}finally{o&&o.set(e,{n:t,g:c});}},y=e=>l(e)&&e[t]||null,h=(e,t=!0)=>{c.set(e,t);}; + +function set(obj, key, val) { + if (typeof val.value === 'object') val.value = klona(val.value); + if (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === '__proto__') { + Object.defineProperty(obj, key, val); + } else obj[key] = val.value; +} + +function klona(x) { + if (typeof x !== 'object') return x; + + var i=0, k, list, tmp, str=Object.prototype.toString.call(x); + + if (str === '[object Object]') { + tmp = Object.create(x.__proto__ || null); + } else if (str === '[object Array]') { + tmp = Array(x.length); + } else if (str === '[object Set]') { + tmp = new Set; + x.forEach(function (val) { + tmp.add(klona(val)); + }); + } else if (str === '[object Map]') { + tmp = new Map; + x.forEach(function (val, key) { + tmp.set(klona(key), klona(val)); + }); + } else if (str === '[object Date]') { + tmp = new Date(+x); + } else if (str === '[object RegExp]') { + tmp = new RegExp(x.source, x.flags); + } else if (str === '[object DataView]') { + tmp = new x.constructor( klona(x.buffer) ); + } else if (str === '[object ArrayBuffer]') { + tmp = x.slice(0); + } else if (str.slice(-6) === 'Array]') { + // ArrayBuffer.isView(x) + // ~> `new` bcuz `Buffer.slice` => ref + tmp = new x.constructor(x); + } + + if (tmp) { + for (list=Object.getOwnPropertySymbols(x); i < list.length; i++) { + set(tmp, list[i], Object.getOwnPropertyDescriptor(x, list[i])); + } + + for (i=0, list=Object.getOwnPropertyNames(x); i < list.length; i++) { + if (Object.hasOwnProperty.call(tmp, k=list[i]) && tmp[k] === x[k]) continue; + set(tmp, k, Object.getOwnPropertyDescriptor(x, k)); + } + } + + return tmp || x; +} + +export { Alert as A, Button as B, Combobox as C, DEFAULT_THEME as D, Field$1 as F, Hint$1 as H, Input as I, Label$1 as L, Message$1 as M, Option as O, ReactExports as R, Textarea as T, Field as a, Label as b, Hint as c, Message as d, reactDomExports as e, ThemeProvider as f, a as g, h, Tag$1 as i, jsxRuntimeExports as j, klona as k, focusStyles as l, FauxInput as m, p, reactExports as r, styled as s, y }; diff --git a/package.json b/package.json index 8fe82f4df..7b355fdb2 100644 --- a/package.json +++ b/package.json @@ -13,15 +13,18 @@ "zcli": "zcli" }, "dependencies": { + "@zag-js/react": "^0.15.0", + "@zag-js/tags-input": "^0.15.0", "@zendeskgarden/react-buttons": "^8.69.1", "@zendeskgarden/react-dropdowns.next": "^8.69.1", "@zendeskgarden/react-forms": "^8.69.1", "@zendeskgarden/react-notifications": "^8.69.1", + "@zendeskgarden/react-tags": "^8.69.1", "@zendeskgarden/react-theming": "^8.69.1", "node-fetch": "2.6.9", - "react": "^17.0.2", - "react-dom": "^17.0.2", - "react-is": "^17.0.2", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-is": "^18.2.0", "styled-components": "^5.3.11" }, "devDependencies": { @@ -34,14 +37,14 @@ "@semantic-release/changelog": "6.0.2", "@semantic-release/exec": "6.0.3", "@semantic-release/git": "10.0.1", - "@typescript-eslint/eslint-plugin": "^6.1.0", - "@typescript-eslint/parser": "^6.1.0", "@testing-library/dom": "^9.3.1", "@testing-library/jest-dom": "^5.16.5", "@testing-library/user-event": "^14.4.3", - "@types/react": "^17.0.62", - "@types/react-dom": "^17.0.20", + "@types/react": "^18.2.20", + "@types/react-dom": "^18.2.7", "@types/styled-components": "^5.1.26", + "@typescript-eslint/eslint-plugin": "^6.1.0", + "@typescript-eslint/parser": "^6.1.0", "@zendesk/zcli": "1.0.0-beta.38", "concurrently": "8.0.1", "dotenv": "16.0.3", @@ -69,9 +72,9 @@ "wait-on": "7.0.1" }, "resolutions": { - "@types/react": "^17.0.62" + "@types/react": "^18.x" }, - "commitlint": { + "commitlint": { "extends": [ "@commitlint/config-conventional" ] diff --git a/rollup.config.mjs b/rollup.config.mjs index 813a16d88..72bc04110 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -28,7 +28,7 @@ export default defineConfig([ dir: "assets", format: "es", manualChunks: (id) => { - if (id.includes("node_modules")) { + if (id.includes("node_modules") && !id.includes("@zag-js")) { return "vendor"; } }, diff --git a/src/modules/new-request-form/NewRequestForm.tsx b/src/modules/new-request-form/NewRequestForm.tsx index 981db35c9..27ba85285 100644 --- a/src/modules/new-request-form/NewRequestForm.tsx +++ b/src/modules/new-request-form/NewRequestForm.tsx @@ -7,6 +7,7 @@ import { Button } from "@zendeskgarden/react-buttons"; import styled from "styled-components"; import { Alert } from "@zendeskgarden/react-notifications"; import { useSubmitHandler } from "./useSubmitHandler"; +import { Suspense, lazy } from "react"; export interface NewRequestFormProps { ticketForms: TicketForm[]; @@ -23,6 +24,8 @@ const Footer = styled.div` margin-top: ${(props) => props.theme.space.md}; `; +const CcField = lazy(() => import("./fields/CcField")); + export function NewRequestForm({ ticketForms, requestForm, @@ -67,6 +70,12 @@ export function NewRequestForm({ case "organization_id": case "tickettype": return ; + case "cc_email": + return ( + }> + + + ); default: return <>; } diff --git a/src/modules/new-request-form/fields/CcField.tsx b/src/modules/new-request-form/fields/CcField.tsx new file mode 100644 index 000000000..8f8301369 --- /dev/null +++ b/src/modules/new-request-form/fields/CcField.tsx @@ -0,0 +1,96 @@ +import type { Field } from "../data-types"; +import { + FauxInput, + Field as GardenField, + Hint, + Input, + Label, + Message, +} from "@zendeskgarden/react-forms"; +import * as tagsInput from "@zag-js/tags-input"; +import { useMachine, normalizeProps } from "@zag-js/react"; +import styled from "styled-components"; +import type { ComponentProps } from "react"; +import { Tag } from "@zendeskgarden/react-tags"; +import { focusStyles } from "@zendeskgarden/react-theming"; + +interface CcFieldProps { + field: Field; +} + +const EMAIL_REGEX = + /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + +export default function CcField({ field }: CcFieldProps): JSX.Element { + const { label, value, name, error, description, id } = field; + const initialValue = value + ? value.split(",").map((email) => email.trim()) + : []; + const [state, send] = useMachine( + tagsInput.machine({ + id, + value: initialValue, + allowEditTag: false, + }) + ); + + const api = tagsInput.connect(state, send, normalizeProps); + + return ( + + + {description && {description}} + + {api.value.map((email, index) => ( + + + {email} + )} + /> + + + + ))} + )} + /> + + {error && {error}} + {api.value.map((email) => ( + + ))} + + ); +} + +const Control = styled(FauxInput)` + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: ${(p) => p.theme.space.sm}; +`; + +const StyledInput = styled(Input)` + width: revert; + flex: 1; +`; + +const StyledTag = styled(Tag)` + ${(props) => + focusStyles({ + theme: props.theme, + shadowWidth: "sm", + selector: "&[data-highlighted]", + })} +`; diff --git a/templates/document_head.hbs b/templates/document_head.hbs index 3acae35a3..42a278b88 100644 --- a/templates/document_head.hbs +++ b/templates/document_head.hbs @@ -7,7 +7,8 @@ "imports": { "new-request-form": "{{asset 'new-request-form.js'}}", "shared": "{{asset 'shared.js'}}", - "vendor": "{{asset 'vendor.js'}}" + "vendor": "{{asset 'vendor.js'}}", + "CcField": "{{asset 'CcField.js'}}" } } diff --git a/yarn.lock b/yarn.lock index a139250bb..15a84621c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1885,17 +1885,17 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== -"@types/react-dom@^17.0.20": - version "17.0.20" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.20.tgz#e0c8901469d732b36d8473b40b679ad899da1b53" - integrity sha512-4pzIjSxDueZZ90F52mU3aPoogkHIoSIDG+oQ+wQK7Cy2B9S+MvOqY0uEA/qawKz381qrEDkvpwyt8Bm31I8sbA== +"@types/react-dom@^18.2.7": + version "18.2.7" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.7.tgz#67222a08c0a6ae0a0da33c3532348277c70abb63" + integrity sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA== dependencies: - "@types/react" "^17" + "@types/react" "*" -"@types/react@*", "@types/react@^17", "@types/react@^17.0.62": - version "17.0.62" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.62.tgz#2efe8ddf8533500ec44b1334dd1a97caa2f860e3" - integrity sha512-eANCyz9DG8p/Vdhr0ZKST8JV12PhH2ACCDYlFw6DIO+D+ca+uP4jtEDEpVqXZrh/uZdXQGwk7whJa3ah5DtyLw== +"@types/react@*", "@types/react@^18.2.20", "@types/react@^18.x": + version "18.2.20" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.20.tgz#1605557a83df5c8a2cc4eeb743b3dfc0eb6aaeb2" + integrity sha512-WKNtmsLWJM/3D5mG4U84cysVY31ivmyw85dE84fOCk5Hx78wezB/XEjVPWl2JTZ5FkEeaTJf+VgUAUn3PE7Isw== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -2109,6 +2109,132 @@ "@typescript-eslint/types" "6.1.0" eslint-visitor-keys "^3.4.1" +"@zag-js/anatomy@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/anatomy/-/anatomy-0.15.0.tgz#c32b3bf2050f81ed9eace140542db43a565e3454" + integrity sha512-+lmu/JVQ6Q5M9Tmbt1sXVkp3CtP10JYOo/PU2L6w6mXpwazT5FUpsuorrBrBM9rhWOnxI7CVvFy7r/rxReDWgg== + +"@zag-js/auto-resize@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/auto-resize/-/auto-resize-0.15.0.tgz#178230bd714b95972e4ffa7ec0494958d518f936" + integrity sha512-oSh0PlEjKXKafS5xNX0g1nZ2Uh32kn7pc4Ly2cbRLrAnx4TAL3FolqIF8AfZP1CvaJlOcYWbw5KISZ3GJzJKOw== + dependencies: + "@zag-js/dom-query" "0.15.0" + +"@zag-js/core@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/core/-/core-0.15.0.tgz#3566bc9b23d07528eeec9160b0b8ece9b7f647b0" + integrity sha512-eH3yx9nv0hMyoR+hWtJVJpCagpU5s61rOMHfLkdjMPTWSVjQZdp3SGEm6BTUjBlNbQkTZhUbPpg/FEqx1iPfJw== + dependencies: + "@zag-js/store" "0.15.0" + klona "2.0.6" + +"@zag-js/dom-event@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/dom-event/-/dom-event-0.15.0.tgz#529491fee3e25b4a47ce46edab624cf7bab67c47" + integrity sha512-5Sw2pNCcX2PqSiz4Ntm2PDu+YARQLtUrAf6PBBSUIqMZ0X9pp7DWTY3IfpdqY2ADsRLRMIe1LqzM+/c0u3Gd1Q== + dependencies: + "@zag-js/text-selection" "0.15.0" + "@zag-js/types" "0.15.0" + +"@zag-js/dom-query@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/dom-query/-/dom-query-0.15.0.tgz#48954851575f0f11127d48cf271ce323bb13f1f0" + integrity sha512-gxm7GefQ+ggJE+iN0/kHgbM90DPd4RZYoQC6TQOWy3nxij69IuoSI6goMakJ33hUckszWm9z86Sqe1U1puzssQ== + +"@zag-js/form-utils@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/form-utils/-/form-utils-0.15.0.tgz#dc70686f5d6ad8d845b5e4bab8eb92833a280b11" + integrity sha512-3gFzyF8x48wK2Fabt6rxjMETmhSlwTtCjF10XFrKscL1LZASc3Abl7lJcpTEmVJ5kb5D+50Zw+jlHjHrvddH6g== + dependencies: + "@zag-js/mutation-observer" "0.15.0" + +"@zag-js/interact-outside@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/interact-outside/-/interact-outside-0.15.0.tgz#e7fb88d20ce869091687ddd31ff1aaa82d1218d8" + integrity sha512-1emQM8syAZF1gfFKc2vSJ0NS6uYuqyhQ4zQ318JT5FkqctGQgBzJ1VXxak6c9YPOL1zkoE9NO1iqKrgNIbC3Vg== + dependencies: + "@zag-js/dom-event" "0.15.0" + "@zag-js/dom-query" "0.15.0" + "@zag-js/tabbable" "0.15.0" + "@zag-js/utils" "0.15.0" + +"@zag-js/live-region@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/live-region/-/live-region-0.15.0.tgz#b4befe0067b1231479cd0ecd91dfdf33248b8670" + integrity sha512-waH63YJeg3F5pQ2v7uMefSRTRQLC8kj8RP0rn2dkhsbdphKGxdcLtZ1dP2xTdnJUQdb7ISCoC+6/FRFd3O0IIQ== + dependencies: + "@zag-js/visually-hidden" "0.15.0" + +"@zag-js/mutation-observer@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/mutation-observer/-/mutation-observer-0.15.0.tgz#3848f7d9c9a39a7c7d86ed49cc6c5a4e0ffdcf85" + integrity sha512-7e2d1RYA0nuKOAJknbYBw6XfywF5eFC/4oel/nINHmS14JtjZnjMq/8z/kdrMMJnlQHou+wnaoskOLv+4Sv7pw== + +"@zag-js/react@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/react/-/react-0.15.0.tgz#516b92405b4536cd0605a9c702d2fe78ca18f1bc" + integrity sha512-Uygdyq29Y7q5GPOYv1VC9Ya5tdFOs+jdCZk5h5BKzFy3vCSDaVuZ8WT+w7JgvUWh6aQUKjUMLG8lXxWWnJA0Jg== + dependencies: + "@zag-js/core" "0.15.0" + "@zag-js/store" "0.15.0" + "@zag-js/types" "0.15.0" + proxy-compare "2.5.1" + +"@zag-js/store@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/store/-/store-0.15.0.tgz#e3cf5a10588ce2bb7f94280b95437fec6650c0f8" + integrity sha512-xq4WFrd+fqJE+Y0Os3FhN2/ru2zxvIvV8IT9y5Ev+3VRZw+L6Ut4tEjOONk+zr+UpkRx3jflPqlekjLHtowp0w== + dependencies: + proxy-compare "2.5.1" + +"@zag-js/tabbable@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/tabbable/-/tabbable-0.15.0.tgz#3303da58bb8f590e1ebf2a709c7567be15d212c9" + integrity sha512-GWUGqNgf+meYSIHXKwxYE2uqcmkxTPnm/7bnh+XaAgTov6ElsTo9k5QbFbmXH98QyWwVw/X0Sp/clKqmp+hiGg== + dependencies: + "@zag-js/dom-query" "0.15.0" + +"@zag-js/tags-input@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/tags-input/-/tags-input-0.15.0.tgz#84f900f9d79af818e6ec0f53773e539e9c47b6bc" + integrity sha512-k/9HGVIfWHJRlbHxCpvRFhc3PTYReA1+KsPbnEVCyHzbsRR7xW1t/C6/Kw4O9G9m5WZl68V18LBtn8Sy0vFB/A== + dependencies: + "@zag-js/anatomy" "0.15.0" + "@zag-js/auto-resize" "0.15.0" + "@zag-js/core" "0.15.0" + "@zag-js/dom-event" "0.15.0" + "@zag-js/dom-query" "0.15.0" + "@zag-js/form-utils" "0.15.0" + "@zag-js/interact-outside" "0.15.0" + "@zag-js/live-region" "0.15.0" + "@zag-js/types" "0.15.0" + "@zag-js/utils" "0.15.0" + +"@zag-js/text-selection@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/text-selection/-/text-selection-0.15.0.tgz#7c5ede2a98aaed7eb5d12c4995d5dc03688dbdc1" + integrity sha512-5i/MkTTBOJN17YylGgvRC+dyO5l3pgz2a/z0xBiIpimYqP1W66P0N1Yq0/5VZubs9TG41jKyEKuulKfcpLwmYg== + dependencies: + "@zag-js/dom-query" "0.15.0" + +"@zag-js/types@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/types/-/types-0.15.0.tgz#22fb42c125deb786f00ad984d111236bc9f2002f" + integrity sha512-rkAwZDl6e5p2iXF9HknP03TQ/G9jfOto0x2r2rds4wsPbfVJBNGk0Mo6Jl9GXcpNiyOCOO74SoO9VjZTmMqVvw== + dependencies: + csstype "3.1.2" + +"@zag-js/utils@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/utils/-/utils-0.15.0.tgz#65e2df9e6932211fb6f927e6667d35e5b4b593b7" + integrity sha512-aNjydiheTKMoIo1wASk3XgN3mbcCiCk2zAiUyldU4JCw9xWevMk5aSszW2v3A0yms6z+qhRb77Z50fejG7OlSA== + +"@zag-js/visually-hidden@0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@zag-js/visually-hidden/-/visually-hidden-0.15.0.tgz#148fc21afb81df1985eaa331795ae29350df0b6c" + integrity sha512-qRyXoKS+KI4422Skcfus9PnynIpLPMsLnUzDdVoLAie+1kOAY+jPeSVA5WLvRYU3OC5kKw/uP33qov7gpuqbjQ== + "@zendesk/zcli-apps@^1.0.0-beta.34": version "1.0.0-beta.34" resolved "https://registry.yarnpkg.com/@zendesk/zcli-apps/-/zcli-apps-1.0.0-beta.34.tgz#a1039cbbe1879ae55aefdf4d0cc924df6ec72a70" @@ -3558,7 +3684,7 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" -csstype@^3.0.2: +csstype@3.1.2, csstype@^3.0.2: version "3.1.2" resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== @@ -6263,6 +6389,11 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +klona@2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22" + integrity sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA== + lazystream@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638" @@ -7961,6 +8092,11 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" +proxy-compare@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/proxy-compare/-/proxy-compare-2.5.1.tgz#17818e33d1653fbac8c2ec31406bce8a2966f600" + integrity sha512-oyfc0Tx87Cpwva5ZXezSp5V9vht1c7dZBhvuV/y3ctkgMVUmiAGDVeeB0dKhGSyT0v1ZTEQYpe/RXlBVBNuCLA== + proxy-from-env@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" @@ -8095,14 +8231,13 @@ rc@^1.2.7, rc@^1.2.8: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-dom@^17.0.2: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" - integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== +react-dom@^18.2.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" + integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler "^0.20.2" + scheduler "^0.23.0" react-is@^16.13.1, react-is@^16.7.0: version "16.13.1" @@ -8114,7 +8249,7 @@ react-is@^17.0.1, react-is@^17.0.2: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== -react-is@^18.0.0: +react-is@^18.0.0, react-is@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== @@ -8154,13 +8289,12 @@ react-uid@^2.2.0, react-uid@^2.3.1: dependencies: tslib "^2.0.0" -react@^17.0.2: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" - integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== +react@^18.2.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" + integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" read-cmd-shim@^3.0.0: version "3.0.1" @@ -8502,13 +8636,12 @@ saxes@^6.0.0: dependencies: xmlchars "^2.2.0" -scheduler@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" - integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== +scheduler@^0.23.0: + version "0.23.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" + integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" semantic-release@19.0.5: version "19.0.5"