@openstage/glyph-element 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.md +1505 -0
- package/dist/chunks/bash-Dw1nAEst.js +171 -0
- package/dist/chunks/bash-Dw1nAEst.js.map +1 -0
- package/dist/chunks/csharp-D8ELXkGi.js +262 -0
- package/dist/chunks/csharp-D8ELXkGi.js.map +1 -0
- package/dist/chunks/css-DQEU4whB.js +142 -0
- package/dist/chunks/css-DQEU4whB.js.map +1 -0
- package/dist/chunks/fsharp-D4SqCnMZ.js +242 -0
- package/dist/chunks/fsharp-D4SqCnMZ.js.map +1 -0
- package/dist/chunks/go-BJIB22rX.js +142 -0
- package/dist/chunks/go-BJIB22rX.js.map +1 -0
- package/dist/chunks/haskell-eGGgAkgA.js +140 -0
- package/dist/chunks/haskell-eGGgAkgA.js.map +1 -0
- package/dist/chunks/highlight-core-C0K6BIzZ.js +967 -0
- package/dist/chunks/highlight-core-C0K6BIzZ.js.map +1 -0
- package/dist/chunks/java-DHPUyZsV.js +171 -0
- package/dist/chunks/java-DHPUyZsV.js.map +1 -0
- package/dist/chunks/javascript-D_CG8suQ.js +438 -0
- package/dist/chunks/javascript-D_CG8suQ.js.map +1 -0
- package/dist/chunks/json-BD6qkh12.js +38 -0
- package/dist/chunks/json-BD6qkh12.js.map +1 -0
- package/dist/chunks/kotlin-C75rnxi-.js +203 -0
- package/dist/chunks/kotlin-C75rnxi-.js.map +1 -0
- package/dist/chunks/markdown-B6LMDWi1.js +183 -0
- package/dist/chunks/markdown-B6LMDWi1.js.map +1 -0
- package/dist/chunks/ocaml-CMtC1T-S.js +54 -0
- package/dist/chunks/ocaml-CMtC1T-S.js.map +1 -0
- package/dist/chunks/prosemirror-dAj0dboi.js +7790 -0
- package/dist/chunks/prosemirror-dAj0dboi.js.map +1 -0
- package/dist/chunks/python-ny4cvzzX.js +240 -0
- package/dist/chunks/python-ny4cvzzX.js.map +1 -0
- package/dist/chunks/rolldown-runtime-BE9Pkid1.js +13 -0
- package/dist/chunks/rust-8OMNiTht.js +171 -0
- package/dist/chunks/rust-8OMNiTht.js.map +1 -0
- package/dist/chunks/scala-BB851ZJZ.js +164 -0
- package/dist/chunks/scala-BB851ZJZ.js.map +1 -0
- package/dist/chunks/sql-CoOMeU5k.js +120 -0
- package/dist/chunks/sql-CoOMeU5k.js.map +1 -0
- package/dist/chunks/tiptap-Cb4W88fy.js +8527 -0
- package/dist/chunks/tiptap-Cb4W88fy.js.map +1 -0
- package/dist/chunks/typescript-Dh7IycF2.js +523 -0
- package/dist/chunks/typescript-Dh7IycF2.js.map +1 -0
- package/dist/chunks/vendor-B82PcruV.js +1799 -0
- package/dist/chunks/vendor-B82PcruV.js.map +1 -0
- package/dist/chunks/xml-BpsgObpu.js +168 -0
- package/dist/chunks/xml-BpsgObpu.js.map +1 -0
- package/dist/codeblock-backspace.d.ts +3 -0
- package/dist/codeblock-backspace.d.ts.map +1 -0
- package/dist/document-conversion.d.ts +29 -0
- package/dist/document-conversion.d.ts.map +1 -0
- package/dist/editor-element.d.ts +93 -0
- package/dist/editor-element.d.ts.map +1 -0
- package/dist/glyph-editor-element.js +783 -0
- package/dist/glyph-editor-element.js.map +1 -0
- package/dist/header.d.ts +18 -0
- package/dist/header.d.ts.map +1 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/link-dialog.d.ts +29 -0
- package/dist/link-dialog.d.ts.map +1 -0
- package/dist/safe-href.d.ts +2 -0
- package/dist/safe-href.d.ts.map +1 -0
- package/dist/slash-menu.d.ts +22 -0
- package/dist/slash-menu.d.ts.map +1 -0
- package/dist/styles.d.ts +2 -0
- package/dist/styles.d.ts.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendor-B82PcruV.js","names":["computePosition","flip","offset","shift","getComputedStyle"],"sources":["../../../../node_modules/monadyssey/dist/monadyssey.mjs","../../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"],"sourcesContent":["//#region src/either.ts\nvar e = class {\n\tstatic catch(e, r) {\n\t\ttry {\n\t\t\treturn n.pure(e());\n\t\t} catch (e) {\n\t\t\treturn r ? t.pure(r(e)) : t.pure(((e) => typeof e == \"string\" ? e : e && typeof e.message == \"string\" ? e.message : String(e))(e));\n\t\t}\n\t}\n}, t = class t extends e {\n\ttype = \"Left\";\n\tself = this;\n\tconstructor(e) {\n\t\tsuper(), this.value = e;\n\t}\n\tstatic pure(e) {\n\t\treturn new t(e);\n\t}\n\tmap(e) {\n\t\treturn this;\n\t}\n\tmapLeft(e) {\n\t\treturn new t(e(this.value));\n\t}\n\tflatMap(e) {\n\t\treturn this;\n\t}\n\tgetOrElse(e) {\n\t\treturn e(this.value);\n\t}\n\tgetOrNull() {\n\t\treturn null;\n\t}\n\tswap() {\n\t\treturn n.pure(this.value);\n\t}\n\tfold(e, t) {\n\t\treturn e(this.value);\n\t}\n\ttap(e) {\n\t\treturn this;\n\t}\n\ttapLeft(e) {\n\t\treturn e(this.value), this;\n\t}\n}, n = class n extends e {\n\ttype = \"Right\";\n\tself = this;\n\tconstructor(e) {\n\t\tsuper(), this.value = e;\n\t}\n\tstatic pure(e) {\n\t\treturn new n(e);\n\t}\n\tmap(e) {\n\t\treturn new n(e(this.value));\n\t}\n\tmapLeft(e) {\n\t\treturn this;\n\t}\n\tflatMap(e) {\n\t\treturn e(this.value);\n\t}\n\tgetOrElse(e) {\n\t\treturn this.value;\n\t}\n\tgetOrNull() {\n\t\treturn this.value;\n\t}\n\tswap() {\n\t\treturn t.pure(this.value);\n\t}\n\tfold(e, t) {\n\t\treturn t(this.value);\n\t}\n\ttap(e) {\n\t\treturn e(this.value), this;\n\t}\n\ttapLeft(e) {\n\t\treturn this;\n\t}\n};\n//#endregion\n//#region src/utils.ts\nfunction r() {\n\tthrow new a(\"Not implemented yet\");\n}\nfunction i(e) {\n\treturn e;\n}\nvar a = class extends Error {\n\tconstructor(e) {\n\t\tsuper(e), this.name = \"NotImplementedYetError\";\n\t}\n}, o = class {\n\tstatic ofNullable(e) {\n\t\treturn e == null ? s.Instance : c.pure(e);\n\t}\n\tmap(e) {\n\t\treturn this.flatMap((t) => {\n\t\t\tlet n = e(t);\n\t\t\treturn n == null ? s.Instance : c.pure(n);\n\t\t});\n\t}\n\tgetOrNull() {\n\t\treturn this.fold(() => null, i);\n\t}\n\tgetOrElse(e) {\n\t\treturn this.fold(() => e(), i);\n\t}\n}, s = class e extends o {\n\ttype = \"None\";\n\tself = this;\n\tstatic instance = new e();\n\tconstructor() {\n\t\tsuper();\n\t}\n\tstatic get Instance() {\n\t\treturn e.instance;\n\t}\n\tflatMap(e) {\n\t\treturn this;\n\t}\n\tfilter(e) {\n\t\treturn this;\n\t}\n\tfold(e, t) {\n\t\treturn e();\n\t}\n\tgetOrElse(e) {\n\t\treturn e();\n\t}\n\tgetOrNull() {\n\t\treturn null;\n\t}\n\ttap(e) {\n\t\treturn this;\n\t}\n\ttapNone(e) {\n\t\treturn e(), this;\n\t}\n}, c = class e extends o {\n\ttype = \"Some\";\n\tself = this;\n\tconstructor(e) {\n\t\tsuper(), this.value = e;\n\t}\n\tstatic pure(t) {\n\t\treturn new e(t);\n\t}\n\tflatMap(e) {\n\t\treturn e(this.value);\n\t}\n\tfilter(e) {\n\t\treturn e(this.value) ? this : s.Instance;\n\t}\n\tfold(e, t) {\n\t\treturn t(this.value);\n\t}\n\tgetOrElse(e) {\n\t\treturn this.value;\n\t}\n\tgetOrNull() {\n\t\treturn this.value;\n\t}\n\ttap(e) {\n\t\treturn e(this.value), this;\n\t}\n\ttapNone(e) {\n\t\treturn this;\n\t}\n}, l = class e {\n\tconstructor(e, t) {\n\t\tthis.head = e, this.tail = t;\n\t}\n\tstatic pure(t) {\n\t\treturn new e(t, []);\n\t}\n\tstatic fromArray(t) {\n\t\tif (!t || t.length === 0) throw Error(\"Cannot construct a NonEmptyList from a null or empty array.\");\n\t\tlet [n, ...r] = t;\n\t\treturn new e(n, r);\n\t}\n\tget size() {\n\t\treturn 1 + this.tail.length;\n\t}\n\ttoArray() {\n\t\treturn [this.head, ...this.tail];\n\t}\n\tget init() {\n\t\treturn this.tail.length === 0 ? [] : [this.head, ...this.tail.slice(0, -1)];\n\t}\n\tget last() {\n\t\treturn this.tail.length > 0 ? this.tail[this.tail.length - 1] : this.head;\n\t}\n\tget(e) {\n\t\tif (e < 0 || e >= this.size) throw Error(`Index ${e} is out of bounds. Must be between 0 and ${this.size - 1}`);\n\t\treturn e === 0 ? this.head : this.tail[e - 1];\n\t}\n\tmap(t) {\n\t\treturn new e(t(this.head), this.tail.map(t));\n\t}\n\tflatMap(t) {\n\t\tlet n = t(this.head), r = this.tail.flatMap((e) => t(e).toArray());\n\t\treturn new e(n.head, [...n.tail, ...r]);\n\t}\n\tasync traverse(t) {\n\t\tlet [n, ...r] = await Promise.all([t(this.head), ...this.tail.map(t)]);\n\t\treturn new e(n, r);\n\t}\n\tfoldLeft(e, t) {\n\t\treturn this.tail.reduce(t, t(e, this.head));\n\t}\n\tfoldRight(e, t) {\n\t\treturn this.toArray().reduceRight((e, n) => t(n, e), e);\n\t}\n\treduce(e) {\n\t\treturn this.tail.reduce(e, this.head);\n\t}\n\texists(e) {\n\t\treturn e(this.head) || this.tail.some(e);\n\t}\n\tforall(e) {\n\t\treturn e(this.head) && this.tail.every(e);\n\t}\n\tfilter(e) {\n\t\tlet t = [];\n\t\te(this.head) && t.push(this.head);\n\t\tfor (let n of this.tail) e(n) && t.push(n);\n\t\treturn t;\n\t}\n\tsort(t) {\n\t\tlet n = this.toArray().sort((e, n) => t(e, n).value);\n\t\treturn new e(n[0], n.slice(1));\n\t}\n\tappend(t) {\n\t\treturn new e(this.head, [...this.tail, t]);\n\t}\n\tprepend(t) {\n\t\treturn new e(t, [this.head, ...this.tail]);\n\t}\n\tconcat(t) {\n\t\treturn new e(this.head, [\n\t\t\t...this.tail,\n\t\t\tt.head,\n\t\t\t...t.tail\n\t\t]);\n\t}\n\treverse() {\n\t\tlet t = this.toArray().reverse();\n\t\treturn new e(t[0], t.slice(1));\n\t}\n\tfind(e) {\n\t\tif (e(this.head)) return c.pure(this.head);\n\t\tlet t = this.tail.findIndex(e);\n\t\treturn t === -1 ? s.Instance : c.pure(this.tail[t]);\n\t}\n\ttoString() {\n\t\treturn `[${this.toArray().join(\", \")}]`;\n\t}\n}, u = (e = 3, t = 1.2, n = 1e3, r, i = 0) => ({\n\trecurs: e,\n\tfactor: t,\n\tdelay: n,\n\ttimeout: r,\n\tjitter: i\n}), d = (e, t, n) => new Promise((r, i) => {\n\tif (t.aborted) {\n\t\ti(n(new y(\"Operation was cancelled\")));\n\t\treturn;\n\t}\n\tlet a = setTimeout(() => {\n\t\tt.removeEventListener(\"abort\", o), r();\n\t}, e);\n\tfunction o() {\n\t\tclearTimeout(a), i(n(new y(\"Operation was cancelled\")));\n\t}\n\tt.addEventListener(\"abort\", o, { once: !0 });\n}), f = class {\n\tpolicy;\n\tcontroller = new AbortController();\n\tconstructor(e = u()) {\n\t\tif (e.recurs !== Infinity && (!Number.isFinite(e.recurs) || e.recurs < 1)) throw new m(\"Policy validation error: 'recurs' must be a positive number >= 1 (or Infinity)\");\n\t\tif (!Number.isFinite(e.factor) || e.factor < 1) throw new m(\"Policy validation error: 'factor' must be a finite number >= 1\");\n\t\tif (!Number.isFinite(e.delay) || e.delay < 0) throw new m(\"Policy validation error: 'delay' must be a finite non-negative number\");\n\t\tif (e.timeout !== void 0 && (!Number.isFinite(e.timeout) || e.timeout < 0)) throw new m(\"Policy validation error: 'timeout' must be a finite non-negative number\");\n\t\tif (e.jitter !== void 0 && (!Number.isFinite(e.jitter) || e.jitter < 0 || e.jitter > 1)) throw new m(\"Policy validation error: 'jitter' must be a finite number between 0 and 1\");\n\t\tthis.policy = e;\n\t}\n\tretryIf(e, t, n) {\n\t\tlet r = this.policy, i = this.controller.signal;\n\t\treturn k.cancellable(async (a) => {\n\t\t\tlet o = new AbortController(), s = () => o.abort();\n\t\t\tif (a.aborted || i.aborted) throw n(new y(\"Operation was cancelled\"));\n\t\t\ta.addEventListener(\"abort\", s, { once: !0 }), i.addEventListener(\"abort\", s, { once: !0 });\n\t\t\ttry {\n\t\t\t\tlet i = 0, a = r.delay;\n\t\t\t\tfor (; i < r.recurs;) {\n\t\t\t\t\tif (o.signal.aborted) throw n(new y(\"Operation was cancelled\"));\n\t\t\t\t\tlet s = await this.withTimeout(e, n).unsafeRun();\n\t\t\t\t\tif (s.type === \"Ok\") return s.value;\n\t\t\t\t\tlet c = s.error, l;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tl = t(c);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tthrow n(new g(`Retry condition threw: ${e instanceof Error ? e.message : String(e)}`));\n\t\t\t\t\t}\n\t\t\t\t\tif (!l) throw n(new g(`Retry condition not met: ${c}`));\n\t\t\t\t\tif (i >= r.recurs - 1) throw n(new _(`Retry limit reached without success: ${c}`));\n\t\t\t\t\tawait d(this.applyJitter(a), o.signal, n), a *= r.factor, i++;\n\t\t\t\t}\n\t\t\t\tthrow n(new _(\"Retry limit reached without success\"));\n\t\t\t} finally {\n\t\t\t\ta.removeEventListener(\"abort\", s), i.removeEventListener(\"abort\", s);\n\t\t\t}\n\t\t}, (e) => p(e) ? e : n(e instanceof Error ? e : Error(String(e))));\n\t}\n\trepeat(e, t) {\n\t\tlet n = this.policy, r = this.controller.signal;\n\t\treturn k.cancellable(async (i) => {\n\t\t\tlet a = new AbortController(), o = () => a.abort();\n\t\t\tif (i.aborted || r.aborted) throw t(new y(\"Operation was cancelled\"));\n\t\t\ti.addEventListener(\"abort\", o, { once: !0 }), r.addEventListener(\"abort\", o, { once: !0 });\n\t\t\ttry {\n\t\t\t\tlet r = !1, i, o = n.delay;\n\t\t\t\tfor (let s = 0; s < n.recurs; s++) {\n\t\t\t\t\tif (a.signal.aborted) throw t(new y(\"Operation was cancelled\"));\n\t\t\t\t\tlet c = await this.withTimeout(e, t).unsafeRun();\n\t\t\t\t\tif (c.type === \"Ok\") r = !0, i = c.value, s < n.recurs - 1 && (await d(this.applyJitter(o), a.signal, t), o *= n.factor);\n\t\t\t\t\telse throw t(new v(`Failed to execute repeat: ${c.error}`));\n\t\t\t\t}\n\t\t\t\tif (r) return i;\n\t\t\t\tthrow t(new v(\"The function provided never succeeded\"));\n\t\t\t} finally {\n\t\t\t\ti.removeEventListener(\"abort\", o), r.removeEventListener(\"abort\", o);\n\t\t\t}\n\t\t}, (e) => p(e) ? e : t(e instanceof Error ? e : Error(String(e))));\n\t}\n\twithTimeout(e, t) {\n\t\tlet n = this.policy.timeout;\n\t\treturn !n || n < 1 ? e : k.lift(async () => {\n\t\t\tlet r = null, i = !1, a = new Promise((e, a) => {\n\t\t\t\tr = setTimeout(() => {\n\t\t\t\t\ti || (i = !0, a(t(new h(`The operation timed out after ${n} milliseconds`))));\n\t\t\t\t}, n);\n\t\t\t}), o = e.unsafeRun().then((e) => {\n\t\t\t\tif (i) return e.type === \"Ok\" ? e.value : Promise.reject(e.error);\n\t\t\t\tswitch (i = !0, r && clearTimeout(r), e.type) {\n\t\t\t\t\tcase \"Ok\": return e.value;\n\t\t\t\t\tcase \"Err\": return Promise.reject(e.error);\n\t\t\t\t}\n\t\t\t});\n\t\t\ttry {\n\t\t\t\treturn await Promise.race([o, a]);\n\t\t\t} catch (e) {\n\t\t\t\treturn r && clearTimeout(r), Promise.reject(e);\n\t\t\t}\n\t\t});\n\t}\n\tcancel() {\n\t\tthis.controller.abort();\n\t}\n\tapplyJitter(e) {\n\t\tif (!this.policy.jitter) return e;\n\t\tlet t = e * this.policy.jitter, n = (Math.random() * 2 - 1) * t;\n\t\treturn Math.max(0, e + n);\n\t}\n}, p = (e) => !(e instanceof y || e instanceof _ || e instanceof v || e instanceof g || e instanceof h || e instanceof m), m = class extends Error {\n\tconstructor(e) {\n\t\tsuper(e), this.name = \"PolicyValidationError\";\n\t}\n}, h = class extends Error {\n\tconstructor(e) {\n\t\tsuper(e), this.name = \"TimeoutError\";\n\t}\n}, g = class extends Error {\n\tconstructor(e) {\n\t\tsuper(e), this.name = \"ConditionalRetryError\";\n\t}\n}, _ = class extends Error {\n\tconstructor(e) {\n\t\tsuper(e), this.name = \"RetryError\";\n\t}\n}, v = class extends Error {\n\tconstructor(e) {\n\t\tsuper(e), this.name = \"RepeatError\";\n\t}\n}, y = class extends Error {\n\tconstructor(e) {\n\t\tsuper(e), this.name = \"CancellationError\";\n\t}\n}, b = Symbol(\"IO.node\"), x = Symbol(\"IO.escape\");\nfunction S(e) {\n\treturn {\n\t\t[x]: !0,\n\t\terror: e\n\t};\n}\nfunction C(e) {\n\treturn typeof e == \"object\" && !!e && x in e;\n}\nvar w = Symbol(\"IO.cancelled\");\nfunction T() {\n\tthrow { [w]: !0 };\n}\nfunction E(e) {\n\treturn typeof e == \"object\" && !!e && w in e;\n}\nfunction D(e) {\n\treturn e != null && typeof e.then == \"function\";\n}\nasync function O(e, t) {\n\tlet n = [], r = e;\n\tfor (;;) {\n\t\tif (t?.aborted) {\n\t\t\tlet e = [];\n\t\t\tfor (; n.length > 0;) {\n\t\t\t\tlet t = n.pop();\n\t\t\t\tt.tag === \"OnCancel\" && e.push(t.finalizer);\n\t\t\t}\n\t\t\tfor (let t of e) try {\n\t\t\t\tlet e = t();\n\t\t\t\tD(e) && await e;\n\t\t\t} catch {}\n\t\t\treturn { type: \"Cancelled\" };\n\t\t}\n\t\tswitch (r.tag) {\n\t\t\tcase \"Map\":\n\t\t\t\tn.push({\n\t\t\t\t\ttag: \"Map\",\n\t\t\t\t\tf: r.f\n\t\t\t\t}), r = r.io;\n\t\t\t\tbreak;\n\t\t\tcase \"FlatMap\":\n\t\t\t\tn.push({\n\t\t\t\t\ttag: \"FlatMap\",\n\t\t\t\t\tf: r.f\n\t\t\t\t}), r = r.io;\n\t\t\t\tbreak;\n\t\t\tcase \"MapErr\":\n\t\t\t\tn.push({\n\t\t\t\t\ttag: \"MapErr\",\n\t\t\t\t\tf: r.f\n\t\t\t\t}), r = r.io;\n\t\t\t\tbreak;\n\t\t\tcase \"FlatMapErr\":\n\t\t\t\tn.push({\n\t\t\t\t\ttag: \"FlatMapErr\",\n\t\t\t\t\tf: r.f\n\t\t\t\t}), r = r.io;\n\t\t\t\tbreak;\n\t\t\tcase \"Tap\":\n\t\t\t\tn.push({\n\t\t\t\t\ttag: \"Tap\",\n\t\t\t\t\tf: r.f\n\t\t\t\t}), r = r.io;\n\t\t\t\tbreak;\n\t\t\tcase \"TapErr\":\n\t\t\t\tn.push({\n\t\t\t\t\ttag: \"TapErr\",\n\t\t\t\t\tf: r.f\n\t\t\t\t}), r = r.io;\n\t\t\t\tbreak;\n\t\t\tcase \"FoldM\":\n\t\t\t\tn.push({\n\t\t\t\t\ttag: \"FoldM\",\n\t\t\t\t\tonOk: r.onOk,\n\t\t\t\t\tonErr: r.onErr\n\t\t\t\t}), r = r.io;\n\t\t\t\tbreak;\n\t\t\tcase \"Ensure\":\n\t\t\t\tn.push({\n\t\t\t\t\ttag: \"Ensure\",\n\t\t\t\t\tpredicate: r.predicate,\n\t\t\t\t\tliftE: r.liftE\n\t\t\t\t}), r = r.io;\n\t\t\t\tbreak;\n\t\t\tcase \"OnCancel\":\n\t\t\t\tn.push({\n\t\t\t\t\ttag: \"OnCancel\",\n\t\t\t\t\tfinalizer: r.finalizer\n\t\t\t\t}), r = r.io;\n\t\t\t\tbreak;\n\t\t\tcase \"Lift\": {\n\t\t\t\tlet { run: e, liftE: n } = r;\n\t\t\t\ttry {\n\t\t\t\t\tlet n = e(t);\n\t\t\t\t\tr = {\n\t\t\t\t\t\ttag: \"Pure\",\n\t\t\t\t\t\tvalue: D(n) ? await n : n\n\t\t\t\t\t};\n\t\t\t\t} catch (e) {\n\t\t\t\t\tif (E(e)) {\n\t\t\t\t\t\tr = {\n\t\t\t\t\t\t\ttag: \"Pure\",\n\t\t\t\t\t\t\tvalue: void 0\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tr = {\n\t\t\t\t\t\ttag: \"Fail\",\n\t\t\t\t\t\terror: n ? n(e) : e\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"Pure\": {\n\t\t\t\tif (n.length === 0) return {\n\t\t\t\t\ttype: \"Ok\",\n\t\t\t\t\tvalue: r.value\n\t\t\t\t};\n\t\t\t\tlet e = n.pop();\n\t\t\t\tswitch (e.tag) {\n\t\t\t\t\tcase \"Map\":\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tr = {\n\t\t\t\t\t\t\t\ttag: \"Pure\",\n\t\t\t\t\t\t\t\tvalue: e.f(r.value)\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tr = {\n\t\t\t\t\t\t\t\ttag: \"Fail\",\n\t\t\t\t\t\t\t\terror: e\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"FlatMap\":\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tr = e.f(r.value)[b];\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tr = {\n\t\t\t\t\t\t\t\ttag: \"Fail\",\n\t\t\t\t\t\t\t\terror: e\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Tap\":\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tlet t = e.f(r.value);\n\t\t\t\t\t\t\tD(t) && await t;\n\t\t\t\t\t\t} catch {}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Ensure\": {\n\t\t\t\t\t\tlet t = r.value;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\te.predicate(t) || (r = {\n\t\t\t\t\t\t\t\ttag: \"Fail\",\n\t\t\t\t\t\t\t\terror: e.liftE(t)\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\tr = {\n\t\t\t\t\t\t\t\ttag: \"Fail\",\n\t\t\t\t\t\t\t\terror: e.liftE(t)\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase \"FoldM\":\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tr = e.onOk(r.value)[b];\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tr = {\n\t\t\t\t\t\t\t\ttag: \"Fail\",\n\t\t\t\t\t\t\t\terror: e\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"MapErr\":\n\t\t\t\t\tcase \"FlatMapErr\":\n\t\t\t\t\tcase \"TapErr\":\n\t\t\t\t\tcase \"OnCancel\": break;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"Fail\": {\n\t\t\t\tif (n.length === 0) return {\n\t\t\t\t\ttype: \"Err\",\n\t\t\t\t\terror: r.error\n\t\t\t\t};\n\t\t\t\tlet e = n.pop();\n\t\t\t\tswitch (e.tag) {\n\t\t\t\t\tcase \"MapErr\":\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tr = {\n\t\t\t\t\t\t\t\ttag: \"Fail\",\n\t\t\t\t\t\t\t\terror: e.f(r.error)\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tr = {\n\t\t\t\t\t\t\t\ttag: \"Fail\",\n\t\t\t\t\t\t\t\terror: e\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"FlatMapErr\":\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tr = e.f(r.error)[b];\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tr = {\n\t\t\t\t\t\t\t\ttag: \"Fail\",\n\t\t\t\t\t\t\t\terror: e\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"TapErr\":\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tlet t = e.f(r.error);\n\t\t\t\t\t\t\tD(t) && await t;\n\t\t\t\t\t\t} catch {}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"FoldM\":\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tr = e.onErr(r.error)[b];\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tr = {\n\t\t\t\t\t\t\t\ttag: \"Fail\",\n\t\t\t\t\t\t\t\terror: e\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Map\":\n\t\t\t\t\tcase \"FlatMap\":\n\t\t\t\t\tcase \"Tap\":\n\t\t\t\t\tcase \"Ensure\":\n\t\t\t\t\tcase \"OnCancel\": break;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\nvar k = class e {\n\t[b];\n\tconstructor(e) {\n\t\tthis[b] = e;\n\t}\n\tstatic wrap(t) {\n\t\treturn new e(t);\n\t}\n\tstatic lift(t, n) {\n\t\treturn new e({\n\t\t\ttag: \"Lift\",\n\t\t\trun: t,\n\t\t\tliftE: n\n\t\t});\n\t}\n\tstatic cancellable(t, n) {\n\t\treturn new e({\n\t\t\ttag: \"Lift\",\n\t\t\trun: (e) => t(e ?? new AbortController().signal),\n\t\t\tliftE: n\n\t\t});\n\t}\n\tstatic bracket(t, n, r) {\n\t\treturn e.lift(async (e) => {\n\t\t\tlet i = await O(t[b], e);\n\t\t\tif (i.type === \"Cancelled\" && T(), i.type === \"Err\") throw S(i.error);\n\t\t\tlet a = i.value, o;\n\t\t\ttry {\n\t\t\t\to = await O(n(a)[b], e);\n\t\t\t} catch (e) {\n\t\t\t\tthrow await O(r(a)[b]).catch(() => {}), e;\n\t\t\t}\n\t\t\tif (await O(r(a)[b]).catch(() => {}), o.type === \"Cancelled\" && T(), o.type === \"Err\") throw S(o.error);\n\t\t\treturn o.value;\n\t\t}, (e) => {\n\t\t\tif (E(e)) throw e;\n\t\t\treturn C(e) ? e.error : e;\n\t\t});\n\t}\n\tstatic pure(t) {\n\t\treturn new e({\n\t\t\ttag: \"Pure\",\n\t\t\tvalue: t\n\t\t});\n\t}\n\tstatic fail(t) {\n\t\treturn new e({\n\t\t\ttag: \"Fail\",\n\t\t\terror: t\n\t\t});\n\t}\n\tstatic unit = new e({\n\t\ttag: \"Pure\",\n\t\tvalue: void 0\n\t});\n\tstatic ok(e) {\n\t\treturn {\n\t\t\ttype: \"Ok\",\n\t\t\tvalue: e\n\t\t};\n\t}\n\tstatic err(e) {\n\t\treturn {\n\t\t\ttype: \"Err\",\n\t\t\terror: e\n\t\t};\n\t}\n\tmap(t) {\n\t\treturn e.wrap({\n\t\t\ttag: \"Map\",\n\t\t\tio: this[b],\n\t\t\tf: t\n\t\t});\n\t}\n\tflatMap(t) {\n\t\treturn e.wrap({\n\t\t\ttag: \"FlatMap\",\n\t\t\tio: this[b],\n\t\t\tf: t\n\t\t});\n\t}\n\tmapErr(t) {\n\t\treturn e.wrap({\n\t\t\ttag: \"MapErr\",\n\t\t\tio: this[b],\n\t\t\tf: t\n\t\t});\n\t}\n\tbimap(e, t) {\n\t\treturn this.map(t).mapErr(e);\n\t}\n\tflatMapErr(t) {\n\t\treturn e.wrap({\n\t\t\ttag: \"FlatMapErr\",\n\t\t\tio: this[b],\n\t\t\tf: t\n\t\t});\n\t}\n\ttap(t) {\n\t\treturn e.wrap({\n\t\t\ttag: \"Tap\",\n\t\t\tio: this[b],\n\t\t\tf: t\n\t\t});\n\t}\n\ttapErr(t) {\n\t\treturn e.wrap({\n\t\t\ttag: \"TapErr\",\n\t\t\tio: this[b],\n\t\t\tf: t\n\t\t});\n\t}\n\tensure(t, n) {\n\t\treturn e.wrap({\n\t\t\ttag: \"Ensure\",\n\t\t\tio: this[b],\n\t\t\tpredicate: t,\n\t\t\tliftE: n\n\t\t});\n\t}\n\tonCancel(t) {\n\t\treturn e.wrap({\n\t\t\ttag: \"OnCancel\",\n\t\t\tio: this[b],\n\t\t\tfinalizer: t\n\t\t});\n\t}\n\tfoldM(t, n) {\n\t\treturn e.wrap({\n\t\t\ttag: \"FoldM\",\n\t\t\tio: this[b],\n\t\t\tonOk: n,\n\t\t\tonErr: t\n\t\t});\n\t}\n\tattempt() {\n\t\treturn this.foldM((n) => e.pure(t.pure(n)), (t) => e.pure(n.pure(t)));\n\t}\n\tignore() {\n\t\treturn this.foldM(() => e.unit, () => e.unit);\n\t}\n\tasync unsafeRun() {\n\t\treturn O(this[b]);\n\t}\n\tasync fold(e, t) {\n\t\tlet n = await this.unsafeRun();\n\t\treturn n.type === \"Ok\" ? t(n.value) : e(n.error);\n\t}\n\tasync getOrNull() {\n\t\tlet e = await this.unsafeRun();\n\t\treturn e.type === \"Ok\" ? e.value : null;\n\t}\n\tasync getOrElse(e) {\n\t\tlet t = await this.unsafeRun();\n\t\treturn t.type === \"Ok\" ? t.value : e();\n\t}\n\tasync getOrHandleErr(e) {\n\t\tlet t = await this.unsafeRun();\n\t\treturn t.type === \"Ok\" ? t.value : e(t.error);\n\t}\n\tretryIf(t, n, r = u()) {\n\t\treturn e.lift(() => new f(r), (e) => n(e instanceof Error ? e : Error(String(e)))).flatMap((e) => e.retryIf(this, t, n));\n\t}\n\ttimeout(t, n) {\n\t\tlet r = this[b];\n\t\treturn e.lift((e) => new Promise((i, a) => {\n\t\t\tlet o = new AbortController(), s;\n\t\t\tif (e) if (e.aborted) o.abort();\n\t\t\telse {\n\t\t\t\tlet t = () => o.abort();\n\t\t\t\te.addEventListener(\"abort\", t, { once: !0 }), s = () => e.removeEventListener(\"abort\", t);\n\t\t\t}\n\t\t\tlet c = !1, l = () => {\n\t\t\t\tc = !0, s && s();\n\t\t\t}, u = setTimeout(() => {\n\t\t\t\tc || (l(), o.abort(), a(S(n())));\n\t\t\t}, t);\n\t\t\tO(r, o.signal).then((e) => {\n\t\t\t\tc || (l(), clearTimeout(u), e.type === \"Ok\" ? i(e.value) : e.type === \"Cancelled\" ? a({ [w]: !0 }) : a(S(e.error)));\n\t\t\t}), o.signal.addEventListener(\"abort\", () => {\n\t\t\t\tclearTimeout(u);\n\t\t\t}, { once: !0 });\n\t\t}), (e) => {\n\t\t\tif (E(e)) throw e;\n\t\t\treturn C(e) ? e.error : e;\n\t\t});\n\t}\n\tfork() {\n\t\tlet t = this[b];\n\t\treturn e.lift(() => {\n\t\t\tlet e = new AbortController(), n = O(t, e.signal);\n\t\t\treturn {\n\t\t\t\tjoin: () => n,\n\t\t\t\tcancel: async () => {\n\t\t\t\t\te.abort(), await n.catch(() => {});\n\t\t\t\t},\n\t\t\t\tsignal: e.signal\n\t\t\t};\n\t\t});\n\t}\n\tstatic parMapN(...t) {\n\t\tif (t.length < 3) throw Error(\"IO.parMapN requires at least two IO arguments and a combiner function\");\n\t\tlet n = t.slice(0, -1), r = t[t.length - 1];\n\t\treturn e.lift(async (e) => {\n\t\t\tlet t = await Promise.all(n.map((t) => O(t[b], e)));\n\t\t\tt.some((e) => e.type === \"Cancelled\") && T();\n\t\t\tlet i = t.filter((e) => e.type === \"Err\").map((e) => e.error);\n\t\t\tif (i.length > 0) throw S(l.fromArray(i));\n\t\t\treturn r(...t.filter((e) => e.type === \"Ok\").map((e) => e.value));\n\t\t}, (e) => C(e) ? e.error : l.fromArray([e]));\n\t}\n\tstatic race(...t) {\n\t\tif (t.length === 0) throw Error(\"IO.race requires at least one IO argument\");\n\t\treturn e.lift((e) => new Promise((n, r) => {\n\t\t\tlet i = new AbortController(), a;\n\t\t\tif (e) if (e.aborted) i.abort();\n\t\t\telse {\n\t\t\t\tlet t = () => i.abort();\n\t\t\t\te.addEventListener(\"abort\", t, { once: !0 }), a = () => e.removeEventListener(\"abort\", t);\n\t\t\t}\n\t\t\tlet o = 0, s = !1, c = Array(t.length), u = () => {\n\t\t\t\ts = !0, a && a();\n\t\t\t};\n\t\t\tt.forEach((e, a) => {\n\t\t\t\tO(e[b], i.signal).then((e) => {\n\t\t\t\t\tif (!s) {\n\t\t\t\t\t\tif (e.type === \"Ok\") u(), i.abort(), n(e.value);\n\t\t\t\t\t\telse if (e.type === \"Err\") {\n\t\t\t\t\t\t\tif (c[a] = e.error, o++, o === t.length) {\n\t\t\t\t\t\t\t\tu();\n\t\t\t\t\t\t\t\tlet e = c.filter((e) => e !== void 0);\n\t\t\t\t\t\t\t\te.length > 0 ? r(S(l.fromArray(e))) : r({ [w]: !0 });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (o++, o === t.length && !s) {\n\t\t\t\t\t\t\tu();\n\t\t\t\t\t\t\tlet e = c.filter((e) => e !== void 0);\n\t\t\t\t\t\t\te.length > 0 ? r(S(l.fromArray(e))) : r({ [w]: !0 });\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}), (e) => {\n\t\t\tif (E(e)) throw e;\n\t\t\treturn C(e) ? e.error : l.fromArray([e]);\n\t\t});\n\t}\n\tstatic Do(t, n) {\n\t\tlet r = n;\n\t\treturn e.lift(async (e) => await t(async (t) => {\n\t\t\tlet n = await O(t[b], e);\n\t\t\tif (n.type === \"Ok\") return n.value;\n\t\t\tthrow n.type === \"Cancelled\" && T(), S(n.error);\n\t\t}), (e) => {\n\t\t\tif (E(e)) throw e;\n\t\t\treturn C(e) ? e.error : r ? r(e) : e;\n\t\t});\n\t}\n\tstatic traverse(t, n) {\n\t\treturn e.Do(async (e) => {\n\t\t\tlet r = [];\n\t\t\tfor (let i of t) r.push(await e(n(i)));\n\t\t\treturn r;\n\t\t});\n\t}\n\tstatic parTraverse(t, n) {\n\t\treturn e.lift(async (e) => {\n\t\t\tlet r = await Promise.all(t.map((t) => O(n(t)[b], e)));\n\t\t\tr.some((e) => e.type === \"Cancelled\") && T();\n\t\t\tlet i = r.filter((e) => e.type === \"Err\").map((e) => e.error);\n\t\t\tif (i.length > 0) throw S(l.fromArray(i));\n\t\t\treturn r.filter((e) => e.type === \"Ok\").map((e) => e.value);\n\t\t}, (e) => C(e) ? e.error : l.fromArray([e]));\n\t}\n\tstatic sequence(t) {\n\t\treturn e.traverse(t, (e) => e);\n\t}\n\tstatic parSequence(t) {\n\t\treturn e.parTraverse(t, (e) => e);\n\t}\n}, A = class {\n\tstatic defer(e) {\n\t\treturn new M(e);\n\t}\n\tstatic now(e) {\n\t\treturn new j(e);\n\t}\n\tstatic lazy(e) {\n\t\treturn new N(e);\n\t}\n\tmap(e) {\n\t\treturn new F(this, e);\n\t}\n\tflatMap(e) {\n\t\treturn new P(this, e);\n\t}\n\tevaluate() {\n\t\tlet e = this, t = [];\n\t\tfor (;;) if (e instanceof P) {\n\t\t\tlet n = e.first;\n\t\t\tn instanceof P || n instanceof F ? (t.push(e.f), e = n) : e = e.f(n.value());\n\t\t} else if (e instanceof F) {\n\t\t\tlet n = [e.f], r = e.first;\n\t\t\tfor (; r instanceof F;) n.push(r.f), r = r.first;\n\t\t\tlet i = (e) => {\n\t\t\t\tfor (let t = n.length - 1; t >= 0; t--) e = n[t](e);\n\t\t\t\treturn e;\n\t\t\t};\n\t\t\tif (r instanceof P) t.push((e) => new j(i(e))), e = r;\n\t\t\telse {\n\t\t\t\tlet n = i(r.value());\n\t\t\t\tif (t.length === 0) return n;\n\t\t\t\te = t.pop()(n);\n\t\t\t}\n\t\t} else {\n\t\t\tlet n = e.value();\n\t\t\tif (t.length === 0) return n;\n\t\t\te = t.pop()(n);\n\t\t}\n\t}\n}, j = class extends A {\n\tconstructor(e) {\n\t\tsuper(), this._value = e;\n\t}\n\tvalue() {\n\t\treturn this._value;\n\t}\n}, M = class extends A {\n\tconstructor(e) {\n\t\tsuper(), this.f = e;\n\t}\n\tvalue() {\n\t\treturn this.f();\n\t}\n}, N = class extends A {\n\t_value;\n\t_evaluated = !1;\n\tconstructor(e) {\n\t\tsuper(), this.f = e;\n\t}\n\tvalue() {\n\t\treturn this._evaluated ||= (this._value = this.f(), !0), this._value;\n\t}\n}, P = class extends A {\n\tconstructor(e, t) {\n\t\tsuper(), this.first = e, this.f = t;\n\t}\n\tvalue() {\n\t\tthrow new I(\"FlatMap should not be evaluated directly\");\n\t}\n}, F = class extends A {\n\tconstructor(e, t) {\n\t\tsuper(), this.first = e, this.f = t;\n\t}\n\tvalue() {\n\t\tthrow new I(\"Map should not be evaluated directly\");\n\t}\n}, I = class extends Error {\n\tconstructor(e) {\n\t\tsuper(), this.error = e, this.name = \"EvaluationError\";\n\t}\n}, L = class e {\n\tconstructor(e) {\n\t\tthis.f = e;\n\t}\n\tstatic pure(t) {\n\t\treturn new e(() => t);\n\t}\n\tmap(t) {\n\t\treturn new e((e) => t(this.run(e)));\n\t}\n\tflatMap(t) {\n\t\treturn new e((e) => t(this.run(e)).run(e));\n\t}\n\tstatic ask() {\n\t\treturn new e((e) => e);\n\t}\n\tstatic lift(e) {\n\t\treturn (t) => t.map(e);\n\t}\n\tstatic parZip(...t) {\n\t\treturn new e((e) => t.map((t) => t.run(e)));\n\t}\n\tstatic local(t, n) {\n\t\treturn new e((e) => n.run(t(e)));\n\t}\n\trun(e) {\n\t\treturn this.f(e);\n\t}\n}, R = class e {\n\tconstructor(e, t) {\n\t\tthis.value = e, this.type = t;\n\t}\n\tstatic LessThan = new e(-1, \"LessThan\");\n\tstatic Equal = new e(0, \"Equal\");\n\tstatic GreaterThan = new e(1, \"GreaterThan\");\n\tflatMap(e) {\n\t\treturn this.type === \"Equal\" ? e() : this;\n\t}\n\tmatch(e, t, n) {\n\t\tswitch (this.type) {\n\t\t\tcase \"LessThan\": return e();\n\t\t\tcase \"Equal\": return t();\n\t\t\tcase \"GreaterThan\": return n();\n\t\t}\n\t}\n\treverse() {\n\t\tswitch (this.type) {\n\t\t\tcase \"LessThan\": return e.GreaterThan;\n\t\t\tcase \"Equal\": return e.Equal;\n\t\t\tcase \"GreaterThan\": return e.LessThan;\n\t\t}\n\t}\n\ttap(e) {\n\t\treturn e(this), this;\n\t}\n\tconcat(e) {\n\t\treturn this.type === \"Equal\" ? e : this;\n\t}\n\tstatic from(t) {\n\t\tif (isNaN(t)) throw Error(\"Cannot convert NaN to Ordering.\");\n\t\treturn t < 0 ? e.LessThan : t > 0 ? e.GreaterThan : e.Equal;\n\t}\n\tstatic comparing(t, n) {\n\t\treturn (r, i) => {\n\t\t\tlet a = n(t(r), t(i));\n\t\t\tif (isNaN(a)) throw Error(\"Comparator function returned NaN.\");\n\t\t\treturn e.from(a);\n\t\t};\n\t}\n\tstatic compareBy(...t) {\n\t\treturn (n, r) => {\n\t\t\tfor (let e of t) {\n\t\t\t\tlet t = e(n, r);\n\t\t\t\tif (t.type !== \"Equal\") return t;\n\t\t\t}\n\t\t\treturn e.Equal;\n\t\t};\n\t}\n}, z = R.LessThan, B = R.Equal, V = R.GreaterThan;\n//#endregion\nexport { y as CancellationError, g as ConditionalRetryError, B as EQ, e as Either, A as Eval, I as EvaluationError, V as GT, k as IO, z as LT, t as Left, l as NonEmptyList, s as None, a as NotImplementedYetError, o as Option, R as Ordering, m as PolicyValidationError, L as Reader, v as RepeatError, _ as RetryError, n as Right, f as Schedule, c as Some, r as TODO, h as TimeoutError, i as identity };\n\n//# sourceMappingURL=monadyssey.mjs.map","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n const firstChar = placement[0];\n return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n const side = getSide(placement);\n return oppositeSideMap[side] + placement.slice(side.length);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n// Maximum number of resets that can occur before bailing to avoid infinite reset loops.\nconst MAX_RESET_COUNT = 50;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const platformWithDetectOverflow = platform.detectOverflow ? platform : {\n ...platform,\n detectOverflow\n };\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let resetCount = 0;\n const middlewareData = {};\n for (let i = 0; i < middleware.length; i++) {\n const currentMiddleware = middleware[i];\n if (!currentMiddleware) {\n continue;\n }\n const {\n name,\n fn\n } = currentMiddleware;\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform: platformWithDetectOverflow,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData[name] = {\n ...middlewareData[name],\n ...data\n };\n if (reset && resetCount < MAX_RESET_COUNT) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects,\n platform\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n platform\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n try {\n if (element.matches(':popover-open')) {\n return true;\n }\n } catch (_e) {\n // no-op\n }\n try {\n return element.matches(':modal');\n } catch (_e) {\n return false;\n }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (isWebKitValue == null) {\n isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n }\n return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n return /^(html|body|#document)$/.test(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n } else {\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n }\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n // visual width of the <html> but this is not considered in the size\n // of `html.clientWidth`.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n width -= clippingStableScrollbarWidth;\n }\n } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n // If the <body> scrollbar is on the left, the width needs to be extended\n // by the scrollbar amount so there isn't extra space on the right.\n width += windowScrollbarX;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);\n let top = firstRect.top;\n let right = firstRect.right;\n let bottom = firstRect.bottom;\n let left = firstRect.left;\n for (let i = 1; i < clippingAncestors.length; i++) {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);\n top = max(rect.top, top);\n right = min(rect.right, right);\n bottom = min(rect.bottom, bottom);\n left = max(rect.left, left);\n }\n return {\n width: right - left,\n height: bottom - top,\n x: left,\n y: top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n function setLeftRTLScrollbarOffset() {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n setLeftRTLScrollbarOffset();\n }\n }\n if (isFixed && !isOffsetParentAnElement && documentElement) {\n setLeftRTLScrollbarOffset();\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n if (floating) {\n resizeObserver.observe(floating);\n }\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n"],"x_google_ignoreList":[0,1,2,3,4],"mappings":";AACA,IAAI,IAAI,MAAM;CACb,OAAO,MAAM,GAAG,GAAG;EAClB,IAAI;GACH,OAAO,EAAE,KAAK,EAAE,CAAC;EAClB,SAAS,GAAG;GACX,OAAO,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,MAAM,OAAO,KAAK,WAAW,IAAI,KAAK,OAAO,EAAE,WAAW,WAAW,EAAE,UAAU,OAAO,CAAC,GAAG,CAAC,CAAC;EAClI;CACD;AACD,GAAG,IAAI,MAAM,UAAU,EAAE;CACxB,OAAO;CACP,OAAO;CACP,YAAY,GAAG;EACd,MAAM,GAAG,KAAK,QAAQ;CACvB;CACA,OAAO,KAAK,GAAG;EACd,OAAO,IAAI,EAAE,CAAC;CACf;CACA,IAAI,GAAG;EACN,OAAO;CACR;CACA,QAAQ,GAAG;EACV,OAAO,IAAI,EAAE,EAAE,KAAK,KAAK,CAAC;CAC3B;CACA,QAAQ,GAAG;EACV,OAAO;CACR;CACA,UAAU,GAAG;EACZ,OAAO,EAAE,KAAK,KAAK;CACpB;CACA,YAAY;EACX,OAAO;CACR;CACA,OAAO;EACN,OAAO,EAAE,KAAK,KAAK,KAAK;CACzB;CACA,K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,MACb,KACF,qBAAqB,CAAO;CAEhC;AACF;AAmBA,IAAM,KAAS,IAeT,KAAQ,IAQR,KAAO,IAwCP,MAAmB,GAAW,GAAU,MAAY;CAIxD,IAAM,oBAAQ,IAAI,IAAI,GAChB,IAAgB;EACpB;EACA,GAAG;CACL,GACM,IAAoB;EACxB,GAAG,EAAc;EACjB,IAAI;CACN;CACA,OAAO,GAAkB,GAAW,GAAU;EAC5C,GAAG;EACH,UAAU;CACZ,CAAC;AACH"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
//#region ../../node_modules/highlight.js/es/languages/xml.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = e.regex, n = t.concat(/[\p{L}_]/u, t.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), r = /[\p{L}0-9._:-]+/u, i = {
|
|
4
|
+
className: "symbol",
|
|
5
|
+
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
6
|
+
}, a = {
|
|
7
|
+
begin: /\s/,
|
|
8
|
+
contains: [{
|
|
9
|
+
className: "keyword",
|
|
10
|
+
begin: /#?[a-z_][a-z1-9_-]+/,
|
|
11
|
+
illegal: /\n/
|
|
12
|
+
}]
|
|
13
|
+
}, o = e.inherit(a, {
|
|
14
|
+
begin: /\(/,
|
|
15
|
+
end: /\)/
|
|
16
|
+
}), s = e.inherit(e.APOS_STRING_MODE, { className: "string" }), c = e.inherit(e.QUOTE_STRING_MODE, { className: "string" }), l = {
|
|
17
|
+
endsWithParent: !0,
|
|
18
|
+
illegal: /</,
|
|
19
|
+
relevance: 0,
|
|
20
|
+
contains: [{
|
|
21
|
+
className: "attr",
|
|
22
|
+
begin: r,
|
|
23
|
+
relevance: 0
|
|
24
|
+
}, {
|
|
25
|
+
begin: /=\s*/,
|
|
26
|
+
relevance: 0,
|
|
27
|
+
contains: [{
|
|
28
|
+
className: "string",
|
|
29
|
+
endsParent: !0,
|
|
30
|
+
variants: [
|
|
31
|
+
{
|
|
32
|
+
begin: /"/,
|
|
33
|
+
end: /"/,
|
|
34
|
+
contains: [i]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
begin: /'/,
|
|
38
|
+
end: /'/,
|
|
39
|
+
contains: [i]
|
|
40
|
+
},
|
|
41
|
+
{ begin: /[^\s"'=<>`]+/ }
|
|
42
|
+
]
|
|
43
|
+
}]
|
|
44
|
+
}]
|
|
45
|
+
};
|
|
46
|
+
return {
|
|
47
|
+
name: "HTML, XML",
|
|
48
|
+
aliases: [
|
|
49
|
+
"html",
|
|
50
|
+
"xhtml",
|
|
51
|
+
"rss",
|
|
52
|
+
"atom",
|
|
53
|
+
"xjb",
|
|
54
|
+
"xsd",
|
|
55
|
+
"xsl",
|
|
56
|
+
"plist",
|
|
57
|
+
"wsf",
|
|
58
|
+
"svg"
|
|
59
|
+
],
|
|
60
|
+
case_insensitive: !0,
|
|
61
|
+
unicodeRegex: !0,
|
|
62
|
+
contains: [
|
|
63
|
+
{
|
|
64
|
+
className: "meta",
|
|
65
|
+
begin: /<![a-z]/,
|
|
66
|
+
end: />/,
|
|
67
|
+
relevance: 10,
|
|
68
|
+
contains: [
|
|
69
|
+
a,
|
|
70
|
+
c,
|
|
71
|
+
s,
|
|
72
|
+
o,
|
|
73
|
+
{
|
|
74
|
+
begin: /\[/,
|
|
75
|
+
end: /\]/,
|
|
76
|
+
contains: [{
|
|
77
|
+
className: "meta",
|
|
78
|
+
begin: /<![a-z]/,
|
|
79
|
+
end: />/,
|
|
80
|
+
contains: [
|
|
81
|
+
a,
|
|
82
|
+
o,
|
|
83
|
+
c,
|
|
84
|
+
s
|
|
85
|
+
]
|
|
86
|
+
}]
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
e.COMMENT(/<!--/, /-->/, { relevance: 10 }),
|
|
91
|
+
{
|
|
92
|
+
begin: /<!\[CDATA\[/,
|
|
93
|
+
end: /\]\]>/,
|
|
94
|
+
relevance: 10
|
|
95
|
+
},
|
|
96
|
+
i,
|
|
97
|
+
{
|
|
98
|
+
className: "meta",
|
|
99
|
+
end: /\?>/,
|
|
100
|
+
variants: [{
|
|
101
|
+
begin: /<\?xml/,
|
|
102
|
+
relevance: 10,
|
|
103
|
+
contains: [c]
|
|
104
|
+
}, { begin: /<\?[a-z][a-z0-9]+/ }]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
className: "tag",
|
|
108
|
+
begin: /<style(?=\s|>)/,
|
|
109
|
+
end: />/,
|
|
110
|
+
keywords: { name: "style" },
|
|
111
|
+
contains: [l],
|
|
112
|
+
starts: {
|
|
113
|
+
end: /<\/style>/,
|
|
114
|
+
returnEnd: !0,
|
|
115
|
+
subLanguage: ["css", "xml"]
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
className: "tag",
|
|
120
|
+
begin: /<script(?=\s|>)/,
|
|
121
|
+
end: />/,
|
|
122
|
+
keywords: { name: "script" },
|
|
123
|
+
contains: [l],
|
|
124
|
+
starts: {
|
|
125
|
+
end: /<\/script>/,
|
|
126
|
+
returnEnd: !0,
|
|
127
|
+
subLanguage: [
|
|
128
|
+
"javascript",
|
|
129
|
+
"handlebars",
|
|
130
|
+
"xml"
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
className: "tag",
|
|
136
|
+
begin: /<>|<\/>/
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
className: "tag",
|
|
140
|
+
begin: t.concat(/</, t.lookahead(t.concat(n, t.either(/\/>/, />/, /\s/)))),
|
|
141
|
+
end: /\/?>/,
|
|
142
|
+
contains: [{
|
|
143
|
+
className: "name",
|
|
144
|
+
begin: n,
|
|
145
|
+
relevance: 0,
|
|
146
|
+
starts: l
|
|
147
|
+
}]
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
className: "tag",
|
|
151
|
+
begin: t.concat(/<\//, t.lookahead(t.concat(n, />/))),
|
|
152
|
+
contains: [{
|
|
153
|
+
className: "name",
|
|
154
|
+
begin: n,
|
|
155
|
+
relevance: 0
|
|
156
|
+
}, {
|
|
157
|
+
begin: />/,
|
|
158
|
+
relevance: 0,
|
|
159
|
+
endsParent: !0
|
|
160
|
+
}]
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
export { e as default };
|
|
167
|
+
|
|
168
|
+
//# sourceMappingURL=xml-BpsgObpu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xml-BpsgObpu.js","names":[],"sources":["../../../../node_modules/highlight.js/es/languages/xml.js"],"sourcesContent":["/*\nLanguage: HTML, XML\nWebsite: https://www.w3.org/XML/\nCategory: common, web\nAudit: 2020\n*/\n\n/** @type LanguageFn */\nfunction xml(hljs) {\n const regex = hljs.regex;\n // XML names can have the following additional letters: https://www.w3.org/TR/xml/#NT-NameChar\n // OTHER_NAME_CHARS = /[:\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]/;\n // Element names start with NAME_START_CHAR followed by optional other Unicode letters, ASCII digits, hyphens, underscores, and periods\n // const TAG_NAME_RE = regex.concat(/[A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/, regex.optional(/[A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*:/), /[A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*/);;\n // const XML_IDENT_RE = /[A-Z_a-z:\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]+/;\n // const TAG_NAME_RE = regex.concat(/[A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/, regex.optional(/[A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*:/), /[A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*/);\n // however, to cater for performance and more Unicode support rely simply on the Unicode letter class\n const TAG_NAME_RE = regex.concat(/[\\p{L}_]/u, regex.optional(/[\\p{L}0-9_.-]*:/u), /[\\p{L}0-9_.-]*/u);\n const XML_IDENT_RE = /[\\p{L}0-9._:-]+/u;\n const XML_ENTITIES = {\n className: 'symbol',\n begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/\n };\n const XML_META_KEYWORDS = {\n begin: /\\s/,\n contains: [\n {\n className: 'keyword',\n begin: /#?[a-z_][a-z1-9_-]+/,\n illegal: /\\n/\n }\n ]\n };\n const XML_META_PAR_KEYWORDS = hljs.inherit(XML_META_KEYWORDS, {\n begin: /\\(/,\n end: /\\)/\n });\n const APOS_META_STRING_MODE = hljs.inherit(hljs.APOS_STRING_MODE, { className: 'string' });\n const QUOTE_META_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, { className: 'string' });\n const TAG_INTERNALS = {\n endsWithParent: true,\n illegal: /</,\n relevance: 0,\n contains: [\n {\n className: 'attr',\n begin: XML_IDENT_RE,\n relevance: 0\n },\n {\n begin: /=\\s*/,\n relevance: 0,\n contains: [\n {\n className: 'string',\n endsParent: true,\n variants: [\n {\n begin: /\"/,\n end: /\"/,\n contains: [ XML_ENTITIES ]\n },\n {\n begin: /'/,\n end: /'/,\n contains: [ XML_ENTITIES ]\n },\n { begin: /[^\\s\"'=<>`]+/ }\n ]\n }\n ]\n }\n ]\n };\n return {\n name: 'HTML, XML',\n aliases: [\n 'html',\n 'xhtml',\n 'rss',\n 'atom',\n 'xjb',\n 'xsd',\n 'xsl',\n 'plist',\n 'wsf',\n 'svg'\n ],\n case_insensitive: true,\n unicodeRegex: true,\n contains: [\n {\n className: 'meta',\n begin: /<![a-z]/,\n end: />/,\n relevance: 10,\n contains: [\n XML_META_KEYWORDS,\n QUOTE_META_STRING_MODE,\n APOS_META_STRING_MODE,\n XML_META_PAR_KEYWORDS,\n {\n begin: /\\[/,\n end: /\\]/,\n contains: [\n {\n className: 'meta',\n begin: /<![a-z]/,\n end: />/,\n contains: [\n XML_META_KEYWORDS,\n XML_META_PAR_KEYWORDS,\n QUOTE_META_STRING_MODE,\n APOS_META_STRING_MODE\n ]\n }\n ]\n }\n ]\n },\n hljs.COMMENT(\n /<!--/,\n /-->/,\n { relevance: 10 }\n ),\n {\n begin: /<!\\[CDATA\\[/,\n end: /\\]\\]>/,\n relevance: 10\n },\n XML_ENTITIES,\n // xml processing instructions\n {\n className: 'meta',\n end: /\\?>/,\n variants: [\n {\n begin: /<\\?xml/,\n relevance: 10,\n contains: [\n QUOTE_META_STRING_MODE\n ]\n },\n {\n begin: /<\\?[a-z][a-z0-9]+/,\n }\n ]\n\n },\n {\n className: 'tag',\n /*\n The lookahead pattern (?=...) ensures that 'begin' only matches\n '<style' as a single word, followed by a whitespace or an\n ending bracket.\n */\n begin: /<style(?=\\s|>)/,\n end: />/,\n keywords: { name: 'style' },\n contains: [ TAG_INTERNALS ],\n starts: {\n end: /<\\/style>/,\n returnEnd: true,\n subLanguage: [\n 'css',\n 'xml'\n ]\n }\n },\n {\n className: 'tag',\n // See the comment in the <style tag about the lookahead pattern\n begin: /<script(?=\\s|>)/,\n end: />/,\n keywords: { name: 'script' },\n contains: [ TAG_INTERNALS ],\n starts: {\n end: /<\\/script>/,\n returnEnd: true,\n subLanguage: [\n 'javascript',\n 'handlebars',\n 'xml'\n ]\n }\n },\n // we need this for now for jSX\n {\n className: 'tag',\n begin: /<>|<\\/>/\n },\n // open tag\n {\n className: 'tag',\n begin: regex.concat(\n /</,\n regex.lookahead(regex.concat(\n TAG_NAME_RE,\n // <tag/>\n // <tag>\n // <tag ...\n regex.either(/\\/>/, />/, /\\s/)\n ))\n ),\n end: /\\/?>/,\n contains: [\n {\n className: 'name',\n begin: TAG_NAME_RE,\n relevance: 0,\n starts: TAG_INTERNALS\n }\n ]\n },\n // close tag\n {\n className: 'tag',\n begin: regex.concat(\n /<\\//,\n regex.lookahead(regex.concat(\n TAG_NAME_RE, />/\n ))\n ),\n contains: [\n {\n className: 'name',\n begin: TAG_NAME_RE,\n relevance: 0\n },\n {\n begin: />/,\n relevance: 0,\n endsParent: true\n }\n ]\n }\n ]\n };\n}\n\nexport { xml as default };\n"],"x_google_ignoreList":[0],"mappings":";AAQA,SAAS,EAAI,GAAM;CACjB,IAAM,IAAQ,EAAK,OAQb,IAAc,EAAM,OAAO,aAAa,EAAM,SAAS,kBAAkB,GAAG,iBAAiB,GAC7F,IAAe,oBACf,IAAe;EACnB,WAAW;EACX,OAAO;CACT,GACM,IAAoB;EACxB,OAAO;EACP,UAAU,CACR;GACE,WAAW;GACX,OAAO;GACP,SAAS;EACX,CACF;CACF,GACM,IAAwB,EAAK,QAAQ,GAAmB;EAC5D,OAAO;EACP,KAAK;CACP,CAAC,GACK,IAAwB,EAAK,QAAQ,EAAK,kBAAkB,EAAE,WAAW,SAAS,CAAC,GACnF,IAAyB,EAAK,QAAQ,EAAK,mBAAmB,EAAE,WAAW,SAAS,CAAC,GACrF,IAAgB;EACpB,gBAAgB;EAChB,SAAS;EACT,WAAW;EACX,UAAU,CACR;GACE,WAAW;GACX,OAAO;GACP,WAAW;EACb,GACA;GACE,OAAO;GACP,WAAW;GACX,UAAU,CACR;IACE,WAAW;IACX,YAAY;IACZ,UAAU;KACR;MACE,OAAO;MACP,KAAK;MACL,UAAU,CAAE,CAAa;KAC3B;KACA;MACE,OAAO;MACP,KAAK;MACL,UAAU,CAAE,CAAa;KAC3B;KACA,EAAE,OAAO,eAAe;IAC1B;GACF,CACF;EACF,CACF;CACF;CACA,OAAO;EACL,MAAM;EACN,SAAS;GACP;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,kBAAkB;EAClB,cAAc;EACd,UAAU;GACR;IACE,WAAW;IACX,OAAO;IACP,KAAK;IACL,WAAW;IACX,UAAU;KACR;KACA;KACA;KACA;KACA;MACE,OAAO;MACP,KAAK;MACL,UAAU,CACR;OACE,WAAW;OACX,OAAO;OACP,KAAK;OACL,UAAU;QACR;QACA;QACA;QACA;OACF;MACF,CACF;KACF;IACF;GACF;GACA,EAAK,QACH,QACA,OACA,EAAE,WAAW,GAAG,CAClB;GACA;IACE,OAAO;IACP,KAAK;IACL,WAAW;GACb;GACA;GAEA;IACE,WAAW;IACX,KAAK;IACL,UAAU,CACR;KACE,OAAO;KACP,WAAW;KACX,UAAU,CACR,CACF;IACF,GACA,EACE,OAAO,oBACT,CACF;GAEF;GACA;IACE,WAAW;IAMX,OAAO;IACP,KAAK;IACL,UAAU,EAAE,MAAM,QAAQ;IAC1B,UAAU,CAAE,CAAc;IAC1B,QAAQ;KACN,KAAK;KACL,WAAW;KACX,aAAa,CACX,OACA,KACF;IACF;GACF;GACA;IACE,WAAW;IAEX,OAAO;IACP,KAAK;IACL,UAAU,EAAE,MAAM,SAAS;IAC3B,UAAU,CAAE,CAAc;IAC1B,QAAQ;KACN,KAAK;KACL,WAAW;KACX,aAAa;MACX;MACA;MACA;KACF;IACF;GACF;GAEA;IACE,WAAW;IACX,OAAO;GACT;GAEA;IACE,WAAW;IACX,OAAO,EAAM,OACX,KACA,EAAM,UAAU,EAAM,OACpB,GAIA,EAAM,OAAO,OAAO,KAAK,IAAI,CAC/B,CAAC,CACH;IACA,KAAK;IACL,UAAU,CACR;KACE,WAAW;KACX,OAAO;KACP,WAAW;KACX,QAAQ;IACV,CACF;GACF;GAEA;IACE,WAAW;IACX,OAAO,EAAM,OACX,OACA,EAAM,UAAU,EAAM,OACpB,GAAa,GACf,CAAC,CACH;IACA,UAAU,CACR;KACE,WAAW;KACX,OAAO;KACP,WAAW;IACb,GACA;KACE,OAAO;KACP,WAAW;KACX,YAAY;IACd,CACF;GACF;EACF;CACF;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeblock-backspace.d.ts","sourceRoot":"","sources":["../src/codeblock-backspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,cAAc,CAAC;AActD,eAAO,MAAM,kBAAkB,qBA4B7B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type EditorDocument } from '@openstage/glyph-core';
|
|
2
|
+
/**
|
|
3
|
+
* Structural shape of an editing-engine (ProseMirror/Tiptap) JSON node. This
|
|
4
|
+
* module is the *only* place that knows the engine wire format, keeping that
|
|
5
|
+
* knowledge out of the public `@openstage/glyph-core` surface. Pure (no engine
|
|
6
|
+
* import) so it stays unit-testable.
|
|
7
|
+
*/
|
|
8
|
+
export type EngineNode = {
|
|
9
|
+
type?: string;
|
|
10
|
+
attrs?: Record<string, unknown>;
|
|
11
|
+
content?: EngineNode[];
|
|
12
|
+
marks?: {
|
|
13
|
+
type: string;
|
|
14
|
+
attrs?: Record<string, unknown>;
|
|
15
|
+
}[];
|
|
16
|
+
text?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Public document → engine document JSON. The public schema and the engine's
|
|
20
|
+
* default schema are intentionally aligned, so this drops the version envelope
|
|
21
|
+
* and hands over the inner doc.
|
|
22
|
+
*/
|
|
23
|
+
export declare const toEngineDoc: (document: EditorDocument) => EngineNode;
|
|
24
|
+
/**
|
|
25
|
+
* Engine document JSON → public document, re-applying the schema-version
|
|
26
|
+
* envelope. Empty/garbage input collapses to an empty document.
|
|
27
|
+
*/
|
|
28
|
+
export declare const fromEngineDoc: (doc: EngineNode | null | undefined) => EditorDocument;
|
|
29
|
+
//# sourceMappingURL=document-conversion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-conversion.d.ts","sourceRoot":"","sources":["../src/document-conversion.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAGpB,MAAM,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,EAAE,CAAC;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU,cAAc,KAAG,UACZ,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,KAAK,UAAU,GAAG,IAAI,GAAG,SAAS,KAAG,cAMjE,CAAC"}
|