dsh-web-annotator 0.0.0-stage → 0.2.0-alpha.11
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/CHANGELOG.md +112 -0
- package/CONTRIBUTING.md +90 -0
- package/LICENSE +21 -0
- package/README.md +110 -2
- package/README_en.md +136 -0
- package/THIRD_PARTY_NOTICES.md +15 -0
- package/cordis.patch.yml +15 -0
- package/docs/AGENTS.md +16 -0
- package/docs/README.md +25 -0
- package/docs/architecture.md +170 -0
- package/docs/browser-integration.md +94 -0
- package/docs/distribution.md +66 -0
- package/docs/harness-browser-annotation.patch +1909 -0
- package/docs/images/annotation-expanded-dark.png +0 -0
- package/docs/images/annotation-expanded.png +0 -0
- package/docs/images/annotation-image.png +0 -0
- package/docs/images/annotation-message.png +0 -0
- package/docs/images/annotation-region.png +0 -0
- package/docs/marketplace/cslkkl__dsh-web-annotator.yml +7 -0
- package/docs/publishing.md +129 -0
- package/docs/roadmap.md +31 -0
- package/docs/verification.md +179 -0
- package/dsh-plugin.naming.json +27 -0
- package/examples/responsive-demo/AGENTS.md +12 -0
- package/examples/responsive-demo/README.md +33 -0
- package/examples/responsive-demo/index.html +13 -0
- package/examples/responsive-demo/src/main.tsx +110 -0
- package/examples/responsive-demo/src/style.css +344 -0
- package/examples/responsive-demo/vite.config.ts +9 -0
- package/lib/THIRD_PARTY_LICENSES.md +345 -0
- package/lib/bridge.js +890 -0
- package/lib/bridge.js.map +7 -0
- package/lib/client.js +1083 -0
- package/lib/client.js.map +7 -0
- package/lib/host/THIRD_PARTY_NOTICES.md +15 -0
- package/lib/host/browser-provider/LICENSE +21 -0
- package/lib/host/browser-provider/README.md +130 -0
- package/lib/host/browser-provider/lib/client.css +217 -0
- package/lib/host/browser-provider/lib/client.css.map +7 -0
- package/lib/host/browser-provider/lib/client.js +2360 -0
- package/lib/host/browser-provider/lib/client.js.map +7 -0
- package/lib/host/browser-provider/lib/index.js +7 -0
- package/lib/host/browser-provider/lib/index.js.map +7 -0
- package/lib/host/browser-provider/package.json +23 -0
- package/lib/host/bundle.json +27 -0
- package/lib/host/chat-provider/LICENSE +21 -0
- package/lib/host/chat-provider/README.md +186 -0
- package/lib/host/chat-provider/lib/client.css +1604 -0
- package/lib/host/chat-provider/lib/client.css.map +7 -0
- package/lib/host/chat-provider/lib/client.js +11074 -0
- package/lib/host/chat-provider/lib/client.js.map +7 -0
- package/lib/host/chat-provider/lib/index.js +911 -0
- package/lib/host/chat-provider/lib/index.js.map +7 -0
- package/lib/host/chat-provider/package.json +31 -0
- package/lib/host/layout-provider/LICENSE +21 -0
- package/lib/host/layout-provider/README.md +109 -0
- package/lib/host/layout-provider/lib/client.css +177 -0
- package/lib/host/layout-provider/lib/client.css.map +7 -0
- package/lib/host/layout-provider/lib/client.js +565 -0
- package/lib/host/layout-provider/lib/client.js.map +7 -0
- package/lib/host/layout-provider/lib/index.js +7 -0
- package/lib/host/layout-provider/lib/index.js.map +7 -0
- package/lib/host/layout-provider/package.json +25 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +9 -0
- package/lib/index.js.map +7 -0
- package/lib/vite.d.ts +8 -0
- package/lib/vite.js +1254 -0
- package/lib/vite.js.map +7 -0
- package/licenses/deepseek-harness-MIT.txt +21 -0
- package/locale/AGENTS.md +11 -0
- package/locale/README.md +11 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +154 -4
- package/screenshots.json +7 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../AppData/Roaming/npm/node_modules/@deepseek-ai/dsh/node_modules/@deepseek-ai/cosmokit/lib/index.js", "../../../../../../AppData/Roaming/npm/node_modules/@deepseek-ai/dsh/node_modules/@deepseek-ai/schemastery/lib/index.mjs", "../../../../harness-browser-integration/packages/client/ui-chat/src/chat-settings.ts", "../../../../harness-browser-integration/packages/client/ui-chat/src/index.ts"],
|
|
4
|
+
"sourcesContent": ["//#region lib/types/misc.js\n/** No-op callback returning `undefined` at runtime and `any` at type level. */\nfunction noop() {}\n/** Return true when a value is `null` or `undefined`. */\nfunction isNullable(value) {\n\treturn value === null || value === void 0;\n}\n/** Return true when a value is neither `null` nor `undefined`. */\nfunction isNonNullable(value) {\n\treturn !isNullable(value);\n}\n/** Return true for non-array object values. */\nfunction isPlainObject(data) {\n\treturn data && typeof data === \"object\" && !Array.isArray(data);\n}\n/** Filter object entries and return a new object. */\nfunction filterKeys(object, filter) {\n\treturn Object.fromEntries(Object.entries(object).filter(([key, value]) => filter(key, value)));\n}\n/** Map object values while preserving the original key set. */\nfunction mapValues(object, transform) {\n\treturn Object.fromEntries(Object.entries(object).map(([key, value]) => [key, transform(value, key)]));\n}\n/** Pick selected keys from an object, optionally including `undefined` values. */\nfunction pick(source, keys, forced) {\n\tif (!keys) return { ...source };\n\tconst result = {};\n\tfor (const key of keys) if (forced || source[key] !== void 0) result[key] = source[key];\n\treturn result;\n}\n/** Omit selected keys from a shallow object copy. */\nfunction omit(source, keys) {\n\tif (!keys) return { ...source };\n\tconst result = { ...source };\n\tfor (const key of keys) Reflect.deleteProperty(result, key);\n\treturn result;\n}\n/** Define a non-enumerable writable property and return the object. */\nfunction defineProperty(object, key, value) {\n\treturn Object.defineProperty(object, key, {\n\t\twritable: true,\n\t\tvalue,\n\t\tenumerable: false\n\t});\n}\n//#endregion\n//#region lib/types/array.js\n/** Return true when every item in `array2` is present in `array1`. */\nfunction contain(array1, array2) {\n\treturn array2.every((item) => array1.includes(item));\n}\n/** Return items that appear in both arrays. */\nfunction intersection(array1, array2) {\n\treturn array1.filter((item) => array2.includes(item));\n}\n/** Return items from `array1` that do not appear in `array2`. */\nfunction difference(array1, array2) {\n\treturn array1.filter((item) => !array2.includes(item));\n}\n/** Return the set-union of two arrays while preserving first occurrence order. */\nfunction union(array1, array2) {\n\treturn Array.from(new Set([...array1, ...array2]));\n}\n/** Remove duplicate values while preserving first occurrence order. */\nfunction deduplicate(array) {\n\treturn [...new Set(array)];\n}\n/** Remove one item from an array and report whether it was found. */\nfunction remove(list, item) {\n\tconst index = list?.indexOf(item);\n\tif (index >= 0) {\n\t\tlist.splice(index, 1);\n\t\treturn true;\n\t} else return false;\n}\n/** Normalize nullish, scalar, or array input to an array. */\nfunction makeArray(source) {\n\treturn Array.isArray(source) ? source : isNullable(source) ? [] : [source];\n}\n//#endregion\n//#region lib/types/volatile.js\n/** Shared config references used by schema validators and plugin runtimes. */\nconst write = Symbol.for(\"cosmokit.volatile.write\");\nfunction snapshot(value, ancestors = /* @__PURE__ */ new Set()) {\n\tif (typeof value === \"function\") throw new TypeError(\"volatile config cannot contain functions\");\n\tif (value === null || typeof value !== \"object\") return value;\n\tif (ancestors.has(value)) throw new TypeError(\"volatile config cannot contain cycles\");\n\tancestors.add(value);\n\ttry {\n\t\tif (Array.isArray(value)) return Object.freeze(value.map((item) => snapshot(item, ancestors)));\n\t\tif (Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) throw new TypeError(\"volatile config objects must be plain objects or arrays\");\n\t\treturn Object.freeze(Object.fromEntries(Object.entries(value).map(([key, item]) => [key, snapshot(item, ancestors)])));\n\t} finally {\n\t\tancestors.delete(value);\n\t}\n}\n/**\n* Create a detached reference containing an immutable copy of the supplied data.\n* @param value - validated config data; class instances and functions are unsupported.\n* @returns a reference whose value is updated only by its owning runtime.\n*/\nfunction createVolatile(value) {\n\tlet current = snapshot(value);\n\treturn Object.freeze({\n\t\tget: () => current,\n\t\t[write]: (value) => {\n\t\t\tcurrent = value;\n\t\t}\n\t});\n}\n/**\n* Identify references across ESM/CJS copies of the shared library.\n* @param value - a parsed config value.\n* @returns whether the value implements the shared reference protocol.\n*/\nfunction isVolatile(value) {\n\treturn typeof value === \"object\" && value !== null && write in value;\n}\n/**\n* Collect config references without descending into their snapshots or opaque objects.\n* @internal\n* @param value - parsed config; cyclic ordinary fields are visited once per path.\n* @returns references and their object-key paths, including an empty path for a root reference.\n*/\nfunction volatileEntries(value) {\n\tconst ancestors = /* @__PURE__ */ new Set();\n\tfunction visit(value, path) {\n\t\tif (isVolatile(value)) return [{\n\t\t\tpath,\n\t\t\tref: value\n\t\t}];\n\t\tif (!value || typeof value !== \"object\" || ancestors.has(value)) return [];\n\t\tif (!Array.isArray(value) && Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) return [];\n\t\tancestors.add(value);\n\t\ttry {\n\t\t\treturn Object.entries(value).flatMap(([key, child]) => visit(child, [...path, key]));\n\t\t} finally {\n\t\t\tancestors.delete(value);\n\t\t}\n\t}\n\treturn visit(value, []);\n}\n/**\n* Commit an already validated immutable snapshot from another reference.\n* @internal\n* @param target - the owning plugin's stable reference.\n* @param source - a newly parsed candidate reference.\n*/\nfunction updateVolatile(target, source) {\n\ttarget[write](source.get());\n}\n//#endregion\n//#region lib/types/types.js\n/** Test values using `instanceof` with a `toStringTag` fallback. */\nfunction is(type, value) {\n\tif (arguments.length === 1) return (value) => is(type, value);\n\treturn type in globalThis && value instanceof globalThis[type] || Object.prototype.toString.call(value).slice(8, -1) === type;\n}\nfunction isArrayBufferLike(value) {\n\treturn is(\"ArrayBuffer\", value) || is(\"SharedArrayBuffer\", value);\n}\nfunction isArrayBufferSource(value) {\n\treturn isArrayBufferLike(value) || ArrayBuffer.isView(value);\n}\n/** Binary source detection and base64/hex conversion helpers. */\nvar Binary;\n(function(Binary) {\n\tBinary.is = isArrayBufferLike;\n\tBinary.isSource = isArrayBufferSource;\n\tfunction fromSource(source) {\n\t\tif (ArrayBuffer.isView(source)) return source.buffer.slice(source.byteOffset, source.byteOffset + source.byteLength);\n\t\telse return source;\n\t}\n\tBinary.fromSource = fromSource;\n\tfunction toBase64(source) {\n\t\tsource = fromSource(source);\n\t\tif (typeof Buffer !== \"undefined\") return Buffer.from(source).toString(\"base64\");\n\t\tlet binary = \"\";\n\t\tconst bytes = new Uint8Array(source);\n\t\tfor (let i = 0; i < bytes.byteLength; i++) binary += String.fromCharCode(bytes[i]);\n\t\treturn btoa(binary);\n\t}\n\tBinary.toBase64 = toBase64;\n\tfunction fromBase64(source) {\n\t\tif (typeof Buffer !== \"undefined\") return fromSource(Buffer.from(source, \"base64\"));\n\t\treturn Uint8Array.from(atob(source), (c) => c.charCodeAt(0));\n\t}\n\tBinary.fromBase64 = fromBase64;\n\tfunction toHex(source) {\n\t\tsource = fromSource(source);\n\t\tif (typeof Buffer !== \"undefined\") return Buffer.from(source).toString(\"hex\");\n\t\treturn Array.from(new Uint8Array(source), (byte) => byte.toString(16).padStart(2, \"0\")).join(\"\");\n\t}\n\tBinary.toHex = toHex;\n\tfunction fromHex(source) {\n\t\tif (typeof Buffer !== \"undefined\") return fromSource(Buffer.from(source, \"hex\"));\n\t\tconst hex = source.length % 2 === 0 ? source : source.slice(0, source.length - 1);\n\t\tconst buffer = [];\n\t\tfor (let i = 0; i < hex.length; i += 2) buffer.push(parseInt(`${hex[i]}${hex[i + 1]}`, 16));\n\t\treturn Uint8Array.from(buffer).buffer;\n\t}\n\tBinary.fromHex = fromHex;\n})(Binary || (Binary = {}));\n/** Decode a base64 string into binary data. */\nconst base64ToArrayBuffer = Binary.fromBase64;\n/** Encode binary data as base64. */\nconst arrayBufferToBase64 = Binary.toBase64;\n/** Decode a hex string into binary data. */\nconst hexToArrayBuffer = Binary.fromHex;\n/** Encode binary data as hex. */\nconst arrayBufferToHex = Binary.toHex;\n/** Deep-clone common JavaScript values while preserving prototypes and cycles. */\nfunction clone(source, refs = /* @__PURE__ */ new Map()) {\n\tif (!source || typeof source !== \"object\") return source;\n\tif (is(\"Date\", source)) return new Date(source.valueOf());\n\tif (is(\"RegExp\", source)) return new RegExp(source.source, source.flags);\n\tif (isArrayBufferLike(source)) return source.slice(0);\n\tif (ArrayBuffer.isView(source)) return source.buffer.slice(source.byteOffset, source.byteOffset + source.byteLength);\n\tconst cached = refs.get(source);\n\tif (cached) return cached;\n\tif (Array.isArray(source)) {\n\t\tconst result = [];\n\t\trefs.set(source, result);\n\t\tsource.forEach((value, index) => {\n\t\t\tresult[index] = Reflect.apply(clone, null, [value, refs]);\n\t\t});\n\t\treturn result;\n\t}\n\tconst result = Object.create(Object.getPrototypeOf(source));\n\trefs.set(source, result);\n\tfor (const key of Reflect.ownKeys(source)) {\n\t\tconst descriptor = { ...Reflect.getOwnPropertyDescriptor(source, key) };\n\t\tif (\"value\" in descriptor) descriptor.value = Reflect.apply(clone, null, [descriptor.value, refs]);\n\t\tReflect.defineProperty(result, key, descriptor);\n\t}\n\treturn result;\n}\n/**\n* Compare values recursively, treating two volatile references as equal regardless of value.\n* Strict comparison distinguishes null/undefined, treats opaque objects by identity,\n* compares URLs by normalized href, treats array holes as undefined, and considers distinct cyclic structures unequal.\n* @param a - first value.\n* @param b - second value.\n* @param strict - whether to require strict data equality outside volatile references.\n* @returns whether the values compare equal.\n*/\nfunction deepEqual(a, b, strict) {\n\tconst ancestors = /* @__PURE__ */ new Set();\n\tfunction compare(a, b) {\n\t\tif (a === b) return true;\n\t\tif (isVolatile(a) || isVolatile(b)) return isVolatile(a) && isVolatile(b);\n\t\tif (!strict && isNullable(a) && isNullable(b)) return true;\n\t\tif (typeof a !== typeof b || typeof a !== \"object\" || !a || !b) return false;\n\t\tif (ancestors.has(a)) return false;\n\t\tfunction check(test, then) {\n\t\t\treturn test(a) ? test(b) ? then(a, b) : false : test(b) ? false : void 0;\n\t\t}\n\t\tancestors.add(a);\n\t\ttry {\n\t\t\treturn check(Array.isArray, (a, b) => {\n\t\t\t\tif (a.length !== b.length) return false;\n\t\t\t\tfor (let index = 0; index < a.length; index++) if (!compare(a[index], b[index])) return false;\n\t\t\t\treturn true;\n\t\t\t}) ?? check(is(\"Date\"), (a, b) => a.valueOf() === b.valueOf()) ?? check(is(\"URL\"), (a, b) => a.href === b.href) ?? check(is(\"RegExp\"), (a, b) => a.source === b.source && a.flags === b.flags) ?? check(isArrayBufferLike, (a, b) => {\n\t\t\t\tif (a.byteLength !== b.byteLength) return false;\n\t\t\t\tconst viewA = new Uint8Array(a);\n\t\t\t\tconst viewB = new Uint8Array(b);\n\t\t\t\tfor (let i = 0; i < viewA.length; i++) if (viewA[i] !== viewB[i]) return false;\n\t\t\t\treturn true;\n\t\t\t}) ?? ((!strict || [a, b].every((value) => Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null)) && Object.keys({\n\t\t\t\t...a,\n\t\t\t\t...b\n\t\t\t}).every((key) => compare(a[key], b[key])));\n\t\t} finally {\n\t\t\tancestors.delete(a);\n\t\t}\n\t}\n\treturn compare(a, b);\n}\n//#endregion\n//#region lib/types/string.js\n/** Uppercase the first character of a string. */\nfunction capitalize(source) {\n\treturn source.charAt(0).toUpperCase() + source.slice(1);\n}\n/** Lowercase the first character of a string. */\nfunction uncapitalize(source) {\n\treturn source.charAt(0).toLowerCase() + source.slice(1);\n}\n/** Convert dash or underscore delimited text to camelCase. */\nfunction camelCase(source) {\n\treturn source.replace(/[_-][a-z]/g, (str) => str.slice(1).toUpperCase());\n}\nfunction tokenize(source, delimiters, delimiter) {\n\tconst output = [];\n\tlet state = 0;\n\tfor (let i = 0; i < source.length; i++) {\n\t\tconst code = source.charCodeAt(i);\n\t\tif (code >= 65 && code <= 90) {\n\t\t\tif (state === 1) {\n\t\t\t\tconst next = source.charCodeAt(i + 1);\n\t\t\t\tif (next >= 97 && next <= 122) output.push(delimiter);\n\t\t\t\toutput.push(code + 32);\n\t\t\t} else {\n\t\t\t\tif (state !== 0) output.push(delimiter);\n\t\t\t\toutput.push(code + 32);\n\t\t\t}\n\t\t\tstate = 1;\n\t\t} else if (code >= 97 && code <= 122) {\n\t\t\toutput.push(code);\n\t\t\tstate = 2;\n\t\t} else if (delimiters.includes(code)) {\n\t\t\tif (state !== 0) output.push(delimiter);\n\t\t\tstate = 0;\n\t\t} else output.push(code);\n\t}\n\treturn String.fromCharCode(...output);\n}\n/** Convert text to dash-delimited parameter case. */\nfunction paramCase(source) {\n\treturn tokenize(source, [45, 95], 45);\n}\n/** Convert text to underscore-delimited snake case. */\nfunction snakeCase(source) {\n\treturn tokenize(source, [45, 95], 95);\n}\n/** Runtime alias for `camelCase`. */\nconst camelize = camelCase;\n/** Runtime alias for `paramCase`. */\nconst hyphenate = paramCase;\n/** Format a property key as a JavaScript member access suffix. */\nfunction formatProperty(key) {\n\tif (typeof key !== \"string\") return `[${key.toString()}]`;\n\treturn /^[a-z_$][\\w$]*$/i.test(key) ? `.${key}` : `[${JSON.stringify(key)}]`;\n}\n/** Remove one trailing slash from a path string. */\nfunction trimSlash(source) {\n\treturn source.replace(/\\/$/, \"\");\n}\n/** Ensure a path starts with `/` and has no trailing slash. */\nfunction sanitize(source) {\n\tif (!source.startsWith(\"/\")) source = \"/\" + source;\n\treturn trimSlash(source);\n}\n//#endregion\n//#region lib/types/time.js\n/** Time constants plus parsing and formatting helpers. */\nvar Time;\n(function(Time) {\n\tTime.millisecond = 1;\n\tTime.second = 1e3;\n\tTime.minute = Time.second * 60;\n\tTime.hour = Time.minute * 60;\n\tTime.day = Time.hour * 24;\n\tTime.week = Time.day * 7;\n\tlet timezoneOffset = (/* @__PURE__ */ new Date()).getTimezoneOffset();\n\tfunction setTimezoneOffset(offset) {\n\t\ttimezoneOffset = offset;\n\t}\n\tTime.setTimezoneOffset = setTimezoneOffset;\n\tfunction getTimezoneOffset() {\n\t\treturn timezoneOffset;\n\t}\n\tTime.getTimezoneOffset = getTimezoneOffset;\n\tfunction getDateNumber(date = /* @__PURE__ */ new Date(), offset) {\n\t\tif (typeof date === \"number\") date = new Date(date);\n\t\tif (offset === void 0) offset = timezoneOffset;\n\t\treturn Math.floor((date.valueOf() / Time.minute - offset) / 1440);\n\t}\n\tTime.getDateNumber = getDateNumber;\n\tfunction fromDateNumber(value, offset) {\n\t\tconst date = new Date(value * Time.day);\n\t\tif (offset === void 0) offset = timezoneOffset;\n\t\treturn new Date(+date + offset * Time.minute);\n\t}\n\tTime.fromDateNumber = fromDateNumber;\n\tconst numeric = /\\d+(?:\\.\\d+)?/.source;\n\tconst timeRegExp = new RegExp(`^${[\n\t\t\"w(?:eek(?:s)?)?\",\n\t\t\"d(?:ay(?:s)?)?\",\n\t\t\"h(?:our(?:s)?)?\",\n\t\t\"m(?:in(?:ute)?(?:s)?)?\",\n\t\t\"s(?:ec(?:ond)?(?:s)?)?\"\n\t].map((unit) => `(${numeric}${unit})?`).join(\"\")}$`);\n\tfunction parseTime(source) {\n\t\tconst capture = timeRegExp.exec(source);\n\t\tif (!capture) return 0;\n\t\treturn (parseFloat(capture[1]) * Time.week || 0) + (parseFloat(capture[2]) * Time.day || 0) + (parseFloat(capture[3]) * Time.hour || 0) + (parseFloat(capture[4]) * Time.minute || 0) + (parseFloat(capture[5]) * Time.second || 0);\n\t}\n\tTime.parseTime = parseTime;\n\tfunction parseDate(date) {\n\t\tconst parsed = parseTime(date);\n\t\tif (parsed) date = Date.now() + parsed;\n\t\telse if (/^\\d{1,2}(:\\d{1,2}){1,2}$/.test(date)) date = `${(/* @__PURE__ */ new Date()).toLocaleDateString()}-${date}`;\n\t\telse if (/^\\d{1,2}-\\d{1,2}-\\d{1,2}(:\\d{1,2}){1,2}$/.test(date)) date = `${(/* @__PURE__ */ new Date()).getFullYear()}-${date}`;\n\t\treturn date ? new Date(date) : /* @__PURE__ */ new Date();\n\t}\n\tTime.parseDate = parseDate;\n\tfunction format(ms) {\n\t\tconst abs = Math.abs(ms);\n\t\tif (abs >= Time.day - Time.hour / 2) return Math.round(ms / Time.day) + \"d\";\n\t\telse if (abs >= Time.hour - Time.minute / 2) return Math.round(ms / Time.hour) + \"h\";\n\t\telse if (abs >= Time.minute - Time.second / 2) return Math.round(ms / Time.minute) + \"m\";\n\t\telse if (abs >= Time.second) return Math.round(ms / Time.second) + \"s\";\n\t\treturn ms + \"ms\";\n\t}\n\tTime.format = format;\n\tfunction toDigits(source, length = 2) {\n\t\treturn source.toString().padStart(length, \"0\");\n\t}\n\tTime.toDigits = toDigits;\n\tfunction template(template, time = /* @__PURE__ */ new Date()) {\n\t\treturn template.replace(\"yyyy\", time.getFullYear().toString()).replace(\"yy\", time.getFullYear().toString().slice(2)).replace(\"MM\", toDigits(time.getMonth() + 1)).replace(\"dd\", toDigits(time.getDate())).replace(\"hh\", toDigits(time.getHours())).replace(\"mm\", toDigits(time.getMinutes())).replace(\"ss\", toDigits(time.getSeconds())).replace(\"SSS\", toDigits(time.getMilliseconds(), 3));\n\t}\n\tTime.template = template;\n})(Time || (Time = {}));\n//#endregion\nexport { Binary, Time, arrayBufferToBase64, arrayBufferToHex, base64ToArrayBuffer, camelCase, camelize, capitalize, clone, contain, createVolatile, deduplicate, deepEqual, defineProperty, difference, filterKeys, formatProperty, hexToArrayBuffer, hyphenate, intersection, is, isNonNullable, isNullable, isPlainObject, isVolatile, makeArray, mapValues, mapValues as valueMap, noop, omit, paramCase, pick, remove, sanitize, snakeCase, trimSlash, uncapitalize, union, updateVolatile, volatileEntries };\n", "import { Binary, clone, createVolatile, deepEqual, filterKeys, isNullable, isPlainObject, isVolatile, pick, valueMap } from \"@deepseek-ai/cosmokit\";\n//#region lib/types/index.js\nconst kSchema = Symbol.for(\"schemastery\");\nconst kValidationError = Symbol.for(\"ValidationError\");\nglobalThis.__schemastery_index__ ??= 0;\nglobalThis.__schemastery_refs__ = void 0;\nvar ValidationError = class extends TypeError {\n\toptions;\n\tname = \"ValidationError\";\n\tconstructor(message, options) {\n\t\tlet prefix = \"$\";\n\t\tfor (const segment of options.path || []) if (typeof segment === \"string\") prefix += \".\" + segment;\n\t\telse if (typeof segment === \"number\") prefix += \"[\" + segment + \"]\";\n\t\telse if (typeof segment === \"symbol\") prefix += `[Symbol(${segment.toString()})]`;\n\t\tif (prefix.startsWith(\".\")) prefix = prefix.slice(1);\n\t\tsuper((prefix === \"$\" ? \"\" : `${prefix} `) + message);\n\t\tthis.options = options;\n\t}\n\tstatic is(error) {\n\t\treturn !!error?.[kValidationError];\n\t}\n};\nObject.defineProperty(ValidationError.prototype, kValidationError, { value: true });\nconst Schema = function(options) {\n\tconst schema = function(data, options = {}) {\n\t\treturn Schema.resolve(data, schema, options)[0];\n\t};\n\tif (options.refs) {\n\t\tconst refs = valueMap(options.refs, (options) => new Schema(options));\n\t\tconst getRef = (uid) => refs[uid];\n\t\tfor (const key in refs) {\n\t\t\tconst options = refs[key];\n\t\t\toptions.sKey = getRef(options.sKey);\n\t\t\toptions.inner = getRef(options.inner);\n\t\t\toptions.list = options.list && options.list.map(getRef);\n\t\t\toptions.dict = options.dict && valueMap(options.dict, getRef);\n\t\t}\n\t\treturn refs[options.uid];\n\t}\n\tObject.assign(schema, options);\n\tif (typeof schema.callback === \"string\") try {\n\t\tschema.callback = new Function(\"return \" + schema.callback)();\n\t} catch {}\n\tObject.defineProperty(schema, \"uid\", { value: globalThis.__schemastery_index__++ });\n\tObject.setPrototypeOf(schema, Schema.prototype);\n\tschema.meta ||= {};\n\tschema.toString = schema.toString.bind(schema);\n\treturn schema;\n};\nSchema.prototype = Object.create(Function.prototype);\nSchema.prototype[kSchema] = true;\nObject.defineProperty(Schema.prototype, \"~standard\", { get() {\n\treturn {\n\t\tversion: 1,\n\t\tvendor: \"schemastery\",\n\t\tvalidate: (value) => {\n\t\t\ttry {\n\t\t\t\treturn { value: Schema.resolve(value, this, {})[0] };\n\t\t\t} catch (error) {\n\t\t\t\tif (ValidationError.is(error)) return { issues: [{\n\t\t\t\t\tmessage: error.message,\n\t\t\t\t\tpath: error.options.path\n\t\t\t\t}] };\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t};\n} });\nSchema.ValidationError = ValidationError;\nSchema.prototype.toJSON = function toJSON() {\n\tif (globalThis.__schemastery_refs__) {\n\t\tglobalThis.__schemastery_refs__[this.uid] ??= JSON.parse(JSON.stringify({ ...this }));\n\t\treturn this.uid;\n\t}\n\tglobalThis.__schemastery_refs__ = { [this.uid]: { ...this } };\n\tglobalThis.__schemastery_refs__[this.uid] = JSON.parse(JSON.stringify({ ...this }));\n\tconst result = {\n\t\tuid: this.uid,\n\t\trefs: globalThis.__schemastery_refs__\n\t};\n\tglobalThis.__schemastery_refs__ = void 0;\n\treturn result;\n};\nSchema.prototype.set = function set(key, value) {\n\tthis.dict[key] = value;\n\treturn this;\n};\nSchema.prototype.push = function push(value) {\n\tthis.list.push(value);\n\treturn this;\n};\nfunction mergeDesc(original, messages) {\n\tconst result = typeof original === \"string\" ? { \"\": original } : { ...original };\n\tfor (const locale in messages) {\n\t\tconst value = messages[locale];\n\t\tif (value?.$description || value?.$desc) result[locale] = value.$description || value.$desc;\n\t\telse if (typeof value === \"string\") result[locale] = value;\n\t}\n\treturn result;\n}\nfunction getInner(value) {\n\treturn value?.$value ?? value?.$inner;\n}\nfunction extractKeys(data) {\n\treturn filterKeys(data ?? {}, (key) => !key.startsWith(\"$\"));\n}\nSchema.prototype.i18n = function i18n(messages) {\n\tconst schema = Schema(this);\n\tconst desc = mergeDesc(schema.meta.description, messages);\n\tif (Object.keys(desc).length) schema.meta.description = desc;\n\tif (schema.dict) schema.dict = valueMap(schema.dict, (inner, key) => {\n\t\treturn inner.i18n(valueMap(messages, (data) => getInner(data)?.[key] ?? data?.[key]));\n\t});\n\tif (schema.list) schema.list = schema.list.map((inner, index) => {\n\t\treturn inner.i18n(valueMap(messages, (data = {}) => {\n\t\t\tif (Array.isArray(getInner(data))) return getInner(data)[index];\n\t\t\tif (Array.isArray(data)) return data[index];\n\t\t\treturn extractKeys(data);\n\t\t}));\n\t});\n\tif (schema.inner) schema.inner = schema.inner.i18n(valueMap(messages, (data) => {\n\t\tif (getInner(data)) return getInner(data);\n\t\treturn extractKeys(data);\n\t}));\n\tif (schema.sKey) schema.sKey = schema.sKey.i18n(valueMap(messages, (data) => data?.$key));\n\treturn schema;\n};\nSchema.prototype.extra = function extra(key, value) {\n\tconst schema = Schema(this);\n\tschema.meta = {\n\t\t...schema.meta,\n\t\t[key]: value\n\t};\n\treturn schema;\n};\nfor (const key of [\n\t\"required\",\n\t\"disabled\",\n\t\"collapse\",\n\t\"hidden\",\n\t\"loose\"\n]) Object.assign(Schema.prototype, { [key](value = true) {\n\tconst schema = Schema(this);\n\tschema.meta = {\n\t\t...schema.meta,\n\t\t[key]: value\n\t};\n\treturn schema;\n} });\nSchema.prototype.deprecated = function deprecated() {\n\tconst schema = Schema(this);\n\tschema.meta.badges ||= [];\n\tschema.meta.badges.push({\n\t\ttext: \"deprecated\",\n\t\ttype: \"danger\"\n\t});\n\treturn schema;\n};\nSchema.prototype.experimental = function experimental() {\n\tconst schema = Schema(this);\n\tschema.meta.badges ||= [];\n\tschema.meta.badges.push({\n\t\ttext: \"experimental\",\n\t\ttype: \"warning\"\n\t});\n\treturn schema;\n};\nSchema.prototype.pattern = function pattern(regexp) {\n\tconst schema = Schema(this);\n\tconst pattern = pick(regexp, [\"source\", \"flags\"]);\n\tschema.meta = {\n\t\t...schema.meta,\n\t\tpattern\n\t};\n\treturn schema;\n};\nSchema.prototype.simplify = function simplify(value) {\n\tif (isVolatile(value)) value = value.get();\n\tif (deepEqual(value, this.meta.default, this.type === \"dict\")) return null;\n\tif (isNullable(value)) return value;\n\tif (this.type === \"object\" || this.type === \"dict\") {\n\t\tconst result = {};\n\t\tfor (const key in value) {\n\t\t\tconst item = (this.type === \"object\" ? this.dict[key] : this.inner)?.simplify(value[key]);\n\t\t\tif (this.type === \"dict\" || !isNullable(item)) result[key] = item;\n\t\t}\n\t\tif (deepEqual(result, this.meta.default, this.type === \"dict\")) return null;\n\t\treturn result;\n\t} else if (this.type === \"array\" || this.type === \"tuple\") {\n\t\tconst result = [];\n\t\tvalue.forEach((value, index) => {\n\t\t\tconst schema = this.type === \"array\" ? this.inner : this.list[index];\n\t\t\tconst item = schema ? schema.simplify(value) : value;\n\t\t\tresult.push(item);\n\t\t});\n\t\treturn result;\n\t} else if (this.type === \"intersect\") {\n\t\tconst result = {};\n\t\tfor (const item of this.list) Object.assign(result, item.simplify(value));\n\t\treturn result;\n\t} else if (this.type === \"union\") for (const schema of this.list) try {\n\t\tSchema.resolve(value, schema, {});\n\t\treturn schema.simplify(value);\n\t} catch {}\n\treturn value;\n};\nSchema.prototype.toString = function toString(inline) {\n\treturn formatters[this.type]?.(this, inline) ?? `Schema<${this.type}>`;\n};\nSchema.prototype.role = function role(role, extra) {\n\tconst schema = Schema(this);\n\tschema.meta = {\n\t\t...schema.meta,\n\t\trole,\n\t\textra\n\t};\n\treturn schema;\n};\nfor (const key of [\n\t\"default\",\n\t\"link\",\n\t\"comment\",\n\t\"description\",\n\t\"max\",\n\t\"min\",\n\t\"step\"\n]) Object.assign(Schema.prototype, { [key](value) {\n\tconst schema = Schema(this);\n\tschema.meta = {\n\t\t...schema.meta,\n\t\t[key]: value\n\t};\n\treturn schema;\n} });\nSchema.prototype.volatile = function volatile() {\n\tif (this.meta.volatile) throw new TypeError(\"volatile schema is already wrapped\");\n\treturn this.extra(\"volatile\", true);\n};\nconst resolvers = {};\nconst checkedVolatile = Symbol(\"checked-volatile-schema\");\nfunction validateVolatileSchema(schema, path = [], blocked = false, seen = /* @__PURE__ */ new Map()) {\n\tconst states = seen.get(schema) ?? /* @__PURE__ */ new Set();\n\tif (states.has(blocked)) return;\n\tstates.add(blocked);\n\tseen.set(schema, states);\n\tif (schema.meta?.volatile && blocked) throw new ValidationError(\"volatile fields require a fixed object path without an enclosing volatile field\", { path });\n\tconst nested = blocked || !!schema.meta?.volatile;\n\tif (schema.dict) for (const [key, child] of Object.entries(schema.dict)) validateVolatileSchema(child, [...path, key], nested, seen);\n\tif (schema.sKey) validateVolatileSchema(schema.sKey, [...path, \"<key>\"], true, seen);\n\tif (schema.inner && (schema.type !== \"lazy\" || schema.inner[kSchema])) validateVolatileSchema(schema.inner, [...path, \"*\"], true, seen);\n\tif (schema.list) for (let index = 0; index < schema.list.length; index++) validateVolatileSchema(schema.list[index], [...path, String(index)], true, seen);\n}\nSchema.extend = function extend(type, resolve) {\n\tresolvers[type] = resolve;\n};\nSchema.resolve = function resolve(data, schema, options = {}, strict = false) {\n\tif (!schema) return [data];\n\tif (!options[checkedVolatile]) {\n\t\tvalidateVolatileSchema(schema, options.path);\n\t\toptions = {\n\t\t\t...options,\n\t\t\t[checkedVolatile]: true\n\t\t};\n\t}\n\tif (schema.meta?.volatile) {\n\t\tconst inner = Schema(schema);\n\t\tinner.meta = {\n\t\t\t...schema.meta,\n\t\t\tvolatile: false\n\t\t};\n\t\tconst [value, adapted] = Schema.resolve(data, inner, options, strict);\n\t\ttry {\n\t\t\treturn [createVolatile(value), adapted];\n\t\t} catch (error) {\n\t\t\tthrow new ValidationError(error instanceof Error ? error.message : String(error), options);\n\t\t}\n\t}\n\tif (options.ignore?.(data, schema)) return [data];\n\tif (isNullable(data) && schema.type !== \"lazy\") {\n\t\tif (schema.meta.required) throw new ValidationError(`missing required value`, options);\n\t\tlet current = schema;\n\t\tlet fallback = schema.meta.default;\n\t\twhile (current?.type === \"intersect\" && isNullable(fallback)) {\n\t\t\tcurrent = current.list[0];\n\t\t\tfallback = current?.meta.default;\n\t\t}\n\t\tif (isNullable(fallback)) return [data];\n\t\tdata = clone(fallback);\n\t}\n\tconst callback = resolvers[schema.type];\n\tif (!callback) throw new ValidationError(`unsupported type \"${schema.type}\"`, options);\n\ttry {\n\t\treturn callback(data, schema, options, strict);\n\t} catch (error) {\n\t\tif (!schema.meta.loose) throw error;\n\t\treturn [schema.meta.default];\n\t}\n};\nSchema.from = function from(source) {\n\tif (isNullable(source)) return Schema.any();\n\telse if ([\n\t\t\"string\",\n\t\t\"number\",\n\t\t\"boolean\"\n\t].includes(typeof source)) return Schema.const(source).required();\n\telse if (source[kSchema]) return source;\n\telse if (typeof source === \"function\") switch (source) {\n\t\tcase String: return Schema.string().required();\n\t\tcase Number: return Schema.number().required();\n\t\tcase Boolean: return Schema.boolean().required();\n\t\tcase Function: return Schema.function().required();\n\t\tdefault: return Schema.is(source).required();\n\t}\n\telse throw new TypeError(`cannot infer schema from ${source}`);\n};\nSchema.lazy = function lazy(builder) {\n\tconst toJSON = () => {\n\t\tif (!schema.inner[kSchema]) {\n\t\t\tschema.inner = schema.builder();\n\t\t\tschema.inner.meta = {\n\t\t\t\t...schema.meta,\n\t\t\t\t...schema.inner.meta\n\t\t\t};\n\t\t}\n\t\treturn schema.inner.toJSON();\n\t};\n\tconst schema = new Schema({\n\t\ttype: \"lazy\",\n\t\tbuilder,\n\t\tinner: { toJSON }\n\t});\n\treturn schema;\n};\nSchema.natural = function natural() {\n\treturn Schema.number().step(1).min(0);\n};\nSchema.percent = function percent() {\n\treturn Schema.number().step(.01).min(0).max(1).role(\"slider\");\n};\nSchema.date = function date() {\n\treturn Schema.union([Schema.is(Date), Schema.transform(Schema.string().role(\"datetime\"), (value, options) => {\n\t\tconst date = new Date(value);\n\t\tif (isNaN(+date)) throw new ValidationError(`invalid date \"${value}\"`, options);\n\t\treturn date;\n\t}, true)]);\n};\nSchema.regExp = function regExp(flag = \"\") {\n\treturn Schema.union([Schema.is(RegExp), Schema.transform(Schema.string().role(\"regexp\", { flag }), (value, options) => {\n\t\ttry {\n\t\t\treturn new RegExp(value, flag);\n\t\t} catch (e) {\n\t\t\tthrow new ValidationError(e.message, options);\n\t\t}\n\t}, true)]);\n};\nSchema.arrayBuffer = function arrayBuffer(encoding) {\n\treturn Schema.union([\n\t\tSchema.is(ArrayBuffer),\n\t\tSchema.is(SharedArrayBuffer),\n\t\tSchema.transform(Schema.any(), (value, options) => {\n\t\t\tif (Binary.isSource(value)) return Binary.fromSource(value);\n\t\t\tthrow new ValidationError(`expected ArrayBufferSource but got ${value}`, options);\n\t\t}, true),\n\t\t...encoding ? [Schema.transform(Schema.string(), (value, options) => {\n\t\t\ttry {\n\t\t\t\treturn encoding === \"base64\" ? Binary.fromBase64(value) : Binary.fromHex(value);\n\t\t\t} catch (e) {\n\t\t\t\tthrow new ValidationError(e.message, options);\n\t\t\t}\n\t\t}, true)] : []\n\t]);\n};\nSchema.extend(\"lazy\", (data, schema, options, strict) => {\n\tif (!schema.inner[kSchema]) {\n\t\tschema.inner = schema.builder();\n\t\tschema.inner.meta = {\n\t\t\t...schema.meta,\n\t\t\t...schema.inner.meta\n\t\t};\n\t\tvalidateVolatileSchema(schema.inner, options.path, true);\n\t}\n\treturn Schema.resolve(data, schema.inner, options, strict);\n});\nSchema.extend(\"any\", (data) => {\n\treturn [data];\n});\nSchema.extend(\"never\", (data, _, options) => {\n\tthrow new ValidationError(`expected nullable but got ${data}`, options);\n});\nSchema.extend(\"const\", (data, { value }, options) => {\n\tif (deepEqual(data, value)) return [value];\n\tthrow new ValidationError(`expected ${value} but got ${data}`, options);\n});\nfunction checkWithinRange(data, meta, description, options, skipMin = false) {\n\tconst { max = Infinity, min = -Infinity } = meta;\n\tif (data > max) throw new ValidationError(`expected ${description} <= ${max} but got ${data}`, options);\n\tif (data < min && !skipMin) throw new ValidationError(`expected ${description} >= ${min} but got ${data}`, options);\n}\nSchema.extend(\"string\", (data, { meta }, options) => {\n\tif (typeof data !== \"string\") throw new ValidationError(`expected string but got ${data}`, options);\n\tif (meta.pattern) {\n\t\tconst regexp = new RegExp(meta.pattern.source, meta.pattern.flags);\n\t\tif (!regexp.test(data)) throw new ValidationError(`expect string to match regexp ${regexp}`, options);\n\t}\n\tcheckWithinRange(data.length, meta, \"string length\", options);\n\treturn [data];\n});\nfunction decimalShift(data, digits) {\n\tconst str = data.toString();\n\tif (str.includes(\"e\")) return data * Math.pow(10, digits);\n\tconst index = str.indexOf(\".\");\n\tif (index === -1) return data * Math.pow(10, digits);\n\tconst frac = str.slice(index + 1);\n\tconst integer = str.slice(0, index);\n\tif (frac.length <= digits) return +(integer + frac.padEnd(digits, \"0\"));\n\treturn +(integer + frac.slice(0, digits) + \".\" + frac.slice(digits));\n}\nfunction isMultipleOf(data, min, step) {\n\tstep = Math.abs(step);\n\tif (!/^\\d+\\.\\d+$/.test(step.toString())) return (data - min) % step === 0;\n\tconst index = step.toString().indexOf(\".\");\n\tconst digits = step.toString().slice(index + 1).length;\n\treturn Math.abs(decimalShift(data, digits) - decimalShift(min, digits)) % decimalShift(step, digits) === 0;\n}\nSchema.extend(\"number\", (data, { meta }, options) => {\n\tif (typeof data !== \"number\") throw new ValidationError(`expected number but got ${data}`, options);\n\tcheckWithinRange(data, meta, \"number\", options);\n\tconst { step } = meta;\n\tif (step && !isMultipleOf(data, meta.min ?? 0, step)) throw new ValidationError(`expected number multiple of ${step} but got ${data}`, options);\n\treturn [data];\n});\nSchema.extend(\"boolean\", (data, _, options) => {\n\tif (typeof data === \"boolean\") return [data];\n\tthrow new ValidationError(`expected boolean but got ${data}`, options);\n});\nSchema.extend(\"bitset\", (data, { bits, meta }, options) => {\n\tlet value = 0, keys = [];\n\tif (typeof data === \"number\") {\n\t\tvalue = data;\n\t\tfor (const key in bits) if (data & bits[key]) keys.push(key);\n\t} else if (Array.isArray(data)) {\n\t\tkeys = data;\n\t\tfor (const key of keys) {\n\t\t\tif (typeof key !== \"string\") throw new ValidationError(`expected string but got ${key}`, options);\n\t\t\tif (key in bits) value |= bits[key];\n\t\t}\n\t} else throw new ValidationError(`expected number or array but got ${data}`, options);\n\tif (value === meta.default) return [value];\n\treturn [value, keys];\n});\nSchema.extend(\"function\", (data, _, options) => {\n\tif (typeof data === \"function\") return [data];\n\tthrow new ValidationError(`expected function but got ${data}`, options);\n});\nSchema.extend(\"is\", (data, { constructor }, options) => {\n\tif (typeof constructor === \"function\") {\n\t\tif (data instanceof constructor) return [data];\n\t\tthrow new ValidationError(`expected ${constructor.name} but got ${data}`, options);\n\t} else {\n\t\tif (isNullable(data)) throw new ValidationError(`expected ${constructor} but got ${data}`, options);\n\t\tlet prototype = Object.getPrototypeOf(data);\n\t\twhile (prototype) {\n\t\t\tif (prototype.constructor?.name === constructor) return [data];\n\t\t\tprototype = Object.getPrototypeOf(prototype);\n\t\t}\n\t\tthrow new ValidationError(`expected ${constructor} but got ${data}`, options);\n\t}\n});\nfunction property(data, key, schema, options) {\n\ttry {\n\t\tconst [value, adapted] = Schema.resolve(data[key], schema, {\n\t\t\t...options,\n\t\t\tpath: [...options.path || [], key]\n\t\t});\n\t\tif (adapted !== void 0) data[key] = adapted;\n\t\treturn value;\n\t} catch (e) {\n\t\tif (!options?.autofix) throw e;\n\t\tdelete data[key];\n\t\treturn schema.meta.volatile ? createVolatile(schema.meta.default) : schema.meta.default;\n\t}\n}\nSchema.extend(\"array\", (data, { inner, meta }, options) => {\n\tif (!Array.isArray(data)) throw new ValidationError(`expected array but got ${data}`, options);\n\tcheckWithinRange(data.length, meta, \"array length\", options, !isNullable(inner.meta.default));\n\treturn [data.map((_, index) => property(data, index, inner, options))];\n});\nSchema.extend(\"dict\", (data, { inner, sKey }, options, strict) => {\n\tif (!isPlainObject(data)) throw new ValidationError(`expected object but got ${data}`, options);\n\tconst result = {};\n\tfor (const key in data) {\n\t\tlet rKey;\n\t\ttry {\n\t\t\trKey = Schema.resolve(key, sKey, options)[0];\n\t\t} catch (error) {\n\t\t\tif (strict) continue;\n\t\t\tthrow error;\n\t\t}\n\t\tresult[rKey] = property(data, key, inner, options);\n\t\tdata[rKey] = data[key];\n\t\tif (key !== rKey) delete data[key];\n\t}\n\treturn [result];\n});\nSchema.extend(\"tuple\", (data, { list }, options, strict) => {\n\tif (!Array.isArray(data)) throw new ValidationError(`expected array but got ${data}`, options);\n\tconst result = list.map((inner, index) => property(data, index, inner, options));\n\tif (strict) return [result];\n\tresult.push(...data.slice(list.length));\n\treturn [result];\n});\nfunction merge(result, data) {\n\tfor (const key in data) {\n\t\tif (key in result) continue;\n\t\tresult[key] = data[key];\n\t}\n}\nSchema.extend(\"object\", (data, { dict }, options, strict) => {\n\tif (!isPlainObject(data)) throw new ValidationError(`expected object but got ${data}`, options);\n\tconst result = {};\n\tfor (const key in dict) {\n\t\tconst value = property(data, key, dict[key], options);\n\t\tif (!isNullable(value) || key in data) result[key] = value;\n\t}\n\tif (!strict) merge(result, data);\n\treturn [result];\n});\nSchema.extend(\"union\", (data, { list, toString }, options, strict) => {\n\tconst messages = [];\n\tfor (const inner of list) try {\n\t\treturn Schema.resolve(data, inner, options, strict);\n\t} catch (error) {\n\t\tmessages.push(error);\n\t}\n\tthrow new ValidationError(`expected ${toString()} but got ${JSON.stringify(data)}`, options);\n});\nSchema.extend(\"intersect\", (data, { list, toString }, options, strict) => {\n\tif (!list.length) return [data];\n\tlet result;\n\tfor (const inner of list) {\n\t\tconst value = Schema.resolve(data, inner, options, true)[0];\n\t\tif (isNullable(value)) continue;\n\t\tif (isNullable(result)) result = value;\n\t\telse if (typeof result !== typeof value) throw new ValidationError(`expected ${toString()} but got ${JSON.stringify(data)}`, options);\n\t\telse if (typeof value === \"object\") merge(result ??= {}, value);\n\t\telse if (result !== value) throw new ValidationError(`expected ${toString()} but got ${JSON.stringify(data)}`, options);\n\t}\n\tif (!strict && isPlainObject(data)) merge(result, data);\n\treturn [result];\n});\nSchema.extend(\"transform\", (data, { inner, callback, preserve }, options) => {\n\tconst [result, adapted = data] = Schema.resolve(data, inner, options, true);\n\tif (preserve) return [callback(result)];\n\telse return [callback(result), callback(adapted)];\n});\nconst formatters = {};\nfunction defineMethod(name, keys, format) {\n\tformatters[name] = format;\n\tObject.assign(Schema, { [name](...args) {\n\t\tconst schema = new Schema({ type: name });\n\t\tkeys.forEach((key, index) => {\n\t\t\tswitch (key) {\n\t\t\t\tcase \"sKey\":\n\t\t\t\t\tschema.sKey = args[index] ?? Schema.string();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"inner\":\n\t\t\t\t\tschema.inner = Schema.from(args[index]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"list\":\n\t\t\t\t\tschema.list = args[index].map(Schema.from);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"dict\":\n\t\t\t\t\tschema.dict = valueMap(args[index], Schema.from);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"bits\":\n\t\t\t\t\tschema.bits = {};\n\t\t\t\t\tfor (const key in args[index]) {\n\t\t\t\t\t\tif (typeof args[index][key] !== \"number\") continue;\n\t\t\t\t\t\tschema.bits[key] = args[index][key];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"callback\": {\n\t\t\t\t\tconst callback = schema.callback = args[index];\n\t\t\t\t\tcallback[\"toJSON\"] ||= () => callback.toString();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"constructor\": {\n\t\t\t\t\tconst constructor = schema.constructor = args[index];\n\t\t\t\t\tif (typeof constructor === \"function\") constructor[\"toJSON\"] ||= () => constructor[\"name\"];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: schema[key] = args[index];\n\t\t\t}\n\t\t});\n\t\tif (name === \"object\" || name === \"dict\") schema.meta.default = {};\n\t\telse if (name === \"array\" || name === \"tuple\") schema.meta.default = [];\n\t\telse if (name === \"bitset\") schema.meta.default = 0;\n\t\treturn schema;\n\t} });\n}\ndefineMethod(\"is\", [\"constructor\"], ({ constructor }) => {\n\tif (typeof constructor === \"function\") return constructor.name;\n\telse return constructor;\n});\ndefineMethod(\"any\", [], () => \"any\");\ndefineMethod(\"never\", [], () => \"never\");\ndefineMethod(\"const\", [\"value\"], ({ value }) => typeof value === \"string\" ? JSON.stringify(value) : value);\ndefineMethod(\"string\", [], () => \"string\");\ndefineMethod(\"number\", [], () => \"number\");\ndefineMethod(\"boolean\", [], () => \"boolean\");\ndefineMethod(\"bitset\", [\"bits\"], () => \"bitset\");\ndefineMethod(\"function\", [], () => \"function\");\ndefineMethod(\"array\", [\"inner\"], ({ inner }) => `${inner.toString(true)}[]`);\ndefineMethod(\"dict\", [\"inner\", \"sKey\"], ({ inner, sKey }) => `{ [key: ${sKey.toString()}]: ${inner.toString()} }`);\ndefineMethod(\"tuple\", [\"list\"], ({ list }) => `[${list.map((inner) => inner.toString()).join(\", \")}]`);\ndefineMethod(\"object\", [\"dict\"], ({ dict }) => {\n\tif (Object.keys(dict).length === 0) return \"{}\";\n\treturn `{ ${Object.entries(dict).map(([key, inner]) => {\n\t\treturn `${key}${inner.meta.required ? \"\" : \"?\"}: ${inner.toString()}`;\n\t}).join(\", \")} }`;\n});\ndefineMethod(\"union\", [\"list\"], ({ list }, inline) => {\n\tconst result = list.map(({ toString: format }) => format()).join(\" | \");\n\treturn inline ? `(${result})` : result;\n});\ndefineMethod(\"intersect\", [\"list\"], ({ list }) => {\n\treturn `${list.map((inner) => inner.toString(true)).join(\" & \")}`;\n});\ndefineMethod(\"transform\", [\n\t\"inner\",\n\t\"callback\",\n\t\"preserve\"\n], ({ inner }, isInner) => inner.toString(isInner));\n//#endregion\nexport { Schema as default };\n", "/** Chat display preferences stored in the Host user-settings document. */\n\nimport z from '@deepseek-ai/schemastery'\n\n/** Settings namespace owned by the Chat target. */\nexport const CHAT_SETTINGS_NAMESPACE = 'ui-chat'\n\n/** Field carrying the work-details presentation mode. */\nexport const TRANSCRIPT_VIEW_FIELD = 'transcriptView'\n\n/** Work-details presentation modes a user can choose. */\nexport const TRANSCRIPT_VIEW_MODES = ['compact', 'standard', 'detailed', 'verbose'] as const\n\n/** Work-details presentation mode. */\nexport type TranscriptViewMode = typeof TRANSCRIPT_VIEW_MODES[number]\n\n/**\n * Saved value from the two-mode generation of this setting. Read as `detailed`;\n * never offered as a choice and never written back.\n */\nexport const LEGACY_TRANSCRIPT_VIEW_MODE = 'normal'\n\n/** Saved `expanded` values read as `detailed`, without being offered or written back. */\nexport const LEGACY_EXPANDED_TRANSCRIPT_VIEW_MODE = 'expanded'\n\n/** Every value the durable field accepts: current modes plus legacy saved values. */\nconst TRANSCRIPT_VIEW_SETTING_VALUES = [\n ...TRANSCRIPT_VIEW_MODES, LEGACY_TRANSCRIPT_VIEW_MODE, LEGACY_EXPANDED_TRANSCRIPT_VIEW_MODE,\n] as const\n\n/** Default work details for non-Desktop Web clients. */\nexport const DEFAULT_TRANSCRIPT_VIEW_MODE: TranscriptViewMode = 'detailed'\n\n/** Performance and usage detail levels accepted by user settings. */\nexport const PERFORMANCE_USAGE_MODES = ['compact', 'detailed'] as const\n\n/** Performance and usage presentation. */\nexport type PerformanceUsageMode = typeof PERFORMANCE_USAGE_MODES[number]\n\n/** Preserve detailed accounting for users without an explicit preference. */\nexport const DEFAULT_PERFORMANCE_USAGE: PerformanceUsageMode = 'detailed'\n\n/** Destinations for ordinary clicks on Chat HTTP(S) links. */\nexport type LinkOpening = 'sidebar' | 'new-tab'\n\n/** Preserve the built-in browser for users without an explicit preference. */\nexport const DEFAULT_LINK_OPENING: LinkOpening = 'sidebar'\n\n/** Durable Chat section shared by the Host schema and browser scope. */\nexport interface ChatSettings {\n /** Work-details preference; absence uses the client default, and legacy saved values remain accepted. */\n transcriptView?: TranscriptViewMode | typeof LEGACY_TRANSCRIPT_VIEW_MODE | typeof LEGACY_EXPANDED_TRANSCRIPT_VIEW_MODE | null\n /** Detail level for composer statistics and completed-Turn usage. */\n performanceUsage: PerformanceUsageMode\n /** Default destination for Chat HTTP(S) links. */\n linkOpening: LinkOpening\n}\n\n/** Durable Chat schema; also the wire envelope the browser scope validates against. */\nexport const ChatSettingsFields = {\n linkOpening: z.union(['sidebar', 'new-tab']).default(DEFAULT_LINK_OPENING),\n performanceUsage: z.union([...PERFORMANCE_USAGE_MODES]).default(DEFAULT_PERFORMANCE_USAGE),\n // Missing and unrecognized modes defer to the client's default.\n [TRANSCRIPT_VIEW_FIELD]: z.union([...TRANSCRIPT_VIEW_SETTING_VALUES]).loose(),\n}\n\n/** Schema for shared configuration values. */\nexport const ChatSettingsSchema = z.object(ChatSettingsFields)\n", "/** Host registration for browser Chat preferences. */\nimport type {} from '@deepseek-ai/dsh-settings'\n\nimport type { Volatile, Context } from '@deepseek-ai/cordis'\nimport type { ChatSettings, LinkOpening, PerformanceUsageMode } from './chat-settings.ts'\nimport z from '@deepseek-ai/schemastery'\nimport { TRANSCRIPT_VIEW_FIELD } from './chat-settings.ts'\n\nimport { ChatSettingsFields } from './chat-settings.ts'\n\nexport {\n CHAT_SETTINGS_NAMESPACE, DEFAULT_TRANSCRIPT_VIEW_MODE, LEGACY_TRANSCRIPT_VIEW_MODE,\n LEGACY_EXPANDED_TRANSCRIPT_VIEW_MODE, TRANSCRIPT_VIEW_FIELD,\n TRANSCRIPT_VIEW_MODES, type ChatSettings, type TranscriptViewMode,\n} from './chat-settings.ts'\n\n/** Runtime preferences projected to the browser. */\nexport interface Config {\n /** Completed turn transcript presentation. */\n transcriptView: Volatile<ChatSettings['transcriptView']>\n /** Performance and usage detail level. */\n performanceUsage: Volatile<PerformanceUsageMode>\n /** Default destination for Chat HTTP(S) links. */\n linkOpening: Volatile<LinkOpening>\n}\n\n/** Live preferences projected to the browser. */\nexport const Config = z.object({\n [TRANSCRIPT_VIEW_FIELD]: ChatSettingsFields[TRANSCRIPT_VIEW_FIELD].volatile(),\n performanceUsage: ChatSettingsFields['performanceUsage'].volatile(),\n linkOpening: ChatSettingsFields.linkOpening.volatile(),\n})\n\n/** Host preferences are consumed through the configuration form projection.\n * @param ctx Plugin context used for optional settings presentation.\n */\nexport function apply(ctx: Context): void {\n ctx.inject(['settings'], (child) => { child.effect(() => child.settings.configure({ auto: false }, ctx.fiber)) })\n}\n"],
|
|
5
|
+
"mappings": ";AAIA,SAAS,WAAW,OAAO;AAC1B,SAAO,UAAU,QAAQ,UAAU;AACpC;AAMA,SAAS,cAAc,MAAM;AAC5B,SAAO,QAAQ,OAAO,SAAS,YAAY,CAAC,MAAM,QAAQ,IAAI;AAC/D;AAEA,SAAS,WAAW,QAAQ,QAAQ;AACnC,SAAO,OAAO,YAAY,OAAO,QAAQ,MAAM,EAAE,OAAO,CAAC,CAAC,KAAK,KAAK,MAAM,OAAO,KAAK,KAAK,CAAC,CAAC;AAC9F;AAEA,SAAS,UAAU,QAAQ,WAAW;AACrC,SAAO,OAAO,YAAY,OAAO,QAAQ,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,GAAG,CAAC,CAAC,CAAC;AACrG;AAEA,SAAS,KAAK,QAAQ,MAAM,QAAQ;AACnC,MAAI,CAAC,KAAM,QAAO,EAAE,GAAG,O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", "options", "pattern", "value", "extra", "resolve", "toJSON", "date", "toString", "key"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@deepseek-ai/dsh-client-ui-chat",
|
|
3
|
+
"version": "0.2.0-rc.2",
|
|
4
|
+
"description": "DSH Web Annotator's patched chat provider; derived from DeepSeek Harness",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "./lib/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./lib/index.js",
|
|
10
|
+
"./client": "./lib/client.js",
|
|
11
|
+
"./package.json": "./package.json"
|
|
12
|
+
},
|
|
13
|
+
"dsh": {
|
|
14
|
+
"client": {
|
|
15
|
+
"inject": [
|
|
16
|
+
"@deepseek-ai/dsh-api-session-controller",
|
|
17
|
+
"@deepseek-ai/dsh-api-workspace-controller",
|
|
18
|
+
"@deepseek-ai/dsh-client-locale",
|
|
19
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
20
|
+
"@deepseek-ai/dsh-client-ui-input-trigger",
|
|
21
|
+
"@deepseek-ai/dsh-client-ui-layout",
|
|
22
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
23
|
+
"@deepseek-ai/dsh-client-ui-session",
|
|
24
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
25
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right",
|
|
26
|
+
"@deepseek-ai/dsh-client-ui-workspace"
|
|
27
|
+
],
|
|
28
|
+
"platform": "web"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DeepSeek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Shell layout for the Web GUI: the three-column AppFrame whose right column is a track for an edge-anchored panel, the panel-geometry service, and theme presentation; for users and maintainers of the window chrome."
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @deepseek-ai/dsh-client-ui-layout
|
|
7
|
+
|
|
8
|
+
English | [中文](README.zh.md)
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
This package provides the Web GUI's three-column AppFrame, edge-column widths, and `ctx.layout` presentation control. The right column concedes space before the center; its occupant renders fullscreen while the frame retains the wide-screen track underneath. The theme presenter owns color scheme, alias tokens, content font size, and document metadata. Layout state resets on reload.
|
|
13
|
+
|
|
14
|
+
## Table of Contents
|
|
15
|
+
|
|
16
|
+
- [Use this package](#use-this-package)
|
|
17
|
+
- [Understand the implementation](#understand-the-implementation)
|
|
18
|
+
- [Further Exploration](#further-exploration)
|
|
19
|
+
- [Model Experience](#model-experience)
|
|
20
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
21
|
+
- [Dev Note](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## Use this package
|
|
27
|
+
|
|
28
|
+
Desktop Mod+B toggles the left sidebar through the same layout action used by its controls. The shortcut command is unavailable behind modal dialogs and yields to terminal input.
|
|
29
|
+
|
|
30
|
+
The root slot composes the sidebar, main content, and right column. The sidebar spans 264–420px, defaults to 280px, and retains a 56px rail when collapsed; below 1024px it collapses automatically, and opening the right panel collapses a manually expanded sidebar. The right panel first opens at 45% of the viewport, then retains the user's pixel preference, capped at 70%. To protect 400px for the center, the frame first reduces the right panel to 300px, then reports insufficient room so its occupant closes it, and only then compresses the center further. Dragging has no transition delay; the right handle is absent while closed or fullscreen.
|
|
31
|
+
|
|
32
|
+
Global panels occupy the root-scoped `main` keyed slot; `conversation` is the reserved key for the Conversation. `ctx.layout.selectPanel(id)` selects a registered panel, and `null` selects the Conversation without changing the current Session. No global panel is registered by the shipped composition.
|
|
33
|
+
|
|
34
|
+
While the right panel is fullscreen, the covered main column is invisible and inert but remains mounted and measured. This prevents glass themes from painting or focusing the chat above the panel; restoring the panel preserves the same composer and draft.
|
|
35
|
+
|
|
36
|
+
<a id="window-chrome-seat"></a>
|
|
37
|
+
### Window-chrome seat
|
|
38
|
+
|
|
39
|
+
On macOS desktop (`html[data-platform='darwin']`, set only by the desktop preload) a collapsed sidebar hides its column entirely instead of keeping the rail, and the frame mounts the single root-scoped `shell.leading` seat at its top-left — beside the hiddenInset traffic lights, over every main panel; ui-sidebar occupies it with the reopen and New Session controls. While the seat is mounted the frame publishes `--dsh-frame-leading-clearance`, the inline band the window chrome occupies measured from the frame's left edge; a main panel whose content reaches the top-left corner pads by it so nothing lands under the lights or the controls. The frame also always publishes `--dsh-frame-top-clearance` (48px) on the root element, the constant step below the window's top strip; entry pages in the main panel (plugin manager and similar, not the conversation) pad their top by it. The frame declares no darwin drag of its own: every chrome row marks itself `data-window-drag`, ui-web base.css turns that mark into the one darwin drag rule, and the row's own box is therefore the window's draggable geometry — a row's blank runs drag while its controls stay clickable. The frame's remaining drag rule is the Windows caption row, which belongs to that platform.
|
|
40
|
+
|
|
41
|
+
Windows Electron's `data-windows-titlebar` marker reserves the caption height above all columns and removes the collapsed sidebar rail. Only the content area's top-left corner has a 16px radius; the other corners and the internal divider remain square. The frame publishes `--dsh-windows-content-radius` and `--dsh-windows-sidebar-width` for ui-sidebar-right's fullscreen corner and sidebar clearance. Ordinary Web documents do not receive the marker; macOS retains its separate layout.
|
|
42
|
+
|
|
43
|
+
The root publishes `--dsh-frame-top-clearance` for the reserved strip (48px on macOS, the caption height on Windows), and `--dsh-frame-overlay-top` adds 20px for dialogs and menus. Native fullscreen reduces the overlay inset to 20px; dialogs retain their own 24px minimum. `--dsh-frame-chrome-top` excludes the Windows caption from modal mask painting and becomes zero in fullscreen. The full-viewport modal layer still blocks background clicks. Plain browser documents publish none of these values.
|
|
44
|
+
|
|
45
|
+
### Theme presentation
|
|
46
|
+
|
|
47
|
+
The presenter consumes resolved theme snapshots and projects them onto the document: `html { color-scheme }` for native UA chrome, `body[data-ds-dark-theme]` from the active color scheme, the theme's alias tokens and `--dsh-content-font-size` as inline variables on body, and one owned `<meta name="theme-color">` whose content follows the computed body background. Disposing the presenter removes its metadata node with its other global writes.
|
|
48
|
+
|
|
49
|
+
-----
|
|
50
|
+
|
|
51
|
+
<a id="understand-the-implementation"></a>
|
|
52
|
+
## Understand the implementation
|
|
53
|
+
|
|
54
|
+
<details>
|
|
55
|
+
<summary>Implementation internals — click to expand</summary>
|
|
56
|
+
|
|
57
|
+
`selectPanel(id)` checks the live `main` registry before changing selection; an absent key throws and leaves the current panel intact. `beginNavigation()` returns an abort signal for an asynchronous UI navigation. A later call, a valid panel selection (including repeated selection), or layout disposal aborts that signal without cancelling underlying Session creation. Consumers check the signal before committing navigation or moving drafts.
|
|
58
|
+
|
|
59
|
+
One registration declares five child slots and binds `ctx.layout` methods `selectPanel`, `toggleSidebar`, `openRightbar(track, fullscreen)`, and `closeRightbar`. One root store separates `panelInfo` selection from `layoutInfo` measurements, width preferences, and presentation reports. `ctx.layout.panelInfo` and the standard `usePanelInfo` hook share the same selection source; AppFrame subscribes to the stable layout object. The `rightbar` owner supplies actual `width`, `viewportWidth`, and normal-presentation eligibility `canShow`; insufficient room causes a deterministic close, never automatic reopening on widening. Fullscreen hides the width handle without releasing a track the occupant retains. AppFrame keeps the column containers mounted. The right column's root controller renders `rightbar.session` through `SessionProvider` only while the Conversation is selected; its unmount report releases the track. The independent title component uses the selected Session title only while the Conversation is visible, with the build-configured product title or localized `common.brand.localBuild` as its fallback; locale revisions update that fallback. The theme presenter is a second effect: pure DOM writes from resolved snapshots — initial state through the getter once, then event-driven only, with no React path. It applies palette, font-size, and token variables before measuring the rendered background as the single color authority. Fullscreen presentation suppresses grid and handle transitions; its occupant reports the new columns only after covering the frame. Fullscreen exit keeps transitions suppressed while the frame installs its destination geometry: close removes the right track, and restore retains it. Subsequent normal geometry actions restore ordinary transitions.
|
|
60
|
+
|
|
61
|
+
</details>
|
|
62
|
+
|
|
63
|
+
-----
|
|
64
|
+
|
|
65
|
+
<a id="further-exploration"></a>
|
|
66
|
+
## Further Exploration
|
|
67
|
+
|
|
68
|
+
Read these pages when the layout surface is not enough. They move from the frame to the columns it renders and the theme it presents.
|
|
69
|
+
|
|
70
|
+
- [ui-sidebar](../ui-sidebar/README.md) — occupies the `sidebar` column and its seats.
|
|
71
|
+
- [ui-conversation](../ui-conversation/README.md) — occupies the `main` key `conversation`.
|
|
72
|
+
- [ui-sidebar-right](../ui-sidebar-right/README.md) — occupies the `rightbar` column with one docking surface per session.
|
|
73
|
+
- [ui-theme](../ui-theme/README.md) — the theme seam whose resolved snapshots the presenter consumes.
|
|
74
|
+
- [Web client architecture](../../../.agents/notes/implemented/architecture/2026-07-19-gui-web-client-architecture.md) — how browser plugin rows load and register slots.
|
|
75
|
+
|
|
76
|
+
-----
|
|
77
|
+
|
|
78
|
+
<a id="model-experience"></a>
|
|
79
|
+
## Model Experience
|
|
80
|
+
|
|
81
|
+
None, as the layout shell manages browser viewing state; nothing here reaches a model request.
|
|
82
|
+
|
|
83
|
+
#### KV Cache effect
|
|
84
|
+
|
|
85
|
+
None; this package neither assembles nor sends a provider request.
|
|
86
|
+
|
|
87
|
+
## Known Limitations and Deferred Work
|
|
88
|
+
|
|
89
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
These limits define the current layout behavior. They are current package constraints, not a general window-manager comparison or a task backlog.
|
|
93
|
+
|
|
94
|
+
- **Panel geometry is transient** — reload restores the sidebar default and the right panel hidden; each dragged width is one frame-wide preference, not a per-Session fact.
|
|
95
|
+
- **Extremely narrow windows** — after the right panel closes, the center may still fall below 400px; the left 56px rail remains.
|
|
96
|
+
- **Track and panel travel on one shared curve only while animating** — during a discrete open/close the frame sets `data-animating` and its track transition and the occupant's slide read the same duration and easing variables; an occupant that used its own would detach the panel's edge from the conversation's while squeezing. Drags and instant presentation switches run transition-free, so the curve does not cover them.
|
|
97
|
+
- **No scroll anchoring during squeeze reflow** — layout changes may move the reader's viewport.
|
|
98
|
+
|
|
99
|
+
<a id="dev-note"></a>
|
|
100
|
+
### Dev Note
|
|
101
|
+
|
|
102
|
+
<details>
|
|
103
|
+
<summary>Working context for maintainers — click to expand</summary>
|
|
104
|
+
|
|
105
|
+
None.
|
|
106
|
+
|
|
107
|
+
</details>
|
|
108
|
+
|
|
109
|
+
**Runtime invariant:** No companion is published. The shell viewing-state store behind `ctx.layout` emits no Cordis events; clamp and track sequencing is asserted directly by this package's columns and service specs.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/* ../harness-browser-integration/packages/client/ui-layout/src/client/AppFrame.module.css */
|
|
2
|
+
.AppFrame_frame {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-template-rows: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
background: var(--dsw-alias-bg-base);
|
|
9
|
+
}
|
|
10
|
+
.AppFrame_frame[data-animating] {
|
|
11
|
+
transition: grid-template-columns var(--ds-transition-duration-slow) var(--ds-ease-in-out);
|
|
12
|
+
}
|
|
13
|
+
.AppFrame_frame[data-dragging] {
|
|
14
|
+
transition: none;
|
|
15
|
+
}
|
|
16
|
+
[data-windows-titlebar] .AppFrame_frame {
|
|
17
|
+
--dsh-windows-content-radius: 16px;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
padding-top: var(--dsh-windows-titlebar-height);
|
|
20
|
+
grid-template-rows: minmax(0, 1fr);
|
|
21
|
+
background: var(--dsw-specific-sidebar-fill);
|
|
22
|
+
}
|
|
23
|
+
[data-windows-titlebar] .AppFrame_centerCol {
|
|
24
|
+
background: var(--dsw-alias-bg-base);
|
|
25
|
+
border-radius: var(--dsh-windows-content-radius) 0 0 0;
|
|
26
|
+
corner-shape: round;
|
|
27
|
+
}
|
|
28
|
+
[data-windows-titlebar] .AppFrame_frame::before {
|
|
29
|
+
content: "";
|
|
30
|
+
position: absolute;
|
|
31
|
+
inset: 0 0 auto;
|
|
32
|
+
height: var(--dsh-windows-titlebar-height);
|
|
33
|
+
background: var(--dsw-specific-sidebar-fill);
|
|
34
|
+
-webkit-app-region: drag;
|
|
35
|
+
}
|
|
36
|
+
[data-windows-titlebar] .AppFrame_sidebarCol {
|
|
37
|
+
border-right: none;
|
|
38
|
+
}
|
|
39
|
+
[data-windows-titlebar] .AppFrame_handle {
|
|
40
|
+
top: var(--dsh-windows-titlebar-height);
|
|
41
|
+
}
|
|
42
|
+
@media (prefers-reduced-motion: reduce) {
|
|
43
|
+
.AppFrame_frame[data-animating] {
|
|
44
|
+
transition: none;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
.AppFrame_sidebarCol {
|
|
48
|
+
min-width: 0;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
background: var(--dsw-specific-sidebar-fill);
|
|
51
|
+
border-right: 0.5px solid var(--dsw-alias-border-l3);
|
|
52
|
+
}
|
|
53
|
+
.AppFrame_centerCol {
|
|
54
|
+
min-width: 0;
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
}
|
|
59
|
+
.AppFrame_frame[data-rightbar-fullscreen] .AppFrame_centerCol {
|
|
60
|
+
visibility: hidden;
|
|
61
|
+
}
|
|
62
|
+
[data-platform=darwin] .AppFrame_frame {
|
|
63
|
+
background: transparent;
|
|
64
|
+
}
|
|
65
|
+
html[data-platform=darwin] {
|
|
66
|
+
--dsh-frame-top-clearance: 48px;
|
|
67
|
+
}
|
|
68
|
+
html[data-windows-titlebar] {
|
|
69
|
+
--dsh-frame-top-clearance: var(--dsh-windows-titlebar-height);
|
|
70
|
+
--dsh-frame-chrome-top: var(--dsh-windows-titlebar-height);
|
|
71
|
+
}
|
|
72
|
+
html[data-platform=darwin],
|
|
73
|
+
html[data-windows-titlebar] {
|
|
74
|
+
--dsh-frame-overlay-top: calc(var(--dsh-frame-top-clearance) + 20px);
|
|
75
|
+
}
|
|
76
|
+
html[data-platform=darwin][data-fullscreen],
|
|
77
|
+
html[data-windows-titlebar][data-fullscreen] {
|
|
78
|
+
--dsh-frame-overlay-top: 20px;
|
|
79
|
+
--dsh-frame-chrome-top: 0px;
|
|
80
|
+
}
|
|
81
|
+
[data-platform=darwin] .AppFrame_sidebarCol {
|
|
82
|
+
background:
|
|
83
|
+
linear-gradient(
|
|
84
|
+
to bottom,
|
|
85
|
+
rgb(122 155 240 / 0.1),
|
|
86
|
+
rgb(122 155 240 / 0) 35%,
|
|
87
|
+
rgb(143 137 184 / 0) 68%,
|
|
88
|
+
rgb(143 137 184 / 0.09)),
|
|
89
|
+
color-mix(in srgb, color-mix(in srgb, var(--dsw-specific-sidebar-fill) 97%, rgb(122 155 240)) 40%, transparent);
|
|
90
|
+
border-right: none;
|
|
91
|
+
}
|
|
92
|
+
[data-platform=darwin] [data-ds-dark-theme] .AppFrame_sidebarCol {
|
|
93
|
+
background:
|
|
94
|
+
linear-gradient(
|
|
95
|
+
to bottom,
|
|
96
|
+
rgb(122 155 240 / 0.08),
|
|
97
|
+
rgb(122 155 240 / 0) 35%,
|
|
98
|
+
rgb(143 137 184 / 0) 68%,
|
|
99
|
+
rgb(143 137 184 / 0.07)),
|
|
100
|
+
color-mix(in srgb, var(--dsw-specific-sidebar-fill) 50%, transparent);
|
|
101
|
+
}
|
|
102
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
103
|
+
[data-platform=darwin] .AppFrame_sidebarCol,
|
|
104
|
+
[data-platform=darwin] [data-ds-dark-theme] .AppFrame_sidebarCol {
|
|
105
|
+
background: color-mix(in srgb, var(--dsw-specific-sidebar-fill) 90%, transparent);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
[data-platform=darwin] .AppFrame_centerCol {
|
|
109
|
+
background: var(--dsw-alias-bg-base);
|
|
110
|
+
border-left: 0.5px solid var(--dsw-alias-border-l3);
|
|
111
|
+
}
|
|
112
|
+
[data-platform=darwin] .AppFrame_rightbarCol {
|
|
113
|
+
background: var(--dsw-alias-bg-base);
|
|
114
|
+
}
|
|
115
|
+
[data-platform=darwin] [data-sidebar-collapsed] .AppFrame_centerCol {
|
|
116
|
+
border-left: none;
|
|
117
|
+
}
|
|
118
|
+
[data-platform=darwin] .AppFrame_frame[data-sidebar-collapsed] {
|
|
119
|
+
--dsh-frame-leading-clearance: 160px;
|
|
120
|
+
}
|
|
121
|
+
[data-platform=darwin][data-fullscreen] .AppFrame_frame[data-sidebar-collapsed] {
|
|
122
|
+
--dsh-frame-leading-clearance: 84px;
|
|
123
|
+
}
|
|
124
|
+
[data-platform=darwin][data-fullscreen] .AppFrame_leadingSeat {
|
|
125
|
+
left: 12px;
|
|
126
|
+
}
|
|
127
|
+
.AppFrame_leadingSeat {
|
|
128
|
+
position: absolute;
|
|
129
|
+
top: 11px;
|
|
130
|
+
left: 88px;
|
|
131
|
+
z-index: 15;
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
-webkit-app-region: no-drag;
|
|
135
|
+
}
|
|
136
|
+
.AppFrame_handle {
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: 0;
|
|
139
|
+
bottom: 0;
|
|
140
|
+
width: 8px;
|
|
141
|
+
margin-left: -4px;
|
|
142
|
+
cursor: col-resize;
|
|
143
|
+
z-index: 11;
|
|
144
|
+
touch-action: none;
|
|
145
|
+
}
|
|
146
|
+
.AppFrame_frame[data-animating] .AppFrame_handle {
|
|
147
|
+
transition: left var(--ds-transition-duration-slow) var(--ds-ease-in-out);
|
|
148
|
+
}
|
|
149
|
+
.AppFrame_frame[data-dragging] .AppFrame_handle {
|
|
150
|
+
transition: none;
|
|
151
|
+
}
|
|
152
|
+
.AppFrame_frame[data-rightbar-fullscreen],
|
|
153
|
+
.AppFrame_frame[data-rightbar-fullscreen] .AppFrame_handle,
|
|
154
|
+
.AppFrame_frame[data-rightbar-instant],
|
|
155
|
+
.AppFrame_frame[data-rightbar-instant] .AppFrame_handle {
|
|
156
|
+
transition: none;
|
|
157
|
+
}
|
|
158
|
+
@media (prefers-reduced-motion: reduce) {
|
|
159
|
+
.AppFrame_frame[data-animating] .AppFrame_handle {
|
|
160
|
+
transition: none;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
.AppFrame_rightbarCol {
|
|
164
|
+
position: relative;
|
|
165
|
+
min-width: 0;
|
|
166
|
+
overflow: visible;
|
|
167
|
+
}
|
|
168
|
+
.AppFrame_overlayLayer {
|
|
169
|
+
position: absolute;
|
|
170
|
+
inset: 0;
|
|
171
|
+
z-index: 20;
|
|
172
|
+
pointer-events: none;
|
|
173
|
+
}
|
|
174
|
+
.AppFrame_overlayLayer > * {
|
|
175
|
+
pointer-events: auto;
|
|
176
|
+
}
|
|
177
|
+
/*# sourceMappingURL=client.css.map */
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../harness-browser-integration/packages/client/ui-layout/src/client/AppFrame.module.css"],
|
|
4
|
+
"sourcesContent": [".frame {\n position: relative; /* anchors the drag handles, which straddle column borders */\n display: grid;\n grid-template-rows: 100%;\n height: 100%;\n overflow: hidden;\n background: var(--dsw-alias-bg-base);\n}\n\n/* Only a discrete collapse/expand toggle eases the tracks (the TSX holds\n data-animating across the toggle on the deepsuite sider curve). Steady-state\n tracks move only with the viewport, and those updates must land instantly:\n an eased track chases the live window edge and the centre column visibly\n rubber-bands while the user resizes the window. */\n.frame[data-animating] {\n transition: grid-template-columns var(--ds-transition-duration-slow) var(--ds-ease-in-out);\n}\n\n/* Dragging writes widths at pointer cadence; easing them would detach the\n column from the handle. */\n.frame[data-dragging] {\n transition: none;\n}\n\n/* The Windows caption row remains outside every conversation and file panel. */\n:global([data-windows-titlebar]) .frame {\n --dsh-windows-content-radius: 16px;\n box-sizing: border-box;\n padding-top: var(--dsh-windows-titlebar-height);\n grid-template-rows: minmax(0, 1fr);\n background: var(--dsw-specific-sidebar-fill);\n}\n\n:global([data-windows-titlebar]) .centerCol {\n background: var(--dsw-alias-bg-base);\n border-radius: var(--dsh-windows-content-radius) 0 0 0;\n corner-shape: round;\n}\n\n:global([data-windows-titlebar]) .frame::before {\n content: '';\n position: absolute;\n inset: 0 0 auto;\n height: var(--dsh-windows-titlebar-height);\n background: var(--dsw-specific-sidebar-fill);\n -webkit-app-region: drag;\n}\n\n:global([data-windows-titlebar]) .sidebarCol {\n border-right: none;\n}\n\n:global([data-windows-titlebar]) .handle {\n top: var(--dsh-windows-titlebar-height);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .frame[data-animating] {\n transition: none;\n }\n}\n\n.sidebarCol {\n min-width: 0;\n overflow: hidden;\n background: var(--dsw-specific-sidebar-fill);\n border-right: 0.5px solid var(--dsw-alias-border-l3);\n}\n\n.centerCol {\n min-width: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n/* Keep the covered main tree mounted and measured, but out of paint and focus.\n A glass theme can create a stacking context on the right panel, trapping its\n dock layer below main content. Fullscreen owns the visible center regardless\n of that theme; restoring it preserves the same composer and draft. */\n.frame[data-rightbar-fullscreen] .centerCol {\n visibility: hidden;\n}\n\n/* macOS desktop: the frame goes transparent so window vibrancy reaches the\n sidebar column, which keeps only a translucent tint; the centre paints the\n base background itself to stay opaque. The sidebar/centre separator moves\n to the opaque centre: on the translucent sidebar the alpha border mixes\n with the wallpaper and reads as a dark seam. */\n:global([data-platform='darwin']) .frame {\n background: transparent;\n}\n\n/* The constant step below the window's top strip (traffic lights, sidebar\n toggle, shell.leading controls), the same in both sidebar states. Entry\n pages in the main panel (plugin manager, settings-like pages \u2014 not the\n conversation, which owns its header) pad their top by it so their leading\n content clears the strip, and overlay primitives add their own safe inset.\n Declared on the root element rather than the frame so\n overlays portalled to document.body inherit it too. */\n:global(html[data-platform='darwin']) {\n --dsh-frame-top-clearance: 48px;\n}\n\n/* In-frame Windows content already clears the caption through .frame padding. */\n:global(html[data-windows-titlebar]) {\n --dsh-frame-top-clearance: var(--dsh-windows-titlebar-height);\n --dsh-frame-chrome-top: var(--dsh-windows-titlebar-height);\n}\n\n/* Portalled overlays share a viewport inset without adding space to entry pages. */\n:global(html[data-platform='darwin']),\n:global(html[data-windows-titlebar]) {\n --dsh-frame-overlay-top: calc(var(--dsh-frame-top-clearance) + 20px);\n}\n\n:global(html[data-platform='darwin'][data-fullscreen]),\n:global(html[data-windows-titlebar][data-fullscreen]) {\n --dsh-frame-overlay-top: 20px;\n --dsh-frame-chrome-top: 0px;\n}\n\n:global([data-platform='darwin']) .sidebarCol {\n /* A blue wash over the top of the translucent tint, gone by a third of the\n column; a faint blue-grey-violet rises through the bottom third; and a\n faint blue cast is mixed into the tint itself. Every layer stays\n transparent so vibrancy shows. */\n background:\n linear-gradient(\n to bottom,\n rgb(122 155 240 / 0.1),\n rgb(122 155 240 / 0) 35%,\n rgb(143 137 184 / 0) 68%,\n rgb(143 137 184 / 0.09)\n ),\n color-mix(in srgb, color-mix(in srgb, var(--dsw-specific-sidebar-fill) 97%, rgb(122 155 240)) 40%, transparent);\n border-right: none;\n}\n\n/* Dark drops the blue cast (the light-mode wash reads purple over dark fills)\n and thins the fill so more wallpaper shows; the washes stay. */\n:global([data-platform='darwin']) :global([data-ds-dark-theme]) .sidebarCol {\n background:\n linear-gradient(\n to bottom,\n rgb(122 155 240 / 0.08),\n rgb(122 155 240 / 0) 35%,\n rgb(143 137 184 / 0) 68%,\n rgb(143 137 184 / 0.07)\n ),\n color-mix(in srgb, var(--dsw-specific-sidebar-fill) 50%, transparent);\n}\n\n/* macOS Reduce Transparency: the OS flattens the window's vibrancy layer to a\n solid grey, so the thin tint and washes read washed-out over it. Replace\n them with a 90%-opaque fill of the same token in both themes (the dark\n selector repeats so this outranks its thinner fill). */\n@media (prefers-reduced-transparency: reduce) {\n :global([data-platform='darwin']) .sidebarCol,\n :global([data-platform='darwin']) :global([data-ds-dark-theme]) .sidebarCol {\n background: color-mix(in srgb, var(--dsw-specific-sidebar-fill) 90%, transparent);\n }\n}\n\n:global([data-platform='darwin']) .centerCol {\n background: var(--dsw-alias-bg-base);\n border-left: 0.5px solid var(--dsw-alias-border-l3);\n}\n\n/* The right track paints the base ground on the transparent frame: while the\n track and the occupant's translateX slide ride the same curve, the grid\n eases in layout and the transform on the compositor, so frames where they\n diverge would otherwise show vibrancy glass between the centre's right edge\n and the incoming panel. The occupant's opaque panel covers this at rest. */\n:global([data-platform='darwin']) .rightbarCol {\n background: var(--dsw-alias-bg-base);\n}\n\n/* The darwin closed sidebar has no rail: the centre reaches the window edge,\n where a separator would draw a seam against nothing. */\n:global([data-platform='darwin']) [data-sidebar-collapsed] .centerCol {\n border-left: none;\n}\n\n/* Published while the shell.leading seat is mounted (same condition as the\n TSX mount: darwin with the sidebar collapsed \u2014 the collapse that hides the\n column entirely): the inline band the window chrome occupies, measured from\n the frame's left edge \u2014 traffic lights to x 68, controls at x 88\n (28 + 8 + 28), then 8px of air. Main panels whose content reaches the\n top-left corner pad by this. */\n:global([data-platform='darwin']) .frame[data-sidebar-collapsed] {\n --dsh-frame-leading-clearance: 160px;\n}\n\n/* Fullscreen hides the traffic lights (preload mirrors the window state onto\n html[data-fullscreen]): the seat takes their band and the clearance keeps\n only the controls (12 + 28 + 8 + 28 + 8). The 12px start matches the\n expanded sidebar strip's inline padding (ui-sidebar .topStrip), so\n collapsing never shifts the toggle. */\n:global([data-platform='darwin'][data-fullscreen]) .frame[data-sidebar-collapsed] {\n --dsh-frame-leading-clearance: 84px;\n}\n\n:global([data-platform='darwin'][data-fullscreen]) .leadingSeat {\n left: 12px;\n}\n\n/* The frame declares no window drag of its own: every chrome row owns the drag\n over its own box (ui-web base.css holds the one rule; the ui-theme app-region\n gate lists the rows). The ordering rule that replaces the old \"band first\"\n invariant: a surface that covers the window and must stay clickable portals\n beside #root, which puts it after every drag row in document order. The Windows\n caption row above is the other platform's chrome and stays. */\n\n/* The seat itself: the two 28px controls centered on the conversation title\n row (10px header inset + 30px row \u2192 centre y 25) and level with the traffic\n lights (centre y \u2248 24). Sits above column content, below frame overlays\n (20) and the fullscreen right panel (40). The box subtracts itself from any\n window drag row beneath (Electron app-regions are geometry, not stacking). */\n.leadingSeat {\n position: absolute;\n top: 11px;\n left: 88px;\n z-index: 15;\n display: flex;\n align-items: center;\n -webkit-app-region: no-drag;\n}\n\n/* Drag handles are frame children (columns clip overflow): an 8px hit strip\n centered on the column border via inline left, above column content. No\n handle draws a visible pill: the details column was the only one that did,\n and the right column never had one. The right handle sits above the right\n panel (which states z-index 10) so it stays grabbable when the panel hangs\n over the centre. */\n.handle {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 8px;\n margin-left: -4px;\n cursor: col-resize;\n z-index: 11;\n touch-action: none;\n}\n\n/* Rides the same curve as the tracks so the pill stays on the moving border\n during collapse/expand; instant at steady state (viewport-driven moves)\n and while dragging. */\n.frame[data-animating] .handle {\n transition: left var(--ds-transition-duration-slow) var(--ds-ease-in-out);\n}\n\n.frame[data-dragging] .handle {\n transition: none;\n}\n\n/* Fullscreen covers the frame while its underlying columns enter or exit. */\n.frame[data-rightbar-fullscreen],\n.frame[data-rightbar-fullscreen] .handle,\n.frame[data-rightbar-instant],\n.frame[data-rightbar-instant] .handle {\n transition: none;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .frame[data-animating] .handle {\n transition: none;\n }\n}\n\n/*\n * The right column never clips: its occupant anchors a fixed-width panel to the\n * column's right edge (the frame's edge, which never moves) and lets the track\n * decide whether the centre makes room. With no track the panel hangs over the\n * centre from a zero-width column, and while the track animates the panel stays\n * where it is. The occupant draws its own left border.\n */\n.rightbarCol {\n position: relative;\n min-width: 0;\n overflow: visible;\n}\n\n.overlayLayer {\n position: absolute;\n inset: 0;\n z-index: 20;\n pointer-events: none;\n}\n\n.overlayLayer > * {\n pointer-events: auto;\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,CAACA;AACC,YAAU;AACV,WAAS;AACT,sBAAoB;AACpB,UAAQ;AACR,YAAU;AACV,cAAY,IAAI;AAClB;AAOA,CAdCA,cAcK,CAAC;AACL,cAAY,sBAAsB,IAAI,+BAA+B,IAAI;AAC3E;AAIA,CApBCA,cAoBK,CAAC;AACL,cAAY;AACd;AAGQ,CAAC,uBAAwB,CAzBhCA;AA0BC,gCAA8B;AAC9B,cAAY;AACZ,eAAa,IAAI;AACjB,sBAAoB,OAAO,CAAC,EAAE;AAC9B,cAAY,IAAI;AAClB;AAEQ,CAAC,uBAAwB,CAACC;AAChC,cAAY,IAAI;AAChB,iBAAe,IAAI,8BAA8B,EAAE,EAAE;AACrD,gBAAc;AAChB;AAEQ,CAAC,uBAAwB,CAvChCD,cAuCsC;AACrC,WAAS;AACT,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