From e8d2f5ade94fd95831e3b17ecb0f81e693e5acce Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 26 Sep 2026 11:57:40 -0700 Subject: [PATCH 01/60] Fix argument order, sizing, and interleaving bugs in microphone handling Adapted from commit dd43d476b023acfcaab4bdee942c98fd30d83f50 in https://github.com/jimrandomh/g2flash/pull/4. Co-Authored-By: Kalani Helekunihi --- app/apps/microphones/mic-protocol.ts | 25 +++++++++++++------------ app/apps/microphones/mic-session.ts | 4 ++-- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/app/apps/microphones/mic-protocol.ts b/app/apps/microphones/mic-protocol.ts index 02cd9788..5f8e0f63 100644 --- a/app/apps/microphones/mic-protocol.ts +++ b/app/apps/microphones/mic-protocol.ts @@ -12,8 +12,8 @@ * * Per-temple: each arm is its own endpoint and its own 2-mic array (front * mic near the hinge = chanMask bit0, rear mic near the touchpad = bit1); - * the same config goes to both temples. Stereo payloads arrive as two - * CONCATENATED channel blocks (front then rear), not interleaved. Sessions + * the same config goes to both temples. Stereo payloads are INTERLEAVED PCM16 + * (ch0, ch1, ch0, ch1, ...), the capture dispatch buffer verbatim. Sessions * hold a 90 s lease; renew with op RENEW while streaming. * * Pure module: byte codecs only, no platform imports (the BLE plumbing lives @@ -54,7 +54,7 @@ export type MicConfig = { /** * Host-side per-microphone selection. Each temple streams its full * front+rear stereo pair over BLE (wire channelMask stays 0b11); the phone - * splits the concatenated channels and this mask decides which of the four + * deinterleaves the channels and this mask decides which of the four * mics feed levels-for-use, beamforming, captions, and recording. A temple * with both mics off is sent STOP so its stream doesn't waste bandwidth. */ @@ -260,25 +260,26 @@ export function decodeMicStreamFrame(data: Uint8Array): MicStreamFrame | null { /** * Split a raw PCM16 SM payload into per-channel Float32Arrays in [-1, 1]. - * Channels arrive as CONCATENATED blocks (front then rear), matching the - * firmware's stereo callback, which dispatches two back-to-back extraction - * results rather than interleaving. + * Channels arrive INTERLEAVED: the firmware forwards the stock capture + * dispatch buffer, which the stock algo reads as ch0 = pcm[2i], ch1 = + * pcm[2i+1] (in samples). Channel 0 is assumed to be the front mic; that + * mapping is not yet confirmed on hardware. */ -export function splitConcatenatedPcm16(frame: MicStreamFrame): Float32Array[] | null { +export function splitInterleavedPcm16(frame: MicStreamFrame): Float32Array[] | null { if (frame.codec !== "raw" || frame.format !== "pcm16" || frame.channelCount < 1) { return null; } const channels = frame.channelCount; - const bytesPerChannel = Math.floor(frame.payload.length / channels) & ~1; - const samplesPerChannel = bytesPerChannel / 2; + const frameBytes = channels * 2; + const samplesPerChannel = Math.floor(frame.payload.length / frameBytes); if (samplesPerChannel <= 0) return null; const out: Float32Array[] = []; for (let channel = 0; channel < channels; channel++) { - const base = channel * bytesPerChannel; const samples = new Float32Array(samplesPerChannel); for (let index = 0; index < samplesPerChannel; index++) { - const lo = frame.payload[base + index * 2]!; - const hi = frame.payload[base + index * 2 + 1]!; + const offset = index * frameBytes + channel * 2; + const lo = frame.payload[offset]!; + const hi = frame.payload[offset + 1]!; let value = lo | (hi << 8); if (value >= 0x8000) value -= 0x10000; samples[index] = value / 32768; diff --git a/app/apps/microphones/mic-session.ts b/app/apps/microphones/mic-session.ts index 5f019ab8..b18e2ac7 100644 --- a/app/apps/microphones/mic-session.ts +++ b/app/apps/microphones/mic-session.ts @@ -24,7 +24,7 @@ import { isStockAudioPacket, micChannelKey, micChannelLabel, - splitConcatenatedPcm16, + splitInterleavedPcm16, templeActive, type MicChannelKey, type MicSide, @@ -586,7 +586,7 @@ class MicSession { return; } const side: MicSide = arm === "L" ? "left" : "right"; - const channels = splitConcatenatedPcm16(frame); + const channels = splitInterleavedPcm16(frame); if (!channels || channels.length === 0) return; // Meter every arriving channel — a host-disabled mic still shows its From 7d0becfaa77c9c1f9447405464294b97848e3a4e Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 26 Sep 2026 14:12:29 -0700 Subject: [PATCH 02/60] Fix some microphone-related bugs, add a debug panel --- .../faceclaw/app/FaceclawBleCommunicator.kt | 4 + app/apps/developer/developer-app.ts | 19 +- app/apps/developer/microphones-monitor.ts | 426 ++++++++++++++++++ app/apps/microphones/mic-protocol.ts | 55 +++ app/g2/firmware/cfw-patches.ts | 68 +-- app/native/audio-monitor.ts | 77 ++++ .../session/GlassesSessionControls.kt | 16 + .../g2protocol/session/GlassesSessionCore.kt | 22 +- 8 files changed, 650 insertions(+), 37 deletions(-) create mode 100644 app/apps/developer/microphones-monitor.ts create mode 100644 app/native/audio-monitor.ts diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt index 65d9c9c8..5ec0fc34 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt @@ -212,6 +212,10 @@ class FaceclawBleCommunicator(context: Context, rightAddress: String?, leftAddre fun stopG2AudioForwarding() = core.stopG2AudioForwarding() + fun addAudioMonitorListener(listener: FaceclawAudioPacketListener?) = core.addAudioMonitorListener(listener) + + fun removeAudioMonitorListener(listener: FaceclawAudioPacketListener?) = core.removeAudioMonitorListener(listener) + fun addCompassListener(listener: FaceclawCompassListener?) = core.addCompassListener(listener) fun removeCompassListener(listener: FaceclawCompassListener?) = core.removeCompassListener(listener) diff --git a/app/apps/developer/developer-app.ts b/app/apps/developer/developer-app.ts index 8a8366da..4412638a 100644 --- a/app/apps/developer/developer-app.ts +++ b/app/apps/developer/developer-app.ts @@ -6,6 +6,7 @@ import { BuzzerDemoLayer } from "./buzzer-demo"; import { AccelerometerDemoLayer } from "./accelerometer-demo"; import { BandwidthBenchmarkLayer } from "./bandwidth-benchmark"; import { LightSensorDemoLayer } from "./light-sensor-demo"; +import { MicrophonesMonitorLayer } from "./microphones-monitor"; import { ResourceUsageLayer } from "./resource-usage"; import { LoadAppFromQrLayer, LoadAppFromUrlLayer } from "./load-app"; import { unicodeTestMenu } from "./unicode-test"; @@ -49,8 +50,10 @@ function submenuItem(label: string, onSelect: MenuItem["onSelect"]): MenuItem { }; } +type OpenPage = (ctx: Parameters[0]) => void; + /** The diagnostic demos, one level down from the root menu. */ -function debugTestsMenu(openInputEvents: (ctx: Parameters[0]) => void): MenuLayer { +function debugTestsMenu(openInputEvents: OpenPage, openMicrophones: OpenPage): MenuLayer { return new MenuLayer( "Debug tests", [ @@ -85,6 +88,12 @@ function debugTestsMenu(openInputEvents: (ctx: Parameters[ ctx.stack.push(new LightSensorDemoLayer(DEVELOPER_WINDOW_ID, ctx.actions.requestRender)); }, }, + { + label: "Microphones", + disabled: global.isIOS, + description: global.isIOS ? "Not available on iOS yet." : undefined, + onSelect: openMicrophones, + }, { label: "BLE bandwidth", onSelect: (ctx) => { @@ -107,6 +116,7 @@ function debugTestsMenu(openInputEvents: (ctx: Parameters[ */ export function createDeveloperAppWindow(appContext: AppContext, options: InProcessAppOptions): InProcessWindow { let inputEvents: InputEventsLayer | null = null; + let microphones: MicrophonesMonitorLayer | null = null; const menu = new MenuLayer( "Developer", [ @@ -141,6 +151,11 @@ export function createDeveloperAppWindow(appContext: AppContext, options: InProc () => { if (inputEvents === page) inputEvents = null; }); inputEvents = page; inputCtx.stack.push(page); + }, (micCtx) => { + const page = new MicrophonesMonitorLayer(DEVELOPER_WINDOW_ID, micCtx.actions.requestRender, + () => { if (microphones === page) microphones = null; }); + microphones = page; + micCtx.stack.push(page); })); }), ], @@ -155,7 +170,7 @@ export function createDeveloperAppWindow(appContext: AppContext, options: InProc icon: "wrench", closeable: true, actions: options.actions, - menuItems: () => inputEvents?.menuItems() ?? [], + menuItems: () => inputEvents?.menuItems() ?? microphones?.menuItems() ?? [], // Dictating a URL is the one thing worth speaking at in this app; the // load pages take the text and every other page ignores it. receiveTextInput: (text) => { diff --git a/app/apps/developer/microphones-monitor.ts b/app/apps/developer/microphones-monitor.ts new file mode 100644 index 00000000..0023a242 --- /dev/null +++ b/app/apps/developer/microphones-monitor.ts @@ -0,0 +1,426 @@ +import { getDefaultSmallFont } from "../../graphics/ui-fonts"; +import { GrayImage } from "../../graphics/image"; +import { clamp } from "../../util/numeric-util"; +import { + addAudioMonitorListeners, + audioMonitorCommunicator, + isFaceclawAudioCaptureActive, + type AudioArm, +} from "../../native/audio-monitor"; +import { micArrayController } from "../microphones/mic-control"; +import { + MIC_RET_NONE, + STOCK_PACKET_BYTES, + decodeMicStatus, + decodeMicStreamFrame, + splitInterleavedPcm16, + type MicStatus, + type MicStreamFrame, +} from "../microphones/mic-protocol"; +import { GESTURE_DOUBLE_CLICK, type InputEvent } from "../../ui/gestures"; +import { type MenuItem } from "../../ui/menu"; +import { Layer, type LayerContext } from "../../ui/layers"; +import { shell } from "../../ui/shell/shell"; + +// Packet rate / byte rate / largest gap are measured over this trailing window. +const RATE_WINDOW_MS = 2_000; +// Activity strip: packet counts per bucket over the last HISTORY_MS. +const HISTORY_MS = 20_000; +const BUCKET_MS = 500; +const BUCKETS = HISTORY_MS / BUCKET_MS; +// Repaint cadence; also how often a replaced communicator is re-subscribed. +const TICK_MS = 250; +// Stock packet trailer (see Lc3PacketFramer.kt): SSR, angle, counter. +const STOCK_SSR_OFFSET = 200; +const STOCK_ANGLE_OFFSET = 202; +const STOCK_COUNTER_OFFSET = 204; +// Counter gaps at or beyond this are late/duplicate copies, not losses. +const STOCK_LATE_GAP = 128; +const LEVEL_FLOOR_DB = -90; + +// wallMs (JS receipt time) windows the rates; arrivalMs (the session core's +// elapsed-realtime stamp, taken on the BLE thread) measures gaps without the +// main-thread hop's jitter. +type Arrival = { wallMs: number; arrivalMs: number; bytes: number }; + +type ArmStats = { + packets: number; + stockPackets: number; + smPackets: number; + otherPackets: number; + lastOtherBytes: number; + lastArrivalWallMs: number | null; + recent: Arrival[]; + buckets: number[]; + stockCounter: number | null; + stockLost: number; + stockDuplicate: number; + stockAngle: number; + stockSsr: number; + frame: MicStreamFrame | null; + smSeq: number | null; + smSeqGaps: number; + channelDb: number[]; + status: MicStatus | null; + statusAtMs: number | null; +}; + +function emptyStats(): ArmStats { + return { + packets: 0, + stockPackets: 0, + smPackets: 0, + otherPackets: 0, + lastOtherBytes: 0, + lastArrivalWallMs: null, + recent: [], + buckets: new Array(BUCKETS).fill(0), + stockCounter: null, + stockLost: 0, + stockDuplicate: 0, + stockAngle: 0, + stockSsr: 0, + frame: null, + smSeq: null, + smSeqGaps: 0, + channelDb: [], + status: null, + statusAtMs: null, + }; +} + +/** + * Passive microphone monitor: shows what the glasses are sending on the + * audio characteristic, per temple, without enabling anything. Open it, then + * activate the mics from another app (Microphones, Transcribe, voice input) + * and come back: collection continues while this page is hidden, so the + * counters and the 20 s activity strip show whether that activation produced + * a stream, what kind (stock mono LC3 or CFW 'SM' frames), and how healthy it + * is. CFW mic_control status records are shown when they arrive: after a + * CONFIGURE, with the periodic battery read, or from this window's "Query mic + * status" menu item (a status request only; it touches no mic hardware). + * Only the right temple can send status; each lens's debug overlay shows its + * own counters. + */ +export class MicrophonesMonitorLayer implements Layer { + private readonly stats: Record<"L" | "R", ArmStats> = { L: emptyStats(), R: emptyStats() }; + private unknownArmPackets = 0; + private bucketStartMs = Date.now(); + private communicator: any = null; + private unsubscribe: (() => void) | null = null; + private timer: ReturnType | null = null; + private removed = false; + + constructor( + private readonly windowId: string, + private readonly requestRender: () => void, + private readonly onClosed: () => void = () => {}, + ) { + this.tick(); + this.timer = setInterval(() => this.tick(), TICK_MS); + } + + onRemoved(): void { + this.removed = true; + if (this.timer !== null) { + clearInterval(this.timer); + this.timer = null; + } + this.unsubscribe?.(); + this.unsubscribe = null; + this.communicator = null; + this.onClosed(); + } + + private tick(): void { + if (this.removed) return; + const communicator = audioMonitorCommunicator(); + if (communicator !== this.communicator) { + this.unsubscribe?.(); + this.communicator = communicator; + this.unsubscribe = addAudioMonitorListeners( + communicator, + (data, arm, arrivalMs) => this.onPacket(data, arm, arrivalMs), + (body, arm) => this.onStatus(body, arm), + ); + } + this.advanceBuckets(Date.now()); + if (shell.isWindowVisible(this.windowId)) this.requestRender(); + } + + private advanceBuckets(nowMs: number): void { + while (nowMs - this.bucketStartMs >= BUCKET_MS) { + this.bucketStartMs += BUCKET_MS; + for (const stats of Object.values(this.stats)) { + stats.buckets.shift(); + stats.buckets.push(0); + } + } + } + + private onPacket(data: Uint8Array, arm: AudioArm, arrivalMs: number): void { + if (this.removed) return; + if (arm === "?") { + this.unknownArmPackets++; + return; + } + const stats = this.stats[arm]; + const nowMs = Date.now(); + this.advanceBuckets(nowMs); + stats.packets++; + stats.buckets[BUCKETS - 1]!++; + stats.recent.push({ wallMs: nowMs, arrivalMs, bytes: data.length }); + stats.lastArrivalWallMs = nowMs; + + const frame = decodeMicStreamFrame(data); + if (frame) { + this.onStreamFrame(stats, frame); + } else if (data.length === STOCK_PACKET_BYTES) { + this.onStockPacket(stats, data); + } else { + stats.otherPackets++; + stats.lastOtherBytes = data.length; + } + } + + private onStockPacket(stats: ArmStats, data: Uint8Array): void { + stats.stockPackets++; + const counter = data[STOCK_COUNTER_OFFSET]!; + if (stats.stockCounter !== null) { + const gap = (counter - stats.stockCounter) & 0xff; + if (gap === 0 || gap >= STOCK_LATE_GAP) { + stats.stockDuplicate++; + return; + } + stats.stockLost += gap - 1; + } + stats.stockCounter = counter; + stats.stockSsr = readS16(data, STOCK_SSR_OFFSET); + stats.stockAngle = readS16(data, STOCK_ANGLE_OFFSET); + } + + private onStreamFrame(stats: ArmStats, frame: MicStreamFrame): void { + stats.smPackets++; + if (stats.smSeq !== null && frame.sequence !== ((stats.smSeq + 1) & 0xffff)) stats.smSeqGaps++; + stats.smSeq = frame.sequence; + stats.frame = frame; + const channels = splitInterleavedPcm16(frame); + stats.channelDb = channels ? channels.map(rmsDb) : []; + } + + private onStatus(body: Uint8Array, arm: AudioArm): void { + if (this.removed || arm === "?") return; + const status = decodeMicStatus(body); + if (!status) return; + this.stats[arm].status = status; + this.stats[arm].statusAtMs = Date.now(); + } + + paint(ctx: LayerContext): GrayImage { + const font = getDefaultSmallFont(); + const line = font.lineHeight; + const { width, height } = ctx.stack.getBaseSize(); + const image = new GrayImage(width, height, 0); + const nowMs = Date.now(); + + image.drawText(font, 16, 5, "Microphones (passive)", 230); + const capture = isFaceclawAudioCaptureActive() ? "Faceclaw capture: on" : "Faceclaw capture: off"; + image.drawText(font, width - 16 - font.measureText(capture), 5, capture, 170); + + if (!this.communicator) { + image.drawText(font, 16, 5 + line * 2, "Glasses not connected.", 190); + image.drawText(font, 16, height - 16, `${GESTURE_DOUBLE_CLICK} back`, 110); + return image; + } + + const gutter = 16; + const columnWidth = Math.floor((width - gutter * 3) / 2); + const stripHeight = 22; + const top = 5 + line + 6; + const bottom = height - 16 - stripHeight - 8; + this.paintArm(image, "L", "Left", gutter, top, columnWidth, bottom, nowMs); + this.paintArm(image, "R", "Right", gutter * 2 + columnWidth, top, columnWidth, bottom, nowMs); + + const stripY = height - 16 - stripHeight - 4; + const stripMax = Math.max(1, ...this.stats.L.buckets, ...this.stats.R.buckets); + drawStrip(image, this.stats.L.buckets, gutter, stripY, columnWidth, stripHeight, stripMax); + drawStrip(image, this.stats.R.buckets, gutter * 2 + columnWidth, stripY, columnWidth, stripHeight, stripMax); + + const footer = this.unknownArmPackets > 0 + ? `last ${HISTORY_MS / 1000} s unattributed packets ${this.unknownArmPackets}` + : `packets per ${BUCKET_MS} ms, last ${HISTORY_MS / 1000} s`; + image.drawText(font, gutter, height - 16, footer, 110); + const back = `${GESTURE_DOUBLE_CLICK} back tap reset`; + image.drawText(font, width - gutter - font.measureText(back), height - 16, back, 110); + return image; + } + + private paintArm( + image: GrayImage, + arm: "L" | "R", + label: string, + x: number, + top: number, + width: number, + bottom: number, + nowMs: number, + ): void { + const font = getDefaultSmallFont(); + const line = font.lineHeight; + const stats = this.stats[arm]; + const cutoff = nowMs - RATE_WINDOW_MS; + while (stats.recent.length > 0 && stats.recent[0]!.wallMs < cutoff) stats.recent.shift(); + const rate = (stats.recent.length * 1000) / RATE_WINDOW_MS; + const byteRate = stats.recent.reduce((sum, arrival) => sum + arrival.bytes, 0) / RATE_WINDOW_MS; + let maxGap = 0; + for (let i = 1; i < stats.recent.length; i++) { + maxGap = Math.max(maxGap, stats.recent[i]!.arrivalMs - stats.recent[i - 1]!.arrivalMs); + } + + const rows: Array<[string, number]> = []; + const streaming = stats.recent.length > 0; + rows.push([`${label}: ${streaming ? `${rate.toFixed(1)} pkt/s ${byteRate.toFixed(1)} kB/s` : "silent"}`, streaming ? 235 : 150]); + const age = stats.lastArrivalWallMs === null ? "never" : `${formatAge(nowMs - stats.lastArrivalWallMs)} ago`; + rows.push([`last ${age}${streaming && stats.recent.length > 1 ? ` max gap ${maxGap} ms` : ""}`, 170]); + rows.push([`total ${stats.packets}: stock ${stats.stockPackets} SM ${stats.smPackets} other ${stats.otherPackets}${stats.otherPackets ? ` (${stats.lastOtherBytes} B)` : ""}`, 170]); + if (stats.stockPackets > 0) { + rows.push([`stock LC3: lost ${stats.stockLost} dup ${stats.stockDuplicate}`, 190]); + rows.push([` angle ${stats.stockAngle}° ssr ${stats.stockSsr}`, 170]); + } + const frame = stats.frame; + if (frame) { + const flags = [frame.truncated ? "trunc" : "", stats.smSeqGaps ? `seq gaps ${stats.smSeqGaps}` : ""].filter(Boolean).join(" "); + rows.push([`SM: ${frame.channelCount}ch ${frame.sampleRateHz / 1000} kHz ${frame.codec} ${frame.payload.length} B ${flags}`, 190]); + rows.push([` angle ${frame.angleDegrees}° ssr ${frame.ssr}`, 170]); + } + const status = stats.status; + if (status) { + const armed = status.hardwareArmed ? "armed" : status.active ? "configured" : "inactive"; + rows.push([`CFW ${armed}: ${status.source} mask ${status.channelMask} frames ${status.framesEmitted}`, 190]); + rows.push([` ${status.codec} ${status.effectiveRateHz / 1000} kHz ${formatAge(nowMs - (stats.statusAtMs ?? nowMs))} ago`, 150]); + const diag = status.diagnostics; + if (diag) { + rows.push([` tap ${diag.tapCalls} calls last ${diag.tapLastBytes} B @slot ${diag.tapLastSlot}`, 190]); + rows.push([` skip idle ${diag.skipIdle} lease ${diag.skipLease} alloc ${diag.skipAlloc}`, 170]); + rows.push([ + ` reg ${formatRet(diag.registerResult)} unreg ${formatRet(diag.unregisterResult)} ntf ${formatRet(diag.notifyResult)} slots ${diag.slots.map(formatSlot).join("")} lease ${diag.leaseRemainingS} s`, + 170, + ]); + } else { + rows.push([" (no tap diagnostics: older firmware)", 120]); + } + } else { + rows.push(["CFW status: none seen", 120]); + } + + let y = top; + for (const [text, shade] of rows) { + if (y + line > bottom) return; + image.drawText(font, x, y, fitText(font, text, width), shade); + y += line; + } + // Per-channel RMS level bars for raw PCM frames. + for (let channel = 0; channel < stats.channelDb.length; channel++) { + if (y + line > bottom) return; + const db = stats.channelDb[channel]!; + const tag = `ch${channel} ${db <= LEVEL_FLOOR_DB ? "-inf" : db.toFixed(0)} dB`; + image.drawText(font, x, y, tag, 190); + const barX = x + font.measureText("ch0 -100 dB") + 6; + const barWidth = Math.max(0, width - (barX - x)); + const fill = Math.round(clamp((db - LEVEL_FLOOR_DB) / -LEVEL_FLOOR_DB, 0, 1) * barWidth); + image.drawRect(barX, y + 3, barWidth, line - 6, 60); + if (fill > 0) image.fillRect(barX, y + 3, fill, line - 6, db > -3 ? 255 : 170); + y += line; + } + } + + /** Window context-menu entries while this page is open. */ + menuItems(): MenuItem[] { + return [ + { + label: "Query mic status", + onSelect: (ctx) => { + micArrayController.query(); + ctx.stack.pop(); + }, + }, + { + label: "Reset counters", + onSelect: (ctx) => { + this.resetCounters(); + ctx.stack.pop(); + }, + }, + ]; + } + + private resetCounters(): void { + this.stats.L = emptyStats(); + this.stats.R = emptyStats(); + this.unknownArmPackets = 0; + this.requestRender(); + } + + async handleInput(event: InputEvent, ctx: LayerContext): Promise { + if (event.type === "double-click") { + ctx.stack.pop(); + } else if (event.type === "click") { + this.resetCounters(); + } + } +} + +function formatRet(value: number): string { + return value === MIC_RET_NONE ? "-" : String(value); +} + +/** Same letters as the firmware overlay: - empty, S another callback, T our tap. */ +function formatSlot(state: "empty" | "other" | "tap"): string { + return state === "tap" ? "T" : state === "other" ? "S" : "-"; +} + +function readS16(data: Uint8Array, offset: number): number { + const value = data[offset]! | (data[offset + 1]! << 8); + return value >= 0x8000 ? value - 0x10000 : value; +} + +function rmsDb(samples: Float32Array): number { + let sumSquares = 0; + for (let i = 0; i < samples.length; i++) sumSquares += samples[i]! * samples[i]!; + const rms = Math.sqrt(sumSquares / Math.max(1, samples.length)); + return rms > 0 ? Math.max(LEVEL_FLOOR_DB, 20 * Math.log10(rms)) : LEVEL_FLOOR_DB; +} + +function formatAge(ms: number): string { + if (ms < 1_000) return `${Math.max(0, Math.round(ms))} ms`; + if (ms < 60_000) return `${(ms / 1000).toFixed(1)} s`; + return `${Math.round(ms / 60_000)} min`; +} + +function fitText(font: ReturnType, text: string, width: number): string { + if (font.measureText(text) <= width) return text; + let end = text.length; + while (end > 0 && font.measureText(`${text.slice(0, end)}…`) > width) end--; + return `${text.slice(0, end)}…`; +} + +function drawStrip( + image: GrayImage, + buckets: readonly number[], + x: number, + y: number, + width: number, + height: number, + max: number, +): void { + image.drawRect(x, y, width, height, 45); + const barWidth = width / buckets.length; + for (let i = 0; i < buckets.length; i++) { + const count = buckets[i]!; + if (count <= 0) continue; + const barHeight = Math.max(1, Math.round((count / max) * (height - 2))); + const left = x + Math.floor(i * barWidth); + const right = x + Math.floor((i + 1) * barWidth) - 1; + image.fillRect(left + 1, y + height - 1 - barHeight, Math.max(1, right - left), barHeight, 200); + } +} diff --git a/app/apps/microphones/mic-protocol.ts b/app/apps/microphones/mic-protocol.ts index 5f8e0f63..aaa4061c 100644 --- a/app/apps/microphones/mic-protocol.ts +++ b/app/apps/microphones/mic-protocol.ts @@ -168,8 +168,42 @@ export type MicStatus = { framesEmitted: number; /** The rate actually in effect (16 kHz on current firmware). */ effectiveRateHz: number; + /** Tap diagnostics; absent from firmware that sends only the 21-byte body. */ + diagnostics: MicStatusDiagnostics | null; }; +/** Result of a firmware call the temple has not made yet. */ +export const MIC_RET_NONE = 127; + +/** Occupant of one stock PCM app slot. */ +export type MicSlotState = "empty" | "other" | "tap"; + +/** + * Counters from the status extension; they reset on each CONFIGURE. The + * firmware debug overlay shows the same values on each lens. + */ +export type MicStatusDiagnostics = { + /** Calls into the PCM tap (any outcome). */ + tapCalls: number; + tapLastBytes: number; + tapLastSlot: number; + /** Tap calls dropped because the session was inactive or unarmed. */ + skipIdle: number; + /** Tap calls dropped because the streaming lease had lapsed. */ + skipLease: number; + /** Tap calls dropped because the frame buffer allocation failed. */ + skipAlloc: number; + /** Signed firmware results, or MIC_RET_NONE when not called yet. */ + registerResult: number; + unregisterResult: number; + notifyResult: number; + /** Stock PCM slot table, read live: [slot 0, slot 1]. */ + slots: [MicSlotState, MicSlotState]; + leaseRemainingS: number; +}; + +const MIC_STATUS_DIAGNOSTICS_BYTES = 40; + function le16(data: Uint8Array, offset: number): number { return data[offset]! | (data[offset + 1]! << 8); } @@ -210,6 +244,27 @@ export function decodeMicStatus(body: Uint8Array): MicStatus | null { side: body[14] === 2 ? "left" : "right", framesEmitted: le32(body, 15), effectiveRateHz: le16(body, 19) * 100, + diagnostics: body.length >= MIC_STATUS_DIAGNOSTICS_BYTES ? decodeMicDiagnostics(body) : null, + }; +} + +const SLOT_STATES: MicSlotState[] = ["empty", "other", "tap", "other"]; + +function decodeMicDiagnostics(body: Uint8Array): MicStatusDiagnostics { + const s8 = (offset: number) => (body[offset]! >= 0x80 ? body[offset]! - 0x100 : body[offset]!); + const table = body[37]!; + return { + tapCalls: le32(body, 21), + tapLastBytes: le16(body, 25), + tapLastSlot: body[27]!, + skipIdle: le16(body, 28), + skipLease: le16(body, 30), + skipAlloc: le16(body, 32), + registerResult: s8(34), + unregisterResult: s8(35), + notifyResult: s8(36), + slots: [SLOT_STATES[table & 3]!, SLOT_STATES[(table >> 2) & 3]!], + leaseRemainingS: le16(body, 38), }; } diff --git a/app/g2/firmware/cfw-patches.ts b/app/g2/firmware/cfw-patches.ts index 1f1b4979..7e871139 100644 --- a/app/g2/firmware/cfw-patches.ts +++ b/app/g2/firmware/cfw-patches.ts @@ -19,12 +19,12 @@ export type FirmwarePatchSet = { export const CFW_PATCH_SET: FirmwarePatchSet = { "base": "g2_2.3.0.24.bin", "baseSha256": "187ccf2bcc5c17a212106e8a376745511e8289c4232b634a7ea94b9bf25a0979", - "outputSha256": "d7971b68add0c5187fec81d1cb1ef8cc12322db426a98cb445f1b3a274272817", + "outputSha256": "354f23f88a4aaf9c56cf62078bf13e814faa25b1fbb4dc69a7754110d6502386", "patches": [ { "offset": 1045797, "old": "38b584b0", - "new": "5df3b9b8", + "new": "5cf33bbb", "desc": "ring receiver entry: timestamped unfiltered reports under framebuffer lease" }, { @@ -36,49 +36,49 @@ export const CFW_PATCH_SET: FirmwarePatchSet = { { "offset": 1437923, "old": "fef788ff", - "new": "fdf2c8fd", + "new": "fdf256f8", "desc": "cfw_ancs_event" }, { "offset": 1437951, "old": "fef7e8fb", - "new": "fdf202fb", + "new": "fcf284fd", "desc": "cfw_ancs_open" }, { "offset": 1437969, "old": "fef7e7fb", - "new": "fdf219fb", + "new": "fcf29ffd", "desc": "cfw_ancs_close" }, { "offset": 1388387, "old": "39694d00", - "new": "79637d00", + "new": "8d587d00", "desc": "connection-bound ANCS EUS write callback" }, { "offset": 971497, "old": "fff717f8", - "new": "6ff3e9f9", + "new": "6ef36bfc", "desc": "bl faceclaw_input_bridge_received (ring relay and ordered private transport before worker pool)" }, { "offset": 971845, "old": "fef769ff", - "new": "6ff33bf9", + "new": "6ef3bdfb", "desc": "bl faceclaw_input_bridge_received (ring relay and ordered private transport before worker pool)" }, { "offset": 979579, "old": "fdf74ef8", - "new": "6df320fa", + "new": "6cf3a2fc", "desc": "bl faceclaw_input_bridge_received (ring relay and ordered private transport before worker pool)" }, { "offset": 1428895, "old": "f8f76cfd", - "new": "fcf238fa", + "new": "fbf23cfe", "desc": "bl cfw_receive_packet (private SID-f0 probe before TPL reassembly)" }, { @@ -108,145 +108,145 @@ export const CFW_PATCH_SET: FirmwarePatchSet = { { "offset": 1248487, "old": "d4f712fb", - "new": "2af302fb", + "new": "29f308fd", "desc": "bl settings_send_wrapper (append caps field 100)" }, { "offset": 1246183, "old": "f5f7e2f8", - "new": "2af386fc", + "new": "29f3acfe", "desc": "bl settings_decode_wrapper (Faceclaw lease field 101)" }, { "offset": 975219, "old": "02f083fc", - "new": "6cf3f2fc", + "new": "6bf30eff", "desc": "bl faceclaw_display_start @ 0x467d68 (fail-open wake takeover)" }, { "offset": 975411, "old": "02f023fc", - "new": "6cf356fd", + "new": "6bf37cff", "desc": "bl faceclaw_display_start_headup @ 0x467e28 (fail-open wake takeover)" }, { "offset": 975103, "old": "07f085fb", - "new": "6ef3f2f9", + "new": "6df370fc", "desc": "bl headup_gate (head-up sensor event -> EvenHub sys event 12 under lease)" }, { "offset": 830549, "old": "19f03efb", - "new": "91f3a1fb", + "new": "90f31ffe", "desc": "bl gesture_ring_press_mode (observe ring touch-down, preserve stock dispatch)" }, { "offset": 830795, "old": "1ff071ff", - "new": "91f35afb", + "new": "90f3d8fd", "desc": "bl gesture_press (owned event 9 before stock menu gate)" }, { "offset": 830887, "old": "1ff043ff", - "new": "91f354fb", + "new": "90f3d2fd", "desc": "bl gesture_short_long (Faceclaw lease gates event 11 vs stock Menu path)" }, { "offset": 831763, "old": "1ff08dfd", - "new": "91f38af9", + "new": "90f308fc", "desc": "bl gesture_release (owned event 10 before stock menu gate)" }, { "offset": 1570209, "old": "7fb50600", - "new": "dbf293be", + "new": "dbf299b8", "desc": "even_ai_display_ctrl entry -> conditional Faceclaw lease trampoline" }, { "offset": 1051545, "old": "f6f787f9", - "new": "55f321f9", + "new": "55f3b5f8", "desc": "bl display_copy_hook @ 0x47a78e (640x480 direct framebuffer)" }, { "offset": 1051861, "old": "f6f7e9f8", - "new": "55f383f8", + "new": "55f317f8", "desc": "bl display_copy_hook @ 0x47a8ca (640x480 direct framebuffer)" }, { "offset": 1262237, "old": "d9f7d0fd", - "new": "26f343fb", + "new": "25f383fd", "desc": "bl faceclaw_send_wear_event @ 0x4ade92 (outside onboarding)" }, { "offset": 1262337, "old": "d9f79efd", - "new": "26f311fb", + "new": "25f351fd", "desc": "bl faceclaw_send_wear_event @ 0x4adef6 (outside onboarding)" }, { "offset": 1309405, "old": "67f02dff", - "new": "1af31bfc", + "new": "19f347fe", "desc": "bl compass_decode_capture (sample-matched GAF diagnostics)" }, { "offset": 1307865, "old": "fff7c9fb", - "new": "1af399ff", + "new": "1af3c9f9", "desc": "bl compass_report_event (stock UI + heading with diagnostics over BLE)" }, { "offset": 1300937, "old": "00210170", - "new": "1cf37ffc", + "new": "1bf3a7fe", "desc": "bl compass_preserve_accuracy (retain magnetic calibration under Faceclaw framebuffer lease)" }, { "offset": 4537963, "old": "", - "new": "b0b581ea00039b0701d0034637e0c2b110f0030315d000f1010ca2f1010e0023cc5c9e45c45403f1010404d0634413f003032346f4d121440319121b102a14d302e00346102a10d3d1f800c0d1f804e0cc688d68103adc609d60c3f804e043f810cb0f2a01f11001eed8042a07d300bf51f8045b043a032a43f8045bf8d8002a08bfb0bd0139013b11f8015f013a03f8015ff9d1b0bd00bf884218bf002a00d1704710b50b1a38bf431a934207d288420ad281ea00039b0726d0034669e0fff79fffbde81040704781ea000300eb020c9b0701eb020e42d15fea8c732bd0a0f1010c00bf8b1813f801ec8418531e04f801ec04d0624412f003021a46f2d101eb030e00eb030c17e0830736d0a2f1010c00f1010e002300bfcc5c9c45c45403f1010404d0734413f003032346f4d1121b2144031922e01346042b0ed3aef10402acf1040152f80449043b032b41f80449f8d802f1040e01f1040c1a4653b1aef10101acf1010300bf11f80149013a03f80149f9d1bde8104070470346042a06d351f8044b043a032a43f8044bf8d8002af0d00139013b00bf11f8014f013a03f8014ff9d1e6e700bf80b5002a18bf10f0030301d186460ce000f1010c864600bf013a0ef8011b04d01cf003030cf1010cf6d1102a11d35ffa81fc4ff001330cfb03fc00bf103acef80cc0cef808c0cef804c04ef810cb0f2af4d8042a0bd35ffa81fc4ff001330cfb03fc00bf043a032a4ef804cbfad8002a08bf80bdaef10103013a03f8011ffbd180bd00bf2de9f04fc5b04ff62c484ef66c694ff29c5b1446cff6ff78ccf2ff09c2f2290b4ff6ff75002701260d93cde90e0106e048f2a351c0f24501bff32f8f8847dbf800a0bff35f8fdbf800000321cff680710140b1f1005fbff35f8f03d10168494500f0ba804ff4757007f0b6fa002800f0078241464218463182f8d47382f8d57382f8d67382f8d77382f8d87382f8d97382f8da7382f8db7382f8dc7382f8dd7382f8de7382f8df7382f8e07382f8e17382f8e27382f8e37382f8e47382f8e57382f8e67382f8e77382f8e87382f8e97382f8ea7382f8eb7382f8ec7382f8ed7382f8ee7382f8ef7382f8f07382f8f17382f8f27382f8f37382f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f819747ff470afc0f8009086728583c583058445848584c584058545858585c585058645868586c586058745875be8001f51457ff436afbff35f8f4be8000121b15be8001f5145f8d02be70f99012641ea04410024c0f8701206e048f2a351c0f24501bff32f8f8847dbf80070bff35f8fdbf800000321cff680710140b1f1005fbff35f8f03d10168494500f0ba804ff4757007f0daf9002800f02b8141464218463182f8d44382f8d54382f8d64382f8d74382f8d84382f8d94382f8da4382f8db4382f8dc4382f8dd4382f8de4382f8df4382f8e04382f8e14382f8e24382f8e34382f8e44382f8e54382f8e64382f8e74382f8e84382f8e94382f8ea4382f8eb4382f8ec4382f8ed4382f8ee4382f8ef4382f8f04382f8f14382f8f24382f8f34382f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f819447ff470afc0f8009086728583c583058445848584c584058545858585c585058645868586c586058745875be8001fb9427ff436afbff35f8f4be8000121b15be8001fb942f8d02be7d0f874a242f6f766c0f24406baf1000fbff35f8f4ad006f19a0250464ff0ff314ff0ff379047002840f09d810f98002861d00e980778a7f1170002285bd80f980c2840f086810e9e7078b178084300f08081f0780138022800f27b81b279f379747a42ea0322337a307942ea0342717942ea0463b27af67a192f42ea062200f01082172f40f02682002a40f06281fe2800f07786812800f06a86002840f07d8651ea030040f0558100f0c7be04460020b047e8b104f51d7151e800afbaf1000f0cd1bff35f8f00bf41e80002002a00f0f58051e800afbaf1000ff5d00021bff32f8f0029bff35f8f00f0e480824692e74ff0ff3737e147f6df40c0f24f008047002701241197adf8487006e048f2a351c0f24501bff32f8f8847dbf80060bff35f8fdbf800000321cff680710140b1f1005fbff35f8f03d10168494500f0c1804ff4757007f080f8002800f0b98041464218463182f8d47382f8d57382f8d67382f8d77382f8d87382f8d97382f8da7382f8db7382f8dc7382f8dd7382f8de7382f8df7382f8e07382f8e17382f8e27382f8e37382f8e47382f8e57382f8e67382f8e77382f8e87382f8e97382f8ea7382f8eb7382f8ec7382f8ed7382f8ee7382f8ef7382f8f07382f8f17382f8f27382f8f37382f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f819747ff470afc0f8009084728583c583058445848584c584058545858585c585058645868586c586058745875be8001fb1427ff436afbff35f8f4be8000159b15be8001fb142f8d02be706f5a9718847ace6012110e700200e9999b10f9a8ab1097801f07f02b2f10b0618bf0126b2f11c0718bf01278a2924dc0b2926d01c2924d03fe00d9010a804f0a7fa4ff0ff3701249df84900002810a818bf4ff0ff3704f0e3fb054644b99df8480028b94af21f30c0f247004c3080470d98002818bfc56013e09c2901d08b291bd160b14af21f31c0f247010446884794f8641119b994f80413204669b14ff0ff3742f6f760c0f2440000f5807150468847384645b0bde8f08f0d9010a806ea070404f065fa0e98017801f07f061e2e04d10f9908f086fb0746b5e71d2e01f07e0018bf1a2811d1dbf800100322cff680720a40b2f1005fbff35f8f0ad10a684a4504bf002281f8812303e0a6f115010129e9d90f2e0adc092e00f37381052e00f0ef82072e40f01c8300279ae0142e00f32182102e00f0eb82112e40f011830f98022841f0d5800e990878112841f0d0804878002841f0cc8045f64d50c0f24600804701284ff000077ff46daf40f20830c0f210003590ff208df8d00044f25220c0f20100339040f2c960c0f24800cde93677804798b148f27e30c2f2070000880122c1b264298df8cf2008d80721b0f5807f38bf03218df8cf108df8d00040f2d260adf8d800052035ae8df8da00f01d33a90522fff7dbfa4ff22507c0f247070120092132460c23b84774e700294ff0ff3708bf002b7ff453af1328bff450af102a4ff0000138bf01211228b2fa82f218bf510901297ff443af00f0b3bc182f4ff0ff3708bf00297ff43aaf002b7ff437af352800f33684002800f08b84012800f09784312840f08984082abff428af00f098bc48f2a351c0f24501bff32f8f8847dbf80060bff35f8fdbf800000321cff680710140b1f1005fbff35f8f03d10168494500f019864ff4757006f081fe002800f0118641464218463182f8d47382f8d57382f8d67382f8d77382f8d87382f8d97382f8da7382f8db7382f8dc7382f8dd7382f8de7382f8df7382f8e07382f8e17382f8e27382f8e37382f8e47382f8e57382f8e67382f8e77382f8e87382f8e97382f8ea7382f8eb7382f8ec7382f8ed7382f8ee7382f8ef7382f8f07382f8f17382f8f27382f8f37382f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f819747ff470af0121c0f8009081728583c583058445848584c584058545858585c585058645868586c586058745875be8001fb1427ff435afbff35f8f4be80001002900f061855be8001fb142f6d028e70a2e00f088810b2e40f0a981dbf800500320cff680702840b0f1005fbff35f8f41f008802868002748457ff40baed5f8700342f68d48c0f244080028a5f8807318bfc0470021a5f8b013c5f8ac13c5f8681185f8661185f86411d5f86c01c5f8601185f86511c5f86c11c5f80013a5f86c1320b148f2a351c0f245018847d5f87802002818bf04f04bfb0026c5f87862d5f8680320b148f2a351c0f245018847c5f86863a5f86c63286ca5f8446040b1c047286c08f166018847002804bf002028644bf63940c0f251008047dbf800700320cff680703840b0f1005fbff35f8f2ed1386848452bd197f877010026c7f8806188b149f25962c0f25902002044f2436187f8776190474ef6e378c0f25a08c04708f1bc008047d7f8840142f68d48c0f2440887f8706150b1c047d7f8840108f166018847002804bf0020c7f88401dbf800000321cff680710140b1f1005fbff35f8f40f04a860168494540f0468690f8a811002900f03b8607f095f800f03dbe152e00f0ec80162e40f0f0800f9801380228c0f0b3860e9a4ff0ff375078917840ea0120b0f5007f3ff653ad03210f9b01eb400199427ff44cad002700288df8d4708df8d5708df8d6708df8d7708df8d8708df8d9708df8da708df8db708df8dc708df8dd708df8de708df8df708df8e0708df8e1708df8e2708df8e3708df8e4708df8e5708df8e6708df8e7708df8e8708df8e9708df8ea708df8eb708df8ec708df8ed708df8ee708df8ef708df8f0708df8f1708df8f2708df8f3708df8f4708df8f5708df8f6708df8f7708df8f8708df8f9708df8fa708df8fb708df8fc708df8fd708df8fe708df8ff708df800718df801718df802718df803718df804718df805718df806718df807718df808718df809718df80a718df80b718df80c718df80d718df80e718df80f718df810718df811718df812718df813713ff4c8acd11c35ae01220c944b78012b00f215860f7847ea0323db08f45c07f0070702fa07f7274240f00185f45c013847ea0407f7540c9c01f10201e6d105f0d7fc002800f0f384002700f021bc0f980c94022835d30e98407833e0dde90e0107f0d4f8dee40f980228c0f0e88500f0a1fe002800f0e3850e994d78002d00f0a983022d00f2db8540f0548601460f982646062880f03c854ff0ff37344679e40e980f990130013908f098f8bae41d2e40f029810e980f990130013908f0a2fdb0e4ff20002701240b9006e048f2a351c0f24501bff32f8f8847dbf80060bff35f8fdbf800000321cff680710140b1f1005fbff35f8f03d10168494500f0ba804ff4757006f0ecfb002800f0758341464218463182f8d47382f8d57382f8d67382f8d77382f8d87382f8d97382f8da7382f8db7382f8dc7382f8dd7382f8de7382f8df7382f8e07382f8e17382f8e27382f8e37382f8e47382f8e57382f8e67382f8e77382f8e87382f8e97382f8ea7382f8eb7382f8ec7382f8ed7382f8ee7382f8ef7382f8f07382f8f17382f8f27382f8f37382f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f819747ff470afc0f8009084728583c583058445848584c584058545858585c585058645868586c586058745875be8001fb1427ff436afbff35f8f4be8000121b15be8001fb142f8d02be790f84410ddf83880dde90b6461b1016c39b142f68d42c0f244020546084690472846002180f8441001210f9a032a0ed36eb998f80200082800f26a854bf63941c0f25101963188470027fff769bb0f9a052ac0f0e180012e40f0de8098f802000027411e06293ff65bab98f8031003293ff656ab98f80420002a3ff451ab4bf63943c0f2510303f59a7398470027fff747bb1a2818bf1c2e40f0978405f06efb002800f0928400f04bfd814608f08affb9f1000f4ff0ff3718bf00283ff430ab804647f63400c2f20700d0f81806d9f874131b2ea0eb0100c9f87c0300f054841a2e40f076840e9900254f1c0f994ff4f072a1f1010b4ff4a0714ff48053cde93b5035a84ff42076cde93535cde90950cde90121484639465a4643463d95cde90755cde90555cde90355009609f0d4fa002840f04a844ff48050cde93505d9f87c033946cde93c0535a80a90012009904ff4a07002904ff4f070019048465a4643464ff420773b95cde90755cde90555cde90355009709f0affafff719bb36286dd0462868d0572855d1002e7ff4f5aa65e00c294ff0ff377ff4efaab3f5005f5dd3fff7eaba481e1f284ff0ff373ff6e4aac1f51630834251d9fff7deba002b7ff4d9aa421f18bf0122b0f1350318bf01231a40b0f1590318bf01231a40b0f1470318bf0123134208bf012937d0b0f1370218bf0122b0f1c10318bf01231a4208bf02292bd09f284ff0ff377ff4b5aa042924d0fff7b1ba022e40f062814bf63940c0f2510080470027fff779ba022abff4a3aa13e0002a7ff49faaa0f1fd0102290cd397287ff498aa08e06ff0780002427ff492aa02e0402abff48eaa45f64d50c0f2460080470e990128c9784ff001004ff0010408bf022008424ff0000708d1fff77aba48f2a351c0f24501bff32f8f8847dbf80060bff35f8fdbf800000321cff680710140b1f1005fbff35f8f03d10168494500f0ba804ff4757006f0d5f900283ff457aa41464218463182f8d47382f8d57382f8d67382f8d77382f8d87382f8d97382f8da7382f8db7382f8dc7382f8dd7382f8de7382f8df7382f8e07382f8e17382f8e27382f8e37382f8e47382f8e57382f8e67382f8e77382f8e87382f8e97382f8ea7382f8eb7382f8ec7382f8ed7382f8ee7382f8ef7382f8f07382f8f17382f8f27382f8f37382f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f819747ff470afc0f8009084728583c583058445848584c584058545858585c585058645868586c586058745875be8001fb1427ff436afbff35f8f4be8000121b15be8001fb142f8d02be74af21f36c0f247060546b04795f8640100287ff499a995f80403294600287ff493a90e98007817281bd0d1f8640342f68d47c0f2440768b947f61f20c0f20000a7f594747844012100220023a047c5f8640340b3a7f140024ff47a719047294608bb01f206300c460e990c22fef7e5fc0d98002184f805030120bff35f8f84f804034ff4f07001904ff4207006f5106400900020002200230027a04700283ff455a985f8047306f14c0080474ff0ff37fff74cb90f9a072ac0f06d81032e40f06a8198f8020098f8032098f8041040ea022098f8055098f8067001284ff0010698bf304644f62062904228bf10464bf63942c0f2510202f5e272642928bf6421904747f63400c2f207000068002800f0e88245ea0721012988bf0e4642f68d41c0f24401a1f14002314690470027fff7e0b8002780f8437145f64d50c0f24600804701287ff4d5a843f2a310c0f256008047fff716b9ddf83880dde90b64002100204be500200f9902290e992cbf4978ff21002800f0b58202294ff000072cd0012926d000297ff4b4a84cf67e21caf2101187760783cbf80410078147608583c583058445848584c584058545858585c585058645868586c5860587458780f83c7080f8b17380f8b073c0f8ac73fff790b801218172fff78cb88772fff789b848f2a351c0f24501bff32f8f8847dbf80040bff35f8fdbf800000321cff680710140b1f1005fbff35f8f03d10168494500f007814ff4757006f011f8002800f0b58041464218463182f8d47382f8d57382f8d67382f8d77382f8d87382f8d97382f8da7382f8db7382f8dc7382f8dd7382f8de7382f8df7382f8e07382f8e17382f8e27382f8e37382f8e47382f8e57382f8e67382f8e77382f8e87382f8e97382f8ea7382f8eb7382f8ec7382f8ed7382f8ee7382f8ef7382f8f07382f8f17382f8f27382f8f37382f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f819747ff470af0121c0f8009081728583c583058445848584c584058545858585c585058645868586c586058745875be8001fa1427ff435afbff35f8f4be8000100294fd05be8001fa142f7d029e70c9c4ff0ff37fef7aebf80460f98a14603284ff000073bd3301fb0fa80f04009084035d00f980e9a4cf6cd410338ccf6cc419478a0fb0101b4eb910f88bf8c082646302c28bf302608f14600d11c06eb8602fef72cfb002788f8446088f84570b4b1d8f8400038b9404600f0ccfa0028c8f8400000f07b8142f68d41c0f24401a1f140020121904700274c46fef76bbf4c46fef768bfd0f86c110027002900f05d814ff400624ff0ff3cb64605e02b681a44b2f5403f80f0c5808d18ab68b7eb532ff4d1dc081ef8044003f0070624fa06f6f6071ebf41f82370c5f808c0ef60e5e70e9fb878fa783b797f7940ea022043ea072232283590369280f0fa803220fee090f8a911002918bf06f056fadbf800000321cff680710140b1f1005fbff35f8f1cd10168494519d1d0f8b813b1b14ff00041bff35f8fc0f8b4134af21f30c0f2470000f510674ff4f07001904ff4207600200021002200230096b84795f84301002685f8436158b145f64d50c0f246008047012804d143f2a310c0f256008047d5f83c0195f84271c5f8386185f84261a5f8406150b1c047d5f83c0108f166018847002804bf0020c5f83c010120002fa87200f0cf804af27366c0f246060021002200230027b047fef7ccbe0f9803287ef4c8ae0e994ff4f07748788978424640ea012600200890cde90600cde90400cde902004ff4a0700190484631464ff42073009708f068fc002800f0a9804ff0ff37fef7a7be0f9801287ef4a3ae09f57170bff35f8f50e8001f013140e80012002af8d111a94846012208f087fcfef7d9be4ff0000c4ff400634ff0000ec0f800c30de0bef1000fc7f804c00cbfc0f80033cef804303344b3f5403fbe463bd2cf18ba68ce58013201d07746f3e7f218140c022ce6d88d18ac680134e2d12c6826443e602c682244140c022cdad88d18ac680134d6d12c6826443e602c682244140c022cced88d18ac680134cad12c6826443e602c682244140c022cc2d88d18ac680134bed12c6826443e602c682244b2f5403fcfd3b5e70c9c0027fef73abeb0f5fa6f0846344604d94ff4fa603590084634460121064680f8431145f64d50c0f24600804701281cd143f2a318c0f25608a8f188008047022d074608bf002f01d057b90ee04bf2110235a9c0f24b020220904730b10746c047002086f84301fef708be0027fef705be0c9cfef702be701ca9f86c030027fef7fcbd4bf639400027c0f2510088f8447080474c46fef7f1bd00bf2de9f04f81b04ef66c6b4ff29c554ff62c4848f2a35accf2ff0bc2f229054ff6ff76cff6ff7800274ff00109c0f2450a03e000bfbff32f8fd0472c68bff35f8f2868bff35f8f01466ff39601b1f1005f03d10168594500f0be804ff4757005f065fd002800f0b680414600bf4218463182f8d47382f8d57382f8d67382f8d77382f8d87382f8d97382f8da7382f8db7382f8dc7382f8dd7382f8de7382f8df7382f8e07382f8e17382f8e27382f8e37382f8e47382f8e57382f8e67382f8e77382f8e87382f8e97382f8ea7382f8eb7382f8ec7382f8ed7382f8ee7382f8ef7382f8f07382f8f17382f8f27382f8f37382f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f819747ff470afc0f800b080f80a908683c683068446848684c684068546858685c685068646868686c6860687468755e8001fa1427ff43bafbff35f8f00bf45e8000129b155e8001fa142f8d02fe7002001b0bde8f08f70b500284dd001684ef66c62ccf2ff02914218bf70bd90f8441090f845504bf6394c8d42c0f2510c2ad205eb8501014491f8492091f84a4091f846e091f8473091f8481042ea0424012c4ff0010298bf14466e1c054680f84560b9b164294eea032028bf6421012888bf024644f62060824228bf02460cf5e2731046984706e0002180f84410bde870406047e047286c38b142f64d42c0f244022146bde87040104770bd02464ff64b70cff6ff7042f6653c7844c0f2440c00210023604700bf2de9f04fcfb04ff29c57c2f229073c6840f2030a20464ef66c696ff39600cff6807accf2ff09b0f1005fbff35f8f40f0e3812068484540f0df8194f8510347f64c65c2f2070504f5417628b347f61800c2f20700016d4bf67c52c0f2720291421ad1406cc0b1d4f85c032968401a012802db04f095fc78b93046b8460df048fe50b142f69570c0f25b0080474746002084f8520384f8510394f8500368b1d4f860032968401a012802db04f079fc20b9002084f8500384f866013078bff35f8f70b194f84f83ac46b8f1000f01961cd094f8050394f81e13091a18bf012115e094f85103002840f0878194f85003002840f08281d4f86403002800f07d8142f68d41c0f24401884776e1012194f8070394f81133069094f8080394f81d23079094f8065394f80a0394f80b9394f80ce394f80db394f80ea394f80f63934235d194f8102394f81c339a422fd194f81b2396422bd194f81a23924527d194f81923934523d194f8182396451fd194f8172391451bd194f81623904217d194f8092394f815339a4211d194f81423079b93420cd194f81323069b934207d194f81223954203d111b994f805b3a9e00023012284f8203384f8233384f8243384f8253384f8263384f8273384f8283384f8293384f82a3384f82b3384f82c3384f82d3384f82e3384f82f3384f8303384f8313384f8323384f8333384f8343384f8353384f8363384f8373384f8383384f8393384f83a3384f83b3384f83c3384f83d3384f83e3384f83f3384f8403384f8413384f8423384f8433384f8443384f8453384f8463384f8473384f8483384f8493384f84a3384f84b3384f84c3384f84d3384f84e3384f81f2384f8215384f82203dcf8002047f61803170a84f8232384f82473170c120e84f826230822c2f2070384f8257384f84f231a6d4bf67c57c0f2720704f20631ba4204f212381bd15a6ccab140f6b803c2f200031a689ab1182d00f03784172d40f04384fe2804f2273c0d4600f06484002840f06e8401980df0c9fd294602e0022084f8200340460c22fdf7ccfe94f805b394f84f8384f81eb345f64d50c0f246008047811eb1fa81f14fea511a012808bf4ff0020ab8f1000f59d004f21f3009a9059040f261400631c0f2470004910ca9023100254ff00309a0f5b84000240391029014e0039809a91a468df830908df831b0fdf797fe47f00802029ff0200ca90023b8470334e0b24045b1462fd2a8eb0400c7b20420032f28bf4f468df8240006983a468df8250007988df827a08df8260005988df8284050fa84f104988df829808df82a508df82b508df82c50fdf769feb81dda45c3b24ff00306c2d14ef60b670120f02109aac0f24707c9e7bff35f8f01994ff29c574ef66c6940f2030a0020c2f22907ccf2ff09cff6807a08703d68bff35f8f05ea0a00b0f1005f55d12868484552d105f56d700021bff35f8f50e8006f40e80012002af9d147f64c60bff35f8fc2f207000468b6f1004f0fd0b84604f0b1fa58b1002e00f0658195f8cc03320a002800f0fb8195f8cd1304e295f8cc03e8b147f61800c2f207000068b8b145f60960c2f207000478002040f261430c9009900ca909aac0f247032046984709990c9a43f69b53c0f24e0320469847002085f8ce0385f8cc03d5f8b80320b142f68d41c0f244018847d7f80080bff35f8f08ea0a00b0f1005f43d1d8f8000048453fd198f8500338b1002088f86401c8f860014fb0bde8f08f98f86401f8b1d8f86041e4b140f6b800c2f20000056808a802f0c6fc002d00f005834e464ff62c49284621464ff41632cff6ff794ff6ff770795fdf7b5fd00244ff0010b20e098f8660170b1d8f8680140b147f64c61c2f207010968401a002802f39884002088f8660140f6a120c0f2470080474fb0bde8f08f48f2a351c0f24501bff32f8f88474ff29c50c2f229000568bff35f8f0068bff35f8f00ea0a01b1f1005f03d10168b14200f0c5804ff4757005f07bf9002802f05484494600bf4218463182f8d44382f8d54382f8d64382f8d74382f8d84382f8d94382f8da4382f8db4382f8dc4382f8dd4382f8de4382f8df4382f8e04382f8e14382f8e24382f8e34382f8e44382f8e54382f8e64382f8e74382f8e84382f8e94382f8ea4382f8eb4382f8ec4382f8ed4382f8ee4382f8ef4382f8f04382f8f14382f8f24382f8f34382f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f819447ff470af4ff29c52066080f80ab08783c783078447848784c784078547858785c785078647868786c78607874787c2f2290252e8001fa9427ff431afbff35f8f42e8000151b152e8001fa942f8d026e795f8cc03002840f0db80cbe6817a002942f09283027e0021002a8df8301000f023824ff29c550caac2f22905535c002b00f08d8253185f78002f00f04b829f78002f00f04982df78002f00f047821f79002f00f045825f79002f00f043829f79002f00f04182df79002f00f03f821f7a002f00f03d825f7a002f00f03b829f7a002f00f03982df7a002f00f037821f7b002f00f035825f7b002f00f033829f7b002f00f03182df7b002f00f02f821f7c002f00f02d825f7c002f00f02b829f7c002f00f02982df7c002f00f027821f7d002f00f025825f7d002f00f023829f7d002f00f02182df7d002f00f01f821f7e002f00f01d825f7e002f00f01b829f7e002f00f01982df7e002f00f017821f7f002f00f015825f7f002f00f013829f7f002f00f01182db7f002b00f00f82203160297ff47baf2ee20120a5f8cc0340f20220a5f8d0030220002185f8cf03c5f8c01302f00103c6f300208b42c6f34b2206d123b395f8d233f7b2bb421fd00ce05bb995f8cf13a5f8ca2385f8d013022185f8d113c5f8bc4311e095f8cf3385f8d03385f8d163a5f8ca23c5f8bc4331b9012185f8ce13c6f34951a5f8c813002804bf002185f8ce1385f8cd0385f8d26395f8ce13b9b195f8640160b1d5f8c403bff35f8fb5f8c8136ff39f20884205d195f8ce1339b195f8cf632fe0002085f8ce03c5f8bc43d5f8bc13b5f8ca0395f8d163611a814220d28902b1fbf0f04ff4406395f8d01300fb00f2a3eb40005043000d721a00fb02f34ff62c47002b4ff40073cff6ff7748bf07f5ea7310fb0230c21700eb925001eb9026002147f61800c2f207000068e0b1d5f8c003f4b2a0421ad0002040f261430c9009900ca909aac0f247032046984709990c9a43f69b53c0f24e0320469847c5f8c04395f8ce1302e00020c5f8c003d5f8b80385f8cf6311b14ff47a7108e095f8d113f2b28a424ff0280108bf4ff47a7142f68d42c0f24402403a904795f8ce034746a0b13868bff35f8f00ea0a01b1f1005f42f044820168494542f04082002180f86411c0f860114fb0bde8f08f95f8cd0300287ff451adf0b20228e2d140f6b800c2f2000001680029dbd001684ff416322139002301f8403f403a01f81f3c01f81e3c01f81d3c01f81c3c01f81b3c01f81a3c01f8193c01f8183c01f8173c01f8163c01f8153c01f8143c01f8133c01f8123c01f8113c01f8103c01f80f3c01f80e3c01f80d3c01f80c3c01f80b3c01f80a3c01f8093c01f8083c01f8073c01f8063c01f8053c01f8043c01f8033c01f8023c01f8013c4b708b70cb700b714b718b71cb710b724b728b72cb720b734b738b73cb730b744b748b74cb740b754b758b75cb750b764b768b76cb760b774b778b77cb7781f820309cd100684ef217310c904ff416300d900ca8c0f247018847474666e7002088f86401c8f8600188f86601012088f8650140f6a120c0f24700804702f09eb901980d460df001fb10b302304ff0030008bf022084f820032946fff7cebb84f85003dcf800204ef660231a44c4f86023b8b101980d460df0c6fc0df09afc294660b9fff7babb4ff29c55c2f2290595e00df08ffc002829463ff4afab0320fff7aabb002084f86601fff7a7bb18684a4600eb0b20704400eb0a4000eb06616046fdf76bfa0ee04eea0b2141ea0a4141ea066361464a460df08efa00281cbf032084f8200309f1080084f84f032946fff784bb01313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2921d84ff0520353541dd00a4445235e29537018d04f235d29937014d052235c29d37010d044235b2913710cd045235a29537108d052235929937104d020235829d37141f0058600218df88f100121427e002a00f0c28000220cab9f5c002f00f0a0809f187e78002e5ed0be78002e5dd0fe78002e5cd03e79002e5bd07e79002e5ad0be79002e59d0fe79002e58d03e7a002e57d07e7a002e56d0be7a002e55d0fe7a002e54d03e7b002e53d07e7b002e52d0be7b002e51d0fe7b002e50d03e7c002e4fd07e7c002e4ed0be7c002e4dd0fe7c002e4cd03e7d002e4bd07e7d002e4ad0be7d002e49d0fe7d002e48d03e7e002e47d07e7e002e46d0be7e002e45d0fe7e002e44d03e7f002e43d07e7f002e42d0be7f002e41d0ff7f002f40d02032602a7ff49aaf54e001323ae0023238e0033236e0043234e0053232e0063230e007322ee008322ce009322ae00a3228e00b3226e00c3224e00d3222e00e3220e00f321ee010321ce011321ae0123218e0133216e0143214e0153212e0163210e017320ee018320ce019320ae01a3208e01b3206e01c3204e01d3202e01e3200e01f325f2a15d84ff053079f5411d013444b275e2a5f700cd049275d2a9f7008d050275c2adf7004d020275b2a1f7140f0f08100228df88f200131827e002a00f0be8000210caa535c002b00f0a08053185f78002f5ed09f78002f5dd0df78002f5cd01f79002f5bd05f79002f5ad09f79002f59d0df79002f58d01f7a002f57d05f7a002f56d09f7a002f55d0df7a002f54d01f7b002f53d05f7b002f52d09f7b002f51d0df7b002f50d01f7c002f4fd05f7c002f4ed09f7c002f4dd0df7c002f4cd01f7d002f4bd05f7d002f4ad09f7d002f49d0df7d002f48d01f7e002f47d05f7e002f46d09f7e002f45d0df7e002f44d01f7f002f43d05f7f002f42d09f7f002f41d0db7f002b40d0203160297ff49aaf50e001313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2911d84ff0440353540dd00a4455235e29537008d050235d29937004d020235c29d37040f0098100218df88f1001216a6846f23f53c5f28803b3eb520f40f08b80d20700f08d8000210caa535c002b00f0858153185f78002f00f0f9809f78002f00f0f980df78002f00f0f9801f79002f00f0f9805f79002f00f0f9809f79002f00f0f980df79002f00f0f9801f7a002f00f0fc805f7a002f00f0fc809f7a002f00f0fc80df7a002f00f0fc801f7b002f00f0fc805f7b002f00f0fc809f7b002f00f0fc80df7b002f00f0fc801f7c002f00f0fc805f7c002f00f0fc809f7c002f00f0fc80df7c002f00f0fc801f7d002f00f0fc805f7d002f00f0fc809f7d002f00f0fc80df7d002f00f0fc801f7e002f00f0fc805f7e002f00f0fc809f7e002f00f0fc80df7e002f00f0fc801f7f002f00f00d815f7f002f00f00b819f7f002f00f00981db7f002b00f00781203160297ff47baf1de14cf67e22caf210126a60002940f0198100210caa535c002b00f0dc8053185f78002f61d09f78002f60d0df78002f5fd01f79002f5ed05f79002f5fd09f79002f60d0df79002f61d01f7a002f62d05f7a002f63d09f7a002f64d0df7a002f68d01f7b002f69d05f7b002f6ad09f7b002f6bd0df7b002f6cd01f7c002f6dd05f7c002f6ed09f7c002f6fd0df7c002f70d01f7d002f71d05f7d002f72d09f7d002f73d0df7d002f74d01f7e002f75d05f7e002f76d09f7e002f77d0df7e002f78d01f7f002f79d05f7f002f7ad09f7f002f7bd0db7f002b7cd0203160297ff49aaface000211171f6e6013173e0023171e003316fe004316de0013184e0053169e0023180e0063165e003317ce0073161e0043178e008315de0053174e0093159e0063170e00a3155e007316ce000225a710fe60b314ee0083165e00c314ae0093161e00d3146e00a315de00e3142e00b3159e00f313ee00c3155e010313ae00d3151e0113136e00e314de0123132e00f3149e013312ee0103145e014312ae0113141e0153126e012313de0163122e0133139e017311ee0143135e018311ae0153131e0193116e016312de01a3112e0173129e01b310ee0183125e01c310ae0193121e01d3106e01a311de01e3102e01b3119e01f315f2931d84ff04f0353542dd00a444b235e29537028d020235d29937024d00021d17024e01c3104e01d3102e01e3100e01f315f2918d84ff04103535414d00a444c235e2953700fd05d2993700cd04f235c29d37008d043235b29137104d020235a29537141f0c38200218df88f1000210caf7a5c002a00f0a0807a185378002b5ed09378002b5dd0d378002b5cd01379002b5bd05379002b5ad09379002b59d0d379002b58d0137a002b57d0537a002b56d0937a002b55d0d37a002b54d0137b002b53d0537b002b52d0937b002b51d0d37b002b50d0137c002b4fd0537c002b4ed0937c002b4dd0d37c002b4cd0137d002b4bd0537d002b4ad0937d002b49d0d37d002b48d0137e002b47d0537e002b46d0937e002b45d0d37e002b44d0137f002b43d0537f002b42d0937f002b41d0d27f002a40d0203160297ff49aaf42e001313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2903d84ff077027a5403d100218df88f1002e0394400224a70c2684ff0000e17f80e10002900f0c48007eb0e035978002962d09978002962d0d978002962d01979002962d05979002962d09979002962d0d979002962d0197a002962d0597a002962d0997a002962d0d97a002962d0197b002962d0597b002962d0997b002962d0d97b002962d0197c002962d0597c002962d0997c002962d0d97c002962d0197d002962d0597d002962d0997d002962d0d97d002962d0197e002962d0597e002962d0997e002962d0d97e002962d0197f002962d0597f002962d0997f002962d0d97f002962d00ef1200ebef1600f7ff496af4ff0600e5be00ef1010e58e00ef1020e55e00ef1030e52e00ef1040e4fe00ef1050e4ce00ef1060e49e00ef1070e46e00ef1080e43e00ef1090e40e00ef10a0e3de00ef10b0e3ae00ef10c0e37e00ef10d0e34e00ef10e0e31e00ef10f0e2ee00ef1100e2be00ef1110e28e00ef1120e25e00ef1130e22e00ef1140e1fe00ef1150e1ce00ef1160e19e00ef1170e16e00ef1180e13e00ef1190e10e00ef11a0e0de00ef11b0e0ae00ef11c0e07e00ef11d0e04e00ef11e0e01e00ef11f0e01230a2a1ed364274ff47a7542f2107403eb83014900b2fbf1f60a2e11d303fb07f1b2fbf1f60a2e0bd303fb05f1b2fbf1f60a2e05d36343b2fbf3f10929e7d800e00b46f346bef15f0f98bf4ff05f0bcbf1000a0cad1aeb0e0c53d0b2fbf3f60a2b06f1300105f80e104cf6cd41ccf6cc41a3fb011447d31cf1010142d006fb1326e708b6fbf7f905eb0e0209f13001517048f21f51c5f2eb11642ba3fb011435d31cf102012dd009fb17666709b6fbf7f4b3f57a7f04f13001917044f6d351c1f26201a3fb015124d31cf1030524d004fb1767890941f25975b7fbf1f6cdf2b715a3fb055406f13005d57006fb117242f210710ef1040e8b424fea54330cada9d20ce0de460ae00ef1010e07e00ef1020e04e00ef1030e00e0de460cad002205f80e20a95c002900f0a080a9184b78002b5ed08b78002b5dd0cb78002b5cd00b79002b5bd04b79002b5ad08b79002b59d0cb79002b58d00b7a002b57d04b7a002b56d08b7a002b55d0cb7a002b54d00b7b002b53d04b7b002b52d08b7b002b51d0cb7b002b50d00b7c002b4fd04b7c002b4ed08b7c002b4dd0cb7c002b4cd00b7d002b4bd04b7d002b4ad08b7d002b49d0cb7d002b48d00b7e002b47d04b7e002b46d08b7e002b45d0cb7e002b44d00b7f002b43d04b7f002b42d08b7f002b41d0c97f002940d02032602a7ff49aaf50e001323ae0023238e0033236e0043234e0053232e0063230e007322ee008322ce009322ae00a3228e00b3226e00c3224e00d3222e00e3220e00f321ee010321ce011321ae0123218e0133216e0143214e0153212e0163210e017320ee018320ce019320ae01a3208e01b3206e01c3204e01d3202e01e3200e01f325f2a11d84ff07501a9540dd0a91873235e2a4b7008d020235d2a8b7004d070235c2acb7040f09d8000218df88f1002694ff0000a15f80a10002900f0c78005eb0a035978002962d09978002962d0d978002962d01979002962d05979002962d09979002962d0d979002962d0197a002962d0597a002962d0997a002962d0d97a002962d0197b002962d0597b002962d0997b002962d0d97b002965d0197c002965d0597c002965d0997c002965d0d97c002965d0197d002965d0597d002965d0997d002965d0d97d002965d0197e002965d0597e002965d0997e002965d0d97e002965d0197f002965d0597f002965d0997f002965d0d97f002965d00af1200abaf1600f7ff496af4ff0600a5ee00af1010a5be00af1020a58e00af1030a55e00af1040a52e00af1050a4fe00af1060a4ce00af1070a49e00af1080a46e00af1090a43e00af10a0a40e00af10b0a3de00af10c0a3ae00af10d0a37e00af10e0a34e000220a7162e70af10f0a2ee00af1100a2be00af1110a28e00af1120a25e00af1130a22e00af1140a1fe00af1150a1ce00af1160a19e00af1170a16e00af1180a13e00af1190a10e00af11a0a0de00af11b0a0ae00af11c0a07e00af11d0a04e00af11e0a01e00af11f0a01230a2a1ed364274ff47a7542f2107403eb83014900b2fbf1f60a2e11d303fb07f1b2fbf1f60a2e0bd303fb05f1b2fbf1f60a2e05d36343b2fbf3f10929e7d800e00b46d646baf15f0f98bf4ff05f0ecef1000942f2107c0cad19eb0a0b51d0b2fbf3f40a2b04f1300105f80a104cf6cd41ccf6cc41a3fb011747d31bf1010140d004fb1326ff08b6fbf7f405eb0a0204f13001517048f21f51c5f2eb11642ba3fb015135d31bf102052dd004fb17664c09b6fbf4f7b3f57a7f07f13001917044f6d351c1f26201a3fb015124d31bf1030519d007fb1464890941f25976b4fbf1f5cdf2b716a3fb066705f13006d67005fb11420af1040a63454fea57330cadabd20ce0f2460ae0f24607e00af1010a05e00af1020a01e00af1030a0cad002205f80a20a95c002900f0a080a9184b78002b5ed08b78002b5dd0cb78002b5cd00b79002b5bd04b79002b5ad08b79002b59d0cb79002b58d00b7a002b57d04b7a002b56d08b7a002b55d0cb7a002b54d00b7b002b53d04b7b002b52d08b7b002b51d0cb7b002b50d00b7c002b4fd04b7c002b4ed08b7c002b4dd0cb7c002b4cd00b7d002b4bd04b7d002b4ad08b7d002b49d0cb7d002b48d00b7e002b47d04b7e002b46d08b7e002b45d0cb7e002b44d00b7f002b43d04b7f002b42d08b7f002b41d0c97f002940d02032602a7ff49aaf5ce001323ae0023238e0033236e0043234e0053232e0063230e007322ee008322ce009322ae00a3228e00b3226e00c3224e00d3222e00e3220e00f321ee010321ce011321ae0123218e0133216e0143214e0153212e0163210e017320ee018320ce019320ae01a3208e01b3206e01c3204e01d3202e01e3200e01f325f2a1dd84ff07501a95419d0a91873235e2a4b7014d020235d2a8b7010d074235c2acb700cd031235b2a0b7108d030235a2a4b7104d02023592a8b7140f0cb8500218df88f10d0f8ac234ff0000a15f80a10002900f0c48005eb0a035978002962d09978002962d0d978002962d01979002962d05979002962d09979002962d0d979002962d0197a002962d0597a002962d0997a002962d0d97a002962d0197b002962d0597b002962d0997b002962d0d97b002962d0197c002962d0597c002962d0997c002962d0d97c002962d0197d002962d0597d002962d0997d002962d0d97d002962d0197e002962d0597e002962d0997e002962d0d97e002962d0197f002962d0597f002962d0997f002962d0d97f002962d00af1200abaf1600f7ff496af4ff0600a5be00af1010a58e00af1020a55e00af1030a52e00af1040a4fe00af1050a4ce00af1060a49e00af1070a46e00af1080a43e00af1090a40e00af10a0a3de00af10b0a3ae00af10c0a37e00af10d0a34e00af10e0a31e00af10f0a2ee00af1100a2be00af1110a28e00af1120a25e00af1130a22e00af1140a1fe00af1150a1ce00af1160a19e00af1170a16e00af1180a13e00af1190a10e00af11a0a0de00af11b0a0ae00af11c0a07e00af11d0a04e00af11e0a01e00af11f0a01230a2a1ed364274ff47a7542f2107403eb83014900b2fbf1f60a2e11d303fb07f1b2fbf1f60a2e0bd303fb05f1b2fbf1f60a2e05d36343b2fbf3f10929e7d800e00b46d646baf15f0f98bf4ff05f0ecef1000942f2107c0cad19eb0a0b51d0b2fbf3f40a2b04f1300105f80a104cf6cd41ccf6cc41a3fb011747d31bf1010140d004fb1326ff08b6fbf7f405eb0a0204f13001517048f21f51c5f2eb11642ba3fb015135d31bf102052dd004fb17664c09b6fbf4f7b3f57a7f07f13001917044f6d351c1f26201a3fb015124d31bf1030519d007fb1464890941f25976b4fbf1f5cdf2b716a3fb066705f13006d67005fb11420af1040a63454fea57330cadabd20ce0f2460ae0f24607e00af1010a05e00af1020a01e00af1030a0cad079f002205f80a20a95c002900f0a080a9184b78002b5ed08b78002b5dd0cb78002b5cd00b79002b5bd04b79002b5ad08b79002b59d0cb79002b58d00b7a002b57d04b7a002b56d08b7a002b55d0cb7a002b54d00b7b002b53d04b7b002b52d08b7b002b51d0cb7b002b50d00b7c002b4fd04b7c002b4ed08b7c002b4dd0cb7c002b4cd00b7d002b4bd04b7d002b4ad08b7d002b49d0cb7d002b48d00b7e002b47d04b7e002b46d08b7e002b45d0cb7e002b44d00b7f002b43d04b7f002b42d08b7f002b41d0c97f002940d02032602a7ff49aaf48e001323ae0023238e0033236e0043234e0053232e0063230e007322ee008322ce009322ae00a3228e00b3226e00c3224e00d3222e00e3220e00f321ee010321ce011321ae0123218e0133216e0143214e0153212e0163210e017320ee018320ce019320ae01a3208e01b3206e01c3204e01d3202e01e3200e01f325f2a09d84ff07501a95405d0a91873235e2a4b7040f08780044600208df88f00384602212a460cf0bbfad4f870c272208df8300078208df8310020204ff0000b1ffa8cf28df832008df833b015f80b00002800f0c88005eb0b035878002866d09878002866d0d878002866d01879002866d05879002866d09879002866d0d879002866d0187a002866d0587a002866d0987a002866d0d87a002866d0187b002866d0587b002866d0987b002866d0d87b002866d0187c002866d0587c002866d0987c002866d0d87c002866d0187d002866d0587d002866d0987d002866d0d87d002866d0187e002866d0587e002866d0987e002866d0d87e002866d0187f002866d0587f002866d0987f002866d0d87f002866d00bf1200bbbf1600f7ff496af4ff0600b5fe004460020887078e70bf1010b58e00bf1020b55e00bf1030b52e00bf1040b4fe00bf1050b4ce00bf1060b49e00bf1070b46e00bf1080b43e00bf1090b40e00bf10a0b3de00bf10b0b3ae00bf10c0b37e00bf10d0b34e00bf10e0b31e00bf10f0b2ee00bf1100b2be00bf1110b28e00bf1120b25e00bf1130b22e00bf1140b1fe00bf1150b1ce00bf1160b19e00bf1170b16e00bf1180b13e00bf1190b10e00bf11a0b0de00bf11b0b0ae00bf11c0b07e00bf11d0b04e00bf11e0b01e00bf11f0b01230a2a1ed364204ff47a7742f2107503eb83067600b2fbf6f40a2c11d303fb00f6b2fbf6f40a2c0bd303fb07f6b2fbf6f40a2c05d36b43b2fbf3f6092ee7d800e03346d946bbf15f0f98bf4ff05f09c9f1000a42f2107e1aeb0b004fd0b2fbf3f50ca905f1300401f80b404cf6cd41ccf6cc410a2ba3fb014742d3441c3ed005fb1326fd08b6fbf5f70ca901eb0b0248f21f5107f13004c5f2eb115470642ba3fb011430d3811c29d007fb15656609b5fbf6f7b3f57a7f07f13001917044f6d351c1f26201a3fb011420d3033016d007fb1650a10941f25975b0fbf1f4cdf2b715a3fb055604f13005d57004fb11020bf1040b73454fea5633add209e0cb4607e00bf1010b04e00bf1020b01e00bf1030bddf81c9000220cac04f80b20a05c002800f0a080a118487800285ed0887800285dd0c87800285cd0087900285bd0487900285ad08879002859d0c879002858d0087a002857d0487a002856d0887a002855d0c87a002854d0087b002853d0487b002852d0887b002851d0c87b002850d0087c00284fd0487c00284ed0887c00284dd0c87c00284cd0087d00284bd0487d00284ad0887d002849d0c87d002848d0087e002847d0487e002846d0887e002845d0c87e002844d0087f002843d0487f002842d0887f002841d0c87f002840d02032602a7ff49aaf54e001323ae0023238e0033236e0043234e0053232e0063230e007322ee008322ce009322ae00a3228e00b3226e00c3224e00d3222e00e3220e00f321ee010321ce011321ae0123218e0133216e0143214e0153212e0163210e017320ee018320ce019320ae01a3208e01b3206e01c3204e01d3202e01e3200e01f325f2a15d84ff02000a05411d0a01863215e2a41700cd072215d2a817008d063215c2ac17004d020215b2a017140f06d8100208df88f0037214fea1c7001eb1c71bcf1204f38bf00f13001ccf303608df8241000f137010a2838bf00f13001ccf303508df8251000f137010a2838bf00f13001ccf303408df8261000f137010a2838bf00f1300100208df828001f208df82710211811f81f2c002a00f0808011f81e2c002a7dd011f81d2c002a7bd011f81c2c002a79d011f81b2c002a77d011f81a2c002a75d011f8192c002a73d011f8182c002a71d011f8172c002a6fd011f8162c002a6dd011f8152c002a6bd011f8142c002a69d011f8132c002a67d011f8122c002a65d011f8112c002a63d011f8102c002a61d011f80f2c002a5fd011f80e2c002a5dd011f80d2c002a5bd011f80c2c002a59d011f80b2c002a57d011f80a2c002a55d011f8092c002a53d011f8082c002a51d011f8072c002a4fd011f8062c002a4dd011f8052c002a4bd011f8042c002a49d011f8032c002a47d011f8022c002a45d011f8011c002943d0215c002941d020307f287ff47baf60e01f383ae01e3838e01d3836e01c3834e01b3832e01a3830e019382ee018382ce017382ae0163828e0153826e0143824e0133822e0123820e011381ee010381ce00f381ae00e3818e00d3816e00c3814e00b3812e00a3810e009380ee008380ce007380ae0063808e0053806e0043804e0033802e0023800e001385f2821d8c0f15d0ec0f15e02c0f15f03c0f1600c2044002509ac675d4755b7b1ab4211d0661971784719797079b1aa420ad0b178b97051b1ae4505d0f178f97029b10435ac45e8d100208df88f0042f2941645f29c140caa48460e21c2f22006c2f213040bf06aff4ff6a42040f6b801cff6ff70c2f200010858a0426ad14ff6b020cff6ff700858b0f54d2f62d14ff6b420cff6ff700858a0425bd145f610634ff0000ec2f213034cf6394506f1040c00274ff0ff3263454cd8186830f003041ad09e4228bf0c2846d3f11a8c424ff0ff3143d8bc42394688bf2146c00703eb04001cbf0f46a644013d00f10403e2d130e00021417192e60421b7f5807f22d300223d46b5f5007f18d3b5f5806f17d3b5f5006f16d30901b2eb153f4fea1515f0d110e00022ca71fff734ba00219171fef73cbd00211172fef7fab9490002e0890000e0c900634504d1484207ea0002714603e04ff0ff324ff0ff3147f64c60c2f20700d0f8840006f1080342f6941c9842c2f2270c4cd142f610674ff0000bc2f2200746f6b9700cf1040e00244ff0ff3a4ff0ff3977453bd83e6836f0030515d0bc4528bf0c2e35d3aceb07039d4233d82346a54288bf2b46f6071cbf1c46ab447b19013803f10407e4d121e00420b4f5807f16d300262546b5f5007f0cd3b5f5806f0bd3b5f5006f0ad30001b6eb153f4fea1515f0d104e0400002e0800000e0c000774504d1404204ea000ad94603e04ff0ff3a4ff0ff394ff6882040f6b807cff6ff70c2f200073b580cf10800834264d14ff69423cff6ff73fb58b3f5333f5cd14ff69823cff6ff73fb58834255d14ff29c5043f21063c2f229004ff0000bc2f2270342f6f935a0f1040ca0f1080e0024634542d81e6836f003071ad09e454ff0ff30069028bf0c2e3ad3aeeb030087424ff0ff3034d82046a74288bf3846f6071cbf0446bb44d819013d00f10403dfd123e00427b4f5807f17d34ff0000e2546b5f5007f0cd3b5f5806f0bd3b5f5006f0ad33f01beeb153f4fea1515f0d104e07f0002e0bf0000e0ff00634505d17b4204ea03000690584602e04ff0ff300690064666208df8300072208df8310065208df832008df833002f208df834006d204b238df8350061208df8393069238df8360078208df83a30422356278df8370020208df83b303a238df83f7047270cac8df838008df83c308df83d004c238df840708df84200002720468df83e308df841308df843700bf05dff079de05d002800f0a080e019417800295ed0817800295dd0c17800295cd0017900295bd0417900295ad08179002959d0c179002958d0017a002957d0417a002956d0817a002955d0c17a002954d0017b002953d0417b002952d0817b002951d0c17b002950d0017c00294fd0417c00294ed0817c00294dd0c17c00294cd0017d00294bd0417d00294ad0817d002949d0c17d002948d0017e002947d0417e002946d0817e002945d0c17e002944d0017f002943d0417f002942d0817f002941d0c07f002840d02037602f7ff49aaf64e001373ae0023738e0033736e0043734e0053732e0063730e007372ee008372ce009372ae00a3728e00b3726e00c3724e00d3722e00e3720e00f371ee010371ce011371ae0123718e0133716e0143714e0153712e0163710e017370ee018370ce019370ae01a3708e01b3706e01c3704e01d3702e01e3700e01f375f2f25d84ff02000e05521d0e01945215e2f41701cd076215d2f817018d065215c2fc17014d06e215b2f017110d048215a2f41710cd07521592f817108d06221582fc17104d02021572f017240f0f88000208df88f002046494652460bf088fe0020215c002900f0a08021184a78002a5ed08a78002a5dd0ca78002a5cd00a79002a5bd04a79002a5ad08a79002a59d0ca79002a58d00a7a002a57d04a7a002a56d08a7a002a55d0ca7a002a54d00a7b002a53d04a7b002a52d08a7b002a51d0ca7b002a50d00a7c002a4fd04a7c002a4ed08a7c002a4dd0ca7c002a4cd00a7d002a4bd04a7d002a4ad08a7d002a49d0ca7d002a48d00a7e002a47d04a7e002a46d08a7e002a45d0ca7e002a44d00a7f002a43d04a7f002a42d08a7f002a41d0c97f002940d0203060287ff49aaf5be001303ae0023038e0033036e0043034e0053032e0063030e007302ee008302ce009302ae00a3028e00b3026e00c3024e00d3022e00e3020e00f301ee010301ce011301ae0123018e0133016e0143014e0153012e0163010e017300ee018300ce019300ae01a3008e01b3006e01c3004e01d3002e01e3000e01f305f281cd84ff02001215418d021184f225e284a7013d074225d288a700fd068225c28ca700bd065225b280a7107d072225a284a7103d0202259288a7128d100208df88f000cac069a204631460bf0bbfd28461a2122460bf038fc002088f86401c8f8600107984ef217310c904ff416300d900ca8c0f247018847012088f8660108a800f054f9c8f810004fb0bde8f08f0020c871d6e70021417207e700bf2de9f04f81b0009041f204024cf65560cef20002ccf2ac50c2f8ac0f4ef6fc50cef2000001684ef66c6641f08071016052f8040c4ff29c574ff62c4a48f2a358ccf2ff06c2f229074ff6ff7440f00100cff6ff7a00254ff0010bc0f2450842f8040c02e0bff32f8fc047d7f80090bff35f8f3868bff35f8f01466ff39601b1f1005f03d10168b14200f0ba804ff4757002f0b8fc002800f0f08051464218463182f8d45382f8d55382f8d65382f8d75382f8d85382f8d95382f8da5382f8db5382f8dc5382f8dd5382f8de5382f8df5382f8e05382f8e15382f8e25382f8e35382f8e45382f8e55382f8e65382f8e75382f8e85382f8e95382f8ea5382f8eb5382f8ec5382f8ed5382f8ee5382f8ef5382f8f05382f8f15382f8f25382f8f35382f8f45382f8f55382f8f65382f8f75382f8f85382f8f95382f8fa5382f8fb5382f8fc5382f8fd5382f8fe5382f8ff5382f8005482f8015482f8025482f8035482f8045482f8055482f8065482f8075482f8085482f8095482f80a5482f80b5482f80c5482f80d5482f80e5482f80f5482f8105482f8115482f8125482f8135482f8145482f8155482f8165482f8175482f8185482f819547ff470af066080f80ab08483c483048444848484c484048544858485c485048644868486c4860487448757e8001f49457ff43cafbff35f8f47e8000121b157e8001f4945f8d031e74169d1bb47f64c6245f6e466c2f20702cff6f8761368314617689f420ed117689f420bd117689f4208d117689f4203d1002901f10401efd19f421ed041f20401cef200010b6817681168b9420ed11168b9420bd11168b94208d11168b94203d1002e06f10406efd1b94206d041f20401cef200010968c91a416141f20400cef2000000680099086001b0bde8f08f00bf2de9f04f81b041f20401cef200014ef66c674ff29c56d1f8009000684ff62c4bccf2ff07c2f229064ff6ff74cff6ff7b00254ff00108009007e000bf48f2a351c0f24501bff32f8f8847d6f800a0bff35f8f3068bff35f8f01466ff39601b1f1005f03d10168b94200f0ba804ff4757002f080fb002800f00e8159464218463182f8d45382f8d55382f8d65382f8d75382f8d85382f8d95382f8da5382f8db5382f8dc5382f8dd5382f8de5382f8df5382f8e05382f8e15382f8e25382f8e35382f8e45382f8e55382f8e65382f8e75382f8e85382f8e95382f8ea5382f8eb5382f8ec5382f8ed5382f8ee5382f8ef5382f8f05382f8f15382f8f25382f8f35382f8f45382f8f55382f8f65382f8f75382f8f85382f8f95382f8fa5382f8fb5382f8fc5382f8fd5382f8fe5382f8ff5382f8005482f8015482f8025482f8035482f8045482f8055482f8065482f8075482f8085482f8095482f80a5482f80b5482f80c5482f80d5482f80e5482f80f5482f8105482f8115482f8125482f8135482f8145482f8155482f8165482f8175482f8185482f819547ff470af076080f80a808483c483048444848484c484048544858485c485048644868486c4860487448756e8001f51457ff438afbff35f8f46e8000121b156e8001f5145f8d02de74169009d61b144f6d350c1f26200a1fb0001880901284ff0010088bf88094ce047f64c6245f6e466c2f20702cff6f8761368314617689f420ed117689f420bd117689f4208d117689f4203d1002901f10401efd19f422fd041f20401cef200010b6817681168b9420ed11168b9420bd11168b94208d11168b94203d1002e06f10406efd1b94217d041f20401cef20001096844f6d357ca1ac1f26207a2fb07764261b00901284ff0010088bfb009994208bffa2001e0009dfa20a9eb0501b1fbf0f001b0bde8f08f2ab1a2fb0103002b1cbf0020704702fb01f0ffe7b0b54ff2a054c2f229040146206846f23f52c5f28802b2eb500f40f258304df681124cf67e25c2f20000c0f24802caf2101518bf25609047002804bf691c2160b0bd00bf0846ffe7014640f258304df69f22c2f20000c0f248021047002858d1002956d0082a54d30b78aa2b51d18b79f02b4ed12de9f04f83b00b2a4ed3c878a2f10803834249d14878212848d10879012845d14879012842d1c87900283fd10c4614f8080f10f03c0f39d18818884610f8021c10f8010c164641ea0025a2f10a0081b220460af0bdfa854228d145f64d50c0f246008047811eb1fa81f14f09012808bf0227002f00f03f81207887f00301084200f03b81012039464246334600f092fa0446002898f8080018bf06242ee14ff27143c0f24c0318470b2400e00a2445f64d50c0f246008047811eb1fa81f14d09012808bf0225002d00f011814ef66c6a4ff29c574ff62c480294ccf2ff0ac2f229074ff6ff74cff6ff7800264ff0010b06e048f2a351c0f24501bff32f8f8847d7f80090bff35f8f3868bff35f8f01466ff39601b1f1005f03d10168514500f0bd804ff4757002f08df9002800f0de80414600bf4218463182f8d46382f8d56382f8d66382f8d76382f8d86382f8d96382f8da6382f8db6382f8dc6382f8dd6382f8de6382f8df6382f8e06382f8e16382f8e26382f8e36382f8e46382f8e56382f8e66382f8e76382f8e86382f8e96382f8ea6382f8eb6382f8ec6382f8ed6382f8ee6382f8ef6382f8f06382f8f16382f8f26382f8f36382f8f46382f8f56382f8f66382f8f76382f8f86382f8f96382f8fa6382f8fb6382f8fc6382f8fd6382f8fe6382f8ff6382f8006482f8016482f8026482f8036482f8046482f8056482f8066482f8076482f8086482f8096482f80a6482f80b6482f80c6482f80d6482f80e6482f80f6482f8106482f8116482f8126482f8136482f8146482f8156482f8166482f8176482f8186482f819647ff470afc0f800a080f80ab08483c483048444848484c484048544858485c485048644868486c4860487448757e8001f49457ff436afbff35f8f00bf47e8000121b157e8001f4945f8d02ae705eb450100eb011090f85d1201b300f513760024304629462a46032300940af041fa706840b14bf69b71c0f25d0188477068fff781fe74603068b475002818bffff77afe0020029c3060b060308200e0029c204603b0bde8f08f0624f9e700243842f6d0404631463a463b4600f076f9002818bf0446ece70b291dd3c278a1f10803934218d10278aa2a13d14278212a10d10279012a0dd14279012a0ad18279f02a07d1c2792ab9024612f8083f13f03c0f03d00a2070470b20704710b5084410f8023c10f8010c43ea0024a1f10a0081b210460af02ef9201a18bf0a2010bd002808bf7047b0b582b00446407cd0b100252046032300950af0d4f9606840b14bf69b71c0f25d0188476068fff714fe65602068a575002818bffff70dfe00202060a060208202b0bde8b040704700bf2de9f04f81b04ef66c654ff29c564ff62c498046ccf2ff05c2f229064ff6ff77cff6ff7900244ff0010a06e048f2a351c0f24501bff32f8f8847d6f800b0bff35f8f3068bff35f8f01466ff39601b1f1005f03d10168a94200f0bb804ff4757002f00af8002800f0b38049464218463182f8d44382f8d54382f8d64382f8d74382f8d84382f8d94382f8da4382f8db4382f8dc4382f8dd4382f8de4382f8df4382f8e04382f8e14382f8e24382f8e34382f8e44382f8e54382f8e64382f8e74382f8e84382f8e94382f8ea4382f8eb4382f8ec4382f8ed4382f8ee4382f8ef4382f8f04382f8f14382f8f24382f8f34382f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f819447ff470af056080f80aa08783c783078447848784c784078547858785c785078647868786c7860787478756e8001f59457ff438afbff35f8f46e8000129b156e8001f5945f8d02de7002008eb480100eb0111002818bf01f5137001b0bde8f08fb0b5c4b0dc08202c03d94ff0ff3044b0b0bd0df107048df807008df80810a01c11461a461d46faf731fba81c4af6610582b2c0f24605f02021460023a84744b0b0bd00bf2de9f04f8bb04ef66c654ff29c564ff62c4948f2a35bccf2ff05c2f229064ff6ff77cff6ff7900244ff0010ac0f2450bcde90612cde9080303e000bfbff32f8fd847d6f80080bff35f8f3068bff35f8f01466ff39601b1f1005f03d10168a94200f0ba804ff4757001f0f0fe002800f0578449464218463182f8d44382f8d54382f8d64382f8d74382f8d84382f8d94382f8da4382f8db4382f8dc4382f8dd4382f8de4382f8df4382f8e04382f8e14382f8e24382f8e34382f8e44382f8e54382f8e64382f8e74382f8e84382f8e94382f8ea4382f8eb4382f8ec4382f8ed4382f8ee4382f8ef4382f8f04382f8f14382f8f24382f8f34382f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f819447ff470af056080f80aa08783c783078447848784c784078547858785c785078647868786c7860787478756e8001f41457ff43cafbff35f8f46e8000121b156e8001f4145f8d031e70999089d01eb410100eb011095f9081000f51376b1f1ff3f01f0030409dd374617f8110fd0bb3068002818bffff7eafb2fe3307cf0b1707ce0b10799099a002730460323009709f093ff706840b14bf69b71c0f25d0188477068fff7d3fb77603068b775002818bffff7ccfb00203060b06030823068002818bffff7c3fb00204ff480713060b0603182a978b081092006f11107f174b17434757076b07ca978884240f0db82317da14240f0d782069b411ca3f10b00727e02971e2828bf1e209042b17488bf7076981e84b200270a2c4ff00008c0f0e782092241f221090920039419e030684f46002818bffff78afbb089376001303774b760b081002c18bf4ff00608039cd146ddf814a00aeb0b0082b2a24280f0c782317c80b20429824600f28880aa5c00f1010a4b1c0129337405dd022906d0032970d1f28106e021b9727503e0338943ea02223281a24580f0aa8204296ed015f80a204ff0000c831c8f1c0129377406ddff290bd0032967460dd19a4652e000291cbf378947ea0222328100e072756746a34204d38be2f281a34280f08882022936d8ea5c00f1030acb1c0129337407dd022937d0fe2907d17275a2450cd376e231b9338943ea02223281a24504d36ee2f281a24580f06b8202292fd015f80a20031d41f00407fc29377408ddfd2909d0fe291cbf378947ea0222328103e079b9f28100e072756746a34280f0508209b19a4613e0ea5c00f1050a0520307401e09a466746f189308941ea0221f18128b1fff7c8fa0028306000f06a8233897089191a1ffa81fb1ffa8af1621a5a45b8bf93465fea0b4208d03268294410441ffa8bf2faf709f970893389584481b2994270817ff44faf0025cdf81080d6f800808df82b50707db8f1000f06930df12b0108bf88460f2806d8317d00f00302511ab1fa81f14d09000706d4317e707e814238bf30760fe000bf706840b14bf69b71c0f25d0188477068fff7a0fa7760707e30760120f082cdf814a09db1707db57d400714d4002d4ff0000400f0898106984ff6ff7381b2002900f00d8101295ed10020d2e0707d400753d4002478e14ff48030fff757fa002d804600f07081b07d002800f06c81b8f1000f00f068817568002d00f0008130890428c0f0608131680a1812f8043c002b40f0598112f8033c002b40f0548112f8023cff2b40f04f8112f8012cff2a40f04a814ff4803429606860c5f80c802c610028019000f067814bf69b70c0f25d0000f58572284600219047002840f033812969002900f02f8168688c420c46e7d1019a0c468242e3d125e14ff48030fff705fa044620e1069a4ff6fe701040a44642426ff0010000bf08eb0005ac78ed7883ea04231cb25f003fb209ead43484ea430309ead7375c0087ea430324b25f003fb209ead43484ea430309ead7375c0087ea430324b25f003fb209ead43484ea430309ead7375c0087ea430324b25f003fb209ead43484ea430309ead73787ea430383ea05231fb25d002db209ead73787ea430309ead5355f0085ea43033fb25d002db209ead73787ea430309ead5355f0085ea43033fb25d002db209ead73787ea430309ead5355f0085ea43033fb25d002db209ead737023087ea430309ead5371518023587ea430395d1023000276446069ad20732d018f8000083ea002002b243001bb209ead23282ea400009ead333420083ea400012b243001bb209ead23282ea400009ead333420083ea400012b243001bb209ead23282ea400009ead333420083ea400012b243001bb209ead23282ea400009ead33282ea4003f0899ab2824270d1099b4046faf7bff800286ad141f2210a4ff00009012375e03820fff744f900285ed00546077047708770c770077147718771c771077247728772c772077347738773c773077447748774c774077547758775c775077647768776c776077747778777c77780f8287080f8297080f82a7080f82b7080f82c7080f82d7080f82e7080f82f7080f8307080f8317080f8327080f8337080f8347080f8357080f8367080f837704ff2e310cff6ff70784428624ff22f20cff6ff70784468624bf69b70c0f25d0045f6e46200f13c0c28460f21c0f27c023823e04740b32846fff707f94446706841f2210a40b14bf69b71c0f25d0188477068fff7faf877604ff000090323b77506980799099a089dddf8108087b23046009709f0a0fc002c214604463ff455ad0846fff7e2f850e5756073e6c4f58030b4f5803f444606902f60ef607ff646aecde70799099a002430460323009409f082fc706840b14bf69b71c0f25d0188477068fff7c2f874603068b475002818bffff7bbf80020387000203060b06030824ff00a0840460bb0bde8f08f287a4006f8d5307c08b302980078e0b10799099a002430460323009409f055fc706840b14bf69b71c0f25d0188477068fff795f874603068b475002818bffff78ef800203060b06030824ff00b083068002818bffff783f800203060b0603082cae702980078e0b10799099a002430460323009409f029fc706840b14bf69b71c0f25d0188477068fff769f874603068b475002818bffff762f800203060b06030824ff00608a7e700bf2de9f041f0284bd100294ff00b0000f07f80022a7cd345f64d50c0f246000e4617468047811eb1fa81f14c09012808bf0224002c4ff00a006ad07578e91ec9b2fe2938bfbde8f081307833463946032860d002282dd001281cbf0a20bde8f081ac4204bf0020bde8f0814808842884bf0b20bde8f081881e03f1020887b240463946fff7b7f9002869d006462846fff70dfa21462a46fff7e1f93046bde8f08145f64d57c0f2460707f5e27cbde8f0416047ac421cbf0020bde8f081a1f1210010f1160f48d36ff0480048432330c0b2242841d81a4612f8020f40f00207032f4bd19b796340032b47d10b2904d0032804bf0b20bde8f081881e4ef60b6783b2c0f247070120f021b847002818bf0620bde8f081ac422dd1a1f10c0010f1030f1ad31a4612f8020f042815d158796040032811d1d879a0f1310717f1300f0bd39b79984208d9a1f10807c01a874284bf0b20bde8f081cfe70b20bde8f081b07a204207d04046394622462b46bde8f041fff7b2ba0020bde8f0810a20bde8f0814ff29c51c2f229010968bff35f8f0a466ff39602b2f1005f15d10a684ef66c63ccf2ff039a420ed1d1f8681159b147f64c62c2f207021268891a012903db0178042938bf7047002101707047b0b541f23154c0f252041d46a0474ff29c51c2f229010968bff35f8f0a466ff39602b2f1005f08d10a684ef66c63ccf2ff039a4218bf002100e00021421c18bf002900d1b0bd95f84d20002afad091f84321002a08bfb0bd46f25863c2f206031a68132aeed8c2ebc20403eb04135b6801ebc2014ff40042c1f8c031a1f8c6212a7a01f5e071002a0fbf802248f20112ca808122ab7c33b1ab7d23b1022342f002028b71ca7195f820303bb195f8243023b1032342f004028b71ca7195f846304bb195f8443042f008020b7195f84530ca714b71b0bd48f27342c2f207021378002b14bf9378ff230b711378002b14bf5278ff224a71b0bdf0b589b048f66502c0f24b020c46054690474ff29c51c2f229010e68bff35f8f31466ff39601b1f1005f08d131684ef66c62ccf2ff02914208bf092d01d009b0f0bde1082c29fad896f843110029f6d045f64d51c0f2460107468847014638460129ecd1ff22079244f6435246f258610020cff60172c2f20601089006920b685a1e132a4fd8c3ebc30501eb05111a1fa1f5de7191f85451ad0618d4d51c42d091f8e450ad0616d4951c3cd091f87450ad0613d4551c36d00d79ad0610d4043aa1f5e071151da3f10403e3d12be05a1e01f5a87104e09a1ee03101e0da1e703106ebc203096893f9c721b2f1ff3f1adc03f5e0731e688e4215d11e798df81b605e798df81c609b798df81e200a0a8df820108df821200a0c090e8df81d308df822208df823100f228df8012010228df80220522208218df80420b4f5804f4ff080028df800108df8061038bf4ff48042b4f5001f6ff07f0604f07f0138bf0026802c28bf80318df807109df809509df80a108df8030004d29df808200223002415e0c4f3c610b4f5804f024403d20323012400200be0b4f5001f03d204230224012003e0052303240120002135468df8053004f108038df808208df809508df80a1070b96846a222c118c254062048700c208870c81c06a90c22f9f73ffc04f117034ff225066a46c0f2470601200821b047384609b0f0bd70b582b00546ff208df8040044f25220c0f20100009040f2c960c0f2480016460c46804798b148f27e30c2f2070000880122c1b264298df8032008d80721b0f5807f38bf03218df803108df80400301b28bf08280cd3d221281929550621417005218170033069460522f9f7fbfb0834204602b070bd00bf024600284ff0ff3009d0022918bf70471078112801d1507810b14ff0ff30704710b586b045f64d50c0f24600804701284ff000003ed1cde9020040f20830c0f210000190ff208df8140044f25220c0f20100049040f2c960c0f24800804798b148f27e30c2f2070000880122c1b264298df8132008d80721b0f5807f38bf03218df813108df8140040f2d260adf80800052001ac8df80a00e01d04a90522f9f7a5fb4ff2250cc0f2470c0120092122460c23e04706b010bd4ff29c50c2f22900016808466ff39600b0f1005f16d108684ef66c62ccf2ff0290420fd1d1f8380160b147f64c62c2f207021268801a0028cebf01200020c1f838017047002070474ff29c50c2f22900026810466ff39600b0f1005f2ed110684ef66c61ccf2ff01884227d1d2f8680120b347f64c61c2f207010968401a0028c4bf01207047d2f86c1100200029c2f8680182f86601c2f86c01c2f80003a2f86c0308bf704780b548f2a352c0f24502084690470020bde88040704700207047f0b101684ef66c62ccf2ff02914218bf704790f8421199b110b54af273644ff0000cc0f24604864680f842c10120002100220023aef840c1a446bde810406047704700bf02464ff6ab70cff6ff7042f6653c7844c0f2440c00210023604700bf70b5002862d0044600796179a279e37940ea012040ea024050ea036007d00e2803d0032852d1032502e0042500e00225fff756ff002849d04ff29c50c2f22900066830466ff39600b0f1005f3ed130684ef66c61ccf2ff01884218bf70bd45f64d50a478c0f24600804701282ed1082086f86002032086f86102102086f86202b22086f86402062086f8650286f86602462086f8670243204ff0000e86f8680201204ef6057c06f5187286f863e286f8690286f86a5286f86b42c0f2470c09210d2386f86ce2bde87040604770bd00bf2de9f04f81b04ef66c694ff29c564ff62c480446ccf2ff09c2f229064ff6ff77cff6ff7800254ff0010a06e048f2a351c0f24501bff32f8f8847d6f800b0bff35f8f3068bff35f8f01466ff39601b1f1005f03d10168494500f0bc804ff4757000f072fe002800f0e18041464218463182f8d45382f8d55382f8d65382f8d75382f8d85382f8d95382f8da5382f8db5382f8dc5382f8dd5382f8de5382f8df5382f8e05382f8e15382f8e25382f8e35382f8e45382f8e55382f8e65382f8e75382f8e85382f8e95382f8ea5382f8eb5382f8ec5382f8ed5382f8ee5382f8ef5382f8f05382f8f15382f8f25382f8f35382f8f45382f8f55382f8f65382f8f75382f8f85382f8f95382f8fa5382f8fb5382f8fc5382f8fd5382f8fe5382f8ff5382f8005482f8015482f8025482f8035482f8045482f8055482f8065482f8075482f8085482f8095482f80a5482f80b5482f80c5482f80d5482f80e5482f80f5482f8105482f8115482f8125482f8135482f8145482f8155482f8165482f8175482f8185482f819547ff470afc0f8009080f80aa08783c783078447848784c784078547858785c785078647868786c7860787478756e8001f59457ff437afbff35f8f00bf46e8000121b156e8001f5945f8d02be7002780f857712a270821032380f85871042780f8541180f85531102380f8597180f85a1101214ff2250c074600f5aa7280f8563180f85b1180f85c31002c18bf0124c0f2470c012010210a2387f85d4101b0bde8f04f604701b0bde8f08f00bf80b582b04ff0010ccdf800c000f002f802b080bd2de9f04381b04ff29c57c2f229073f684ff000093e466ff39606b6f1005f07d13e684ef66c65ccf2ff05ae4208bfb946012811d1ddf820801c4615460e460746fff7c2fd2346044631462a463846002c18bfb9f1000f07d14af2736cc0f2460c01b0bde8f043604799f8420180b1b8f1010f7cd1d9f83c01002189f84211a9f84011a0b342f68d41c0f2440188472ee0b9f840010121013080b2012898bf0846a9f84001d9f83c0142f68d44c0f2440489f8421128b94846fff708fec9f83c0140b1a047d9f83c01a4f140024ff4c8719047a8b199f84201002848d0d9f83c01002189f84211a9f8401100b1a0474af2736cc0f2460c0120002100220023afe745f64d50c0f24600804701282fd1082089f84401032089f84501102089f84601002089f84701b22089f84801062089f8490189f84a01462089f84b01432089f84c01012089f84d01b9f840014ef6057c070a09f5a27289f84e8189f84f01c0f2470c012009210d2389f8507178e701b0bde8f08380b582b04ff0050ccdf800c0fff73eff02b080bd2de9f04f83b04468002c00f0db828368002b00f0d78204eb030b4ff000090027002614e047f64c63c2f207031b6845f69077c0f201073b44c6f838310ceb0a0300275b451c464ff0000680f0bb82a04618f9013b03f07f05bd40002b46ea050610d406f00703012b16dc0bb3012b40f0a982abeb0803082bc0f0a48204f10903dee700bfd84580f09d82182f07f107074446dcd996e200bf022b3ad0052b40f09182abeb0803042bc0f08c82631dc7e7d84580f0878294f90130002b04f10203bed55b4580f07e8294f90230b3f1ff3f04f10303b4dc5b4580f0748294f90330b3f1ff3f04f10403aadc5b4580f06a8294f90430b3f1ff3f04f10503a0dc5b4580f0608294f90530002b00f15b82a31d96e7d84580f0568294f9013004f1020c002b03f07f0a1ed5dc4580f04b8294f90270e31c07f07f05b7f1ff3f4aeac51a02dde0469c460ee05b4580f03b8294f9037004f1040c07f07f05b7f1ff3f4aea853a33dd9846abeb0c039a4500f22a82f308672b1dd0652b7ff460afbaf1060ffff45caf9cf80030462b7ff457af98f80230432b7ff452af98f80330012b7ff44daf4ff29c54c2f229040290cde9002132e0044660460e4651461746654600f035fcac4631463a46204637e7dc4580f0f98194f90470631d07f07f05b7f1ff3f4aea455aaddc5b4580f0ec8194f90570002f00f1e78104f1060c4aea077ab1e748f2a3513046c0f24501bff32f8f8847dde900210298ac462768bff35f8f2668bff35f8f33466ff39603b3f1005f07d133684ef66c65ccf2ff05ab4200f0ce804ff47570654600f097fbdde9002106460298ac46002e3ff4f1ae4ff62c43cff6ff7300bff418463384f8d49384f8d59384f8d69384f8d79384f8d89384f8d99384f8da9384f8db9384f8dc9384f8dd9384f8de9384f8df9384f8e09384f8e19384f8e29384f8e39384f8e49384f8e59384f8e69384f8e79384f8e89384f8e99384f8ea9384f8eb9384f8ec9384f8ed9384f8ee9384f8ef9384f8f09384f8f19384f8f29384f8f39384f8f49384f8f59384f8f69384f8f79384f8f89384f8f99384f8fa9384f8fb9384f8fc9384f8fd9384f8fe9384f8ff9384f8009484f8019484f8029484f8039484f8049484f8059484f8069484f8079484f8089484f8099484f80a9484f80b9484f80c9484f80d9484f80e9484f80f9484f8109484f8119484f8129484f8139484f8149484f8159484f8169484f8179484f8189484f819947ff470af4ef66c63ccf2ff0333600123b3724ff6ff734ff29c54b383f38333847384b384f38433857385b385f38533867386b386f38633877387c2f2290454e8003fbb427ff41cafbff35f8f44e8006323b154e8003fbb42f8d011e798f8043098f8057098f80650032b47ea052437dd052b58dc042b78d0052b7ff41faed6f868313bb147f64c67c2f207073f68db1b002b18dcd6f86c3186f86691c6f86c91c6f80093a6f86c936bb10c4648f2a35180461846c0f24501174665468847ac4621463a46404647f64c63c2f207031b6845f69077c0f201073b44c6f86831ede5012b3ff4dfad022b00f08780032b7ff4e5ad174688466546fff7e2fa03460298ac4641463a46002b3ff4d8ad96f84231002b3ff4d3ad304641f28831a6f8404109f062f947e0062b4ad0072b7ff4c6ad80464df6db50c0f24a0016460f466446804703465d1ea446394632464046012d3ff6b4ad981eb0fa80f04009fff7a8fba446394632464046a8e5174688466546fff7a6fa03460298ac4641463a46002b3ff49cad96f84231002b3ff497adb6f84031a3427ff492add6f83c3186f84291002ba6f840913ff489ad42f68d411846c0f2440188470298ac4641463a467de5d6f86c31c6f86891002b86f86691c6f86c91c6f80093a6f86c933ff46fad0f4648f2a35104461846c0f24501164665468847ac463946324626e696f84231c6f83891002b3ff45aad0446d6f83c0165468846174686f84291a6f8409120b142f68d41c0f2440188474af273660120002100220023c0f24606b04720463a464146ac463be54ff2a513c0f2490303b0bde8f04f18477fb50646002806d1fff730fa002807d19de80f00064649f29b1cc0f24f0c60477fbd00bff0b583b01d46144609294ed106460f46f22d10d8a22160196155062141700b21817049f65c71c0f20001033079440b22f8f7a4fd0e35204629464ff4807200f03df80546ff208df8080044f25220c0f20100019040f2c960c0f24800804798b148f27e30c2f2070000880122c1b264298df8072008d80721b0f5807f38bf03218df807108df80800f82d0cd8d221601961550621417005218170033001a90522f8f76cfd0835394630464ef60577c0f2470722462b46b84703b0f0bdf0b587b00c464ff29c51c2f229010d68bff35f8f29466ff39601b1f1005f52d129684ef66c63ccf2ff0399424bd14d218df8041043218df8051001218df8061095f8701195f871318df807108df8083095f87511b5f878318df80b108df80c30190ab5f87a318df80d10190a8df80f1095f8761195f8737195f874618df80e3095f877318df8101045f64d51c0f246018df809708df80a608df81130064617468847d5f87c3101468df81210190a8df81410190c3a4630468df813308df81510190ea02328e04d218df8041043218df8051001218df80610002100238df807108df808108df809108df80a108df80b108df80c108df80d108df80e108df80f108df810108df811108df812108df813108df814108df815108df816108df817300023111b8df8183028bf18290cd3c222011902550620487015208870c81c01a91522f8f7bdfc1834204607b0f0bd00bf2de9f04f81b04ff29c50c2f229000468bff35f8f20466ff39600b0f1005f0dd120684ef66c63ccf2ff03984206d194f8700118b1002a18bf002902d101b0bde8f08f94f877010028f8d0d4f880010028f4d047f64c69c2f20709d9f80030c01a0128ebdb94f87101012802d14ff0010b06e094f873b1bbf1010f18bf4ff0020b94f876510020eb078846adf80200adf8000013d0bbf1020f10d194f8750168b96b4641f281570df10201c0f25b07404615461a46b8472a4694f876511646b2f5c86f28bf4ff4c86606f1150a5046174600f050f80028b1d0b7f5c86f88bf45f08005d9f80010d4f87c2153230271120a42710a0a8171c2710a0c090e03704d234172a02143700123c17200218370c570027280f80ab0017394f87511bdf802204173bdf800108373c173090a0174110a8174310a017500f115014274c6740746084641463246f8f713fc4ff27d12c0f24702384651469047d4f87c0148f2a3510130c4f87c01c0f245013846884701b0bde8f08fb0b54ff2a054c2f22904216846f23f52c5f28802b2eb510f48f25f514cf67e25c0f24501caf2101518bf25608847002804bf691c2160b0bd10b301684ef66c62ccf2ff0291421bd190f87711c1b1d0f88011b1b147f64c62c2f207021368cb1a012b0edb1268d0f88401002808bf7047891a42f64d42c0f2440208bf01211047704710b5002149f25962c0f8801180f87711c0f25902002044f2436190474ef6e374c0f25a04a04704f1bc00bde81040004700bf2de9f04f81b00429c0f00b810c46014600784d2840f005814878432840f001818878012840f0fd804ef66c684ff29c57ccf2ff08c2f229074ff6ff7600254ff0010b8a4607e048f2a351c0f24501bff32f8f88475146d7f80090bff35f8f3868bff35f8f02466ff39602b2f1005f03d10268424500f0c0804ff47570fff766ff002800f0ce804ff62c425146cff6ff728318463283f8d45383f8d55383f8d65383f8d75383f8d85383f8d95383f8da5383f8db5383f8dc5383f8dd5383f8de5383f8df5383f8e05383f8e15383f8e25383f8e35383f8e45383f8e55383f8e65383f8e75383f8e85383f8e95383f8ea5383f8eb5383f8ec5383f8ed5383f8ee5383f8ef5383f8f05383f8f15383f8f25383f8f35383f8f45383f8f55383f8f65383f8f75383f8f85383f8f95383f8fa5383f8fb5383f8fc5383f8fd5383f8fe5383f8ff5383f8005483f8015483f8025483f8035483f8045483f8055483f8065483f8075483f8085483f8095483f80a5483f80b5483f80c5483f80d5483f80e5483f80f5483f8105483f8115483f8125483f8135483f8145483f8155483f8165483f8175483f8185483f819547ff470afc0f8008080f80ab08683c683068446848684c684068546858685c685068646868686c6860687468757e8002f4a457ff432afbff35f8f00bf47e8000222b157e8002f4a45f8d026e7ca78022a04dc012a0dd0022a79d00ce0032a0dd0042a08d190f8701129b101b0bde8f04faae00d2c06d201b0bde8f08f044600f045f963e090f87721aab1002149f2596280f87711c0f259020446002044f2436190474ef6e375c0f25a05a84705f1bc008047204651460a790446012a88bf002280f871214a7902f00303012b4ff0010298bf134680f873318f79012f88bf002780f87471cf79022f88bf002780f875710f7a4e7a47ea0627502f98bf5027b7f5f07f28bf4ff4f077a0f878718f7ace7a47ea062741f28836b74238bf3e46a0f87a61097b80f8702101f0030180f8761103f0010101eb530180f872110021c0f87c1100f009f8204600f03ef8204601b0bde8f04f6ae000bfb0b5044690f87601800758bfb0bd94f871014ef633750128c0f25a0507d105f1b000804705f58b71002088470ee005f5b670804794f87101012801d1002004e094f87301013818bf0120a8474ff67922cff6ff7249f201537a44c0f25903002044f243619847012084f87701b0bd00bf70b5044647f64c60c2f20700006894f8771145f69075c0f2010500292844c4f8800108bf70bdd4f8840142f66536c0f2440658b94ff6d130cff6ff707844002122460023b047c4f8840150b106f594718847d4f8840106f1e8022946bde87040104770bd70b5044600f5c475082084f88801032084f88901102084f88a01c22084f88c01062084f88d014d2084f88f01432084f89001012084f8910194f8700194f8711184f8920184f8931194f87501b4f8781184f8960184f89711080ab4f87a1184f89801080a84f89a0194f8760194f8732194f8743184f8991194f8771184f89b0145f64d500026c0f2460084f88b6184f8942184f8953184f89c118047d4f87c1184f89d01080a84f89f01080c84f8a001080e84f8a101a02084f8a36115264ef6057c84f89e1184f8a201c0f2470c012009212a461c2384f88e61bde87040604770b54ff29c50c2f229000468bff35f8f20466ff39600b0f1005f33d120684ef66c61ccf2ff01884218bf70bd94f877010025c4f8805188b149f25962c0f25902002044f2436184f8775190474ef6e376c0f25a06b04706f1bc008047d4f8840184f8705170b142f68d45c0f24405a847d4f8840105f166018847002804bf0020c4f8840170bd00bf2de9f04182b04ff29c51c2f229010c68bff35f8f21466ff39601b1f1005f75d121684ef66c62ccf2ff0291426ed194f8a81179b394f8aa01c0070ad0d4f8680178b347f64c61c2f207010968401a002827dd47f24c45c2f2070555f8040c002854d042f29707c0f24c074af6e908002607f5437101a8c0f24b0801968847a8b1032084f8ab612860b4f8ac01c04702b0bde8f081d4f8b411c1b302b0bde8f0410847204602b0bde8f04133e0019841f60d56c0f24c06a861b04706f5af708047e861b847012084f8ab0103202860b4f8ac01c047d4f8bc01a0b10199d4f8b821b4f8ae71531a38bf8b1abb420ad2b4f8b01159b147f64c62c2f207021268101a884203d32046022100f078f802b0bde8f08100bfb0b590f8a841002c4cd044f28442c2f200021188082911462cd0114631f8083f082b27d0114631f8103f082b22d0114631f8183f082b1dd0114631f8203f082b18d0114631f8283f082b13d0114631f8303f082b0ed0114631f8383f082b09d0114631f8403f082b04d032f8481f0829114614d14a68b2f5870f10d36ff35602012a0cd14a684ff65b63cff6ff737b449a4204d1d0f8b421002a18bf4a60002180f8a81190f8a911b1b1002180f8a91145f60a61c2f20701097869b947f24841c2f20701096839b14af68171c0f24b010546042088472846002c08bfb0bd0321bde8b04000e000bfb0b588b0044645f64d50c0f246000d468047012840f08f8008208df8010003208df8020010208df8030000208df80400ca208df8050006208df8060018208df8070047f26440c2f2070050f81c2c94f8a811002a18bf0122002945f60961c2f207014b7818bf0232002b94f8ab3118bf0432002b4ff0410318bf08328df808304c238df8093001238df80a308df80b508df80c2050f8182c4ef605758df80d200268c0f24705130a8df80e208df80f30130c120e8df810308df811204268130a8df812208df81330130c120e8df814308df8152002698df81620120a8df8172009788df8181081688df819106821c2f2000109688df81a10090a8df81b1047f64c61c2f207010a68130a8df81c208df81d30130c120e8df81e308df81f2000680df10102c4f8b80108680921c4f8bc0101201f23a84708b0b0bd00bf2de9f04f83b0022902d24ff0ff3510e1cde901100120cff680704ef66c644ff29c564ff62c4bccf2ff04c2f229064ff6ff77851ccff6ff7b4ff000084ff0010907e000bf48f2a351c0f24501bff32f8f8847d6f800a0bff35f8f3068bff35f8f00ea0501b1f1005f03d10168a14200f0b9804ff47570fff72dfb0028c5d059464218463182f8d48382f8d58382f8d68382f8d78382f8d88382f8d98382f8da8382f8db8382f8dc8382f8dd8382f8de8382f8df8382f8e08382f8e18382f8e28382f8e38382f8e48382f8e58382f8e68382f8e78382f8e88382f8e98382f8ea8382f8eb8382f8ec8382f8ed8382f8ee8382f8ef8382f8f08382f8f18382f8f28382f8f38382f8f48382f8f58382f8f68382f8f78382f8f88382f8f98382f8fa8382f8fb8382f8fc8382f8fd8382f8fe8382f8ff8382f8008482f8018482f8028482f8038482f8048482f8058482f8068482f8078482f8088482f8098482f80a8482f80b8482f80c8482f80d8482f80e8482f80f8482f8108482f8118482f8128482f8138482f8148482f8158482f8168482f8178482f8188482f819847ff470af046080f80a908783c783078447848784c784078547858785c785078647868786c7860787478756e8001f51457ff43aafbff35f8f46e8000121b156e8001f5145f8d02fe7044645f64d50c0f24600804701281dd1029d6978022916d00129204607d000297ff401af00210025fff75afe0fe0019f41f28831022f0ed14ff4fa730022012741f2883624e02046fff7d6fd0025284603b0bde8f08faa78052f11d3eb782e79072f43ea062310d395f805c0ae79092f4cea0627e4d3ee792d7a46ea052607e041f288364ff4fa7301e041f288360127642b98bf64238b4228bf0b4690f8a81180f8aa21a0f8ac31a0f8ae71a0f8b06171b147f24841c2f20701096800295ed001210446fff70cfe0025c4f8bc51bee744f28442c2f200021188082911462cd0114631f8083f082b27d0114631f8103f082b22d0114631f8183f082b1dd0114631f8203f082b18d0114631f8283f082b13d0114631f8303f082b0ed0114631f8383f082b09d0114631f8403f082b04d032f8481f0829114632d14a686ff00105b2f5870ffff483af0123cff680731a40012a7ff47caf4b684ff68112cff6ff727a44934214bfc0f8b431d0f8b431002b3ff46daf4a60012180f8a81199e74af60771c0f24b010420884720b105462046fff732fd5be70121204684f8a9118fe76ff0010553e700bf10b582b00c464df6cb61c0f24501884724b12178042901d1617809b102b010bda1780d29fad1e1780029f7d121790029f4d161790029f1d10028efd00168e029ecd10446fef708fa014620460029e5d004204ff6591e01904ff0000cc0f24e0e0020002100220e23cdf800c0f047204602b010bd3146fff7c3bf00bfb0b582b00c460546fef7e8f90146002d4ff0000018bf002901d102b0b0bd47f2fc70c2f2070000684df6cb61c0f24501884790b10068e0284ff00000edd129784ff6591c0191c0f24e0c0021002223460090e047012002b0b0bd002002b0b0bd08b530460921fff7cbff002805d002b045f28310c0f24400004744f62703c0f24603984708bd00bf08b530460a21fff7b7ff002805d002b045f28310c0f24400004744f62703c0f24603984708bd00bf08b530460b21fff7a3ff002805d002b045f28310c0f24400004744f62703c0f24603984708bd00bf10b589b38968012805d104460846fef7e5f9204628e039b30a794b798c79c97942ea032242ea044242ea016106291bd147f29121c0f24601044688470146204691b144f2e970c0f24400804701462046002918bf10bd48f6aa50c0f2000078440c21fff761ffd4e710bd00bf10b5059c4ff20340c0f2460080472146fff7c0ff10bd00bfb0b5c4b0044600284ff0000000f0c38089b20b2940f0bf80207838b96078092804d1a078612801d1e07810b1002044b0b0bdfef725f90028f8d045f64d50c0f24600804701281cd00228efd103208df8070001200df107058df80800a81c21460b22f7f783fc4af66104c0f24604f02029460d220023a047b0fa80f0400944b0b0bd4ff29c50c2f22900006801466ff39601b1f1005fc9d101684ef66c62ccf2ff029142c2d122797f21042a06dc012a0cdcbab1012a08bf00211ae0082a0bdc052a11d0082a08bf0a2112e0022a0dd0042a08bf01210ce0092a09d00a2a08bf0e2106e0092104e0022102e0032100e00b2180f8eb1210216a2580f8ec12a22180f8e652152580f8ee12062180f8e7521a2580f8ef120c2180f8e852132580f8f01252210822022380f8e95280f8f1124921012580f8e42280f8e53280f8ea2280f8ed3280f8f21280f8f35280f8f452217900f5397280f8f5126179192380f8f612a17980f8f712002180f8f812e17980f8f912217a80f8fa12617a80f8fb12a17a4ff2250480f8fc12c0f247040120e021a047284644b0b0bd00bf1fb5fff72fff002803d0bde81f4000207047bde81f4038b584b049f21f13c0f24703184710b5f0281bd1d1b1cab10c78032c16d10d2a1cbf0b2010bd487801281cbf0a2010bd45f64d50c0f246000c468047012803d1a01c0b21fff703ff002010bdbde81040fdf723bd00bf4ff29c52c2f229021268bff35f8f13466ff39603b3f1005f0cd1d2f800c04ef66c63ccf2ff039c4502bf0023c2f8dc32c2f8e03247f2c942c0f24d02104700bf4ff29c50c2f229000068bff35f8f01466ff39601b1f1005f0bd101684ef66c62ccf2ff02914202bf0021c0f8dc12c0f8e01247f2d940c0f24d0000472de9f04184b0dde90a76022f16d340f64705a94212d08eb13578412d0ed175784e2d0bd1014602f0bf0012284ff00d0008bf002b0ed004b0bde8f0810c9d0097cde9016546f63916c0f24d06b04704b0bde8f081082feed3b078012802d1f078022803d90d2004b0bde8f08100294ed045f6f444c2f2060414f8040c814246d12068002843d048f22732c0f254020d46084602219047d0b324682088b8b36088a8b3a08898b3e08888b330797179b279f37940ea012040ea024050ea0368d1d04ff29c50c2f229000068bff35f8f01466ff39601b1f1005f17d101684ef66c62ccf2ff02914210d1f178a1b190f8dc22aa420cd1d0f8e022424508d101295bd1082fafd100f09cf875e0f07818b1082004b0bde8f081082fa4d1f9f751f9c8b10646d0f868010028f1d047f64c61c2f207010968401a0128e9db96f8dc0268b196f8dd02032809d00628e0d1304600f077f8dce7112004b0bde8f08146f63917c0f24d0707f53a60804707f539622846214690470120002786f8dd020df10f02304600210123a6f8de7286f8dc52c6f8e0828df80f70adf80c7000f07ff861884af2bd6603abc0f24c0628460222b047384604b0bde8f081a7f1510189b24ff6b87291424ff00d0119d390f8dd02032808467ff430af334613f8080fa7f108018ab280b9052a0ed9a1884af2bd67c0f24c072846b847002004b0bde8f081084604b0bde8f08101280dd1042a0bd3981810f8021c00297ff425af10f8010c00287ff420afe0e702284ff00d0008bf062a7ff401af707b01283ff614afd4e700bf90f8dd120a1f022a38bf7047022905d0012907d1042180f8dd127047052180f8dd12704780b582b0052180f8dd120121adf8061045f6f441c2f2060190f8dc0209684af2bd6c49880df10603c0f24c0c0222e04702b0bde8804070472de9f04fc7b0054690f8dc0203920591d8b145f6f041c2f206010978884214d148f22732c0f2540202211c46904760b195f8dc0240f66502c0f255020021904718b100690088172802d247b0bde8f08f033880b2f42828bff42007af0b3807f101084ff000094ff0000a01900495029414e000bf0699cde94509adf810112121adf8121143f23d5144a8c0f255018847049d029c1ffa8af0a042d6d2a4eb0a01019a1ffa81fbb5f8de1241235a45b8bf93468df81c304e234a1c8df81d300123a5f8de22d5f8e0228df81e30059b1ffa8af08df81f30130a8df82410090a8df820208df82130130c120e8df82510b0fa80f18df823204a091ffa8bf111fa8afaa2458df8223008bf0232bbf1000f8df826202fd001390329039901eb000c01d2002115e04ff6fc700bea00020cf10103002100bf5e1816f8014c7d187078ec725c5cb67804318a422c736873ae73f1d1049d1bf003020dd01cf80160cb19012ade7207d00ceb01004178022a19731cbf8078587395f8dc020bf10b0406900b2010fa84f649f6cd713046c0f24c01884700283ff47eaf26f003031ffa84fc06f003025e426ff00303c1180433f518043581f8049081f8059081f8069081f80790f2d152b10344012a83f8049005d0022a83f8059018bf83f806900bf10e0202701b22442108230272220480f801908170c370417283723ff43dafbcf1040f01d2002214e047f6fc710cea0103002200bfb95c8618f17218f8021008eb020531736978ad78043293427173b573f0d11cf003033ff41fafbe5c00f10b01012b8e543ff418af561cbd5d022b8d553ff412af0232bb5c8b540de7f0b583b04ff29c51c2f229010c68bff35f8f21466ff39601b1f1005f47d121684ef66c62ccf2ff02914240d194f8dc12e9b3002840d002888a423dd145f6f446c2f2060616f8041c8a4235d1316899b3356894f8dd12032919d8d4f8681139b147f64c62c2f207021268891a00290edc02218df80b100df10b020746204600210123fff791fe2046fff760fe38468278092a1bd141896b8894f8dd72994217d1032f3adc012f6ad0022f3dd004e018b181780939022901d203b0f0bd47f6ed31c0f24d0103b0bde8f040084794f8dd72032ff1d8a2f10d0102290cd2c178d1b302208df8040001aa204600210123fff75bfe03b0f0bd092a08bf032fdcd14189aa889142d8d1c078002800f0818002200df105028df80500e6e7052f04d0042fcad1c07805262fe0c078002848d0062084f8dd0202208df807000df10702204600210123fff730fe052fb5d02046fff7fdfd03b0f0bd4268002aadd00389a3f2012189b2b1f57e4fa6d34089082b48d12988884245d12046012108234ce0c0780526002808bf022650b102208df80a000df10a02204600210123fff705fe6988012294f8dc024af2bd67adf8082002abc0f24c07022284f8dd62b84703b0f0bd052f15d1002094f8dc523668c4f8dc02c4f8e00247f2c944c0f24d0404f11000804728463146224603b0bde8f0401047032084f8dd0201208df806000df1060272e7e98888427ff457af2046022103e0204603210022002303b0bde8f040c3e580b582b04ff4f0704af61f4e01904ff4207cc0f2470e0020002100220023cdf800c0f04702b080bd06290ad14178012907d18178653911f1630f02d3c178012902d94ff0ff307047f0b581b00179427941ea022540f6b8318d421fd80646fdf743fcd8b1f8f722fec0b10446d0f8b80342f66537c0f2440758b941f29770c0f200007844012100220023b847c4f8b80320b107f1e8022821904718b14ff0ff3001b0f0bdb078f178d4f8c4230023c7f6e07340ea452003ea425240ea0120bff35f8f1043bff35f8fc4f8b403002001b0f0bd00bf02293cbf4ff0ff3070472de9f04f9bb00278437842ea0325b5f5007f04d94ff0ff301bb0bde8f08f4ef66c6a4ff29c56ccf2ff0ac2f229064ff6ff774ff000084ff0010b0791099008e000bf48f2a3512046c0f24501bff32f8f8847d6f80090bff35f8f3468bff35f8f20466ff39600b0f1005f03d12068504500f0c2804ff47570fef73ffb002800f0ba8004464ff62c40cff6ff7000bf2118463081f8d48381f8d58381f8d68381f8d78381f8d88381f8d98381f8da8381f8db8381f8dc8381f8dd8381f8de8381f8df8381f8e08381f8e18381f8e28381f8e38381f8e48381f8e58381f8e68381f8e78381f8e88381f8e98381f8ea8381f8eb8381f8ec8381f8ed8381f8ee8381f8ef8381f8f08381f8f18381f8f28381f8f38381f8f48381f8f58381f8f68381f8f78381f8f88381f8f98381f8fa8381f8fb8381f8fc8381f8fd8381f8fe8381f8ff8381f8008481f8018481f8028481f8038481f8048481f8058481f8068481f8078481f8088481f8098481f80a8481f80b8481f80c8481f80d8481f80e8481f80f8481f8108481f8118481f8128481f8138481f8148481f8158481f8168481f8178481f8188481f819847ff470afc4f800a084f80ab0a783e78327846784a784e78427856785a785e78527866786a786e7862787678756e8000f48457ff431afbff35f8f00bf46e8004028b156e8000f4845f8d025e70024ddf824805db1fdf704fb0146002c4ff0ff3018bf002902d11bb0bde8f08fb5fa85f040094ff000098df82c908df82d908df82e908df82f908df830908df831908df832908df833908df834908df835908df836908df837908df838908df839908df83a908df83b908df83c908df83d908df83e908df83f908df840908df841908df842908df843908df844908df845908df846908df847908df848908df849908df84a908df84b908df84c908df84d908df84e908df84f908df850908df851908df852908df853908df854908df855908df856908df857908df858908df859908df85a908df85b908df85c908df85d908df85e908df85f908df860908df861908df862908df863908df864908df865908df866908df867908df868908df869908df86a908df86b90bcb1d4f86c21a2b14ff4006304e03f683b44b3f5403f0cd2d718be680136f6d07e68033626f0030609eb060101f11009ede7002d4ff0020a039500f00581ddf81cc0acf102020a2ac0f00081002608eb0a0b9bf801504ff0ff30012d3ff648af9bf802209bf803309bf8047042ea03229bf8053042ea074747ea0361a1f1011212f5803f0a91fff433af9bf808109bf809e0029141ea0e210af10a020497aceb02034f1e9f42bff423afcde905269bf806209bf807300a9e42ea032cb6eb0c07fff416afb9423ff613af18f80a70089147ea052a4feada000ba90e5c07f00705012707fa05f5354240f003830e5c45ea06050d5407994ff6ff75c0f20205b4b3d4f86c0198b317461a0201924fea0e264ff4006200eb0208d8f8083053454bd0d8f800301a44aa4221d800eb0208d8f80830534540d0d8f800301a44aa4216d800eb0208d8f80830534535d0d8f800301a44aa420bd800eb0208d8f8083053452ad0d8f800301a44aa42d3d900bfbcf1000f40f0be8204980a464ff6fc710330c0f2030108404844944600f1100908980599069e00eb010a0398013686424ff0000028bf0120ddf824804fd2aceb0a02092a3ff64caf49e0d8f804000a9a904240f09782d8f80c006045c0f0928236d9089aa0eb0c00824200f28b827ab3029831180198c1f1000cc2199044a1f1010e002208eb02050beb0203287c9e7ab04240f0778296451cd06e7cdf7abe4240f070820ceb0207be1c13d0ae7c187b864240f06782079ef81c07d0e87c5b7b984240f05f8204329142dbd1b446a7e78c46a5e7ddf81cc0a2e7ddf81cc0002800f05082baeb0c004ff0000118bf0120b9f53e3f88bf0121014303980028c1f100003ff43eae00297ff43baed4f86cb1bbf1000f40f08b804ff44030fef7a6f8002800f02f82834600206ff0200100220beb02030bf8020040320beb0107b2f5006f01f1400158709870d870187158719871d871187258729872d872187358739873d873187458749874d874187558759875d875187658769876d87618775877987787f8400087f8410087f8420083f8220083f8230083f8240083f8250083f8260083f8270083f8280083f8290083f82a0083f82b0083f82c0083f82d0083f82e0083f82f0083f8300083f8310083f8320083f8330083f8340083f8350083f8360083f8370083f8380083f8390083f83a0083f83b0083f83c0083f83d0083f83e0083f83f0093d14ff43e30cbf800080020cbf804084ff0ff31cbf80c084ff40060c4f86cb1cbf80818c4f800034ff6ff760222c0f2020600210ae00aeb080209f10101ddf8248071454ff000003ff498ad08eb02050a9218f80200aa786f7805922a7a95f803e095f8049095f805c095f806a0eb7908926a7a40ea0728cde906215cb3012f29d84ff400670beb0705a868404500f0a28028680744b7421dd80beb0705a868404500f0988028680744b74213d80beb0705a868404500f08e8028680744b74209d80beb0705a868404500f0848028680744b742d7d90598cdf810a040ea0e2040ea094040ea0c67f81c20f00300d4f8009300f1100a002002930597b9f1000f26d00beb09035bf809105a68514580f09c80eab10beb02005bf80210d0f80490514580f08d80b9f1000f11d00beb09035bf809105a68514580f0878042b10beb02005bf80210d0f804905145d6d377e000204ff400694ff4006504e000bf3d44b5f5403f23d20beb05018a685bf805700132f4d04868ca68033020f0030000f110060beb09001032f6f7b7fb4168c2684bf809608368d4f86cb18a424ff00001b14408bf00f110014bf82310d7e7c9f540310f294ff00002c4f8002311d90beb09004bf809104ff0ff3142608160c260c4f800930be0e868ddf80ce00a9a089f60e010b10268114401604ff000090020b9f1000f7bd00beb09035bf809105a68514522d2002a72d00beb02005bf80210d0f80490514513d2b9f1000f67d00beb09035bf809105a6851450ed2002a5ed00beb02005bf80210d0f804905145d7d30546cc469146184601e01d469446a1eb0a0110290fd309eb0a020beb02034bf802104ff0ff31c3f804c0996000219446d960c5f800a0ddf80ce00a9addf810a0029b089f00280cbfc4f800c3c0f804c005984ff6ff7668600020c0f20206c5f80880e8604aea0321069bddf81c9047ea032a814202f10a087ff4bdae05f110077818099952464144f346f6f7cafae968de466868aa68d4f86cb15144e96081424ff0000018bf07464bf82270a3e600204ff400684ff4006703e02f44b7f5403f23d20beb07018a685bf807500132f4d04868ca68033020f0030000f110060beb08001032f6f7e9fa4168c2684bf808608368d4f86cb18a424ff00001b04408bf00f110014bf82310d7e7c8f5403200210f2ac4f800130dd90beb08034ff0ff304bf8082059609860d960c4f800831bb0bde8f08f00281ebf0168114401604ff0ff301bb0bde8f08f00bf02293cbf4ff0ff3070472de9f04f8bb00278437842ea0325b5f5007f00f2148105eb4502022303eb4202914240f00c810590fcf7dbfe002800f006814ef66c694ff29c564ff62c48ccf2ff09c2f229064ff6ff77cff6ff7800244ff0010b06e048f2a351c0f24501bff32f8f8847d6f800a0bff35f8f3068bff35f8f01466ff39601b1f1005f03d10168494500f0bc804ff47570fdf722fe002800f0d58041464218463182f8d44382f8d54382f8d64382f8d74382f8d84382f8d94382f8da4382f8db4382f8dc4382f8dd4382f8de4382f8df4382f8e04382f8e14382f8e24382f8e34382f8e44382f8e54382f8e64382f8e74382f8e84382f8e94382f8ea4382f8eb4382f8ec4382f8ed4382f8ee4382f8ef4382f8f04382f8f14382f8f24382f8f34382f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f819447ff470afc0f8009080f80ab08783c783078447848784c784078547858785c785078647868786c7860787478756e8001f51457ff437afbff35f8f00bf46e8000121b156e8001f5145f8d02be7d0f86cc10495bcf1000f20d000234ff4006104e03f683944b1f5403f0bd20ceb0107be680136f5d07e68033626f0030633441033eee775b9b3f53e3f40f2e0804ff0ff310bb0bde8f04f08467047002d00f0d680002305994ff0000901f1020a153103914ff0ff31059109eb49060aeb46056c784ff0ff31012ce3d8af78ea7857ea022e1ebf2a796d7952ea0528d9d0bef5207fd6d8b8f5f07fd3d80ef10102520802fb08fb4ff6fb724ff6ff779345c0f20207c6d81af81610059e41ea0421039cb9f1000f28d014f8132c14f8125c42ea05228a42b3d0feb114f80d2c14f80c5c42ea05228a42aad0012e15d014f8072c14f8065c42ea05228a42a0d0022e0bd014f8012c257842ea05228a4297d0043e721c04f11804d6d15646bcf1000f2fd00bf105054ff400640ceb040adaf808208a4230d0daf800201444bc4220d80ceb040adaf808208a4225d0daf800201444bc4215d80ceb040adaf808208a421ad0daf800201444bc420ad80ceb040adaf808208a420fd0daf800201444bc42d3d94ff6fc720bf10801c0f201021140194401f1100320e0daf80410a9427ff44fafdaf80c10a9427ff44aaf9af8101004297ff445af9af811109af8122041ea022171457ff43caf9af813109af8142041ea022141457ff433af049909f1010989450599b24601f1010105917ff43dafb3f53e3f3ff624af00240025019019e000211fe7d0f86cc14a688b684ff6ff7793454ff00002c0f20207c1f80cb008bf01f110024cf82320013575454ff000013ff408af05eb45000aeb40011af8100091f8018091f802e091f803b091f804904979bcf1000f40ea082605912cd0b8f1010f29d84ff400610ceb01039a68b24200f0a8801a681144b9421dd80ceb01039a68b24200f09e801a681144b94213d80ceb01039a68b24200f094801a681144b94209d80ceb01039a68b24200f08a801a681144b942d7d94eea0b21059b013149ea0322490801fb02f75a4607f1050b8df81d004fea1b208df820004fea1b408df8210005208df82500042001218df8270048468df81b1003908df82a000df11b0011218df81c408df81e808df81fb08df822408df824408df823408df82640cdf808e08df828e091468df829208df82b30fff74df800287ff482ae01980021d0f86cc1bcf1000f3fd0ddf810e0b8f1010f3cd84ff400630ceb03018a68b24235d009680b444ff6ff71c0f202018b4226d80ceb03018a68b24228d009680b444ff6ff71c0f202018b4219d80ceb03018a68b2421bd009680b444ff6ff71c0f202018b420cd80ceb03018a68b2420ed009680b444ff6ff71c0f202018b42cbd9002104e0ddf810e02ee7ddf810e0002f3ff41aaf4fea0922029f059b42f001023a44039f1b0252083b4353435a1e032a01d200220ae023f0030700228e18043297427475b475f4753476f7d113f003033ff4f8ae01f11507012bbc543ff4f2ae3a44022b547018bf9470ebe62de9f04f81b04ef66c6b4ff29c554ff62c4848f2a35accf2ff0bc2f229054ff6ff76cff6ff7800274ff00109c0f2450a03e000bfbff32f8fd0472c68bff35f8f2868bff35f8f01466ff39601b1f1005f03d10168594500f0bd804ff47570fdf723fb002800f02e81414600bf4218463182f8d47382f8d57382f8d67382f8d77382f8d87382f8d97382f8da7382f8db7382f8dc7382f8dd7382f8de7382f8df7382f8e07382f8e17382f8e27382f8e37382f8e47382f8e57382f8e67382f8e77382f8e87382f8e97382f8ea7382f8eb7382f8ec7382f8ed7382f8ee7382f8ef7382f8f07382f8f17382f8f27382f8f37382f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f819747ff470afc0f800b080f80a908683c683068446848684c684068546858685c685068646868686c6860687468755e8001fa1427ff43bafbff35f8f00bf45e8000121b155e8001fa142f8d02fe7d0f86813002974d104464ff41630fdf761fa014600284ff0000069d0002200bf8b1888544032b2f5163f58709870d870187158719871d871187258729872d872187358739873d873187458749874d874187558759875d875187658769876d876187758779877d87783f8200083f8210083f8220083f8230083f8240083f8250083f8260083f8270083f8280083f8290083f82a0083f82b0083f82c0083f82d0083f82e0083f82f0083f8300083f8310083f8320083f8330083f8340083f8350083f8360083f8370083f8380083f8390083f83a0083f83b0083f83c0083f83d0083f83e0083f83f009ad1c4f8681300e00021084601b0bde8f08f00bf2de9f04f93b04ff6ff75a9424ff0000c2cd0dde91c874ff4805ecde90aecd0f87ce3cde90087229fdde920a9dde91e6b249c0697239f0aadcdf840c0cde911eccde90845cde9026bcde904a90546079704f060fe84464cb1bcf1000f06d19df8480095f88013084385f88003604613b0bde8f08f2de9f04f93b00446002047f64c68a4f88003c2f20708d8f80000002a8b461abfc4f874030146d4f87413401ac4f87c03fcf720fa002800f07d81d4f86803002800f0788104f08eff002800f073810646b4f86c03002853d0a0f10108d4f87c0300254ff4a0714ff4f0774ff48059cde911050df1280acde901152046414632464ff42073cde90a951095cdf824a0cde90755cde90555cde90355009704f000fe002840f04781d4f87c034146cde91105012008904ff4a0700190204632464ff420734ff4f077cde90a951095cdf824a0cde90655cde90455cde90255009704f0dffd002840f026819df8480094f8801347f64c68084384f88003c2f2070806e0d4f8681330464ff41632f5f729fd4ef66c694ff29c57ccf2ff09c2f229074ff6ff76002507e000bf48f2a351c0f24501bff32f8f8847d7f800a0bff35f8f3868bff35f8f01466ff39601b1f1005f03d10168494500f0c0804ff47570fdf702f9002800f0ec804ff62c41cff6ff7100bf4218463182f8d45382f8d55382f8d65382f8d75382f8d85382f8d95382f8da5382f8db5382f8dc5382f8dd5382f8de5382f8df5382f8e05382f8e15382f8e25382f8e35382f8e45382f8e55382f8e65382f8e75382f8e85382f8e95382f8ea5382f8eb5382f8ec5382f8ed5382f8ee5382f8ef5382f8f05382f8f15382f8f25382f8f35382f8f45382f8f55382f8f65382f8f75382f8f85382f8f95382f8fa5382f8fb5382f8fc5382f8fd5382f8fe5382f8ff5382f8005482f8015482f8025482f8035482f8045482f8055482f8065482f8075482f8085482f8095482f80a5482f80b5482f80c5482f80d5482f80e5482f80f5482f8105482f8115482f8125482f8135482f8145482f8155482f8165482f8175482f8185482f819547ff470af0121c0f8009081728683c683068446848684c684068546858685c685068646868686c6860687468757e8001f51457ff433afbff35f8f00bf47e8000121b157e8001f5145f8d027e7054604f043fe002d18bf002803d101208bf8050022e0c5f860014ff001094ff4f07085f8649101904ff420704af61f460090c0f2470600200021002200230027b04730b185f86471c5f860718bf8059004e09bf805008bf8049030b14ff0ff3013b0bde8f08f0025cbe794f8800384f8810348b3d4f8700342f66535c0f2440528b1d8f800102d31c4f8781311e044f62b70c0f200007844002122460023a847c4f87003d8f8001001f12d01c4f8781320b105f1e8022d21904728b1002084f8810313b0bde8f08f002013b0bde8f08f80b582b04ff4f0704af61f4e01904ff4207cc0f2470e0020002100220023cdf800c0f04702b080bd022a3cbf4ff0ff3070472de9f04fadf2245d1e9008784f788c1850ea072001f102071f9002f07b82209300231d94a74202f06f82781ca04202f06b8238787978ba1c40ea0121a01a814228922b9102f260822098ddf870253290ddf84805ddf868153390ddf84c053b913490ddf8500522933590ddf854053690ddf858053790ddf85c053890ddf860053990ddf864053a901068411e0028116002f03a822b98002802f036822b98841c032c02f03182fe78072e02f22d82289890f800e0f00702d107f1040829e02b9820f00100022802f01f8297f804907d791e9849ea052a514632aaf04602f023fa002842f01182ddf85405c64607f10608012d36900dd8ddf87005806948b14feada0209f00701835c012505fa01f119438154b00707eb040bcdf88cb005d44ff00009042e29d2a1e000bff246d84504d018f9014b4ff0000903e000244ff00109d84645f64d55c0f24605a847012808bf0134601e81b2670800ebd130002c48bf4710a8470128369808bf7f42ddf88cb03844d6463690042e78d3b9f1000f42d1d84540d0424612f8011b36985a453dd098f8012008f10203120642ea01415b4500eb214c3ed008f1030298f802105a4534d098f8032008f10403120642ea01415b454fea214129d008f1050398f804205b4500f0898698f8057008f106035b4542ea072200f0808608f1070798f806305f4501f0b48298f8077008f108083f024ff0000915e03698002100e0d84600eb010c4ff001090022002108e04ff00109002203e04ff0010900220021d846002300273b43379f62440b447fb1dde93876dde93a40bc45d8bfbc46b142d8bf3146a242a8bf22468342a8bf0346ddf88cb00120cde938c1cde93a233790b9f1000f42f04a81bef1040f40f38380bef1060f40f3f280bef1070f00f0e682bef1080f00f06b81bef1090f42f03681d84502f0338118f801cbd84542f02e81bcf10f0f02f22a81ddf86c05002801f04f8337993298dde9342a002900f006863399dde939733b9e994227eae775b8bf0b46b242b8bf1646b542319681f2388338994fea630b21eae1794fea0c112f91319909f10104491b4fea590e4cea0c1211f003084fea540130942e9100f0d786994581f23e8205fb0a045feac97171464e4609d014f80e10309e01f0f00141ea0c0104f80e102e99594521442d9681f21a8204eb0b060c4604f8012bb44281f014828f1cb7424a7081f01082cf1cb7428a7081f00b820f1dca70b7423946ead301f004ba00bfbef1020f36dcbef1010f00f09f81bef1020f42f0b8803298dde933a530903798dde935412a90ddf87005dde93a32c0694ff000093e90d84524a8dde93867cde9428bcdf81091cdf8fc9029922793c2c000f0a48208f10100429098f80090584500f09c8208f10200429098f801004fea002897e2bef1030f00f0ca81bef1040f42f08180ddf87005dde932cec069dde93473dde93691dde93826dde93a5a002440943c90d8453d943eac2ca8cde93e8bcde92f7ecde9292680e80a1000f0e98208f101003e9098f800405845319400f0e38408f102003e9098f801003eac4fea002b00f0debcbef1050f00f02782bef1060f42f04880d84502f0458008f10100584502f0408008f10200584502f03b8008f10300584502f0368008f10400584502f0318008f10500584502f02c8008f10600584502f0278008f10700584502f0228008f1080cabeb0c001028c2f01b8008f11800584542f0168098f8040098f8051050ea01261ebf98f8060098f8071050ea012502f0078098f8000098f80120339940ea0224081bc1f0fd87864201f2fa8798f8020098f80330349a40ea0327d01bc1f0f087854201f2ed87ddf86c05002801f0128235980df1d80e329b30909ee8014fcdf8c4e0cde906478de8010f1846dde93037cdf828c0cde90865059704f058f801f0f9b93298cde94a8b2e9033980021309034980df59479319035980df584782f903698dde937a62d90ddf87005dde93954c0693b9f4c91cde942014846414602f076fa83464846414602f071fa4c99002940f04084dde94a21a846319d8a4200f03984531c8b4200f03584931c8b4200f03184d31c8b4200f02d84131d8b4200f02984531d8b4200f02584931d8b4200f02184d31d8b4200f01d8402f108038b4240f0188411785378d646b446ba4651ea03264ff0ff3700f00f849378d17853ea01212c9100f00884b6f5207f00f204842c99b1f5f07f00f2ff83917925960f29279100f2f983d379102b299300f2f4832a901079ddf8706524904399306a53790843ddf86c153062002901f08a842d982599084440428345c1f283842d9830990027081a834580f2d7832c982a9a40428242c0f2d1832a9aaa4280f2cd83bef1000f01f087842ceaec70269028eae87018903098a042a8bf204630905545a8bf554601f07abcd84501f01a87424612f8010b012801f21487329900282a9133992f913499319135992c91dde936c1309138992991399927913a9926913b99249100f01f825a4501f0fb8608f102025a4501f0f68608f103025a4501f0f18608f104025a4501f0ec8608f105025a4501f0e78608f106025a4501f0e28608f107025a4501f0dd8608f108025a4501f0d88698f8012098f8023098f8046042ea032398f8032098f8054098f8061042ea0622259244ea012a98f8071098f8082008f10904159441ea0221fee1abeb0806052ec1f0b68608f1050ada4501f0b18608f1060998f80540abeb0900a042c1f0a88609eb0400584541f0a38632981c90339831903498269035981b90dde93650309038982d9039982e90dde93ab02f90c4b1002703e000bf0137a74212d219f8070001381e28f7d909eb0700e11b4aaa42ab02f083fd002801f07b864a980744a742ecd3ddf86c05002801f09c8030982c954546002800f062832d9820eae0702d902e9820eae070219031985845a8bf5846319026982f998842a8bf0846269050e3d84501f0558608f10100584501f0508608f10200584541f04b8698f8001098f80100dde9375441ea0021ddf870050df1c80c0990ddf86c059ce80c10089004a8dde93576dde939aeddf8ec9080e810441e98cde900c7cde90265cdf81c9004f006f80746c0e2ddf87005dde93432c069dde93691dde93876dde93a4a5d46cde9428b4ff0000b3e90a8452ea8dde932cecdf810b1cdf8fcb03193cde92964279780e80450cde92c9172d008f10100429098f800b0a8426bd008f10200429098f80100070267e0012044904ff0000842ae3eaf3046394602f0b2f831903046394602f0adf84499074600292f9469d0d3462c46002600202d9001202e963e464490002042af0df1f80a2c903846514602f096f805463846514602f091f84499002940f060828446dde942014ff0ff37884240f05a82319b002b00f15682002e00f15382ddf870253f98116a239508431062309848ea09054a904ff6fe7085422f98da46cde94bb44d9000f0a2834ff6ff70854240f081831e98d0f868934ff420704b904ff4f0704c904ff4a0704d9091e301204490002742ad3eac2846214602f04ef881462846214602f049f8449959b34ff0ff361d9c229b374617e20020319000e2dde94201884291d0024612f8016b8a42429200f02683821c429243788a4246ea032600f01e83c21c429283788a422d9300f09686011d4291c0782e963e46d3462c4600027ce78046dde942108142ced00a4612f801cb8242c9d08c1c4d78011ba9424ff0ff36c4d361198142c1d1ddf870253f98116a08431e9910620029b8d0d1f86c110029b4d047ea0b070020b0eb572faed151f827000028aad0401a8207a7d16ff4403240f60f030244cff6fd739a429ed30a1852f8081cb94299d152f80c3ca3f1011111f5803f92d3002acde92557cde923c43ff48caf52f8041c99427ff487af1446c0f54030269a83423ff680afddf870051d46806940b1d2080bf00701835c012707fa01f119438154c12dfff46faf207801287ff46baf2598002801f08980dde9247ba4f13f0601f01bb85a4501f0dc8408f102025a4501f0d78408f103025a4501f0d28408f104025a4501f0cd8498f8012098f802609300710098f8032098f80460259108f105014fea820a15917100baf1000f169101f0b7841699002901f0b3842f99ca1ac1f0af84924501f2ac843199259a8a1ac1f0a7841699914201f2a384309903eb0c06084301d000230ce05feacc704ff0000307d1002e05d42f990aeb06008842d8bf0123159d169aabeb05001390ddf86c0502fb0af8b0fa80f04009184300244feac0794ff0000e1493cde9179822e02c992a9b07fb013b53081bf803702e9907f00f0c07f0f0070f44d2072d9908bf4cea01070bf80370ddf88cb021998e44dde91b128a424ff0000188bf01210c43e10708bf1544e10704d0f04507d801f050bc00bf5d4518bff04540f20782bbeb050701f0468429780b0901d0012211e0012f01f03e846b780bb102220ae0042fc1f03784aa78eb7852ea032301f03184042200bf1c92a8eb0e02934201f229842598b9f1000f21931b97bfd101f00f022e92219a0901012acde919542d912fd14ff0000c2199ddf88cb0dde91954dde91798c907aad00ceb0e01b1fbfaf202fb1a1117188a1957ea02019fd42f998a429cd231998f4299d2309900293ff480af29998a4292db27998f42fff68faf26998a42bff68baf24998f42fff671af85e72f9d22f0010b4ff0000c16e02c992a9b2e9f04fb01315308cc5cd20704f00f0504f0f0043c442d9a08bf45ea02042f9dcc540cf1020ce345b4d00eeb0c02b2fbfaf404fb1a2704eb000907eb060859ea080428d4a84526d23199894523d2309959b1299988451edb279989451bdb2699884518da2499894515da2c992a9b4fea580709fb01342e9de15d2d9801f00f0301f0f00129445feac8752f9d08bf43ea00012598e155511cb1fbfaf202fb1a1114188a1954ea0201bbd4aa42b9d231998c42b6d230990029a0d029998a42b0db27998c42addb26998a42aada24998c4294dba6e73eac012040904ff0000b3caf2046394601f034fe80462046394601f02ffe409941b14ff0ff371d9c229b002f00f08b8501f05dbbdde93e129142f2d011f8016b9142eed1ddf870353d991a6a11431e9a1962002ae5d0d2f86c114ff0ff370029e1d0319a1d9c4bea020b0022229bb2eb5b2fdad151f82b20002ad6d0a2eb010e5fea8e72d1d16ff44032bc4640f60f077244cff6fd77ba426746c6d301eb0e0c5cf8081c594507d15cf80c1ca1f1011212f5803f80f0db844ff0ff37b5e70ceb0c110afb02f2f4f725fd00f03abd00234ff00109d846fff79eb9002021902d90052e01f004831c98002801f00083fbf7c7f8002801f0fb829af8008008f10600864241f0f48247f65420c2f207000768002f01f0ec82387b797bba7bfb7b40ea012040ea024040ea0363a3f1810010f1800fc1f0dc82387c797cfa7c40ea0120b97c40ea014040ea02601090813810f5817f41f2cc82b8f1000f4ff000002e9317972f9079d0ddf884a04ff0000e00270ae000bf00f100404aa941f826000137474506f1010e17d219f807007646411e1e29efd909eb0700a8eb070142aa3eab02f0aaf900283ff43caf42993e984aaa0f4442f82600e3e7bef1000f00f0dd80aef101094ff000080df5947a09e0be46c14508f10108a6f101060af1040a00f0c8804aa850f828100029f1d40020434686421dd00aeb80077a68b2f1ff3f18dc5a1c914514d0ba68b2f1ff3f11dc9a1c91450dd0fa68b2f1ff3f0adcda1c914506d03a690433002a00f10400e0d400e00022179842ab3eac7746009402f0e8f900283ff4eeae3e980028c0d04af20d3142a8c0f24e018847b9e701204ff0000e88e0d3462c4664e45d4508bff04541f03e82ddf86c05002818bf012014990840012840f05e842c9b2a9825994fea5a0701fb0300139900eb5602169800970190159801f0f5fa002840f04b8401f01fba2f4600f041bc1e9829464aaa674601f025fa00287ff4adaeddf87005319b8069bc4660b10021b1eb552f08d1ea0809f00701875c012505fa01f139438154ddf828912e9a239db9f1000f3ff492ae002a4ff0ff371cbfdde92c1051ea00083ff48aae4b999942fff486aec91a8a423ff682ae4c99b142fff47eae891b88453ff67aaeddf86c15002700293ff474aea5f1011111f1021f7ff66eae2a99002900f02685259921eae17b269921eae17527998a45a8bf8a4629998c42a8bf0c4600f019bd0020ddf884a002e04ff0000e01202a7995f800c095f80180ab78ef7895060f2102f00f0601eae575754389214d43ed0a8df8f8500e25309212f0200f08bf012506fb05f501fb05f54fead5258df8f9504ff00d0508bf022506fb05f501fb05f54fead5258df8fa504ff00c0508bf032506fb05f501fb05f54fead5258df8fb504ff00b0508bf042506fb05f501fb05f54fead5258df8fc504ff00a0508bf052506fb05f501fb05f54fead5258df8fd504ff0090508bf062506fb05f501fb05f54fead5258df8fe504ff0080508bf072506fb05f501fb05f54fead5258df8ff504ff0070508bf082506fb05f501fb05f54fead5258df800514ff0060508bf092506fb05f501fb05f54fead5258df801514ff0050508bf0a2506fb05f501fb05f54fead5258df802514ff0040508bf0b2506fb05f501fb05f54fead5258df803514ff0030508bf0c2506fb05f501fb05f54fead5258df804514ff0020508bf0d2506fb05f501fb05f54fead5258df805514ff0010508bf0e2506fb05f501fb05f54fead5258df806514ff0000508bf0f256e434e43f60a00288df8076140f022824fea086242ea0c412c9a380602eb21492e9940ea0340ddf85c80aef1010501eb204000260f90cdf84ce0119507e001f01f000b3801367645814400f0f8814aa850f82610b1f1ff3ff1dd33469d421cd04aa800eb83004268b2f1ff3f16dc0133ab4212d08268b2f1ff3f0fdc0133ab420bd0c268b2f1ff3f08dc0133ab4204d002690133002ae1d400e00022404642ab3caf009702f033f8002800f0d0813c990029199100f0ba819df810019df81111149650ea0125cdf8589000f09f819df814719df815613f0447ea0667109e9df80f019df80e112e444fea002c41ea00229df8120106eb27470f9e9df813310004f71b169e40ea03604ff0010e06eb204924920eeb5202031418920ceb010201f0030009f10101159109f10201129119992997571e1a97f718f31a01312590101a2a910eeb52012d9a2f90d8074ff0000b2e90f80727912c90239509e000bf2a9827990bf1010bab4508442a9000f04e8129980beb00035345f1db26988342eeda24980028ebd0dde91b104ff0000803fb01071a98032880f09c802598ddf884a0239d0028dbd0dde9181001230bfb010c30984fea58011cf8011000f0100083ea1014c8b201f00f035feac87e08bf03091846002b18bf01202043012815d108eb0906964211db319886420eda7008395c3eadeb5c01f00f0501f0f0011943f60708bf45ea0311239d395425980128a6d008f1010040081cf80000bef1000fc1b24fea111a08bf00f00f0a5ffa8af0002818bf01202043012817d1159808eb0003934212db319883420fda5808395c3eae16f80a6001f00f0501f0f0013143db0708bf45ea0611239d39542598ddf884a002283ff474af08f1020040081cf80000bef1000f00f00f03c1b208bf0b091846002b18bf0120204301287ff460af129808eb00069642fff65aaf31988642bff656af7008395c3eadeb5c01f00f0501f0f0011943f60708bf45ea0311239d395445e7ddf8a8c008e000bf2f9808f1040840450cf1020c3ff458af30981cf8016c00f010030120f6b2002580ea13130f2e88bf01251d43012d09eb080a15d1924513db3198824510da4fea5a053609795d3ea8865d01f00f0401f0f00131435feac97008bf44ea061179551cf8010c10f00f0e704618bf01201843012818d10af10106964214db3198864211da7008395c3eaa12f80e6001f00f052e9c2d9a45ea061501f0f001002c08bf41ea06053d549cf80000c6b200200f2e88bf01201843012816d10af10205954212db319885420fda690830097e5c3ead285c06f00f0506f0f0062c9c0643002c08bf45ea00167e549cf8000010f00f06304618bf0120184301287ff481af0af103039342fff67caf31988342bff678af5808395c3eab9b5d01f00f062e9d46ea031601f0f001002d08bf41ea03063e5466e74af20d3142a8c0f24e0188479df80c019df80d11dde91698119ddde913e605e09df80c019df80d11ddf84ce040ea012002e6002007e000274ff00109d846fef764bd4ff0ff302f901d9c229b2f9ffff765bbd3462c46fff7e7b80f4600e04f1cd90708d02d99994205da39782f9c01f00f0121433970b8f1010f05f1010700f0d480994537da07fb0a045feac97171464e4609d014f80e10309e01f0f00141ea0c0104f80e102e99594521442d9614da04eb0b060c4604f8012bb4420fd28f1cb7424a700cd2cf1cb7428a7008d20f1dca70b7423946edd302e00f4600e04f1cd90708d02d99994205da39782f9c01f00f0121433970b8f1020f05f1020700f09480994580f2908007fb0a045feac9717146c8460ad014f80e10ddf8c08001f0f00141ea0c0104f80e102e995945214414da04eb0b060c4604f8012bb44268d28f1cb7424a7065d2cf1cb7428a7061d20f1dca70b7423946edd35be00f4659e0bcf1000f4ff0ff373ff4d8aa5cf8042c8a427ff4d3aacef5403291423ff6ceaacde92660ddf87005806950b1319a4feadb0302f00702c65c012404fa02f23243c2546046002242ab00f077fe00284ff0000708bf4ff0ff373ff4aeaaddf86c0500283ff4a9aaa8f1011010f1021f4ff000077ff6a1aa2798a0f1011010f1021f7ff69aaa2c98002300284a9300f03c83299820eae0722a9820eae0733098a842a8bf284630902f985045a8bf50462f902be34f1cd90707d0984505da39782f9c01f00f0121433970ef1c3199691a11f1040f10d91d9c229b1f980133834228982b9900eb01077ef459ab00f0cfbd319904378f42eed0994539da07fb0a045feac97171464d4609d014f80e10309d01f0f00141ea0c0104f80e102e995945214418da04eb0b060c4604f8012bb44280f0cd8001f10208b0454a700cd201f10308b0458a7007d201f10408ca70b0454146e9d300e08846d90709d09d4207da98f800102f9c01f00f01214388f80010994536da791c01fb0a015feac97474464d4609d011f80e40309d04f0f00444ea0c0401f80e402e9c5c4501eb040615da01eb0b04314601f8012ba14280f09580b11ca14272700ad2f11ca142b27006d2311df270a1420e46ecd300e03146dc0707d09d4205da0c782f9d04f00f042c430c70994536dab91c01fb0a015feac97474464d4609d011f80e40309d04f0f00444ea0c0401f80e402e9c5c4501eb040615da01eb0b0400bf314601f8012ba14260d2b11ca14272700ad2f11ca142b27006d2311df270a1420e46edd300e03146dc0707d09d4205da0c782f9d04f00f042c430c709945bff64baff91c01fb0a015feac97474464d4609d011f80e40309d04f0f00444ea0c0401f80e402e9c5c4501eb040615da01eb0b0400bf314601f8012ba1422ad2b11ca14272700ad2f11ca142b27006d2311df270a1420e46edd300e03146dc073ff41baf9d42bff618af0c782f9d04f00f042c430c7010e701f10108d9077ff442af4ae7711cdc077ff478af7ee7711cdc07acd1b3e7711cdc07e3d1fde6bbf1010b67d017f8010b411e1f29f7d341b22029fef63baf06eb400116f81000497840ea0122c12afef431af204629464aab00f009fd0028e2d1fef728bf00254ff0000bd345b8bfa542bff63ca9dde9230100eb010ed645bff635a9a445bff632a9abeb02018e457ff72da9a5eb08018c457ff728a9bbeb0e075846b8bf7046f3454ff0000ed8bf774607eb030bd31bb5eb0c07d8bf7746ac450246aaeb0000a8eb0701c8bf6546834238bf1846631b9942299328bf1946309b1195994507eb060326931b913fd1269b9d422fdd119d4ff0010e37e0ddf86c05002800f03a84a9f1011010f1021f4ff000067ef6d1aea8f1011010f1021f7ef6cbae2d98002300284a9300f029842798309920eae072299820eae0732a988142a8bf0146319830915045a8bf5046319000f017bc119d269b0027eb1ab3fa83f35b095a45c8bf012703ea070e1b99002900f06181114602f0010a83185a464fea5b064ff0040b2bea820717971718013f03f0010418967e0816962bea87060aeb040715962e94c61bdde92c740aeb0100274402eb0a044a40490814915908cdf8c4a0139107eb0c01ddf8a4a0491b4fea560b514538bf8a460121cdf8a4a0bbf1010f88bf710801f0030321f003010e9161082491410823913099129301eb5000411c03381090d00721904d9809eb54032d904ff0ff3000eb560027906ff0010000eb56002590981e0f906ff00200199600eb56002f9eddf86cc04ff000080c910d931c90cdf868e008e0299808f101082f9e80454ff000073ff448a86fea08014046bef1000f18bf0ceb01002699319b42182d9902fb01910bb9002305e0189b179ccb5ce34003f00f032c932e9b0bb9002304e0169b159ccb5ce3401b012a9343193098219c03fb060a2398002c249c504421441cd15a46f3f707fddde91aec319840b114992c9a1af8010000f0f00010440af801002e980028b6d013992a9a1af8010000f00f0010430af80100ace703fb06f42d9bbef1000f03fb02f23ed019980228dcd30f98109910442144002200eb0b039c785f78279ec4f3031444ea071701eb0b049642a770c9d05f7810f80b60c7f3031747ea0617259e67709642bed010f80b7013f8016cc7f3031747ea06171c9e01f80b709642b1d013f8017c13f8023cc7f30317043247ea031304389345a1f1040104f8013cc9d1a0e7199b022b9dd3199b082b01d200222be00d9bddf838e003eb020c0c9a144400220ceb02077e781cf80250c6f3031646ea0516a51805f8016cbe787b78c6f3031646ea0313a354fb78be78c3f3031343ea06136b703b79ff780432c3f3031343ea07139645ab70dbd1129b119ddde91aec002b3ff466af531ccf5c8e5c129cc7f3031747ea0617012c87543ff45aaf941c0f5dce5cc7f3031747ea0617129ec754022e3ff44eaf0a44d278095dc2f3031242ea0111015544e70027fef758bf00224aa80690269808eb090105902798cde902b104902f98309f0190dde92d10009701f0dcfa0746fef742bf0020189026902498259940ea0320b0eb510f28bf48082c990023b0eb510f28bf48081b90013838bf184611902a98189a161ad8bf1e462b1a8b42a8bf0b469e422393bef61faf2d99ddf86cc00beb01024fea4c011c910cfb0cf1259b89001a91991824910021032b319138bf01212c9f0023032f38bf012319431991791e1691b91e1491119921924b00494389000e91511c1291299913930b0141ea011110930f916ff00801189b01eb4c0115919842c8bf0346dde92e214ff0000b01fb03212d9112e0012002902798009501900846269902f0cefc2a982d99013639442d91239900278e42bef6cdae2c9af14311448e42b8bf31461c9a6fea41011144012938db1a984ff0ff3201fb11001b99a1eb0b01012902eb410137db01fb01f2824233dd1599a1eb4b0202f10803032b02f1060122db01fb01f787421edd052b02f104011ddb01fb01f7874219dd072b02f1020118db01fb01f7874214dd0bf1040b092ba2f1080103db524382420a46dbdc08310ae04ff0000b35e00bf1010b04e00bf1020b01e00bf1030bbbf1010f29db08318a1f5243824224dcbbf1020f16db0a1f5243824215dcbbf1020f0fd08a1e5243824211dcbbf1040f08db01fb01f282420ddcbbf1040b01f10801e1d14ff0000b07e0abf1010b04e0abf1020b01e0abf1030b2a98dde92e17304400fb07112998219b10282498309a5b44a0eb0b053ff460af2591b6fa86f01999400908434cd11698864249d01499701e891b179518968842b8bf01466fea4100139908440128c0f2a6800e99319a00fb101011998a1a4ff0ff31012a01eb420174db01fb01f7874270dd5100a1f1090202f10807032f02f106015edb01fb01f686425add052f02f1040159db01fb01f6864255dd072f02f1020154db01fb01f6864250dd3199092f01f104013191a2f1080103db524382420a46d9dc083145e02698b4468342d8bf03469542a8bf1546ab4280f2b080ae46d80708d0259d5808295c299a01f0f0011143013329544fea5308b8eb6e0f1cda25982d9e0f9900eb6e0206eb08052f4607f8011b974280f08280a81c9042397080f08280ef1c974201707cd2043606eb080090423970e8d376e0259800eb530072e0319a013204e0319a023201e0319a03323192319a012a23db08318a1f524382421edc319a022a19db0a1f5243824200f3d480319a022a11d08a1e5243824200f3cf80319a042a09db01fb01f2824200f3ca80319a0831043a3192ded1002031903198129901eb000c26988342d8bf0346309eb445b646b8bfe64673454fdad90708d025985908425c299f02f0f0023a43013342544fea5308b8eb6e0f1ada25982d9e00eb6e070f9806eb0802154605f8010bbd4214d2911cb942287023d2d51cbd4208701ed2043606eb0801b9422870ead318e0259800eb530114e0681c02e0511c10e038465feace7107d0734505da0178109a01f00f01114301702a982f9f664656e62946309e5feace7207d0734505da0878109a00f00f001043087031982499c04301eb000801200290279832460190dde9250563462946cdf8008002f005fba845d8bfa8461798b042a8bf304680453eda84465feac8700ad0259b4fea5800195c299a01f0f001114308f1010819544fea5801b1eb6c0f18da25982d9b0f9f00eb6c025d182e4606f8017b964211d2a81c9042377010d2ee1c964207700bd20433581890423770ecd306e0259800eb580002e0681c00e030465feacc7107d0e04505da0178109a01f00f01114301702a982f9f189eebe5319801383ee7319802383be73198033838e70026fef79cba00222c984aa908912599484407912499cde903082698069123990290319805910190dde92e10309f009701f0e8fd0646fef782ba4ff0ff300df2245dbde8f08f381b18bf4ff0ff300df2245dbde8f08f00bfb0b586b008b3d0f86c01f0b10023b3eb512f1ad150f82130bbb11b1a9d0714d16ff4403540f60f041d44cff6fd74a5420bd3184450f8085c8d4206d150f80c1ca1f1011515f5803f03d24ff0ff3006b0b0bd50f8045c8d42f7d1c3f540339942f3d80028f1d0037813f00b0fedd1144601ab0022002500f011f80028e5d00198dde903122060481c40086160a260e06028462561656106b0b0bd00bf91429cbf002070472de9f041855c4ff0050c6e0758bf4ff0030c15f0f30f02d1891a614502d20020bde8f0818418627894f802e0002e05d5e078267942ea0e2240ea062e002a4ff0000018bfbef1000fead0b2f5207fe7d8bef5f07f88bfbde8f081082d38bf0120072d18610ad8501c400800fb0ef0a1eb0c018842d3d804eb0c0828e004eb0c080efb02f5002000bf00eb0c04a142c6d008eb00073e78360903d00127b54213d2bde70c1b012cbad07e781eb10227b5420ad2b4e7042cb2d3bc78fe7854ea0626add00427b542aad3ad1b3844dcd158600120c3f800809a60c3f80ce0bde8f0812de9f04f89b0dde91257069005fb07f000294fea4007029100f0d48100200390089002984ff0010e00264ff0000b4ff000084ff0000c4ff000090497079205930be000bf4ff0000c4ff00308cdf80ca009f10109814500f0ba81bcf1000f40f0b4810699b8f1020f11f809a0ead0b8f1010f15d0ddf81cc0b8f1000f40f086805fea1a100af00f01089100f092800499814280f09a804ff0010c4ff0000882e1079abaf1000f00f07f800499514576d3a1eb0a010491089901eb01100901019114e000bfa15d089f01f0f0013943a1550136aaf1010a4ff0010eae4224bf00260bf1010bbaf1000f00f0598113998b45d1d20bfb0324bef1000fe3d0a91bb1eb5a0f88bf4fea5a0141b38d0804eb060817d0002208f10107a2eb850c6ff003057b1904350ceb05020432d870187158719871f5d1059b079a2f1d11f0030504d10ce0002711f0030508d0012d08f8070004d04744022d787018bfb870aaeb410abaf1000f0e440dd0129dae42b5d2a15d019f01f00f013943aaf1010a4ff0000ea155afe7129d4ff0000aa6e7039a52ea0a2213d004990392914280f08f804ff0010c4ff0000853e74ff0000c4ff002084ee74ff0000c4ff00108f4e000214ff0010c4ff00008039142e7089a091a049102eb02111201cdf80090019214e000bf1af80670089a07f0f00717440af80670013601384ff0010eae4224bf00260bf1010b002800f0d680139a934580f0cd800bfb03cabef1000fe2d0ad1bb5eb500ff14688bf45087db3ac080aeb06081ed0002308f10107a3eb840c6ff0030400bf07eb040e04340ceb040304338ef803108ef804108ef805108ef80610f0d1059bddf81cc0271d15f0030404d10ce0002715f0030408d0012c08f8071004d04744022c797018bfb970a0eb45002e4488b1129dae4210d21af80620019f02f00f023a430af8062001384ff0000e0028abd180e000bf129d0020ce469de7891a0491089901eb011009010191114613e000bf1af80620089c02f0f00222430af80620013601394ff0010eae4224bf00260bf1010b002953d0139a9345bff4ccae0bfb03cabef1000fe3d0ad1bb5eb510f88bf4d085db3ac080aeb060819d0002208f10107a2eb840c6ff0030400bf3a1904340ceb04030433d070107150719071f5d1059bddf81cc0271d15f0030404d10de0002715f0030409d0012c08f8070005d04744022c787018bfb87000bfa1eb45012e4489b1129dae42b6d21af80620019f02f00f023a4301394ff0000e0af806200029b0d103e000bf129d0021a4e74ff000084ff0000c029852e64ff0010c4ff0000803e04ff000084ff0000c0298ddf8009045e60120012107e04ff0010cb8fa88f0049f8cf001014009b7fa87f252091140084009b0bde8f08f00bf2de9f041826882b10121816007220020511e20fa01f1c90708bfbde8f0814ff0ff3191400843bde8f0818c46056841688d42e9d06b1c03602c78ff2c11d18b4200f0dc80ac1c046095f90120b2f1ff3fd6b200f3d080bf2e22d806f03f0602238fe062b2b2f1ff3f02dd07222046cfe7bf2c09d804f03f070e224ff0010e4ff000084ff0000c2ee0df2c0fd804f01f0715224ff0000c4ff001084ff0010e22e0df2e0fd806f01f0603236ae0ef2c0fd804f00f071c224ff0010c4ff000084ff0010e10e0ef2e58d806f00f06042358e0f02c40f093804ff0000820224ff0000c4ff0000e00278b424fea072603d0af1c07606d7803e00125856000251f46c02c45ea06046cd35b1a7d1ab3fa83f3b5fa85f55b096d092b434fea042403d001258560002503e07e1c06603d783746b8f1000f44ea050453d17d1ab5fa85f56d092b434fea042403d001258560002503e07e1c06603d783746bcf1000f44ea05043ed1791ab1fa81f1490919434fea042131d001238360002030e0f02e3ed1002605234ff0010e00250127ea074fea062617d18c4215d0621c0260247801379f4246ea040623d000bf8a424fea062609d0541c0460127801371643bb422246f3d116e02246013701254ff0000e9f4214468560dad112e07b1c0360387840ea0104bef1000f20467ff413afbde8f08114465feace7202d0091b8e4204d9012181600020bde8f081a11907462046002263463960bde8f041ffe78446081ab0f5806f01d90020704761454ff00000fad0002a18bf70472de9f04fabb09fed251a9fed250a9fed253a9e4600264ff0ff380df12c090df10c0ab7ee002ab0ee084ab6ee005ab1ee006ab9ee007a00206746019009e000bf49f826500af8064001368f42bc4600f0cb8217f8012b501e01280fd8012a23d18f4274d09cf901000cf10207b0f1ff3fc5b240f38f8000220724f5e1052a37d0042a30d0032a49d1002e00f0d982701e59f820501af8004093e200bf0000004f000000cf000000008f4254d00cf102079cf801008f4247d09cf802200cf103078f4240ea02203fd09cf803200cf104078f4240ea024037d09cf804200cf10507130600223ae0002e00f0aa82013eace7022ec0f0a582b21e59f82230701e59f8205049f820301af802301af800400af8003049f822500af8024096e702f0f80010281fd1002e00f08b82701e1af80030002b40f0858259f82050152a6fd16d420022002406463de20023012206e001220724002588e101220020002343ea000501242fe2a2f12000062827d8002e00f06782731e1af80300002800f0618259f82300242a40f0858080f00045012400221e4617e2bf2d5ad801220292002205f03f000e244ff0000b00928f4200f019819cf802300cf10308002215e1322a51d002f0fe0030284dd0402a40f0a380032ec0f03682701e1af80020002a00f03082b21e1af80230002b00f02a82033e1af80630002b00f0248209eb8202d2ed000a09eb860209eb8000d2ed001ad0ed002a70eee10a62eea00a71eea00acee1002800f00e82023e1af80600002840f0088259f82600122a58dc102a00f03081112a00f03381122a40f02c81454354e1df2d44d8002205f01f00152400924ff0010b0122bae0002e00f0eb81a2f13100013eb0fa80f01af806304009834240f0e08159f82600302a7bd100ee900af8eee00a94e1002b00f0d481023e1af80630002b00f0ce8159f82630212a40f3ed80222a00f02581232a00f02981252a40f03a8100ee903a01ee900af4ee610af1ee10fa48bff0ee601a11ee905a71e1ef2d72d805f00f001c24012274e0a2f11303022b80f0c480002d00f0a381b0f1004f08bf15f1010300f0eb80132a40f0f18090fbf5f5f1e0a2f1480010f1070f4ff00000c0f05f81002e00f05c81013e1af80600002800f0858109eb8600d0ed000af4ee420af1ee10faf5ee400ac8bff0ee420af1ee10fa48bff0ee430a432a72ee601a00f3b480412a00f0f380422a00f00f81432a40f0008161eea10a72ee600a1de1312a40f0948000ee900a20f00040b0f1ff4f4ff00002f4ee410aa8bf0122f1ee10fa4ff0000080f21c81f4ee400af1ee10fa00f11681002a40f01381fdeee00a10ee905a98e0f02d4ff0000040f00981002220244ff0000b009202928f427ff4e7ae00230122b8460002c02d43ea000535d3781aa8eb0103b0fa80f0b3fa83f340095b0918434fea05270ebf18f8013b00230122bbf1000f43ea07051fd1a8eb0103b3fa83f35b0918430ebf18f8013b002301222f02009d002d43ea07050ed1a8eb0103b3fa83f35b0918434fea05230ebf18f8010b0020012240ea0305474602984ff0ff3838b1601e25fa00f0c0071cbf08fa04f005430024a3e0162a10d1a842b8bf054637e0202a4cd0212a51d100ee903a01ee900a70eee10a8ee005442ae0a842c8bf054626e0451b24e0002800f1c680def800200546824238bf15469042019888bf0120019015e0442a48d0452a5fd0462a4ed161eea10a61e00025132a4ff0000208bf4ff00045002469e090fbf5f202fb15050022002462e000ee903a01ee900a61eea00a57e000ee900af5ee400af1ee10fa00f0928001ee903ac1eea00a4ae000ee903a01ee900a71eea00a43e000ee903a01ee900af4ee610af1ee10fac8bff0ee601a11ee905a37e060eea01a70eea00a74ee600a61eea00a2ce0f4ee450af1ee10fa18d570eea01a60eea10a22e0f4ee450af1ee10fa15d560ee861a60eea11a60eea10a16e060eea00a13e060eea01a60eea10a0ee071eea10a61eea00a72ee600a07e061ee870a61eea00a61eea00a70ee820a10ee905a012400224ff000005ab9202e09d0002c3ff436ad25f00040b0f1ff4ffff630ad00202bb0bde8f08f56b3701e1af8001059f82000d9b102ee100a20f00040b0f1ff4f4ff00001b4ee412aa8bf0121f1ee10fa4ff00000e4dab4ee402af1ee10fadfd40029ddd1bdeec20a10ee100a019adef804101143cef804102bb0bde8f08f00202bb0bde8f08f80b5002970d090f900c0bcf1200f5ffa8cfc07db012010604ff0010ec3f800c0704680bdacf1c20ebef11d0f0fd801295ad090f9011011f1410f55dc02211160407800f03f006cf38a108446e4e70cf0f00ebef1e00f23d1032945d390f901e01ef1410f40dc90f9021011f1410f3bdcbcf1e00f5ffa8ef101d1a02934d3bcf1ed0f01d19f292fd80321116042784fea0c3189b2807802f03f0241ea821136e004294ff0000ebbd3acf1f50111f1050fb6d390f901e01ef1410f15dc90f9021011f1410f10dc90f9031011f1410f0bdcbcf1f00f5ffa8ef101d1902904d3bcf1f40f03d18f2901d9002080bd042111604ff4e011427801ea8c4c817802f03f02c0784cea023201f03f0142ea811100f03f0001eb000c7fe72de9f04188b04af2bb261c46c0f24e0613460a46ddf83880002706f1ae05214627706770a770e77027716771a771e77127726772a772e77227736773a773e77327746774a774e77427756775a775e77527766776a776e77627776777a777e777a8470028c8f800705cd020786178a278e3780843104318434ff0010008d0e179a27911431ebf617a227a51ea020102d108b0bde8f081a07b14284ff00000f7d1217d8df8040041f0010121758df805008df806008df807008df808008df809008df80a008df80b008df80c008df80d008df80e008df80f008df810008df811008df812008df813008df814008df815008df816008df817008df818008df819008df81a008df81b008df81c008df81d008df81e008df81f0001a92046b047c8f8000018b1012008b0bde8f08106f1520120468847d8f80000002818bf012008b0bde8f081002804bf4ff0ff3070472de9f04f95b00df1200c8ce80f00f8f788fd002800f02a824ef66c6a4ff29c5b4ff62c4748f2a355ccf2ff0ac2f2290b4ff6ff76cff6ff774ff000080124c0f2450503e000bfbff32f8fa847dbf80090bff35f8fdbf80000bff35f8f01466ff39601b1f1005f03d10168514500f0bb804ff47570f9f7cdfc002800f0f781394600bf4218463182f8d48382f8d58382f8d68382f8d78382f8d88382f8d98382f8da8382f8db8382f8dc8382f8dd8382f8de8382f8df8382f8e08382f8e18382f8e28382f8e38382f8e48382f8e58382f8e68382f8e78382f8e88382f8e98382f8ea8382f8eb8382f8ec8382f8ed8382f8ee8382f8ef8382f8f08382f8f18382f8f28382f8f38382f8f48382f8f58382f8f68382f8f78382f8f88382f8f98382f8fa8382f8fb8382f8fc8382f8fd8382f8fe8382f8ff8382f8008482f8018482f8028482f8038482f8048482f8058482f8068482f8078482f8088482f8098482f80a8482f80b8482f80c8482f80d8482f80e8482f80f8482f8108482f8118482f8128482f8138482f8148482f8158482f8168482f8178482f8188482f819847ff470afc0f800a084728683c683068446848684c684068546858685c685068646868686c686068746875be8001f49457ff43aafbff35f8f4be8000121b15be8001f4945f8d02fe7d0f86c11209e4ff0ff3029b30022b2eb562f21d151f82600002800f03481431a98074ff0ff3017d16ff4403240f60f071a44cff6fd77ba420ed3ca1852f8080cb04240f0208152f80c1ca1f1011010f5803f04d24ff0ff3015b0bde8f08f002a4ff0ff30f8d052f8047c8f42f4d1c3f540339942f0d810ad104600222b460024fef7f0fe002800f0fe80239b0f22990603f00f0002eae17101fb00f289214a43d20a8df830200e2213f0200f08bf0f2408bf012200fb02f201fb02f24fead2228df831204ff00d0208bf022200fb02f201fb02f24fead2228df832204ff00c0208bf032200fb02f201fb02f24fead2228df833204ff00b0208bf042200fb02f201fb02f24fead2228df834204ff00a0208bf052200fb02f201fb02f24fead2228df835204ff0090208bf062200fb02f201fb02f24fead2228df836204ff0080208bf072200fb02f201fb02f24fead2228df837204ff0070208bf082200fb02f201fb02f24fead2228df838204ff0060208bf092200fb02f201fb02f24fead2228df839204ff0050208bf0a2200fb02f201fb02f24fead2228df83a204ff0040208bf0b2200fb02f201fb02f24fead2228df83b204ff0030208bf0c2200fb02f201fb02f24fead2228df83c204ff0020208bf0d2200fb02f201fb02f24fead2228df83d204ff0010208bf0e22424360434843c00a8df83f00c3f3001006900ca84a43cde9045008ac0b9dd20addf88890ddf884a0ddf87c8013cc1e9e8df83e2022462b46cdf80c90cdf808a0cdf80480009600f02df8dde91201a2455044c8bf5446a9454944c8bf4d46b042b8bf06464145b8bf8846a64211dd4146a8450edd249800680f280ad8249f491b321b07ebc0030130dc801d815a8199813860002015b0bde8f08f4ff0ff3015b0bde8f08f2de9f04f8fb0dde91c5a0e9129691e9eddf868c0002900f05c812f68002e40f05381874200f050819af80f100f2940f04b819af80e100e2940f046819af80d100d2940f041819af80c100c2940f03c819af80b100b2940f037819af80a100a2940f032819af80910092940f02d819af80810082940f028819af80710072940f023819af80610062940f01e819af80510052940f019819af80410042940f014819af80310032940f00f819af80210022940f00a819af80110012940f005819af80010002940f000811b9fb2eb0c044ff00001d8bf0c46db1bd8bf0b46d5f808e0ea681d46e919189fa444aeeb0403a7eb0c070694bb42b8bf1f46199b521b0b91591a8a42b8bf1146012f0c910797c0f2e5820c990129c0f2e1820ef101014c08069900eb6c000a9048100990042020ea81000590079801310138cde903014810029004fb05f000f102094ff0000acde9005c089407e000bf0c980af1010a8245a14400f0bb821c980e9b01680aeb050000fb04120b980a9f504400fb03705feacc7303d1099fdde9063810e0099b2e46d35c059d0778eb4007f0f00703f00f033b4400f8013b049bdde902783546d619da074fea580b0d9208d131465a466446f1f7eafda446089c68e000bfb8f1020f64d3abf10102032a04d200211bf0030e35d15be06ff0030202ea58034f44b646c3f1000c3944471c8e18f578b478c5f3031545ea0415bc18e5703579f378c5f3031545ea0313237173793579c3f3031343ea05136371b3797679c3f30313043243ea06130ceb02060436a371dcd1dde9005c089c111d76461bf0030e26d04b1cf75c3246765cc7f30317ddf804c047ea06171646bef1010f475417d08f1cd65dd55cc6f3031646ea0516009dddf804c0bef1020fc654164608d03144c978f25dc1f3031141ea0211c15500bf5feac8713ff45aaf0d9a16f80b10002a4ff0000208bf042210f80b30d14003f00f0242ea011100f80b1047e7874200f095810026a1e16d68002d00f0018200244ff000090ae000bfdde90c14d8f804500c44ddf874a0ac4280f0f281ddf870800d94d8f800100f5d3e0903d001210c910ce000bf2e1b012e00f0e28121444d78002d00f0628102210c912e4617f00f011e9f1af801a0b7fa87f74fea571718bf012147ea010e1b9f4fea0a1b16f003014c4600f08980cde90a16d8f808100026b9fbf1f404fb119161449142a8bf012606ea0e06012e18d13c449c4215db189da94212da199dac420fda0e9d4e0804fb0504c907a75d6ff00f01554604bf0f215d4639401b9f2943a1550a990b9e012909f1010458d0d8f80810b4fbf1f606fb1141002461449142a8bf012404ea0e04012c18d1f4199c4215db189da94212da199dac420fda0e9d574604fb05044d08c907665d6ff00f0104bf0f215f46314039431b9f61550a990b9e022909f102042ad0d8f80810b4fbf1f505fb1141002461449142a8bf012404ea0e04012c19d1ec199c4216db189da94213da199dac4210da0e9d574604fb05044d08c907665d6ff00f0104bf0f215f4631400b9e39431b9f615509f10304711e0329b14405d23ae700bf0434a1453ff436afd8f808100026b4fbf1f505fb114161449142a8bf012606ea0e06012e1bd13d449d4218db189eb14215da199eb54212da0e9ed04605fb06054e08c907af5d6ff00f0104bf0f21d84639401b9f41ea0801ddf87080a955d8f80810661cb6fbf1f505fb1161002661449142a8bf012606ea0e06012e1cd13d449d4219db189eb14216da199eb54213da0e9e574605fb06054e08c90715f806806ff00f0104bf0f215f4601ea0801ddf8708039431b9fa955d8f80810a61cb6fbf1f505fb1161002661449142a8bf012606ea0e06012e1cd13d449d4219db189eb14216da199eb54213da0e9e574605fb06054e08c90715f806806ff00f0104bf0f215f4601ea0801ddf8708039431b9fa955d8f80810e61cb6fbf1f505fb1161002661449142a8bf012606ea0e06012e7ff466af3d449d42fff662af189eb142bff65eaf199eb542bff65aaf0e9e574605fb06054e08c90715f806806ff00f0104bf0f215f4601ea0801ddf8708039431b9fa95544e7042e78d38e78c97856ea012673d0042188e61b99002901dd012609e0b1fa81f149090027bcf1000fc8bf012707ea0106d5f808e0d5f80cb00bfb0ef9b9f1000f59d01e990024b1fa81f149094ff0ff380d91f1070c9107e000bf01340bfb0ef94c45a8f1010846d20c991c9e0029214618bf09eb0801b1fbfef536680ef1010705fb1e117f0805fb07664f08f65d042727ea8107fe4016f00f094f4618bf01270d9e3743012fd8d161449142d5db1b9f3d449d42d1db189fb942ceda199fbd42cbda0e9f1af8096005fb070e4d081ef80570c90707f00f0907f0f00747ea06071c9908bf49ea06170ef80570d1f808e0d1f80cb0b1e70fb0bde8f08f00bf002804bf4ff0ff3070472de9f04f99b01c461546cde90e01f7f7d6ff002800f01f82cde90c544ef66c6b4ff29c594ff62c4648f2a355ccf2ff0bc2f229094ff6ff7acff6ff7600270124c0f2450502e0bff32f8fa847d9f80080bff35f8fd9f80000bff35f8f01466ff39601b1f1005f03d10168594500f0cb804ff47570f8f71bff002800f0ec81314600bf4218463182f8d47382f8d57382f8d67382f8d77382f8d87382f8d97382f8da7382f8db7382f8dc7382f8dd7382f8de7382f8df7382f8e07382f8e17382f8e27382f8e37382f8e47382f8e57382f8e67382f8e77382f8e87382f8e97382f8ea7382f8eb7382f8ec7382f8ed7382f8ee7382f8ef7382f8f07382f8f17382f8f27382f8f37382f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f819747ff470afc0f800b08472a0f81ca0a0f81ea0a0f820a0a0f822a0a0f824a0a0f826a0a0f828a0a0f82aa0a0f82ca0a0f82ea0a0f830a0a0f832a0a0f834a0a0f836a0a0f838a0a0f83aa059e8001f41457ff42aafbff35f8f49e8000121b159e8001f4145f8d01fe7d0f86c21279e249d4ff0ff302ab30021b1eb552f21d152f82500002800f01881811a88074ff0ff3017d16ff4403340f60f070b44cff6fd77bb420ed3571857f8080ca84240f0048157f80cacaaf1011010f5803f04d24ff0ff3019b0bde8f08f57f8040c50454ff0ff30f6d1c1f540318a45f2d8002ff0d0baf1c10fedd33878012840f0e580b0060f2206f00f0102eae070484389225043c00a8df854000e2016f0200f08bf012001fb00f002fb00f04fead0208df855004ff00d0008bf022001fb00f002fb00f04fead0208df856004ff00c0008bf032001fb00f002fb00f04fead0208df857004ff00b0008bf042001fb00f002fb00f04fead0208df858004ff00a0008bf052001fb00f002fb00f04fead0208df859004ff0090008bf062001fb00f002fb00f04fead0208df85a004ff0080008bf072001fb00f002fb00f04fead0208df85b004ff0070008bf082001fb00f002fb00f04fead0208df85c004ff0060008bf092001fb00f002fb00f04fead0208df85d004ff0050008bf0a2001fb00f002fb00f04fead0208df85e004ff0040008bf0b2001fb00f002fb00f04fead0208df85f004ff0030008bf0c2001fb00f002fb00f04fead0208df860004ff0020008bf0d2001fb00f002fb00f04fead0208df861004ff0010008bf0e2001fb00f002fb00f04fead0204ff000038df8620008bf0f235943299d51430020c90a002d8df863103ff427af289cc6f30010a7f13f0810ae0b9001e0013d1cd014f8010b411e1f29f8d341b220290fdb08eb400118f81000497840ea0122c12a06d3384651463346fef74af80028e5d14ff0ff3019b0bde8f08f0d9c2698ddf894b0a042c8bf04462a980894dde9289406300790cde909a704e058440b38013c834653d019f8010b1f28f6d908eb400118f81000497840ea0122c12ad8d3384651463346fef71cf80028d1d00b980c9f069015a8cde90460ddf898a0229ddde90e010d9b239e3a46cde902ba00950196fff71cfadde91201bb4558445144d8bfbb46a8422a46b8bf0246b142a8bf31465a4517dd089b994214dd2a9b1b680f2b10d8089ea2eb0b02a1eb060c079901ebc307ba802a9a21f833b0591c7e80a7f806c01160dde909a710aea8e7002019b0bde8f08f2de9f04fd3b0dde95ce5dde9648cdde9629a0d9075b1dde96050dde95e47a94224eae47b27eae774a8bf29468242a8bf024602e000244ff0000b09eb0e0008eb00055845c8bf83468d420ceb0a07b8bf2946a24588bf54469742b8bf3a468b45b8bf944202db53b0bde8f08f669804f0010701974fea5b07033809970bf101070090580008974e080c90002701200df14c0e0df10c0c02948ce80e00cde90a6b06e000bf0798012700284ff00000dad0c00707906698069708bf0830ddf800906ff007086ff004044ff0000b4ff0000a0f9018bf09f10809cdf838900f994fea5a00085c102300f0f002cc46a14610901194cdf8488000bf1cf8041f0eeb08001cf8014c9cf8015042ea141704f00f041443447242ea111401f00f01847211430eeb0904217242ea15119cf802600772617205f00f011143a17242ea1611817306f00f01114308f10808083b09f10809c173d1d11098ddf83890000110224b465d4600bf13f8041f0eeb050713f8014c5e7840ea141804f00f0404437c7440ea111401f00f010143f97440ea161193f802c0397506f00f010143797540ea1c11b9750cf00f010143083a05f1080587f81080bc74f975d5d1ddf84880119c0af1020a08f120082034baf1100f0bf1200b84d101980699049a48400299059b00eb01090399dde90a6b9145bff65baf0d9803fb090807e000bf0c9809f1020991458044bff64faf0d98dc4609fb03045feacb700bd0099dddf820c0605d1ef8007000f0f00007f00f0738446055b6eb5c0f28d94fea5c0a04eb060b464616f80a0006eb0a041ef80050204600f8015b58451dd205781ef80570a51c5d45077017d228781ef800002870e51c5d4510d2287804361ef80000287006eb0a055d45ddd306e000bf04eb5c05c80705d1b4e7651cdde90a6bc807afd08c45adda28781ef8007000f00f0007f0f00738442870a3e72de9f04f8bb01d9d6c68072c00f286802cb12f89b94200f08180012c7bd100287cd0d0f86c61002e78d00027b7eb512f74d156f82170002f70d0a7eb060c5fea8c776bd16ff440370ceb070e40f60f07cff6fd77be4561d306eb0c0e5ef8086c8e425bd15ef80c6ca6f1011717f5803f54d35ef8047cb74250d1ccf54037be424cd8bef1000f49d0032e47d39ef80070022f43d19446aa69ddf86ca0dde91987dde917b9b2b14fead10801f00704da464ff0010b4f4612f808900bfa04f444ea090402f80840d346ddf86ca0b946dde919876c6805eb44021181721e1c9e01346c600996169e0ef101010396159e0a950296149ecde904b9cde900366346cde90687cdf820a0fbf713fb6968013969600bb0bde8f08f6f89b94204d14ff0ff300bb0bde8f08f022c3ff479afaf89b942f4d0032c3ff473afef89b942eed0042c3ff46daf2f8ab942e8d0052c3ff467af6f8ab942e2d0062c3ff461afaf8ab9427ff45dafdae700bf70b5049d8b42c8bf19469542b8bf2a46914205dadde905e3bef1000f01d103b170bdbef10f0c18bf9c46cb070ed04b10c45cbcf1000f03d004f00f05ae4504d904f0f00444ea0e04c45401314c1000eb61035510bcf1000f00eb620049d0ac425fda00bf1c78764604f00f05beeb141f38bf2609754598bf754645ea06141d4605f8014b854265d25c78764604f00f05beeb141f38bf2609754598bf75469c1c45ea061584425d7040d29c78764604f00f05beeb141f38bf2609754598bf7546dc1c45ea061584429d702fd2dc78764604f00f05beeb141f38bf2609754598bf754645ea06151c1ddd7084422346b9d31ce0ac4219da4eea0e1500bf1c4604f8015b844226d29c1c84425d700ed2dc1c84429d700ad21c1ddd7084422346edd304e01c46d00704d17ae71c46d0073ff477af9142bff674af2078bcf1000f03d0beeb101f98bf70bd00f00f0040ea0e10207070bd5c1cd007ebd161e72de9f04f81b04ef66c6b4ff29c554ff62c4848f2a35accf2ff0bc2f229054ff6ff76cff6ff7800274ff00109c0f2450a03e000bfbff32f8fd0472c68bff35f8f2868bff35f8f01466ff39601b1f1005f03d10168594500f0bd804ff47570f8f7cff9002800f02e81414600bf4218463182f8d47382f8d57382f8d67382f8d77382f8d87382f8d97382f8da7382f8db7382f8dc7382f8dd7382f8de7382f8df7382f8e07382f8e17382f8e27382f8e37382f8e47382f8e57382f8e67382f8e77382f8e87382f8e97382f8ea7382f8eb7382f8ec7382f8ed7382f8ee7382f8ef7382f8f07382f8f17382f8f27382f8f37382f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f819747ff470afc0f800b080f80a908683c683068446848684c684068546858685c685068646868686c6860687468755e8001fa1427ff43bafbff35f8f00bf45e8000121b155e8001fa142f8d02fe7d0f87812002974d104464ff41630f5f7b1fe014600284ff0000069d0002200bf8b1888544032b2f5163f58709870d870187158719871d871187258729872d872187358739873d873187458749874d874187558759875d875187658769876d876187758779877d87783f8200083f8210083f8220083f8230083f8240083f8250083f8260083f8270083f8280083f8290083f82a0083f82b0083f82c0083f82d0083f82e0083f82f0083f8300083f8310083f8320083f8330083f8340083f8350083f8360083f8370083f8380083f8390083f83a0083f83b0083f83c0083f83d0083f83e0083f83f009ad1c4f8781200e00021084601b0bde8f08f00bf70b5044690f8800384f8810350b3d4f8700347f64c6642f66535c2f20706c0f2440520b131682d31c4f8781310e040f22f00c0f200007844002122460023a847c4f87003316801f12d01c4f8781330b105f1e8022d219047002808bf70bd002084f8810370bd00bf2de9f047a4b0d0f87442bff35f8fa4b142f691760546c0f2440620460021b04770b1d5f8700340b142f64d42c0f244022d2124b0bde8f047104724b0bde8f08747f64c69c2f20709d9f8007095f8810300283fd0f7f7c0f8e0b3d5f87813781a17d495f8640110b995f80403e0b395f8800385f8810380b3d5f8700342f64d48c0f2440878b1d9f800102d31c5f878131de0d5f8700300b342f64d42c91bc0f24402904719e04ff64b70cff6ff70a8f1e807784400212a460023b847c5f87003d9f8001001f12d01c5f8781310b12d21c04710b1002085f8810306f16601204624b0bde8f04708474af21f37c0f2470700200290adf80c00b84795f8640110b995f8040318b12846fff746ffe5e70df104084046f5f7d6fa02a9284600224ff0000afaf71ffe81464046f5f713fcb9f1000f02d085f881a303e00146284600f009f89df80c000028c7d107f14c008047c3e700bf2de9f04f90f8b13300f5617c4cf82310591c41f69a134b4390f8b0b31b0c03eb8303a1eb4301bbf1090f80f8b1139cbf0bf1010b80f8b0b3bbf1040f0bf0030e05d200244ff000094ff0000a2ee00bf0fc0800244ff000094ff0000a00eb8406d6f88473d6f88853b7fbfbf3d6f88c1303eb090203fb1b73b5fbfbf7d6f8906307fb1b5553443a44b1fbfbf72b44b6fbfbf53a4407fb1b1105eb020905fb1b6219440434a04502eb010ad7d1bef1000f1dd05cf82450bef1010fb5fbfbf606fb1b55b144aa4412d00ceb84056e68bef1020fb6fbfbf404fb1b66a144b24406d0ae68b6fbfbf505fb1b66a944b244bafbfbf202eb0901c0f8ac13bde8f08f00bff0b500294ff6ff7e00f0af80012903d10022c90775d1a8e021f00102c2f1000c6ff0010241f221038418a578e7788eea05252cb26e0036b203ead43484ea450503ead6366c0086ea450624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead53585ea460686ea07273eb27d002db203ead63686ea470703ead5357e0085ea470736b27d002db203ead63686ea470703ead5357e0085ea470736b27d002db203ead63686ea470703ead5357e0085ea470736b27d002db203ead636023286ea470703ead5360ceb0205023586ea470e95d10232c90733d0805c41f221038eea002001b2420012b203ead13181ea400003ead232410082ea400009b2420012b203ead13181ea400003ead232410082ea400009b2420012b203ead13181ea400003ead232410082ea400009b2420012b203ead13181ea400003ead23181ea400e1ffa8ef0f0bd2de9f04fcbb00646c07c8b468df80600b08954998df80700000a8df808008df80a10080af1898df80b00080a17468df80d000020012b8df805308df809b08df80c108df80e008df80f008df810008df811008df812008df813008df814008df815008df816008df817008df818008df819008df81a008df81b008df81c008df81d008df81e008df81f008df820008df821008df822004cd1307e96f81780a0f1090144f62510c2f29240a1fb0002891a02eb510100970df10500b8eb910f88bf4fea9108c8ebc80706f11a0400f1010a00f10509093021463a46f0f711fa06f1210506f1280029460722f0f709fa284621460722f0f704fa20465146032207f10905f0f7fdf906f11d0049460422f0f7f7f9f07d02289cbf0130f075009fbb450cd0b8f1240f13d94ff0ff304bb0bde8f08fbb454ff00905f07509d14ef60b67abb20df10502c0f247070120f02115e002200df12304aab28df82300a01c0df105018df82470f0f7cbf9a81c4af6610782b2c0f24607f02021460023b8474bb0bde8f08f2de9f04184b0044690f84d0000284ff0000000f09a8094f84f1042f28b0701f078018df8071094f85010c0f25b0701f007018df80610cde9020002a906200022b847054670b9002002adcde902000df1070128460122f0f791f9012029460122b847054694f84e00a8b1002602a906200022cde90266b84760b9cde9026602ae04f1540130460122f0f778f9572031460122b8470543002602a906200022cde90266b84768b90df108080df1060140460122cde90266f0f761f9312041460122b847054302a906200022cde90266b84768b9002002ae04f15301cde9020030460122f0f74bf9462031460122b8470543002602a906200022cde90266b84768b90df1080804f1510140460222cde90266f0f734f9362041460222b847054302a9a3200022cde90266b847054302a997200022cde90266b84742f62b310543c0f2440102208847284615b104b0bde8f081002184f84e1084f84d10a16504b0bde8f08100bf2de9f04f8bb00190233002254ff000080df10c0a4ff001094ff0000b002402900be000bf09fa0bf0002f0bf1010b08bf0443bbf1070f354426d041f66320c0f20000784410f80b0041f65d21c0f20001794411f80b6042f2fb0351463246c0f25b03cde90988cde90788cde90588cde90388984707460028d4d10298514628443246f0f7c9f8cde742f2fb00c0f25b004ff60073002600f1340703a9c0f21f0381200c22cde90966cde90766cde90566cde90366b84730b9029803a928440c22f0f7aaf88026ddf804c040f6b80146ea0400220ac2f200018cf823008cf824200a68002a00f0ad8045f2fd774ff6ff766ff0020241f22103c0f202070d681544ed7886ea052635b203ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea46060d6824b2154403ead4342d7984ea460686ea052635b203ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea46060d6824b2154403ead4346d7984ea460686ea052635b2740024b203ead53585ea460603ead434750084ea46062db2740024b203ead53585ea460603ead434750084ea46062db2740024b203ead53585ea460603ead434750084ea46062db2740024b203ead53585ea460603ead4350332ba4285ea46067ff460afb1b2090a01e0ff26ff218cf83e109cf84c109cf84d208cf83f1026218cf83d608cf84020ff288cf84b101cbf04208cf81c000bb0bde8f08f70b588b042f2fb0514460e46c0f25b05002181280791cde90511cde90311cde90111009107d11b023435694681202246a84720b905e069462246a84708b108b070bd6946054630462246eff7abff284608b070bd2de9f0478cb08579972d17d00446fe2d0fd0fd2d2ad142f69570c0f25b008047002084f84e0084f84d00a0650cb0bde8f08720460cb0bde8f047cbe50020cde9040042f2fb00c0f25b00a0f1700304a9972000229847044642f62b31c0f244010220884720460cb0bde8f08742f2fb08002094f80c90677bc0f25b08cde90a00cde90800cde90600cde9040004a99f200422c047064620b901a804a90422eff757ff002e6ff00100ddd19df80410bd29d9d19df805104029d5d19df806101029d1d194f84d00002852d047f64c60c2f20700006843f698210844a065002604a937200222cde90a66cde90866cde90666cde90466c047002840f0898002a804a90222eff725ff04a947200122cde90a66cde90866cde90666cde90466c047002875d10df1030004a90122eff711ff0020cde90a00cde90800cde90600cde9040004a905200122c047002860d10df1020004a9012249ea0726eff7fafe352d5bdc002d00f08180012d70d19df8020082e0002604a9052001228df80e60adf80c600296cde90a66cde90866cde90666cde90466c047d8bb0df1080a04a950460122eff7d6fe04a935200122cde90a66cde90866cde90666cde90466c04738bb0af1010004a90122eff7c3fe002604a937200222cde90a66cde90866cde90666cde90466c04798b90af1020004a90222eff7affe04a947200122cde90a66cde90866cde90666cde904660126c04778b14ff0ff300cb0bde8f087362d6ed0572d15d194f84e00002800f08580572039e00af1040004a90122eff78bfe04f14f0051460722eff785fe84f84d603ee700208df801006946284601228df8009000f04ef9312d044627d036e09df80200002e00f0380618bf4036704010f0380f10d09df808009df8091041f25a530e22c0f2000302ea96027b449a5a41ea0020904239d8012000218df80110694601228df8006000f024f904460df103014620012200f01df9054602a93620022200f017f945ea040141ea00040025a8f1700604a9a3200022cde90455b047044304a997200022cde90455b0470443aee69df802000e2101ea900041f2e241c0f200017944085a864204d96ff001000cb0bde8f0876946362002228df800708df8019000f0e6f80446d0e70020cde90a00cde90800cde90600cde9040004a9592001220125c04700287ff45caf04f1540004a90122eff7f7fd84f84e5060e740f6b800c2f200000168002904bf4ff0ff30704780b584b000684ef2173102904ff41630039002a8c0f2470188474ff4f07042f29f7e01904ff4207cc0f25b0e0020002100220023cdf800c0f04704b080bd00bf2de9f04340f6b801c2f2000109684ff0000e01f1020c4cf6cd4340f2762808e00ef1010ebef5f07f0cf5a07c08bfbde8f083aef1a0096ff00906644607e000bf07eb0711a170053445452e46e8d290f84c1006f10a054f1e112905fb03f208bf570d122908d1a6f1e6019f294ff000079cbfb9f19f0f077b07eb071104f8021c90f84c1006f10c024f1e112903fb02f208bf570d122908d1a6f1e4019f294ff000079cbfb9f19f0f077b07eb071104f8011c90f84c1006f10e024f1e112903fb02f208bf570d122908d1a6f1e2019f294ff000079cbfb9f19f0f077b07eb0711217090f84c1006f110024f1e112903fb02f208bf570d122908d1a6f1e0019f294ff000079cbfb9f19f0f077b07eb0711617090f84c1006f112024f1e112903fb02f208bf570d12298ad1a6f1de019f294ff000079cbfb9f19f0f077b80e700bf2de9f04383b042f28b0914460e460546c0f25b090027694606200022cde90077c84710b103b0bde8f083e846404631462246cde90077eff70dfd284641462246c84703b0bde8f08370b50446d0f83c010d4638b92046f6f7e5f90028c4f83c0108bf70bd42f64d46c0f2440606f140018847d4f83c0129463246bde8704010472de9f04f81b0934612788ab1022300bf0beb030717f8012c62b11bf8032062b17a784ab1ba780433002af1d1023b04e0002205e0013b00e0013303eb4302520042eae272931c02f1010c01eb810203f0030e23f0030a00eb8213a3f5a0784ff0ff3906e009f10109b9f10d0f08f5a0786bd009eb010202eb8202bcf1030f00eb821605d24ff0ff34bef1000f2ed1e9e70024474604e000bfa24507f1020721d0621cd209042a03d83a7802f0f0023a70a21cd209042a03d87a7802f00f027a70e21cd209042a03d87a7802f0f0027a700434e209042adfd86208b55c05f00f05b554d9e7013cbef1000fbbd0a21cd509042d08d85208b55ce7076ff00f0708bf0f273d40b554bef1010fabd0e21cd509042d09d85208b55ce7074ff00f0708bf6ff00f073d40b554bef1020f9ad0221dd509042d96d85208e407b55c6ff00f0408bf0f242c40b4548ce79bf80010cdf800b0002900f0ce80022041f2410a41f2420b41f2430808e0009a063012f8011f03330029009200f0bd80a1f17f0717f15f0ff1d340f65d42c0f2000201eb41017a4402eb81014ff20014a1f5c079cff6ff7402e014f52074ded0494619f9027bc509042d09d8b7f1ff3f06dc1a1992f8016f46f0f00682f8016f5ffa87fe5fea4e6208d5042d06d81a1992f8017f47f00f0782f8017f5fea8e620ad540f27d22904206d81a1992f8027f47f0f00782f8027f5feace6209d5b0f51f7f06d81a1992f8027f47f00f0782f8027f5fea0e724fea900c09d5bcf19e0f06d81a1992f8036f46f0f00682f8036f5fea4e720ad540f27a22904206d81a1992f8037f47f00f0782f8037f91f90110042d09d8b1f1ff3f06dc1a1912f80a7047f0f00702f80a70c9b24a0608d5042d06d81a1912f80a7047f00f0702f80a708a060ad540f27d22904206d81a1912f80b7047f0f00702f80b70ca0609d5b0f51f7f06d81a1912f80b7047f00f0702f80b700a0709d5bcf19e0f06d81a1912f8087047f0f00702f8087049077ff565af40f27a2188423ff660af191911f8082042f00f0201f8082057e701b0bde8f08f00bf2de9f04f81b0134681464a1c00f08f808e0a4ff0000b19f80b20002a00f0888109eb0b077a78002a00f00a81ba78002a00f00981fa78002a00f008813a79002a00f007817a79002a00f00681ba79002a00f00581fa79002a00f004813a7a002a00f003817a7a002a00f00281ba7a002a00f00181fa7a002a00f000813a7b002a00f0ff807a7b002a00f0fe80ba7b002a00f0fd80fa7b002a00f0fc803a7c002a00f0fb807a7c002a00f0fa80ba7c002a00f0fb80fa7c002a00f0fc803a7d002a00f0fd807a7d002a00f0fe80ba7d002a00f0ff80fa7d002a00f000813a7e002a00f001817a7e002a00f00281ba7e002a00f00381fa7e002a00f004813a7f002a00f005817a7f002a00f00681ba7f002a00f00781fa7f002a00f008810bf1200bbbf1600f7ff477af4ff0600b00e1002119f80120002a00f0af8109eb01056a78002a00f0b080aa78002a00f0b180ea78002a00f0b2802a79002a00f0b3806a79002a00f0b480aa79002a00f0b580ea79002a00f0b6802a7a002a00f0b7806a7a002a00f0b880aa7a002a00f0b980ea7a002a00f0ba802a7b002a00f0bb806a7b002a00f0bc80aa7b002a00f0bd80ea7b002a00f050812a7c002a00f04e816a7c002a00f04c81aa7c002a00f04a81ea7c002a00f048812a7d002a00f046816a7d002a00f04481aa7d002a00f04281ea7d002a00f040812a7e002a00f03e816a7e002a00f03c81aa7e002a00f03a81ea7e002a00f038812a7f002a00f036816a7f002a00f03481aa7f002a00f03281ea7f002a00f03081203160297ff479af32e10bf1010b74e00bf1020b71e00bf1030b6ee00bf1040b6be00bf1050b68e00bf1060b65e00bf1070b62e00bf1080b5fe00bf1090b5ce00bf10a0b59e00bf10b0b56e00bf10c0b53e00bf10d0b50e00bf10e0b4de00bf10f0b4ae00bf1100b47e00bf1110b44e00131f6e00bf1120b3fe00231f1e00bf1130b3ae00331ece00bf1140b35e00431e7e00bf1150b30e00531e2e00bf1160b2be00631dde00bf1170b26e00731d8e00bf1180b21e00831d3e00bf1190b1ce00931cee00bf11a0b17e00a31c9e00bf11b0b12e00b31c4e00bf11c0b0de00c31bfe00bf11d0b08e00d31bae00bf11e0b03e00e31b5e00bf11f0bb1f5205f4ff0010100931fd364234ff47a7442f2107700bf01eb81025200b6fbf2f50a2d11d301fb03f2b6fbf2f50a2d0bd301fb04f2b6fbf2f50a2d05d37943b6fbf1f2092ae7d800e011465846bbf15f0f98bf5f20c0f1000c1ceb0b0a53d0b6fbf1f74cf6cd4207f13003ccf6cc4209f80b300a29a1fb023547d31af1010342d007fb11674fead508b7fbf8fe48f21f520ef1300309eb0b06c5f2eb1273706429a1fb023434d31af102032cd00efb18776409b7fbf4f544f6d35205f13003c1f26202b370b1f57a7fa1fb022323d31af1030218d005fb14729b0941f25975b2fbf3f7cdf2b715a1fb055407f13005f57007fb132642f210720bf1040b91424fea5431a9d209e0834607e00bf1010b04e00bf1020b01e00bf1030b0020009b09f80b002de00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2904d849444ff03f020a7003d1002189f85f1001e000204870002119f80100002800f0a18009eb0105687800285ed0a87800285dd0e87800285cd0287900285bd0687900285ad0a879002859d0e879002858d0287a002857d0687a002856d0a87a002855d0e87a002854d0287b002853d0687b002852d0a87b002851d0e87b002850d0287c00284fd0687c00284ed0a87c00284dd0e87c00284cd0287d00284bd0687d00284ad0a87d002849d0e87d002848d0287e002847d0687e002846d0a87e002845d0e87e002844d0287f002843d0687f002842d0a87f002841d0e87f002840d0203160297ff498af44e001313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2905d849444ff02f00087040f09580002089f85f00581c00f094809d0a4ff0000e19f80e00002800f08d8109eb0e067078002800f00f81b078002800f00e81f078002800f00d813079002800f00c817079002800f00b81b079002800f00a81f079002800f00981307a002800f00881707a002800f00781b07a002800f00681f07a002800f00581307b002800f00481707b002800f00381b07b002800f00281f07b002800f00181307c002800f00081707c002800f0ff80b07c002800f00081f07c002800f00181307d002800f00281707d002800f00381b07d002800f00481f07d002800f00581307e002800f00681707e002800f00781b07e002800f00881f07e002800f00981307f002800f00a81707f002800f00b81b07f002800f00c81f07f002800f00d810ef1200ebef1600f7ff477af4ff0600e05e100204870581c7ff46caf002119f80100002800f0aa8109eb01025078002800f0b0809078002800f0b180d078002800f0b2801079002800f0b3805079002800f0b4809079002800f0b580d079002800f0b680107a002800f0b780507a002800f0b880907a002800f0b980d07a002800f0ba80107b002800f0bb80507b002800f0bc80907b002800f0bd80d07b002800f04b81107c002800f04981507c002800f04781907c002800f04581d07c002800f04381107d002800f04181507d002800f03f81907d002800f03d81d07d002800f03b81107e002800f03981507e002800f03781907e002800f03581d07e002800f03381107f002800f03181507f002800f02f81907f002800f02d81d07f002800f02b81203160297ff479af2de10ef1010e74e00ef1020e71e00ef1030e6ee00ef1040e6be00ef1050e68e00ef1060e65e00ef1070e62e00ef1080e5fe00ef1090e5ce00ef10a0e59e00ef10b0e56e00ef10c0e53e00ef10d0e50e00ef10e0e4de00ef10f0e4ae00ef1100e47e00ef1110e44e00131f1e00ef1120e3fe00231ece00ef1130e3ae00331e7e00ef1140e35e00431e2e00ef1150e30e00531dde00ef1160e2be00631d8e00ef1170e26e00731d3e00ef1180e21e00831cee00ef1190e1ce00931c9e00ef11a0e17e00a31c4e00ef11b0e12e00b31bfe00ef11c0e0de00c31bae00ef11d0e08e00d31b5e00ef11e0e03e00e31b0e00ef11f0e0122b3f5205f1ed364234ff47a7442f2107602eb82004100b5fbf1f00a2811d302fb03f1b5fbf1f00a280bd302fb04f1b5fbf1f00a2805d37243b5fbf2f00928e7d800e00a46f046bef15f0f98bf4ff05f08c8f1000c42f2107a1ceb0e074dd0b5fbf2f30a2a03f1300009f80e004cf6cd40ccf6cc40a2fb000641d3781c3dd003fb1253f608b3fbf6f409eb0e0504f13000687048f21f50c5f2eb10642aa2fb000130d3b81c29d004fb16334e09b3fbf6f4b2f57a7f04f13000a87044f6d350c1f26200a2fb000120d3f81c16d004fb1630890941f25974b0fbf1f3cdf2b714a2fb044603f13004ec7003fb11050ef1040e52454fea5632afd209e0c64607e00ef1010e04e00ef1020e01e00ef1030e002009f80e0001b0bde8f08f0f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2904d849444ff03f00087005d1002089f85f0001b0bde8f08f0020487001b0bde8f08f434d01ffff0000000000000052420100ff00000008031000000000000000000046616365636c61772f3335000000000000000000000000000000002020202020002020000000505050000000000000000000005050f85050f85050000000002070a8a07028a8702000000048a85010202854480000000020505020689090680000002020200000000000000000000010204040404020100000000040201010101020400000000000005020f82050000000000000002020f82020000000000000000000000020204000000000000000f800000000000000000000000000202000000000080810102020404000000000708898a8c88888700000000020602020202020700000000070888808102040f8000000007088083008088870000000000818284888f8080800000000f88080f00808887000000000708080f08888887000000000f808081010202020000000007088887088888870000000007088888878080870000000000000202000002020000000000000202000002020400000000008102040201008000000000000f80000f8000000000000004020100810204000000000708888102000202000000000708898a8a89880780000000070888888f888888800000000f08888f0888888f000000000708880808080887000000000e0908888888890e000000000f88080f0808080f800000000f88080f0808080800000000070888080b888887000000000888888f888888888000000007020202020202070000000003810101010909060000000008890a0c0c0a090880000000080808080808080f80000000088d8a8a888888888000000008888c8a89888888800000000708888888888887000000000f0888888f080808000000000708888888888a87008000000f0888888f0a0908800000000708880700808887000000000f8202020202020200000000088888888888888700000000088888850505020200000000088888888a8a8d88800000000888850202050888800000000888850502020202000000000f8081020408080f8000000007040404040404070000000004040202010100808000000007010101010101070000000205088000000000000000000000000000000000000f80040200000000000000000000000000000700878888878000000008080f088888888f00000000000007088808088700000000008087888888888780000000000007088f8808078000000001820702020202020000000000000788888888878087000008080f08888888888000000202000602020202070000000080800180808080808483000004040485060605048000000006020202020202070000000000000f0a8a8a8a8a8000000000000f08888888888000000000000708888888870000000000000f088888888f0808000000000788888888878080800000000b8c0808080800000000000007880700808f00000000020207020202020180000000000008888888888780000000000008888505020200000000000008888a8a8a870000000000000885020205088000000000000888888888878087000000000f810204080f800000000182020402020201800000000202020202020202000000000601010081010106000000048a89000000000000000009f0535593747c181040101010201020c005353a829c51bd314a810260d5b0bfe090000", + "new": "b0b581ea00039b0701d0034637e0c2b110f0030315d000f1010ca2f1010e0023cc5c9e45c45403f1010404d0634413f003032346f4d121440319121b102a14d302e00346102a10d3d1f800c0d1f804e0cc688d68103adc609d60c3f804e043f810cb0f2a01f11001eed8042a07d300bf51f8045b043a032a43f8045bf8d8002a08bfb0bd0139013b11f8015f013a03f8015ff9d1b0bd00bf884218bf002a00d1704710b50b1a38bf431a934207d288420ad281ea00039b0726d0034669e0fff79fffbde81040704781ea000300eb020c9b0701eb020e42d15fea8c732bd0a0f1010c00bf8b1813f801ec8418531e04f801ec04d0624412f003021a46f2d101eb030e00eb030c17e0830736d0a2f1010c00f1010e002300bfcc5c9c45c45403f1010404d0734413f003032346f4d1121b2144031922e01346042b0ed3aef10402acf1040152f80449043b032b41f80449f8d802f1040e01f1040c1a4653b1aef10101acf1010300bf11f80149013a03f80149f9d1bde8104070470346042a06d351f8044b043a032a43f8044bf8d8002af0d00139013b00bf11f8014f013a03f8014ff9d1e6e700bf80b5002a18bf10f0030301d186460ce000f1010c864600bf013a0ef8011b04d01cf003030cf1010cf6d1102a11d35ffa81fc4ff001330cfb03fc00bf103acef80cc0cef808c0cef804c04ef810cb0f2af4d8042a0bd35ffa81fc4ff001330cfb03fc00bf043a032a4ef804cbfad8002a08bf80bdaef10103013a03f8011ffbd180bd00bf2de9f04fc7b04ff29c5bc2f2290b4ff6ff754ff47d7400274ff0010847f67f7a7f261191cde90f3007e000bf48f2a351c0f24501bff32f8f8847dbf80090bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14068b0f57d7f00f096804ff47d7006f0c8fc002800f0c8814ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff010160446080f80e80a0f8c4a180f8c361058445848584c584058545858585c585058645868586c586058745878587c5875be8001f49457ff452afbff35f8f4be8000121b15be8001f4945f8d047e74ff47d7800274ff0010a47f67f797f2607e000bf48f2a351c0f24501bff32f8f8847dbf80040bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f098804ff47d7006f006fc002800f006814ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff010160c0f8048080f80ea0a0f8c49180f8c361058445848584c584058545858585c585058645868586c586058745878587c5875be8001fa1427ff451afbff35f8f00bf4be8000121b15be8001fa142f8d045e7d0f8944242f6f76ac0f2440a002cbff35f8f4bd00af19a0220464ff0ff314ff0ff379047002840f09081119800285fd010980778a7f11700022859d811980c2840f07d81109b58789978084300f07781d8780138022800f272819a79d9795e7a42ea0122197a187942ea014242ea06619a7ade7a93f805c0192f42ea062200f0c981172f40f0df81002a40f05881fe2800f03e86812800f03086002840f045865cea010040f04b8100f092be04460020d047d0b104f5257151e8004f5cb9bff35f8f00bf41e80002002a00f0e38051e8004f002cf6d00021bff32f8f0029bff35f8f00f0d380044694e74ff0ff372ce147f6df40c0f24f000e94804700274ff47d784ff0010947f67f744ff07f0a1397adf8507007e000bf48f2a351c0f24501bff32f8f8847dbf80060bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f09f804ff47d7006f0c0fa002800f097804ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff010160c0f8048080f80e90a0f8c44180f8c3a1058445848584c584058545858585c585058645868586c586058745878587c5875be8001fb1427ff451afbff35f8f00bf4be8000159b15be8001fb142f8d045e70af5a9718847bfe6012121e70020109f42f6f76ac0f2440a9fb1119989b1397801f07f02b2f10b0418bf0124b2f11c0618bf01268a2928dc0b292ad01c2928d041e00f9012a803f037ff4ff0ff374ff001080e9c9df85100002812a818bf4ff0ff3704f04ff8b8f1000f054608d19df8500028b94af21f30c0f247004c3080470f98002818bf056115e09c2901d08b2919d168b14af21f31c0f247010746884797f8681121b997f824133846109f51b10e9c4ff0ff370af5807120468847384647b0bde8f08f0f9012a804ea060803f0f3fe387800f07f041e2c05d11199384607f048fe0746b4e71d2c00f07e0018bf1a2819d1dbf800100322cff680720a40b2f1005fbff35f8f12d10a684ef66c63ccf2ff039a420bd14a68b2f57d7f04bf002281f8a12303e0a4f115010129e1d90f2c12dc092c00f31781052c00f0c982072c40f0c183cdf8348000274ff0010947f67f764ff07f0852e0142c00f3ea81102c00f08083112c40f0ae8311980e9c022806d13878112803d17878002800f09a864ff0ff3765e7bcf1000f4ff0ff3708bf00298fd11328bff48daf102a4ff0000138bf01211228b2fa82f218bf510901297ff480af00f0c5bc182f4ff0ff3708bfbcf1000f7ff476af00297ff473af352800f34284002800f09c84012800f0a884312840f09a84082abff464af00f0a9bc48f2a351c0f24501bff32f8f8847dbf80040bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f000864ff47d7006f00df9002800f0f8854ff60c41cff6ff7142182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff0101604ff47d71416080f80e90a0f8c46180f8c381058445848584c584058545858585c585058645868586c586058745878587c5875be8001fa1427ff451afbff35f8f4be80001002900f06c855be8001fa142f6d044e70a2c00f083820b2c40f0aa82dbf800500320cff68070bff35f8f28400e9cb0f1005f40f08a8528684ef66c61ccf2ff01884240f0828568680027b0f57d7f7ff455aed5f8900342f68d46c0f244060028a5f8a07318bfb0470021a5f8d013c5f8cc13c5f86c1185f86a1185f86811d5f87001c5f8641185f86911c5f87011c5f82013a5f88c1320b148f2a351c0f245018847d5f89802002818bf03f0ddff0024c5f89842d5f8880320b148f2a351c0f245018847c5f88843a5f88c43686ca5f8484040b1b047686c06f166018847002804bf002068644bf63940c0f251008047dbf800400320cff680702040b0f1005fbff35f8f48d120684ef66c61ccf2ff01884241d16068b0f57d7f3dd194f87b01c1464ff00008c4f8848100b384f87b8194f8750149f259620138b0fa80f04109c0f2590240f20b1090474ef6e37710f1800fd8bf6ff07f00c0f25a077e28a8bf7e2084f8c401b84707f1bc008047d4f8880142f6f76a84f87481c0f2440ac84650b1b047d4f8880106f166018847002804bf0020c4f88801dbf800000321cff680710140b1f1005fbff35f8f40f0358701684ef66c62ccf2ff02914240f02d874168b1f57d7f40f0288790f8cc11002900f01d8706f0a2fb00f01fbf152c00f0bf81162c40f0c481119801380228c0f084827878b9780e9c40ea0120b0f5007f4ff0ff373ff67aad0321119a01eb400191427ff473ad002700288df8dc708df8dd708df8de708df8df708df8e0708df8e1708df8e2708df8e3708df8e4708df8e5708df8e6708df8e7708df8e8708df8e9708df8ea708df8eb708df8ec708df8ed708df8ee708df8ef708df8f0708df8f1708df8f2708df8f3708df8f4708df8f5708df8f6708df8f7708df8f8708df8f9708df8fa708df8fb708df8fc708df8fd708df8fe708df8ff708df800718df801718df802718df803718df804718df805718df806718df807718df808718df809718df80a718df80b718df80c718df80d718df80e718df80f718df810718df811718df812718df813718df814718df815718df816718df817718df818718df819718df81a718df81b713ff4efac109937aa03314ff0010c4b78012b3ff67dad0f7847ea0323db08d65c07f007070cfa07f737427ff471add65c013847ea060701f10201d754e7d1cdf8348004f078ff002800f081854ff47d7800244ff0010a47f67f797f2600f045bc1198cdf834804ff47d7800244ff0010a47f67f797f2602282cbf7878ff200c9006e048f2a351c0f24501bff32f8f8847dbf80070bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f0d2804ff47d7005f08cfe002800f06c834ff60c41cff6ff7142182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ef66c61ccf2ff010160c0f8048080f80ea0a0f8c49180f8c361058445848584c584058545858585c585058645868586c586058745878587c5875be8001fb9427ff452afbff35f8f4be8000100293fd05be8001fb942f7d046e71199384606f015fb0746fff7efbb11980228c0f0eb8000f0f6fd002800f0e6807c78002c00f0b482022c00f2df8040f03e85014611984646062880f07e8442f6f76a0e9c4ff0ff37c0f2440ab046fff7cebb1199781c013907f0affa0746fff7c5bb1d2c51d11199781c013907f093ff0746fff7bbbb90f8481042f6f76a0e9c109ddde90c68c0f2440a69b1416c41b142f68d42c0f2440204460846904720460e9c002180f848100121119a032a0dd366b9a878082800f2c1824bf63941c0f25101963188470027fff791bb119a052ac0f0e280012e40f0df80a8780027411e06293ff684abe97803293ff680ab2a79002a3ff47cab4bf63943c0f2510303f59a7398470027fff772bb1a2818bf1c2c6cd104f016fe002868d000f074fd814608f02ffab9f1000f4ff0ff3718bf00283ff45cab834647f63400c2f20700d0f81806d9f894131b2ca0eb0100c9f89c0300f061841a2c40f08284109900254f1c11994ff4f0724e1e4ff4a071cde93d5037a84ff420744ff4805acde90950cde901214846394632465b46cde937a53f95cde90755cde90555cde90355009408f030fd002840f05884d9f89c033946cde93e0537a80a90012009904ff4a07002904ff4f0700190484632465b464ff42077cde937a53d95cde90755cde90555cde90355009708f00dfd00f04dbc4ff0ff37fff7fcba362872d046286dd057285ad1002e7ff425ab6ae0bcf10c0f4ff0ff377ff41eabb1f5005f61d3fff719bbacf101001f284ff0ff373ff612abccf51630814254d9fff70cbb00297ff407ab421f18bf0122b0f1350318bf01231a40b0f1590318bf01231a40b0f1470318bf0123134208bfbcf1010f39d0b0f1370218bf0122b0f1c10318bf01231a4208bfbcf1020f2cd09f284ff0ff377ff4e1aabcf1040f24d0fff7dcba022e40f03f814bf63940c0f2510080470027fff7a0ba022abff4ceaa13e0002a7ff4caaaa0f1fd0102290cd397287ff4c3aa08e06ff0780002427ff4bdaa02e0402abff4b9aa45f64d50c0f24600804710990128c9784ff0010008bf022008424ff000073ff4a8aa0e944ff47d7847f67f797f2406e048f2a351c0f24501bff32f8f8847dbf80060bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f096804ff47d7005f04cfc00283ff475aa4ff60c41cff6ff7142182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff0101600121c0f804808173a0f8c49180f8c341058445848584c584058545858585c585058645868586c586058745878587c5875be8001fb1427ff452afbff35f8f4be8000121b15be8001fb142f8d047e74af21f35c0f247050446a84794f86801109f00287ff4daa994f82403214600287ff4d4a93878172812d0d1f8840320b904f0bcf9c4f8840360b342f68d41c0f24401a1f140024ff47a719047214608bb01f226300e4639460c22fef771fd0f98002186f825030120bff35f8f86f824034ff4f07001904ff4207005f5106600900020002200230027b047002800f0138284f8247305f14c008047fff797b9119a072ac0f09b81032e40f09881a878ea78297940ea02206c79ad7901284ff0010698bf304644f62062904228bf10464bf63942c0f2510202f5e272642928bf6421904747f63400c2f207000068002800f0348344ea0521012988bf0e4642f68d41c0f24401a1f14002314690470027fff72eb9002780f8477145f64d50c0f2460080470e9c01287ff423a943f2a310c0f2560080470746fff71bb942f6f76a0e9c109ddde90c6800210020c0f2440a6de500201199dde90d84022910992cbf4978ff2160b302294ff000072fd0012929d000297ff4fda84cf67e21caf2101187778783cbf8041087818760058445848584c584058545858585c585058645868586c586058745878587c58780f8407080f8d17380f8d073c0f8cc73fff7d9b80027fff7d6b801218173fff7d2b88773fff7cfb845f64d50c0f24600804701284ff000077ff4c5a840f20830c0f210003790ff208df8d80044f25220c0f20100359040f2c960c0f24800cde93877804798b148f27e30c2f2070000880122c1b264298df8d72008d80721b0f5807f38bf03218df8d7108df8d80040f2d260adf8e000052037ae8df8e200f01d35a90522fef777fc4ff22507c0f247070120092132460c23b8470746fff783b848f2a351c0f24501bff32f8f8847dbf80070bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f0de804ff47d7005f05ffa002800f010814ff60c41cff6ff7142182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ef66c61ccf2ff010160c0f8048080f80ea0a0f8c49180f8c361058445848584c584058545858585c585058645868586c586058745878587c5875be8001fb9427ff452afbff35f8f4be8000100294bd05be8001fb942f7d046e7c146804611980027032838d3301fb0fa80f04009084032d01198109a4cf6cd410338ccf6cc419578a0fb0101b5eb910f88bf8d082e46302d28bf302608f14a00d11c06eb8602fef78dfb002788f8486088f849709db1d8f8440038b9404600f0c1fa0028c8f8440000f0968142f68d41c0f24401a1f1400201219047002742f6f76a0e9cc0f2440ac846fef783bfd0f870110027002900f089804ff400624ff0ff3c0df1dc0e04e033681a44b2f5403f29d28e18b568b7eb552ff5d1ec081ef8044005f0070324fa03f3db071ebf41f82570c6f808c0f760e6e70e9cfef78bbf109fb878fa783b797f7940ea022043ea072232283790389280f09a803220a2e04ff0ff3752e04ff0000c4ff400634ff0000ec0f820c305e077463344b3f5403fbe4642d2cf18ba68ce580132f4d1f418220c022a2fd80a19956801352bd115682e443e6012681444220c022a23d80a19956801351fd115682e443e6012681444220c022a17d80a199568013513d115682e443e6012681444220c022a0bd80a199568013507d115682e443e6012681444b4f5403fcfd3bef1000fc7f804c00cbfc0f82033cef80430b7e7002742f6f76adde90d84c0f2440afef7ecbe1198032840f0e48010994ff4f077487889785a4640ea012600200890cde90600cde90400cde902004ff4a0700190484631464ff42073009707f0dcfe002800f0c3804ff0ff37c3e01198012840f0c08009f57970bff35f8f50e8001f013140e80012002af8d113a94846012207f0fcfe0746ade042f6f76ab0f5fa6f0846c0f2440ab04608d94ff4fa6042f6f76a37900846c0f2440ab0460121054680f8471145f64d50c0f246008047012840f0898043f2a316c0f25606a6f188008047022c074608bf002f01d05fb980e04bf2110237a9c0f24b0202209047002877d00746b047002085f8470172e090f8cd11002918bf05f081fcdbf800000321cff680710140b1f1005fbff35f8f24d101684ef66c62ccf2ff0291421dd14168b1f57d7f19d1d0f8d813b1b14ff00041bff35f8fc0f8d4134af21f30c0f2470000f510674ff4f07001904ff4207400200021002200230094b84795f84701002785f8477158b145f64d50c0f246008047012804d143f2a310c0f256008047d5f8400195f84641c5f83c7185f84671a5f8447150b1b047d5f8400106f166018847002804bf0020c5f840010120a87354b14af27366c0f246060021002200230027b047fef70abe0027fef707be701ca9f88c03002742f6f76ac0f2440afef7fdbd4bf639400027c0f2510088f84870804769e600bf2de9f04f81b04ef66c644ff29c55ccf2ff04c2f229054ff6ff7600274ff0010a47f67f7b4ff07f0807e000bf48f2a351c0f24501bff32f8f8847d5f80090bff35f8f2868bff35f8f01466ff39601b1f1005f07d10168a14204d14168b1f57d7f00f095804ff47d7004f0c0ff002800f08d804ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ff47d710460416080f80ea0a0f8c4b180f8c381068446848684c684068546858685c685068646868686c686068746878687c68755e8001f49457ff45aafbff35f8f45e8000129b155e8001f4945f8d04fe7002001b0bde8f08f70b500284dd001684ef66c62ccf2ff02914218bf70bd90f8481090f849504bf6394c8d42c0f2510c2ad205eb8501014491f84d2091f84e4091f84ae091f84b3091f84c1042ea0424012c4ff0010298bf14466e1c054680f84960b9b164294eea032028bf6421012888bf024644f62060824228bf02460cf5e2731046984706e0002180f84810bde870406047e047686c38b142f64d42c0f244022146bde87040104770bd02464ff64b70cff6ff7042f6653c7844c0f2440c00210023604700bf2de9f04fcdb04ff29c57c2f229073c6840f2030b20464ef66c696ff39600cff6807bccf2ff09b0f1005fbff35f8f40f0e9812068484540f0e5816068b0f57d7f40f0e08194f8710347f64c65c2f2070504f5497628b347f61800c2f20700016d4bf67c52c0f2720291421ad1406cc0b1d4f87c032968401a012802db03f034ff78b93046b8460df02bf850b142f69570c0f25b0080474746002084f8720384f8710394f8700368b1d4f880032968401a012802db03f018ff20b9002084f8700384f86a013078bff35f8f70b194f86fa3ac46baf1000f00961cd094f8250394f83e13091a18bf012115e094f87103002840f0888194f87003002840f08381d4f88403002800f07e8142f68d41c0f24401884777e1012194f8270394f83133059094f8280394f83d23069094f8265394f82a0394f82b9394f82ce394f82db394f82e8394f82f63934235d194f8302394f83c339a422fd194f83b2396422bd194f83a23904527d194f83923934523d194f8382396451fd194f8372391451bd194f83623904217d194f8292394f835339a4211d194f83423069b93420cd194f83323059b934207d194f83223954203d111b994f82583a9e00023012284f8403384f8433384f8443384f8453384f8463384f8473384f8483384f8493384f84a3384f84b3384f84c3384f84d3384f84e3384f84f3384f8503384f8513384f8523384f8533384f8543384f8553384f8563384f8573384f8583384f8593384f85a3384f85b3384f85c3384f85d3384f85e3384f85f3384f8603384f8613384f8623384f8633384f8643384f8653384f8663384f8673384f8683384f8693384f86a3384f86b3384f86c3384f86d3384f86e3384f83f2384f8415384f84203dcf8002047f61803170a84f8432384f84473170c120e84f846230822c2f2070384f8457384f86f231a6d4bf67c57c0f2720704f22631ba4204f2323a1bd15a6ccab140f6b803c2f200031a689ab1182d00f02984172d40f03584fe2804f2473c0d4600f05684002840f0608400980cf0acff294602e0022084f8400350460c22fdf733ff94f8258394f86fa384f83e8345f64d50c0f246008047811eb1fa81f14fea511b012808bf4ff0020bbaf1000f5ad004f23f3007a9049040f261400631c0f2470003910aa9023100254ff00309a0f5b84000240291019015e000bf029807a91a468df828908df82980fdf7fdfe47f00802019ff0200aa90023b8470334e0b25045b1462fd2aaeb0400c7b20420032f28bf4f468df81c0005983a468df81d0006988df81fb08df81e0004988df8204050fa84f103988df821a08df822508df823508df82450fdf7cffeb81dc345c3b24ff00306c2d14ef60b670120f02107aac0f24707c9e7bff35f8f00994ff29c574ef66c6940f2030b0020c2f22907ccf2ff09cff6807b08703d68bff35f8f05ea0b00b0f1005f59d12868484556d16868b0f57d7f52d105f575700021bff35f8f50e8006f40e80012002af9d147f64c60bff35f8fc2f207000468b6f1004f0fd0b84603f04bfd58b1002e00f04d8195f8ec03320a002800f0e38195f8ed13ece195f8ec03e8b147f61800c2f207000068b8b145f60960c2f207000478002040f261430a9007900aa907aac0f247032046984707990a9a43f69b53c0f24e0320469847002085f8ee0385f8ec03d5f8d80320b142f68d41c0f244018847d7f800a0bff35f8f0aea0b00b0f1005f40f00481daf80000484540f0ff80daf80400b0f57d7f40f0f9809af8700338b100208af86801caf864014db0bde8f08f9af86801002800f0d780daf86441002c00f0d28040f6b800c2f20000056807a802f066f9002d00f0d781284621464ff416324e464ff6ff770695fdf70ffe002547f67f744ff07f0806e048f2a351c0f24501bff32f8f88474ff29c50c2f22900d0f80090bff35f8f0068bff35f8f00ea0b01b1f1005f07d10168b14204d14168b1f57d7f00f0b8804ff47d7004f000fc002802f00c814ff60c41cff6ff7100bf42182e3182f8f45382f8f55382f8f65382f8f75382f8f85382f8f95382f8fa5382f8fb5382f8fc5382f8fd5382f8fe5382f8ff5382f8005482f8015482f8025482f8035482f8045482f8055482f8065482f8075482f8085482f8095482f80a5482f80b5482f80c5482f80d5482f80e5482f80f5482f8105482f8115482f8125482f8135482f8145482f8155482f8165482f8175482f8185482f8195482f81a5482f81b5482f81c5482f81d5482f81e5482f81f5482f8205482f82154a0d14ff47d71416001214ff29c5206608173a0f8c44180f8c381078447848784c784078547858785c785078647868786c786078747878787c787c2f2290252e8001f49457ff453afbff35f8f42e8000121b352e8001f4945f8d048e79af86a0170b1daf86c0140b147f64c61c2f207010968401a002802f3848000208af86a0140f6a120c0f2470080474db0bde8f08f95f8ec03002840f0db80e3e6817b002942f05780027f0021002a8df8281000f028824ff29c550aaac2f22905535c002b00f0928253185f78002f00f050829f78002f00f04e82df78002f00f04c821f79002f00f04a825f79002f00f048829f79002f00f04682df79002f00f044821f7a002f00f042825f7a002f00f040829f7a002f00f03e82df7a002f00f03c821f7b002f00f03a825f7b002f00f038829f7b002f00f03682df7b002f00f034821f7c002f00f032825f7c002f00f030829f7c002f00f02e82df7c002f00f02c821f7d002f00f02a825f7d002f00f028829f7d002f00f02682df7d002f00f024821f7e002f00f022825f7e002f00f020829f7e002f00f01e82df7e002f00f01c821f7f002f00f01a825f7f002f00f018829f7f002f00f01682db7f002b00f01482203160297ff47baf33e20120a5f8ec0340f20220a5f8f0030220002185f8ef03c5f8e01302f00103c6f300208b42c6f34b2206d123b395f8f233f7b2bb421fd00ce05bb995f8ef13a5f8ea2385f8f013022185f8f113c5f8dc4311e095f8ef3385f8f03385f8f163a5f8ea23c5f8dc4331b9012185f8ee13c6f34951a5f8e813002804bf002185f8ee1385f8ed0385f8f26395f8ee1341b395f8680160b1d5f8e403bff35f8fb5f8e8136ff39f20884216d195f8ee13c1b195f8ef6340e000208af86801caf864018af86a0101208af8690140f6a120c0f24700804701f06dbf002085f8ee03c5f8dc43d5f8dc13b5f8ea0395f8f163611a814220d28902b1fbf0f04ff4406395f8f01300fb00f2a3eb40005043000d721a00fb02f34ff60c47002b4ff40073cff6ff7748bf07f5fa7310fb0230c21700eb925001eb9026002147f61800c2f207000068e0b1d5f8e003f4b2a0421ad0002040f261430a9007900aa907aac0f247032046984707990a9a43f69b53c0f24e0320469847c5f8e04395f8ee1302e00020c5f8e003d5f8d80385f8ef6311b14ff47a7108e095f8f113f2b28a424ff0280108bf4ff47a7142f68d42c0f24402403a904795f8ee034746c8b13868bff35f8f00ea0b01b1f1005f41f0f8860168494541f0f4864168b1f57d7f41f0ef86002180f86811c0f864114db0bde8f08f95f8ed0300287ff453adf0b20228ddd140f6b800c2f2000001680029d6d001684ff416322139002301f8403f403a01f81f3c01f81e3c01f81d3c01f81c3c01f81b3c01f81a3c01f8193c01f8183c01f8173c01f8163c01f8153c01f8143c01f8133c01f8123c01f8113c01f8103c01f80f3c01f80e3c01f80d3c01f80c3c01f80b3c01f80a3c01f8093c01f8083c01f8073c01f8063c01f8053c01f8043c01f8033c01f8023c01f8013c4b708b70cb700b714b718b71cb710b724b728b72cb720b734b738b73cb730b744b748b74cb740b754b758b75cb750b764b768b76cb760b774b778b77cb7781f820309cd100684ef217310a904ff416300b900aa8c0f247018847474661e700980d460cf0f2fc10b302304ff0030008bf022084f840032946fff7dcbb84f87003dcf800204ef660231a44c4f88023b8b100980d460cf0b7fe0cf08bfe294660b9fff7c8bb4ff29c55c2f2290595e00cf080fe002829463ff4bdab0320fff7b8bb002084f86a01fff7b5bb18684a4600eb0b20704400eb084000eb06616046fdf7e0fa0ee04eea0b2141ea084141ea066361464a460cf07ffc00281cbf032084f8400309f1080084f86f032946fff792bb01313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2921d84ff0520353541dd00a4445235e29537018d04f235d29937014d052235c29d37010d044235b2913710cd045235a29537108d052235929937104d020235829d37141f0c48200218df887100121427f002a00f0c28000220aab9f5c002f00f0a0809f187e78002e5ed0be78002e5dd0fe78002e5cd03e79002e5bd07e79002e5ad0be79002e59d0fe79002e58d03e7a002e57d07e7a002e56d0be7a002e55d0fe7a002e54d03e7b002e53d07e7b002e52d0be7b002e51d0fe7b002e50d03e7c002e4fd07e7c002e4ed0be7c002e4dd0fe7c002e4cd03e7d002e4bd07e7d002e4ad0be7d002e49d0fe7d002e48d03e7e002e47d07e7e002e46d0be7e002e45d0fe7e002e44d03e7f002e43d07e7f002e42d0be7f002e41d0ff7f002f40d02032602a7ff49aaf54e001323ae0023238e0033236e0043234e0053232e0063230e007322ee008322ce009322ae00a3228e00b3226e00c3224e00d3222e00e3220e00f321ee010321ce011321ae0123218e0133216e0143214e0153212e0163210e017320ee018320ce019320ae01a3208e01b3206e01c3204e01d3202e01e3200e01f325f2a15d84ff053079f5411d013444b275e2a5f700cd049275d2a9f7008d050275c2adf7004d020275b2a1f7140f0f08100228df887200131827f002a00f0be8000210aaa535c002b00f0a08053185f78002f5ed09f78002f5dd0df78002f5cd01f79002f5bd05f79002f5ad09f79002f59d0df79002f58d01f7a002f57d05f7a002f56d09f7a002f55d0df7a002f54d01f7b002f53d05f7b002f52d09f7b002f51d0df7b002f50d01f7c002f4fd05f7c002f4ed09f7c002f4dd0df7c002f4cd01f7d002f4bd05f7d002f4ad09f7d002f49d0df7d002f48d01f7e002f47d05f7e002f46d09f7e002f45d0df7e002f44d01f7f002f43d05f7f002f42d09f7f002f41d0db7f002b40d0203160297ff49aaf50e001313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2911d84ff0440353540dd00a4455235e29537008d050235d29937004d020235c29d37040f0098100218df8871001216a6846f23f53c5f28803b3eb520f40f08b80d20700f08d8000210aaa535c002b00f0858153185f78002f00f0f9809f78002f00f0f980df78002f00f0f9801f79002f00f0f9805f79002f00f0f9809f79002f00f0f980df79002f00f0f9801f7a002f00f0fc805f7a002f00f0fc809f7a002f00f0fc80df7a002f00f0fc801f7b002f00f0fc805f7b002f00f0fc809f7b002f00f0fc80df7b002f00f0fc801f7c002f00f0fc805f7c002f00f0fc809f7c002f00f0fc80df7c002f00f0fc801f7d002f00f0fc805f7d002f00f0fc809f7d002f00f0fc80df7d002f00f0fc801f7e002f00f0fc805f7e002f00f0fc809f7e002f00f0fc80df7e002f00f0fc801f7f002f00f00d815f7f002f00f00b819f7f002f00f00981db7f002b00f00781203160297ff47baf1de14cf67e22caf210126a60002940f0198100210aaa535c002b00f0dc8053185f78002f61d09f78002f60d0df78002f5fd01f79002f5ed05f79002f5fd09f79002f60d0df79002f61d01f7a002f62d05f7a002f63d09f7a002f64d0df7a002f68d01f7b002f69d05f7b002f6ad09f7b002f6bd0df7b002f6cd01f7c002f6dd05f7c002f6ed09f7c002f6fd0df7c002f70d01f7d002f71d05f7d002f72d09f7d002f73d0df7d002f74d01f7e002f75d05f7e002f76d09f7e002f77d0df7e002f78d01f7f002f79d05f7f002f7ad09f7f002f7bd0db7f002b7cd0203160297ff49aaface000211171f6e6013173e0023171e003316fe004316de0013184e0053169e0023180e0063165e003317ce0073161e0043178e008315de0053174e0093159e0063170e00a3155e007316ce000225a710fe60b314ee0083165e00c314ae0093161e00d3146e00a315de00e3142e00b3159e00f313ee00c3155e010313ae00d3151e0113136e00e314de0123132e00f3149e013312ee0103145e014312ae0113141e0153126e012313de0163122e0133139e017311ee0143135e018311ae0153131e0193116e016312de01a3112e0173129e01b310ee0183125e01c310ae0193121e01d3106e01a311de01e3102e01b3119e01f315f2931d84ff04f0353542dd00a444b235e29537028d020235d29937024d00021d17024e01c3104e01d3102e01e3100e01f315f2918d84ff04103535414d00a444c235e2953700fd05d2993700cd04f235c29d37008d043235b29137104d020235a29537140f0828700218df8871000220aafb95c002900f0a080bb18597800295ed0997800295dd0d97800295cd0197900295bd0597900295ad09979002959d0d979002958d0197a002957d0597a002956d0997a002955d0d97a002954d0197b002953d0597b002952d0997b002951d0d97b002950d0197c00294fd0597c00294ed0997c00294dd0d97c00294cd0197d00294bd0597d00294ad0997d002949d0d97d002948d0197e002947d0597e002946d0997e002945d0d97e002944d0197f002943d0597f002942d0997f002941d0d97f002940d02032602a7ff49aaf42e001323ae0023238e0033236e0043234e0053232e0063230e007322ee008322ce009322ae00a3228e00b3226e00c3224e00d3222e00e3220e00f321ee010321ce011321ae0123218e0133216e0143214e0153212e0163210e017320ee018320ce019320ae01a3208e01b3206e01c3204e01d3202e01e3200e01f325f2a03d84ff07701b95403d100218df8871002e0b91800224a7004694ff0000917f80910002900f0c48007eb09025178002962d09178002962d0d178002962d01179002962d05179002962d09179002962d0d179002962d0117a002962d0517a002962d0917a002962d0d17a002962d0117b002962d0517b002962d0917b002962d0d17b002962d0117c002962d0517c002962d0917c002962d0d17c002962d0117d002962d0517d002962d0917d002962d0d17d002962d0117e002962d0517e002962d0917e002962d0d17e002962d0117f002962d0517f002962d0917f002962d0d17f002962d009f12009b9f1600f7ff496af4ff060095be009f1010958e009f1020955e009f1030952e009f104094fe009f105094ce009f1060949e009f1070946e009f1080943e009f1090940e009f10a093de009f10b093ae009f10c0937e009f10d0934e009f10e0931e009f10f092ee009f110092be009f1110928e009f1120925e009f1130922e009f114091fe009f115091ce009f1160919e009f1170916e009f1180913e009f1190910e009f11a090de009f11b090ae009f11c0907e009f11d0904e009f11e0901e009f11f0901250a2c1ed364214ff47a7242f2107305eb85077f00b4fbf7f60a2e11d305fb01f7b4fbf7f60a2e0bd305fb02f7b4fbf7f60a2e05d35d43b4fbf5f7092fe7d800e03d464946b9f15f0f98bf5f21c1f1000e05911eeb090b54d0b4fbf5f30aa903f1300201f809204cf6cd41ccf6cc410a2da5fb017248d31bf1010742d003fb154cd608bcfbf6f80aa901eb090448f21f5108f13002c5f2eb116270642da5fb013235d31bf102032cd008fb16c65309b6fbf3f244f6d35102f13007c1f26201a770b5f57a7fa5fb011724d31bf1030118d002fb1361ba0941f25977b1fbf2f3cdf2b717a5fb077603f13007e77003fb121442f2107109f104098d424fea5635a8d20ae0ddf8149007e009f1010904e009f1020901e009f1030900240aab03f80940195d002900f0a0801f19797800295ed0b97800295dd0f97800295cd0397900295bd0797900295ad0b979002959d0f979002958d0397a002957d0797a002956d0b97a002955d0f97a002954d0397b002953d0797b002952d0b97b002951d0f97b002950d0397c00294fd0797c00294ed0b97c00294dd0f97c00294cd0397d00294bd0797d00294ad0b97d002949d0f97d002948d0397e002947d0797e002946d0b97e002945d0f97e002944d0397f002943d0797f002942d0b97f002941d0f97f002940d02034602c7ff49aaf50e001343ae0023438e0033436e0043434e0053432e0063430e007342ee008342ce009342ae00a3428e00b3426e00c3424e00d3422e00e3420e00f341ee010341ce011341ae0123418e0133416e0143414e0153412e0163410e017340ee018340ce019340ae01a3408e01b3406e01c3404e01d3402e01e3400e01f345f2c11d84ff0750119550dd0191973225e2c4a7008d020225d2c8a7004d070225c2cca7040f09d8000218df8871044694ff0000e13f80e10002900f0c78003eb0e056978002962d0a978002962d0e978002962d02979002962d06979002962d0a979002962d0e979002962d0297a002962d0697a002962d0a97a002962d0e97a002962d0297b002962d0697b002962d0a97b002962d0e97b002965d0297c002965d0697c002965d0a97c002965d0e97c002965d0297d002965d0697d002965d0a97d002965d0e97d002965d0297e002965d0697e002965d0a97e002965d0e97e002965d0297f002965d0697f002965d0a97f002965d0e97f002965d00ef1200ebef1600f7ff496af4ff0600e5ee00ef1010e5be00ef1020e58e00ef1030e55e00ef1040e52e00ef1050e4fe00ef1060e4ce00ef1070e49e00ef1080e46e00ef1090e43e00ef10a0e40e00ef10b0e3de00ef10c0e3ae00ef10d0e37e00ef10e0e34e000220a7162e70ef10f0e2ee00ef1100e2be00ef1110e28e00ef1120e25e00ef1130e22e00ef1140e1fe00ef1150e1ce00ef1160e19e00ef1170e16e00ef1180e13e00ef1190e10e00ef11a0e0de00ef11b0e0ae00ef11c0e07e00ef11d0e04e00ef11e0e01e00ef11f0e01250a2c1ed364214ff47a7242f2107305eb85077f00b4fbf7f60a2e11d305fb01f7b4fbf7f60a2e0bd305fb02f7b4fbf7f60a2e05d35d43b4fbf5f7092fe7d800e03d46f446bef15f0f98bf4ff05f0cccf1000842f2107b18eb0e0952d0b4fbf5f20aa902f1300301f80e304cf6cd41ccf6cc410a2da5fb016345d319f1010640d002fb1546db08b6fbf3f20aa901eb0e0448f21f5102f13007c5f2eb116770642da5fb011732d319f102012ad002fb13637a09b3fbf2f6b5f57a7f06f13001a17044f6d351c1f26201a5fb011721d319f1030116d006fb1231ba0941f25976b1fbf2f3cdf2b716a5fb066703f13006e67003fb12140ef1040e5d454fea5735aad209e0e64607e00ef1010e04e00ef1020e01e00ef1030e00240df1280b0bf80e401bf80410002900f0a1800beb0405697800295ed0a97800295dd0e97800295cd0297900295bd0697900295ad0a979002959d0e979002958d0297a002957d0697a002956d0a97a002955d0e97a002954d0297b002953d0697b002952d0a97b002951d0e97b002950d0297c00294fd0697c00294ed0a97c00294dd0e97c00294cd0297d00294bd0697d00294ad0a97d002949d0e97d002948d0297e002947d0697e002946d0a97e002945d0e97e002944d0297f002943d0697f002942d0a97f002941d0e97f002940d02034602c7ff498af5ee001343ae0023438e0033436e0043434e0053432e0063430e007342ee008342ce009342ae00a3428e00b3426e00c3424e00d3422e00e3420e00f341ee010341ce011341ae0123418e0133416e0143414e0153412e0163410e017340ee018340ce019340ae01a3408e01b3406e01c3404e01d3402e01e3400e01f345f2c1fd84ff075010bf804101ad00beb040173225e2c4a7014d020225d2c8a7010d074225c2cca700cd031225b2c0a7108d030225a2c4a7104d02022592c8a7140f0898200218df88710d0f8cc734ff000091bf80910002900f0c4800beb09046178002962d0a178002962d0e178002962d02179002962d06179002962d0a179002962d0e179002962d0217a002962d0617a002962d0a17a002962d0e17a002962d0217b002962d0617b002962d0a17b002962d0e17b002962d0217c002962d0617c002962d0a17c002962d0e17c002962d0217d002962d0617d002962d0a17d002962d0e17d002962d0217e002962d0617e002962d0a17e002962d0e17e002962d0217f002962d0617f002962d0a17f002962d0e17f002962d009f12009b9f1600f7ff496af4ff060095be009f1010958e009f1020955e009f1030952e009f104094fe009f105094ce009f1060949e009f1070946e009f1080943e009f1090940e009f10a093de009f10b093ae009f10c0937e009f10d0934e009f10e0931e009f10f092ee009f110092be009f1110928e009f1120925e009f1130922e009f114091fe009f115091ce009f1160919e009f1170916e009f1180913e009f1190910e009f11a090de009f11b090ae009f11c0907e009f11d0904e009f11e0901e009f11f0901240a2f1ed364214ff47a7242f2107304eb84067600b7fbf6f50a2d11d304fb01f6b7fbf6f50a2d0bd304fb02f6b7fbf6f50a2d05d35c43b7fbf4f6092ee7d800e03446c846b9f15f0f98bf4ff05f08c8f1000e42f2107c1eeb09054dd0b7fbf4f14cf6cd4001f13002ccf6cc400bf809200a2ca4fb002341d36a1c3dd001fb1476d908b6fbf1f348f21f5003f130020beb0907c5f2eb107a70642ca4fb000230d3a81c29d003fb11615309b1fbf3f6b4f57a7f06f13000b87044f6d350c1f26200a4fb000220d3e81c16d006fb1310910941f25973b0fbf1f2cdf2b713a4fb033502f13003fb7002fb110709f1040964454fea5534afd209e0c14607e009f1010904e009f1020901e009f10309069d40f6b8060022c2f200060bf809201bf80200002800f0a1800beb0200417800295ed0817800295dd0c17800295cd0017900295bd0417900295ad08179002959d0c179002958d0017a002957d0417a002956d0817a002955d0c17a002954d0017b002953d0417b002952d0817b002951d0c17b002950d0017c00294fd0417c00294ed0817c00294dd0c17c00294cd0017d00294bd0417d00294ad0817d002949d0c17d002948d0017e002947d0417e002946d0817e002945d0c17e002944d0017f002943d0417f002942d0817f002941d0c07f002840d02032602a7ff498af49e001323ae0023238e0033236e0043234e0053232e0063230e007322ee008322ce009322ae00a3228e00b3226e00c3224e00d3222e00e3220e00f321ee010321ce011321ae0123218e0133216e0143214e0153212e0163210e017320ee018320ce019320ae01a3208e01b3206e01c3204e01d3202e01e3200e01f325f2a0ad84ff075000bf8020005d00beb020073215e2a41705dd100208df887000aaf42f2941845f29c14284602213a46c2f22008c2f213040bf0a3fc00208df8280038460bf01bfe28460e213a460bf098fc4ff6a420cff6ff703058a0426ad14ff6b020cff6ff703058b0f54d2f62d14ff6b420cff6ff703058a0425bd145f610634ff0000ec2f213034cf6394408f1040c00274ff0ff3263454cd8186830f003051bd0984528bf0c2846d3a8eb03018d424ff0ff3142d8bd42394688bf2946c00703eb05001cbf0f46ae44013c00f10403e1d12fe000218170a1e70421b7f5807f21d300223d46b5f5007f17d3b5f5806f16d3b5f5006f15d30901b2eb153f4fea1515f0d10fe00022ca7176e500219171fff77db800211172fef73bbd490002e0890000e0c900634504d1484207ea0002714603e04ff0ff324ff0ff3147f64c60c2f20700d0f8840008f1080342f6941c9842c2f2270c4dd142f610674ff0000bc2f2200746f6b9700cf1040e00244ff0ff384ff0ff3977453cd83e6836f0030515d0bc4528bf0c2e36d3aceb07039d4234d82346a54288bf2b46f6071cbf1c46ab447b19013803f10407e4d122e00420b4f5807f17d34ff000082546b5f5007f0cd3b5f5806f0bd3b5f5006f0ad30001b8eb153f4fea1515f0d104e0400002e0800000e0c000774504d1404204ea0008d94603e04ff0ff384ff0ff394ff6882040f6b807cff6ff70c2f200073b580cf10800834264d14ff69423cff6ff73fb58b3f5333f5cd14ff69823cff6ff73fb58834255d14ff29c5043f21063c2f229004ff0000bc2f2270342f6f935a0f1040ca0f1080e0024634542d81e6836f003071ad09e454ff0ff30059028bf0c2e3ad3aeeb030087424ff0ff3034d82046a74288bf3846f6071cbf0446bb44d819013d00f10403dfd123e00427b4f5807f17d34ff0000e2546b5f5007f0cd3b5f5806f0bd3b5f5006f0ad33f01beeb153f4fea1515f0d104e07f0002e0bf0000e0ff00634505d17b4204ea03000590584602e04ff0ff300590064666208df8280072208df8290065208df82a008df82b002f208df82c006d204b238df82d0061208df8313069238df82e0078208df83230422356278df82f0020208df833303a238df8377047270aac8df830008df834308df835004c238df838708df83a00002720468df836308df839308df83b700bf0dafd069de05d002800f0a080e019417800295ed0817800295dd0c17800295cd0017900295bd0417900295ad08179002959d0c179002958d0017a002957d0417a002956d0817a002955d0c17a002954d0017b002953d0417b002952d0817b002951d0c17b002950d0017c00294fd0417c00294ed0817c00294dd0c17c00294cd0017d00294bd0417d00294ad0817d002949d0c17d002948d0017e002947d0417e002946d0817e002945d0c17e002944d0017f002943d0417f002942d0817f002941d0c07f002840d02037602f7ff49aaf64e001373ae0023738e0033736e0043734e0053732e0063730e007372ee008372ce009372ae00a3728e00b3726e00c3724e00d3722e00e3720e00f371ee010371ce011371ae0123718e0133716e0143714e0153712e0163710e017370ee018370ce019370ae01a3708e01b3706e01c3704e01d3702e01e3700e01f375f2f25d84ff02000e05521d0e01945215e2f41701cd076215d2f817018d065215c2fc17014d06e215b2f017110d048215a2f41710cd07521592f817108d06221582fc17104d02021572f017240f0f88000208df887002046494642460bf005fd0020215c002900f0a08021184a78002a5ed08a78002a5dd0ca78002a5cd00a79002a5bd04a79002a5ad08a79002a59d0ca79002a58d00a7a002a57d04a7a002a56d08a7a002a55d0ca7a002a54d00a7b002a53d04a7b002a52d08a7b002a51d0ca7b002a50d00a7c002a4fd04a7c002a4ed08a7c002a4dd0ca7c002a4cd00a7d002a4bd04a7d002a4ad08a7d002a49d0ca7d002a48d00a7e002a47d04a7e002a46d08a7e002a45d0ca7e002a44d00a7f002a43d04a7f002a42d08a7f002a41d0c97f002940d0203060287ff49aaf5be001303ae0023038e0033036e0043034e0053032e0063030e007302ee008302ce009302ae00a3028e00b3026e00c3024e00d3022e00e3020e00f301ee010301ce011301ae0123018e0133016e0143014e0153012e0163010e017300ee018300ce019300ae01a3008e01b3006e01c3004e01d3002e01e3000e01f305f281cd84ff02001215418d021184f225e284a7013d074225d288a700fd068225c28ca700bd065225b280a7107d072225a284a7103d0202259288a7128d100208df887000aac059a204631460bf038fc28461a2122460bf069f900208af86801caf8640106984ef217310a904ff416300b900aa8c0f24701884701208af86a0107a800f031f9caf814004db0bde8f08f0020c871d6e70021417207e72de9f04f81b0009041f204024cf65560cef20002ccf2ac50c2f8ac0f4ef6fc50cef2000001684ef66c6641f08071016052f8040c4ff29c57ccf2ff06c2f229074ff6ff7440f0010000254ff0010847f67f794ff07f0a42f8040c06e048f2a351c0f24501bff32f8f8847d7f800b0bff35f8f3868bff35f8f01466ff39601b1f1005f07d10168b14204d14168b1f57d7f00f094804ff47d7002f082fa002800f0ca804ff60c41cff6ff7100bf42182e3182f8f45382f8f55382f8f65382f8f75382f8f85382f8f95382f8fa5382f8fb5382f8fc5382f8fd5382f8fe5382f8ff5382f8005482f8015482f8025482f8035482f8045482f8055482f8065482f8075482f8085482f8095482f80a5482f80b5482f80c5482f80d5482f80e5482f80f5482f8105482f8115482f8125482f8135482f8145482f8155482f8165482f8175482f8185482f8195482f81a5482f81b5482f81c5482f81d5482f81e5482f81f5482f8205482f82154a0d14ff47d710660416080f80e80a0f8c49180f8c3a1048444848484c484048544858485c485048644868486c486048744878487c48757e8001f59457ff45aafbff35f8f47e8000121b157e8001f5945f8d04fe78169d1bb47f64c6245f6e466c2f20702cff6f8761368314617689f420ed117689f420bd117689f4208d117689f4203d1002901f10401efd19f421ed041f20401cef200010b6817681168b9420ed11168b9420bd11168b94208d11168b94203d1002e06f10406efd1b94206d041f20401cef200010968c91a816141f20400cef2000000680099086001b0bde8f08f00bf2de9f04f83b041f20401cef200014ef66c674ff29c5609680068ccf2ff07c2f229064ff6ff744ff000084ff0010947f67f7a4ff07f0b0291019006e048f2a351c0f24501bff32f8f88473568bff35f8f3068bff35f8f01466ff39601b1f1005f07d10168b94204d14168b1f57d7f00f093804ff47d7002f06df9002800f0e7804ff60c41cff6ff7142182e3182f8f48382f8f58382f8f68382f8f78382f8f88382f8f98382f8fa8382f8fb8382f8fc8382f8fd8382f8fe8382f8ff8382f8008482f8018482f8028482f8038482f8048482f8058482f8068482f8078482f8088482f8098482f80a8482f80b8482f80c8482f80d8482f80e8482f80f8482f8108482f8118482f8128482f8138482f8148482f8158482f8168482f8178482f8188482f8198482f81a8482f81b8482f81c8482f81d8482f81e8482f81f8482f8208482f82184a0d14ff47d710760416080f80e90a0f8c4a180f8c3b1048444848484c484048544858485c485048644868486c486048744878487c48756e8001fa9427ff45cafbff35f8f46e8000121b156e8001fa942f8d051e7816961b144f6d350c1f26200a1fb0001880901284ff0010088bf88094ce047f64c6245f6e466c2f20702cff6f8761368314600bf17689f420ed117689f420bd117689f4208d117689f4203d1002901f10401efd19f422ed041f20401cef200010b6817681168b9420ed11168b9420bd11168b94208d11168b94203d1002e06f10406efd1b94216d041f20401cef20001096844f6d357ca1ac1f26207a2fb07768261b00901284ff0010088bfb009994208bffa2000e0fa20dde90121891ab1fbf0f003b0bde8f08f2ab1a2fb0103002b1cbf0020704702fb01f0ffe7b0b54ff2a054c2f229040146206846f23f52c5f28802b2eb500f40f258304df681124cf67e25c2f20000c0f24802caf2101518bf25609047002804bf691c2160b0bd00bf0846ffe7014640f258304df69f22c2f20000c0f248021047002855d1002953d0082a51d30b78aa2b4ed18b79f02b4bd12de9f04182b045f64d550b2ac0f2460547d3c878a2f10803834242d14878212841d1087901283ed1487901283bd1c879c8bb0c4614f8080f10f03c0f33d18818884610f8021c10f8010c164641ea0027a2f10a0081b220460af032f8874222d1a847811eb1fa81f14f09012808bf0227002f4ad0207887f00301084247d0012039464246334600f07ff90446002898f8080018bf06243be04ff27143c0f24c0318470b2400e00a24a847811eb1fa81f14e09012808bf02261eb3304600f090f8f8b10546407ce0b10027284631463246032300970af0acf8686840b14bf69b71c0f25d0188476868fff774ff6f602868af75002818bffff76dff00202860a8602882204602b0bde8f0810624f9e700243842f6d0404631463a463b4600f056f9002818bf0446ece70b291dd3c278a1f10803934218d10278aa2a13d14278212a10d10279012a0dd14279012a0ad18279f02a07d1c2792ab9024612f8083f13f03c0f03d00a2070470b20704710b5084410f8023c10f8010c43ea0024a1f10a0081b2104609f09cff201a18bf0a2010bd002808bf7047b0b582b00446407cd0b100252046032300950af042f8606840b14bf69b71c0f25d0188476068fff70aff65602068a575002818bffff703ff00202060a060208202b0bde8b040704700bf2de9f04f81b04ef66c654ff29c56ccf2ff05c2f229064ff6ff7700244ff0010b47f67f784ff07f09009006e048f2a351c0f24501bff32f8f8847d6f800a0bff35f8f3068bff35f8f01466ff39601b1f1005f07d10168a94204d14168b1f57d7f00f095804ff47d7001f010ff002800f08d804ff60c41cff6ff7100bf42182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d710560416080f80eb0a0f8c48180f8c391078447848784c784078547858785c785078647868786c786078747878787c78756e8001f51457ff45aafbff35f8f46e8000129b156e8001f5145f8d04fe700200099002801eb410100eb011118bf01f51b7001b0bde8f08f00bfb0b5c4b0dc08202c03d94ff0ff3044b0b0bd0df107048df807008df80810a01c11461a461d46fbf743f8a81c4af6610582b2c0f24605f02021460023a84744b0b0bd00bf2de9f04f89b0064618469a4617468946fff700ff002800f09983044696f908000796b0f1ff3f00f003050add264616f8110f00283fd12068002818bffff7e4fd2de3207c10b3607c00b34ff000082046394652460323cdf8008009f003ff606848b14bf69b71c0f25d0188476068fff7cbfdc4f80480206884f81680002818bffff7c2fd00202060a06020822068002818bffff7b9fd4ff480710020218207992060a0608978a081092004f11106e174a174257560760799a07c8978884240f0d382217da94240f0cf82411ca9f10b00627e01961e2828bf1e209042a17488bf6076a9f10200039787b20a2f4ff00005c0f0db82092241f2210809200497cdf808a017e02068049f002818bffff77cfda089002d00f10100069d26602674a660a08118bf0625059e06eb0b0082b2ba4280f0bb82217c80b20429064600f28080079b461c9a5c4b1c0129237405dd022906d0032968d1e28106e021b9627503e0238943ea02222281be4280f09e82042966d0079a831c925d8f1c0129277406dd049fff290bd003290bd11e464ce000291cbf278947ea0222049f228102e0627500e0e281bb4280f08082022935d8079ac61cd25ccb1c0129237405dd022933d0fe2905d1627506e021b9238943ea0222228100e0e281be4280f0678202292fd0079a031d925d41f00407fc2927740add049ffd290cd0fe2903d0278947ea0222049f228105e0049f0029bed1e28100e06275bb4280f0498209b11e4610e0461d0798c25c05202074e189208941ea0221e18128b1fff7c4fc0028206000f06682b4f808906089a9eb00011ffa81fbb1b27a1a5a45b8bf93465fea0b420ad022681044079a11441ffa8bf2faf7fffe6089b4f80890584481b2494560817ff454afd4f800a0607dbaf1000f05964ff000060df1230108bf8a460f288df8236006d8217d00f00302511ab1fa81f14e0900074ff0000706d4217e607e814238bf20760fe000bf606840b14bf69b71c0f25d0188476068fff798fc6760607e20760120e0820695a6b1607da67d400715d4002e4ff0000500f089811ffa89f100294ff6ff7300f00a8101295cd10020cfe000bf607d400750d4002577e14ff48030fff74ffc002e824600f06f81a07d002800f06b81baf1000f00f067816668002e00f0fb8020890428c0f05f8121680a1812f8043c002b40f0588112f8033c002b40f0538112f8023cff2b40f04e8112f8012cff2a40f049814ff4803531607060c6f80ca03561002800f0648107464bf69b70c0f25d0000f5857230460021904740b9316931b170688d420d46ebd187420d46e8d15546002728e14ff48030fff700fc054622e14ff6fe7000ea0900ac4642426ff001000aeb0007be78ff7883ea06231eb25d002db208ead63686ea430308ead5355e0085ea430336b25d002db208ead63686ea430308ead5355e0085ea430336b25d002db208ead63686ea430308ead5355e0085ea430336b25d002db208ead63686ea430308ead53686ea430383ea07231fb25e0036b208ead73787ea430308ead6365f0086ea43033fb25e0036b208ead73787ea430308ead6365f0086ea43033fb25e0036b208ead73787ea430308ead6365f0086ea43033fb25e0036b208ead737023087ea430308ead6371618023687ea430395d10230002765465feac97232d01af8000083ea002002b243001bb208ead23282ea400008ead333420083ea400012b243001bb208ead23282ea400008ead333420083ea400012b243001bb208ead23282ea400008ead333420083ea400012b243001bb208ead23282ea400008ead33282ea4003e0899ab2824273d15046ddf808a05346faf7b5fe00286bd10026012378e03820fff741fb002862d00646077047708770c770077147718771c771077247728772c772077347738773c773077447748774c774077547758775c775077647768776c776077747778777c77780f8287080f8297080f82a7080f82b7080f82c7080f82d7080f82e7080f82f7080f8307080f8317080f8327080f8337080f8347080f8357080f8367080f837704ff2dd50cff6ff70784430624ff22960cff6ff70784470624bf69b70c0f25d0045f6e46200f13c0730460f21c0f27c0238230025b84738b33046fff703fb2f46554600e05546606840b14bf69b71c0f25d0188476068fff7f5fa6760ddf808a000260323a77503991ffa89f720465246009709f015fc002d294605463ff460ad0846fff7dffa5be50027666077e6c5f580390027b5f5803f55463760f7607ff649aed0e700252046394652460323009509f0f6fb606840b14bf69b71c0f25d0188476068fff7befa65602068a575002818bffff7b7fa0020307000202060a06020820a2551e00798007a40064dd5207c00b301980078e0b103990025204652460323009509f0ccfb606840b14bf69b71c0f25d0188476068fff794fa65602068a575002818bffff78dfa00202060a06020820b252068002818bffff783fa00202060a060208220e001980078e0b103990025204652460323009509f0a1fb606840b14bf69b71c0f25d0188476068fff769fa65602068a575002818bffff762fa00202060a06020820625284609b0bde8f08f00bf2de9f041f0284bd100294ff00b0000f07f80022a7cd345f64d50c0f246000e4617468047811eb1fa81f14c09012808bf0224002c4ff00a006ad07578e91ec9b2fe2938bfbde8f081307833463946032860d002282dd001281cbf0a20bde8f081ac4204bf0020bde8f0814808842884bf0b20bde8f081881e03f1020887b240463946fff7bffa002869d006462846fff715fb21462a46fff7e9fa3046bde8f08145f64d57c0f2460707f5e27cbde8f0416047ac421cbf0020bde8f081a1f1210010f1160f48d36ff0480048432330c0b2242841d81a4612f8020f40f00207032f4bd19b796340032b47d10b2904d0032804bf0b20bde8f081881e4ef60b6783b2c0f247070120f021b847002818bf0620bde8f081ac422dd1a1f10c0010f1030f1ad31a4612f8020f042815d158796040032811d1d879a0f1310717f1300f0bd39b79984208d9a1f10807c01a874284bf0b20bde8f081cfe70b20bde8f081b07a204207d04046394622462b46bde8f041fff79abb0020bde8f0810a20bde8f08140f20d00c0f2000042f6653c7844c0f2440c012100220023604700bf80b582b04ff4f0704af61f4e01904ff4207cc0f2470e0020002100220023cdf800c0f04702b080bd4ff29c51c2f229010968bff35f8f0a466ff39602b2f1005f19d10a684ef66c63ccf2ff039a4212d14a68b2f57d7f0ed1d1f86c1159b147f64c62c2f207021268891a012903db0178042938bf7047002101707047b0b541f23154c0f252041d46a0474ff29c51c2f229010968bff35f8f0a466ff39602b2f1005f0cd10a684ef66c63ccf2ff039a4205d14a68b2f57d7f18bf002100e00021421c18bf002900d1b0bd95f84d20002afad091f84721002a08bfb0bd46f25863c2f206031a68132aeed8c2ebc20403eb04135b6801ebc2014ff40042c1f8e431a1f8ea212a7a01f5f271002a0fbf802248f20112ca808122ab7c33b1ab7d23b1022342f002028b71ca7195f820303bb195f8243023b1032342f004028b71ca7195f846304bb195f8443042f008020b7195f84530ca714b71b0bd48f27342c2f207021378002b14bf9378ff230b711378002b14bf5278ff224a71b0bdf0b589b048f66502c0f24b020c46054690474ff29c51c2f229010e68bff35f8f31466ff39601b1f1005f0cd131684ef66c62ccf2ff02914205d17168b1f57d7f08bf092d01d009b0f0bde1082c29fad896f847110029f6d045f64d51c0f2460107468847014638460129ecd1ff22079244f6435246f258610020cff60172c2f20601089006920b685a1e132a4fd8c3ebc30501eb05111a1fa1f5de7191f85451ad0618d4d51c42d091f8e450ad0616d4951c3cd091f87450ad0613d4551c36d00d79ad0610d4043aa1f5e071151da3f10403e3d12be05a1e01f5a87104e09a1ee03101e0da1e703106ebc203096893f9eb21b2f1ff3f1adc03f5f2731e688e4215d11e798df81b605e798df81c609b798df81e200a0a8df820108df821200a0c090e8df81d308df822208df823100f228df8012010228df80220522208218df80420b4f5804f4ff080028df800108df8061038bf4ff48042b4f5001f6ff07f0604f07f0138bf0026802c28bf80318df807109df809509df80a108df8030004d29df808200223002415e0c4f3c610b4f5804f024403d20323012400200be0b4f5001f03d204230224012003e0052303240120002135468df8053004f108038df808208df809508df80a1070b96846a222c118c254062048700c208870c81c06a90c22faf70bfa04f117034ff225066a46c0f2470601200821b047384609b0f0bd70b582b00546ff208df8040044f25220c0f20100009040f2c960c0f2480016460c46804798b148f27e30c2f2070000880122c1b264298df8032008d80721b0f5807f38bf03218df803108df80400301b28bf08280cd3d221281929550621417005218170033069460522faf7c7f90834204602b070bd00bf024600284ff0ff3009d0022918bf70471078112801d1507810b14ff0ff30704710b586b045f64d50c0f24600804701284ff000003ed1cde9020040f20830c0f210000190ff208df8140044f25220c0f20100049040f2c960c0f24800804798b148f27e30c2f2070000880122c1b264298df8132008d80721b0f5807f38bf03218df813108df8140040f2d260adf80800052001ac8df80a00e01d04a90522faf771f94ff2250cc0f2470c0120092122460c23e04706b010bd4ff29c50c2f22900016808466ff39600b0f1005f1ad108684ef66c62ccf2ff02904213d14868b0f57d7f0fd1d1f83c0160b147f64c62c2f207021268801a0028cebf01200020c1f83c017047002070474ff29c50c2f22900026810466ff39600b0f1005f32d110684ef66c61ccf2ff0188422bd15068b0f57d7f27d1d2f86c0120b347f64c61c2f207010968401a0028c4bf01207047d2f8701100200029c2f86c0182f86a01c2f87001c2f82003a2f88c0308bf704780b548f2a352c0f24502084690470020bde88040704700207047f0b101684ef66c62ccf2ff02914218bf704790f8461199b110b54af273644ff0000cc0f24604864680f846c10120002100220023aef844c1a446bde810406047704700bf02464ff6ab70cff6ff7042f6653c7844c0f2440c00210023604700bf70b5002866d0044600796179a279e37940ea012040ea024050ea036007d00e2803d0032856d1032502e0042500e00225fff74eff00284dd04ff29c50c2f22900066830466ff39600b0f1005f42d130684ef66c61ccf2ff0188423bd17068b0f57d7f18bf70bd45f64d50a478c0f24600804701282ed1082086f88402032086f88502102086f88602b22086f88802062086f8890286f88a02462086f88b0243204ff0000e86f88c0201204ef6057c06f5217286f887e286f88d0286f88e5286f88f42c0f2470c09210d2386f890e2bde87040604770bd00bf2de9f04f81b04ef66c6a4ff29c560446ccf2ff0ac2f229064ff6ff77002547f67f784ff07f0906e048f2a351c0f24501bff32f8f8847d6f800b0bff35f8f3068bff35f8f01466ff39601b1f1005f07d10168514504d14168b1f57d7f00f096804ff47d7000f048fe002800f0bb804ff60c41cff6ff7100bf42182e3182f8f45382f8f55382f8f65382f8f75382f8f85382f8f95382f8fa5382f8fb5382f8fc5382f8fd5382f8fe5382f8ff5382f8005482f8015482f8025482f8035482f8045482f8055482f8065482f8075482f8085482f8095482f80a5482f80b5482f80c5482f80d5482f80e5482f80f5482f8105482f8115482f8125482f8135482f8145482f8155482f8165482f8175482f8185482f8195482f81a5482f81b5482f81c5482f81d5482f81e5482f81f5482f8205482f82154a0d14ff47d7141600121c0f800a08173a0f8c48180f8c391078447848784c784078547858785c785078647868786c786078747878787c78756e8001f59457ff459afbff35f8f00bf46e8000121b156e8001f5945f8d04de7002780f85b712a270821032380f85c71042780f8581180f85931102380f85d7180f85e1101214ff2250c074600f5ac7280f85a3180f85f1180f86031002c18bf0124c0f2470c012010210a2387f8614101b0bde8f04f604701b0bde8f08f00bf80b582b04ff0010ccdf800c000f002f802b080bd2de9f04381b04ff29c57c2f229073f68ddf820803c466ff39604b4f1005f10d13e684ef66c65ccf2ff05ae424ff0000904d17e68b6f57d7f08bfb946012804d013e04ff0000901280fd11c4615460e460746fff7d1fd2346044631462a463846002c18bfb9f1000f07d14af2736cc0f2460c01b0bde8f043604799f8460180b1b8f1010f7cd1d9f84001002189f84611a9f84411a0b342f68d41c0f2440188472ee0b9f844010121013080b2012898bf0846a9f84401d9f8400142f68d44c0f2440489f8461128b94846fff71ffec9f8400140b1a047d9f84001a4f140024ff4c8719047a8b199f84601002848d0d9f84001002189f84611a9f8441100b1a0474af2736cc0f2460c0120002100220023afe745f64d50c0f24600804701282fd1082089f84801032089f84901102089f84a01002089f84b01b22089f84c01062089f84d0189f84e01462089f84f01432089f85001012089f85101b9f844014ef6057c070a09f5a47289f8528189f85301c0f2470c012009210d2389f8547178e701b0bde8f08300bf80b582b04ff0050ccdf800c0fff734ff02b080bd2de9f04f83b04468002c00f0ba828368002b00f0b68204eb030b4ff000090027002614e047f64c63c2f207031b6845f69077c0f201073b44c6f83c310ceb0a0300275b451c464ff0000680f09a82a04618f9013b03f07f05bd40002b46ea050610d406f00703012b16dc0bb3012b40f08882abeb0803082bc0f0838204f10903dee700bfd84580f07c82182f07f107074446dcd975e200bf022b3ad0052b40f07082abeb0803042bc0f06b82631dc7e7d84580f0668294f90130002b04f10203bed55b4580f05d8294f90230b3f1ff3f04f10303b4dc5b4580f0538294f90330b3f1ff3f04f10403aadc5b4580f0498294f90430b3f1ff3f04f10503a0dc5b4580f03f8294f90530002b00f13a82a31d96e7d84580f0358294f9013004f1020c002b03f07f0a1fd5dc4580f02a8294f90270e31c07f07f05b7f1ff3f4aeac51a02dde0469c460fe05b4580f01a8294f9037004f1040c07f07f05b7f1ff3f4aea853a40f3ff809846abeb0c039a4500f20882f308672b1dd0652b7ff45fafbaf1060ffff45baf9cf80030462b7ff456af98f80230432b7ff451af98f80330012b7ff44caf4ff29c54c2f229040290cde9002118e0044660460e4651461746654600f036fcac4631463a46204636e748f2a3513046c0f24501bff32f8f8847dde900210298ac462768bff35f8f2668bff35f8f33466ff39603b3f1005f0bd133684ef66c65ccf2ff05ab4204d17368b3f57d7f00f0c2804ff47d70654600f09efbdde9002106460298ac46002e3ff406af4ff60c43cff6ff73f4182e3384f8f49384f8f59384f8f69384f8f79384f8f89384f8f99384f8fa9384f8fb9384f8fc9384f8fd9384f8fe9384f8ff9384f8009484f8019484f8029484f8039484f8049484f8059484f8069484f8079484f8089484f8099484f80a9484f80b9484f80c9484f80d9484f80e9484f80f9484f8109484f8119484f8129484f8139484f8149484f8159484f8169484f8179484f8189484f8199484f81a9484f81b9484f81c9484f81d9484f81e9484f81f9484f8209484f82194a0d14ef66c63ccf2ff0333604ff47d7373600123b37347f67f73a6f8c4317f2386f8c3314ff6ff734ff29c5433847384b384f38433857385b385f38533867386b386f38633877387b387f387c2f2290454e8003fbb427ff440afbff35f8f00bf44e80063fbb154e8003fbb42f8d034e7dc4580f00c8194f90470631d07f07f05b7f1ff3f4aea455a3ff7e1ae5b4580f0fe8094f90570002f00f1f98004f1060c4aea077ae5e698f8043098f8057098f80650032b47ea052837dd052b58dc042b78d0052b7ff440aed6f86c313bb147f64c67c2f207073f68db1b002b18dcd6f8703186f86a91c6f87091c6f82093a6f88c936bb10c4648f2a35180461846c0f24501174665468847ac4621463a46404647f64c63c2f207031b6845f69077c0f201073b44c6f86c310ee6012b3ff400ae022b00f08780032b7ff406ae17460c466546fff711fb03460298ac4621463a46002b3ff4f9ad96f84631002b3ff4f4ad304641f28831a6f8448109f0d9f847e0062b4ad0072b7ff4e7ad80464df6db50c0f24a0016460f466446804703465d1ea446394632464046012d3ff6d5ad981eb0fa80f04009fff7e3fba446394632464046c9e517460c466546fff7d5fa03460298ac4621463a46002b3ff4bdad96f84631002b3ff4b8adb6f8443143457ff4b3add6f8403186f84691002ba6f844913ff4aaad42f68d411846c0f2440188470298ac4621463a469ee5d6f87031c6f86c91002b86f86a91c6f87091c6f82093a6f88c933ff490ad0f4648f2a35104461846c0f24501164665468847ac463946324648e696f84631c6f83c91002b3ff47bad0446d6f8400165468846174686f84691a6f8449120b142f68d41c0f2440188474af273660120002100220023c0f24606b04720463a464146ac465ce54ff2a513c0f2490303b0bde8f04f184700bf7fb50646002806d1fff75efa002807d19de80f00064649f29b1cc0f24f0c60477fbd00bff0b583b01d46144609294ed106460f46f22d10d8a22160196155062141700b2181704af2bc51c0f20001033079440b22f9f79efb0e35204629464ff4807200f03df80546ff208df8080044f25220c0f20100019040f2c960c0f24800804798b148f27e30c2f2070000880122c1b264298df8072008d80721b0f5807f38bf03218df807108df80800f82d0cd8d221601961550621417005218170033001a90522f9f766fb0835394630464ef60577c0f2470722462b46b84703b0f0bd70b58ab00c464ff29c51c2f229010b68bff35f8f19466ff39601b1f1005f16d119684ef66c66ccf2ff06b1420fd15968b1f57d7f0bd1694605461846164600f039fc324628462825a24231d244e04d218df8001043218df8011001218df80210002115258df803108df804108df805108df806108df807108df808108df809108df80a108df80b108df80c108df80d108df80e108df80f108df810108df811108df812108df813108df81410a24213d3111b022910d30fd003398d420cd8c22201190255062048708d70c81c69462a46f9f7f0fa6019c41c20460ab070bd00bf46f65450c2f20700016840f2230cc0f2000cfc44c26861454ff001034ff0040008bf0223624508bf0820002a08bf1046002918bf184370472de9f04f81b04ff29c53c2f229031c68bff35f8f23466ff39603b3f1005f40f0cc8023684ef66c67ccf2ff07bb4240f0c4806368b3f57d7f40f0bf80d4f8bc310133c4f8bc314ff6ff739a4238bf134694f87471a4f8c03184f8c2011fb1002a18bf002907d1b4f8c6010130a4f8c60101b0bde8f08f94f87b010028f3d0d4f8840170b147f64c69c2f20709d9f80030c01a002805dd94f87501012809d101270ce0b4f8c8010130a4f8c80101b0bde8f08f94f87771012f18bf022794f87a510020eb0793468846adf80200adf8000012d0022f10d194f8790168b90df1020641f281556b46c0f25b05404611463246a84794f87a515a461646b2f5c86f28bf4ff4c86606f1150a504600f061f8002856d0bbf5c86f88bf45f08005d9f80010d4f8802153230271120a42710a0a8171c2710a0c090e03704d234172a02143700123c17200218370c57002728772017394f87911bdf802204173bdf800108373c173090a0174110a8174310a017500f115014274c6740746084641463246f9f70dfa4ff27d12c0f2470238465146904710f1800fd8bf6ff07f007e28a8bf7e20d4f8801184f8c501481c48f2a351c4f88001c0f245013846884701b0bde8f08fb4f8ca010130a4f8ca0101b0bde8f08fb0b54ff2a054c2f22904216846f23f52c5f28802b2eb510f48f25f514cf67e25c0f24501caf2101518bf25608847002804bf691c2160b0bd10b301684ef66c62ccf2ff0291421bd190f87b11c1b1d0f88411b1b147f64c62c2f207021368cb1a012b0edb1268d0f88801002808bf7047891a42f64d42c0f2440208bf01211047704710b590f875210021c0f8841180f87b11511eb1fa81f149f259624909c0f25902044640f20b10904710f1800fd8bf6ff07f007e28a8bf7e2084f8c4014ef6e374c0f25a04a04704f1bc00bde81040004700bf2de9f04f81b00429c0f0e980834600784d2840f0e4809bf80100432840f0df809bf80200012840f0da804ef66c684ff29c570d46ccf2ff08c2f229074ff6ff7600244ff07f0906e048f2a351c0f24501bff32f8f8847d7f800a0bff35f8f3868bff35f8f01466ff39601b1f1005f07d10168414504d14168b1f57d7f00f098804ff47d70fff752ff002800f0a8804ff60c41cff6ff7100bf42182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d7141600121817347f67f71c0f80080a0f8c41180f8c391068446848684c684068546858685c685068646868686c686068746878687c68757e8001f51457ff457afbff35f8f00bf47e8000121b157e8001f5145f8d04be79bf80310022905dc01290ed0022900f09e800ce003290dd0042908d190f8741129b101b0bde8f04fdce00d2d06d201b0bde8f08f044600f031f987e090f87b1119b390f87521002180f87b11511eb1fa81f149f259624909c0f25902044640f20b1090474ef6e37510f1800fd8bf6ff07f00c0f25a057e28a8bf7e2084f8c401a84705f1bc00804720469bf804100446012988bf002180f875119bf8051001f00302012a4ff0010198bf0a4680f877219bf80630012b88bf002380f878319bf80730022b88bf002380f879319bf808309bf8097043ea0723502b98bf5023b3f5f07f28bf4ff4f073a0f87c319bf80a309bf80b7043ea072341f28837bb4238bf1f46a0f87e719bf80c3080f8741103f0030380f87a3102f00103002103eb5202c0f88011c0f8bc11a0f8c01180f8c211c0f8c811a0f8c6117f2180f8762180f8c51100f009f8204600f04cf8204601b0bde8f04f78e000bfb0b5044690f87a01800758bfb0bd94f875014ef633750128c0f25a0507d105f1b000804705f58b71002088470ee005f5b670804794f87501012801d1002004e094f87701013818bf0120a84794f875014ff6ed120138b0fa80f0cff6ff7249f2015341097a44c0f2590340f20b10984710f1800fd8bf6ff07f007e28a8bf7e2084f8c301012084f87b01b0bd70b5044647f64c60c2f20700006894f87b1145f69075c0f2010500292844c4f8840108bf70bdd4f8880142f66536c0f2440658b94ff69130cff6ff707844002122460023b047c4f8880150b106f594718847d4f8880106f1e8022946bde87040104770bdb0b5044600f5c675082084f88c01032084f88d01102084f88e01002084f88f01c22084f89001062084f8910104f29311204600f065f84ff0280e4ef6057cc0f2470c012009212a462f2384f892e1bde8b040604770b54ff29c50c2f229000468bff35f8f20466ff39600b0f1005f46d120684ef66c61ccf2ff0188423fd16068b0f57d7f18bf70bd94f87b010025c4f8845100b394f8750149f259620138b0fa80f04109c0f2590240f20b1084f87b5190474ef6e37610f1800fd8bf6ff07f00c0f25a067e28a8bf7e2084f8c401b04706f1bc008047d4f8880184f8745170b142f68d45c0f24405a847d4f8880105f166018847002804bf0020c4f8880170bd70b505464d200870432048700120887095f874010c46c87095f87501087195f87701487195f87801887195f87901c87195f87c01087295f87d01487295f87e01887295f87f01c87295f87a01087395f87b01487345f64d50c0f246008047a073d5f880010026e073d5f88001000a2074b5f88201607495f883012675a074a020e074d5f8bc016075d5f8bc01000aa075b5f8be01e07595f8bf01207695f8c001607695f8c101a07695f8c201e07695f8c601207795f8c701607795f8c801a07795f8c901e07795f8ca0184f8200095f8cb0184f8210095f8c30184f8220095f8c40184f8230095f8c50184f82400fff79dfb84f82500d5f88401a0b147f64c61c2f207010a68821a012a0bdb0968401a44f6d35100f2e730c1f26201a0fb01018e0900e00026300a84f8266084f8270070bd00bf2de9f04182b04ff29c51c2f229010c68bff35f8f21466ff39601b1f1005f79d121684ef66c62ccf2ff02914272d16168b1f57d7f6ed194f8cc1179b394f8ce01c0070ad0d4f86c0178b347f64c61c2f207010968401a002827dd47f24c45c2f2070555f8040c002854d042f29707c0f24c074af6e908002607f5437101a8c0f24b0801968847a8b1032084f8cf612860b4f8d001c04702b0bde8f081d4f8d811c1b302b0bde8f0410847204602b0bde8f04133e0019841f60d56c0f24c06a861b04706f5af708047e861b847012084f8cf0103202860b4f8d001c047d4f8e001a0b10199d4f8dc21b4f8d271531a38bf8b1abb420ad2b4f8d41159b147f64c62c2f207021268101a884203d32046022100f078f802b0bde8f08100bfb0b590f8cc41002c4cd044f28442c2f200021188082911462cd0114631f8083f082b27d0114631f8103f082b22d0114631f8183f082b1dd0114631f8203f082b18d0114631f8283f082b13d0114631f8303f082b0ed0114631f8383f082b09d0114631f8403f082b04d032f8481f0829114614d14a68b2f5870f10d36ff35602012a0cd14a684ff65363cff6ff737b449a4204d1d0f8d821002a18bf4a60002180f8cc1190f8cd11b1b1002180f8cd1145f60a61c2f20701097869b947f24841c2f20701096839b14af68171c0f24b010546042088472846002c08bfb0bd0321bde8b04000e000bfb0b588b0044645f64d50c0f246000d468047012840f08f8008208df8010003208df8020010208df8030000208df80400ca208df8050006208df8060018208df8070047f26440c2f2070050f81c2c94f8cc11002a18bf0122002945f60961c2f207014b7818bf0232002b94f8cf3118bf0432002b4ff0410318bf08328df808304c238df8093001238df80a308df80b508df80c2050f8182c4ef605758df80d200268c0f24705130a8df80e208df80f30130c120e8df810308df811204268130a8df812208df81330130c120e8df814308df8152002698df81620120a8df8172009788df8181081688df819106821c2f2000109688df81a10090a8df81b1047f64c61c2f207010a68130a8df81c208df81d30130c120e8df81e308df81f2000680df10102c4f8dc0108680921c4f8e00101201f23a84708b0b0bd00bf2de9f04f83b0022902d24ff0ff35ece0cde901100120cff680704ef66c644ff29c56ccf2ff04c2f229064ff6ff77851c4ff0000947f67f7b4ff07f0807e000bf48f2a351c0f24501bff32f8f8847d6f800a0bff35f8f3068bff35f8f00ea0501b1f1005f07d10168a14204d14168b1f57d7f00f093804ff47d70fff7a1fa0028c3d04ff60c41cff6ff7100bf42182e3182f8f49382f8f59382f8f69382f8f79382f8f89382f8f99382f8fa9382f8fb9382f8fc9382f8fd9382f8fe9382f8ff9382f8009482f8019482f8029482f8039482f8049482f8059482f8069482f8079482f8089482f8099482f80a9482f80b9482f80c9482f80d9482f80e9482f80f9482f8109482f8119482f8129482f8139482f8149482f8159482f8169482f8179482f8189482f8199482f81a9482f81b9482f81c9482f81d9482f81e9482f81f9482f8209482f82194a0d14ff47d714160012104608173a0f8c4b180f8c381078447848784c784078547858785c785078647868786c786078747878787c78756e8001f51457ff45cafbff35f8f46e8000121b156e8001f5145f8d051e7044645f64d50c0f24600804701281dd1029d6978022916d00129204607d000297ff425af00210025fff77efe0fe0019f41f28831022f0ed14ff4fa730022012741f2883624e02046fff7fafd0025284603b0bde8f08faa78052f11d3eb782e79072f43ea062310d395f805c0ae79092f4cea0627e4d3ee792d7a46ea052607e041f288364ff4fa7301e041f288360127642b98bf64238b4228bf0b4690f8cc1180f8ce21a0f8d031a0f8d271a0f8d46171b147f24841c2f20701096800295ed001210446fff730fe0025c4f8e051bee744f28442c2f200021188082911462cd0114631f8083f082b27d0114631f8103f082b22d0114631f8183f082b1dd0114631f8203f082b18d0114631f8283f082b13d0114631f8303f082b0ed0114631f8383f082b09d0114631f8403f082b04d032f8481f0829114632d14a686ff00105b2f5870ffff483af0123cff680731a40012a7ff47caf4b684ff6c112cff6ff727a44934214bfc0f8d831d0f8d831002b3ff46daf4a60012180f8cc1199e74af60771c0f24b010420884720b105462046fff756fd5be70121204684f8cd118fe76ff0010553e700bf10b582b00c464df6cb61c0f24501884724b12178042901d1617809b102b010bda1780d29fad1e1780029f7d121790029f4d161790029f1d10028efd00168e029ecd10446fef7c2f9014620460029e5d004204ff6591e01904ff0000cc0f24e0e0020002100220e23cdf800c0f047204602b010bd3146fff7c3bf00bfb0b582b00c460546fef7a2f90146002d4ff0000018bf002901d102b0b0bd47f2fc70c2f2070000684df6cb61c0f24501884790b10068e0284ff00000edd129784ff6591c0191c0f24e0c0021002223460090e047012002b0b0bd002002b0b0bd08b530460921fff7cbff002805d002b045f28310c0f24400004744f62703c0f24603984708bd00bf08b530460a21fff7b7ff002805d002b045f28310c0f24400004744f62703c0f24603984708bd00bf08b530460b21fff7a3ff002805d002b045f28310c0f24400004744f62703c0f24603984708bd00bf10b589b38968012805d104460846fef7a3f9204628e039b30a794b798c79c97942ea032242ea044242ea016106291bd147f29121c0f24601044688470146204691b144f2e970c0f24400804701462046002918bf10bd49f21a30c0f2000078440c21fff761ffd4e710bd00bf10b5059c4ff20340c0f2460080472146fff7c0ff10bd00bfb0b5c4b0044600284ff0000000f0c78089b20b2940f0c380207838b96078092804d1a078612801d1e07810b1002044b0b0bdfef7dff80028f8d045f64d50c0f24600804701281cd00228efd103208df8070001200df107058df80800a81c21460b22f8f705fa4af66104c0f24604f02029460d220023a047b0fa80f0400944b0b0bd4ff29c50c2f22900006801466ff39601b1f1005fc9d101684ef66c62ccf2ff029142c2d14168b1f57d7fbed122797f21042a06dc012a0cdcbab1012a08bf00211ae0082a0bdc052a11d0082a08bf0a2112e0022a0dd0042a08bf01210ce0092a09d00a2a08bf0e2106e0092104e0022102e0032100e00b2180f80b1310216a2580f80c13a22180f80653152580f80e13062180f807531a2580f80f130c2180f80853132580f8101352210822022380f8095380f811134921012580f8042380f8053380f80a2380f80d3380f8121380f8135380f81453217900f5417280f815136179192380f81613a17980f81713002180f81813e17980f81913217a80f81a13617a80f81b13a17a4ff2250480f81c13c0f247040120e021a047284644b0b0bd00bf1fb5fff72bff002803d0bde81f4000207047bde81f4038b584b049f21f13c0f24703184710b5f0281bd1d1b1cab10c78032c16d10d2a1cbf0b2010bd487801281cbf0a2010bd45f64d50c0f246000c468047012803d1a01c0b21fff7fffe002010bdbde81040fdf7a7bc00bf4ff29c52c2f229021268bff35f8f13466ff39603b3f1005f10d1d2f800c04ef66c63ccf2ff039c4508d15368b3f57d7f02bf0023c2f8fc32c2f8003347f2c942c0f24d02104700bf4ff29c50c2f229000068bff35f8f01466ff39601b1f1005f0fd101684ef66c62ccf2ff02914208d14168b1f57d7f02bf0021c0f8fc12c0f8001347f2d940c0f24d0000472de9f04184b0dde90a76022f16d340f64705a94212d08eb13578412d0ed175784e2d0bd1014602f0bf0012284ff00d0008bf002b0ed004b0bde8f0810c9d0097cde9016546f63916c0f24d06b04704b0bde8f081082feed3b078012802d1f078022803d90d2004b0bde8f081002953d045f6f444c2f2060414f8040c81424bd12068002848d048f22732c0f254020d4608460221904700283ed024682088d8b36088c8b3a088b8b3e088a8b330797179b279f37940ea012040ea024050ea0368d0d04ff29c50c2f229000068bff35f8f01466ff39601b1f1005f1bd101684ef66c62ccf2ff02914214d14168b1f57d7f10d1f178a1b190f8fc22aa420cd1d0f80023424508d101295bd1082faad100f09bf875e0f07818b1082004b0bde8f081082f9fd1f9f77afec8b10646d0f86c010028f1d047f64c61c2f207010968401a0128e9db96f8fc0268b196f8fd02032809d00628e0d1304600f076f8dce7112004b0bde8f08146f63917c0f24d0707f53a60804707f539622846214690470120002786f8fd020df10f02304600210123a6f8fe7286f8fc52c6f800838df80f70adf80c7000f07ef861884af2bd6603abc0f24c0628460222b047384604b0bde8f081a7f1510189b24ff6b87291424ff00d0119d390f8fd02032808467ff42baf334613f8080fa7f108018ab280b9052a0ed9a1884af2bd67c0f24c072846b847002004b0bde8f081084604b0bde8f08101280dd1042a0bd3981810f8021c00297ff420af10f8010c00287ff41bafe0e702284ff00d0008bf062a7ff4fcae707b01283ff60fafd4e790f8fd120a1f022a38bf7047022905d0012907d1042180f8fd127047052180f8fd12704780b582b0052180f8fd120121adf8061045f6f441c2f2060190f8fc0209684af2bd6c49880df10603c0f24c0c0222e04702b0bde8804070472de9f04fc7b0054690f8fc0203920591d8b145f6f041c2f206010978884214d148f22732c0f2540202211c46904760b195f8fc0240f66502c0f255020021904718b100690088172802d247b0bde8f08f033880b2f42828bff42007af0b3807f101084ff000094ff0000a01900495029414e000bf0699cde94509adf810112121adf8121143f23d5144a8c0f255018847049d029c1ffa8af0a042d6d2a4eb0a01019a1ffa81fbb5f8fe1241235a45b8bf93468df81c304e234a1c8df81d300123a5f8fe22d5f800238df81e30059b1ffa8af08df81f30130a8df82410090a8df820208df82130130c120e8df82510b0fa80f18df823204a091ffa8bf111fa8afaa2458df8223008bf0232bbf1000f8df826202fd001390329039901eb000c01d2002115e04ff6fc700bea00020cf10103002100bf5e1816f8014c7d187078ec725c5cb67804318a422c736873ae73f1d1049d1bf003020dd01cf80160cb19012ade7207d00ceb01004178022a19731cbf8078587395f8fc020bf10b0406900b2010fa84f649f6cd713046c0f24c01884700283ff47eaf26f003031ffa84fc06f003025e426ff00303c1180433f518043581f8049081f8059081f8069081f80790f2d152b10344012a83f8049005d0022a83f8059018bf83f806900bf10e0202701b22442108230272220480f801908170c370417283723ff43dafbcf1040f01d2002214e047f6fc710cea0103002200bfb95c8618f17218f8021008eb020531736978ad78043293427173b573f0d11cf003033ff41fafbe5c00f10b01012b8e543ff418af561cbd5d022b8d553ff412af0232bb5c8b540de7f0b583b04ff29c51c2f229010c68bff35f8f21466ff39601b1f1005f4bd121684ef66c62ccf2ff02914244d16168b1f57d7f40d194f8fc12e9b3002840d002888a423dd145f6f446c2f2060616f8041c8a4235d1316899b3356894f8fd12032919d8d4f86c1139b147f64c62c2f207021268891a00290edc02218df80b100df10b020746204600210123fff78dfe2046fff75cfe38468278092a1bd141896b8894f8fd72994217d1032f3adc012f6ad0022f3dd004e018b181780939022901d203b0f0bd47f6ed31c0f24d0103b0bde8f040084794f8fd72032ff1d8a2f10d0102290cd2c178d1b302208df8040001aa204600210123fff757fe03b0f0bd092a08bf032fdcd14189aa889142d8d1c078002800f0818002200df105028df80500e6e7052f04d0042fcad1c07805262fe0c078002848d0062084f8fd0202208df807000df10702204600210123fff72cfe052fb5d02046fff7f9fd03b0f0bd4268002aadd00389a3f2012189b2b1f57e4fa6d34089082b48d12988884245d12046012108234ce0c0780526002808bf022650b102208df80a000df10a02204600210123fff701fe6988012294f8fc024af2bd67adf8082002abc0f24c07022284f8fd62b84703b0f0bd052f15d1002094f8fc523668c4f8fc02c4f8000347f2c944c0f24d0404f11000804728463146224603b0bde8f0401047032084f8fd0201208df806000df1060272e7e98888427ff457af2046022103e0204603210022002303b0bde8f040bfe506290ad14178012907d18178653911f1630f02d3c178012902d94ff0ff307047f0b581b00179427941ea022540f6b8318d421fd80646fdf7fdfbd8b1f9f75cfbc0b10446d0f8d80342f66537c0f2440758b941f26f60c0f200007844012100220023b847c4f8d80320b107f1e8022821904718b14ff0ff3001b0f0bdb078f178d4f8e4230023c7f6e07340ea452003ea425240ea0120bff35f8f1043bff35f8fc4f8d403002001b0f0bd00bf02293cbf4ff0ff3070472de9f04f9bb00278437842ea0325b5f5007f04d94ff0ff301bb0bde8f08f4ef66c6a4ff29c56ccf2ff0ac2f229064ff6ff774ff0000b4ff07f090791099008e000bf48f2a3512046c0f24501bff32f8f8847d6f80080bff35f8f3468bff35f8f20466ff39600b0f1005f07d12068504504d16068b0f57d7f00f09a804ff47d70fef7d5fa002800f0928004464ff60c40cff6ff7000bf21182e3081f8f4b381f8f5b381f8f6b381f8f7b381f8f8b381f8f9b381f8fab381f8fbb381f8fcb381f8fdb381f8feb381f8ffb381f800b481f801b481f802b481f803b481f804b481f805b481f806b481f807b481f808b481f809b481f80ab481f80bb481f80cb481f80db481f80eb481f80fb481f810b481f811b481f812b481f813b481f814b481f815b481f816b481f817b481f818b481f819b481f81ab481f81bb481f81cb481f81db481f81eb481f81fb481f820b481f821b4a0d14ff47d7060600120a07347f67f70c4f800a0a4f8c40184f8c39127846784a784e78427856785a785e78527866786a786e78627876787a787e78756e8000f40457ff455afbff35f8f00bf46e8004028b156e8000f4045f8d049e70024ddf824805db1fdf7e2fa0146002c4ff0ff3018bf002902d11bb0bde8f08fb5fa85f040094ff000098df82c908df82d908df82e908df82f908df830908df831908df832908df833908df834908df835908df836908df837908df838908df839908df83a908df83b908df83c908df83d908df83e908df83f908df840908df841908df842908df843908df844908df845908df846908df847908df848908df849908df84a908df84b908df84c908df84d908df84e908df84f908df850908df851908df852908df853908df854908df855908df856908df857908df858908df859908df85a908df85b908df85c908df85d908df85e908df85f908df860908df861908df862908df863908df864908df865908df866908df867908df868908df869908df86a908df86b90bcb1d4f87021a2b14ff4006304e03f683b44b3f5403f0cd2d718be680136f6d07e68033626f0030609eb060101f11009ede7002d4ff0020a039500f00581ddf81cc0acf102020a2ac0f00081002608eb0a0b9bf801504ff0ff30012d3ff648af9bf802209bf803309bf8047042ea03229bf8053042ea074747ea0361a1f1011212f5803f0a91fff433af9bf808109bf809e0029141ea0e210af10a020497aceb02034f1e9f42bff423afcde905269bf806209bf807300a9e42ea032cb6eb0c07fff416afb9423ff613af18f80a70089147ea052a4feada000ba90e5c07f00705012707fa05f5354240f001830e5c45ea06050d5407994ff6ff75c0f20205b4b3d4f8700198b317461a0201924fea0e264ff4006200eb0208d8f8083053454bd0d8f800301a44aa4221d800eb0208d8f80830534540d0d8f800301a44aa4216d800eb0208d8f80830534535d0d8f800301a44aa420bd800eb0208d8f8083053452ad0d8f800301a44aa42d3d900bfbcf1000f40f0bc8204980a464ff6fc710330c0f2030108404844944600f1100908980599069e00eb010a0398013686424ff0000028bf0120ddf824804fd2aceb0a02092a3ff64caf49e0d8f804000a9a904240f09582d8f80c006045c0f0908236d9089aa0eb0c00824200f289827ab3029831180198c1f1000cc2199044a1f1010e002208eb02050beb0203287c9e7ab04240f0758296451cd06e7cdf7abe4240f06e820ceb0207be1c13d0ae7c187b864240f06582079ef81c07d0e87c5b7b984240f05d8204329142dbd1b446a7e78c46a5e7ddf81cc0a2e7ddf81cc0002800f04e82baeb0c004ff0000118bf0120b9f53e3f88bf0121014303980028c1f100003ff43eae00297ff43baed4f870b1bbf1000f40f08b804ff44030fef764f8002800f02d82834600206ff0200100220beb02030bf8020040320beb0107b2f5006f01f1400158709870d870187158719871d871187258729872d872187358739873d873187458749874d874187558759875d875187658769876d87618775877987787f8400087f8410087f8420083f8220083f8230083f8240083f8250083f8260083f8270083f8280083f8290083f82a0083f82b0083f82c0083f82d0083f82e0083f82f0083f8300083f8310083f8320083f8330083f8340083f8350083f8360083f8370083f8380083f8390083f83a0083f83b0083f83c0083f83d0083f83e0083f83f0093d14ff43e30cbf800080020cbf804084ff0ff31cbf80c084ff40060c4f870b1cbf80818c4f820034ff6ff760221c0f202064ff000090ae00aeb080109f10109ddf8248099454ff000003ff497ad08eb010518f801006f78cdf81c900a9195f802c0eb7895f804906a7995f806a0e97995f808e06d7a40ea072808955cb3012f29d84ff400670beb0705a868404500f0a28028680744b7421dd80beb0705a868404500f0988028680744b74213d80beb0705a868404500f08e8028680744b74209d80beb0705a868404500f0848028680744b742d7d94cea032040ea094040ea0267f81c20f00300d4f82093cdf818a000f1100a0020cde904e10297b9f1000f26d00beb09035bf809105a68514580f09b80eab10beb02005bf80210d0f80490514580f08c80b9f1000f11d00beb09035bf809105a68514580f0868042b10beb02005bf80210d0f804905145d6d376e000204ff400694ff4006504e000bf3d44b5f5403f23d20beb05018a685bf805700132f4d04868ca68033020f0030000f110060beb09001032f7f75df94168c2684bf809608368d4f870b18a424ff00001b14408bf00f110014bf82310d7e7c9f540310f294ff00002c4f8202310d90beb09004bf809104ff0ff3142608160c260c4f820930ae0e868039b0a9a089f60e010b10268114401604ff000090020b9f1000f7ad00beb09035bf809105a68514522d2002a71d00beb02005bf80210d0f80490514513d2b9f1000f66d00beb09035bf809105a6851450ed2002a5dd00beb02005bf80210d0f804905145d7d30546cc469146184601e01d469446a1eb0a0110290fd309eb0a020beb02034bf802104ff0ff31c3f804c0996000219446d960c5f800a0039b0a9addf818a0dde904e1089f00280cbfc4f820c3c0f804c002984ff6ff7668600020c0f20206c5f80880e8604aea0121ddf81c904eea072a814202f10a087ff4c0ae05f1100778180999524641449b46f7f772f8e9685b466868aa68d4f870b15144e96081424ff0000018bf07464bf82270a6e600204ff400684ff4006703e02f44b7f5403f23d20beb07018a685bf807500132f4d04868ca68033020f0030000f110060beb08001032f7f791f84168c2684bf808608368d4f870b18a424ff00001b04408bf00f110014bf82310d7e7c8f5403200210f2ac4f820130dd90beb08034ff0ff304bf8082059609860d960c4f820831bb0bde8f08f00281ebf0168114401604ff0ff301bb0bde8f08f00bf02293cbf4ff0ff3070472de9f04f8bb00278437842ea0325b5f5007f00f2f08005eb4502022303eb4202914240f0e8800590fcf7bbfe002800f0e2804ef66c694ff29c56ccf2ff09c2f229064ff6ff77002447f67f784ff07f0b06e048f2a351c0f24501bff32f8f8847d6f800a0bff35f8f3068bff35f8f01466ff39601b1f1005f07d10168494504d14168b1f57d7f00f096804ff47d70fdf7e0fd002800f0af804ff60c41cff6ff7100bf42182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d7141600121c0f800908173a0f8c48180f8c3b1078447848784c784078547858785c785078647868786c786078747878787c78756e8001f51457ff459afbff35f8f00bf46e8000121b156e8001f5145f8d04de7d0f870c10495bcf1000f20d000234ff4006104e03f683944b1f5403f0bd20ceb0107be680136f5d07e68033626f0030633441033eee775b9b3f53e3f40f2e0804ff0ff310bb0bde8f04f08467047002d00f0d680002305994ff0000901f1020a153103914ff0ff31059109eb49060aeb46056c784ff0ff31012ce3d8af78ea7857ea022e1ebf2a796d7952ea0528d9d0bef5207fd6d8b8f5f07fd3d80ef10102520802fb08fb4ff6fb724ff6ff779345c0f20207c6d81af81610059e41ea0421039cb9f1000f28d014f8132c14f8125c42ea05228a42b3d0feb114f80d2c14f80c5c42ea05228a42aad0012e15d014f8072c14f8065c42ea05228a42a0d0022e0bd014f8012c257842ea05228a4297d0043e721c04f11804d6d15646bcf1000f2fd00bf105054ff400640ceb040adaf808208a4230d0daf800201444bc4220d80ceb040adaf808208a4225d0daf800201444bc4215d80ceb040adaf808208a421ad0daf800201444bc420ad80ceb040adaf808208a420fd0daf800201444bc42d3d94ff6fc720bf10801c0f201021140194401f1100320e0daf80410a9427ff44fafdaf80c10a9427ff44aaf9af8101004297ff445af9af811109af8122041ea022171457ff43caf9af813109af8142041ea022141457ff433af049909f1010989450599b24601f1010105917ff43dafb3f53e3f3ff624af00240025019019e000211fe7d0f870c14a688b684ff6ff7793454ff00002c0f20207c1f80cb008bf01f110024cf82320013575454ff000013ff408af05eb45000aeb40011af8100091f8018091f802e091f803b091f804904979bcf1000f40ea082605912cd0b8f1010f29d84ff400610ceb01039a68b24200f0a8801a681144b9421dd80ceb01039a68b24200f09e801a681144b94213d80ceb01039a68b24200f094801a681144b94209d80ceb01039a68b24200f08a801a681144b942d7d94eea0b21059b013149ea0322490801fb02f75a4607f1050b8df81d004fea1b208df820004fea1b408df8210005208df82500042001218df8270048468df81b1003908df82a000df11b0011218df81c408df81e808df81fb08df822408df824408df823408df82640cdf808e08df828e091468df829208df82b30fff797f800287ff482ae01980021d0f870c1bcf1000f3fd0ddf810e0b8f1010f3cd84ff400630ceb03018a68b24235d009680b444ff6ff71c0f202018b4226d80ceb03018a68b24228d009680b444ff6ff71c0f202018b4219d80ceb03018a68b2421bd009680b444ff6ff71c0f202018b420cd80ceb03018a68b2420ed009680b444ff6ff71c0f202018b42cbd9002104e0ddf810e02ee7ddf810e0002f3ff41aaf4fea0922029f059b42f001023a44039f1b0252083b4353435a1e032a01d200220ae023f0030700228e18043297427475b475f4753476f7d113f003033ff4f8ae01f11507012bbc543ff4f2ae3a44022b547018bf9470ebe62de9f04f81b04ef66c644ff29c55ccf2ff04c2f229054ff6ff7600274ff0010a47f67f7b4ff07f0807e000bf48f2a351c0f24501bff32f8f8847d5f80090bff35f8f2868bff35f8f01466ff39601b1f1005f07d10168a14204d14168b1f57d7f00f094804ff47d70fdf702fb002800f005814ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ff47d710460416080f80ea0a0f8c4b180f8c381068446848684c684068546858685c685068646868686c686068746878687c68755e8001f49457ff45aafbff35f8f45e8000121b155e8001f4945f8d04fe7d0f88813002974d104464ff41630fdf769fa014600284ff0000069d0002200bf8b1888544032b2f5163f58709870d870187158719871d871187258729872d872187358739873d873187458749874d874187558759875d875187658769876d876187758779877d87783f8200083f8210083f8220083f8230083f8240083f8250083f8260083f8270083f8280083f8290083f82a0083f82b0083f82c0083f82d0083f82e0083f82f0083f8300083f8310083f8320083f8330083f8340083f8350083f8360083f8370083f8380083f8390083f83a0083f83b0083f83c0083f83d0083f83e0083f83f009ad1c4f8881300e00021084601b0bde8f08f00bf2de9f04f93b04ff6ff75a9424ff0000c2cd0dde91c874ff4805ecde90aecd0f89ce3cde90087229fdde920a9dde91e6b249c0697239f0aadcdf840c0cde911eccde90845cde9026bcde904a90546079704f0f0fd84464cb1bcf1000f06d19df8480095f8a013084385f8a003604613b0bde8f08f2de9f04f93b00446002047f64c65a4f8a003c2f207052868002a89461abfc4f894030146d4f89413401ac4f89c03fcf749fa002800f05a81d4f88803002800f0558104f01fff002800f050810646b4f88c03002853d0a0f10108d4f89c0300254ff4a0714ff4f0774ff4805acde911050df1280bcde901152046414632464ff42073cde90aa51095cdf824b0cde90755cde90555cde90355009704f091fd002840f02481d4f89c034146cde91105012008904ff4a0700190204632464ff420734ff4f077cde90aa51095cdf824b0cde90655cde90455cde90255009704f070fd002840f003819df8480094f8a01347f64c65084384f8a003c2f2070506e0d4f8881330464ff41632f6f71afb4ef66c684ff29c57ccf2ff08c2f229074ff6ff764ff0000a07e000bf48f2a351c0f24501bff32f8f8847d7f800b0bff35f8f3868bff35f8f01466ff39601b1f1005f07d10168414504d14168b1f57d7f00f098804ff47d70fdf706f9002800f0c4804ff60c41cff6ff7100bf42182e3182f8f4a382f8f5a382f8f6a382f8f7a382f8f8a382f8f9a382f8faa382f8fba382f8fca382f8fda382f8fea382f8ffa382f800a482f801a482f802a482f803a482f804a482f805a482f806a482f807a482f808a482f809a482f80aa482f80ba482f80ca482f80da482f80ea482f80fa482f810a482f811a482f812a482f813a482f814a482f815a482f816a482f817a482f818a482f819a482f81aa482f81ba482f81ca482f81da482f81ea482f81fa482f820a482f821a4a0d14ff47d7141600121817347f67f71a0f8c4117f21c0f8008080f8c311068446848684c684068546858685c685068646868686c686068746878687c68757e8001f59457ff456afbff35f8f47e8000121b157e8001f5945f8d04be7064604f0f7fd002e18bf002803d1012089f8050022e0c6f864014ff0010a4ff4f07086f868a101904ff420704af61f4c0090c0f2470c00200021002200230027e04730b186f86871c6f8647189f805a004e099f8050089f804a030b14ff0ff3013b0bde8f08f0026cbe794f8a00384f8a10338b3d4f8900342f66536c0f2440620b129682d31c4f8981310e044f64d60c0f200007844002122460023b047c4f89003296801f12d01c4f8981320b106f1e8022d21904728b1002084f8a10313b0bde8f08f002013b0bde8f08f80b582b04ff4f0704af61f4e01904ff4207cc0f2470e0020002100220023cdf800c0f04702b080bd022a3cbf4ff0ff3070472de9f04fadf2245d1e9008784f788c1850ea072001f102071f9002f07b82209300231d94a74202f06f82781ca04202f06b8238787978ba1c40ea0121a01a814228922b9102f260822098ddf870253290ddf84805ddf868153390ddf84c053b913490ddf8500522933590ddf854053690ddf858053790ddf85c053890ddf860053990ddf864053a901068411e0028116002f03a822b98002802f036822b98841c032c02f03182fe78072e02f22d82289890f800e0f00702d107f1040829e02b9820f00100022802f01f8297f804907d791e9849ea052a514632aaf04602f023fa002842f01182ddf85405c64607f10608012d36900dd8ddf87005806948b14feada0209f00701835c012505fa01f119438154b00707eb040bcdf88cb005d44ff00009042e29d2a1e000bff246d84504d018f9014b4ff0000903e000244ff00109d84645f64d55c0f24605a847012808bf0134601e81b2670800ebd130002c48bf4710a8470128369808bf7f42ddf88cb03844d6463690042e78d3b9f1000f42d1d84540d0424612f8011b36985a453dd098f8012008f10203120642ea01415b4500eb214c3ed008f1030298f802105a4534d098f8032008f10403120642ea01415b454fea214129d008f1050398f804205b4500f0898698f8057008f106035b4542ea072200f0808608f1070798f806305f4501f0b48298f8077008f108083f024ff0000915e03698002100e0d84600eb010c4ff001090022002108e04ff00109002203e04ff0010900220021d846002300273b43379f62440b447fb1dde93876dde93a40bc45d8bfbc46b142d8bf3146a242a8bf22468342a8bf0346ddf88cb00120cde938c1cde93a233790b9f1000f42f04a81bef1040f40f38380bef1060f40f3f280bef1070f00f0e682bef1080f00f06b81bef1090f42f03681d84502f0338118f801cbd84542f02e81bcf10f0f02f22a81ddf86c05002801f04f8337993298dde9342a002900f006863399dde939733b9e994227eae775b8bf0b46b242b8bf1646b542319681f2388338994fea630b21eae1794fea0c112f91319909f10104491b4fea590e4cea0c1211f003084fea540130942e9100f0d786994581f23e8205fb0a045feac97171464e4609d014f80e10309e01f0f00141ea0c0104f80e102e99594521442d9681f21a8204eb0b060c4604f8012bb44281f014828f1cb7424a7081f01082cf1cb7428a7081f00b820f1dca70b7423946ead301f004ba00bfbef1020f36dcbef1010f00f09f81bef1020f42f0b8803298dde933a530903798dde935412a90ddf87005dde93a32c0694ff000093e90d84524a8dde93867cde9428bcdf81091cdf8fc9029922793c2c000f0a48208f10100429098f80090584500f09c8208f10200429098f801004fea002897e2bef1030f00f0ca81bef1040f42f08180ddf87005dde932cec069dde93473dde93691dde93826dde93a5a002440943c90d8453d943eac2ca8cde93e8bcde92f7ecde9292680e80a1000f0e98208f101003e9098f800405845319400f0e38408f102003e9098f801003eac4fea002b00f0debcbef1050f00f02782bef1060f42f04880d84502f0458008f10100584502f0408008f10200584502f03b8008f10300584502f0368008f10400584502f0318008f10500584502f02c8008f10600584502f0278008f10700584502f0228008f1080cabeb0c001028c2f01b8008f11800584542f0168098f8040098f8051050ea01261ebf98f8060098f8071050ea012502f0078098f8000098f80120339940ea0224081bc1f0fd87864201f2fa8798f8020098f80330349a40ea0327d01bc1f0f087854201f2ed87ddf86c05002801f0128235980df1d80e329b30909ee8014fcdf8c4e0cde906478de8010f1846dde93037cdf828c0cde90865059704f00ef801f0f9b93298cde94a8b2e9033980021309034980df59479319035980df584782f903698dde937a62d90ddf87005dde93954c0693b9f4c91cde942014846414602f076fa83464846414602f071fa4c99002940f04084dde94a21a846319d8a4200f03984531c8b4200f03584931c8b4200f03184d31c8b4200f02d84131d8b4200f02984531d8b4200f02584931d8b4200f02184d31d8b4200f01d8402f108038b4240f0188411785378d646b446ba4651ea03264ff0ff3700f00f849378d17853ea01212c9100f00884b6f5207f00f204842c99b1f5f07f00f2ff83917925960f29279100f2f983d379102b299300f2f4832a901079ddf8706524904399306a53790843ddf86c153062002901f08a842d982599084440428345c1f283842d9830990027081a834580f2d7832c982a9a40428242c0f2d1832a9aaa4280f2cd83bef1000f01f087842ceaec70269028eae87018903098a042a8bf204630905545a8bf554601f07abcd84501f01a87424612f8010b012801f21487329900282a9133992f913499319135992c91dde936c1309138992991399927913a9926913b99249100f01f825a4501f0fb8608f102025a4501f0f68608f103025a4501f0f18608f104025a4501f0ec8608f105025a4501f0e78608f106025a4501f0e28608f107025a4501f0dd8608f108025a4501f0d88698f8012098f8023098f8046042ea032398f8032098f8054098f8061042ea0622259244ea012a98f8071098f8082008f10904159441ea0221fee1abeb0806052ec1f0b68608f1050ada4501f0b18608f1060998f80540abeb0900a042c1f0a88609eb0400584541f0a38632981c90339831903498269035981b90dde93650309038982d9039982e90dde93ab02f90c4b1002703e000bf0137a74212d219f8070001381e28f7d909eb0700e11b4aaa42ab02f083fd002801f07b864a980744a742ecd3ddf86c05002801f09c8030982c954546002800f062832d9820eae0702d902e9820eae070219031985845a8bf5846319026982f998842a8bf0846269050e3d84501f0558608f10100584501f0508608f10200584541f04b8698f8001098f80100dde9375441ea0021ddf870050df1c80c0990ddf86c059ce80c10089004a8dde93576dde939aeddf8ec9080e810441e98cde900c7cde90265cdf81c9003f0bcff0746c0e2ddf87005dde93432c069dde93691dde93876dde93a4a5d46cde9428b4ff0000b3e90a8452ea8dde932cecdf810b1cdf8fcb03193cde92964279780e80450cde92c9172d008f10100429098f800b0a8426bd008f10200429098f80100070267e0012044904ff0000842ae3eaf3046394602f0b2f831903046394602f0adf84499074600292f9469d0d3462c46002600202d9001202e963e464490002042af0df1f80a2c903846514602f096f805463846514602f091f84499002940f060828446dde942014ff0ff37884240f05a82319b002b00f15682002e00f15382ddf870253f98116a239508431062309848ea09054a904ff6fe7085422f98da46cde94bb44d9000f0a2834ff6ff70854240f081831e98d0f888934ff420704b904ff4f0704c904ff4a0704d9091e301204490002742ad3eac2846214602f04ef881462846214602f049f8449959b34ff0ff361d9c229b374617e20020319000e2dde94201884291d0024612f8016b8a42429200f02683821c429243788a4246ea032600f01e83c21c429283788a422d9300f09686011d4291c0782e963e46d3462c4600027ce78046dde942108142ced00a4612f801cb8242c9d08c1c4d78011ba9424ff0ff36c4d361198142c1d1ddf870253f98116a08431e9910620029b8d0d1f870110029b4d047ea0b070020b0eb572faed151f827000028aad0401a8207a7d16ff4403240f60f030244cff6fd739a429ed30a1852f8081cb94299d152f80c3ca3f1011111f5803f92d3002acde92557cde923c43ff48caf52f8041c99427ff487af1446c0f54030269a83423ff680afddf870051d46806940b1d2080bf00701835c012707fa01f119438154c12dfff46faf207801287ff46baf2598002801f08980dde9247ba4f13f0601f01bb85a4501f0dc8408f102025a4501f0d78408f103025a4501f0d28408f104025a4501f0cd8498f8012098f802609300710098f8032098f80460259108f105014fea820a15917100baf1000f169101f0b7841699002901f0b3842f99ca1ac1f0af84924501f2ac843199259a8a1ac1f0a7841699914201f2a384309903eb0c06084301d000230ce05feacc704ff0000307d1002e05d42f990aeb06008842d8bf0123159d169aabeb05001390ddf86c0502fb0af8b0fa80f04009184300244feac0794ff0000e1493cde9179822e02c992a9b07fb013b53081bf803702e9907f00f0c07f0f0070f44d2072d9908bf4cea01070bf80370ddf88cb021998e44dde91b128a424ff0000188bf01210c43e10708bf1544e10704d0f04507d801f050bc00bf5d4518bff04540f20782bbeb050701f0468429780b0901d0012211e0012f01f03e846b780bb102220ae0042fc1f03784aa78eb7852ea032301f03184042200bf1c92a8eb0e02934201f229842598b9f1000f21931b97bfd101f00f022e92219a0901012acde919542d912fd14ff0000c2199ddf88cb0dde91954dde91798c907aad00ceb0e01b1fbfaf202fb1a1117188a1957ea02019fd42f998a429cd231998f4299d2309900293ff480af29998a4292db27998f42fff68faf26998a42bff68baf24998f42fff671af85e72f9d22f0010b4ff0000c16e02c992a9b2e9f04fb01315308cc5cd20704f00f0504f0f0043c442d9a08bf45ea02042f9dcc540cf1020ce345b4d00eeb0c02b2fbfaf404fb1a2704eb000907eb060859ea080428d4a84526d23199894523d2309959b1299988451edb279989451bdb2699884518da2499894515da2c992a9b4fea580709fb01342e9de15d2d9801f00f0301f0f00129445feac8752f9d08bf43ea00012598e155511cb1fbfaf202fb1a1114188a1954ea0201bbd4aa42b9d231998c42b6d230990029a0d029998a42b0db27998c42addb26998a42aada24998c4294dba6e73eac012040904ff0000b3caf2046394601f034fe80462046394601f02ffe409941b14ff0ff371d9c229b002f00f08b8501f05dbbdde93e129142f2d011f8016b9142eed1ddf870353d991a6a11431e9a1962002ae5d0d2f870114ff0ff370029e1d0319a1d9c4bea020b0022229bb2eb5b2fdad151f82b20002ad6d0a2eb010e5fea8e72d1d16ff44032bc4640f60f077244cff6fd77ba426746c6d301eb0e0c5cf8081c594507d15cf80c1ca1f1011212f5803f80f0db844ff0ff37b5e70ceb0c110afb02f2f5f73bfb00f03abd00234ff00109d846fff79eb9002021902d90052e01f004831c98002801f00083fbf715f9002801f0fb829af8008008f10600864241f0f48247f65420c2f207000768002f01f0ec82387b797bba7bfb7b40ea012040ea024040ea0363a3f1810010f1800fc1f0dc82387c797cfa7c40ea0120b97c40ea014040ea02601090813810f5817f41f2cc82b8f1000f4ff000002e9317972f9079d0ddf884a04ff0000e00270ae000bf00f100404aa941f826000137474506f1010e17d219f807007646411e1e29efd909eb0700a8eb070142aa3eab02f0aaf900283ff43caf42993e984aaa0f4442f82600e3e7bef1000f00f0dd80aef101094ff000080df5947a09e0be46c14508f10108a6f101060af1040a00f0c8804aa850f828100029f1d40020434686421dd00aeb80077a68b2f1ff3f18dc5a1c914514d0ba68b2f1ff3f11dc9a1c91450dd0fa68b2f1ff3f0adcda1c914506d03a690433002a00f10400e0d400e00022179842ab3eac7746009402f0e8f900283ff4eeae3e980028c0d04af20d3142a8c0f24e018847b9e701204ff0000e88e0d3462c4664e45d4508bff04541f03e82ddf86c05002818bf012014990840012840f05e842c9b2a9825994fea5a0701fb0300139900eb5602169800970190159801f0f5fa002840f04b8401f01fba2f4600f041bc1e9829464aaa674601f025fa00287ff4adaeddf87005319b8069bc4660b10021b1eb552f08d1ea0809f00701875c012505fa01f139438154ddf828912e9a239db9f1000f3ff492ae002a4ff0ff371cbfdde92c1051ea00083ff48aae4b999942fff486aec91a8a423ff682ae4c99b142fff47eae891b88453ff67aaeddf86c15002700293ff474aea5f1011111f1021f7ff66eae2a99002900f02685259921eae17b269921eae17527998a45a8bf8a4629998c42a8bf0c4600f019bd0020ddf884a002e04ff0000e01202a7995f800c095f80180ab78ef7895060f2102f00f0601eae575754389214d43ed0a8df8f8500e25309212f0200f08bf012506fb05f501fb05f54fead5258df8f9504ff00d0508bf022506fb05f501fb05f54fead5258df8fa504ff00c0508bf032506fb05f501fb05f54fead5258df8fb504ff00b0508bf042506fb05f501fb05f54fead5258df8fc504ff00a0508bf052506fb05f501fb05f54fead5258df8fd504ff0090508bf062506fb05f501fb05f54fead5258df8fe504ff0080508bf072506fb05f501fb05f54fead5258df8ff504ff0070508bf082506fb05f501fb05f54fead5258df800514ff0060508bf092506fb05f501fb05f54fead5258df801514ff0050508bf0a2506fb05f501fb05f54fead5258df802514ff0040508bf0b2506fb05f501fb05f54fead5258df803514ff0030508bf0c2506fb05f501fb05f54fead5258df804514ff0020508bf0d2506fb05f501fb05f54fead5258df805514ff0010508bf0e2506fb05f501fb05f54fead5258df806514ff0000508bf0f256e434e43f60a00288df8076140f022824fea086242ea0c412c9a380602eb21492e9940ea0340ddf85c80aef1010501eb204000260f90cdf84ce0119507e001f01f000b3801367645814400f0f8814aa850f82610b1f1ff3ff1dd33469d421cd04aa800eb83004268b2f1ff3f16dc0133ab4212d08268b2f1ff3f0fdc0133ab420bd0c268b2f1ff3f08dc0133ab4204d002690133002ae1d400e00022404642ab3caf009702f033f8002800f0d0813c990029199100f0ba819df810019df81111149650ea0125cdf8589000f09f819df814719df815613f0447ea0667109e9df80f019df80e112e444fea002c41ea00229df8120106eb27470f9e9df813310004f71b169e40ea03604ff0010e06eb204924920eeb5202031418920ceb010201f0030009f10101159109f10201129119992997571e1a97f718f31a01312590101a2a910eeb52012d9a2f90d8074ff0000b2e90f80727912c90239509e000bf2a9827990bf1010bab4508442a9000f04e8129980beb00035345f1db26988342eeda24980028ebd0dde91b104ff0000803fb01071a98032880f09c802598ddf884a0239d0028dbd0dde9181001230bfb010c30984fea58011cf8011000f0100083ea1014c8b201f00f035feac87e08bf03091846002b18bf01202043012815d108eb0906964211db319886420eda7008395c3eadeb5c01f00f0501f0f0011943f60708bf45ea0311239d395425980128a6d008f1010040081cf80000bef1000fc1b24fea111a08bf00f00f0a5ffa8af0002818bf01202043012817d1159808eb0003934212db319883420fda5808395c3eae16f80a6001f00f0501f0f0013143db0708bf45ea0611239d39542598ddf884a002283ff474af08f1020040081cf80000bef1000f00f00f03c1b208bf0b091846002b18bf0120204301287ff460af129808eb00069642fff65aaf31988642bff656af7008395c3eadeb5c01f00f0501f0f0011943f60708bf45ea0311239d395445e7ddf8a8c008e000bf2f9808f1040840450cf1020c3ff458af30981cf8016c00f010030120f6b2002580ea13130f2e88bf01251d43012d09eb080a15d1924513db3198824510da4fea5a053609795d3ea8865d01f00f0401f0f00131435feac97008bf44ea061179551cf8010c10f00f0e704618bf01201843012818d10af10106964214db3198864211da7008395c3eaa12f80e6001f00f052e9c2d9a45ea061501f0f001002c08bf41ea06053d549cf80000c6b200200f2e88bf01201843012816d10af10205954212db319885420fda690830097e5c3ead285c06f00f0506f0f0062c9c0643002c08bf45ea00167e549cf8000010f00f06304618bf0120184301287ff481af0af103039342fff67caf31988342bff678af5808395c3eab9b5d01f00f062e9d46ea031601f0f001002d08bf41ea03063e5466e74af20d3142a8c0f24e0188479df80c019df80d11dde91698119ddde913e605e09df80c019df80d11ddf84ce040ea012002e6002007e000274ff00109d846fef764bd4ff0ff302f901d9c229b2f9ffff765bbd3462c46fff7e7b80f4600e04f1cd90708d02d99994205da39782f9c01f00f0121433970b8f1010f05f1010700f0d480994537da07fb0a045feac97171464e4609d014f80e10309e01f0f00141ea0c0104f80e102e99594521442d9614da04eb0b060c4604f8012bb4420fd28f1cb7424a700cd2cf1cb7428a7008d20f1dca70b7423946edd302e00f4600e04f1cd90708d02d99994205da39782f9c01f00f0121433970b8f1020f05f1020700f09480994580f2908007fb0a045feac9717146c8460ad014f80e10ddf8c08001f0f00141ea0c0104f80e102e995945214414da04eb0b060c4604f8012bb44268d28f1cb7424a7065d2cf1cb7428a7061d20f1dca70b7423946edd35be00f4659e0bcf1000f4ff0ff373ff4d8aa5cf8042c8a427ff4d3aacef5403291423ff6ceaacde92660ddf87005806950b1319a4feadb0302f00702c65c012404fa02f23243c2546046002242ab00f077fe00284ff0000708bf4ff0ff373ff4aeaaddf86c0500283ff4a9aaa8f1011010f1021f4ff000077ff6a1aa2798a0f1011010f1021f7ff69aaa2c98002300284a9300f03c83299820eae0722a9820eae0733098a842a8bf284630902f985045a8bf50462f902be34f1cd90707d0984505da39782f9c01f00f0121433970ef1c3199691a11f1040f10d91d9c229b1f980133834228982b9900eb01077ef459ab00f0cfbd319904378f42eed0994539da07fb0a045feac97171464d4609d014f80e10309d01f0f00141ea0c0104f80e102e995945214418da04eb0b060c4604f8012bb44280f0cd8001f10208b0454a700cd201f10308b0458a7007d201f10408ca70b0454146e9d300e08846d90709d09d4207da98f800102f9c01f00f01214388f80010994536da791c01fb0a015feac97474464d4609d011f80e40309d04f0f00444ea0c0401f80e402e9c5c4501eb040615da01eb0b04314601f8012ba14280f09580b11ca14272700ad2f11ca142b27006d2311df270a1420e46ecd300e03146dc0707d09d4205da0c782f9d04f00f042c430c70994536dab91c01fb0a015feac97474464d4609d011f80e40309d04f0f00444ea0c0401f80e402e9c5c4501eb040615da01eb0b0400bf314601f8012ba14260d2b11ca14272700ad2f11ca142b27006d2311df270a1420e46edd300e03146dc0707d09d4205da0c782f9d04f00f042c430c709945bff64baff91c01fb0a015feac97474464d4609d011f80e40309d04f0f00444ea0c0401f80e402e9c5c4501eb040615da01eb0b0400bf314601f8012ba1422ad2b11ca14272700ad2f11ca142b27006d2311df270a1420e46edd300e03146dc073ff41baf9d42bff618af0c782f9d04f00f042c430c7010e701f10108d9077ff442af4ae7711cdc077ff478af7ee7711cdc07acd1b3e7711cdc07e3d1fde6bbf1010b67d017f8010b411e1f29f7d341b22029fef63baf06eb400116f81000497840ea0122c12afef431af204629464aab00f009fd0028e2d1fef728bf00254ff0000bd345b8bfa542bff63ca9dde9230100eb010ed645bff635a9a445bff632a9abeb02018e457ff72da9a5eb08018c457ff728a9bbeb0e075846b8bf7046f3454ff0000ed8bf774607eb030bd31bb5eb0c07d8bf7746ac450246aaeb0000a8eb0701c8bf6546834238bf1846631b9942299328bf1946309b1195994507eb060326931b913fd1269b9d422fdd119d4ff0010e37e0ddf86c05002800f03a84a9f1011010f1021f4ff000067ef6d1aea8f1011010f1021f7ef6cbae2d98002300284a9300f029842798309920eae072299820eae0732a988142a8bf0146319830915045a8bf5046319000f017bc119d269b0027eb1ab3fa83f35b095a45c8bf012703ea070e1b99002900f06181114602f0010a83185a464fea5b064ff0040b2bea820717971718013f03f0010418967e0816962bea87060aeb040715962e94c61bdde92c740aeb0100274402eb0a044a40490814915908cdf8c4a0139107eb0c01ddf8a4a0491b4fea560b514538bf8a460121cdf8a4a0bbf1010f88bf710801f0030321f003010e9161082491410823913099129301eb5000411c03381090d00721904d9809eb54032d904ff0ff3000eb560027906ff0010000eb56002590981e0f906ff00200199600eb56002f9eddf86cc04ff000080c910d931c90cdf868e008e0299808f101082f9e80454ff000073ff448a86fea08014046bef1000f18bf0ceb01002699319b42182d9902fb01910bb9002305e0189b179ccb5ce34003f00f032c932e9b0bb9002304e0169b159ccb5ce3401b012a9343193098219c03fb060a2398002c249c504421441cd15a46f4f71dfbdde91aec319840b114992c9a1af8010000f0f00010440af801002e980028b6d013992a9a1af8010000f00f0010430af80100ace703fb06f42d9bbef1000f03fb02f23ed019980228dcd30f98109910442144002200eb0b039c785f78279ec4f3031444ea071701eb0b049642a770c9d05f7810f80b60c7f3031747ea0617259e67709642bed010f80b7013f8016cc7f3031747ea06171c9e01f80b709642b1d013f8017c13f8023cc7f30317043247ea031304389345a1f1040104f8013cc9d1a0e7199b022b9dd3199b082b01d200222be00d9bddf838e003eb020c0c9a144400220ceb02077e781cf80250c6f3031646ea0516a51805f8016cbe787b78c6f3031646ea0313a354fb78be78c3f3031343ea06136b703b79ff780432c3f3031343ea07139645ab70dbd1129b119ddde91aec002b3ff466af531ccf5c8e5c129cc7f3031747ea0617012c87543ff45aaf941c0f5dce5cc7f3031747ea0617129ec754022e3ff44eaf0a44d278095dc2f3031242ea0111015544e70027fef758bf00224aa80690269808eb090105902798cde902b104902f98309f0190dde92d10009701f0dcfa0746fef742bf0020189026902498259940ea0320b0eb510f28bf48082c990023b0eb510f28bf48081b90013838bf184611902a98189a161ad8bf1e462b1a8b42a8bf0b469e422393bef61faf2d99ddf86cc00beb01024fea4c011c910cfb0cf1259b89001a91991824910021032b319138bf01212c9f0023032f38bf012319431991791e1691b91e1491119921924b00494389000e91511c1291299913930b0141ea011110930f916ff00801189b01eb4c0115919842c8bf0346dde92e214ff0000b01fb03212d9112e0012002902798009501900846269902f084fc2a982d99013639442d91239900278e42bef6cdae2c9af14311448e42b8bf31461c9a6fea41011144012938db1a984ff0ff3201fb11001b99a1eb0b01012902eb410137db01fb01f2824233dd1599a1eb4b0202f10803032b02f1060122db01fb01f787421edd052b02f104011ddb01fb01f7874219dd072b02f1020118db01fb01f7874214dd0bf1040b092ba2f1080103db524382420a46dbdc08310ae04ff0000b35e00bf1010b04e00bf1020b01e00bf1030bbbf1010f29db08318a1f5243824224dcbbf1020f16db0a1f5243824215dcbbf1020f0fd08a1e5243824211dcbbf1040f08db01fb01f282420ddcbbf1040b01f10801e1d14ff0000b07e0abf1010b04e0abf1020b01e0abf1030b2a98dde92e17304400fb07112998219b10282498309a5b44a0eb0b053ff460af2591b6fa86f01999400908434cd11698864249d01499701e891b179518968842b8bf01466fea4100139908440128c0f2a6800e99319a00fb101011998a1a4ff0ff31012a01eb420174db01fb01f7874270dd5100a1f1090202f10807032f02f106015edb01fb01f686425add052f02f1040159db01fb01f6864255dd072f02f1020154db01fb01f6864250dd3199092f01f104013191a2f1080103db524382420a46d9dc083145e02698b4468342d8bf03469542a8bf1546ab4280f2b080ae46d80708d0259d5808295c299a01f0f0011143013329544fea5308b8eb6e0f1cda25982d9e0f9900eb6e0206eb08052f4607f8011b974280f08280a81c9042397080f08280ef1c974201707cd2043606eb080090423970e8d376e0259800eb530072e0319a013204e0319a023201e0319a03323192319a012a23db08318a1f524382421edc319a022a19db0a1f5243824200f3d480319a022a11d08a1e5243824200f3cf80319a042a09db01fb01f2824200f3ca80319a0831043a3192ded1002031903198129901eb000c26988342d8bf0346309eb445b646b8bfe64673454fdad90708d025985908425c299f02f0f0023a43013342544fea5308b8eb6e0f1ada25982d9e00eb6e070f9806eb0802154605f8010bbd4214d2911cb942287023d2d51cbd4208701ed2043606eb0801b9422870ead318e0259800eb530114e0681c02e0511c10e038465feace7107d0734505da0178109a01f00f01114301702a982f9f664656e62946309e5feace7207d0734505da0878109a00f00f001043087031982499c04301eb000801200290279832460190dde9250563462946cdf8008002f0bbfaa845d8bfa8461798b042a8bf304680453eda84465feac8700ad0259b4fea5800195c299a01f0f001114308f1010819544fea5801b1eb6c0f18da25982d9b0f9f00eb6c025d182e4606f8017b964211d2a81c9042377010d2ee1c964207700bd20433581890423770ecd306e0259800eb580002e0681c00e030465feacc7107d0e04505da0178109a01f00f01114301702a982f9f189eebe5319801383ee7319802383be73198033838e70026fef79cba00222c984aa908912599484407912499cde903082698069123990290319805910190dde92e10309f009701f0c2fd0646fef782ba4ff0ff300df2245dbde8f08f381b18bf4ff0ff300df2245dbde8f08f00bfb0b586b008b3d0f87001f0b10023b3eb512f1ad150f82130bbb11b1a9d0714d16ff4403540f60f041d44cff6fd74a5420bd3184450f8085c8d4206d150f80c1ca1f1011515f5803f03d24ff0ff3006b0b0bd50f8045c8d42f7d1c3f540339942f3d80028f1d0037813f00b0fedd1144601ab0022002500f011f80028e5d00198dde903122060481c40086160a260e06028462561656106b0b0bd00bf91429cbf002070472de9f041855c4ff0050c6e0758bf4ff0030c15f0f30f02d1891a614502d20020bde8f0818418627894f802e0002e05d5e078267942ea0e2240ea062e002a4ff0000018bfbef1000fead0b2f5207fe7d8bef5f07f88bfbde8f081082d38bf0120072d18610ad8501c400800fb0ef0a1eb0c018842d3d804eb0c0828e004eb0c080efb02f5002000bf00eb0c04a142c6d008eb00073e78360903d00127b54213d2bde70c1b012cbad07e781eb10227b5420ad2b4e7042cb2d3bc78fe7854ea0626add00427b542aad3ad1b3844dcd158600120c3f800809a60c3f80ce0bde8f0812de9f04f89b0dde91257069005fb07f000294fea4007029100f0d48100200390089002984ff0010e00264ff0000b4ff000084ff0000c4ff000090497079205930be000bf4ff0000c4ff00308cdf80ca009f10109814500f0ba81bcf1000f40f0b4810699b8f1020f11f809a0ead0b8f1010f15d0ddf81cc0b8f1000f40f086805fea1a100af00f01089100f092800499814280f09a804ff0010c4ff0000882e1079abaf1000f00f07f800499514576d3a1eb0a010491089901eb01100901019114e000bfa15d089f01f0f0013943a1550136aaf1010a4ff0010eae4224bf00260bf1010bbaf1000f00f0598113998b45d1d20bfb0324bef1000fe3d0a91bb1eb5a0f88bf4fea5a0141b38d0804eb060817d0002208f10107a2eb850c6ff003057b1904350ceb05020432d870187158719871f5d1059b079a2f1d11f0030504d10ce0002711f0030508d0012d08f8070004d04744022d787018bfb870aaeb410abaf1000f0e440dd0129dae42b5d2a15d019f01f00f013943aaf1010a4ff0000ea155afe7129d4ff0000aa6e7039a52ea0a2213d004990392914280f08f804ff0010c4ff0000853e74ff0000c4ff002084ee74ff0000c4ff00108f4e000214ff0010c4ff00008039142e7089a091a049102eb02111201cdf80090019214e000bf1af80670089a07f0f00717440af80670013601384ff0010eae4224bf00260bf1010b002800f0d680139a934580f0cd800bfb03cabef1000fe2d0ad1bb5eb500ff14688bf45087db3ac080aeb06081ed0002308f10107a3eb840c6ff0030400bf07eb040e04340ceb040304338ef803108ef804108ef805108ef80610f0d1059bddf81cc0271d15f0030404d10ce0002715f0030408d0012c08f8071004d04744022c797018bfb970a0eb45002e4488b1129dae4210d21af80620019f02f00f023a430af8062001384ff0000e0028abd180e000bf129d0020ce469de7891a0491089901eb011009010191114613e000bf1af80620089c02f0f00222430af80620013601394ff0010eae4224bf00260bf1010b002953d0139a9345bff4ccae0bfb03cabef1000fe3d0ad1bb5eb510f88bf4d085db3ac080aeb060819d0002208f10107a2eb840c6ff0030400bf3a1904340ceb04030433d070107150719071f5d1059bddf81cc0271d15f0030404d10de0002715f0030409d0012c08f8070005d04744022c787018bfb87000bfa1eb45012e4489b1129dae42b6d21af80620019f02f00f023a4301394ff0000e0af806200029b0d103e000bf129d0021a4e74ff000084ff0000c029852e64ff0010c4ff0000803e04ff000084ff0000c0298ddf8009045e60120012107e04ff0010cb8fa88f0049f8cf001014009b7fa87f252091140084009b0bde8f08f00bf2de9f041826882b10121816007220020511e20fa01f1c90708bfbde8f0814ff0ff3191400843bde8f0818c46056841688d42e9d06b1c03602c78ff2c11d18b4200f0dc80ac1c046095f90120b2f1ff3fd6b200f3d080bf2e22d806f03f0602238fe062b2b2f1ff3f02dd07222046cfe7bf2c09d804f03f070e224ff0010e4ff000084ff0000c2ee0df2c0fd804f01f0715224ff0000c4ff001084ff0010e22e0df2e0fd806f01f0603236ae0ef2c0fd804f00f071c224ff0010c4ff000084ff0010e10e0ef2e58d806f00f06042358e0f02c40f093804ff0000820224ff0000c4ff0000e00278b424fea072603d0af1c07606d7803e00125856000251f46c02c45ea06046cd35b1a7d1ab3fa83f3b5fa85f55b096d092b434fea042403d001258560002503e07e1c06603d783746b8f1000f44ea050453d17d1ab5fa85f56d092b434fea042403d001258560002503e07e1c06603d783746bcf1000f44ea05043ed1791ab1fa81f1490919434fea042131d001238360002030e0f02e3ed1002605234ff0010e00250127ea074fea062617d18c4215d0621c0260247801379f4246ea040623d000bf8a424fea062609d0541c0460127801371643bb422246f3d116e02246013701254ff0000e9f4214468560dad112e07b1c0360387840ea0104bef1000f20467ff413afbde8f08114465feace7202d0091b8e4204d9012181600020bde8f081a11907462046002263463960bde8f041ffe78446081ab0f5806f01d90020704761454ff00000fad0002a18bf70472de9f04fabb09fed251a9fed250a9fed253a9e4600264ff0ff380df12c090df10c0ab7ee002ab0ee084ab6ee005ab1ee006ab9ee007a00206746019009e000bf49f826500af8064001368f42bc4600f0cb8217f8012b501e01280fd8012a23d18f4274d09cf901000cf10207b0f1ff3fc5b240f38f8000220724f5e1052a37d0042a30d0032a49d1002e00f0d982701e59f820501af8004093e200bf0000004f000000cf000000008f4254d00cf102079cf801008f4247d09cf802200cf103078f4240ea02203fd09cf803200cf104078f4240ea024037d09cf804200cf10507130600223ae0002e00f0aa82013eace7022ec0f0a582b21e59f82230701e59f8205049f820301af802301af800400af8003049f822500af8024096e702f0f80010281fd1002e00f08b82701e1af80030002b40f0858259f82050152a6fd16d420022002406463de20023012206e001220724002588e101220020002343ea000501242fe2a2f12000062827d8002e00f06782731e1af80300002800f0618259f82300242a40f0858080f00045012400221e4617e2bf2d5ad801220292002205f03f000e244ff0000b00928f4200f019819cf802300cf10308002215e1322a51d002f0fe0030284dd0402a40f0a380032ec0f03682701e1af80020002a00f03082b21e1af80230002b00f02a82033e1af80630002b00f0248209eb8202d2ed000a09eb860209eb8000d2ed001ad0ed002a70eee10a62eea00a71eea00acee1002800f00e82023e1af80600002840f0088259f82600122a58dc102a00f03081112a00f03381122a40f02c81454354e1df2d44d8002205f01f00152400924ff0010b0122bae0002e00f0eb81a2f13100013eb0fa80f01af806304009834240f0e08159f82600302a7bd100ee900af8eee00a94e1002b00f0d481023e1af80630002b00f0ce8159f82630212a40f3ed80222a00f02581232a00f02981252a40f03a8100ee903a01ee900af4ee610af1ee10fa48bff0ee601a11ee905a71e1ef2d72d805f00f001c24012274e0a2f11303022b80f0c480002d00f0a381b0f1004f08bf15f1010300f0eb80132a40f0f18090fbf5f5f1e0a2f1480010f1070f4ff00000c0f05f81002e00f05c81013e1af80600002800f0858109eb8600d0ed000af4ee420af1ee10faf5ee400ac8bff0ee420af1ee10fa48bff0ee430a432a72ee601a00f3b480412a00f0f380422a00f00f81432a40f0008161eea10a72ee600a1de1312a40f0948000ee900a20f00040b0f1ff4f4ff00002f4ee410aa8bf0122f1ee10fa4ff0000080f21c81f4ee400af1ee10fa00f11681002a40f01381fdeee00a10ee905a98e0f02d4ff0000040f00981002220244ff0000b009202928f427ff4e7ae00230122b8460002c02d43ea000535d3781aa8eb0103b0fa80f0b3fa83f340095b0918434fea05270ebf18f8013b00230122bbf1000f43ea07051fd1a8eb0103b3fa83f35b0918430ebf18f8013b002301222f02009d002d43ea07050ed1a8eb0103b3fa83f35b0918434fea05230ebf18f8010b0020012240ea0305474602984ff0ff3838b1601e25fa00f0c0071cbf08fa04f005430024a3e0162a10d1a842b8bf054637e0202a4cd0212a51d100ee903a01ee900a70eee10a8ee005442ae0a842c8bf054626e0451b24e0002800f1c680def800200546824238bf15469042019888bf0120019015e0442a48d0452a5fd0462a4ed161eea10a61e00025132a4ff0000208bf4ff00045002469e090fbf5f202fb15050022002462e000ee903a01ee900a61eea00a57e000ee900af5ee400af1ee10fa00f0928001ee903ac1eea00a4ae000ee903a01ee900a71eea00a43e000ee903a01ee900af4ee610af1ee10fac8bff0ee601a11ee905a37e060eea01a70eea00a74ee600a61eea00a2ce0f4ee450af1ee10fa18d570eea01a60eea10a22e0f4ee450af1ee10fa15d560ee861a60eea11a60eea10a16e060eea00a13e060eea01a60eea10a0ee071eea10a61eea00a72ee600a07e061ee870a61eea00a61eea00a70ee820a10ee905a012400224ff000005ab9202e09d0002c3ff436ad25f00040b0f1ff4ffff630ad00202bb0bde8f08f56b3701e1af8001059f82000d9b102ee100a20f00040b0f1ff4f4ff00001b4ee412aa8bf0121f1ee10fa4ff00000e4dab4ee402af1ee10fadfd40029ddd1bdeec20a10ee100a019adef804101143cef804102bb0bde8f08f00202bb0bde8f08f80b5002970d090f900c0bcf1200f5ffa8cfc07db012010604ff0010ec3f800c0704680bdacf1c20ebef11d0f0fd801295ad090f9011011f1410f55dc02211160407800f03f006cf38a108446e4e70cf0f00ebef1e00f23d1032945d390f901e01ef1410f40dc90f9021011f1410f3bdcbcf1e00f5ffa8ef101d1a02934d3bcf1ed0f01d19f292fd80321116042784fea0c3189b2807802f03f0241ea821136e004294ff0000ebbd3acf1f50111f1050fb6d390f901e01ef1410f15dc90f9021011f1410f10dc90f9031011f1410f0bdcbcf1f00f5ffa8ef101d1902904d3bcf1f40f03d18f2901d9002080bd042111604ff4e011427801ea8c4c817802f03f02c0784cea023201f03f0142ea811100f03f0001eb000c7fe72de9f04188b04af2bb261c46c0f24e0613460a46ddf83880002706f1ae05214627706770a770e77027716771a771e77127726772a772e77227736773a773e77327746774a774e77427756775a775e77527766776a776e77627776777a777e777a8470028c8f800705cd020786178a278e3780843104318434ff0010008d0e179a27911431ebf617a227a51ea020102d108b0bde8f081a07b14284ff00000f7d1217d8df8040041f0010121758df805008df806008df807008df808008df809008df80a008df80b008df80c008df80d008df80e008df80f008df810008df811008df812008df813008df814008df815008df816008df817008df818008df819008df81a008df81b008df81c008df81d008df81e008df81f0001a92046b047c8f8000018b1012008b0bde8f08106f1520120468847d8f80000002818bf012008b0bde8f081002804bf4ff0ff3070472de9f04f95b00df1200c8ce80f00f8f7d6fd002800f004824ef66c6a4ff29c5bccf2ff0ac2f2290b4ff6ff760024012547f67f797f2707e000bf48f2a351c0f24501bff32f8f8847dbf80080bff35f8fdbf80000bff35f8f01466ff39601b1f1005f07d10168514504d14168b1f57d7f00f093804ff47d70f9f7f9fc002800f0cf814ff60c41cff6ff7142182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d71c0f800a041608573a0f8c49180f8c371068446848684c684068546858685c685068646868686c686068746878687c6875be8001f41457ff45aafbff35f8f4be8000121b15be8001f4145f8d04fe7d0f87011209e4ff0ff3029b30022b2eb562f21d151f82600002800f03481431a98074ff0ff3017d16ff4403240f60f071a44cff6fd77ba420ed3ca1852f8080cb04240f0208152f80c1ca1f1011010f5803f04d24ff0ff3015b0bde8f08f002a4ff0ff30f8d052f8047c8f42f4d1c3f540339942f0d810ad104600222b460024fef716ff002800f0fe80239b0f22990603f00f0002eae17101fb00f289214a43d20a8df830200e2213f0200f08bf0f2408bf012200fb02f201fb02f24fead2228df831204ff00d0208bf022200fb02f201fb02f24fead2228df832204ff00c0208bf032200fb02f201fb02f24fead2228df833204ff00b0208bf042200fb02f201fb02f24fead2228df834204ff00a0208bf052200fb02f201fb02f24fead2228df835204ff0090208bf062200fb02f201fb02f24fead2228df836204ff0080208bf072200fb02f201fb02f24fead2228df837204ff0070208bf082200fb02f201fb02f24fead2228df838204ff0060208bf092200fb02f201fb02f24fead2228df839204ff0050208bf0a2200fb02f201fb02f24fead2228df83a204ff0040208bf0b2200fb02f201fb02f24fead2228df83b204ff0030208bf0c2200fb02f201fb02f24fead2228df83c204ff0020208bf0d2200fb02f201fb02f24fead2228df83d204ff0010208bf0e22424360434843c00a8df83f00c3f3001006900ca84a43cde9045008ac0b9dd20addf88890ddf884a0ddf87c8013cc1e9e8df83e2022462b46cdf80c90cdf808a0cdf80480009600f02df8dde91201a2455044c8bf5446a9454944c8bf4d46b042b8bf06464145b8bf8846a64211dd4146a8450edd249800680f280ad8249f491b321b07ebc0030130dc801d815a8199813860002015b0bde8f08f4ff0ff3015b0bde8f08f2de9f04f8fb0dde91c5a0e9129691e9eddf868c0002900f05c812f68002e40f05381874200f050819af80f100f2940f04b819af80e100e2940f046819af80d100d2940f041819af80c100c2940f03c819af80b100b2940f037819af80a100a2940f032819af80910092940f02d819af80810082940f028819af80710072940f023819af80610062940f01e819af80510052940f019819af80410042940f014819af80310032940f00f819af80210022940f00a819af80110012940f005819af80010002940f000811b9fb2eb0c044ff00001d8bf0c46db1bd8bf0b46d5f808e0ea681d46e919189fa444aeeb0403a7eb0c070694bb42b8bf1f46199b521b0b91591a8a42b8bf1146012f0c910797c0f2e5820c990129c0f2e1820ef101014c08069900eb6c000a9048100990042020ea81000590079801310138cde903014810029004fb05f000f102094ff0000acde9005c089407e000bf0c980af1010a8245a14400f0bb821c980e9b01680aeb050000fb04120b980a9f504400fb03705feacc7303d1099fdde9063810e0099b2e46d35c059d0778eb4007f0f00703f00f033b4400f8013b049bdde902783546d619da074fea580b0d9208d131465a466446f2f726fca446089c68e000bfb8f1020f64d3abf10102032a04d200211bf0030e35d15be06ff0030202ea58034f44b646c3f1000c3944471c8e18f578b478c5f3031545ea0415bc18e5703579f378c5f3031545ea0313237173793579c3f3031343ea05136371b3797679c3f30313043243ea06130ceb02060436a371dcd1dde9005c089c111d76461bf0030e26d04b1cf75c3246765cc7f30317ddf804c047ea06171646bef1010f475417d08f1cd65dd55cc6f3031646ea0516009dddf804c0bef1020fc654164608d03144c978f25dc1f3031141ea0211c15500bf5feac8713ff45aaf0d9a16f80b10002a4ff0000208bf042210f80b30d14003f00f0242ea011100f80b1047e7874200f095810026a1e16d68002d00f0018200244ff000090ae000bfdde90c14d8f804500c44ddf874a0ac4280f0f281ddf870800d94d8f800100f5d3e0903d001210c910ce000bf2e1b012e00f0e28121444d78002d00f0628102210c912e4617f00f011e9f1af801a0b7fa87f74fea571718bf012147ea010e1b9f4fea0a1b16f003014c4600f08980cde90a16d8f808100026b9fbf1f404fb119161449142a8bf012606ea0e06012e18d13c449c4215db189da94212da199dac420fda0e9d4e0804fb0504c907a75d6ff00f01554604bf0f215d4639401b9f2943a1550a990b9e012909f1010458d0d8f80810b4fbf1f606fb1141002461449142a8bf012404ea0e04012c18d1f4199c4215db189da94212da199dac420fda0e9d574604fb05044d08c907665d6ff00f0104bf0f215f46314039431b9f61550a990b9e022909f102042ad0d8f80810b4fbf1f505fb1141002461449142a8bf012404ea0e04012c19d1ec199c4216db189da94213da199dac4210da0e9d574604fb05044d08c907665d6ff00f0104bf0f215f4631400b9e39431b9f615509f10304711e0329b14405d23ae700bf0434a1453ff436afd8f808100026b4fbf1f505fb114161449142a8bf012606ea0e06012e1bd13d449d4218db189eb14215da199eb54212da0e9ed04605fb06054e08c907af5d6ff00f0104bf0f21d84639401b9f41ea0801ddf87080a955d8f80810661cb6fbf1f505fb1161002661449142a8bf012606ea0e06012e1cd13d449d4219db189eb14216da199eb54213da0e9e574605fb06054e08c90715f806806ff00f0104bf0f215f4601ea0801ddf8708039431b9fa955d8f80810a61cb6fbf1f505fb1161002661449142a8bf012606ea0e06012e1cd13d449d4219db189eb14216da199eb54213da0e9e574605fb06054e08c90715f806806ff00f0104bf0f215f4601ea0801ddf8708039431b9fa955d8f80810e61cb6fbf1f505fb1161002661449142a8bf012606ea0e06012e7ff466af3d449d42fff662af189eb142bff65eaf199eb542bff65aaf0e9e574605fb06054e08c90715f806806ff00f0104bf0f215f4601ea0801ddf8708039431b9fa95544e7042e78d38e78c97856ea012673d0042188e61b99002901dd012609e0b1fa81f149090027bcf1000fc8bf012707ea0106d5f808e0d5f80cb00bfb0ef9b9f1000f59d01e990024b1fa81f149094ff0ff380d91f1070c9107e000bf01340bfb0ef94c45a8f1010846d20c991c9e0029214618bf09eb0801b1fbfef536680ef1010705fb1e117f0805fb07664f08f65d042727ea8107fe4016f00f094f4618bf01270d9e3743012fd8d161449142d5db1b9f3d449d42d1db189fb942ceda199fbd42cbda0e9f1af8096005fb070e4d081ef80570c90707f00f0907f0f00747ea06071c9908bf49ea06170ef80570d1f808e0d1f80cb0b1e70fb0bde8f08f00bf002804bf4ff0ff3070472de9f04f99b01c461546cde90e01f8f74af8002800f0fb814ef66c6b4ff29c59cde90c54ccf2ff0bc2f229094ff6ff7a0024012547f67f787f2607e000bf48f2a351c0f24501bff32f8f8847d9f80070bff35f8fd9f80000bff35f8f01466ff39601b1f1005f07d10168594504d14168b1f57d7f00f0a3804ff47d70f8f76bff002800f0c4814ff60c41cff6ff7142182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d71c0f800b041608573a0f8c48180f8c361a0f820a0a0f822a0a0f824a0a0f826a0a0f828a0a0f82aa0a0f82ca0a0f82ea0a0f830a0a0f832a0a0f834a0a0f836a0a0f838a0a0f83aa0a0f83ca0a0f83ea059e8001fb9427ff44aafbff35f8f49e8000121b159e8001fb942f8d03fe7d0f87021279e249d4ff0ff302ab30021b1eb552f21d152f82500002800f01881811a88074ff0ff3017d16ff4403340f60f070b44cff6fd77bb420ed3571857f8080ca84240f0048157f80cacaaf1011010f5803f04d24ff0ff3019b0bde8f08f57f8040c50454ff0ff30f6d1c1f540318a45f2d8002ff0d0baf1c10fedd33878012840f0e580b0060f2206f00f0102eae070484389225043c00a8df854000e2016f0200f08bf012001fb00f002fb00f04fead0208df855004ff00d0008bf022001fb00f002fb00f04fead0208df856004ff00c0008bf032001fb00f002fb00f04fead0208df857004ff00b0008bf042001fb00f002fb00f04fead0208df858004ff00a0008bf052001fb00f002fb00f04fead0208df859004ff0090008bf062001fb00f002fb00f04fead0208df85a004ff0080008bf072001fb00f002fb00f04fead0208df85b004ff0070008bf082001fb00f002fb00f04fead0208df85c004ff0060008bf092001fb00f002fb00f04fead0208df85d004ff0050008bf0a2001fb00f002fb00f04fead0208df85e004ff0040008bf0b2001fb00f002fb00f04fead0208df85f004ff0030008bf0c2001fb00f002fb00f04fead0208df860004ff0020008bf0d2001fb00f002fb00f04fead0208df861004ff0010008bf0e2001fb00f002fb00f04fead0204ff000038df8620008bf0f235943299d51430020c90a002d8df863103ff427af289cc6f30010a7f13f0810ae0b9001e0013d1cd014f8010b411e1f29f8d341b220290fdb08eb400118f81000497840ea0122c12a06d3384651463346fef794f80028e5d14ff0ff3019b0bde8f08f0d9c2698ddf894b0a042c8bf04462a980894dde9289406300790cde909a704e058440b38013c834653d019f8010b1f28f6d908eb400118f81000497840ea0122c12ad8d3384651463346fef766f80028d1d00b980c9f069015a8cde90460ddf898a0229ddde90e010d9b239e3a46cde902ba00950196fff740fadde91201bb4558445144d8bfbb46a8422a46b8bf0246b142a8bf31465a4517dd089b994214dd2a9b1b680f2b10d8089ea2eb0b02a1eb060c079901ebc307ba802a9a21f833b0591c7e80a7f806c01160dde909a710aea8e7002019b0bde8f08f2de9f04fd3b0dde95ce5dde9648cdde9629a0d9075b1dde96050dde95e47a94224eae47b27eae774a8bf29468242a8bf024602e000244ff0000b09eb0e0008eb00055845c8bf83468d420ceb0a07b8bf2946a24588bf54469742b8bf3a468b45b8bf944202db53b0bde8f08f669804f0010701974fea5b07033809970bf101070090580008974e080c90002701200df14c0e0df10c0c02948ce80e00cde90a6b06e000bf0798012700284ff00000dad0c00707906698069708bf0830ddf800906ff007086ff004044ff0000b4ff0000a0f9018bf09f10809cdf838900f994fea5a00085c102300f0f002cc46a14610901194cdf8488000bf1cf8041f0eeb08001cf8014c9cf8015042ea141704f00f041443447242ea111401f00f01847211430eeb0904217242ea15119cf802600772617205f00f011143a17242ea1611817306f00f01114308f10808083b09f10809c173d1d11098ddf83890000110224b465d4600bf13f8041f0eeb050713f8014c5e7840ea141804f00f0404437c7440ea111401f00f010143f97440ea161193f802c0397506f00f010143797540ea1c11b9750cf00f010143083a05f1080587f81080bc74f975d5d1ddf84880119c0af1020a08f120082034baf1100f0bf1200b84d101980699049a48400299059b00eb01090399dde90a6b9145bff65baf0d9803fb090807e000bf0c9809f1020991458044bff64faf0d98dc4609fb03045feacb700bd0099dddf820c0605d1ef8007000f0f00007f00f0738446055b6eb5c0f28d94fea5c0a04eb060b464616f80a0006eb0a041ef80050204600f8015b58451dd205781ef80570a51c5d45077017d228781ef800002870e51c5d4510d2287804361ef80000287006eb0a055d45ddd306e000bf04eb5c05c80705d1b4e7651cdde90a6bc807afd08c45adda28781ef8007000f00f0007f0f00738442870a3e72de9f04f8bb01d9d6c68072c00f286802cb12f89b94200f08180012c7bd100287cd0d0f87061002e78d00027b7eb512f74d156f82170002f70d0a7eb060c5fea8c776bd16ff440370ceb070e40f60f07cff6fd77be4561d306eb0c0e5ef8086c8e425bd15ef80c6ca6f1011717f5803f54d35ef8047cb74250d1ccf54037be424cd8bef1000f49d0032e47d39ef80070022f43d19446aa69ddf86ca0dde91987dde917b9b2b14fead10801f00704da464ff0010b4f4612f808900bfa04f444ea090402f80840d346ddf86ca0b946dde919876c6805eb44021181721e1c9e01346c600996169e0ef101010396159e0a950296149ecde904b9cde900366346cde90687cdf820a0fbf75dfb6968013969600bb0bde8f08f6f89b94204d14ff0ff300bb0bde8f08f022c3ff479afaf89b942f4d0032c3ff473afef89b942eed0042c3ff46daf2f8ab942e8d0052c3ff467af6f8ab942e2d0062c3ff461afaf8ab9427ff45dafdae700bf70b5049d8b42c8bf19469542b8bf2a46914205dadde905e3bef1000f01d103b170bdbef10f0c18bf9c46cb070ed04b10c45cbcf1000f03d004f00f05ae4504d904f0f00444ea0e04c45401314c1000eb61035510bcf1000f00eb620049d0ac425fda00bf1c78764604f00f05beeb141f38bf2609754598bf754645ea06141d4605f8014b854265d25c78764604f00f05beeb141f38bf2609754598bf75469c1c45ea061584425d7040d29c78764604f00f05beeb141f38bf2609754598bf7546dc1c45ea061584429d702fd2dc78764604f00f05beeb141f38bf2609754598bf754645ea06151c1ddd7084422346b9d31ce0ac4219da4eea0e1500bf1c4604f8015b844226d29c1c84425d700ed2dc1c84429d700ad21c1ddd7084422346edd304e01c46d00704d17ae71c46d0073ff477af9142bff674af2078bcf1000f03d0beeb101f98bf70bd00f00f0040ea0e10207070bd5c1cd007ebd161e72de9f04f81b04ef66c644ff29c55ccf2ff04c2f229054ff6ff7600274ff0010a47f67f7b4ff07f0807e000bf48f2a351c0f24501bff32f8f8847d5f80090bff35f8f2868bff35f8f01466ff39601b1f1005f07d10168a14204d14168b1f57d7f00f094804ff47d70f8f742fa002800f005814ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ff47d710460416080f80ea0a0f8c4b180f8c381068446848684c684068546858685c685068646868686c686068746878687c68755e8001f49457ff45aafbff35f8f45e8000121b155e8001f4945f8d04fe7d0f89812002974d104464ff41630f6f739f9014600284ff0000069d0002200bf8b1888544032b2f5163f58709870d870187158719871d871187258729872d872187358739873d873187458749874d874187558759875d875187658769876d876187758779877d87783f8200083f8210083f8220083f8230083f8240083f8250083f8260083f8270083f8280083f8290083f82a0083f82b0083f82c0083f82d0083f82e0083f82f0083f8300083f8310083f8320083f8330083f8340083f8350083f8360083f8370083f8380083f8390083f83a0083f83b0083f83c0083f83d0083f83e0083f83f009ad1c4f8981200e00021084601b0bde8f08f00bf70b5044690f8a00384f8a10350b3d4f8900347f64c6642f66535c2f20706c0f2440520b131682d31c4f8981310e040f22f00c0f200007844002122460023a847c4f89003316801f12d01c4f8981330b105f1e8022d219047002808bf70bd002084f8a10370bd00bf2de9f047a4b0d0f89442bff35f8fa4b142f691760546c0f2440620460021b04770b1d5f8900340b142f64d42c0f244022d2124b0bde8f047104724b0bde8f08747f64c69c2f20709d9f8007095f8a10300283fd0f7f77cf9e0b3d5f89813781a17d495f8680110b995f82403e0b395f8a00385f8a10380b3d5f8900342f64d48c0f2440878b1d9f800102d31c5f898131de0d5f8900300b342f64d42c91bc0f24402904719e04ff64b70cff6ff70a8f1e807784400212a460023b847c5f89003d9f8001001f12d01c5f8981310b12d21c04710b1002085f8a10306f16601204624b0bde8f04708474af21f37c0f2470700200290adf80c00b84795f8680110b995f8240318b12846fff746ffe5e70df104084046f5f7a4fd02a9284600224ff0000afaf7b3fe81464046f5f7bffeb9f1000f02d085f8a1a303e00146284600f009f89df80c000028c7d107f14c008047c3e700bf2de9f04f90f8d13300f5697c4cf82310591c41f69a134b4390f8d0b31b0c03eb8303a1eb4301bbf1090f80f8d1139cbf0bf1010b80f8d0b3bbf1040f0bf0030e05d200244ff000094ff0000a2ee00bf0fc0800244ff000094ff0000a00eb8406d6f8a473d6f8a853b7fbfbf3d6f8ac1303eb090203fb1b73b5fbfbf7d6f8b06307fb1b5553443a44b1fbfbf72b44b6fbfbf53a4407fb1b1105eb020905fb1b6219440434a04502eb010ad7d1bef1000f1dd05cf82450bef1010fb5fbfbf606fb1b55b144aa4412d00ceb84056e68bef1020fb6fbfbf404fb1b66a144b24406d0ae68b6fbfbf505fb1b66a944b244bafbfbf202eb0901c0f8cc13bde8f08f00bff0b500294ff6ff7e00f0af80012903d10022c90775d1a8e021f00102c2f1000c6ff0010241f221038418a578e7788eea05252cb26e0036b203ead43484ea450503ead6366c0086ea450624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead53585ea460686ea07273eb27d002db203ead63686ea470703ead5357e0085ea470736b27d002db203ead63686ea470703ead5357e0085ea470736b27d002db203ead63686ea470703ead5357e0085ea470736b27d002db203ead636023286ea470703ead5360ceb0205023586ea470e95d10232c90733d0805c41f221038eea002001b2420012b203ead13181ea400003ead232410082ea400009b2420012b203ead13181ea400003ead232410082ea400009b2420012b203ead13181ea400003ead232410082ea400009b2420012b203ead13181ea400003ead23181ea400e1ffa8ef0f0bd2de9f04fcbb00646c07c8b468df80600b08954998df80700000a8df808008df80a10080af1898df80b00080a17468df80d000020012b8df805308df809b08df80c108df80e008df80f008df810008df811008df812008df813008df814008df815008df816008df817008df818008df819008df81a008df81b008df81c008df81d008df81e008df81f008df820008df821008df822004cd1307e96f81780a0f1090144f62510c2f29240a1fb0002891a02eb510100970df10500b8eb910f88bf4fea9108c8ebc80706f11a0400f1010a00f10509093021463a46f1f795f806f1210506f1280029460722f1f78df8284621460722f1f788f820465146032207f10905f1f781f806f11d0049460422f1f77bf8f07d02289cbf0130f075009fbb450cd0b8f1240f13d94ff0ff304bb0bde8f08fbb454ff00905f07509d14ef60b67abb20df10502c0f247070120f02115e002200df12304aab28df82300a01c0df105018df82470f1f74ff8a81c4af6610782b2c0f24607f02021460023b8474bb0bde8f08f2de9f04184b0044690f84d0000284ff0000000f09a8094f84f1042f28b0701f078018df8071094f85010c0f25b0701f007018df80610cde9020002a906200022b847054670b9002002adcde902000df1070128460122f1f715f8012029460122b847054694f84e00a8b1002602a906200022cde90266b84760b9cde9026602ae04f1540130460122f0f7fcff572031460122b8470543002602a906200022cde90266b84768b90df108080df1060140460122cde90266f0f7e5ff312041460122b847054302a906200022cde90266b84768b9002002ae04f15301cde9020030460122f0f7cfff462031460122b8470543002602a906200022cde90266b84768b90df1080804f1510140460222cde90266f0f7b8ff362041460222b847054302a9a3200022cde90266b847054302a997200022cde90266b84742f62b310543c0f2440102208847284615b104b0bde8f081002184f84e1084f84d10a16504b0bde8f08100bf2de9f04f8bb00190233002254ff000080df10c0a4ff001094ff0000b002402900be000bf09fa0bf0002f0bf1010b08bf0443bbf1070f354426d042f2d710c0f20000784410f80b0042f2d111c0f20001794411f80b6042f2fb0351463246c0f25b03cde90988cde90788cde90588cde90388984707460028d4d10298514628443246f0f74dffcde742f2fb00c0f25b004ff60073002600f1340703a9c0f21f0381200c22cde90966cde90766cde90566cde90366b84730b9029803a928440c22f0f72eff8026ddf804c040f6b80146ea0400220ac2f200018cf823008cf824200a68002a00f0ad8045f2fd774ff6ff766ff0020241f22103c0f202070d681544ed7886ea052635b203ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea46060d6824b2154403ead4342d7984ea460686ea052635b203ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea46060d6824b2154403ead4346d7984ea460686ea052635b2740024b203ead53585ea460603ead434750084ea46062db2740024b203ead53585ea460603ead434750084ea46062db2740024b203ead53585ea460603ead434750084ea46062db2740024b203ead53585ea460603ead4350332ba4285ea46067ff460afb1b2090a01e0ff26ff218cf83e109cf84c109cf84d208cf83f1026218cf83d608cf84020ff288cf84b101cbf04208cf81c000bb0bde8f08f70b588b042f2fb0514460e46c0f25b05002181280791cde90511cde90311cde90111009107d11b023435694681202246a84720b905e069462246a84708b108b070bd6946054630462246f0f72ffe284608b070bd2de9f0478cb08579972d17d00446fe2d0fd0fd2d2ad142f69570c0f25b008047002084f84e0084f84d00a0650cb0bde8f08720460cb0bde8f047cbe50020cde9040042f2fb00c0f25b00a0f1700304a9972000229847044642f62b31c0f244010220884720460cb0bde8f08742f2fb08002094f80c90677bc0f25b08cde90a00cde90800cde90600cde9040004a99f200422c047064620b901a804a90422f0f7dbfd002e6ff00100ddd19df80410bd29d9d19df805104029d5d19df806101029d1d194f84d00002852d047f64c60c2f20700006843f698210844a065002604a937200222cde90a66cde90866cde90666cde90466c047002840f0898002a804a90222f0f7a9fd04a947200122cde90a66cde90866cde90666cde90466c047002875d10df1030004a90122f0f795fd0020cde90a00cde90800cde90600cde9040004a905200122c047002860d10df1020004a9012249ea0726f0f77efd352d5bdc002d00f08180012d70d19df8020082e0002604a9052001228df80e60adf80c600296cde90a66cde90866cde90666cde90466c047d8bb0df1080a04a950460122f0f75afd04a935200122cde90a66cde90866cde90666cde90466c04738bb0af1010004a90122f0f747fd002604a937200222cde90a66cde90866cde90666cde90466c04798b90af1020004a90222f0f733fd04a947200122cde90a66cde90866cde90666cde904660126c04778b14ff0ff300cb0bde8f087362d6ed0572d15d194f84e00002800f08580572039e00af1040004a90122f0f70ffd04f14f0051460722f0f709fd84f84d603ee700208df801006946284601228df8009000f04ef9312d044627d036e09df80200002e00f0380618bf4036704010f0380f10d09df808009df8091041f6ce430e22c0f2000302ea96027b449a5a41ea0020904239d8012000218df80110694601228df8006000f024f904460df103014620012200f01df9054602a93620022200f017f945ea040141ea00040025a8f1700604a9a3200022cde90455b047044304a997200022cde90455b0470443aee69df802000e2101ea900041f65641c0f200017944085a864204d96ff001000cb0bde8f0876946362002228df800708df8019000f0e6f80446d0e70020cde90a00cde90800cde90600cde9040004a9592001220125c04700287ff45caf04f1540004a90122f0f77bfc84f84e5060e740f6b800c2f200000168002904bf4ff0ff30704780b584b000684ef2173102904ff41630039002a8c0f2470188474ff4f07042f29f7e01904ff4207cc0f25b0e0020002100220023cdf800c0f04704b080bd00bf2de9f04340f6b801c2f2000109684ff0000e01f1020c4cf6cd4340f2762808e00ef1010ebef5f07f0cf5a07c08bfbde8f083aef1a0096ff00906644607e000bf07eb0711a170053445452e46e8d290f84c1006f10a054f1e112905fb03f208bf570d122908d1a6f1e6019f294ff000079cbfb9f19f0f077b07eb071104f8021c90f84c1006f10c024f1e112903fb02f208bf570d122908d1a6f1e4019f294ff000079cbfb9f19f0f077b07eb071104f8011c90f84c1006f10e024f1e112903fb02f208bf570d122908d1a6f1e2019f294ff000079cbfb9f19f0f077b07eb0711217090f84c1006f110024f1e112903fb02f208bf570d122908d1a6f1e0019f294ff000079cbfb9f19f0f077b07eb0711617090f84c1006f112024f1e112903fb02f208bf570d12298ad1a6f1de019f294ff000079cbfb9f19f0f077b80e700bf2de9f04383b042f28b0914460e460546c0f25b090027694606200022cde90077c84710b103b0bde8f083e846404631462246cde90077f0f791fb284641462246c84703b0bde8f08370b50446d0f840010d4638b92046f6f7a5fa0028c4f8400108bf70bd42f64d46c0f2440606f140018847d4f8400129463246bde8704010472de9f04f81b0934612788ab1022300bf0beb030717f8012c62b11bf8032062b17a784ab1ba780433002af1d1023b04e0002205e0013b00e0013303eb4302520042eae272931c02f1010c01eb810203f0030e23f0030a00eb8213a3f5a0784ff0ff3906e009f10109b9f10d0f08f5a0786bd009eb010202eb8202bcf1030f00eb821605d24ff0ff34bef1000f2ed1e9e70024474604e000bfa24507f1020721d0621cd209042a03d83a7802f0f0023a70a21cd209042a03d87a7802f00f027a70e21cd209042a03d87a7802f0f0027a700434e209042adfd86208b55c05f00f05b554d9e7013cbef1000fbbd0a21cd509042d08d85208b55ce7076ff00f0708bf0f273d40b554bef1010fabd0e21cd509042d09d85208b55ce7074ff00f0708bf6ff00f073d40b554bef1020f9ad0221dd509042d96d85208e407b55c6ff00f0408bf0f242c40b4548ce79bf80010cdf800b0002900f0ce80022041f2410a41f2420b41f2430808e0009a063012f8011f03330029009200f0bd80a1f17f0717f15f0ff1d341f2d132c0f2000201eb41017a4402eb81014ff20014a1f5c079cff6ff7402e014f52074ded0494619f9027bc509042d09d8b7f1ff3f06dc1a1992f8016f46f0f00682f8016f5ffa87fe5fea4e6208d5042d06d81a1992f8017f47f00f0782f8017f5fea8e620ad540f27d22904206d81a1992f8027f47f0f00782f8027f5feace6209d5b0f51f7f06d81a1992f8027f47f00f0782f8027f5fea0e724fea900c09d5bcf19e0f06d81a1992f8036f46f0f00682f8036f5fea4e720ad540f27a22904206d81a1992f8037f47f00f0782f8037f91f90110042d09d8b1f1ff3f06dc1a1912f80a7047f0f00702f80a70c9b24a0608d5042d06d81a1912f80a7047f00f0702f80a708a060ad540f27d22904206d81a1912f80b7047f0f00702f80b70ca0609d5b0f51f7f06d81a1912f80b7047f00f0702f80b700a0709d5bcf19e0f06d81a1912f8087047f0f00702f8087049077ff565af40f27a2188423ff660af191911f8082042f00f0201f8082057e701b0bde8f08f00bf2de9f04381b04ff29c51c2f229010f68044638466ff39600b0f1005fbff35f8f0cd138684ef66c61ccf2ff01884205d17868b0f57d7f18bf002700e0002745f64d50c0f24600804741f2a961c0f2000141f2ae62c0f2000279447a44022808bf0a4641f29061c0f2000179440128204618bf114600f074fe47b197f87b0180b141f28e61c0f20001794419e041f27b61c0f200017944204601b0bde8f04300f05fbe97f8740141f26862c0f2000241f26561c0f2000179447a44002808bf1146204600f04dfe97f8750141f24562c0f2000241f24f61c0f200017944012820467a4408bf114600f03bfe41f23d61c0f200017944204600f033fe97f9c311204600f022ff41f22961c0f200017944204600f026fef6f77afe41f20b68c0f2000841f21766c0f200067e44054600f003003146f844012808bf414641f2f559c0f2000902282046f94408bf494600f008fea808012808bf4646022808bf4e462046314600f0fdfd41f2d351c0f200017944204600f0f5fdd7f8840198b147f64c61c2f207010a68821a012a0bdb0968401a44f6d35100f2e730c1f26201a0fb0101890900e00021204600f0eafe41f29551c0f200017944204600f0d2fdd7f8bc11204600f0ddfe41f28251c0f200017944204600f0c5fdb7f8c011204600f0d0fe41f26a51c0f200017944204600f0b8fd97f8c211204600f0c3fe41f25351c0f200017944204600f0abfdb7f8c611204600f0b6fe41f24055c0f200057d442046294600f09dfdb7f8c811204600f0a8fe2046294600f094fdb7f8ca11204600f09ffe41f21451c0f200017944204600f087fdd7f88011204600f092fe41f2ff41c0f200017944204600f07afd97f9c511204600f069fe41f2eb41c0f200017944204600f06dfd97f9c411204601b0bde8f04300f059be00bf2de9f04f81b0134681464a1c00f08f808e0a4ff0000b19f80b20002a00f0888109eb0b077a78002a00f00a81ba78002a00f00981fa78002a00f008813a79002a00f007817a79002a00f00681ba79002a00f00581fa79002a00f004813a7a002a00f003817a7a002a00f00281ba7a002a00f00181fa7a002a00f000813a7b002a00f0ff807a7b002a00f0fe80ba7b002a00f0fd80fa7b002a00f0fc803a7c002a00f0fb807a7c002a00f0fa80ba7c002a00f0fb80fa7c002a00f0fc803a7d002a00f0fd807a7d002a00f0fe80ba7d002a00f0ff80fa7d002a00f000813a7e002a00f001817a7e002a00f00281ba7e002a00f00381fa7e002a00f004813a7f002a00f005817a7f002a00f00681ba7f002a00f00781fa7f002a00f008810bf1200bbbf1600f7ff477af4ff0600b00e1002119f80120002a00f0af8109eb01056a78002a00f0b080aa78002a00f0b180ea78002a00f0b2802a79002a00f0b3806a79002a00f0b480aa79002a00f0b580ea79002a00f0b6802a7a002a00f0b7806a7a002a00f0b880aa7a002a00f0b980ea7a002a00f0ba802a7b002a00f0bb806a7b002a00f0bc80aa7b002a00f0bd80ea7b002a00f050812a7c002a00f04e816a7c002a00f04c81aa7c002a00f04a81ea7c002a00f048812a7d002a00f046816a7d002a00f04481aa7d002a00f04281ea7d002a00f040812a7e002a00f03e816a7e002a00f03c81aa7e002a00f03a81ea7e002a00f038812a7f002a00f036816a7f002a00f03481aa7f002a00f03281ea7f002a00f03081203160297ff479af32e10bf1010b74e00bf1020b71e00bf1030b6ee00bf1040b6be00bf1050b68e00bf1060b65e00bf1070b62e00bf1080b5fe00bf1090b5ce00bf10a0b59e00bf10b0b56e00bf10c0b53e00bf10d0b50e00bf10e0b4de00bf10f0b4ae00bf1100b47e00bf1110b44e00131f6e00bf1120b3fe00231f1e00bf1130b3ae00331ece00bf1140b35e00431e7e00bf1150b30e00531e2e00bf1160b2be00631dde00bf1170b26e00731d8e00bf1180b21e00831d3e00bf1190b1ce00931cee00bf11a0b17e00a31c9e00bf11b0b12e00b31c4e00bf11c0b0de00c31bfe00bf11d0b08e00d31bae00bf11e0b03e00e31b5e00bf11f0bb1f5205f4ff0010100931fd364234ff47a7442f2107700bf01eb81025200b6fbf2f50a2d11d301fb03f2b6fbf2f50a2d0bd301fb04f2b6fbf2f50a2d05d37943b6fbf1f2092ae7d800e011465846bbf15f0f98bf5f20c0f1000c1ceb0b0a53d0b6fbf1f74cf6cd4207f13003ccf6cc4209f80b300a29a1fb023547d31af1010342d007fb11674fead508b7fbf8fe48f21f520ef1300309eb0b06c5f2eb1273706429a1fb023434d31af102032cd00efb18776409b7fbf4f544f6d35205f13003c1f26202b370b1f57a7fa1fb022323d31af1030218d005fb14729b0941f25975b2fbf3f7cdf2b715a1fb055407f13005f57007fb132642f210720bf1040b91424fea5431a9d209e0834607e00bf1010b04e00bf1020b01e00bf1030b0020009b09f80b002de00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2904d849444ff03f020a7003d1002189f85f1001e000204870002119f80100002800f0a18009eb0105687800285ed0a87800285dd0e87800285cd0287900285bd0687900285ad0a879002859d0e879002858d0287a002857d0687a002856d0a87a002855d0e87a002854d0287b002853d0687b002852d0a87b002851d0e87b002850d0287c00284fd0687c00284ed0a87c00284dd0e87c00284cd0287d00284bd0687d00284ad0a87d002849d0e87d002848d0287e002847d0687e002846d0a87e002845d0e87e002844d0287f002843d0687f002842d0a87f002841d0e87f002840d0203160297ff498af44e001313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2905d849444ff02f00087040f09580002089f85f00581c00f094809d0a4ff0000e19f80e00002800f08d8109eb0e067078002800f00f81b078002800f00e81f078002800f00d813079002800f00c817079002800f00b81b079002800f00a81f079002800f00981307a002800f00881707a002800f00781b07a002800f00681f07a002800f00581307b002800f00481707b002800f00381b07b002800f00281f07b002800f00181307c002800f00081707c002800f0ff80b07c002800f00081f07c002800f00181307d002800f00281707d002800f00381b07d002800f00481f07d002800f00581307e002800f00681707e002800f00781b07e002800f00881f07e002800f00981307f002800f00a81707f002800f00b81b07f002800f00c81f07f002800f00d810ef1200ebef1600f7ff477af4ff0600e05e100204870581c7ff46caf002119f80100002800f0aa8109eb01025078002800f0b0809078002800f0b180d078002800f0b2801079002800f0b3805079002800f0b4809079002800f0b580d079002800f0b680107a002800f0b780507a002800f0b880907a002800f0b980d07a002800f0ba80107b002800f0bb80507b002800f0bc80907b002800f0bd80d07b002800f04b81107c002800f04981507c002800f04781907c002800f04581d07c002800f04381107d002800f04181507d002800f03f81907d002800f03d81d07d002800f03b81107e002800f03981507e002800f03781907e002800f03581d07e002800f03381107f002800f03181507f002800f02f81907f002800f02d81d07f002800f02b81203160297ff479af2de10ef1010e74e00ef1020e71e00ef1030e6ee00ef1040e6be00ef1050e68e00ef1060e65e00ef1070e62e00ef1080e5fe00ef1090e5ce00ef10a0e59e00ef10b0e56e00ef10c0e53e00ef10d0e50e00ef10e0e4de00ef10f0e4ae00ef1100e47e00ef1110e44e00131f1e00ef1120e3fe00231ece00ef1130e3ae00331e7e00ef1140e35e00431e2e00ef1150e30e00531dde00ef1160e2be00631d8e00ef1170e26e00731d3e00ef1180e21e00831cee00ef1190e1ce00931c9e00ef11a0e17e00a31c4e00ef11b0e12e00b31bfe00ef11c0e0de00c31bae00ef11d0e08e00d31b5e00ef11e0e03e00e31b0e00ef11f0e0122b3f5205f1ed364234ff47a7442f2107602eb82004100b5fbf1f00a2811d302fb03f1b5fbf1f00a280bd302fb04f1b5fbf1f00a2805d37243b5fbf2f00928e7d800e00a46f046bef15f0f98bf4ff05f08c8f1000c42f2107a1ceb0e074dd0b5fbf2f30a2a03f1300009f80e004cf6cd40ccf6cc40a2fb000641d3781c3dd003fb1253f608b3fbf6f409eb0e0504f13000687048f21f50c5f2eb10642aa2fb000130d3b81c29d004fb16334e09b3fbf6f4b2f57a7f04f13000a87044f6d350c1f26200a2fb000120d3f81c16d004fb1630890941f25974b0fbf1f3cdf2b714a2fb044603f13004ec7003fb11050ef1040e52454fea5632afd209e0c64607e00ef1010e04e00ef1020e01e00ef1030e002009f80e0001b0bde8f08f0f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2904d849444ff03f00087005d1002089f85f0001b0bde8f08f0020487001b0bde8f08f2de9f0411f22831813f81f7c002f00f0808013f81e7c002f7dd013f81d7c002f7bd013f81c7c002f79d013f81b7c002f77d013f81a7c002f75d013f8197c002f73d013f8187c002f71d013f8177c002f6fd013f8167c002f6dd013f8157c002f6bd013f8147c002f69d013f8137c002f67d013f8127c002f65d013f8117c002f63d013f8107c002f61d013f80f7c002f5fd013f80e7c002f5dd013f80d7c002f5bd013f80c7c002f59d013f80b7c002f57d013f80a7c002f55d013f8097c002f53d013f8087c002f51d013f8077c002f4fd013f8067c002f4dd013f8057c002f4bd013f8047c002f49d013f8037c002f47d013f8027c002f45d013f8013c002b43d0835c002b41d020327f2a7ff47baf64e01f3a3ae01e3a38e01d3a36e01c3a34e01b3a32e01a3a30e0193a2ee0183a2ce0173a2ae0163a28e0153a26e0143a24e0133a22e0123a20e0113a1ee0103a1ce00f3a1ae00e3a18e00d3a16e00c3a14e00b3a12e00a3a10e0093a0ee0083a0ce0073a0ae0063a08e0053a06e0043a04e0033a02e0023a00e0013a5f2a25d8c2f15d0cc2f15e0ec2f15f03c2f160080244002509e000bffc78002cf47008bfbde8f0810435a84510d04e5d565586b1ab420bd04f197c78561974704cb1ae4504d0bc78b47024b1ac45e5d1002180f85f10bde8f08100bf7f2905d140f2eb71c0f20001794403e7b1f1ff3fc8bf0fe0b0b540f2d572c0f200027a440d4611460446fff7f5fe20466942bde8b040ffe72de9f04f4ff0000c10f80c20002a00f0c48000eb0c035a78002a62d09a78002a62d0da78002a62d01a79002a62d05a79002a62d09a79002a62d0da79002a62d01a7a002a62d05a7a002a62d09a7a002a62d0da7a002a62d01a7b002a62d05a7b002a62d09a7b002a62d0da7b002a62d01a7c002a62d05a7c002a62d09a7c002a62d0da7c002a62d01a7d002a62d05a7d002a62d09a7d002a62d0da7d002a62d01a7e002a62d05a7e002a62d09a7e002a62d0da7e002a62d01a7f002a62d05a7f002a62d09a7f002a62d0da7f002a62d00cf1200cbcf1600f7ff496af4ff0600c5be00cf1010c58e00cf1020c55e00cf1030c52e00cf1040c4fe00cf1050c4ce00cf1060c49e00cf1070c46e00cf1080c43e00cf1090c40e00cf10a0c3de00cf10b0c3ae00cf10c0c37e00cf10d0c34e00cf10e0c31e00cf10f0c2ee00cf1100c2be00cf1110c28e00cf1120c25e00cf1130c22e00cf1140c1fe00cf1150c1ce00cf1160c19e00cf1170c16e00cf1180c13e00cf1190c10e00cf11a0c0de00cf11b0c0ae00cf11c0c07e00cf11d0c04e00cf11e0c01e00cf11f0c01230a291fd364274ff47a7642f2107500bf03eb83025200b1fbf2f40a2c11d303fb07f2b1fbf2f40a2c0bd303fb06f2b1fbf2f40a2c05d36b43b1fbf3f2092ae7d800e01346e2464cf6cd49bcf15f0f98bf4ff05f0acaf1000eccf6cc491eeb0c0b4ed0b1fbf3f50a2b05f1300200f80c20a3fb092446d31bf1010241d005fb1316e508b6fbf5f800eb0c0108f130024a7048f21f52c5f2eb12642ba3fb022434d31bf102022cd008fb15656609b5fbf6f4b3f57a7f04f130028a7044f6d352c1f26202a3fb027223d31bf1030718d004fb1654920941f25976b4fbf2f5cdf2b716a3fb066705f13006ce7005fb124142f210720cf1040c93424fea5733aed209e0d44607e00cf1010c04e00cf1020c01e00cf1030c002100f80c10bde8f08f0000434d01ffff0000000000000052420100ff00000008031000000000000000000046616365636c61772f3335000000000000000000000000000000002020202020002020000000505050000000000000000000005050f85050f85050000000002070a8a07028a8702000000048a85010202854480000000020505020689090680000002020200000000000000000000010204040404020100000000040201010101020400000000000005020f82050000000000000002020f82020000000000000000000000020204000000000000000f800000000000000000000000000202000000000080810102020404000000000708898a8c88888700000000020602020202020700000000070888808102040f8000000007088083008088870000000000818284888f8080800000000f88080f00808887000000000708080f08888887000000000f808081010202020000000007088887088888870000000007088888878080870000000000000202000002020000000000000202000002020400000000008102040201008000000000000f80000f8000000000000004020100810204000000000708888102000202000000000708898a8a89880780000000070888888f888888800000000f08888f0888888f000000000708880808080887000000000e0908888888890e000000000f88080f0808080f800000000f88080f0808080800000000070888080b888887000000000888888f888888888000000007020202020202070000000003810101010909060000000008890a0c0c0a090880000000080808080808080f80000000088d8a8a888888888000000008888c8a89888888800000000708888888888887000000000f0888888f080808000000000708888888888a87008000000f0888888f0a0908800000000708880700808887000000000f8202020202020200000000088888888888888700000000088888850505020200000000088888888a8a8d88800000000888850202050888800000000888850502020202000000000f8081020408080f8000000007040404040404070000000004040202010100808000000007010101010101070000000205088000000000000000000000000000000000000f80040200000000000000000000000000000700878888878000000008080f088888888f00000000000007088808088700000000008087888888888780000000000007088f8808078000000001820702020202020000000000000788888888878087000008080f08888888888000000202000602020202070000000080800180808080808483000004040485060605048000000006020202020202070000000000000f0a8a8a8a8a8000000000000f08888888888000000000000708888888870000000000000f088888888f0808000000000788888888878080800000000b8c0808080800000000000007880700808f00000000020207020202020180000000000008888888888780000000000008888505020200000000000008888a8a8a870000000000000885020205088000000000000888888888878087000000000f810204080f800000000182020402020201800000000202020202020202000000000601010081010106000000048a89000000000000000009f0535593747c181040101010201020c005353a829c51bd314a810260d5b0bfe096d6963205220006d6963204c20006d6963203f20006e6f206374780061726d200063666720006f6666200070646d00636f646563002072656720002074626c2000540053002d00206c65617365200073207461702000200042400020736b697020002f002066722000206e7466200020756e7265672000000000", "desc": "append injected blobs to main-app payload" }, { "offset": 779123, "old": "805a3900", - "new": "34733a00", + "new": "186e3a00", "desc": "main-app subheader payload size (ps)" }, { "offset": 152, "old": "005b3900", - "new": "b4733a00", + "new": "986e3a00", "desc": "main-app TOC entry size (ps + 128)" }, { "offset": 779243, "old": "805a3904", - "new": "34733a04", + "new": "186e3a04", "desc": "main-app preamble length (low 24 bits)" }, { "offset": 779247, "old": "effdbcea", - "new": "85d22153", + "new": "cbb2ae81", "desc": "[5] ota/s200_firmware_ota.bin preamble crc32" }, { "offset": 156, "old": "c0c6322a", - "new": "817b5baa", + "new": "35dc5a11", "desc": "[5] ota/s200_firmware_ota.bin component crc32c (TOC)" }, { "offset": 779127, "old": "c0c6322a", - "new": "817b5baa", + "new": "35dc5a11", "desc": "[5] ota/s200_firmware_ota.bin component crc32c (subheader)" } ] diff --git a/app/native/audio-monitor.ts b/app/native/audio-monitor.ts new file mode 100644 index 00000000..6159037e --- /dev/null +++ b/app/native/audio-monitor.ts @@ -0,0 +1,77 @@ +/** + * Passive view of the glasses' audio traffic, for diagnostics. Nothing here + * sends anything to the glasses: the listeners only observe packets and CFW + * mic_control status records that arrive because something else (a stock + * EvenHub mic enable, or a CFW mic_control CONFIGURE) turned the mics on. + */ +import { toUint8Array } from "../util/array-util"; + +declare const com: any; +declare const global: any; + +export type AudioArm = "L" | "R" | "?"; + +function activeCommunicator(): any { + if (!global.isAndroid) return null; + try { + return com.faceclaw.app.FaceclawBleCommunicator.getActive(); + } catch { + return null; + } +} + +/** The communicator instance listeners attach to; changes across reconnects. */ +export function audioMonitorCommunicator(): any { + return activeCommunicator(); +} + +/** + * True while Faceclaw itself is forwarding glasses audio to one of its apps + * (stock mic enable or CFW mic_control forwarding). Packets can also arrive + * with this false, e.g. when capture was armed and Faceclaw's side stopped. + */ +export function isFaceclawAudioCaptureActive(): boolean { + try { + return Boolean(activeCommunicator()?.isAudioCaptureActive()); + } catch { + return false; + } +} + +/** + * Subscribe `communicator` to every audio-characteristic packet and every + * field-104 mic status record body (undecoded). Delivered on the main thread. + * Returns an unsubscribe function. + */ +export function addAudioMonitorListeners( + communicator: any, + onPacket: (data: Uint8Array, arm: AudioArm, arrivalMs: number) => void, + onStatus: (body: Uint8Array, arm: AudioArm) => void, +): () => void { + if (!communicator) return () => {}; + const packetProxy = new com.faceclaw.app.FaceclawAudioPacketListener({ + onAudioPacket: (data: any, arm: string, arrivalMs: number) => { + onPacket(toUint8Array(data), toArm(arm), Number(arrivalMs)); + }, + }); + const statusProxy = new com.faceclaw.app.FaceclawMicStatusListener({ + onMicStatus: (body: any, arm: string) => { + onStatus(toUint8Array(body), toArm(arm)); + }, + }); + communicator.addAudioMonitorListener(packetProxy); + communicator.addMicStatusListener(statusProxy); + return () => { + try { + communicator.removeAudioMonitorListener(packetProxy); + communicator.removeMicStatusListener(statusProxy); + } catch { + // The communicator may have been torn down during a disconnect. + } + }; +} + +function toArm(arm: string): AudioArm { + const value = String(arm); + return value === "L" || value === "R" ? value : "?"; +} diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionControls.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionControls.kt index 7694eb3a..6671eb8c 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionControls.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionControls.kt @@ -488,6 +488,22 @@ internal fun GlassesSessionCore.emitMicStatus(body: ByteArray, address: String) } } +internal fun GlassesSessionCore.emitAudioMonitorPacket(data: ByteArray, arm: String, arrivalMs: Long) { + if (audioMonitorListeners.isEmpty()) { + return + } + val copy = data.copyOf() + host.postToMain { + for (monitorListener in audioMonitorListeners) { + try { + monitorListener.onAudioPacket(copy, arm, arrivalMs) + } catch (t: Throwable) { + logWarn("audio monitor listener failed", t) + } + } + } +} + internal fun GlassesSessionCore.emitRingEvent(event: G2Event, frameId: Int) { val current = listener if (current == null) { diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt index b35ed9a1..831d4820 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt @@ -124,6 +124,7 @@ class GlassesSessionCore( internal val compassSubscriptions = CopyOnWriteList(platform) internal val ambientLightListeners = CopyOnWriteList(platform) internal val micStatusListeners = CopyOnWriteList(platform) + internal val audioMonitorListeners = CopyOnWriteList(platform) @Volatile internal var running = false @Volatile internal var userDisconnectRequested = false // Set when a connect attempt failed while an arm's OS bond is gone: @@ -834,6 +835,24 @@ class GlassesSessionCore( } } + /** + * Observe every packet on the audio (render) characteristic, on the main + * thread, whether or not any capture is active. Purely passive: sends + * nothing to the glasses and does not affect the capture listener, so it + * shows what another app's mic activation actually produces. + */ + fun addAudioMonitorListener(listener: FaceclawAudioPacketListener?) { + if (listener != null) { + audioMonitorListeners.add(listener) + } + } + + fun removeAudioMonitorListener(listener: FaceclawAudioPacketListener?) { + if (listener != null) { + audioMonitorListeners.remove(listener) + } + } + /** * Queue a CFW mic_control record (['M','C',ver,op,...]) as a settings * field-103 write to both temples, or to a single one. Fire-and-forget: @@ -1593,10 +1612,11 @@ class GlassesSessionCore( lastIncomingAtMs = arrivalMs listenerToCall = if (audioCaptureActive) audioPacketListener else null } + val arm = if (address.equals(leftAddress, ignoreCase = true)) "L" else if (address.equals(rightAddress, ignoreCase = true)) "R" else "?" + emitAudioMonitorPacket(data, arm, arrivalMs) if (listenerToCall == null) { return } - val arm = if (address.equals(leftAddress, ignoreCase = true)) "L" else if (address.equals(rightAddress, ignoreCase = true)) "R" else "?" try { listenerToCall.onAudioPacket(data.copyOf(), arm, arrivalMs) } catch (t: Throwable) { From 3601a998a359fbc60ae6a9bc4fbb5ee1a4ea44fb Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sun, 27 Sep 2026 16:33:43 -0700 Subject: [PATCH 03/60] CPU usage optimizations --- .../app/FaceclawEvenHubChromeClient.kt | 22 +++++ .../faceclaw/app/FaceclawEvenHubJsBridge.kt | 6 ++ .../app/FaceclawEvenHubWebViewHost.kt | 90 ++++++++++++++---- app/apps/evenhub/session.ts | 93 +++++++++++++------ app/apps/evenhub/webview.ts | 11 +-- app/graphics/evenhub-font.ts | 38 +++++++- app/native/nightscout-bridge.ts | 6 +- app/util/http.ts | 52 +++++++++++ .../com/faceclaw/app/PlatformUtil.android.kt | 14 ++- .../g2protocol/session/GlassesSessionCore.kt | 32 +++---- .../g2protocol/session/GlassesSessionSend.kt | 12 ++- .../app/graphics/DisplayListRenderer.kt | 75 ++++++++++++++- .../com/faceclaw/app/graphics/ShellScene.kt | 10 +- .../app/graphics/SurfaceCompositor.kt | 6 +- tests/evenhub-timer-shim.test.cjs | 77 +++++++++++++++ .../com/faceclaw/app/DisplayListTest.kt | 40 ++++++++ tests/nightscout.test.cjs | 4 +- 17 files changed, 494 insertions(+), 94 deletions(-) create mode 100644 App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubChromeClient.kt create mode 100644 tests/evenhub-timer-shim.test.cjs diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubChromeClient.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubChromeClient.kt new file mode 100644 index 00000000..0b03f8d9 --- /dev/null +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubChromeClient.kt @@ -0,0 +1,22 @@ +package com.faceclaw.app + +import android.util.Log +import android.webkit.ConsoleMessage +import android.webkit.WebChromeClient + +/** + * Surfaces a hosted EvenHub app's console in logcat (tag FaceclawEvenHubConsole). + * Native rather than a NativeScript-extended WebChromeClient: chatty apps log + * many lines a second, and each one used to cost a Java->JS callback plus three + * JS->Java calls back to read the message, all on the main thread. + */ +class FaceclawEvenHubChromeClient : WebChromeClient() { + override fun onConsoleMessage(message: ConsoleMessage): Boolean { + Log.i(TAG, "${message.message()} (${message.sourceId()}:${message.lineNumber()})") + return true + } + + private companion object { + const val TAG = "FaceclawEvenHubConsole" + } +} diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubJsBridge.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubJsBridge.kt index 90c8c1e7..d099d419 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubJsBridge.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubJsBridge.kt @@ -23,4 +23,10 @@ class FaceclawEvenHubJsBridge(private val listener: FaceclawEvenHubListener) { listener.onEvenAppMessage(handlerName, argsJson, callId) } } + + /** The page's timer shim has work due before the host's next tick. */ + @JavascriptInterface + fun wakeTimers() { + FaceclawEvenHubWebViewHost.getInstance().wakeTimers() + } } diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt index bee8e1da..19d5a5a0 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt @@ -11,6 +11,7 @@ import android.webkit.WebView import android.widget.FrameLayout import java.util.ArrayList +import java.util.HashMap /** * Keeps EvenHub app WebViews alive and rendering while the phone shows the @@ -39,9 +40,11 @@ import java.util.ArrayList * crawl even though the renderer is still alive. Host-initiated * evaluateJavascript is NOT subject to that throttle, so we drive the app's * timers ourselves: a document-start shim replaces setTimeout/setInterval (and - * requestAnimationFrame) with JS queues fired by window.__fcTimerTick() / - * __fcRafTick(), and this host ticks those on the main thread at a fixed rate - * regardless of screen state. The main Looper keeps running under the + * requestAnimationFrame) with JS queues fired by window.__fcTick(), and this + * host ticks those on the main thread regardless of screen state. The tick + * returns when the page next has work, so an idle page isn't evaluated at + * 60Hz; work scheduled between ticks wakes the host through + * FaceclawEvenHubJsBridge.wakeTimers. The main Looper keeps running under the * foreground service, so the tick survives the screen turning off. (Matches the * official Even app's approach.) * @@ -73,23 +76,69 @@ class FaceclawEvenHubWebViewHost { private val mainHandler = Handler(Looper.getMainLooper()) private val webViews: MutableList = ArrayList() - private var ticking = false - private val ticker: Runnable = object : Runnable { + private val tickers: MutableMap = HashMap() + + /** + * Drives one page's timer/rAF queues (window.__fcTick). Each tick's result + * says when the page next has work; the ticker sleeps until then, or until + * the page wakes it. It also re-ticks after IDLE_POLL_MS regardless, so a + * lost evaluateJavascript callback (e.g. mid-navigation) or a page whose + * wake didn't reach us stalls its timers for at most that long. + */ + private inner class Ticker(private val web: WebView) : Runnable { + private var inFlight = false + private var wakePending = false + private var stopped = false + override fun run() { - for (i in 0 until webViews.size) { - webViews[i].evaluateJavascript( - "window.__fcTimerTick&&__fcTimerTick();window.__fcRafTick&&__fcRafTick()", null) + if (stopped) return + inFlight = true + web.evaluateJavascript(TICK_JS) { result -> onTicked(result) } + schedule(IDLE_POLL_MS) + } + + private fun onTicked(result: String?) { + inFlight = false + if (stopped) return + // -1 (nothing pending) and null (shim not installed yet) both leave + // only the idle poll; the page wakes us when it schedules work. + val next = result?.toDoubleOrNull()?.toLong() ?: -1L + val delay = when { + wakePending -> 0L + next < 0 -> IDLE_POLL_MS + else -> next.coerceIn(TICK_MS, IDLE_POLL_MS) } - if (ticking) mainHandler.postDelayed(this, TICK_MS) + wakePending = false + schedule(delay) + } + + fun wake() { + if (stopped) return + if (inFlight) wakePending = true else schedule(0) + } + + fun stop() { + stopped = true + mainHandler.removeCallbacks(this) + } + + private fun schedule(delayMs: Long) { + mainHandler.removeCallbacks(this) + mainHandler.postDelayed(this, delayMs) } } companion object { private var instance: FaceclawEvenHubWebViewHost? = null - /** How often the host fires the JS timer queue. 60Hz keeps games smooth. */ + /** Shortest interval between ticks. 60Hz keeps games smooth. */ private const val TICK_MS = 16L + /** Longest a page goes without a tick, as a backstop for missed wakes. */ + private const val IDLE_POLL_MS = 1000L + + private const val TICK_JS = "window.__fcTick?__fcTick():null" + @JvmStatic @Synchronized fun getInstance(): FaceclawEvenHubWebViewHost { @@ -148,12 +197,24 @@ class FaceclawEvenHubWebViewHost { web.setRendererPriorityPolicy(WebView.RENDERER_PRIORITY_IMPORTANT, false) } if (!webViews.contains(web)) webViews.add(web) - if (!ticking) { - ticking = true + if (!tickers.containsKey(web)) { + val ticker = Ticker(web) + tickers[web] = ticker mainHandler.postDelayed(ticker, TICK_MS) } } + /** + * A page scheduled a timer or animation frame due before its next tick. + * Called from the JavaBridge thread; which page asked doesn't matter, as + * an extra tick for another page is harmless. + */ + fun wakeTimers() { + mainHandler.post { + for (ticker in tickers.values) ticker.wake() + } + } + /** Bring an app's WebView to the front of [activity] so it is visible on the phone. */ fun showOnPhone(activity: Activity?, web: WebView) { val o = if (activity != null) ensureOverlay(activity) else overlay ?: return @@ -180,10 +241,7 @@ class FaceclawEvenHubWebViewHost { /** Remove and destroy a WebView (its app is closing). */ fun detach(web: WebView) { webViews.remove(web) - if (webViews.isEmpty() && ticking) { - ticking = false - mainHandler.removeCallbacks(ticker) - } + tickers.remove(web)?.stop() overlay?.removeView(web) web.destroy() } diff --git a/app/apps/evenhub/session.ts b/app/apps/evenhub/session.ts index 74ea59f9..19bb344c 100644 --- a/app/apps/evenhub/session.ts +++ b/app/apps/evenhub/session.ts @@ -110,30 +110,61 @@ export const EVENHUB_BRIDGE_INJECT_SCRIPT = ` }; })(); (function () { - // Host-driven timers. Chromium heavily throttles a page's own - // setTimeout/setInterval when the phone screen is off, which slows - // timer-driven apps to a crawl. Replace them with a queue fired by - // window.__fcTimerTick(), which the native host calls at ~60Hz regardless of + // Host-driven timers and requestAnimationFrame. Chromium heavily throttles a + // page's own setTimeout/setInterval when the phone screen is off, and pauses + // or throttles a hidden page's rAF, which slows timer-driven apps to a crawl + // and stalls canvas apps that render on a rAF loop. Replace them with queues + // fired by window.__fcTick(), which the native host calls regardless of // screen state (host-initiated evaluateJavascript escapes the throttle). - if (window.__fcTimerTick) return; + // (The glasses render via BLE, not the phone's display, so vsync alignment + // doesn't matter — a steady frame rate does.) + // + // __fcTick returns how many ms until it next has work (-1: none), and the + // host sleeps until then instead of evaluating JS at 60Hz for an idle page. + // Work added outside a tick that is due before the host's next tick wakes it + // through the bridge. + if (window.__fcTick) return; + var FRAME_MS = 16; var timers = new Map(); var nextId = 1; + var rafs = new Map(); + var nextRafId = 1; + var inTick = false; + // When the host will next call __fcTick; Infinity while it is idle. + var hostNextTickAt = Infinity; + function needTickBy(due) { + if (inTick || due >= hostNextTickAt) return; + hostNextTickAt = Date.now(); + var bridge = window.__faceclawEvenHub; + if (bridge && bridge.wakeTimers) bridge.wakeTimers(); + } window.setTimeout = function (cb, delay) { var args = Array.prototype.slice.call(arguments, 2); var id = nextId++; - timers.set(id, { cb: cb, args: args, due: Date.now() + (+delay || 0), interval: 0 }); + var due = Date.now() + (+delay || 0); + timers.set(id, { cb: cb, args: args, due: due, interval: 0 }); + needTickBy(due); return id; }; window.setInterval = function (cb, delay) { var args = Array.prototype.slice.call(arguments, 2); var id = nextId++; var d = +delay || 0; - timers.set(id, { cb: cb, args: args, due: Date.now() + d, interval: d }); + var due = Date.now() + d; + timers.set(id, { cb: cb, args: args, due: due, interval: d }); + needTickBy(due); return id; }; window.clearTimeout = function (id) { timers.delete(id); }; window.clearInterval = function (id) { timers.delete(id); }; - window.__fcTimerTick = function () { + window.requestAnimationFrame = function (cb) { + var id = nextRafId++; + rafs.set(id, cb); + needTickBy(Date.now() + FRAME_MS); + return id; + }; + window.cancelAnimationFrame = function (id) { rafs.delete(id); }; + function runTimers() { var now = Date.now(); var dueIds = []; timers.forEach(function (entry, id) { if (entry.due <= now) dueIds.push(id); }); @@ -151,24 +182,8 @@ export const EVENHUB_BRIDGE_INJECT_SCRIPT = ` } try { entry.cb.apply(null, entry.args); } catch (e) { if (window.console) console.error(e); } } - }; -})(); -(function () { - // Host-driven requestAnimationFrame, same idea as the timers above: a hidden - // page's rAF is paused/throttled with the screen off, stalling canvas apps - // that render on a rAF loop. Drive it from window.__fcRafTick(), called by the - // native ticker each frame. (The glasses render via BLE, not the phone's - // display, so vsync alignment doesn't matter — a steady frame rate does.) - if (window.__fcRafTick) return; - var rafs = new Map(); - var nextRafId = 1; - window.requestAnimationFrame = function (cb) { - var id = nextRafId++; - rafs.set(id, cb); - return id; - }; - window.cancelAnimationFrame = function (id) { rafs.delete(id); }; - window.__fcRafTick = function () { + } + function runRafs() { if (rafs.size === 0) return; var ts = window.performance && performance.now ? performance.now() : Date.now(); // Snapshot and clear: callbacks that re-request during this frame run on @@ -178,6 +193,32 @@ export const EVENHUB_BRIDGE_INJECT_SCRIPT = ` current.forEach(function (cb) { try { cb(ts); } catch (e) { if (window.console) console.error(e); } }); + } + function inTickDo(fn) { + inTick = true; + try { fn(); } finally { inTick = false; } + } + // Fixed-rate entry points for hosts that don't use __fcTick's schedule (the + // iOS host calls both every frame). + window.__fcTimerTick = function () { inTickDo(runTimers); }; + window.__fcRafTick = function () { inTickDo(runRafs); }; + window.__fcTick = function () { + inTick = true; + try { + runTimers(); + runRafs(); + } finally { + inTick = false; + } + var now = Date.now(); + var delay = rafs.size ? FRAME_MS : -1; + timers.forEach(function (entry) { + var d = entry.due - now; + if (delay < 0 || d < delay) delay = d; + }); + if (delay >= 0) delay = Math.max(FRAME_MS, Math.ceil(delay)); + hostNextTickAt = delay < 0 ? Infinity : now + delay; + return delay; }; })(); `; diff --git a/app/apps/evenhub/webview.ts b/app/apps/evenhub/webview.ts index 686682a1..06c0f0d3 100644 --- a/app/apps/evenhub/webview.ts +++ b/app/apps/evenhub/webview.ts @@ -96,16 +96,7 @@ export function createEvenHubWebView(session: EvenHubSession): EvenHubWebView { webView.addJavascriptInterface(new com.faceclaw.app.FaceclawEvenHubJsBridge(listener), "__faceclawEvenHub"); // Surface the app's console in logcat (tag FaceclawEvenHubConsole). - const ChromeClient = (android.webkit.WebChromeClient as any).extend({ - onConsoleMessage: (message: any): boolean => { - android.util.Log.i( - "FaceclawEvenHubConsole", - `${message.message()} (${message.sourceId()}:${message.lineNumber()})`, - ); - return true; - }, - }); - webView.setWebChromeClient(new ChromeClient()); + webView.setWebChromeClient(new com.faceclaw.app.FaceclawEvenHubChromeClient()); const nativeHost = com.faceclaw.app.FaceclawEvenHubWebViewHost.getInstance(); nativeHost.attach(activity, webView); diff --git a/app/graphics/evenhub-font.ts b/app/graphics/evenhub-font.ts index 61e5025a..737715ed 100644 --- a/app/graphics/evenhub-font.ts +++ b/app/graphics/evenhub-font.ts @@ -95,6 +95,34 @@ function inMode15UncertainRange(cp: number): boolean { return false; } +/** + * advanceOf's result per (codePoint, nextCodePoint) pair. Pretext's metrics + * are static data, so this never goes stale; it saves wrap/draw three + * getTextWidth calls (each splitting strings and walking the font chain) for + * every character of every repaint. + */ +const kernedAdvances = new Map(); + +function kernedAdvance(codePoint: number, nextCodePoint: number): number { + // Codepoints are < 0x110000, so this key is unique and exact as a double. + const key = codePoint * 0x110000 + nextCodePoint; + let advance = kernedAdvances.get(key); + if (advance === undefined) { + const a = String.fromCodePoint(codePoint); + if (!nextCodePoint) { + advance = getTextWidth(a); + } else { + const b = String.fromCodePoint(nextCodePoint); + advance = getTextWidth(a + b) - getTextWidth(b); + } + // Pairs are bounded by the text actually shown, but CJK-heavy apps could + // still accumulate a lot of them; start over rather than grow forever. + if (kernedAdvances.size >= 65536) kernedAdvances.clear(); + kernedAdvances.set(key, advance); + } + return advance; +} + /** The 4bpp level an 8-bit value packs to (BmpUtil's GRAY_TO_NIBBLE). */ const quantNibble = grayToNibble; @@ -178,15 +206,15 @@ export class EvenHubFont implements FwTextFont { * exactly: width(a+b) - width(b) isolates a's kerned advance. */ advanceOf(codePoint: number, nextCodePoint = 0): number { - const a = String.fromCodePoint(codePoint); - if (!nextCodePoint) return getTextWidth(a); - const b = String.fromCodePoint(nextCodePoint); - return getTextWidth(a + b) - getTextWidth(b); + return kernedAdvance(codePoint, nextCodePoint); } /** Single-line pixel width including kerning (pretext-exact). */ measureLine(text: string): number { - return getTextWidth(text); + const cps = Array.from(text, (c) => c.codePointAt(0)!); + let width = 0; + for (let i = 0; i < cps.length; i++) width += kernedAdvance(cps[i]!, cps[i + 1] ?? 0); + return width; } /** diff --git a/app/native/nightscout-bridge.ts b/app/native/nightscout-bridge.ts index 646b6622..de0856dc 100644 --- a/app/native/nightscout-bridge.ts +++ b/app/native/nightscout-bridge.ts @@ -1,5 +1,5 @@ import { nightscoutApiTokenSetting, nightscoutSiteUrlSetting } from "../ui/dashboard-settings"; -import { fetchWithUserAgent } from "../util/http"; +import { fetchTextWithUserAgent } from "../util/http"; export type NightscoutPoint = { timestampMs: number; @@ -305,11 +305,11 @@ export class NightscoutBridge { } async function fetchJson(url: string): Promise { - const response = await fetchWithUserAgent(url); + const response = await fetchTextWithUserAgent(url); if (!response.ok) { throw new Error(`HTTP ${response.status}`); } - return (await response.json()) as T; + return response.json(); } function parseTreatments(treatments: NightscoutTreatmentResponse[], nowMs: number): { diff --git a/app/util/http.ts b/app/util/http.ts index 9e0a087b..598fc9ef 100644 --- a/app/util/http.ts +++ b/app/util/http.ts @@ -16,6 +16,58 @@ export function fetchWithUserAgent(url: string, init?: RequestInit): Promise; + json(): Promise; +} + +/** + * fetchWithUserAgent for text/JSON bodies, decoded on the Java side. + * NativeScript's fetch() polyfill reads every body as a blob, and on Android + * that copies it from the Java byte[] into JS one bridge call per byte + * (Uint8Array.from in http-request's toArrayBuffer): ~160ms of main thread + * for one Nightscout refresh. Here the body crosses once, as a string. + */ +export async function fetchTextWithUserAgent( + url: string, + init?: { method?: string; headers?: HeadersInit; body?: string }, +): Promise { + // Required lazily so the Node test harness can load this module (via + // fetchWithUserAgent's users) without mocking @nativescript/core. Only the + // http module: the @nativescript/core barrel would pull the UI classes + // (Frame's FragmentClass etc.) into the app workers that import this file, + // and their duplicate extends break the static binding generator. + const { request } = require("@nativescript/core/http") as typeof import("@nativescript/core/http"); + const response = await request({ + url, + method: init?.method ?? "GET", + headers: withUserAgent(init?.headers), + content: init?.body, + }); + const status = response.statusCode; + let body: string | undefined; + const read = (): string => { + if (body === undefined) { + const content = response.content as any; + if (!content) body = ""; + // HttpResponseEncoding.UTF8 is 0, so content.toString() can't ask for + // UTF-8 explicitly on Android; decode the raw ByteArrayOutputStream. + else if (global.isAndroid) body = String(content.raw.toString("UTF-8")); + else body = content.toString(); + } + return body!; + }; + return { + ok: status >= 200 && status < 300, + status, + text: async () => read(), + json: async () => JSON.parse(read()), + }; +} + /** Copies headers into a plain record, adding our User-Agent if absent. */ export function withUserAgent(headers?: HeadersInit): Record { const merged: Record = {}; diff --git a/native/kotlin/shared/src/androidMain/kotlin/com/faceclaw/app/PlatformUtil.android.kt b/native/kotlin/shared/src/androidMain/kotlin/com/faceclaw/app/PlatformUtil.android.kt index fa5bb6a0..1af070c1 100644 --- a/native/kotlin/shared/src/androidMain/kotlin/com/faceclaw/app/PlatformUtil.android.kt +++ b/native/kotlin/shared/src/androidMain/kotlin/com/faceclaw/app/PlatformUtil.android.kt @@ -15,8 +15,18 @@ actual class Sha256Digest actual constructor() { actual fun currentTimeMillis(): Long = System.currentTimeMillis() -actual fun formatLocalTime(epochMs: Long, pattern: String): String = - SimpleDateFormat(pattern, Locale.US).format(Date(epochMs)) +// SimpleDateFormat is costly to build (pattern parse, Calendar, locale data) and not thread-safe, +// so keep one per thread per pattern; the send loop formats a timestamp for every image it logs. +private val localTimeFormats = object : ThreadLocal>() { + override fun initialValue() = HashMap() +} + +actual fun formatLocalTime(epochMs: Long, pattern: String): String { + val format = localTimeFormats.get()!!.getOrPut(pattern) { SimpleDateFormat(pattern, Locale.US) } + // Re-read the default zone each call, as a fresh instance would. + format.timeZone = java.util.TimeZone.getDefault() + return format.format(Date(epochMs)) +} actual object PlatformLog { actual fun i(tag: String, message: String) { diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt index b35ed9a1..12eb9a7b 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt @@ -274,15 +274,17 @@ class GlassesSessionCore( internal val desiredTilesLock: ProtocolLock = platform.createLock() internal var desiredFingerprint = "" - // Headerless packed 4bpp frame (see BmpUtil.pack4bppFromGray8) plus its - // pixel dimensions. - internal var desiredPacked: ByteArray? = ByteArray(0) + // Composited 8bpp frame plus its pixel dimensions. The send loop packs it to + // the headerless 4bpp wire format (BmpUtil.pack4bppFromGray8) when it picks + // the frame up, so frames superseded before sending are never packed and + // the packing stays off the submitting (main) thread. + internal var desiredGray: ByteArray? = ByteArray(0) internal var desiredWidth = 0 internal var desiredHeight = 0 internal var desiredPaintMs = 0 internal var desiredFrameId = 0 // Screen-space deferred draws (glyphs + images) whose pixels are baked - // into desiredPacked; the resource-cache planner may replay them as + // into desiredGray; the resource-cache planner may replay them as // on-glasses cached draws. internal var desiredDraws: Array? = arrayOf() // (frame, reason) of the last "waiting to send" line, so a frame that @@ -943,9 +945,7 @@ class GlassesSessionCore( val frameId = frameTimings.startFrame( "compositor:visible $id=$visible") compositor.setSurfaceVisible(id, visible) - val composite = compositor.composite() - val packed = BmpUtil.pack4bppFromGray8(composite.screenGray, composite.width, composite.height) - storeDesiredComposite(composite, packed, 0, frameId) + storeDesiredComposite(compositor.composite(), 0, frameId) } /** @@ -957,9 +957,7 @@ class GlassesSessionCore( val frameId = frameTimings.startFrame( "compositor:" + (if (blanked) "blank" else "unblank")) compositor.setBlanked(blanked) - val composite = compositor.composite() - val packed = BmpUtil.pack4bppFromGray8(composite.screenGray, composite.width, composite.height) - storeDesiredComposite(composite, packed, 0, frameId) + storeDesiredComposite(compositor.composite(), 0, frameId) } /** @@ -979,7 +977,7 @@ class GlassesSessionCore( fun submitShellScene(bytes: ByteReader, paintMs: Int, frameId: Int) { compositor.setShellScene(bytes) val composite = compositor.composite() - storeDesiredComposite(composite, BmpUtil.pack4bppFromGray8(composite.screenGray, composite.width, composite.height), paintMs, frameId) + storeDesiredComposite(composite, paintMs, frameId) } /** Legacy compositor dimming for callers without a shell scene. */ @@ -1016,17 +1014,11 @@ class GlassesSessionCore( val composite = compositor.applyAndComposite( surfaceId, pixels8bpp, rectX, rectY, rectWidth, rectHeight, contentFingerprint, glyphs) frameTimings.spanEnd(frameId, "composite") - // Pack the composited 8bpp buffer down to the headerless 4bpp frame - // format the wire planners consume; BMP framing is added later only for - // the uncompressed fallback. - frameTimings.spanStart(frameId, "pack-4bpp") - val packed = BmpUtil.pack4bppFromGray8(composite.screenGray, composite.width, composite.height) - frameTimings.spanEnd(frameId, "pack-4bpp") - storeDesiredComposite(composite, packed, paintMs, frameId) + storeDesiredComposite(composite, paintMs, frameId) } /** Store a composite as the desired frame unless a newer one won the race. */ - internal fun storeDesiredComposite(composite: SurfaceCompositor.Composite, packed: ByteArray, paintMs: Int, frameId: Int) { + internal fun storeDesiredComposite(composite: SurfaceCompositor.Composite, paintMs: Int, frameId: Int) { var supersededFrameId = 0 var stale = false desiredTilesLock.locked { @@ -1037,7 +1029,7 @@ class GlassesSessionCore( } else { lastStoredCompositeSeq = composite.seq supersededFrameId = desiredFrameId - desiredPacked = packed + desiredGray = composite.screenGray desiredWidth = composite.width desiredHeight = composite.height desiredFingerprint = composite.fingerprint diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt index d116a71e..ba36b747 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt @@ -711,7 +711,7 @@ internal fun GlassesSessionCore.enqueueAmbientLightControlLocked(payload: ByteAr internal fun GlassesSessionCore.enqueueDesiredImageLocked() { val fingerprint: String - val packedSnapshot: ByteArray? + val graySnapshot: ByteArray? val width: Int val height: Int val paintMs: Int @@ -720,7 +720,7 @@ internal fun GlassesSessionCore.enqueueDesiredImageLocked() { val scene: ShellScene desiredTilesLock.locked { fingerprint = desiredFingerprint - packedSnapshot = desiredPacked + graySnapshot = desiredGray width = desiredWidth height = desiredHeight paintMs = desiredPaintMs @@ -729,7 +729,13 @@ internal fun GlassesSessionCore.enqueueDesiredImageLocked() { scene = desiredShellScene desiredFrameId = 0 } - val packedFrame: ByteArray = packedSnapshot ?: ByteArray(0) + // Pack here rather than at submit: a frame superseded before the send loop + // gets to it is never packed, and the main thread doesn't pay for it. + frameTimings.spanStart(frameId, "pack-4bpp") + val packedFrame: ByteArray = + if (graySnapshot == null || graySnapshot.isEmpty()) ByteArray(0) + else BmpUtil.pack4bppFromGray8(graySnapshot, width, height) + frameTimings.spanEnd(frameId, "pack-4bpp") // Visibility belongs to this immutable composite, not the latest UI request. enqueueBrightnessLocked(!fingerprint.startsWith("blanked:")) if (customFirmwareDetected && packedFrame.size > 0) { diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/DisplayListRenderer.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/DisplayListRenderer.kt index 692f9bcf..85f86753 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/DisplayListRenderer.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/DisplayListRenderer.kt @@ -298,11 +298,78 @@ class DisplayListRenderer( } require(width > 0 && height > 0 && x + width <= source.width && y + height <= source.height) // Mirrors the firmware's overflow guard before the depth shift. - if (walk.apply && dx in -65536..65536) { - // Snapshot the rectangle so overlapping copies have memmove semantics. - val copy = IntArray(width * height) { source.get(x + it % width, y + it / width) } - for (i in copy.indices) target.put(dx + i % width, dy + i / width, copy[i]) + if (!walk.apply || dx !in -65536..65536) return + // Clip the destination to the writable area, in shifted target pixels. + // The source is read unshifted, like Target.get. + val originX = dx + target.shiftX + var left = maxOf(originX, 0) + var right = minOf(originX + width, target.width) + var top = maxOf(dy, 0) + var bottom = minOf(dy.toLong() + height, target.height.toLong()).toInt() + target.clip?.let { clip -> + left = maxOf(left, clip[0]); top = maxOf(top, clip[1]) + right = minOf(right, clip[2]); bottom = minOf(bottom, clip[3]) } + if (left >= right || top >= bottom) return + val count = right - left + val rows = bottom - top + var sourceX = x + (left - originX) + var sourceBytes = source.bytes + var sourceStride = source.stride + var sourceRow = source.offset + (y + (top - dy)) * sourceStride + if (sourceBytes === target.bytes) { + // Snapshot the packed source span so overlapping copies have memmove semantics. + val first = sourceX / 2 + val span = (sourceX + count - 1) / 2 - first + 1 + val snapshot = ByteArray(span * rows) + for (row in 0 until rows) { + val start = sourceRow + row * sourceStride + first + sourceBytes.copyInto(snapshot, row * span, start, start + span) + } + sourceBytes = snapshot + sourceStride = span + sourceRow = 0 + sourceX = sourceX and 1 + } + for (row in 0 until rows) { + copyPixels(sourceBytes, sourceRow + row * sourceStride, sourceX, + target.bytes, target.offset + (top + row) * target.stride, left, count) + } + } + + /** Copy [count] packed 4bpp pixels between rows that must not overlap. */ + private fun copyPixels(source: ByteArray, sourceRow: Int, sourceX: Int, + destination: ByteArray, destinationRow: Int, destinationX: Int, count: Int) { + var sx = sourceX + var dx = destinationX + var remaining = count + if (dx and 1 != 0) { + putPixel(destination, destinationRow, dx++, getPixel(source, sourceRow, sx++)) + remaining-- + } + val pairs = remaining / 2 + var si = sourceRow + sx / 2 + var di = destinationRow + dx / 2 + if (sx and 1 == 0) { + source.copyInto(destination, di, si, si + pairs) + } else { + // Misaligned: each destination byte straddles two source bytes. + repeat(pairs) { + destination[di++] = ((source[si].toInt() shl 4) or ((source[++si].toInt() and 255) ushr 4)).toByte() + } + } + if (remaining and 1 != 0) { + putPixel(destination, destinationRow, dx + pairs * 2, getPixel(source, sourceRow, sx + pairs * 2)) + } + } + + private fun getPixel(bytes: ByteArray, row: Int, x: Int): Int = + (bytes[row + x / 2].toInt() ushr (if (x and 1 == 0) 4 else 0)) and 15 + + private fun putPixel(bytes: ByteArray, row: Int, x: Int, value: Int) { + val index = row + x / 2 + val old = bytes[index].toInt() + bytes[index] = if (x and 1 == 0) ((old and 15) or (value shl 4)).toByte() else ((old and 240) or value).toByte() } private fun drawStockText(reader: DrawReader, target: Target, walk: Walk) { diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/ShellScene.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/ShellScene.kt index 304cb75d..fa0c46ed 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/ShellScene.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/ShellScene.kt @@ -2,11 +2,17 @@ package com.faceclaw.app /** Immutable shell snapshot. Keys identify writable surfaces across repaints, not their pixels. */ class ShellScene(val layers: List, val selections: List = emptyList(), val screenDepth: Int = 0) { - class Layer(val key: Int, val x: Int, val y: Int, val width: Int, val height: Int, val dim: Int, val packed: ByteArray, val selections: List = emptyList(), val depth: Int = 0) + class Layer(val key: Int, val x: Int, val y: Int, val width: Int, val height: Int, val dim: Int, val packed: ByteArray, val selections: List = emptyList(), val depth: Int = 0) { + // Layers are reused by every composite until the shell repaints, and hashing packed + // byte-by-byte on each one was a measurable share of the compositor's time. + internal val fingerprint: String by lazy { + "$key,$x,$y,$width,$height,$dim,$depth,${CachedResource(packed).hash},${selections.joinToString { row -> row.fingerprint }}" + } + } val allSelections = selections + layers.flatMap { it.selections } val retainedResources = allSelections.flatMap { it.resources } init { require(retainedResources.size + layers.size < 511 && screenDepth in -128..127) } - val fingerprint: String = layers.joinToString(";") { "${it.key},${it.x},${it.y},${it.width},${it.height},${it.dim},${it.depth},${CachedResource(it.packed).hash},${it.selections.joinToString { row -> row.fingerprint }}" } + selections.joinToString { it.fingerprint } + "|depth:$screenDepth" + val fingerprint: String = layers.joinToString(";") { it.fingerprint } + selections.joinToString { it.fingerprint } + "|depth:$screenDepth" fun calls(width: Int, height: Int, surfaces: IntArray, selected: IntArray): List { val calls = ArrayList(); var rowId = 0 val now = drawAnimationTimeMs() diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt index 14e4e728..58d3c3bf 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt @@ -582,7 +582,11 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr expectedBytes) ) } - run { + if (rectX == 0 && rectWidth == surface.width) { + // Full-width rect (every current submitter): one bulk read. Per-row reads from a + // direct ByteBuffer each cross into native code, which showed up in profiles. + pixels.get(surface.pixels, rectY * surface.width, expectedBytes) + } else run { var row: Int = 0 while ((row < rectHeight)) { var dstOffset: Int = (((rectY + row) * surface.width) + rectX) diff --git a/tests/evenhub-timer-shim.test.cjs b/tests/evenhub-timer-shim.test.cjs new file mode 100644 index 00000000..68ac7bee --- /dev/null +++ b/tests/evenhub-timer-shim.test.cjs @@ -0,0 +1,77 @@ +const test = require('node:test'); +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); +const vm = require('node:vm'); + +const source = fs.readFileSync(path.join(__dirname, '../app/apps/evenhub/session.ts'), 'utf8'); +const shim = source.match(/export const EVENHUB_BRIDGE_INJECT_SCRIPT = `([\s\S]*?)`;/)[1]; + +function page() { + const state = { now: 1000, wakes: 0, log: [] }; + const win = { + Date: { now: () => state.now }, console, Map, Array, Math, + __faceclawEvenHub: { postMessage() {}, wakeTimers() { state.wakes++; } }, + }; + win.window = win; + win.performance = { now: () => state.now }; + vm.createContext(win); + vm.runInContext(shim, win); + state.win = win; + state.tick = () => vm.runInContext('__fcTick()', win); + return state; +} + +test('an idle page asks for no ticks, and its first timer wakes the host once', () => { + const p = page(); + assert.equal(p.tick(), -1); + p.win.setTimeout(() => p.log.push('a'), 100); + p.win.setTimeout(() => p.log.push('b'), 200); + assert.equal(p.wakes, 1); + p.now += 5; + assert.equal(p.tick(), 95); + p.now += 95; + assert.equal(p.tick(), 100); + assert.deepEqual(p.log, ['a']); + p.now += 100; + assert.equal(p.tick(), -1); + assert.deepEqual(p.log, ['a', 'b']); +}); + +test('work due before the scheduled tick wakes the host; work added during a tick does not', () => { + const p = page(); + p.win.setTimeout(() => {}, 500); + p.tick(); + const wakes = p.wakes; + p.win.setTimeout(() => { p.win.setTimeout(() => p.log.push('inner'), 0); }, 10); + assert.equal(p.wakes, wakes + 1); + p.now += 10; + assert.equal(p.tick(), 16, 'the inner zero-delay timer runs next frame'); + assert.equal(p.wakes, wakes + 1); + p.now += 16; + p.tick(); + assert.deepEqual(p.log, ['inner']); +}); + +test('an animation-frame loop keeps the host at frame rate until it stops', () => { + const p = page(); + let frames = 0; + const loop = () => { if (++frames < 3) p.win.requestAnimationFrame(loop); }; + p.win.requestAnimationFrame(loop); + p.now += 16; assert.equal(p.tick(), 16); + p.now += 16; assert.equal(p.tick(), 16); + p.now += 16; assert.equal(p.tick(), -1); + assert.equal(frames, 3); +}); + +test('intervals keep cadence and the fixed-rate entry points still work', () => { + const p = page(); + const id = p.win.setInterval(() => p.log.push('iv'), 50); + p.now += 50; assert.equal(p.tick(), 50); + p.now += 50; p.tick(); + p.win.clearInterval(id); + assert.equal(p.tick(), -1); + p.win.setTimeout(() => p.log.push('legacy'), 0); + vm.runInContext('__fcTimerTick(); __fcRafTick()', p.win); + assert.deepEqual(p.log, ['iv', 'iv', 'legacy']); +}); diff --git a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/DisplayListTest.kt b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/DisplayListTest.kt index 3bd56ef9..db3110a1 100644 --- a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/DisplayListTest.kt +++ b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/DisplayListTest.kt @@ -36,6 +36,46 @@ class DisplayListTest { renderer.render(DrawProtocol.SCREEN, DisplayListRenderer.Target(source,640,480), DisplayListRenderer.Target(destination,640,480)) assertContentEquals(source, destination) } + @Test fun rectCopyMatchesPerPixelReferenceWithShiftsClipsAndAliasing() { + val random = Random(7) + repeat(4000) { case -> + val width = random.nextInt(1, 20); val height = random.nextInt(1, 6) + val offset = random.nextInt(3); val shift = random.nextInt(-4, 5) + val clip = if (random.nextBoolean()) null else { + val left = random.nextInt(-3, width + 1); val top = random.nextInt(-2, height + 1) + intArrayOf(left, top, left + random.nextInt(0, width + 3), top + random.nextInt(0, height + 2)) + } + // Screen as a separate array, the target's own array at another offset, or the target itself. + val mode = random.nextInt(3) + val screenWidth = random.nextInt(1, 20); val screenHeight = random.nextInt(1, 6) + val screenOffset = random.nextInt(3) + val targetSize = offset + (width + 1) / 2 * height + val screenSize = screenOffset + (screenWidth + 1) / 2 * screenHeight + val bytes = random.nextBytes(maxOf(targetSize, if (mode == 1) screenSize else 0) + 2) + val screenBytes = if (mode == 0) random.nextBytes(screenSize + 1) else bytes + val sourceId = if (mode == 2) DrawProtocol.CURRENT else DrawProtocol.SCREEN + val sourceWidth = if (mode == 2) width else screenWidth + val sourceHeight = if (mode == 2) height else screenHeight + val w = random.nextInt(1, sourceWidth + 1); val h = random.nextInt(1, sourceHeight + 1) + val x = random.nextInt(sourceWidth - w + 1); val y = random.nextInt(sourceHeight - h + 1) + val dx = random.nextInt(-w - 5, width + 5); val dy = random.nextInt(-h - 2, height + 2) + + val expected = bytes.copyOf() + val expectedScreen = if (mode == 0) screenBytes.copyOf() else expected + val referenceTarget = DisplayListRenderer.Target(expected, width, height, offset, shift, clip) + val referenceSource = if (mode == 2) referenceTarget + else DisplayListRenderer.Target(expectedScreen, screenWidth, screenHeight, screenOffset) + val snapshot = IntArray(w * h) { referenceSource.get(x + it % w, y + it / w) } + for (i in snapshot.indices) referenceTarget.put(dx + i % w, dy + i / w, snapshot[i]) + + val target = DisplayListRenderer.Target(bytes, width, height, offset, shift, clip) + val screen = if (mode == 2) target else DisplayListRenderer.Target(screenBytes, screenWidth, screenHeight, screenOffset) + DisplayListRenderer(emptyMap()).execute( + DrawProtocol.sequence(listOf(DrawProtocol.rectCopy(sourceId, x, y, w, h, dx, dy))), target, screen) + assertContentEquals(expected, bytes, "case $case") + if (mode == 0) assertContentEquals(expectedScreen, screenBytes, "case $case screen") + } + } @Test fun invalidGraphDoesNotCopyScreenIntoComposition() { val screen = hex("12345678"); val composition = hex("9abcdef0") val resources = mapOf(1 to DrawProtocol.displayList(listOf(byteArrayOf(99,0)))) diff --git a/tests/nightscout.test.cjs b/tests/nightscout.test.cjs index 9251c491..38e892f3 100644 --- a/tests/nightscout.test.cjs +++ b/tests/nightscout.test.cjs @@ -206,7 +206,7 @@ test('bridge exposes numeric measurements and treats absent values as unknown', let pump = { reservoir: '10.5', battery: { voltage: '1.15' } }; const module = load('app/native/nightscout-bridge.ts', { '../ui/dashboard-settings': { nightscoutSiteUrlSetting: { get: () => 'https://example.test' }, nightscoutApiTokenSetting: { get: () => 'test' } }, - '../util/http': { async fetchWithUserAgent(url) { + '../util/http': { async fetchTextWithUserAgent(url) { const body = url.includes('/entries.') ? [{ date: now, sgv: 100 }] : url.includes('/devicestatus.') ? [{ pump, openaps: { suggested: { mills: now - 60_000 } } }] : url.includes('/status.') ? {} : []; return { ok: true, json: async () => body }; } }, @@ -231,7 +231,7 @@ test('polling starts once and stops even while the initial HTTP request is pendi const timers = new Map(); const module = load('app/native/nightscout-bridge.ts', { '../ui/dashboard-settings': { nightscoutSiteUrlSetting: { get: () => 'https://example.test' }, nightscoutApiTokenSetting: { get: () => 'test' } }, - '../util/http': { async fetchWithUserAgent() { + '../util/http': { async fetchTextWithUserAgent() { calls++; await pending; return { ok: true, json: async () => [] }; From 275f3709a30c8a4106bab424632542d1c19a689c Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sun, 27 Sep 2026 16:53:58 -0700 Subject: [PATCH 04/60] Remove a broken/incorrect test --- tests/evenhub-list-menu.test.cjs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/tests/evenhub-list-menu.test.cjs b/tests/evenhub-list-menu.test.cjs index 5287d39d..5710701f 100644 --- a/tests/evenhub-list-menu.test.cjs +++ b/tests/evenhub-list-menu.test.cjs @@ -42,21 +42,6 @@ function paint(container, now, focused = true) { const displayLists = (image) => image.draws.map((draw) => draw.presentation?.displayList).filter(Boolean); const pixel = (image, x, y) => image.withDrawsBaked().pixels[y * image.width + x]; -test("rows are padded 6px around the text; unselected text is at level 2/15", () => { - const rowHeight = listRowHeight(font); - assert.equal(rowHeight, 32); - const container = list(["ab", "cd"], 100); - const image = paint(container, 1000); - const textX = LIST_ITEM_PADDING_X, textY = LIST_ITEM_PADDING_Y + 4; - assert.equal(pixel(image, textX, textY), 255, "selected text is full brightness"); - assert.equal(pixel(image, textX, rowHeight + textY), DESELECTED_TEXT, "unselected text is 2/15"); - assert.equal(DESELECTED_TEXT + 8 >> 4, 2); - // The outline hugs the text plus padding, not the row width. - const outlineRight = 2 * 10 + 2 * LIST_ITEM_PADDING_X - 1; - assert.equal(pixel(image, outlineRight, rowHeight / 2), 255); - assert.equal(pixel(image, outlineRight + 2, rowHeight / 2), 0); -}); - test("the unfocused outline is dimmer", () => { const image = paint(list(["ab"], 100), 1000, false); assert.equal(pixel(image, 0, 16), 130); From c007186e057714ee935ba19e549183b0d6196267 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sun, 27 Sep 2026 18:14:50 -0700 Subject: [PATCH 05/60] Fix crash on install of larger EvenHub apps --- .../com/faceclaw/app/FaceclawFileDownload.kt | 90 +++++++++++++++++++ app/native/binary-http.ts | 48 +++++++--- app/native/file-access.ts | 28 +++--- .../callbacks/FaceclawFileDownloadListener.kt | 10 +++ 4 files changed, 152 insertions(+), 24 deletions(-) create mode 100644 App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawFileDownload.kt create mode 100644 native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/callbacks/FaceclawFileDownloadListener.kt diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawFileDownload.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawFileDownload.kt new file mode 100644 index 00000000..57cfd80c --- /dev/null +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawFileDownload.kt @@ -0,0 +1,90 @@ +package com.faceclaw.app + +import android.os.Handler +import android.os.Looper + +import java.io.File +import java.io.FileOutputStream +import java.util.concurrent.TimeUnit + +import okhttp3.Call +import okhttp3.OkHttpClient +import okhttp3.Request + +/** + * One GET streamed straight to a file on a worker thread. For binary bodies + * too large to cross into JS through NativeScript's fetch(), which copies the + * Java byte[] into a Uint8Array one bridge call per byte (a 43MB EvenHub + * package ran the process out of native memory). JS reads the finished file + * back with one bulk copy (readBinaryFile). + */ +class FaceclawFileDownload( + private val url: String, + private val destPath: String, + private val timeoutMs: Long, + listener: FaceclawFileDownloadListener? +) { + private val callbackHandler = Handler(Looper.myLooper() ?: Looper.getMainLooper()) + private val listener: FaceclawFileDownloadListener = + listener ?: throw IllegalArgumentException("listener is required") + + @Volatile + private var call: Call? = null + + @Volatile + private var cancelled = false + + fun start() { + Thread({ run() }, "FaceclawFileDl").start() + } + + /** Aborts the request; no callback follows. */ + fun cancel() { + cancelled = true + call?.cancel() + } + + private fun run() { + val dest = File(destPath) + try { + dest.parentFile?.mkdirs() + val request = Request.Builder().url(url).build() + val call = getClient().newCall(request) + call.timeout().timeout(timeoutMs, TimeUnit.MILLISECONDS) + this.call = call + call.execute().use { response -> + val body = response.body + val contentLength = body?.contentLength() ?: -1L + if (response.isSuccessful && body != null) { + body.byteStream().use { input -> + FileOutputStream(dest).use { output -> input.copyTo(output, 1 shl 16) } + } + } + if (!cancelled) callbackHandler.post { listener.onDone(response.code, contentLength) } + } + } catch (e: Exception) { + dest.delete() + if (!cancelled) callbackHandler.post { listener.onFailure(e.message ?: e.toString()) } + } + } + + companion object { + @Volatile + private var sharedClient: OkHttpClient? = null + + private fun getClient(): OkHttpClient { + if (sharedClient == null) { + synchronized(FaceclawFileDownload::class.java) { + if (sharedClient == null) { + sharedClient = OkHttpClient.Builder() + .connectTimeout(30, TimeUnit.SECONDS) + .readTimeout(60, TimeUnit.SECONDS) + .addInterceptor(FaceclawHttp.userAgentInterceptor()) + .build() + } + } + } + return sharedClient!! + } + } +} diff --git a/app/native/binary-http.ts b/app/native/binary-http.ts index b70b832b..12a79d32 100644 --- a/app/native/binary-http.ts +++ b/app/native/binary-http.ts @@ -1,15 +1,37 @@ -import { fetchWithUserAgent } from '../util/http'; +declare const com: any; +declare const java: any; + export type BinaryResponse = { status: number; bytes: Uint8Array; contentLength: number }; -export async function downloadBinary(url: string, timeoutMs: number): Promise { - let timer: ReturnType; - const request = async () => { - const response = await fetchWithUserAgent(url); - return { status: response.status, bytes: new Uint8Array(await response.arrayBuffer()), - contentLength: Number(response.headers.get('Content-Length') ?? 0) }; - }; - try { - return await Promise.race([request(), new Promise((_, reject) => { - timer = setTimeout(() => reject(new Error('Download timed out.')), timeoutMs); - })]); - } finally { clearTimeout(timer!); } + +let nextDownloadSerial = 0; + +/** + * GET a binary body. Not fetch(): NativeScript's polyfill copies the Java + * byte[] into JS one bridge call per byte (http-request's toArrayBuffer), which + * for a 43MB EvenHub package pinned the main thread for ~20s and then ran the + * process out of native memory. FaceclawFileDownload streams the body to a + * cache file instead, and readBinaryFile copies it back in bulk. + */ +export function downloadBinary(url: string, timeoutMs: number): Promise { + // Required lazily so Node tests can load this module's importers. + const { appCacheDirPath, readBinaryFile } = require("./file-access") as typeof import("./file-access"); + const path = `${appCacheDirPath()}/binary-download-${Date.now()}-${nextDownloadSerial++}`; + const remove = () => { try { new java.io.File(path).delete(); } catch { /* best effort */ } }; + return new Promise((resolve, reject) => { + const listener = new com.faceclaw.app.FaceclawFileDownloadListener({ + onDone: (status: number, contentLength: number) => { + try { + const ok = status >= 200 && status < 300; + const bytes = ok ? readBinaryFile(path) : new Uint8Array(0); + if (!bytes) reject(new Error("Could not read the downloaded file.")); + else resolve({ status, bytes, contentLength: Math.max(0, Number(contentLength)) }); + } finally { remove(); } + }, + onFailure: (message: string) => { + remove(); + reject(new Error(/timeout|timed out/i.test(String(message)) ? "Download timed out." : `Download failed: ${message}`)); + }, + }); + new com.faceclaw.app.FaceclawFileDownload(url, path, timeoutMs, listener).start(); + }); } diff --git a/app/native/file-access.ts b/app/native/file-access.ts index 5cf818e5..c0522646 100644 --- a/app/native/file-access.ts +++ b/app/native/file-access.ts @@ -124,19 +124,19 @@ export function readBinaryFile(path: string): Uint8Array | null { try { const file = new java.io.File(path); if (!file.isFile()) return null; - const bytes = java.nio.file.Files.readAllBytes(file.toPath()); + // Read into a direct buffer, which the V8 runtime can view in place, then + // copy once so the result outlives it. Nothing lands on the Java heap, and + // no path copies per byte (EvenHub packages can be tens of MB). + const length = Number(file.length()); + const buffer = java.nio.ByteBuffer.allocateDirect(Math.max(length, 1)); + const channel = new java.io.FileInputStream(file).getChannel(); try { - // The V8 runtime can wrap a ByteBuffer's memory directly; copy out of it - // so the result outlives the Java array. - const arrayBuffer = (ArrayBuffer as any).from(java.nio.ByteBuffer.wrap(bytes)); - return new Uint8Array(arrayBuffer).slice(); - } catch { - const out = new Uint8Array(bytes.length); - for (let i = 0; i < bytes.length; i++) { - out[i] = bytes[i] & 0xff; - } - return out; + while (buffer.position() < length && channel.read(buffer) >= 0) { /* fill */ } + } finally { + channel.close(); } + const read = Number(buffer.position()); + return new Uint8Array((ArrayBuffer as any).from(buffer), 0, read).slice(); } catch (error) { console.warn(`readBinaryFile failed for ${path}: ${error}`); return null; @@ -189,6 +189,12 @@ export function appFilesDirPath(): string { return String(context.getFilesDir().getAbsolutePath()); } +/** The app-private cache directory, for scratch files the OS may reclaim. */ +export function appCacheDirPath(): string { + const context = Utils.android.getApplicationContext(); + return String(context.getCacheDir().getAbsolutePath()); +} + /** Read a UTF-8 text file (size-capped); null when unreadable or too large. */ export function readTextFile(path: string): string | null { try { diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/callbacks/FaceclawFileDownloadListener.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/callbacks/FaceclawFileDownloadListener.kt new file mode 100644 index 00000000..02c3f5eb --- /dev/null +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/callbacks/FaceclawFileDownloadListener.kt @@ -0,0 +1,10 @@ +package com.faceclaw.app + +/** Callbacks for FaceclawFileDownload, delivered on the constructing thread's Looper. */ +interface FaceclawFileDownloadListener { + /** The response finished; for a 2xx status the body is at the destination path, otherwise nothing is written. */ + fun onDone(status: Int, contentLength: Long): Unit + + /** Network-level failure (connect, TLS, timeout, mid-body drop); the destination is removed. */ + fun onFailure(message: String?): Unit +} From 8798198f4ddabad00159f59d88eb507c6dd88f05 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sun, 27 Sep 2026 18:14:50 -0700 Subject: [PATCH 06/60] Fix crash on install of larger EvenHub apps --- .../com/faceclaw/app/FaceclawFileDownload.kt | 90 +++++++++++++++++++ app/native/binary-http.ts | 48 +++++++--- app/native/file-access.ts | 28 +++--- .../callbacks/FaceclawFileDownloadListener.kt | 10 +++ 4 files changed, 152 insertions(+), 24 deletions(-) create mode 100644 App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawFileDownload.kt create mode 100644 native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/callbacks/FaceclawFileDownloadListener.kt diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawFileDownload.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawFileDownload.kt new file mode 100644 index 00000000..57cfd80c --- /dev/null +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawFileDownload.kt @@ -0,0 +1,90 @@ +package com.faceclaw.app + +import android.os.Handler +import android.os.Looper + +import java.io.File +import java.io.FileOutputStream +import java.util.concurrent.TimeUnit + +import okhttp3.Call +import okhttp3.OkHttpClient +import okhttp3.Request + +/** + * One GET streamed straight to a file on a worker thread. For binary bodies + * too large to cross into JS through NativeScript's fetch(), which copies the + * Java byte[] into a Uint8Array one bridge call per byte (a 43MB EvenHub + * package ran the process out of native memory). JS reads the finished file + * back with one bulk copy (readBinaryFile). + */ +class FaceclawFileDownload( + private val url: String, + private val destPath: String, + private val timeoutMs: Long, + listener: FaceclawFileDownloadListener? +) { + private val callbackHandler = Handler(Looper.myLooper() ?: Looper.getMainLooper()) + private val listener: FaceclawFileDownloadListener = + listener ?: throw IllegalArgumentException("listener is required") + + @Volatile + private var call: Call? = null + + @Volatile + private var cancelled = false + + fun start() { + Thread({ run() }, "FaceclawFileDl").start() + } + + /** Aborts the request; no callback follows. */ + fun cancel() { + cancelled = true + call?.cancel() + } + + private fun run() { + val dest = File(destPath) + try { + dest.parentFile?.mkdirs() + val request = Request.Builder().url(url).build() + val call = getClient().newCall(request) + call.timeout().timeout(timeoutMs, TimeUnit.MILLISECONDS) + this.call = call + call.execute().use { response -> + val body = response.body + val contentLength = body?.contentLength() ?: -1L + if (response.isSuccessful && body != null) { + body.byteStream().use { input -> + FileOutputStream(dest).use { output -> input.copyTo(output, 1 shl 16) } + } + } + if (!cancelled) callbackHandler.post { listener.onDone(response.code, contentLength) } + } + } catch (e: Exception) { + dest.delete() + if (!cancelled) callbackHandler.post { listener.onFailure(e.message ?: e.toString()) } + } + } + + companion object { + @Volatile + private var sharedClient: OkHttpClient? = null + + private fun getClient(): OkHttpClient { + if (sharedClient == null) { + synchronized(FaceclawFileDownload::class.java) { + if (sharedClient == null) { + sharedClient = OkHttpClient.Builder() + .connectTimeout(30, TimeUnit.SECONDS) + .readTimeout(60, TimeUnit.SECONDS) + .addInterceptor(FaceclawHttp.userAgentInterceptor()) + .build() + } + } + } + return sharedClient!! + } + } +} diff --git a/app/native/binary-http.ts b/app/native/binary-http.ts index b70b832b..12a79d32 100644 --- a/app/native/binary-http.ts +++ b/app/native/binary-http.ts @@ -1,15 +1,37 @@ -import { fetchWithUserAgent } from '../util/http'; +declare const com: any; +declare const java: any; + export type BinaryResponse = { status: number; bytes: Uint8Array; contentLength: number }; -export async function downloadBinary(url: string, timeoutMs: number): Promise { - let timer: ReturnType; - const request = async () => { - const response = await fetchWithUserAgent(url); - return { status: response.status, bytes: new Uint8Array(await response.arrayBuffer()), - contentLength: Number(response.headers.get('Content-Length') ?? 0) }; - }; - try { - return await Promise.race([request(), new Promise((_, reject) => { - timer = setTimeout(() => reject(new Error('Download timed out.')), timeoutMs); - })]); - } finally { clearTimeout(timer!); } + +let nextDownloadSerial = 0; + +/** + * GET a binary body. Not fetch(): NativeScript's polyfill copies the Java + * byte[] into JS one bridge call per byte (http-request's toArrayBuffer), which + * for a 43MB EvenHub package pinned the main thread for ~20s and then ran the + * process out of native memory. FaceclawFileDownload streams the body to a + * cache file instead, and readBinaryFile copies it back in bulk. + */ +export function downloadBinary(url: string, timeoutMs: number): Promise { + // Required lazily so Node tests can load this module's importers. + const { appCacheDirPath, readBinaryFile } = require("./file-access") as typeof import("./file-access"); + const path = `${appCacheDirPath()}/binary-download-${Date.now()}-${nextDownloadSerial++}`; + const remove = () => { try { new java.io.File(path).delete(); } catch { /* best effort */ } }; + return new Promise((resolve, reject) => { + const listener = new com.faceclaw.app.FaceclawFileDownloadListener({ + onDone: (status: number, contentLength: number) => { + try { + const ok = status >= 200 && status < 300; + const bytes = ok ? readBinaryFile(path) : new Uint8Array(0); + if (!bytes) reject(new Error("Could not read the downloaded file.")); + else resolve({ status, bytes, contentLength: Math.max(0, Number(contentLength)) }); + } finally { remove(); } + }, + onFailure: (message: string) => { + remove(); + reject(new Error(/timeout|timed out/i.test(String(message)) ? "Download timed out." : `Download failed: ${message}`)); + }, + }); + new com.faceclaw.app.FaceclawFileDownload(url, path, timeoutMs, listener).start(); + }); } diff --git a/app/native/file-access.ts b/app/native/file-access.ts index 5cf818e5..c0522646 100644 --- a/app/native/file-access.ts +++ b/app/native/file-access.ts @@ -124,19 +124,19 @@ export function readBinaryFile(path: string): Uint8Array | null { try { const file = new java.io.File(path); if (!file.isFile()) return null; - const bytes = java.nio.file.Files.readAllBytes(file.toPath()); + // Read into a direct buffer, which the V8 runtime can view in place, then + // copy once so the result outlives it. Nothing lands on the Java heap, and + // no path copies per byte (EvenHub packages can be tens of MB). + const length = Number(file.length()); + const buffer = java.nio.ByteBuffer.allocateDirect(Math.max(length, 1)); + const channel = new java.io.FileInputStream(file).getChannel(); try { - // The V8 runtime can wrap a ByteBuffer's memory directly; copy out of it - // so the result outlives the Java array. - const arrayBuffer = (ArrayBuffer as any).from(java.nio.ByteBuffer.wrap(bytes)); - return new Uint8Array(arrayBuffer).slice(); - } catch { - const out = new Uint8Array(bytes.length); - for (let i = 0; i < bytes.length; i++) { - out[i] = bytes[i] & 0xff; - } - return out; + while (buffer.position() < length && channel.read(buffer) >= 0) { /* fill */ } + } finally { + channel.close(); } + const read = Number(buffer.position()); + return new Uint8Array((ArrayBuffer as any).from(buffer), 0, read).slice(); } catch (error) { console.warn(`readBinaryFile failed for ${path}: ${error}`); return null; @@ -189,6 +189,12 @@ export function appFilesDirPath(): string { return String(context.getFilesDir().getAbsolutePath()); } +/** The app-private cache directory, for scratch files the OS may reclaim. */ +export function appCacheDirPath(): string { + const context = Utils.android.getApplicationContext(); + return String(context.getCacheDir().getAbsolutePath()); +} + /** Read a UTF-8 text file (size-capped); null when unreadable or too large. */ export function readTextFile(path: string): string | null { try { diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/callbacks/FaceclawFileDownloadListener.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/callbacks/FaceclawFileDownloadListener.kt new file mode 100644 index 00000000..02c3f5eb --- /dev/null +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/callbacks/FaceclawFileDownloadListener.kt @@ -0,0 +1,10 @@ +package com.faceclaw.app + +/** Callbacks for FaceclawFileDownload, delivered on the constructing thread's Looper. */ +interface FaceclawFileDownloadListener { + /** The response finished; for a 2xx status the body is at the destination path, otherwise nothing is written. */ + fun onDone(status: Int, contentLength: Long): Unit + + /** Network-level failure (connect, TLS, timeout, mid-body drop); the destination is removed. */ + fun onFailure(message: String?): Unit +} From 77bda86ede2cf7576348823a80bf38120975b4a6 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sun, 27 Sep 2026 18:22:49 -0700 Subject: [PATCH 07/60] Fix line-wrapping on EvenHub permissions dialog --- app/apps/evenhub/permission-dialog.ts | 47 +++++++++++++++------------ 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/app/apps/evenhub/permission-dialog.ts b/app/apps/evenhub/permission-dialog.ts index 07977024..3f0560ff 100644 --- a/app/apps/evenhub/permission-dialog.ts +++ b/app/apps/evenhub/permission-dialog.ts @@ -1,6 +1,6 @@ import { getDefaultSmallFont } from "../../graphics/ui-fonts"; import { GrayImage } from "../../graphics/image"; -import { truncateText } from "../../graphics/textwrap"; +import { truncateText, wrapText } from "../../graphics/textwrap"; import { type InputEvent } from "../../ui/gestures"; import { Layer, type LayerContext, type PaintBelow } from "../../ui/layers"; import { drawListScrollbar, drawSelectionHighlight } from "../../ui/menu"; @@ -8,9 +8,9 @@ import { permissionDetail, permissionLabel, type EvenHubPermission } from "./per import { openPrivacyPolicyOnPhone } from "./privacy-policy"; import { lineStep, listRowHeight } from "../../ui/metrics"; -const DIALOG_X = 8; -const DIALOG_Y = 8; -const DIALOG_WIDTH = 272; +/** Minimum gap between the dialog and the edges of the window it's centered in. */ +const DIALOG_MARGIN = 8; +const DIALOG_WIDTH = 320; const PADDING = 10; const PERM_GAP = 4; @@ -27,6 +27,8 @@ const PERM_GAP = 4; * list on screen. */ export class EvenHubPermissionDialogLayer implements Layer { + /** Floats in front of the window content, like the context menus. */ + readonly depth = 2; /** Starts on Allow; the optional privacy-policy action is inserted after it. */ private selectedIndex = 0; /** First content row drawn; rows above it are scrolled off. */ @@ -50,10 +52,12 @@ export class EvenHubPermissionDialogLayer implements Layer { paint(ctx: LayerContext, paintBelow: PaintBelow): GrayImage { const font = getDefaultSmallFont(); - const { height: viewportHeight } = ctx.stack.getBaseSize(); + const { width: viewportWidth, height: viewportHeight } = ctx.stack.getBaseSize(); const image = paintBelow(); - const textWidth = DIALOG_WIDTH - 2 * PADDING - 4; - const left = DIALOG_X + PADDING + 2; + const dialogWidth = Math.min(DIALOG_WIDTH, viewportWidth - 2 * DIALOG_MARGIN); + const dialogX = ((viewportWidth - dialogWidth) / 2) | 0; + const textWidth = dialogWidth - 2 * PADDING - 4; + const left = dialogX + PADDING + 2; const headerStep = lineStep(font) + 2; const permLabelStep = lineStep(font) + 1; @@ -80,15 +84,17 @@ export class EvenHubPermissionDialogLayer implements Layer { for (let index = 0; index < this.permissions.length; index++) { const permission = this.permissions[index]!; const detail = permissionDetail(permission); + // One row per wrapped line, so the explanation scrolls line by line. + const detailLines = detail ? wrapText(font, detail, textWidth - 8) : []; const gapBelow = PERM_GAP + (index === this.permissions.length - 1 ? 2 : 0); rows.push({ - height: permLabelStep + (detail ? 0 : gapBelow), + height: permLabelStep + (detailLines.length ? 0 : gapBelow), draw: (top) => image.drawText(font, left, top, truncateText(font, permissionLabel(permission.name), textWidth), 220), }); - if (detail) { + for (let line = 0; line < detailLines.length; line++) { rows.push({ - height: permDetailStep + gapBelow, - draw: (top) => image.drawText(font, left + 8, top, truncateText(font, detail, textWidth - 8), 140), + height: permDetailStep + (line === detailLines.length - 1 ? gapBelow : 0), + draw: (top) => image.drawText(font, left + 8, top, detailLines[line]!, 140), }); } } @@ -98,15 +104,16 @@ export class EvenHubPermissionDialogLayer implements Layer { draw: (top) => { const selected = this.atBottom() && index === this.selectedIndex; if (selected) { - drawSelectionHighlight(image, DIALOG_X + 12, top, DIALOG_WIDTH - 24, actionRowH - 1, focused, 8); + drawSelectionHighlight(image, dialogX + 12, top, dialogWidth - 24, actionRowH - 1, focused, 8); } - image.drawText(font, DIALOG_X + 22, top + 3, actions[index]!, selected ? 255 : 200); + image.drawText(font, dialogX + 22, top + 3, actions[index]!, selected ? 255 : 200); }, }); } const contentHeight = rows.reduce((sum, row) => sum + row.height, 0); - const height = Math.min(contentHeight + 2 * PADDING, viewportHeight - 2 * DIALOG_Y); + const height = Math.min(contentHeight + 2 * PADDING, viewportHeight - 2 * DIALOG_MARGIN); + const dialogY = ((viewportHeight - height) / 2) | 0; const visibleHeight = height - 2 * PADDING; // The bottommost scroll position: the largest suffix of rows that fits. @@ -120,13 +127,13 @@ export class EvenHubPermissionDialogLayer implements Layer { this.firstRow = Math.max(0, Math.min(this.firstRow, maxFirstRow)); // Fill 1 (transparent color key is 0), outline for the dialog edge. - image.fillRoundedRect(DIALOG_X, DIALOG_Y, DIALOG_WIDTH, height, 1); - image.drawRoundedRect(DIALOG_X, DIALOG_Y, DIALOG_WIDTH, height, 72); + image.fillRoundedRect(dialogX, dialogY, dialogWidth, height, 1); + image.drawRoundedRect(dialogX, dialogY, dialogWidth, height, 72); - let y = DIALOG_Y + PADDING; + let y = dialogY + PADDING; for (let index = this.firstRow; index < rows.length; index++) { const row = rows[index]!; - if (y + row.height > DIALOG_Y + PADDING + visibleHeight) break; + if (y + row.height > dialogY + PADDING + visibleHeight) break; row.draw(y); y += row.height; } @@ -134,8 +141,8 @@ export class EvenHubPermissionDialogLayer implements Layer { if (maxFirstRow > 0) { drawListScrollbar( image, - DIALOG_X + DIALOG_WIDTH - 7, - DIALOG_Y + PADDING, + dialogX + dialogWidth - 7, + dialogY + PADDING, visibleHeight, this.firstRow, rows.length - maxFirstRow, From 48a2bd17577ffda8fff6b2d3089e559e8eb22144 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sun, 27 Sep 2026 18:27:38 -0700 Subject: [PATCH 08/60] Putting on the glasses auto-wakes the screen --- app/g2/dashboard-controller.ts | 22 +++++++++++++++++++++- app/g2/ios-preview-controller.ts | 4 ++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/app/g2/dashboard-controller.ts b/app/g2/dashboard-controller.ts index 1b5b0978..1f1c3648 100644 --- a/app/g2/dashboard-controller.ts +++ b/app/g2/dashboard-controller.ts @@ -149,6 +149,9 @@ const SHELL_REFRESH_INTERVAL_MS = 60_000; // schedules a refresh), so this just covers anything that slips through. const PREVIEW_INTERVAL_MS = 1_000; const SCREEN_TIMEOUT_CHECK_MS = 1_000; +// The lock screen is a short notice, not something to read at leisure; it +// ignores the screen-timeout setting (including "never"). +const LOCK_SCREEN_TIMEOUT_MS = 15_000; const EVENHUB_SCREEN_OFF_SUSPEND_DELAY_MS = 5_000; const EVENHUB_WAKE_READY_TIMEOUT_MS = 4_500; const FOREGROUND_NOTIFICATION_MIN_UPDATE_MS = 30_000; @@ -365,7 +368,8 @@ class DashboardController { // surface, so their repaints go through the shell render path. requestRender: () => this.requestShellRender(), }, - getScreenTimeoutMs: () => screenTimeoutSettingToMs(screenTimeoutSetting.get()), + getScreenTimeoutMs: () => + this.glassesLocked ? LOCK_SCREEN_TIMEOUT_MS : screenTimeoutSettingToMs(screenTimeoutSetting.get()), requestShellRender: () => this.requestShellRender(), prepareVoiceCapture: () => this.prepareVoiceCapture(), onKeyboardInputChanged: (session) => { @@ -626,6 +630,9 @@ class DashboardController { } private handleWearState(wearing: boolean): void { + // Only an observed OFF_HEAD -> ON_HEAD transition counts as putting the + // glasses on; the first snapshot of a session (null) is just the status. + const putOn = wearing && this.glassesWorn === false; this.glassesWorn = wearing; updateGlassesPresence({ worn: wearing }); this.appendLog(wearing ? "glasses wear state: ON_HEAD" : "glasses wear state: OFF_HEAD"); @@ -633,6 +640,19 @@ class DashboardController { if (!wearing && this.phoneLocked && lockScreenEnabledSetting.get()) { this.setGlassesLocked(true, "glasses removed while phone locked"); } + if (putOn) this.wakeForGlassesPutOn(); + } + + /** + * Putting the glasses on wakes the screen, like a double-tap would. While + * locked that shows the lock-screen notice (which then times out on its + * own short timer); otherwise it lands on the sidebar as a normal wake. + */ + private wakeForGlassesPutOn(): void { + if (this.phase !== "connected" || !this.communicator || shell.isScreenOn()) return; + // wake() -> onScreenStateChanged(true) dismisses a showing Glanceboard, + // runs the EvenHub wake barrier and repaints the shell. + if (shell.wake("sidebar")) this.appendLog("screen woken: glasses put on"); } private handlePhoneLockState(locked: boolean): void { diff --git a/app/g2/ios-preview-controller.ts b/app/g2/ios-preview-controller.ts index 7e8ec2dd..6cb89bf3 100644 --- a/app/g2/ios-preview-controller.ts +++ b/app/g2/ios-preview-controller.ts @@ -362,9 +362,13 @@ export class IosPreviewController { // Sample false to catch a notification missed during suspension. Do not // sample true here: WillBecomeUnavailable precedes the property transition. if (!UIApplication.sharedApplication.protectedDataAvailable) this.handlePhoneLockState(true) + // Putting the glasses on (an observed OFF_HEAD -> ON_HEAD transition, not + // a session's first snapshot) wakes the screen, to the lock notice if locked. + const putOn = wearing && this.glassesWorn === false this.glassesWorn = wearing this.logBluetooth(`Glasses wear state: ${wearing ? 'ON_HEAD' : 'OFF_HEAD'}`) if (!wearing && this.phoneLocked && this.lockEnabled) this.setGlassesLocked(true) + if (putOn && this.runtimeRunning && !shell.isScreenOn()) shell.wake('sidebar') } private setGlassesLocked(locked: boolean): void { if (locked === this.glassesLocked) return From c6949fde3b5b88500287d30810e9481e585b1719 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sun, 27 Sep 2026 18:50:43 -0700 Subject: [PATCH 09/60] Reorder Done and Follow-up options in voice input dialog --- app/ui/shell/assistant.ts | 10 +++++----- app/ui/shell/shell.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/ui/shell/assistant.ts b/app/ui/shell/assistant.ts index 1df039d7..2fe25fbc 100644 --- a/app/ui/shell/assistant.ts +++ b/app/ui/shell/assistant.ts @@ -3,13 +3,13 @@ import { GESTURE_DOUBLE_CLICK, type InputEvent } from "../gestures"; import { Layer, type LayerActions, type LayerContext } from "../layers"; import { createInputDialogMenu, paintInputDialog, type InputDialogRow } from "./input-dialog"; -const FOLLOW_UP_ROW = 0; +const FOLLOW_UP_ROW = 1; const MENU_ROWS: readonly InputDialogRow[] = [ - { label: "Follow-up", dim: false }, { label: "Done", dim: false }, + { label: "Follow-up", dim: false }, ]; -/** thinking: turn running; done/error: finished, showing the Follow-up/Done menu. */ +/** thinking: turn running; done/error: finished, showing the Done/Follow-up menu. */ type AssistantPhase = "thinking" | "done" | "error"; export type AssistantLayerCallbacks = { @@ -25,7 +25,7 @@ export type AssistantLayerCallbacks = { /** * The assistant overlay: streamed reply text with a status line for tool - * activity, and a Follow-up / Done menu once the turn ends. Double-click + * activity, and a Done / Follow-up menu once the turn ends. Double-click * cancels an in-flight turn. The shell owns the AssistantSession and drives * this layer's state through the on* methods as the turn streams. */ @@ -99,7 +99,7 @@ export class AssistantLayer implements Layer { } return; } - // done / error: the Follow-up / Done menu. + // done / error: the Done / Follow-up menu. switch (event.type) { case "scroll-up": case "scroll-down": diff --git a/app/ui/shell/shell.ts b/app/ui/shell/shell.ts index 1a37a0e3..1db2d922 100644 --- a/app/ui/shell/shell.ts +++ b/app/ui/shell/shell.ts @@ -646,7 +646,7 @@ class Shell { // The keyboard dialog likewise: typing happens on the phone, not the // ring. An in-flight assistant turn suspends it for the same reason (a // tool loop can run for a while with no input); once the turn ends and - // the Follow-up/Done menu is showing, the normal idle timeout resumes. + // the Done/Follow-up menu is showing, the normal idle timeout resumes. if (this.activeVoiceLayer || this.activeKeyboardLayer || this.assistantSession?.isTurnActive() || this.foregroundWindow()?.isVoiceCapturing?.()) { this.lastInputAtMs = nowMs; return false; From e879c58d9c119f08459b603d8904be4428121111 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sun, 27 Sep 2026 21:38:04 -0700 Subject: [PATCH 10/60] EvenHub phone UI: add top bar, add open icon --- .../app/FaceclawEvenHubWebViewHost.kt | 136 ++++++++++++++++-- .../com/faceclaw/app/PreviewBitmapUtil.kt | 18 +++ app/app.css | 15 +- app/apps/evenhub/manager.ts | 55 ++++++- app/apps/evenhub/webview.ts | 13 +- app/g2/dashboard-controller.ts | 22 ++- app/native/gray-image-preview.ts | 18 +++ app/phone-ui/main-page.xml | 12 +- app/phone-ui/main-view-model.ts | 25 ++++ 9 files changed, 284 insertions(+), 30 deletions(-) diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt index 19d5a5a0..7e5cad69 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt @@ -1,14 +1,24 @@ package com.faceclaw.app import android.app.Activity +import android.content.Context import android.content.MutableContextWrapper +import android.graphics.Color +import android.graphics.Typeface import android.os.Build import android.os.Handler import android.os.Looper +import android.text.TextUtils +import android.util.TypedValue +import android.view.Gravity import android.view.View import android.view.ViewGroup import android.webkit.WebView import android.widget.FrameLayout +import android.widget.LinearLayout +import android.widget.TextView +import androidx.core.view.ViewCompat +import androidx.core.view.WindowInsetsCompat import java.util.ArrayList import java.util.HashMap @@ -34,6 +44,12 @@ import java.util.HashMap * the chosen WebView to the top of the overlay); hiding sends it back behind. * All view work happens on the main thread (callers are on the NS/JS thread). * + * Layout: the activity is edge-to-edge, so the overlay tracks the window + * insets itself. A top bar (the shown app's name and a close button) sits + * under the status bar, and the WebViews fill the area between it and the + * navigation bar / keyboard. That area is the same whether or not the overlay + * is shown, so showing an app doesn't resize (and re-lay-out) its page. + * * Timer keep-alive: when the phone screen turns off, Chromium heavily throttles * the page's own setTimeout/setInterval (intensive background throttling clamps * them to ~1/sec), so timer-driven apps (e.g. snake's game loop) slow to a @@ -71,8 +87,13 @@ import java.util.HashMap */ class FaceclawEvenHubWebViewHost { private var overlay: FrameLayout? = null + /** Holds the WebViews, inside [overlay] below the top bar. */ + private var stack: FrameLayout? = null + private var titleView: TextView? = null private var overlayActivity: Activity? = null private var shown = false + private var shownTitle = "" + private var onClose: Runnable? = null private val mainHandler = Handler(Looper.getMainLooper()) private val webViews: MutableList = ArrayList() @@ -139,6 +160,12 @@ class FaceclawEvenHubWebViewHost { private const val TICK_JS = "window.__fcTick?__fcTick():null" + /** Top bar height, below the status bar (Material toolbar height). */ + private const val BAR_HEIGHT_DP = 56f + + /** Matches the NativeScript ActionBar (NativeScriptToolbarStyle). */ + private val BAR_COLOR = Color.parseColor("#424242") + @JvmStatic @Synchronized fun getInstance(): FaceclawEvenHubWebViewHost { @@ -152,36 +179,112 @@ class FaceclawEvenHubWebViewHost { val existing = overlay if (existing != null && overlayActivity === activity && existing.parent != null) return existing val content = activity.findViewById(android.R.id.content) + (existing?.parent as ViewGroup?)?.removeView(existing) val created = FrameLayout(activity) - if (existing != null) { - (existing.parent as ViewGroup?)?.removeView(existing) - for (web in webViews) { - existing.removeView(web) - rebaseContext(web, activity) - created.addView(web, FrameLayout.LayoutParams( - ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)) - } + created.setBackgroundColor(Color.BLACK) + val createdStack = FrameLayout(activity) + created.addView(createdStack, FrameLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)) + val bar = buildTopBar(activity) + created.addView(bar, FrameLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.TOP)) + for (web in webViews) { + (web.parent as ViewGroup?)?.removeView(web) + rebaseContext(web, activity) + createdStack.addView(web, FrameLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)) + } + // Insets are passed on unconsumed: before API 30 a consuming child + // would starve its later siblings (the NativeScript UI) of them. + ViewCompat.setOnApplyWindowInsetsListener(created) { _, insets -> + applyInsets(bar, createdStack, insets) + insets } overlay = created + stack = createdStack overlayActivity = activity // index 0 = behind the NativeScript content view (raised again below if shown). content.addView(created, 0, FrameLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)) + ViewCompat.requestApplyInsets(created) if (shown) created.bringToFront() return created } + /** The bar across the top of a shown app: the app's name, then a close button. */ + private fun buildTopBar(activity: Activity): LinearLayout { + val bar = LinearLayout(activity) + bar.orientation = LinearLayout.HORIZONTAL + bar.gravity = Gravity.CENTER_VERTICAL + bar.setBackgroundColor(BAR_COLOR) + // Swallow touches so they don't fall through to the WebViews. + bar.isClickable = true + + val title = TextView(activity) + title.text = shownTitle + title.setTextColor(Color.WHITE) + title.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20f) + title.typeface = Typeface.create("sans-serif-medium", Typeface.NORMAL) + title.maxLines = 1 + title.ellipsize = TextUtils.TruncateAt.END + bar.addView(title, LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT, 1f).apply { + marginStart = dp(activity, 16f) + marginEnd = dp(activity, 12f) + }) + + val close = TextView(activity) + close.text = "\u2715" + close.setTextColor(Color.WHITE) + close.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20f) + close.gravity = Gravity.CENTER + close.contentDescription = "Close" + val ripple = TypedValue() + if (activity.theme.resolveAttribute(android.R.attr.selectableItemBackgroundBorderless, ripple, true)) { + close.setBackgroundResource(ripple.resourceId) + } + close.setOnClickListener { onClose?.run() } + val closeSize = dp(activity, 48f) + bar.addView(close, LinearLayout.LayoutParams(closeSize, closeSize).apply { + marginEnd = dp(activity, 4f) + }) + titleView = title + return bar + } + + /** + * Put the bar under the status bar (its background filling in behind it) + * and the WebViews between the bar and the navigation bar or keyboard. + */ + private fun applyInsets(bar: View, webStack: View, insets: WindowInsetsCompat) { + val bars = insets.getInsets( + WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout()) + val ime = insets.getInsets(WindowInsetsCompat.Type.ime()) + val barHeight = dp(bar.context, BAR_HEIGHT_DP) + bar.setPadding(bars.left, bars.top, bars.right, 0) + bar.layoutParams = (bar.layoutParams as FrameLayout.LayoutParams).apply { + height = bars.top + barHeight + } + webStack.layoutParams = (webStack.layoutParams as FrameLayout.LayoutParams).apply { + setMargins(bars.left, bars.top + barHeight, bars.right, maxOf(bars.bottom, ime.bottom)) + } + } + + private fun dp(context: Context, value: Float): Int { + return TypedValue.applyDimension( + TypedValue.COMPLEX_UNIT_DIP, value, context.resources.displayMetrics).toInt() + } + private fun rebaseContext(web: WebView, activity: Activity) { (web.context as? MutableContextWrapper)?.baseContext = activity } /** Add a WebView to the host, full-size and rendering, hidden behind the UI. */ fun attach(activity: Activity, web: WebView) { - val o = ensureOverlay(activity) + ensureOverlay(activity) rebaseContext(web, activity) web.visibility = View.VISIBLE if (web.parent == null) { - o.addView(web, FrameLayout.LayoutParams( + stack!!.addView(web, FrameLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)) } // resumeTimers() is process-global; make sure nothing left timers paused. @@ -215,9 +318,15 @@ class FaceclawEvenHubWebViewHost { } } - /** Bring an app's WebView to the front of [activity] so it is visible on the phone. */ - fun showOnPhone(activity: Activity?, web: WebView) { + /** + * Bring an app's WebView to the front of [activity] so it is visible on the + * phone, titled [title]. The top bar's close button runs [onClose]. + */ + fun showOnPhone(activity: Activity?, web: WebView, title: String, onClose: Runnable) { val o = if (activity != null) ensureOverlay(activity) else overlay ?: return + shownTitle = title + this.onClose = onClose + titleView?.text = title web.bringToFront() o.bringToFront() shown = true @@ -226,6 +335,7 @@ class FaceclawEvenHubWebViewHost { /** Send the overlay back behind the NativeScript UI. */ fun hideOnPhone() { shown = false + onClose = null val o = overlay ?: return val content = o.parent as ViewGroup? if (content != null) { @@ -242,7 +352,7 @@ class FaceclawEvenHubWebViewHost { fun detach(web: WebView) { webViews.remove(web) tickers.remove(web)?.stop() - overlay?.removeView(web) + stack?.removeView(web) web.destroy() } } diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/PreviewBitmapUtil.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/PreviewBitmapUtil.kt index 54f31c42..6c98b9b0 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/PreviewBitmapUtil.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/PreviewBitmapUtil.kt @@ -30,5 +30,23 @@ class PreviewBitmapUtil private constructor() { val colors = PreviewPalette.expand(bytes, 0, width * height, brightenGamma, green) return Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888) } + + /** + * A white-on-transparent bitmap of an 8bpp glasses icon (gray becomes + * alpha; black, which the glasses show as unlit, is transparent), for + * showing glasses artwork on the phone's dark action bar. + */ + @JvmStatic + fun whiteIconFromGray(gray: ByteBuffer?, width: Int, height: Int): Bitmap { + if (gray == null || width <= 0 || height <= 0 || gray.remaining() < width * height) { + throw IllegalArgumentException("invalid gray icon buffer") + } + val bytes = ByteArray(width * height) + gray.get(bytes) + val colors = IntArray(width * height) { i -> + ((bytes[i].toInt() and 0xff) shl 24) or 0x00ffffff + } + return Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888) + } } } diff --git a/app/app.css b/app/app.css index 49c6dbee..f493f6d4 100644 --- a/app/app.css +++ b/app/app.css @@ -16,8 +16,9 @@ ActionItem { color: #ffffff; } -/* The main page's custom titleView: title left, connection status and the - * warning triangle right-aligned beside the overflow menu. */ +/* The main page's custom titleView: title left; the EvenHub app icon, + * connection status and the warning triangle right-aligned beside the + * overflow menu. */ .action-bar-title { color: #ffffff; font-size: 18; @@ -32,6 +33,16 @@ ActionItem { vertical-align: center; } +/* The foreground EvenHub app's icon (opens its phone UI); the padding widens + * the tap target. */ +.action-bar-app-icon { + width: 32; + height: 32; + padding: 5.5; + margin-right: 8; + vertical-align: center; +} + /* The emoji brings its own yellow; the padding widens the tap target. */ .action-bar-warning { font-size: 18; diff --git a/app/apps/evenhub/manager.ts b/app/apps/evenhub/manager.ts index 7b3b327c..0b12dabe 100644 --- a/app/apps/evenhub/manager.ts +++ b/app/apps/evenhub/manager.ts @@ -6,11 +6,12 @@ * * Glasses-first: launching does NOT take over the phone screen. The phone * stays on the Faceclaw dashboard; an app's phone UI is shown on demand - * (window menu -> "Show phone UI"), overlaying the dashboard, and the Back - * button returns to it. Apps are kept alive until explicitly closed (no memory - * eviction yet). + * (window menu -> "Show phone UI", or the app-icon button in the phone's + * action bar while the app is foreground on the glasses), overlaying the + * dashboard, and the Back button or the overlay's close button returns to it. + * Apps are kept alive until explicitly closed (no memory eviction yet). */ -import { Application } from "@nativescript/core"; +import { Application, type ImageSource } from "@nativescript/core"; import { type AppContext } from "../app-definition"; import { appFilesDirPath, @@ -23,6 +24,8 @@ import { EvenHubSession } from "./session"; import { createEvenHubWindow } from "./evenhub-window"; import { createEvenHubWebView, type EvenHubWebView } from "./webview"; import { shell } from "../../ui/shell/shell"; +import { GrayImage } from "../../graphics/image"; +import { grayImageToWhiteIconSource } from "../../native/gray-image-preview"; import { readEvenHubPackageManifest, installedEvenHubAppId, @@ -36,12 +39,31 @@ type RunningApp = { packageId: string; session: EvenHubSession; webView: EvenHubWebView; + /** The app's icon for the phone action bar, rendered on first use. */ + phoneIcon?: ImageSource | null; }; +/** The phone action bar's button for opening the foreground app's phone UI. */ +export type PhoneUiButton = { windowId: string; title: string; icon: ImageSource | null }; + +/** Pixel size the action-bar icon is rendered at (~21dp at xxhdpi). */ +const PHONE_ICON_SIZE = 63; + const running = new Map(); let nextSerial = 1; let phoneShownWindowId: string | null = null; let backHandlerRegistered = false; +const phoneShownListeners = new Set<() => void>(); + +/** Called whenever an app's phone UI is shown or hidden. Returns an unsubscribe. */ +export function onPhoneShownChanged(listener: () => void): () => void { + phoneShownListeners.add(listener); + return () => phoneShownListeners.delete(listener); +} + +function notifyPhoneShownChanged(): void { + for (const listener of phoneShownListeners) listener(); +} /** Intercept Android Back while an app's phone UI is overlaying the dashboard. */ function ensureBackHandler(): void { @@ -112,6 +134,7 @@ async function startApp( if (phoneShownWindowId === windowId) { webView.hideOnPhone(); phoneShownWindowId = null; + notifyPhoneShownChanged(); } webView.destroy(); cleanup?.(); @@ -205,15 +228,35 @@ export function showOnPhone(windowId: string): void { const app = running.get(windowId); if (!app) return; if (phoneShownWindowId && phoneShownWindowId !== windowId) hidePhone(); - app.webView.showOnPhone(); + app.webView.showOnPhone(hidePhone); phoneShownWindowId = windowId; + notifyPhoneShownChanged(); } -/** Return the phone to the dashboard (Back, or the shown app closing). */ +/** Return the phone to the dashboard (Back, the close button, or the shown app closing). */ export function hidePhone(): void { if (!phoneShownWindowId) return; running.get(phoneShownWindowId)?.webView.hideOnPhone(); phoneShownWindowId = null; + notifyPhoneShownChanged(); +} + +/** + * The foreground glasses window, when it is an EvenHub app whose phone UI + * isn't showing: the phone action bar then offers a button to show it. + */ +export function phoneUiButton(): PhoneUiButton | null { + const window = shell.foregroundWindow(); + const app = window ? running.get(window.windowId) : undefined; + if (!window || !app || phoneShownWindowId === app.windowId) return null; + if (app.phoneIcon === undefined) { + // The same artwork as the glasses sidebar (installed icon, else the + // generic package icon), drawn white. + const image = new GrayImage(PHONE_ICON_SIZE, PHONE_ICON_SIZE, 0); + window.drawIcon(image, 0, 0, PHONE_ICON_SIZE); + app.phoneIcon = grayImageToWhiteIconSource(image); + } + return { windowId: app.windowId, title: window.title, icon: app.phoneIcon }; } export function runningAppCount(): number { diff --git a/app/apps/evenhub/webview.ts b/app/apps/evenhub/webview.ts index 06c0f0d3..655822ac 100644 --- a/app/apps/evenhub/webview.ts +++ b/app/apps/evenhub/webview.ts @@ -22,11 +22,13 @@ import { FACECLAW_VERSION } from "../../version"; declare const android: any; declare const com: any; +declare const java: any; export type EvenHubWebView = { evaluateJs: (js: string) => void; destroy: () => void; - showOnPhone: () => void; + /** Show the app's phone UI; `onClose` runs when its top bar's close button is tapped. */ + showOnPhone: (onClose: () => void) => void; hideOnPhone: () => void; /** The native android.webkit.WebView, for the host. */ native: unknown; @@ -118,8 +120,13 @@ export function createEvenHubWebView(session: EvenHubSession): EvenHubWebView { console.warn(`evenhub webview destroy failed: ${error}`); } }, - showOnPhone: () => - nativeHost.showOnPhone(Application.android?.foregroundActivity ?? Application.android?.startActivity ?? null, webView), + showOnPhone: (onClose: () => void) => + nativeHost.showOnPhone( + Application.android?.foregroundActivity ?? Application.android?.startActivity ?? null, + webView, + session.manifest.name, + new java.lang.Runnable({ run: onClose }), + ), hideOnPhone: () => nativeHost.hideOnPhone(), }; } diff --git a/app/g2/dashboard-controller.ts b/app/g2/dashboard-controller.ts index 1f1c3648..87b04040 100644 --- a/app/g2/dashboard-controller.ts +++ b/app/g2/dashboard-controller.ts @@ -78,7 +78,14 @@ import { installedEvenHubPackageId, uninstallEvenHubPackage, } from "../apps/evenhub/installed-apps"; -import { closeRunningPackage, launchInstalledPackage } from "../apps/evenhub/manager"; +import { + closeRunningPackage, + launchInstalledPackage, + onPhoneShownChanged, + phoneUiButton, + showOnPhone as showEvenHubPhoneUi, + type PhoneUiButton, +} from "../apps/evenhub/manager"; import { openEvenHubStoreForPackage } from "../apps/evenhub"; import { isInstalledPackagePresent } from "../apps/evenhub/updates"; import { wearerVerificationOptions } from "../apps/microphones/speakers"; @@ -133,6 +140,11 @@ export type DashboardSnapshot = { * nothing is paired, so "Disconnected" would be the wrong label. */ previewMode: boolean; + /** + * The foreground glasses window's EvenHub phone UI, when it can be opened + * (the action bar's app-icon button); null otherwise. + */ + evenHubPhoneUi: PhoneUiButton | null; }; type DashboardListener = (snapshot: DashboardSnapshot) => void; @@ -361,6 +373,8 @@ class DashboardController { launchApp: (appId) => this.launchApp(appId), requestShellRender: () => this.requestShellRender(), }); + // The action bar's EvenHub phone-UI button hides while that UI is showing. + onPhoneShownChanged(() => this.emit()); shell.configure({ actions: { ...sharedActions, @@ -1025,9 +1039,15 @@ class DashboardController { fontsMissingWarningVisible: this.fontsMissingWarningVisible, alarmReliabilityMessage: this.alarmReliabilityMessage, previewMode: this.isPreviewDisplayActive(), + evenHubPhoneUi: phoneUiButton(), }; } + /** Overlay an EvenHub app's phone UI (the action bar's app-icon button). */ + showEvenHubPhoneUi(windowId: string): void { + showEvenHubPhoneUi(windowId); + } + /** * Message to show in place of the display preview, or "" to show the preview. * diff --git a/app/native/gray-image-preview.ts b/app/native/gray-image-preview.ts index fc8b1656..e59c2655 100644 --- a/app/native/gray-image-preview.ts +++ b/app/native/gray-image-preview.ts @@ -27,3 +27,21 @@ export function grayImageToPreviewSource(image: GrayImage): ImageSource | null { ); return new ImageSource(bitmap); } + +/** + * A glasses icon as a white-on-transparent phone image (gray becomes alpha), + * for the dark action bar. + */ +export function grayImageToWhiteIconSource(image: GrayImage): ImageSource | null { + if (!global.isAndroid) { + return null; + } + + const baked = image.withDrawsBaked(); + const bitmap = com.faceclaw.app.PreviewBitmapUtil.whiteIconFromGray( + copyToJavaByteBuffer(baked.pixels), + baked.width, + baked.height, + ); + return new ImageSource(bitmap); +} diff --git a/app/phone-ui/main-page.xml b/app/phone-ui/main-page.xml index e80b711b..8b7d5cfb 100644 --- a/app/phone-ui/main-page.xml +++ b/app/phone-ui/main-page.xml @@ -1,11 +1,13 @@ - - + + diff --git a/app/phone-ui/main-view-model.ts b/app/phone-ui/main-view-model.ts index 407a1948..04bdc9f3 100644 --- a/app/phone-ui/main-view-model.ts +++ b/app/phone-ui/main-view-model.ts @@ -25,6 +25,7 @@ import { isAutoReconnectSuppressed, resumeAutoReconnect } from "../g2/reconnect- import { isPreviewOnlyMode } from "./onboarding-state"; import { formatErrorMessage } from "../util/format-error"; import { G2_LENS_HEIGHT, G2_LENS_WIDTH } from "../graphics/image"; +import { type PhoneUiButton } from "../apps/evenhub/manager"; const LENS_ASPECT_RATIO = G2_LENS_WIDTH / G2_LENS_HEIGHT; @@ -63,6 +64,7 @@ export class MainViewModel extends RemoteControlsViewModel { private _alarmReliabilityMessage = ""; private _warningsModalVisible = false; private _previewMode = false; + private _evenHubPhoneUi: PhoneUiButton | null = null; private _phase: "disconnected" | "connecting" | "connected" | "charging" | "disconnecting" = "disconnected"; // A new view model is built on every navigation to the main page; these @@ -112,6 +114,7 @@ export class MainViewModel extends RemoteControlsViewModel { this.batteryOptimizationWarningVisible = snapshot.batteryOptimizationWarningVisible; this.fontsMissingWarningVisible = snapshot.fontsMissingWarningVisible; this.alarmReliabilityMessage = snapshot.alarmReliabilityMessage; + this.evenHubPhoneUi = snapshot.evenHubPhoneUi; this.refreshPadFocusLine(); })); // Brightness / display mode can change from the glasses' Settings app too. @@ -773,6 +776,28 @@ export class MainViewModel extends RemoteControlsViewModel { return this._warningsModalVisible ? "visible" : "collapse"; } + set evenHubPhoneUi(value: PhoneUiButton | null) { + const current = this._evenHubPhoneUi; + if (current?.windowId === value?.windowId && current?.icon === value?.icon) return; + this._evenHubPhoneUi = value; + this.notifyPropertyChange("evenHubPhoneUiIcon", this.evenHubPhoneUiIcon); + this.notifyPropertyChange("evenHubPhoneUiVisibility", this.evenHubPhoneUiVisibility); + } + + /** The foreground EvenHub app's icon, which opens its phone UI when tapped. */ + get evenHubPhoneUiIcon(): ImageSource | null { + return this._evenHubPhoneUi?.icon ?? null; + } + + get evenHubPhoneUiVisibility(): "visible" | "collapse" { + return this._evenHubPhoneUi?.icon ? "visible" : "collapse"; + } + + onEvenHubPhoneUiTap(): void { + const windowId = this._evenHubPhoneUi?.windowId; + if (windowId) dashboardController.showEvenHubPhoneUi(windowId); + } + onWarningIconTap(): void { this.setWarningsModalVisible(true); } From 449cb0bf73ffc9c763d3e83dc461c6e1abebbda8 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sun, 27 Sep 2026 21:40:07 -0700 Subject: [PATCH 11/60] Update changelog --- CHANGELOG | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 83780177..c88a73aa 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,11 @@ * Add config settings to disable animation categories * EvenHub compatibility uses menu animations and is closer to style matched +* Reduce phone CPU usage +* Fix a crash on install of larger EvenHub apps +* Fix line wrapping on EvenHub permissions dialog +* Putting on the glasses auto-wakes the screen +* Add a button to the phone screen top bar to open EvenHub app phone UI ## 0.8.0 - 2026-09-26 From 45d2ece0d2fddd6ce30ae13930ce0957fb73d37d Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sun, 27 Sep 2026 23:16:41 -0700 Subject: [PATCH 12/60] Optimize phone CPU usage --- .../faceclaw/app/FaceclawBleCommunicator.kt | 3 + .../com/faceclaw/app/FaceclawWearBridge.kt | 30 +++++- app/apps/evenhub/installed-apps.ts | 10 ++ app/g2/dashboard-controller.ts | 7 ++ app/graphics/display-list.ts | 34 +++++-- app/graphics/image.ts | 79 +++++++++------ app/native/faceclaw-communicator.ios.ts | 8 ++ app/native/faceclaw-communicator.ts | 25 ++++- app/native/phone-battery.ts | 18 ++++ app/native/preview-display.ios.ts | 6 ++ app/native/preview-display.ts | 6 ++ app/native/settings-store.ts | 97 +++++++++++++++--- app/ui/shell/open-apps-persistence.ts | 10 +- .../faceclaw/app/g2protocol/ScenePlanner.kt | 10 +- .../g2protocol/session/GlassesSessionCore.kt | 4 + .../faceclaw/app/graphics/MenuSelection.kt | 11 ++- .../app/graphics/SurfaceCompositor.kt | 91 +++++++++++++++-- .../com/faceclaw/app/util/FrameTimingsCore.kt | 99 +++++++++++++------ .../com/faceclaw/app/SharedGraphicsTest.kt | 40 ++++++++ 19 files changed, 485 insertions(+), 103 deletions(-) diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt index 65d9c9c8..04bb7b26 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt @@ -349,6 +349,9 @@ class FaceclawBleCommunicator(context: Context, rightAddress: String?, leftAddre contentFingerprint, paintMs, frameId, if (glyphs == null) null else AndroidByteReader(glyphs)) } + /** Whether submitting this full-surface content would change nothing (see [GlassesSessionCore.isSurfaceCurrent]). */ + fun isSurfaceCurrent(surfaceId: String, fingerprint: String): Boolean = core.isSurfaceCurrent(surfaceId, fingerprint) + /** Play a tone sequence via CFW load_image_z mode 5 kind 4 (payload built on the TS side). */ fun playBuzzerSequence(payload: java.nio.ByteBuffer?) { val bytes = ByteArray(if (payload == null) 0 else payload.remaining()) diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawWearBridge.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawWearBridge.kt index 5be4a511..fcccfb04 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawWearBridge.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawWearBridge.kt @@ -23,6 +23,8 @@ import java.nio.charset.StandardCharsets import java.util.ArrayDeque import java.util.ArrayList import java.util.Collections +import java.util.concurrent.ExecutorService +import java.util.concurrent.Executors /** * Phone side of the Wear OS integration: the single place that talks to the @@ -114,6 +116,16 @@ class FaceclawWearBridge private constructor(context: Context) { private val pending = ArrayDeque() private val watchNodes: MutableList = ArrayList() private var lastPublishedState: String? = null + /** Latest state waiting for [publishExecutor]; null when none is queued. Guarded by [lock]. */ + private var queuedState: String? = null + /** + * Serializing a DataMap and handing it to Play services costs ~10-25ms per + * publish, and the switcher publishes on every foreground change, so it + * runs here instead of on the main thread. + */ + private val publishExecutor: ExecutorService = Executors.newSingleThreadExecutor { runnable -> + Thread(runnable, "FaceclawWearPublish").apply { isDaemon = true } + } private class PendingMessage( val path: String, @@ -210,12 +222,28 @@ class FaceclawWearBridge private constructor(context: Context) { publishState(json, false) } - /** As [publishState]; `force` re-sends an unchanged state. */ + /** + * As [publishState]; `force` re-sends an unchanged state. The put happens + * on [publishExecutor]; states that arrive while one is still waiting + * replace it, since only the latest matters to the watch. + */ fun publishState(json: String?, force: Boolean) { if (!available || json == null) return synchronized(lock) { if (!force && json == lastPublishedState) return lastPublishedState = json + val alreadyQueued = queuedState != null + queuedState = json + if (alreadyQueued) return + } + publishExecutor.execute { publishQueuedState() } + } + + private fun publishQueuedState() { + val json: String + synchronized(lock) { + json = queuedState ?: return + queuedState = null } try { val request = PutDataMapRequest.create(PATH_STATE) diff --git a/app/apps/evenhub/installed-apps.ts b/app/apps/evenhub/installed-apps.ts index ea05c4f1..a785f34f 100644 --- a/app/apps/evenhub/installed-apps.ts +++ b/app/apps/evenhub/installed-apps.ts @@ -51,9 +51,19 @@ export function installedEvenHubPackageId(appId: string): string | null { } } +// The parsed index for the last stored value: the launcher and the watch +// state both list installed apps on every refresh, and the sort's +// localeCompare dominated the cost. +let parsedIndex: { raw: string; apps: InstalledEvenHubApp[] } | null = null; + export function getInstalledEvenHubApps(): InstalledEvenHubApp[] { const raw = getStringSetting(STORAGE_KEY, ""); if (!raw) return []; + if (parsedIndex?.raw !== raw) parsedIndex = { raw, apps: parseInstalledIndex(raw) }; + return parsedIndex.apps.map((app) => ({ ...app })); +} + +function parseInstalledIndex(raw: string): InstalledEvenHubApp[] { try { const parsed = JSON.parse(raw); if (!Array.isArray(parsed)) return []; diff --git a/app/g2/dashboard-controller.ts b/app/g2/dashboard-controller.ts index 87b04040..e74a24b0 100644 --- a/app/g2/dashboard-controller.ts +++ b/app/g2/dashboard-controller.ts @@ -2515,6 +2515,13 @@ class DashboardController { return; } const fingerprint = frameTimings.span(frameId, "fingerprint", () => planesFingerprint(planes)); + // An identical repaint (e.g. every in-process window re-renders when the + // switcher brings it to the foreground) would flatten, encode and + // composite only to be deduped before sending. + if (display.isSurfaceCurrent(surfaceId, fingerprint)) { + frameTimings.finishFrame(frameId, "discarded: surface unchanged"); + return; + } const { image, draws } = frameTimings.span(frameId, "flatten", () => flattenPlanesWithDraws(planes)); const buffer = frameTimings.span(frameId, "to8bpp", () => image.to8bppBuffer()); const preparedDraws = frameTimings.span(frameId, "prepareFrameDraws", () => prepareFrameDraws(draws)); diff --git a/app/graphics/display-list.ts b/app/graphics/display-list.ts index 00109121..924f87d7 100644 --- a/app/graphics/display-list.ts +++ b/app/graphics/display-list.ts @@ -36,14 +36,34 @@ export type DisplayList = { }; export type PlacedDisplayList = { displayList: DisplayList; x: number; y: number; width: number; height: number; depth: number }; +/** + * Growable byte buffer. Lists are encoded on every frame that carries one, and + * twice more for its fingerprint and the preview; resources (whole menu rows, + * scroll strips) are tens of KB, so they go in with one set() rather than a + * push per byte. + */ class Writer { - bytes: number[] = []; - u8(n: number): void { this.bytes.push(integer(n, 0, 255)); } + private buffer = new Uint8Array(256); + length = 0; + private reserve(count: number): void { + const needed = this.length + count; + if (needed <= this.buffer.length) return; + let size = this.buffer.length * 2; + while (size < needed) size *= 2; + const grown = new Uint8Array(size); + grown.set(this.buffer.subarray(0, this.length)); + this.buffer = grown; + } + u8(n: number): void { integer(n, 0, 255); this.reserve(1); this.buffer[this.length++] = n; } i8(n: number): void { this.u8(integer(n, -128, 127) & 255); } - u16(n: number): void { integer(n, 0, 65535); this.bytes.push(n & 255, n >>> 8); } + u16(n: number): void { integer(n, 0, 65535); this.reserve(2); this.buffer[this.length++] = n & 255; this.buffer[this.length++] = n >>> 8; } i16(n: number): void { this.u16(integer(n, -32768, 32767) & 65535); } u32(n: number): void { integer(n, 0, 4294967295); this.u16(n & 65535); this.u16(n >>> 16); } - raw(bytes: ArrayLike): void { for (let i = 0; i < bytes.length; i++) this.bytes.push(bytes[i]); } + raw(bytes: ArrayLike): void { this.reserve(bytes.length); this.buffer.set(bytes, this.length); this.length += bytes.length; } + /** The written bytes, in a buffer of their own. */ + bytes(): Uint8Array { return this.buffer.slice(0, this.length); } + /** A view of the written bytes; valid until the next write. */ + view(): Uint8Array { return this.buffer.subarray(0, this.length); } } /** Length-delimited bridge envelope; call operands use fixed widths except extended x/y. */ @@ -85,9 +105,9 @@ export function encodeDisplayList(placed: PlacedDisplayList, now = Date.now()): } } } - if (out.bytes.length > 4 * 1024 * 1024) throw new Error('Display list exceeds bridge limit'); - const header = new Writer(); header.u8(DISPLAY_LIST_RECORD); header.u32(out.bytes.length); header.raw(out.bytes); - return Uint8Array.from(header.bytes); + if (out.length > 4 * 1024 * 1024) throw new Error('Display list exceeds bridge limit'); + const header = new Writer(); header.u8(DISPLAY_LIST_RECORD); header.u32(out.length); header.raw(out.view()); + return header.bytes(); } /** Replay-record sizes by tag, as in glyph-wire's frame draw buffer. */ diff --git a/app/graphics/image.ts b/app/graphics/image.ts index c841071b..6f3164c8 100644 --- a/app/graphics/image.ts +++ b/app/graphics/image.ts @@ -277,17 +277,28 @@ export class GrayImage { const destX = dx | 0; const destY = dy | 0; - for (let row = 0; row < copyHeight; row++) { - const sy = srcY + row; - const ty = destY + row; - if (sy < 0 || sy >= source.height || ty < 0 || ty >= this.height) continue; - for (let col = 0; col < copyWidth; col++) { - const sx = srcX + col; - const tx = destX + col; - if (sx < 0 || sx >= source.width || tx < 0 || tx >= this.width) continue; - const value = source.pixels[sy * source.width + sx] ?? 0; + // Clip once, then copy row spans: flattening a frame blits every plane, + // and per-pixel bounds checks made that a sizeable share of a paint. + const colStart = Math.max(0, -destX); + const colEnd = Math.min(copyWidth, source.width - srcX, this.width - destX); + const rowStart = Math.max(0, -destY); + const rowEnd = Math.min(copyHeight, source.height - srcY, this.height - destY); + const span = colEnd - colStart; + const src = source.pixels; + const dst = this.pixels; + // A blit within one image copies pixel by pixel, forwards, as it always has. + const bulk = !opts.transparentZero && source !== this; + for (let row = rowStart; span > 0 && row < rowEnd; row++) { + const from = (srcY + row) * source.width + srcX + colStart; + const to = (destY + row) * this.width + destX + colStart; + if (bulk) { + dst.set(src.subarray(from, from + span), to); + continue; + } + for (let i = 0; i < span; i++) { + const value = src[from + i]!; if (opts.transparentZero && value === 0) continue; - this.pixels[ty * this.width + tx] = value; + dst[to + i] = value; } } @@ -398,7 +409,7 @@ export class GrayImage { hash = mixInt(hash, placed.source.height); hash = mixInt(hash, placed.source.sourceContentHash32()); if (placed.presentation) { const p = placed.presentation; for (const value of [p.radius, p.background, p.border, p.depth, p.mode === "image" ? 1 : p.mode === "masked-image" ? 2 : 0]) hash = mixInt(hash, value); - if (p.displayList) for (const byte of encodeDisplayList({ displayList: p.displayList, x: 0, y: 0, width: placed.source.width, height: placed.source.height, depth: p.depth }, p.displayList.timeline?.startedAt ?? 0)) hash = mixInt(hash, byte); + if (p.displayList) hash = mixInt(hash, bytesHash32(encodeDisplayList({ displayList: p.displayList, x: 0, y: 0, width: placed.source.width, height: placed.source.height, depth: p.depth }, p.displayList.timeline?.startedAt ?? 0))); } } else { hash = mixInt(hash, 0xf17e); @@ -415,28 +426,9 @@ export class GrayImage { return hash >>> 0; } - /** - * FNV-1a over the raster pixels. Four bytes at a time where alignment - * allows: this runs on every frame's fingerprint, over the whole screen, on - * the thread that is about to hand the frame to the transport. - */ + /** Hash of the raster pixels; see bytesHash32. */ private pixelsHash32(): number { - const pixels = this.pixels; - let hash = 2166136261; - let i = 0; - if ((pixels.byteOffset & 3) === 0) { - const words = new Uint32Array(pixels.buffer, pixels.byteOffset, pixels.length >>> 2); - for (let w = 0; w < words.length; w++) { - hash ^= words[w]!; - hash = Math.imul(hash, 16777619); - } - i = words.length << 2; - } - for (; i < pixels.length; i++) { - hash ^= pixels[i]!; - hash = Math.imul(hash, 16777619); - } - return hash >>> 0; + return bytesHash32(this.pixels); } /** @@ -744,6 +736,29 @@ function clampByte(value: number): number { } /** Fold a 32-bit int into an FNV-style running hash. */ +/** + * FNV-1a over bytes. Four bytes at a time where alignment allows: this runs on + * every frame's fingerprint, over the whole screen, on the thread that is + * about to hand the frame to the transport. + */ +function bytesHash32(bytes: Uint8Array): number { + let hash = 2166136261; + let i = 0; + if ((bytes.byteOffset & 3) === 0) { + const words = new Uint32Array(bytes.buffer, bytes.byteOffset, bytes.length >>> 2); + for (let w = 0; w < words.length; w++) { + hash ^= words[w]!; + hash = Math.imul(hash, 16777619); + } + i = words.length << 2; + } + for (; i < bytes.length; i++) { + hash ^= bytes[i]!; + hash = Math.imul(hash, 16777619); + } + return hash >>> 0; +} + function mixInt(hash: number, value: number): number { hash ^= value | 0; return Math.imul(hash, 16777619); diff --git a/app/native/faceclaw-communicator.ios.ts b/app/native/faceclaw-communicator.ios.ts index 47fe1231..704a4a66 100644 --- a/app/native/faceclaw-communicator.ios.ts +++ b/app/native/faceclaw-communicator.ios.ts @@ -536,6 +536,14 @@ export class FaceclawCommunicatorBridge { await this.enqueueNativeCall(() => { this.communicator.setScreenBlankedBlanked(Boolean(blanked)); }); } + /** + * See the Android bridge. Not wired to the shared compositor's check on iOS + * yet, so every repaint is submitted as before. + */ + isSurfaceCurrent(_surfaceId: string, _fingerprint: string): boolean { + return false; + } + async submitSurfaceFrame( surfaceId: string, pixels8bpp: Uint8Array, diff --git a/app/native/faceclaw-communicator.ts b/app/native/faceclaw-communicator.ts index 37b5f479..ced591d5 100644 --- a/app/native/faceclaw-communicator.ts +++ b/app/native/faceclaw-communicator.ts @@ -133,6 +133,8 @@ export class FaceclawCommunicatorBridge { private javaCallQueue: Promise = Promise.resolve(); /** Calls waiting on javaCallQueue; 0 means enqueueJavaCall's fast path is safe. */ private queuedJavaCalls = 0; + /** Queued calls that may change what a surface holds; see isSurfaceCurrent. */ + private queuedSurfaceChanges = 0; // Reused Java-side buffers for byte payloads; passing a JS ArrayBuffer to // Java leaks it (see java-direct-buffer.ts). Loaded inside the queued call, // immediately before the synchronous Java call that consumes them. @@ -267,8 +269,12 @@ export class FaceclawCommunicatorBridge { * the frame timings), which is pure latency on a call the caller is already * awaiting. Off by default: a call that might block for a while should keep * yielding to the main looper first. + * + * preservesSurfaces marks a call that neither changes a surface's retained + * content nor leaves a change waiting for a later composite (it composites + * itself), so having it queued does not make isSurfaceCurrent answer false. */ - private enqueueJavaCall(operation: () => T, inlineWhenIdle = false): Promise { + private enqueueJavaCall(operation: () => T, inlineWhenIdle = false, preservesSurfaces = false): Promise { if (inlineWhenIdle && this.queuedJavaCalls === 0) { try { return Promise.resolve(operation()); @@ -277,10 +283,12 @@ export class FaceclawCommunicatorBridge { } } this.queuedJavaCalls++; + if (!preservesSurfaces) this.queuedSurfaceChanges++; const run = () => new Promise((resolve, reject) => { setTimeout(() => { this.queuedJavaCalls--; + if (!preservesSurfaces) this.queuedSurfaceChanges--; try { resolve(operation()); } catch (error) { @@ -549,6 +557,7 @@ export class FaceclawCommunicatorBridge { await this.enqueueJavaCall( () => this.communicator.submitShellScene(this.shellSceneBuffer.load(snapshot), paintMs, frameId), true, + true, ); } @@ -562,7 +571,19 @@ export class FaceclawCommunicatorBridge { async setSurfaceVisible(id: string, visible: boolean): Promise { await this.enqueueJavaCall(() => { this.communicator.setSurfaceVisible(id, Boolean(visible)); - }); + }, false, true); + } + + /** + * Whether submitting a full-surface frame with this fingerprint would + * change nothing: Java already holds that content for the surface, and no + * queued or not-yet-composited change is waiting on a composite. Lets a + * repaint that came out identical (a window re-rendered when it comes to + * the foreground, say) skip flattening and submitting its frame. + */ + isSurfaceCurrent(surfaceId: string, fingerprint: string): boolean { + if (this.queuedSurfaceChanges > 0) return false; + return Boolean(this.communicator.isSurfaceCurrent(surfaceId, fingerprint)); } /** diff --git a/app/native/phone-battery.ts b/app/native/phone-battery.ts index b758fcd3..23bd5e9f 100644 --- a/app/native/phone-battery.ts +++ b/app/native/phone-battery.ts @@ -7,7 +7,25 @@ export type PhoneBatteryState = { charging: boolean | null; }; +// The Android read is a sticky-broadcast binder round trip, and the top bar +// asks on every shell paint; the level moves far slower than that. +const ANDROID_CACHE_MS = 5000; +let cachedState: PhoneBatteryState | null = null; +let cachedAtMs = 0; + export function readPhoneBatteryState(): PhoneBatteryState { + if (global.isAndroid) { + const now = Date.now(); + if (cachedState === null || now - cachedAtMs >= ANDROID_CACHE_MS || now < cachedAtMs) { + cachedState = readPhoneBatteryStateUncached(); + cachedAtMs = now; + } + return { ...cachedState }; + } + return readPhoneBatteryStateUncached(); +} + +function readPhoneBatteryStateUncached(): PhoneBatteryState { if (global.isIOS) { const device = UIDevice.currentDevice const level = device.batteryLevel diff --git a/app/native/preview-display.ios.ts b/app/native/preview-display.ios.ts index 2a70a769..655ed620 100644 --- a/app/native/preview-display.ios.ts +++ b/app/native/preview-display.ios.ts @@ -18,6 +18,7 @@ export type DisplayTarget = Pick< | "setUnderlayDim" | "setScreenBlanked" | "submitSurfaceFrame" + | "isSurfaceCurrent" | "submitShellScene" | "waitForFrameFinished" | "getCompositePreview" @@ -109,6 +110,11 @@ export class PreviewDisplayTarget implements DisplayTarget { this.composited(); } + /** Never skips: preview frames are cheap and nothing is transmitted. */ + isSurfaceCurrent(_surfaceId: string, _fingerprint: string): boolean { + return false; + } + async submitShellScene(bytes: Uint8Array, _paintMs = 0, _frameId = 0): Promise { this.compositor.setShellScene(bytes); this.composited(); diff --git a/app/native/preview-display.ts b/app/native/preview-display.ts index 53e3e927..4f6d7531 100644 --- a/app/native/preview-display.ts +++ b/app/native/preview-display.ts @@ -24,6 +24,7 @@ export type DisplayTarget = Pick< | "setUnderlayDim" | "setScreenBlanked" | "submitSurfaceFrame" + | "isSurfaceCurrent" | "submitShellScene" | "waitForFrameFinished" | "getCompositePreview" @@ -109,6 +110,11 @@ export class PreviewDisplayTarget implements DisplayTarget { this.compositor.setSurfaceDepth(id, Math.round(depth)); } + /** Never skips: preview frames are cheap and nothing is transmitted. */ + isSurfaceCurrent(_surfaceId: string, _fingerprint: string): boolean { + return false; + } + async submitShellScene(bytes: Uint8Array, paintMs = 0, frameId = 0): Promise { this.compositor.submitShellScene(this.shellSceneBuffer.load(bytes), paintMs, frameId); } diff --git a/app/native/settings-store.ts b/app/native/settings-store.ts index 3f3f43da..62992be2 100644 --- a/app/native/settings-store.ts +++ b/app/native/settings-store.ts @@ -8,17 +8,35 @@ import { Utils } from "@nativescript/core"; declare const com: any; +declare const android: any; let javaInstance: any = null; // The Java-side listener proxy must stay referenced or it gets GC'd. let retainedListenerProxy: any = null; const changeListeners = new Set<(key: string) => void>(); +// Values already read through JNI, which cost a bridge call each and are read +// many times per paint (display mode, fonts, clock format). Only used while +// this isolate's Java listener is registered on a thread with a Looper: every +// write, from any isolate, notifies that listener, which drops the key before +// any other change listener runs. A write from another isolate is visible here +// once its notification has been dispatched (one message-loop tick), the same +// point at which change listeners hear about it. +// Strings are cached without a default (null = unset). Booleans are cached per +// default, since the Java getter cannot report "unset", except after a write +// from this isolate (defaultValue null: stored, so any default reads it). +const stringCache = new Map(); +const booleanCache = new Map(); +let cachingEnabled: boolean | null = null; + /** Release this isolate's native observer before its worker is terminated. */ export function disposeSettingsStore(): void { changeListeners.clear(); if (retainedListenerProxy !== null) getJava().unregisterListener(retainedListenerProxy); retainedListenerProxy = null; + cachingEnabled = false; + stringCache.clear(); + booleanCache.clear(); } function getJava(): any { @@ -31,20 +49,80 @@ function getJava(): any { return javaInstance; } +function canCache(): boolean { + if (cachingEnabled === null) { + cachingEnabled = false; + try { + // FaceclawSettings dispatches notifications through the registering + // thread's Looper; without one this isolate would never hear of writes. + if (android.os.Looper.myLooper() !== null) { + ensureJavaListener(); + cachingEnabled = true; + } + } catch { + cachingEnabled = false; + } + } + return cachingEnabled; +} + export function getStringSetting(key: string, defaultValue: string): string { - return String(getJava().getString(key, defaultValue)); + if (!canCache()) return String(getJava().getString(key, defaultValue)); + let value = stringCache.get(key); + if (value === undefined) { + const raw = getJava().getString(key, null); + value = raw === null || raw === undefined ? null : String(raw); + stringCache.set(key, value); + } + return value ?? defaultValue; } export function setStringSetting(key: string, value: string): void { getJava().setString(key, value); + if (cachingEnabled) stringCache.set(key, value === null || value === undefined ? null : String(value)); } export function getBooleanSetting(key: string, defaultValue: boolean): boolean { - return Boolean(getJava().getBoolean(key, defaultValue)); + if (!canCache()) return Boolean(getJava().getBoolean(key, defaultValue)); + const cached = booleanCache.get(key); + if (cached !== undefined && (cached.defaultValue === null || cached.defaultValue === defaultValue)) { + return cached.value; + } + const value = Boolean(getJava().getBoolean(key, defaultValue)); + booleanCache.set(key, { defaultValue, value }); + return value; } export function setBooleanSetting(key: string, value: boolean): void { getJava().setBoolean(key, value); + if (cachingEnabled) booleanCache.set(key, { defaultValue: null, value: Boolean(value) }); +} + +function forgetCachedSetting(key: string | null | undefined): void { + if (key === null || key === undefined) { + stringCache.clear(); + booleanCache.clear(); + return; + } + stringCache.delete(key); + booleanCache.delete(key); +} + +function ensureJavaListener(): void { + if (retainedListenerProxy !== null) return; + retainedListenerProxy = new com.faceclaw.app.FaceclawSettingsListener({ + onSettingChanged: (key: string) => { + forgetCachedSetting(key === null || key === undefined ? key : String(key)); + for (const registered of Array.from(changeListeners)) { + try { + registered(String(key)); + } catch (error) { + console.warn("settings change listener failed", error); + } + } + }, + }); + getJava().registerListener(retainedListenerProxy); } /** @@ -53,20 +131,7 @@ export function setBooleanSetting(key: string, value: boolean): void { * change. */ export function onSettingsStoreChanged(listener: (key: string) => void): () => void { - if (retainedListenerProxy === null) { - retainedListenerProxy = new com.faceclaw.app.FaceclawSettingsListener({ - onSettingChanged: (key: string) => { - for (const registered of Array.from(changeListeners)) { - try { - registered(String(key)); - } catch (error) { - console.warn("settings change listener failed", error); - } - } - }, - }); - getJava().registerListener(retainedListenerProxy); - } + ensureJavaListener(); changeListeners.add(listener); return () => { changeListeners.delete(listener); diff --git a/app/ui/shell/open-apps-persistence.ts b/app/ui/shell/open-apps-persistence.ts index 2528bede..8f5cd4d6 100644 --- a/app/ui/shell/open-apps-persistence.ts +++ b/app/ui/shell/open-apps-persistence.ts @@ -14,8 +14,9 @@ export type PersistedOpenApps = { const STATE_VERSION = 1; const FILE_NAME = "open-apps.json"; -// Coalesces bursts (restore, sidebar scrolling) into one write; short enough -// that a build-reinstall kill right after a change rarely loses it. +// Coalesces bursts (restore, sidebar scrolling) into one write once they +// settle; short enough that a build-reinstall kill right after a change +// rarely loses it. const WRITE_DELAY_MS = 1000; function openAppsFilePath(): string { @@ -50,7 +51,10 @@ let pendingState: PersistedOpenApps | null = null; /** Save the open-app state (debounced; the latest state wins). */ export function savePersistedOpenApps(state: PersistedOpenApps): void { pendingState = state; - if (writeTimer !== null) return; + // Restarted on every change: scrolling through the switcher changes the + // foreground app a few times a second, and each synchronous write costs + // several milliseconds of main thread. + if (writeTimer !== null) clearTimeout(writeTimer); writeTimer = setTimeout(() => { writeTimer = null; const state = pendingState; diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/ScenePlanner.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/ScenePlanner.kt index fb180979..fe9bf23b 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/ScenePlanner.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/ScenePlanner.kt @@ -63,7 +63,7 @@ class ScenePlanner(private val cache: ResourceCacheState) { val calls = ArrayList() for (top in 0 until height step 32) { val rows = minOf(32, height - top) - if (old != null && (top * stride until (top + rows) * stride).all { old[it] == next[it] }) continue + if (old != null && sameBytes(old, next, top * stride, (top + rows) * stride)) continue var left = width; var right = -1 for (y in top until top + rows) for (x in 0 until width) { val p = y * stride + x / 2; val shift = if (x % 2 == 0) 4 else 0 @@ -75,4 +75,12 @@ class ScenePlanner(private val cache: ResourceCacheState) { } return calls } + private fun sameBytes(a: ByteArray, b: ByteArray, from: Int, to: Int): Boolean { + var i = from + while (i < to) { + if (a[i] != b[i]) return false + i++ + } + return true + } } diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt index 12eb9a7b..9aa9a098 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt @@ -1017,6 +1017,10 @@ class GlassesSessionCore( storeDesiredComposite(composite, paintMs, frameId) } + /** See [SurfaceCompositor.isSurfaceCurrent]. */ + fun isSurfaceCurrent(surfaceId: String, fingerprint: String): Boolean = + compositor.isSurfaceCurrent(surfaceId, fingerprint) + /** Store a composite as the desired frame unless a newer one won the race. */ internal fun storeDesiredComposite(composite: SurfaceCompositor.Composite, paintMs: Int, frameId: Int) { var supersededFrameId = 0 diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/MenuSelection.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/MenuSelection.kt index fda4e8e6..40328574 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/MenuSelection.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/MenuSelection.kt @@ -2,11 +2,14 @@ package com.faceclaw.app /** A retained selection or image, replayed at stereo depth over the screen and shell surfaces. */ class MenuSelection(val x: Int, val y: Int, val width: Int, val height: Int, val radius: Int, - val background: Int, val border: Int, val depth: Int, val packed: ByteArray, val occlusions: List = emptyList(), val kind: Int = DrawRecordKind.MENU_SELECTION, val mask: List = emptyList()) : RetainedDrawing { - val resource = CachedResource(DrawProtocol.rawImage(width, height, packed)) + val background: Int, val border: Int, val depth: Int, val packed: ByteArray, val occlusions: List = emptyList(), val kind: Int = DrawRecordKind.MENU_SELECTION, val mask: List = emptyList(), + /** [packed] as a raw-image resource; translated copies share it (and its hash) instead of rebuilding it. */ + val resource: CachedResource = CachedResource(DrawProtocol.rawImage(width, height, packed))) : RetainedDrawing { override val resources = listOf(resource) - override val fingerprint = "$kind,${mask.joinToString { it.joinToString() }},$x,$y,$width,$height,$radius,$background,$border,$depth,${resource.hash},${occlusions.joinToString { it.joinToString() }}" - override fun translated(dx: Int, dy: Int) = MenuSelection(x + dx, y + dy, width, height, radius, background, border, depth, packed, occlusions.map { intArrayOf(it[0] + dx, it[1] + dy, it[2], it[3]) }, kind, mask) + override val fingerprint: String by lazy { + "$kind,${mask.joinToString { it.joinToString() }},$x,$y,$width,$height,$radius,$background,$border,$depth,${resource.hash},${occlusions.joinToString { it.joinToString() }}" + } + override fun translated(dx: Int, dy: Int) = if (dx == 0 && dy == 0) this else MenuSelection(x + dx, y + dy, width, height, radius, background, border, depth, packed, occlusions.map { intArrayOf(it[0] + dx, it[1] + dy, it[2], it[3]) }, kind, mask, resource) override fun calls(ids: IntArray, nowMs: Long) = calls(ids.single()) fun calls(id: Int): List { val image = when (kind) { diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt index 58d3c3bf..57d92c5f 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt @@ -43,11 +43,19 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr return maxOf(1, (((value * dim) + 128) shr 8)) } + /** + * The rest of [reader] as a heap-array reader. Parsing reads field by field, and through a + * platform buffer (Android's direct ByteBuffer) each byte was its own native peek; one bulk + * copy first is far cheaper. + */ + private fun heapReader(reader: ByteReader): ByteReader = + if (reader is ArrayByteReader) reader else ArrayByteReader(ByteArray(reader.remaining()).also { reader.get(it) }) + private fun parseDraws(draws: ByteReader?): Array { if (((draws == null) || (draws.remaining() < 1))) { return NO_DRAWS } - val cursor: ByteReader = draws + val cursor: ByteReader = heapReader(draws) var out: MutableList = ArrayList() while ((cursor.remaining() >= 1)) { var kind: Int = (cursor.get() and 0xff) @@ -253,8 +261,11 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr private var shellScene: ShellScene? = null fun setShellScene(reader: ByteReader) { - val scene = ShellScene.decode(reader) - lock.withLock { shellScene = scene } + val scene = ShellScene.decode(heapReader(reader)) + lock.withLock { + shellScene = scene + changedSinceComposite = true + } } private class Surface { @@ -284,6 +295,16 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr /** Surface-local deferred draws of the retained content (already baked into pixels). */ @JvmField var draws: Array = NO_DRAWS + /** + * [draws]' retained selections in screen coordinates, as built for [placedFor] at + * ([placedX], [placedY]). Reused by every composite until either changes, so the shell + * scene built from them (and its fingerprint) can be reused too. + */ + @JvmField var placedSelections: List = emptyList() + @JvmField var placedFor: Array? = null + @JvmField var placedX: Int = 0 + @JvmField var placedY: Int = 0 + constructor(id: String) { this.id = id } @@ -291,6 +312,8 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr private val lock = protocolPlatform().createLock() private var animatedPreview: ShellScene.AnimatedPreview? = null + /** The last composite's scene; reused while its inputs are unchanged (see compositeLocked). */ + private var lastScene: ShellScene? = null private var previewKey: String? = null private fun previewScene(scene: ShellScene, gray: ByteArray, key: String): ByteArray { @@ -318,6 +341,13 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr private var nextCompositeSeq: Long = 1 + /** + * Set by changes that take effect at the next composite (geometry, dim, depth, blanking, + * visibility, a new shell scene, content retained without compositing) and cleared by a + * composite that is kept (not a preview); see [isSurfaceCurrent]. + */ + private var changedSinceComposite: Boolean = false + /** Set the output frame size. Must be called before any surface work. */ fun configureScreen(width: Int, height: Int): Unit { if (((width <= 0) || (height <= 0))) { @@ -376,12 +406,27 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr surface.height = height surface.zOrder = zOrder surface.transparency = transparency + changedSinceComposite = true } } fun removeSurface(id: String): Unit { lock.withLock { surfaces.remove(id) + changedSinceComposite = true + } + } + + /** + * Whether a full-surface update carrying [fingerprint] would change nothing: the surface + * already retains that content and every other change has reached a kept composite. A + * submitter can then drop an identical repaint without flattening or sending it. + */ + fun isSurfaceCurrent(id: String, fingerprint: String): Boolean { + lock.withLock { + if (changedSinceComposite) return false + val surface = surfaces.get(id) ?: return false + return surface.fingerprint.isNotEmpty() && surface.fingerprint == fingerprint } } @@ -398,6 +443,7 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr lock.withLock { underlayDimBelowZOrder = belowZOrder underlayDim = maxOf(0, minOf(256, factor256)) + changedSinceComposite = true } } @@ -419,6 +465,7 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr throw IllegalArgumentException(("unknown surface " + id)) } surface.visible = visible + changedSinceComposite = true } } @@ -432,6 +479,7 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr lock.withLock { val surface = surfaces.get(id) ?: throw IllegalArgumentException(("unknown surface " + id)) surface.depth = depth + changedSinceComposite = true } } @@ -450,6 +498,7 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr fun setBlanked(blanked: Boolean): Unit { lock.withLock { this.blanked = blanked + changedSinceComposite = true } } @@ -596,6 +645,7 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr } surface.fingerprint = (if ((contentFingerprint == null)) "" else contentFingerprint) surface.draws = parsed + if (!composeAfter) changedSinceComposite = true return if (composeAfter) compositeLocked() else null } } @@ -618,8 +668,10 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr return null } val seq = nextCompositeSeq + val changed = changedSinceComposite val result = compositeLocked(includePreview = true) nextCompositeSeq = seq + changedSinceComposite = changed return result } } @@ -640,6 +692,7 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr } private fun compositeLocked(includePreview: Boolean = includePreviewInFrames): Composite { + changedSinceComposite = false var gray: ByteArray = ByteArray((screenWidth * screenHeight)) if (blanked) { animatedPreview?.player?.stop() @@ -666,9 +719,9 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr } blendLocked(gray, surface) var dim: Int = dimForLocked(surface) + selections.addAll(placedSelectionsLocked(surface)) for (draw in surface.draws) { - val selected = draw.selection - if (selected != null) { selections.add(selected.translated(surface.x, surface.y)); continue } + if (draw.selection != null) continue if (((dim < 256) && (draw.kind == ScreenDraw.KIND_IMAGE))) { continue } @@ -710,8 +763,16 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr } } val screenDepth = screenDepthLocked(ordered) - val scene = if (surfaces.values.any { it.visible && it.zOrder > 1 }) ShellScene(emptyList(), screenDepth = screenDepth) - else ShellScene(shellScene?.layers ?: emptyList(), selections, screenDepth) + val overlaid = surfaces.values.any { it.visible && it.zOrder > 1 } + val sceneLayers = if (overlaid) emptyList() else shellScene?.layers ?: emptyList() + val sceneSelections: List = if (overlaid) emptyList() else selections + // Built per composite, a scene rebuilt its fingerprint and resource lists every time even + // though its inputs (the decoded shell layers, cached placed selections) rarely change. + val previous = lastScene + val scene = if (previous != null && previous.layers === sceneLayers && previous.screenDepth == screenDepth && + sameElements(previous.selections, sceneSelections)) previous + else ShellScene(sceneLayers, sceneSelections, screenDepth) + lastScene = scene val sceneKey = fingerprint.append("|shell:").append(scene.fingerprint).toString() val preview = if (includePreview && (shellScene != null || selections.isNotEmpty())) { previewScene(scene, gray, sceneKey) @@ -727,6 +788,22 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr nextCompositeSeq++, draws.toTypedArray()).also { it.screenGray = gray; it.shellScene = scene } } + private fun placedSelectionsLocked(surface: Surface): List { + if (surface.placedFor !== surface.draws || surface.placedX != surface.x || surface.placedY != surface.y) { + surface.placedSelections = surface.draws.mapNotNull { it.selection?.translated(surface.x, surface.y) } + surface.placedFor = surface.draws + surface.placedX = surface.x + surface.placedY = surface.y + } + return surface.placedSelections + } + + private fun sameElements(a: List, b: List): Boolean { + if (a.size != b.size) return false + for (i in a.indices) if (a[i] !== b[i]) return false + return true + } + private fun blendLocked(gray: ByteArray, surface: Surface): Unit { var srcX: Int = maxOf(0, -surface.x) var srcY: Int = maxOf(0, -surface.y) diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/util/FrameTimingsCore.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/util/FrameTimingsCore.kt index 74ee8e57..ee4e8598 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/util/FrameTimingsCore.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/util/FrameTimingsCore.kt @@ -268,13 +268,16 @@ class FrameTimingsCore( get() = lock.withLock { exportDirty } /** The full export text (does not clear the dirty flag). */ - fun buildExport(): String = lock.withLock { buildExportLocked() } + fun buildExport(): String = formatExport(lock.withLock { exportSnapshotLocked() }) /** The export text if anything changed since the last take, else null; clears the dirty flag. */ - fun takeExport(): String? = lock.withLock { - if (!exportDirty) return null - exportDirty = false - buildExportLocked() + fun takeExport(): String? { + val snapshot = lock.withLock { + if (!exportDirty) return null + exportDirty = false + exportSnapshotLocked() + } + return formatExport(snapshot) } // --------------------------------------------------------------------- @@ -360,30 +363,72 @@ class FrameTimingsCore( ) } - private fun buildExportLocked(): String { + /** + * Frame state as of one moment, formatted into the export text outside the lock. Formatting + * the full export takes tens of milliseconds, and holding the lock for it stalled every + * thread recording a span meanwhile, the main thread included. + */ + private class FrameSnapshot( + val id: Int, + val reason: String, + val startedAtMs: Long, + val startedWallClockMs: Long, + val durationMs: Long, + val open: Boolean, + val outcome: String?, + val subtreeEndAtMs: Long, + val subtreeHasOpenFrame: Boolean, + val lines: List, + val children: List, + ) + + private class ExportSnapshot( + val wallClockMs: Long, + val statsSummary: String, + val slowest: List, + val recent: List, + ) + + private fun snapshotLocked(frame: Frame, now: Long): FrameSnapshot = FrameSnapshot( + frame.id, frame.reason, frame.startedAtMs, frame.startedWallClockMs, frame.durationMs(), frame.isOpen(), + frame.outcome, frame.subtreeEndAtMs(now), frame.subtreeHasOpenFrame(), frame.lines.toList(), + frame.children.map { snapshotLocked(it, now) }, + ) + + private fun exportSnapshotLocked(): ExportSnapshot { val now = platform.elapsedRealtimeMs() + // Stable sort, descending by whole-tree duration (matches Collections.sort). + val treeDurations = HashMap() + for (frame in slowestRoots) treeDurations[frame] = frame.subtreeEndAtMs(now) - frame.startedAtMs + slowestRoots.sortWith(compareByDescending { treeDurations.getValue(it) }) + while (slowestRoots.size > SLOWEST_ROOTS_KEPT) { + slowestRoots.removeAt(slowestRoots.size - 1) + } + return ExportSnapshot( + wallClockMs(), + statsSummaryLocked(), + slowestRoots.map { snapshotLocked(it, now) }, + recentRoots.map { snapshotLocked(it, now) }, + ) + } + + private fun formatExport(snapshot: ExportSnapshot): String { val out = StringBuilder(64 * 1024) - out.append("FrameTimings export at ").append(formatWallClock(wallClockMs())).append('\n') - out.append(statsSummaryLocked()).append('\n') + out.append("FrameTimings export at ").append(formatWallClock(snapshot.wallClockMs)).append('\n') + out.append(snapshot.statsSummary).append('\n') out.append('\n') out.append("Frames are trees: an input event's own frame is the root, and the renders it\n") out.append("caused are indented under it with offsets measured from the root's start.\n") out.append('\n') - // Stable sort, descending by whole-tree duration (matches Collections.sort). - slowestRoots.sortWith(compareByDescending { it.subtreeEndAtMs(now) - it.startedAtMs }) - while (slowestRoots.size > SLOWEST_ROOTS_KEPT) { - slowestRoots.removeAt(slowestRoots.size - 1) - } - out.append("=== slowest frames that reached the glasses ===\n") - for (frame in slowestRoots) { - appendTreeLocked(out, frame, frame, now) + for (frame in snapshot.slowest) { + appendTree(out, frame, frame, 0) } out.append("=== recent frames (oldest first) ===\n") - for (frame in recentRoots) { - appendTreeLocked(out, frame, frame, now) + for (frame in snapshot.recent) { + appendTree(out, frame, frame, 0) } return out.toString() } @@ -416,28 +461,22 @@ class FrameTimingsCore( } /** Print a frame and its descendants, all timed against root's start. */ - private fun appendTreeLocked(out: StringBuilder, frame: Frame, root: Frame, now: Long) { - var depth = 0 - var walk: Frame? = frame - while (walk !== root) { - depth++ - walk = walk!!.parent - } + private fun appendTree(out: StringBuilder, frame: FrameSnapshot, root: FrameSnapshot, depth: Int) { val indent = " ".repeat(depth) val startOffsetMs = frame.startedAtMs - root.startedAtMs out.append(indent).append("frame#").append(frame.id) .append(" [").append(frame.reason).append(']') if (frame === root) { out.append(" started ").append(formatWallClock(frame.startedWallClockMs)) - val totalMs = frame.subtreeEndAtMs(now) - frame.startedAtMs - out.append(" duration ").append(frame.durationMs()).append("ms") + val totalMs = frame.subtreeEndAtMs - frame.startedAtMs + out.append(" duration ").append(frame.durationMs).append("ms") if (frame.children.isNotEmpty()) { out.append(" (tree ").append(totalMs).append("ms") - .append(if (frame.subtreeHasOpenFrame()) ", still open" else "").append(')') + .append(if (frame.subtreeHasOpenFrame) ", still open" else "").append(')') } } else { out.append(" started +").append(startOffsetMs).append("ms") - .append(" duration ").append(if (frame.isOpen()) "open" else (frame.durationMs().toString() + "ms")) + .append(" duration ").append(if (frame.open) "open" else (frame.durationMs.toString() + "ms")) } out.append(" outcome ").append(frame.outcome ?: "(open)").append('\n') for (line in frame.lines) { @@ -445,7 +484,7 @@ class FrameTimingsCore( .append("ms [").append(line.thread).append("] ").append(line.message).append('\n') } for (child in frame.children) { - appendTreeLocked(out, child, root, now) + appendTree(out, child, root, depth + 1) } } } diff --git a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/SharedGraphicsTest.kt b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/SharedGraphicsTest.kt index d2ef7b4a..c477b867 100644 --- a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/SharedGraphicsTest.kt +++ b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/SharedGraphicsTest.kt @@ -97,6 +97,46 @@ class SharedGraphicsTest { assertContentEquals(byteArrayOf(-56, -56, 0, -56, -56, 0), c.composite().gray) } + @Test + fun surfaceIsCurrentOnlyAfterItsContentAndEveryChangeWasComposited() { + val c = SurfaceCompositor() + c.configureScreen(3, 2) + c.configureSurface("app", 0, 0, 3, 2, 0, 0) + assertFalse(c.isSurfaceCurrent("app", "")) + c.applyAndComposite("app", ArrayByteReader(ByteArray(6) { 200.toByte() }), 0, 0, 3, 2, "a") + assertTrue(c.isSurfaceCurrent("app", "a")) + assertFalse(c.isSurfaceCurrent("app", "b")) + assertFalse(c.isSurfaceCurrent("missing", "a")) + // A preview composite is not kept, so it does not apply pending changes. + c.setUnderlayDim(1, 128) + assertFalse(c.isSurfaceCurrent("app", "a")) + c.previewComposite() + assertFalse(c.isSurfaceCurrent("app", "a")) + c.composite() + assertTrue(c.isSurfaceCurrent("app", "a")) + for (change in listOf<() -> Unit>( + { c.configureSurface("app", 1, 0, 3, 2, 0, 0) }, + { c.setSurfaceVisible("app", false) }, + { c.setSurfaceDepth("app", 2) }, + { c.setBlanked(false) }, + { c.removeSurface("other") }, + )) { + change() + assertFalse(c.isSurfaceCurrent("app", "a")) + c.composite() + assertTrue(c.isSurfaceCurrent("app", "a")) + } + // Submitting without compositing retains the content but leaves it unapplied. + c.submitSurface("app", ArrayByteReader(ByteArray(6)), 0, 0, 3, 2, "b") + assertFalse(c.isSurfaceCurrent("app", "b")) + c.composite() + assertTrue(c.isSurfaceCurrent("app", "b")) + // A resize discards the retained content. + c.configureSurface("app", 0, 0, 2, 2, 0, 0) + c.composite() + assertFalse(c.isSurfaceCurrent("app", "b")) + } + @Test fun pngChunksAndPixels() { val png = SharedScreenshots.encode4BitGrayPng(byteArrayOf(0, 16, -1, 32, 48, 64), 3, 2) From 2052e268b0e290bd347e1190bad691f1becad74e Mon Sep 17 00:00:00 2001 From: James Babcock Date: Mon, 28 Sep 2026 02:33:39 -0700 Subject: [PATCH 13/60] Add touch-down event to simulated and watch inputs --- .../com/faceclaw/app/FaceclawWearBridge.kt | 5 +++ app/apps/flappy/flappy-app.worker.ts | 30 ++++++++++------ app/apps/pinball/pinball-app.worker.ts | 15 +++++--- app/g2/dashboard-controller.ts | 12 +++++++ app/g2/ios-preview-controller.ts | 4 ++- app/g2/wear-remote.ts | 12 +++++++ app/native/wear-bridge.ts | 2 ++ app/phone-ui/main-view-model.ts | 13 ++++++- app/phone-ui/phone-gestures.ts | 4 ++- app/ui/gestures.ts | 36 +++++++++++++++++-- app/ui/shell/shell.ts | 6 +++- tests/input-events.test.cjs | 20 +++++++++++ tests/phone-gestures.test.cjs | 23 +++++++----- wear/PROTOCOL.md | 10 +++--- .../kotlin/com/faceclaw/wear/MainActivity.kt | 2 ++ .../kotlin/com/faceclaw/wear/PhoneLink.kt | 19 ++++++++++ .../main/kotlin/com/faceclaw/wear/Protocol.kt | 2 ++ .../com/faceclaw/wear/ui/RemoteScreen.kt | 1 + .../com/faceclaw/wear/ui/TouchpadGestures.kt | 10 +++++- 19 files changed, 191 insertions(+), 35 deletions(-) diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawWearBridge.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawWearBridge.kt index fcccfb04..9c7b6edd 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawWearBridge.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawWearBridge.kt @@ -63,6 +63,8 @@ class FaceclawWearBridge private constructor(context: Context) { const val PATH_STATE_REQUEST = "/faceclaw/state/request" /** Watch -> phone: the watch's own battery; carries no seq and is never acked. */ const val PATH_WATCH_BATTERY = "/faceclaw/battery" + /** Watch -> phone: touch-down ahead of a gesture; carries no seq and is never acked. */ + const val PATH_WATCH_PRESS = "/faceclaw/press" /** Phone -> watch: answered with PATH_WATCH_BATTERY even while the watch app is closed. */ const val PATH_WATCH_BATTERY_REQUEST = "/faceclaw/battery/request" const val PATH_ACK = "/faceclaw/ack" @@ -331,6 +333,9 @@ class FaceclawWearBridge private constructor(context: Context) { // dashboard to receive it, it is simply dropped (the dashboard polls // again when it starts), and the watch does not expect an ack. if (PATH_WATCH_BATTERY == path) return + // A touch-down only matters live; the gesture that follows it gets + // the failure ack below. + if (PATH_WATCH_PRESS == path) return // No JS listener yet: tell the watch so it can explain why nothing is // happening. Only state requests are kept for replay (see class doc); diff --git a/app/apps/flappy/flappy-app.worker.ts b/app/apps/flappy/flappy-app.worker.ts index d880c239..bdfb7c7a 100644 --- a/app/apps/flappy/flappy-app.worker.ts +++ b/app/apps/flappy/flappy-app.worker.ts @@ -17,8 +17,9 @@ * fall back to raster (the planner needs a non-negative origin), which is * small and rare. * - * Controls (a watch swipe in either direction is the primary flap): - * ring-press flaps immediately; watch swipes/clicks also flap. Double-click pauses; + * Controls: a touch-down on the ring or watch pad (ring-press) flaps + * immediately; a click, a watch swipe in either direction or a crown turn + * without one flaps too. Double-click pauses; * tap-then-hold opens the window menu. Ready / paused / game over: click or * a swipe starts or resumes, double-click yields focus. Losing input focus * mid-flight (a shell overlay such as the system menu or a notification, @@ -45,6 +46,7 @@ import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, type InputEvent, + PressTracker, } from "../../ui/gestures"; import { clamp } from "../../util/numeric-util"; import { @@ -153,6 +155,8 @@ type FlappyWindow = { lastMinorSfxAtMs: number; soundOn: boolean; lastSubmittedFingerprint: string; + /** Which gestures already flapped on their ring-press. */ + presses: PressTracker; }; const windows = new Map(); @@ -210,6 +214,7 @@ global.onmessage = (event: { data: WorkerAppMessage }) => { lastMinorSfxAtMs: 0, soundOn: loadSoundEnabled("flappy"), lastSubmittedFingerprint: "", + presses: new PressTracker(), }; resetGame(window); windows.set(message.windowId, window); @@ -374,6 +379,7 @@ function windowMenu(window: FlappyWindow): WindowMenu { // --- Input ------------------------------------------------------------------ function handleInput(window: FlappyWindow, event: InputEvent, frameId: number): void { + const followsPress = window.presses.followsPress(event); // An open window menu owns all input (it closes itself via pop); menus are // list UIs, so watch swipes take their standard fallback meanings there. if (window.menu?.isOpen()) { @@ -398,7 +404,7 @@ function handleInput(window: FlappyWindow, event: InputEvent, frameId: number): switch (window.phase) { case "ready": case "playing": - handleFlightInput(window, event, frameId); + handleFlightInput(window, event, frameId, followsPress); break; case "dying": // Let the tumble finish; a flap mashed during it must not restart. @@ -410,22 +416,24 @@ function handleInput(window: FlappyWindow, event: InputEvent, frameId: number): } } -/** Input while ready or flying: the flap gestures, plus pause. */ -function handleFlightInput(window: FlappyWindow, event: InputEvent, frameId: number): void { +/** + * Input while ready or flying: the flap gestures, plus pause. `followsPress` + * marks a gesture whose touch-down already flapped (see PressTracker). + */ +function handleFlightInput(window: FlappyWindow, event: InputEvent, frameId: number, followsPress: boolean): void { switch (event.type) { + case "ring-press": + flap(window); + break; // Either swipe direction flaps: on the watch the flap is a reflex, and // which way the thumb went shouldn't matter. case "swipe-up": case "swipe-down": - case "ring-press": - flap(window); - break; case "click": - // The ring already flapped on down; its later click must not flap again. - if (event.source !== "ring") flap(window); + if (!followsPress) flap(window); break; case "scroll-up": - if (event.source === "watch") flap(window); + if (event.source === "watch" && !followsPress) flap(window); break; case "double-click": if (window.phase === "playing") { diff --git a/app/apps/pinball/pinball-app.worker.ts b/app/apps/pinball/pinball-app.worker.ts index 80c4b1b4..30df48ed 100644 --- a/app/apps/pinball/pinball-app.worker.ts +++ b/app/apps/pinball/pinball-app.worker.ts @@ -12,7 +12,8 @@ * keep the BLE payload down to the dirty region around the ball. * * Controls (ball ready): scroll sets launch power, click launches. In play: - * ring-press flips both flippers for 300 ms; click launches from the plunger, + * a touch-down (ring-press) flips both flippers for 300 ms, as does a click + * without one; click launches from the plunger, * double-click pauses. Swipes no longer trigger individual flippers; * up/down raise and lower launch power at the plunger. * Paused/game over: click resumes or starts a new game, double-click yields @@ -42,6 +43,7 @@ import { GESTURE_DOUBLE_CLICK, GESTURE_SCROLL, type InputEvent, + PressTracker, } from "../../ui/gestures"; import { clamp } from "../../util/numeric-util"; @@ -273,6 +275,8 @@ type PinballWindow = { lastMinorSfxAtMs: number; soundOn: boolean; lastSubmittedFingerprint: string; + /** Which gestures already flipped on their ring-press. */ + presses: PressTracker; }; const windows = new Map(); @@ -336,6 +340,7 @@ global.onmessage = (event: { data: WorkerAppMessage }) => { lastMinorSfxAtMs: 0, soundOn: loadSoundEnabled("pinball"), lastSubmittedFingerprint: "", + presses: new PressTracker(), }; windows.set(message.windowId, window); break; @@ -491,6 +496,7 @@ function windowMenu(window: PinballWindow): WindowMenu { } function handleInput(window: PinballWindow, event: InputEvent, frameId: number): void { + const followsPress = window.presses.followsPress(event); // An open window menu owns all input (it closes itself via pop); menus are // list UIs, so watch swipes take their standard fallback meanings there. if (window.menu?.isOpen()) { @@ -502,13 +508,14 @@ function handleInput(window: PinballWindow, event: InputEvent, frameId: number): } if (window.phase === "playing") { - handlePlayingInput(window, event, frameId); + handlePlayingInput(window, event, frameId, followsPress); } else { handleIdleInput(window, event, frameId); } } -function handlePlayingInput(window: PinballWindow, event: InputEvent, frameId: number): void { +/** `followsPress` marks a gesture whose touch-down already flipped (see PressTracker). */ +function handlePlayingInput(window: PinballWindow, event: InputEvent, frameId: number, followsPress: boolean): void { const ready = window.ballState === "ready"; switch (event.type) { case "scroll-up": @@ -539,7 +546,7 @@ function handlePlayingInput(window: PinballWindow, event: InputEvent, frameId: n case "click": if (ready) { launchBall(window); - } else if (event.source !== "ring") { + } else if (!followsPress) { flip(window, window.flippers[0]!); flip(window, window.flippers[1]!); } diff --git a/app/g2/dashboard-controller.ts b/app/g2/dashboard-controller.ts index e74a24b0..a4aa4c06 100644 --- a/app/g2/dashboard-controller.ts +++ b/app/g2/dashboard-controller.ts @@ -1838,6 +1838,8 @@ class DashboardController { * test buttons, the watch). "long-press" is a complete short hold; * "long-press-start" / "long-press-release" let a source with a real * finger-down/finger-up (the watch) hold for as long as the user does. + * Such a source also sends "ring-press" at each finger-down, as the ring + * does before it knows which gesture the touch will become. */ async injectSyntheticRingInput(kind: WearRemoteInputKind, origin: SyntheticInputOrigin = "ring"): Promise { // Match the ring while the display is dark: a double-click wakes it @@ -2831,6 +2833,7 @@ class DashboardController { private buildSyntheticRingInput( kind: + | "ring-press" | "click" | "double-click" | "scroll-up" @@ -2879,6 +2882,15 @@ class DashboardController { systemExitReasonCode: 0, frameId, }; + case "ring-press": + return { + kind: "sys-event", + containerName: "", + eventType: OsEventTypeList.RING_PRESS_EVENT, + eventSource, + systemExitReasonCode: 0, + frameId, + }; case "long-press": return { kind: "sys-event", diff --git a/app/g2/ios-preview-controller.ts b/app/g2/ios-preview-controller.ts index 6cb89bf3..617ca2c6 100644 --- a/app/g2/ios-preview-controller.ts +++ b/app/g2/ios-preview-controller.ts @@ -490,10 +490,12 @@ export class IosPreviewController { gesture(gesture: PhoneGesture, origin: 'watch' | 'ring' | 'mirror', nx = 0, ny = 0): void { this.inputQueue = this.inputQueue.then(async () => { if (!this.active) return + // A mirror tap may land on a hit target rather than being a gesture. + if (gesture === 'press' && origin === 'mirror') return if (gesture === 'tap' && origin === 'mirror' && shell.isScreenOn() && !this.glassesLocked) { await this.mirrorTap(nx, ny) } else { - let type: string = ({ tap: 'click', 'double-tap': 'double-click' } as Record)[gesture] ?? gesture + let type: string = ({ press: 'ring-press', tap: 'click', 'double-tap': 'double-click' } as Record)[gesture] ?? gesture if (origin === 'ring' && type.startsWith('swipe-')) { if (type === 'swipe-left' || type === 'swipe-right') return type = type === 'swipe-up' ? 'scroll-up' : 'scroll-down' diff --git a/app/g2/wear-remote.ts b/app/g2/wear-remote.ts index 4e5a464d..84e04dee 100644 --- a/app/g2/wear-remote.ts +++ b/app/g2/wear-remote.ts @@ -43,6 +43,8 @@ import { FACECLAW_VERSION } from "../version"; export const WEAR_PROTOCOL_VERSION = 1; export type WearRemoteInputKind = + /** Touch-down at the start of any pad gesture; arrives on its own path (see handleMessage). */ + | "ring-press" | "click" | "double-click" | "scroll-up" @@ -309,6 +311,16 @@ export class WearRemote { this.setWatchBattery(valid ? battery : null, valid ? message.payload.charging === true : null); return; } + if (message.path === WEAR_PATHS.press) { + // Touch-down ahead of the gesture that follows it. Fire-and-forget like + // the battery (no seq, never acked): wherever that gesture would be + // refused, the press is dropped silently and the gesture's ack says why. + const phase = this.host.getState().phase; + if (watchRemoteEnabledSetting.get() && (phase === "connected" || phase === "charging")) { + await this.host.injectInput("ring-press"); + } + return; + } if (!watchRemoteEnabledSetting.get()) { ack(false, "Watch control is turned off in Faceclaw's Settings > Watch."); return; diff --git a/app/native/wear-bridge.ts b/app/native/wear-bridge.ts index 6a4e7ca2..c11c55ae 100644 --- a/app/native/wear-bridge.ts +++ b/app/native/wear-bridge.ts @@ -16,6 +16,8 @@ declare const com: any; export const WEAR_PATHS = { /** Watch -> phone: a ring-style gesture. */ input: "/faceclaw/input", + /** Watch -> phone: a finger landed on the pad (the ring-press ahead of a gesture); never acked. */ + press: "/faceclaw/press", /** Watch -> phone: a shell command (launch app, wake, lock, ...). */ command: "/faceclaw/command", /** Watch -> phone: a text query for the assistant. */ diff --git a/app/phone-ui/main-view-model.ts b/app/phone-ui/main-view-model.ts index 04bdc9f3..a413f432 100644 --- a/app/phone-ui/main-view-model.ts +++ b/app/phone-ui/main-view-model.ts @@ -1057,6 +1057,9 @@ export class MainViewModel extends RemoteControlsViewModel { // and the finger-up sends the release, so a hold really holds (the // Glanceboard stays up until the finger lifts). The firmware sends the // same release after a tap-then-hold, so that pair gets one too. + // + // Every finger-down (the second tap of a pair included) first sends a + // ring-press, as the ring does before it knows what the touch will become. private ringPadDoubleTapPending = false; private ringPadHeld = false; @@ -1077,6 +1080,10 @@ export class MainViewModel extends RemoteControlsViewModel { } async onRingPadTouch(args: TouchGestureEventData): Promise { + if (args.action === "down" && args.getPointerCount() === 1) { + await dashboardController.injectSyntheticRingInput("ring-press"); + return; + } if (args.action !== "up" && args.action !== "cancel") return; const pending = this.ringPadDoubleTapPending; this.ringPadDoubleTapPending = false; @@ -1148,11 +1155,15 @@ export class MainViewModel extends RemoteControlsViewModel { this.refreshPadFocusLine(); } - /** Two fingers down and up without moving: back (the watch's two-finger tap). */ + /** + * The first finger down sends a ring-press, as the watch pad does. Two + * fingers down and up without moving: back (the watch's two-finger tap). + */ async onPadTouch(args: TouchGestureEventData): Promise { const count = args.getPointerCount(); if (args.action === "down" || args.action === "move") { if (count >= 2) this.padTwoFingerDown = true; + else if (args.action === "down") await dashboardController.injectSyntheticRingInput("ring-press", "watch"); return; } if (args.action === "up" || args.action === "cancel") { diff --git a/app/phone-ui/phone-gestures.ts b/app/phone-ui/phone-gestures.ts index bdc74ae9..ae67286d 100644 --- a/app/phone-ui/phone-gestures.ts +++ b/app/phone-ui/phone-gestures.ts @@ -1,7 +1,8 @@ /** One touch recognizer for a phone pad or mirror. Coordinates are in DIP. */ declare function setTimeout(callback: () => void, ms: number): number declare function clearTimeout(id: number): void -export type PhoneGesture = 'tap' | 'double-tap' | 'long-press' | 'long-press-release' +/** 'press' is every first-finger touch-down, ahead of whatever gesture it becomes (the ring's ring-press). */ +export type PhoneGesture = 'press' | 'tap' | 'double-tap' | 'long-press' | 'long-press-release' | 'short-then-long-press' | 'swipe-up' | 'swipe-down' | 'swipe-left' | 'swipe-right' export type PhoneTouch = { action: 'down' | 'move' | 'up' | 'cancel'; x: number; y: number; pointers: number } export type GestureClock = { set: (callback: () => void, ms: number) => unknown; clear: (id: unknown) => void } @@ -27,6 +28,7 @@ export class PhoneGestureRecognizer { this.secondTap = !!this.lastTap && Math.hypot(event.x - this.lastTap.x, event.y - this.lastTap.y) < 36 if (this.secondTap) { this.clearTap() } else if (this.lastTap) { const tap = this.lastTap; this.clearTap(); this.emit('tap', tap.x, tap.y) } + this.emit('press', event.x, event.y) this.hold = this.timer.set(() => { this.hold = null if (!this.start || this.moved || this.multi) return diff --git a/app/ui/gestures.ts b/app/ui/gestures.ts index 17e0f8c3..047ebc1b 100644 --- a/app/ui/gestures.ts +++ b/app/ui/gestures.ts @@ -22,8 +22,14 @@ export type BaseInputEvent = { /** The per-type part of InputEvent; makeInputEvent adds the BaseInputEvent fields. */ export type InputEventPayload = - /** Raw ring touch-down; a later interpreted gesture may follow. */ - | { type: "ring-press"; source: "ring" } + /** + * Raw touch-down at the start of a touch gesture, before it is known + * whether it becomes a tap, scroll, double tap or hold; a later interpreted + * gesture may follow. Sent by the ring and by the watch's touchpad (and the + * phone's stand-ins for both). Sources without a touch-down (the glasses' + * arms, the watch crown or finger-pinch taps) never send one. + */ + | { type: "ring-press"; source: "ring" | "watch" } | { type: "click"; source: InputSource } | { type: "double-click"; source: InputSource } /** Ring scroll (or a watch crown turn, then tagged source "watch"). */ @@ -79,6 +85,32 @@ export function isWatchInput(event: InputEvent): boolean { return "source" in event && event.source === "watch"; } +/** + * Pairs each gesture with the ring-press that began it, for components that + * act on touch-down (a flap, a flip) and must not act a second time on the + * gesture that follows. Feed it every input event. Input with no touch-down + * of its own (the arms, the watch crown or finger-pinch taps, an older watch + * app) never follows a press, so it still acts. + */ +export class PressTracker { + private pressedSource: InputSource | null = null; + + /** True when `event` is the gesture a ring-press from the same source already announced. */ + followsPress(event: InputEvent): boolean { + if (event.type === "ring-press") { + this.pressedSource = event.source; + return false; + } + const pressed = this.pressedSource; + this.pressedSource = null; + if (pressed === null) return false; + // Stock ring scroll notifications usually omit their source. + const scroll = event.type === "scroll-up" || event.type === "scroll-down"; + const source = ("source" in event ? event.source : undefined) ?? (scroll ? "ring" : null); + return source === pressed; + } +} + export type DirectionalInputEvent = Extract< InputEvent, { type: "swipe-up" | "swipe-down" | "swipe-left" | "swipe-right" } diff --git a/app/ui/shell/shell.ts b/app/ui/shell/shell.ts index 1db2d922..1eeb5243 100644 --- a/app/ui/shell/shell.ts +++ b/app/ui/shell/shell.ts @@ -1569,6 +1569,10 @@ function rawInputEventToPayload(event: RawInputEvent): InputEventPayload { // The firmware emits this dedicated ID only for full raw source 4. // Its stock sender leaves the source unspecified for extension 14. return { type: "ring-press", source: "ring" }; + } else if (event.eventType === OsEventTypeList.RING_PRESS_EVENT && + event.eventSource === EventSourceType.TOUCH_EVENT_FROM_WATCH) { + // Synthetic: the watch pad's (or the phone's watch pad's) touch-down. + return { type: "ring-press", source: "watch" }; } else if (event.eventType === OsEventTypeList.CLICK_EVENT) { return { type: "click", @@ -1656,7 +1660,7 @@ function eventSourceToString(eventSource: number): InputSource { export function inputEventToString(event: InputEvent): string { switch (event.type) { case "ring-press": - return "Ring press"; + return `Press from ${event.source}`; case "click": return `Click from ${event.source}`; case "double-click": diff --git a/tests/input-events.test.cjs b/tests/input-events.test.cjs index 41735ccb..5ced69bf 100644 --- a/tests/input-events.test.cjs +++ b/tests/input-events.test.cjs @@ -40,6 +40,9 @@ test('new SysEvent decodes independently of click, double-tap, hold and release' const decoded = d.rawInputEventToPayload({ kind: 'sys-event', eventType: 14, eventSource: source }); assert.equal(decoded.type, 'ring-press'); assert.equal(decoded.source, 'ring'); } + // Synthetic watch touch-down (TOUCH_EVENT_FROM_WATCH, never sent by firmware). + const watch = d.rawInputEventToPayload({ kind: 'sys-event', eventType: 14, eventSource: 4 }); + assert.equal(watch.type, 'ring-press'); assert.equal(watch.source, 'watch'); for (const source of [1, 3, 99, undefined]) { assert.equal(d.rawInputEventToPayload({ kind: 'sys-event', eventType: 14, eventSource: source }).type, 'unknown'); } @@ -192,3 +195,20 @@ test('debug history retains both clocks and uses unsigned gaps across counter wr assert.equal(log.entries[0].filtered,true); log.clear(); log.add(ring(1,500)); assert.equal(log.entries[0].ringGapTicks,null); }); + +test('PressTracker pairs each gesture with the touch-down that began it', () => { + const { PressTracker } = load('app/ui/gestures.ts'); + const t = new PressTracker(); + const ev = (type, source) => ({ type, source, timestampMs: 0 }); + assert.equal(t.followsPress(ev('ring-press', 'watch')), false); + assert.equal(t.followsPress(ev('click', 'watch')), true); + // Input with no touch-down of its own (finger-pinch tap, crown, older watch app) still acts. + assert.equal(t.followsPress(ev('click', 'watch')), false); + // A press pairs only with the next event, and only from its own source. + t.followsPress(ev('ring-press', 'watch')); + assert.equal(t.followsPress(ev('click', 'left-arm')), false); + assert.equal(t.followsPress(ev('click', 'watch')), false); + // Stock ring scroll notifications omit their source. + t.followsPress(ev('ring-press', 'ring')); + assert.equal(t.followsPress({ type: 'scroll-up', timestampMs: 0 }), true); +}); diff --git a/tests/phone-gestures.test.cjs b/tests/phone-gestures.test.cjs index cc90129f..22088d54 100644 --- a/tests/phone-gestures.test.cjs +++ b/tests/phone-gestures.test.cjs @@ -20,37 +20,42 @@ function setup() { } test('single tap retains mirror coordinates and waits to disambiguate double tap', () => { const s = setup(); s.touch('down'); s.touch('up'); - assert.deepEqual(s.types(), []); s.advance(280); - assert.deepEqual(s.events, [{ type: 'tap', x: 20, y: 30 }]); + assert.deepEqual(s.types(), ['press']); s.advance(280); + assert.deepEqual(s.events, [{ type: 'press', x: 20, y: 30 }, { type: 'tap', x: 20, y: 30 }]); +}); +test('every first-finger touch-down presses; a far second touch flushes the pending tap first', () => { + const s = setup(); s.touch('down'); s.touch('up'); s.advance(100); + s.touch('down', 200, 30); s.touch('down', 201, 30, 2); s.touch('up', 201, 30, 2); s.touch('up', 200, 30); s.advance(1000); + assert.deepEqual(s.types(), ['press', 'tap', 'press', 'double-tap']); }); test('double tap emits back without accidental selection', () => { const s = setup(); s.touch('down'); s.touch('up'); s.advance(150); s.touch('down'); s.touch('up'); s.advance(1000); - assert.deepEqual(s.types(), ['double-tap']); + assert.deepEqual(s.types(), ['press', 'press', 'double-tap']); }); test('a hold emits a press and release, never a tap', () => { const s = setup(); s.touch('down'); s.advance(500); s.touch('up'); s.advance(1000); - assert.deepEqual(s.types(), ['long-press', 'long-press-release']); + assert.deepEqual(s.types(), ['press', 'long-press', 'long-press-release']); }); test('tap then hold emits the app-menu gesture without an earlier selection', () => { const s = setup(); s.touch('down'); s.touch('up'); s.advance(100); s.touch('down'); s.advance(500); s.touch('up'); s.advance(1000); - assert.deepEqual(s.types(), ['short-then-long-press', 'long-press-release']); + assert.deepEqual(s.types(), ['press', 'press', 'short-then-long-press', 'long-press-release']); }); test('four directional swipes cancel pending holds and taps', () => { for (const [x, y, expected] of [[80, 30, 'swipe-right'], [-40, 30, 'swipe-left'], [20, 90, 'swipe-down'], [20, -30, 'swipe-up']]) { const s = setup(); s.touch('down'); s.touch('move', x, y); s.advance(500); s.touch('up', x, y); s.advance(500); - assert.deepEqual(s.types(), [expected]); + assert.deepEqual(s.types(), ['press', expected]); } }); test('two fingers send back exactly once and cancel the long-press timer', () => { const s = setup(); s.touch('down'); s.touch('down', 21, 30, 2); s.advance(500); s.touch('up', 21, 30, 2); s.touch('up'); s.advance(1000); - assert.deepEqual(s.types(), ['double-tap']); + assert.deepEqual(s.types(), ['press', 'double-tap']); }); test('cancellation prevents delayed selections and releases active holds', () => { const s = setup(); s.touch('down'); s.touch('up'); s.r.cancel(); s.advance(1000); - assert.deepEqual(s.types(), []); + assert.deepEqual(s.types(), ['press']); s.touch('down'); s.advance(500); s.touch('cancel'); s.advance(1000); - assert.deepEqual(s.types(), ['long-press', 'long-press-release']); + assert.deepEqual(s.types(), ['press', 'press', 'long-press', 'long-press-release']); }); diff --git a/wear/PROTOCOL.md b/wear/PROTOCOL.md index fba306c9..c1e3b832 100644 --- a/wear/PROTOCOL.md +++ b/wear/PROTOCOL.md @@ -11,22 +11,24 @@ Capabilities (`res/values/wear.xml` on each side): the phone advertises `faceclaw_phone`, the watch `faceclaw_watch`. Each side finds the other with `CapabilityClient.getCapability(…, FILTER_REACHABLE)`. -Every watch → phone message except `/faceclaw/battery` carries `seq` -(monotonic per watch process) and is answered on `/faceclaw/ack`. +Every watch → phone message except `/faceclaw/battery` and `/faceclaw/press` +carries `seq` (monotonic per watch process) and is answered on `/faceclaw/ack`. ## Watch → phone (MessageClient) | Path | Payload | Effect | | --- | --- | --- | | `/faceclaw/input` | `{gesture, steps?}` | A ring gesture through the same path as the phone UI's test buttons. `gesture` ∈ `click`, `double-click`, `scroll-up`, `scroll-down`, `long-press` (complete short hold), `long-press-start`, `long-press-release`, `short-then-long-press` (tap then hold: the app's context menu; a plain `long-press` is the glasses' system menu), `wakeword` ("Hey Even"), `swipe-up`, `swipe-down`, `swipe-left`, `swipe-right` (spatial input only a watch can produce: delivered to the glasses UI as `swipe-*` events for components that navigate spatially — launcher grid, settings columns, sidebar, Music — with a scroll / click / double-click fallback elsewhere). `steps` (1–12) repeats a scroll. Refused while the glasses are disconnected. The lock screen is honoured exactly as for the ring. While the display is off, a double-click wakes the display, a `click` shows the phone's Glanceboard for a few seconds, and `long-press-start`/`long-press-release` hold it up; everything else is ignored. | +| `/faceclaw/press` | none | A finger landed on the pad (each first-finger touch-down, the second tap of a double-tap included) or the stem button went down: delivered on the glasses as a `ring-press` from source `watch`, exactly like the R1 ring's touch-down, ahead of whatever gesture the touch becomes (which is still sent on `/faceclaw/input`). Components that act on touch-down (Flappy, Pinball) then ignore the gesture that follows. Sent only while the mirrored state says the glasses are connected with the display on. Carries no `seq` and is never acked; the phone drops it silently wherever the following gesture would be refused. | | `/faceclaw/command` | `{command, …}` | `launch-app {appId}`, `focus-window {windowId}`, `close-window {windowId}`, `sidebar`, `wake`, `sleep`, `lock`, `unlock`, `connect`, `disconnect`, `close-assistant`, `display-mode {value}` (`value` ∈ `576x288`, `576x480`, `640x480`; sets the phone's Display > Display mode). Everything but connect/disconnect needs a connection; everything but lock/unlock is refused while locked; `unlock` also needs the phone's "Watch can unlock glasses" setting. | | `/faceclaw/assistant` | `{text}` | Send a query to the assistant (`shell.sendToAssistant`) — the reply shows on the glasses and streams back to the watch as events. | | `/faceclaw/text` | `{text}` | Type text into the foreground window (`receiveTextInput`, e.g. the terminal). Refused when the window doesn't take text. | | `/faceclaw/state/request` | `{}` | Re-publish the state item even if unchanged. | | `/faceclaw/battery` | `{battery, charging}` | The watch's own battery (`battery` 0–100 or null, `charging` bool) for the glasses' top-bar and Glanceboard "Watch" indicator. Sent in answer to `/faceclaw/battery/request` by `PhoneListenerService` (which Play services starts even while the watch app is closed) and, while the app is open, whenever the level or charging state changes. Carries no `seq` and is never acked. | -All of the above except `state/request` and `battery` are refused with -`ok:false` when the phone's "Watch remote control" setting is off. +All of the above except `state/request`, `battery` and `press` are refused +with `ok:false` when the phone's "Watch remote control" setting is off (a +`press` is just dropped). ## Phone → watch diff --git a/wear/app/src/main/kotlin/com/faceclaw/wear/MainActivity.kt b/wear/app/src/main/kotlin/com/faceclaw/wear/MainActivity.kt index 98b88121..ff19408e 100644 --- a/wear/app/src/main/kotlin/com/faceclaw/wear/MainActivity.kt +++ b/wear/app/src/main/kotlin/com/faceclaw/wear/MainActivity.kt @@ -142,6 +142,8 @@ class MainActivity : ComponentActivity() { // A dark display takes the stem too: a press shows the // phone's Glanceboard, a hold keeps it up until release. stemOneIgnored = false + // Key-down is the stem's touch-down, as on the pad. + link.sendPress() val runnable = Runnable { stemHoldSent = true haptics.heavy() diff --git a/wear/app/src/main/kotlin/com/faceclaw/wear/PhoneLink.kt b/wear/app/src/main/kotlin/com/faceclaw/wear/PhoneLink.kt index bcd635eb..1bfa1213 100644 --- a/wear/app/src/main/kotlin/com/faceclaw/wear/PhoneLink.kt +++ b/wear/app/src/main/kotlin/com/faceclaw/wear/PhoneLink.kt @@ -176,6 +176,25 @@ class PhoneLink(context: Context) : send(Protocol.PATH_INPUT, JSONObject().put("gesture", gesture.wire).put("steps", steps)) } + /** + * A finger landed: the phone delivers it as the ring's touch-down + * (ring-press) ahead of whatever gesture the touch becomes. Fire-and-forget + * and silent, since the gesture that follows reports any failure; skipped + * unless the glasses are showing something for it to act on. + */ + fun sendPress() { + if (state.value?.let { it.connected && it.screenOn } != true) return + val nodeId = _link.value.phoneNodeId ?: return + if (!_link.value.phoneAppInstalled) return + Log.d(TAG, "send ${Protocol.PATH_PRESS}") + try { + messageClient.sendMessage(nodeId, Protocol.PATH_PRESS, ByteArray(0)) + .addOnFailureListener { error -> Log.w(TAG, "press failed", error) } + } catch (error: Exception) { + Log.w(TAG, "press failed", error) + } + } + fun sendCommand(command: String, vararg extras: Pair) { val body = JSONObject().put("command", command) for ((key, value) in extras) body.put(key, value) diff --git a/wear/app/src/main/kotlin/com/faceclaw/wear/Protocol.kt b/wear/app/src/main/kotlin/com/faceclaw/wear/Protocol.kt index b8a69790..0c9b8964 100644 --- a/wear/app/src/main/kotlin/com/faceclaw/wear/Protocol.kt +++ b/wear/app/src/main/kotlin/com/faceclaw/wear/Protocol.kt @@ -11,6 +11,8 @@ object Protocol { const val CAPABILITY_PHONE = "faceclaw_phone" const val PATH_INPUT = "/faceclaw/input" + /** Watch -> phone: a finger landed on the pad, ahead of the gesture it becomes; no seq, never acked. */ + const val PATH_PRESS = "/faceclaw/press" const val PATH_COMMAND = "/faceclaw/command" const val PATH_ASSISTANT = "/faceclaw/assistant" const val PATH_TEXT = "/faceclaw/text" diff --git a/wear/app/src/main/kotlin/com/faceclaw/wear/ui/RemoteScreen.kt b/wear/app/src/main/kotlin/com/faceclaw/wear/ui/RemoteScreen.kt index 3f637f5f..4186c6f1 100644 --- a/wear/app/src/main/kotlin/com/faceclaw/wear/ui/RemoteScreen.kt +++ b/wear/app/src/main/kotlin/com/faceclaw/wear/ui/RemoteScreen.kt @@ -179,6 +179,7 @@ fun RemoteScreen( val callbacks = remember(link, haptics) { TouchpadCallbacks( + onPress = { link.sendPress() }, onTap = { _ -> click() }, onDoubleTap = { _ -> doubleClick() }, onShortThenLongPress = { diff --git a/wear/app/src/main/kotlin/com/faceclaw/wear/ui/TouchpadGestures.kt b/wear/app/src/main/kotlin/com/faceclaw/wear/ui/TouchpadGestures.kt index 7cf837e4..a343b90d 100644 --- a/wear/app/src/main/kotlin/com/faceclaw/wear/ui/TouchpadGestures.kt +++ b/wear/app/src/main/kotlin/com/faceclaw/wear/ui/TouchpadGestures.kt @@ -12,6 +12,11 @@ import kotlin.math.abs /** What the remote's touch surface can report. */ class TouchpadCallbacks( + /** + * A finger landed (each first finger down, the second tap of a pair + * included), before it is known what the touch will become. + */ + val onPress: () -> Unit, val onTap: (position: Offset) -> Unit, val onDoubleTap: (position: Offset) -> Unit, /** A tap whose immediate second press was held: the G2 tap-then-hold gesture. */ @@ -65,7 +70,8 @@ class PendingTap { * once: tap, double-tap (a second tap inside the double-tap timeout), a hold * (reported at the long-press timeout and again on release), tap-then-hold (a * second tap held past the long-press timeout), a swipe, and a two-finger tap - * or swipe. Written as a single awaitEachGesture loop because the stock + * or swipe; each finger-down is also reported as it lands (a press), before + * any of those is known. Written as a single awaitEachGesture loop because the stock * detectors would each claim the same finger. A press that pairs with * [pendingTap] skips straight to the second-tap handling. */ @@ -77,6 +83,7 @@ suspend fun PointerInputScope.detectTouchpadGestures(callbacks: TouchpadCallback awaitEachGesture { val down = awaitFirstDown() down.consume() + callbacks.onPress() val downTime = down.uptimeMillis if (pendingTap.claim(downTime)) { secondTap(callbacks, longPressTimeout, down.position, down) @@ -139,6 +146,7 @@ suspend fun PointerInputScope.detectTouchpadGestures(callbacks: TouchpadCallback if (second == null) { callbacks.onTap(down.position) } else { + callbacks.onPress() secondTap(callbacks, longPressTimeout, down.position, second) } } From deaa93fead38af6e4cb45123a675278c48f4c076 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Mon, 28 Sep 2026 12:04:15 -0700 Subject: [PATCH 14/60] Wake the screen on wear faster after charging --- app/g2/dashboard-controller.ts | 39 ++++++++++++++++--- app/native/faceclaw-communicator.ts | 5 +++ .../g2protocol/session/GlassesSessionCore.kt | 16 ++++++++ .../g2protocol/session/GlassesSessionSend.kt | 18 +++++++-- .../com/faceclaw/wear/ui/StatusScreen.kt | 2 +- 5 files changed, 71 insertions(+), 9 deletions(-) diff --git a/app/g2/dashboard-controller.ts b/app/g2/dashboard-controller.ts index a4aa4c06..d07b9699 100644 --- a/app/g2/dashboard-controller.ts +++ b/app/g2/dashboard-controller.ts @@ -291,6 +291,8 @@ class DashboardController { private customFirmwareConfirmed = false; private faceclawWakeLeaseState: boolean | null = null; private glassesWorn: boolean | null = null; + /** Put on while charging: Java reconnects on that, and the wake waits for the new session. */ + private wakeAfterChargingReconnect = false; private phoneLocked = false; private glassesLocked = false; // Wear OS watch remote; constructed last so it sees a fully wired shell. @@ -654,7 +656,16 @@ class DashboardController { if (!wearing && this.phoneLocked && lockScreenEnabledSetting.get()) { this.setGlassesLocked(true, "glasses removed while phone locked"); } - if (putOn) this.wakeForGlassesPutOn(); + if (!wearing) this.wakeAfterChargingReconnect = false; + if (putOn && this.phase === "charging") { + // They can't be worn in the case, so charging is over even though no + // battery poll has said so yet. Java reconnects on this same report + // (the wake barrier needs the rebuilt session), so wake after that. + this.wakeAfterChargingReconnect = true; + this.appendLog("glasses put on while charging; waking after reconnect"); + } else if (putOn) { + this.wakeForGlassesPutOn(); + } } /** @@ -669,6 +680,16 @@ class DashboardController { if (shell.wake("sidebar")) this.appendLog("screen woken: glasses put on"); } + /** + * Finish a put-on that arrived while charging. Each arm reports "connected" + * as it links, before the prelude; the ready session reports it again. + */ + private maybeWakeAfterChargingReconnect(): void { + if (!this.wakeAfterChargingReconnect || !this.communicator?.isSessionReady()) return; + this.wakeAfterChargingReconnect = false; + this.wakeForGlassesPutOn(); + } + private handlePhoneLockState(locked: boolean): void { if (locked === this.phoneLocked) return; this.phoneLocked = locked; @@ -692,10 +713,13 @@ class DashboardController { private ensureWearStateTracking(): void { const communicator = this.communicator; + // Charging counts: a session that starts in the case (firmware confirmed + // only after charging mode began) needs the OFF_HEAD snapshot so that + // putting the glasses on registers as a put-on. if ( !lockScreenEnabledSetting.get() || !this.customFirmwareConfirmed || - this.phase !== "connected" || + (this.phase !== "connected" && this.phase !== "charging") || !communicator ) { return; @@ -1358,6 +1382,7 @@ class DashboardController { this.welcomeSoundArmed = isWelcomeSoundPending(); this.firmwareWarningMessage = ""; this.glassesWorn = null; + this.wakeAfterChargingReconnect = false; this.glassesLocked = false; this.refreshBatteryOptimizationStatus(); this.refreshEvenAppStatus(); @@ -1434,13 +1459,16 @@ class DashboardController { this.pushFirmwareDebugFlags(); this.pushBrightness(true); } - if (mappedPhase !== "connected") { + if (mappedPhase !== "connected" && mappedPhase !== "charging") { // A wear snapshot is session-scoped. CFW reports a fresh value when // the transport comes back, so do not make lock decisions from a - // stale pre-disconnect value in the meantime. + // stale pre-disconnect value in the meantime. Charging keeps the + // link (and the value), so putting the glasses on registers. this.glassesWorn = null; updateGlassesPresence({ worn: null }); - // The mic enable was session-scoped too: park any live capture so + } + if (mappedPhase !== "connected") { + // The mic enable was session-scoped: park any live capture so // the next session restarts it, instead of leaving a holder that // makes every later request think the mic is already running. voiceControlBridge.handleSessionEnded(); @@ -1450,6 +1478,7 @@ class DashboardController { if (mappedPhase === "connected") { this.syncEvenHubScreenOffSetting(); this.ensureWearStateTracking(); + this.maybeWakeAfterChargingReconnect(); } else if (mappedPhase !== "charging") { this.cancelEvenHubSuspendTimer(); this.evenHubSessionSuspended = false; diff --git a/app/native/faceclaw-communicator.ts b/app/native/faceclaw-communicator.ts index ced591d5..0f8c2771 100644 --- a/app/native/faceclaw-communicator.ts +++ b/app/native/faceclaw-communicator.ts @@ -471,6 +471,11 @@ export class FaceclawCommunicatorBridge { await this.enqueueJavaCall(() => this.communicator.enableWearDetectionAndRequestState()); } + /** Whether the transport prelude has finished (each arm reports "connected" before it). */ + isSessionReady(): boolean { + return Boolean(this.communicator.isSessionReady()); + } + /** Set the compositor's output frame size. Call before configuring surfaces. */ async configureCompositorScreen(width: number, height: number): Promise { await this.enqueueJavaCall(() => { diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt index 9aa9a098..f0822e98 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt @@ -1364,10 +1364,15 @@ class GlassesSessionCore( else null var emitWearState = false + var putOnWhileCharging = false var event: G2Event? = null monitor.withLock { lastIncomingAtMs = now() if (decodedWearState >= 0 && decodedWearState != wearState) { + // An observed OFF_HEAD -> ON_HEAD means charging is over, up + // to CHARGING_BATTERY_POLL_MS before a battery poll would say + // so. Like TS's put-on wake, a first snapshot doesn't count. + putOnWhileCharging = chargingMode && wearState == 0 && decodedWearState == 1 wearState = decodedWearState emitWearState = true } @@ -1540,6 +1545,11 @@ class GlassesSessionCore( logLine(if (decodedWearState > 0) "wear state ON_HEAD" else "wear state OFF_HEAD") emitWearState(decodedWearState > 0) } + if (putOnWhileCharging) { + // After the emit, so TS sees the put-on while still in its + // charging phase and wakes once the rebuilt session is ready. + monitor.withLock { endChargingModeLocked("glasses put on while charging") } + } if (compassEvent != null) { emitCompassEvent(compassEvent) } @@ -1649,6 +1659,12 @@ class GlassesSessionCore( // Connect sequence (worker thread) internal fun connectLoopOnce() { + monitor.withLock { + // TS treats a wear snapshot as per-transport and forgets it on a + // reconnect; forget ours too, or the new session's first report + // (the CFW query reply) is deduped away and TS never relearns it. + wearState = -1 + } setStateDisplay("connecting", "Connecting to the glasses...") try { connectArm(rightAddress, true) diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt index ba36b747..44386bbe 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt @@ -1003,12 +1003,24 @@ internal fun GlassesSessionCore.updateChargingModeLocked(charging: Boolean, batt logLine("glasses are charging; pausing display communication") setStateDisplay("charging", GlassesSessionCore.chargingStatusText(battery)) } else { - chargingMode = false - logLine("glasses removed from charger; reconnecting") - handleTransportFailure("charging ended") + endChargingModeLocked("glasses removed from charger") } } +/** + * Leave charging mode, whether a battery poll or putting the glasses on + * (they can't be worn in the case) said charging is over. The rebuild goes + * through the normal reconnect loop. + */ +internal fun GlassesSessionCore.endChargingModeLocked(why: String) { + if (!chargingMode) { + return + } + chargingMode = false + logLine("$why; reconnecting") + handleTransportFailure("charging ended") +} + /** * Record, into the frame that is waiting, why it did not go out on this * pass of the send loop. Without this the export shows a bare multi-second diff --git a/wear/app/src/main/kotlin/com/faceclaw/wear/ui/StatusScreen.kt b/wear/app/src/main/kotlin/com/faceclaw/wear/ui/StatusScreen.kt index d34f659c..a8080e7b 100644 --- a/wear/app/src/main/kotlin/com/faceclaw/wear/ui/StatusScreen.kt +++ b/wear/app/src/main/kotlin/com/faceclaw/wear/ui/StatusScreen.kt @@ -47,7 +47,7 @@ fun StatusScreen(link: PhoneLink, haptics: Haptics, onOpenSettings: () -> Unit) val phaseLabel = when { state == null -> "No status yet" state?.charging == true || state?.phase == "charging" -> - state?.battery?.let { "Charging · G2 $it%" } ?: "Charging" + state?.battery?.let { "Charging" } ?: "Charging" connected -> "Connected" state?.phase == "connecting" -> "Connecting…" state?.phase == "disconnecting" -> "Disconnecting…" From cb6dddd12066328cfb2d85a2146214b26cd5cdcf Mon Sep 17 00:00:00 2001 From: James Babcock Date: Mon, 28 Sep 2026 14:11:04 -0700 Subject: [PATCH 15/60] Add a video player, launched by selecting a video file from the Files app --- .../com/faceclaw/app/FaceclawVideoPlayer.kt | 791 ++++++++++++++++++ app/apps/files/files-app.ts | 20 +- app/apps/files/index.ts | 13 + app/apps/files/video-layout.ts | 86 ++ app/apps/files/video-window.ts | 443 ++++++++++ app/native/video-player.ts | 148 ++++ app/ui/shell/in-process-window.ts | 6 + app/ui/shell/shell.ts | 11 +- .../faceclaw/app/graphics/VideoFrameScaler.kt | 133 +++ tests/ios-evenhub.test.cjs | 3 + .../com/faceclaw/app/VideoFrameScalerTest.kt | 75 ++ tests/tsconfig.json | 1 + tests/video-layout.test.cjs | 57 ++ 13 files changed, 1784 insertions(+), 3 deletions(-) create mode 100644 App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawVideoPlayer.kt create mode 100644 app/apps/files/video-layout.ts create mode 100644 app/apps/files/video-window.ts create mode 100644 app/native/video-player.ts create mode 100644 native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/VideoFrameScaler.kt create mode 100644 tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/VideoFrameScalerTest.kt create mode 100644 tests/video-layout.test.cjs diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawVideoPlayer.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawVideoPlayer.kt new file mode 100644 index 00000000..382655a0 --- /dev/null +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawVideoPlayer.kt @@ -0,0 +1,791 @@ +package com.faceclaw.app + +import android.content.Context +import android.media.AudioAttributes +import android.media.AudioFocusRequest +import android.media.AudioManager +import android.media.MediaCodec +import android.media.MediaCodecInfo +import android.media.MediaExtractor +import android.media.MediaFormat +import android.media.MediaPlayer +import android.os.Build +import android.os.Handler +import android.os.Looper +import android.util.Log + +import org.json.JSONObject + +import java.io.IOException +import java.nio.ByteBuffer +import java.util.concurrent.TimeUnit +import java.util.concurrent.locks.ReentrantLock +import java.util.zip.CRC32 +import kotlin.concurrent.withLock + +/** + * Plays a video file onto the glasses. A background thread decodes the video track + * (MediaExtractor + MediaCodec), scales each due frame's luma to gray (VideoFrameScaler) and + * submits it straight into a rect of a window's compositor surface, through the same + * submitSurfaceFrame entry point app workers use, so no JS runs per frame. When wanted, the + * audio track plays through a MediaPlayer on the phone's default media route, and the video + * clock follows its position. + * + * The TS side (app/native/video-player.ts) owns the window: it paints the rest of the surface + * and repaints the video rect from [copyLastFrame] whenever it renders. Frames are submitted + * only while playing, and [pause] returns only once no further frame can be submitted, so a + * repaint right after it (the paused overlay) is never overwritten. + * + * Control methods are for the main thread; listener callbacks are posted to it. + */ +class FaceclawVideoPlayer(context: Context) { + interface Listener { + /** + * "playing", "paused" or "ended", with the media position. Also sent as "paused" when a + * seek made while paused has decoded its new frame (see [copyLastFrame]). + */ + fun onStateChanged(state: String?, positionMs: Long) + + /** Playback stopped on an error (unreadable file, no decoder, ...). */ + fun onError(message: String?) + } + + companion object { + private const val TAG = "FaceclawVideo" + private const val CODEC_TIMEOUT_US = 10_000L + /** Longest single sleep while waiting for a frame to come due, so commands stay responsive. */ + private const val MAX_WAIT_US = 20_000L + /** A frame this far behind the clock is dropped undrawn... */ + private const val LATE_DROP_US = 50_000L + /** ...unless nothing has been drawn for this long, so a slow phone still shows progress. */ + private const val MAX_DROP_GAP_NANOS = 250_000_000L + /** + * Decoded frames closer together than this are thinned: past ~30fps the glasses link + * could never show them, and each one still costs a scale and a composite. + */ + private const val MIN_FRAME_INTERVAL_US = 30_000L + /** Audio position is ignored this long after the clock starts (output startup latency). */ + private const val AUDIO_SETTLE_NANOS = 500_000_000L + /** Clock drift from the audio position that makes the video clock jump to it. */ + private const val AUDIO_RESYNC_US = 60_000L + /** How often the audio position is read (a binder call into the media server). */ + private const val AUDIO_CHECK_INTERVAL_NANOS = 250_000_000L + /** A seek never lands closer than this to the end, so it always shows a frame. */ + private const val SEEK_END_MARGIN_US = 500_000L + + private val AUDIO_ATTRIBUTES: AudioAttributes = AudioAttributes.Builder() + .setUsage(AudioAttributes.USAGE_MEDIA) + .setContentType(AudioAttributes.CONTENT_TYPE_MOVIE) + .build() + + private fun MediaFormat.intOr(key: String, fallback: Int): Int = + if (containsKey(key)) getInteger(key) else fallback + + private fun MediaFormat.longOr(key: String, fallback: Long): Long = + if (containsKey(key)) getLong(key) else fallback + + private fun findTrack(extractor: MediaExtractor, mimePrefix: String): Int { + for (i in 0 until extractor.trackCount) { + val mime = extractor.getTrackFormat(i).getString(MediaFormat.KEY_MIME) ?: continue + if (mime.startsWith(mimePrefix)) return i + } + return -1 + } + + /** + * Describe a video file for the settings panel, as JSON: {width, height} in display + * orientation (rotation applied), rotation, durationMs, hasAudio, mime; or {error}. + */ + @JvmStatic + fun probe(path: String?): String { + val result = JSONObject() + val extractor = MediaExtractor() + try { + extractor.setDataSource(path ?: throw IOException("no path")) + val videoTrack = findTrack(extractor, "video/") + if (videoTrack < 0) { + result.put("error", "No video track") + return result.toString() + } + var durationUs = 0L + for (i in 0 until extractor.trackCount) { + durationUs = Math.max(durationUs, extractor.getTrackFormat(i).longOr(MediaFormat.KEY_DURATION, 0L)) + } + val format = extractor.getTrackFormat(videoTrack) + val rotation = VideoFrameScaler.normalizeRotation(format.intOr(MediaFormat.KEY_ROTATION, 0)) + val codedWidth = format.intOr(MediaFormat.KEY_WIDTH, 0) + val codedHeight = format.intOr(MediaFormat.KEY_HEIGHT, 0) + val swap = rotation == 90 || rotation == 270 + result.put("width", if (swap) codedHeight else codedWidth) + result.put("height", if (swap) codedWidth else codedHeight) + result.put("rotation", rotation) + result.put("durationMs", durationUs / 1000) + result.put("hasAudio", findTrack(extractor, "audio/") >= 0) + result.put("mime", format.getString(MediaFormat.KEY_MIME) ?: "") + } catch (e: Exception) { + Log.w(TAG, "probe failed for $path", e) + result.put("error", e.message ?: e.toString()) + } finally { + extractor.release() + } + return result.toString() + } + } + + /** What one start() call asked for; fixed for that playback's lifetime. */ + private class Params( + val path: String, + val surfaceId: String, + val x: Int, + val y: Int, + val width: Int, + val height: Int, + val monochrome: Boolean, + val gamma: Float, + val audio: Boolean, + ) + + private enum class Wait { DUE, INTERRUPTED, STOP } + + private val appContext: Context = context.applicationContext + private val mainHandler = Handler(Looper.getMainLooper()) + private val audioManager = appContext.getSystemService(Context.AUDIO_SERVICE) as AudioManager + @Volatile private var listener: Listener? = null + + private val lock = ReentrantLock() + private val wake = lock.newCondition() + + // Everything below is guarded by lock. + /** Bumped by every start/stop; a playback thread whose generation is stale exits. */ + private var generation = 0 + private var params: Params? = null + /** The user's intent: playing or paused. */ + private var playing = false + private var ended = false + /** A seek (or the initial start) is decoding toward its target; the clock waits for its frame. */ + private var seeking = false + private var pendingSeekUs = -1L + private var durationUs = 0L + private var clockRunning = false + /** Media time while the clock is stopped. */ + private var heldUs = 0L + private var clockBaseUs = 0L + private var clockBaseNanos = 0L + private var clockStartedNanos = 0L + private var lastAudioCheckNanos = 0L + private var audio: MediaPlayer? = null + private var hasAudioFocus = false + private var focusRequest: AudioFocusRequest? = null + /** The most recently decoded frame (params.width x params.height), shown or previewed. */ + private var lastFrame: ByteArray? = null + /** Checksum of the frame last submitted, so an unchanged frame is not recomposited; -1 = none. */ + private var lastSubmittedChecksum = -1L + private var submitFailures = 0 + + private val focusListener = AudioManager.OnAudioFocusChangeListener { change -> + when (change) { + AudioManager.AUDIOFOCUS_LOSS, AudioManager.AUDIOFOCUS_LOSS_TRANSIENT -> { + if (change == AudioManager.AUDIOFOCUS_LOSS) lock.withLock { hasAudioFocus = false } + // Another app (a call, a music player) took the audio: pause like any player would. + if (isPlaying()) { + pause() + notifyState(generationNow(), "paused", getPositionMs()) + } + } + } + } + + fun setListener(listener: Listener?) { + this.listener = listener + } + + /** + * Start playing [path] from [startMs] into the (rectX, rectY, width, height) rect of + * compositor surface [surfaceId], replacing any current playback. Decoding and audio setup + * happen on the playback thread; failures arrive as [Listener.onError]. + */ + fun start( + path: String, + surfaceId: String, + rectX: Int, + rectY: Int, + width: Int, + height: Int, + monochrome: Boolean, + gamma: Float, + withAudio: Boolean, + startMs: Long, + ) { + require(width > 0 && height > 0) { "bad video rect ${width}x$height" } + val p = Params(path, surfaceId, rectX, rectY, width, height, monochrome, gamma, withAudio) + val gen = lock.withLock { + endPlaybackLocked() + params = p + playing = true + ended = false + seeking = true + pendingSeekUs = Math.max(0L, startMs) * 1000 + heldUs = pendingSeekUs + // The old frame may not match the new settings (size, monochrome). + lastFrame = null + lastSubmittedChecksum = -1 + submitFailures = 0 + generation + } + val thread = Thread({ Playback(gen, p).run() }, "FaceclawVideo") + thread.priority = Thread.NORM_PRIORITY + 1 + thread.start() + } + + /** Pause; once this returns no further frame is submitted until [resume]. */ + fun pause() { + lock.withLock { + if (!playing) return + playing = false + holdClockLocked(clockUsLocked()) + wake.signalAll() + } + } + + fun resume() { + lock.withLock { + if (playing || ended || params == null) return + playing = true + // A fresh frame must go out even if it matches the last one: the TS side painted over + // the surface while paused. + lastSubmittedChecksum = -1 + if (!seeking) startClockLocked() + wake.signalAll() + } + } + + /** Seek to [positionMs]; while paused, the new frame is decoded and announced as "paused". */ + fun seekTo(positionMs: Long) { + lock.withLock { + if (params == null || ended) return + var targetUs = Math.max(0L, positionMs) * 1000 + if (durationUs > 0) targetUs = Math.min(targetUs, Math.max(0L, durationUs - SEEK_END_MARGIN_US)) + pendingSeekUs = targetUs + seeking = true + holdClockLocked(targetUs) + lastSubmittedChecksum = -1 + wake.signalAll() + } + } + + fun getPositionMs(): Long = lock.withLock { clockUsLocked() / 1000 } + + fun getDurationMs(): Long = lock.withLock { durationUs / 1000 } + + fun isPlaying(): Boolean = lock.withLock { playing && !ended && params != null } + + /** + * Copy the most recent frame into [out], which must hold exactly the video rect's + * width*height bytes (row-major 8bpp gray). False when there is no frame of that size yet. + */ + fun copyLastFrame(out: ByteBuffer): Boolean { + lock.withLock { + val frame = lastFrame ?: return false + if (out.capacity() != frame.size) return false + out.clear() + out.put(frame) + out.clear() + return true + } + } + + /** End playback and free the decoder and audio; the last frame stays readable. */ + fun stop() { + lock.withLock { endPlaybackLocked() } + } + + /** stop(), and drop the listener and frame. */ + fun release() { + lock.withLock { + endPlaybackLocked() + lastFrame = null + } + listener = null + } + + private fun generationNow(): Int = lock.withLock { generation } + + private fun endPlaybackLocked() { + generation++ + params = null + playing = false + seeking = false + pendingSeekUs = -1 + // Keep the position readable (an error's caller resumes from it). + heldUs = clockUsLocked() + clockRunning = false + releaseAudioLocked() + wake.signalAll() + } + + // ---- clock (all under lock) ---- + + private fun clockUsLocked(): Long = + if (!clockRunning) heldUs else clockBaseUs + (System.nanoTime() - clockBaseNanos) / 1000 + + private fun startClockLocked() { + if (clockRunning) return + clockRunning = true + clockBaseUs = heldUs + clockBaseNanos = System.nanoTime() + clockStartedNanos = clockBaseNanos + val player = audio ?: return + requestAudioFocusLocked() + try { + player.start() + } catch (e: IllegalStateException) { + Log.w(TAG, "audio start failed", e) + } + } + + private fun holdClockLocked(atUs: Long) { + heldUs = atUs + if (!clockRunning) return + clockRunning = false + try { + audio?.let { if (it.isPlaying) it.pause() } + } catch (e: IllegalStateException) { + Log.w(TAG, "audio pause failed", e) + } + } + + /** + * Keep the video clock on the audio position: output latency and seeks make the two drift, + * and a picture ahead of or behind its sound is the one sync error people notice. + */ + private fun followAudioLocked() { + val player = audio ?: return + val now = System.nanoTime() + if (!clockRunning || now - clockStartedNanos < AUDIO_SETTLE_NANOS) return + if (now - lastAudioCheckNanos < AUDIO_CHECK_INTERVAL_NANOS) return + lastAudioCheckNanos = now + val audioUs = try { + if (!player.isPlaying) return // finished (audio shorter than video) or not started + player.currentPosition * 1000L + } catch (e: IllegalStateException) { + return + } + if (Math.abs(audioUs - clockUsLocked()) > AUDIO_RESYNC_US) { + clockBaseUs = audioUs + clockBaseNanos = System.nanoTime() + } + } + + private fun seekAudioLocked(targetUs: Long) { + val player = audio ?: return + try { + if (Build.VERSION.SDK_INT >= 26) { + player.seekTo(targetUs / 1000, MediaPlayer.SEEK_CLOSEST) + } else { + player.seekTo((targetUs / 1000).toInt()) + } + } catch (e: IllegalStateException) { + Log.w(TAG, "audio seek failed", e) + } + } + + private fun requestAudioFocusLocked() { + if (hasAudioFocus) return + val result = if (Build.VERSION.SDK_INT >= 26) { + val request = focusRequest ?: AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN) + .setAudioAttributes(AUDIO_ATTRIBUTES) + .setOnAudioFocusChangeListener(focusListener, mainHandler) + .build() + .also { focusRequest = it } + audioManager.requestAudioFocus(request) + } else { + @Suppress("DEPRECATION") + audioManager.requestAudioFocus(focusListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN) + } + // Play regardless: the sound was asked for, and a refusal is transient (a call ending). + hasAudioFocus = result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED + } + + private fun releaseAudioLocked() { + val player = audio ?: return + audio = null + try { + player.release() + } catch (e: Exception) { + Log.w(TAG, "audio release failed", e) + } + if (hasAudioFocus) { + hasAudioFocus = false + if (Build.VERSION.SDK_INT >= 26) { + focusRequest?.let { audioManager.abandonAudioFocusRequest(it) } + } else { + @Suppress("DEPRECATION") + audioManager.abandonAudioFocus(focusListener) + } + } + } + + // ---- notifications ---- + + private fun notifyState(gen: Int, state: String, positionMs: Long) { + mainHandler.post { + if (lock.withLock { gen == generation }) listener?.onStateChanged(state, positionMs) + } + } + + private fun notifyError(gen: Int, message: String) { + mainHandler.post { + if (lock.withLock { gen == generation }) listener?.onError(message) + } + } + + // ---- frame output (under lock) ---- + + private fun submitLocked(p: Params, pixels: ByteArray, checksum: Long) { + val buffer = ByteBuffer.wrap(pixels) + // Frame id 0: per-frame FrameTimings entries at video rate would crowd every real + // input/render frame out of the timing export. + val fingerprint = "video:$generation:" + java.lang.Long.toHexString(checksum) + try { + val communicator = FaceclawBleCommunicator.getActive() + if (communicator != null) { + communicator.submitSurfaceFrame(buffer, p.surfaceId, p.x, p.y, p.width, p.height, fingerprint, 0, 0, null) + } else { + FaceclawPreviewCompositor.getActive()?.submitSurfaceFrame( + buffer, p.surfaceId, p.x, p.y, p.width, p.height, fingerprint, 0, 0, null) + } + submitFailures = 0 + } catch (e: RuntimeException) { + // The window's surface went away or shrank under us (closed, relaid out): drop the frame. + if (submitFailures++ == 0) Log.w(TAG, "video frame submit failed: ${e.message}") + } + } + + /** + * One start() call's decode thread. Owns the extractor and decoder; everything shared with + * the control methods goes through the player's lock. + */ + private inner class Playback(private val gen: Int, private val p: Params) { + private var extractor: MediaExtractor? = null + private var codec: MediaCodec? = null + private val info = MediaCodec.BufferInfo() + private var inputDone = false + private var outputDone = false + private var trackEndUs = 0L + /** Frames before this are decoded only on the way to a seek target. */ + private var skipUntilUs = 0L + private var lastDrawnPtsUs = Long.MIN_VALUE / 2 + private var lastDrawnNanos = 0L + private var rotation = 0 + private var lut = ByteArray(256) + private var scaler: VideoFrameScaler? = null + private var luma = ByteArray(0) + /** The frame being built; swapped with lastFrame when shown. */ + private var frame = ByteArray(p.width * p.height) + private val crc = CRC32() + + fun run() { + try { + open() + loop() + } catch (t: Throwable) { + Log.w(TAG, "playback failed for ${p.path}", t) + val current = lock.withLock { + val current = gen == generation + if (current) endPlaybackLocked() + current + } + // endPlaybackLocked bumped the generation; report under the new one. + if (current) notifyError(generationNow(), t.message ?: t.toString()) + } finally { + try { + codec?.stop() + } catch (ignored: Throwable) { + } + codec?.release() + extractor?.release() + } + } + + private fun current(): Boolean = lock.withLock { gen == generation } + + private fun open() { + val ex = MediaExtractor() + extractor = ex + ex.setDataSource(p.path) + val track = findTrack(ex, "video/") + if (track < 0) throw IOException("No video track") + ex.selectTrack(track) + val format = ex.getTrackFormat(track) + rotation = VideoFrameScaler.normalizeRotation(format.intOr(MediaFormat.KEY_ROTATION, 0)) + trackEndUs = format.longOr(MediaFormat.KEY_DURATION, 0L) + // Most video is limited ("TV") range; only an explicit full-range tag says otherwise. + val limited = format.intOr(MediaFormat.KEY_COLOR_RANGE, MediaFormat.COLOR_RANGE_LIMITED) != + MediaFormat.COLOR_RANGE_FULL + lut = VideoFrameScaler.toneLut(limited, p.gamma, p.monochrome) + val mime = format.getString(MediaFormat.KEY_MIME) ?: throw IOException("Unknown video format") + format.setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Flexible) + val decoder = try { + MediaCodec.createDecoderByType(mime) + } catch (e: Exception) { + throw IOException("No decoder for $mime") + } + codec = decoder + decoder.configure(format, null, null, 0) + decoder.start() + val player = if (p.audio && findTrack(ex, "audio/") >= 0) openAudio() else null + lock.withLock { + if (gen != generation) { + player?.release() + return + } + durationUs = trackEndUs + // Positioned by the start seek, which is the first command loop() handles. + audio = player + } + } + + /** A prepared MediaPlayer for the file's audio, or null (played silent) if it won't open. */ + private fun openAudio(): MediaPlayer? { + val player = MediaPlayer() + return try { + player.setAudioAttributes(AUDIO_ATTRIBUTES) + player.setDataSource(p.path) + player.prepare() + player + } catch (e: Exception) { + Log.w(TAG, "audio unavailable for ${p.path}; playing silent", e) + player.release() + null + } + } + + private fun loop() { + while (true) { + // Commands: stop, seek, or wait out a pause. + var seekUs = -1L + lock.withLock { + while (true) { + if (gen != generation) return + if (pendingSeekUs >= 0) { + seekUs = pendingSeekUs + pendingSeekUs = -1 + break + } + if (playing || seeking) break + wake.await() + } + } + if (seekUs >= 0) { + seek(seekUs) + continue + } + if (outputDone) { + if (awaitEnd()) return + continue + } + feedInput() + val index = codec!!.dequeueOutputBuffer(info, CODEC_TIMEOUT_US) + if (index < 0) continue // try again later / format or buffers changed + val endOfStream = (info.flags and MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0 + if (info.size > 0) { + handleFrame(index, info.presentationTimeUs) + } else { + codec!!.releaseOutputBuffer(index, false) + } + if (endOfStream) outputDone = true + } + } + + private fun seek(targetUs: Long) { + lock.withLock { + if (gen != generation) return + seekAudioLocked(targetUs) + } + extractor!!.seekTo(targetUs, MediaExtractor.SEEK_TO_PREVIOUS_SYNC) + codec!!.flush() + inputDone = false + outputDone = false + skipUntilUs = targetUs + lastDrawnPtsUs = Long.MIN_VALUE / 2 + } + + private fun feedInput() { + if (inputDone) return + val decoder = codec!! + val ex = extractor!! + while (true) { + val index = decoder.dequeueInputBuffer(0) + if (index < 0) return + val buffer = decoder.getInputBuffer(index) ?: return + val size = ex.readSampleData(buffer, 0) + if (size < 0) { + decoder.queueInputBuffer(index, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM) + inputDone = true + return + } + decoder.queueInputBuffer(index, 0, size, ex.sampleTime, 0) + ex.advance() + } + } + + /** Decide a decoded frame's fate (skip, preview, drop, draw); always releases it. */ + private fun handleFrame(index: Int, ptsUs: Long) { + try { + if (ptsUs < skipUntilUs) return + val landingSeek = lock.withLock { seeking } + if (landingSeek) { + landSeek(index, ptsUs) + return + } + if (ptsUs - lastDrawnPtsUs < MIN_FRAME_INTERVAL_US) return + if (waitUntilDue(ptsUs) != Wait.DUE) return + val lateUs = lock.withLock { clockUsLocked() } - ptsUs + if (lateUs > LATE_DROP_US && System.nanoTime() - lastDrawnNanos < MAX_DROP_GAP_NANOS) return + val checksum = convert(index) + present(ptsUs, checksum) + } finally { + codec!!.releaseOutputBuffer(index, false) + } + } + + /** + * The first frame at or past a seek target (or the start position): drawn and the clock + * started when playing, kept as the paused preview otherwise. + */ + private fun landSeek(index: Int, ptsUs: Long) { + val checksum = convert(index) + var previewed = false + lock.withLock { + if (gen != generation || pendingSeekUs >= 0) return + seeking = false + heldUs = ptsUs + swapInFrameLocked() + if (playing) { + submitLocked(p, lastFrame!!, checksum) + lastSubmittedChecksum = checksum + startClockLocked() + } else { + previewed = true + } + } + lastDrawnPtsUs = ptsUs + lastDrawnNanos = System.nanoTime() + notifyState(gen, if (previewed) "paused" else "playing", ptsUs / 1000) + } + + /** Show a due frame, unless a pause or seek got in first. */ + private fun present(ptsUs: Long, checksum: Long) { + lock.withLock { + if (gen != generation || !playing || pendingSeekUs >= 0) return + swapInFrameLocked() + if (checksum != lastSubmittedChecksum) { + submitLocked(p, lastFrame!!, checksum) + lastSubmittedChecksum = checksum + } + } + lastDrawnPtsUs = ptsUs + lastDrawnNanos = System.nanoTime() + } + + private fun swapInFrameLocked() { + val shown = frame + val previous = lastFrame + frame = if (previous != null && previous.size == shown.size) previous else ByteArray(shown.size) + lastFrame = shown + } + + /** Block until the clock reaches [ptsUs]; paused time doesn't count. */ + private fun waitUntilDue(ptsUs: Long): Wait { + lock.withLock { + while (true) { + if (gen != generation) return Wait.STOP + if (pendingSeekUs >= 0) return Wait.INTERRUPTED + if (!playing) { + wake.await() + continue + } + followAudioLocked() + val now = clockUsLocked() + if (now >= ptsUs) return Wait.DUE + wake.await(Math.min(ptsUs - now, MAX_WAIT_US), TimeUnit.MICROSECONDS) + } + } + } + + /** + * The decoder is drained: hold the last frame until the clock reaches the end, then + * report "ended". False when a seek interrupted the wait (playback continues). + */ + private fun awaitEnd(): Boolean { + val endUs = Math.max(trackEndUs, lastDrawnPtsUs) + val landing = lock.withLock { seeking } + if (!landing && waitUntilDue(endUs) != Wait.DUE) return !current() + lock.withLock { + if (gen != generation) return true + if (pendingSeekUs >= 0) return false + playing = false + seeking = false + ended = true + holdClockLocked(endUs) + releaseAudioLocked() + } + notifyState(gen, "ended", endUs / 1000) + return true + } + + /** Scale the output buffer's frame into [frame]; returns its checksum. */ + private fun convert(index: Int): Long { + val decoder = codec!! + val image = try { + decoder.getOutputImage(index) + } catch (e: Exception) { + null + } + if (image != null) { + try { + val plane = image.planes[0] + val crop = image.cropRect + val offset = copyLuma(plane.buffer) + crop.top * plane.rowStride + crop.left * plane.pixelStride + scaleInto(crop.width(), crop.height(), offset, plane.rowStride, plane.pixelStride) + } finally { + image.close() + } + } else { + // No Image access: every YUV420 layout starts with the Y plane at the buffer start. + val buffer = decoder.getOutputBuffer(index) ?: throw IOException("Decoder returned no frame") + buffer.position(info.offset) + buffer.limit(info.offset + info.size) + val format = decoder.outputFormat + val width = format.getInteger(MediaFormat.KEY_WIDTH) + val stride = format.intOr(MediaFormat.KEY_STRIDE, width) + val left = format.intOr("crop-left", 0) + val top = format.intOr("crop-top", 0) + val right = format.intOr("crop-right", width - 1) + val bottom = format.intOr("crop-bottom", format.getInteger(MediaFormat.KEY_HEIGHT) - 1) + copyLuma(buffer) + scaleInto(right - left + 1, bottom - top + 1, top * stride + left, stride, 1) + } + crc.reset() + crc.update(frame, 0, frame.size) + return crc.value + } + + /** Bulk-copy the plane (one memcpy; per-byte reads from a direct buffer are slow). Returns 0. */ + private fun copyLuma(buffer: ByteBuffer): Int { + val bytes = buffer.remaining() + if (luma.size < bytes) luma = ByteArray(bytes) + buffer.get(luma, 0, bytes) + return 0 + } + + private fun scaleInto(width: Int, height: Int, offset: Int, rowStride: Int, pixelStride: Int) { + var s = scaler + if (s == null || s.sourceWidth != width || s.sourceHeight != height) { + s = VideoFrameScaler(width, height, rotation, p.width, p.height) + scaler = s + } + s.scale(luma, offset, rowStride, pixelStride, lut, frame) + } + } +} diff --git a/app/apps/files/files-app.ts b/app/apps/files/files-app.ts index 615c8f9a..d8872e58 100644 --- a/app/apps/files/files-app.ts +++ b/app/apps/files/files-app.ts @@ -2,6 +2,7 @@ import { readTextFile, type DirectoryEntry } from "../../native/file-access"; import { isFontFile } from "../../native/font-files"; import { installFontFile, isFontInstalled } from "../../graphics/installed-fonts"; import { isDecodableImageFile } from "../../native/image-files"; +import { isPlayableVideoFile } from "../../native/video-player"; import { readEvenHubPackageManifest } from "../evenhub/installed-apps"; import { EvenHubPermissionDialogLayer } from "../evenhub/permission-dialog"; import { FileBrowserLayer } from "./file-browser"; @@ -35,17 +36,21 @@ export type FilesAppOptions = InProcessAppOptions & { installEhpkApp: (path: string) => Promise | void; /** Open a font file's previewer as its own shell window. */ openFontWindow: (title: string, path: string) => void; + /** Open a video file's player (settings panel first) as its own shell window. */ + openVideoWindow: (title: string, path: string) => void; }; /** * The Files app's launcher-opened window: a file browser over Places * (bookmarks and storage roots). Picking any file opens an info dialog with - * metadata plus, for viewable types (text, images), the open actions. + * metadata plus, for viewable types (text, images, video), the open actions. */ export function createFilesAppWindow(options: FilesAppOptions): InProcessWindow { let created: InProcessWindow | null = null; const browser = new FileBrowserLayer({ - isSupportedFile: (name) => TEXT_FILE.test(name) || isFontFile(name) || EHPK_FILE.test(name) || (!global.isIOS && isDecodableImageFile(name)), + isSupportedFile: (name) => + TEXT_FILE.test(name) || isFontFile(name) || EHPK_FILE.test(name) || + (!global.isIOS && (isDecodableImageFile(name) || isPlayableVideoFile(name))), // The browser handles double-click itself (up a level), so it is not // wrapped in YieldAtRootLayer; it yields explicitly from the top level. onLeave: () => shell.yieldFocusToSidebar(), @@ -230,6 +235,17 @@ function fileOpenActions(entry: DirectoryEntry, options: FilesAppOptions): FileI }, ]; } + if (isPlayableVideoFile(entry.name)) { + return [ + { + label: "Play video", + onSelect: (ctx) => { + ctx.stack.pop(); + options.openVideoWindow(entry.name, entry.path); + }, + }, + ]; + } if (isFontFile(entry.name)) { // Install copies into the app-internal fonts directory, making the face // available in the Settings font pickers. The row relabels itself with diff --git a/app/apps/files/index.ts b/app/apps/files/index.ts index 92301cca..65f9430f 100644 --- a/app/apps/files/index.ts +++ b/app/apps/files/index.ts @@ -13,6 +13,7 @@ import { FILES_SURFACE_ID, FILES_WINDOW_ID, } from "./files-app"; +import { createVideoPlayerWindow } from "./video-window"; // Document windows are closeable and non-singleton; the serial keeps their // windowIds unique. @@ -51,6 +52,17 @@ function openFontDocumentWindow(ctx: AppContext, title: string, path: string): v }); } +function openVideoWindow(ctx: AppContext, title: string, path: string): void { + const windowId = `files:doc:${nextDocumentSerial++}`; + void ctx + .launchInProcessApp(windowId, `window:${windowId}`, (options) => + createVideoPlayerWindow(windowId, title, path, options), + ) + .catch((error) => { + ctx.appendLog(`video window failed: ${error}`); + }); +} + const filesApp: AppDefinition = { appId: "files", title: "Files", @@ -78,6 +90,7 @@ const filesApp: AppDefinition = { } }, openFontWindow: (title, path) => openFontDocumentWindow(ctx, title, path), + openVideoWindow: (title, path) => openVideoWindow(ctx, title, path), }), ), // A document arriving via Android's Share intent opens as its own window. diff --git a/app/apps/files/video-layout.ts b/app/apps/files/video-layout.ts new file mode 100644 index 00000000..e8cc1f15 --- /dev/null +++ b/app/apps/files/video-layout.ts @@ -0,0 +1,86 @@ +/** + * Where a video goes in the player window, for each size choice. Pure + * geometry, so it is unit-tested without the NativeScript runtime. + */ + +export type VideoSize = "small" | "medium" | "large" | "full"; + +export const VIDEO_SIZES: readonly VideoSize[] = ["small", "medium", "large", "full"]; + +export type Size = { width: number; height: number }; +export type Rect = Size & { x: number; y: number }; + +/** + * Bounding boxes for the fixed sizes; a video is fitted inside, keeping its + * aspect. Large and full fit the whole viewport instead (full in a tall + * window). Bigger pictures cost the glasses link more per frame, so smaller + * sizes play at a higher frame rate. + */ +const FIXED_BOXES: Partial> = { + small: { width: 160, height: 120 }, + medium: { width: 240, height: 180 }, +}; + +export function videoSizeLabel(size: VideoSize): string { + switch (size) { + case "small": + return "Small"; + case "medium": + return "Medium"; + case "large": + return "Large"; + case "full": + return "Full screen"; + } +} + +/** Full screen needs the tall window band; the rest play in the standard one. */ +export function videoHeightMode(size: VideoSize): "min" | "max" { + return size === "full" ? "max" : "min"; +} + +/** + * The largest size with the video's aspect ratio that fits in box, with even + * dimensions (the glasses' delta encoder works in 2-pixel rows and 4-pixel + * columns) of at least 2. Upscales small videos too: the size is the + * viewer's choice. + */ +export function fitVideo(video: Size, box: Size): Size { + if (video.width <= 0 || video.height <= 0) return { width: evenFloor(box.width), height: evenFloor(box.height) }; + const scale = Math.min(box.width / video.width, box.height / video.height); + return { + width: evenFloor(Math.min(box.width, Math.round(video.width * scale))), + height: evenFloor(Math.min(box.height, Math.round(video.height * scale))), + }; +} + +/** + * The video's rect within a viewport, centered. x snaps to a multiple of 4 + * and y to a multiple of 2 so frame deltas don't straddle an extra encoder + * block at each edge. + */ +export function videoRect(size: VideoSize, video: Size, viewport: Size): Rect { + const fixed = FIXED_BOXES[size]; + const box = fixed + ? { width: Math.min(fixed.width, viewport.width), height: Math.min(fixed.height, viewport.height) } + : viewport; + const fitted = fitVideo(video, box); + return { + x: Math.max(0, Math.floor((viewport.width - fitted.width) / 8) * 4), + y: Math.max(0, Math.floor((viewport.height - fitted.height) / 4) * 2), + ...fitted, + }; +} + +/** "3:52", or "1:02:03" past an hour. */ +export function formatMediaTime(ms: number): string { + const total = Math.max(0, Math.floor(ms / 1000)); + const hours = Math.floor(total / 3600); + const minutes = Math.floor((total % 3600) / 60); + const seconds = String(total % 60).padStart(2, "0"); + return hours > 0 ? `${hours}:${String(minutes).padStart(2, "0")}:${seconds}` : `${minutes}:${seconds}`; +} + +function evenFloor(value: number): number { + return Math.max(2, Math.floor(value / 2) * 2); +} diff --git a/app/apps/files/video-window.ts b/app/apps/files/video-window.ts new file mode 100644 index 00000000..2310e117 --- /dev/null +++ b/app/apps/files/video-window.ts @@ -0,0 +1,443 @@ +import { getDefaultSmallFont } from "../../graphics/ui-fonts"; +import { GrayImage } from "../../graphics/image"; +import { truncateText, wrapText } from "../../graphics/textwrap"; +import { PHOTO_GAMMA } from "../../native/image-files"; +import { probeVideo, VideoPlayer, type VideoInfo, type VideoPlaybackState } from "../../native/video-player"; +import { ConfigSettingBoolean, ConfigSettingEnum } from "../../ui/dashboard-settings"; +import { type InputEvent } from "../../ui/gestures"; +import { type Layer, type LayerContext } from "../../ui/layers"; +import { drawRightValueMenuItem, drawToggleMenuItem } from "../../ui/menu"; +import { Menu, type MenuDrawArgs } from "../../ui/menu-core"; +import { LIST_ROW_TEXT_INSET, lineStep, listRowHeight } from "../../ui/metrics"; +import { + createInProcessWindow, + YieldAtRootLayer, + type InProcessAppOptions, + type InProcessWindow, +} from "../../ui/shell/in-process-window"; +import { appViewportSize } from "../../ui/shell/geometry"; +import { + formatMediaTime, + VIDEO_SIZES, + videoHeightMode, + videoRect, + videoSizeLabel, + type Rect, + type VideoSize, +} from "./video-layout"; + +export const videoSizeSetting = new ConfigSettingEnum({ + id: "video-size", + label: "Size", + storageKey: "video.size", + defaultValue: "large", + values: VIDEO_SIZES, + formatValue: videoSizeLabel, +}); + +export const videoAudioSetting = new ConfigSettingBoolean({ + id: "video-audio", + label: "Audio", + storageKey: "video.audio", + defaultValue: true, + description: "Play the video's sound on the phone's current audio output.", +}); + +export const videoMonochromeSetting = new ConfigSettingBoolean({ + id: "video-monochrome", + label: "Monochrome", + storageKey: "video.monochrome", + defaultValue: false, + description: "Show only black and white: far less to send per frame, so a higher frame rate.", +}); + +/** How far one ring scroll seeks. */ +const SEEK_STEP_MS = 10_000; +const MARGIN_X = 18; +const TITLE_Y = 10; +const PANEL_WIDTH = 340; + +/** + * One opened video: its probe result, the native player, and the window + * glue. The window's base layer is the settings panel; playing pushes the + * playback layer, and backing out of it (or the video ending) returns to the + * panel with the position kept for Resume. + */ +class VideoSession { + readonly probe: VideoInfo | { error: string }; + private player: VideoPlayer | null = null; + private window: InProcessWindow | null = null; + private playback: VideoPlaybackLayer | null = null; + /** Where Resume starts; 0 = from the beginning. */ + resumeMs = 0; + /** The last playback error, shown on the panel until the next Play. */ + error: string | null = null; + + constructor( + readonly path: string, + readonly title: string, + readonly surfaceId: string, + ) { + this.probe = probeVideo(path); + } + + get info(): VideoInfo | null { + return "error" in this.probe ? null : this.probe; + } + + attach(window: InProcessWindow): void { + this.window = window; + } + + isPlaying(): boolean { + return this.player?.isPlaying() ?? false; + } + + positionMs(): number { + return this.player?.positionMs() ?? this.resumeMs; + } + + /** Current rect for a size choice, in the viewport of the band that size plays in. */ + rectFor(size: VideoSize, viewport: { width: number; height: number }): Rect { + const info = this.info; + return videoRect(size, info ? { width: info.width, height: info.height } : viewport, viewport); + } + + play(ctx: LayerContext, fromStart: boolean): void { + const window = this.window; + const info = this.info; + if (!window || !info) return; + this.error = null; + const size = videoSizeSetting.get(); + window.setHeightMode(videoHeightMode(size)); + const viewport = ctx.stack.getBaseSize(); + const rect = this.rectFor(size, viewport); + const player = this.ensurePlayer(); + this.playback = new VideoPlaybackLayer(this, rect, viewport); + ctx.stack.push(this.playback); + player.start({ + path: this.path, + surfaceId: this.surfaceId, + rect, + monochrome: videoMonochromeSetting.get(), + gamma: PHOTO_GAMMA, + audio: info.hasAudio && videoAudioSetting.get(), + startMs: fromStart ? 0 : this.resumeMs, + }); + } + + togglePause(): void { + const player = this.player; + if (!player) return; + if (player.isPlaying()) player.pause(); + else player.resume(); + } + + seekBy(deltaMs: number): void { + const player = this.player; + if (!player) return; + const duration = this.info?.durationMs ?? 0; + const target = Math.max(0, player.positionMs() + deltaMs); + player.seekTo(duration > 0 ? Math.min(target, duration) : target); + } + + /** The window went to the background or the screen went off: stop, keep the place. */ + pauseForHost(): void { + if (!this.player?.isPlaying()) return; + this.player.pause(); + // Paint the paused overlay now, so the retained surface shows it on return. + this.window?.requestRender(); + } + + /** Leave the playback layer for the panel, remembering where to resume. */ + returnToPanel(resumeMs: number): void { + const player = this.player; + if (player) { + player.pause(); + player.stop(); + } + this.resumeMs = resumeMs; + const window = this.window; + const playback = this.playback; + this.playback = null; + if (window && playback) window.stack.popThrough(playback); + window?.setHeightMode("min"); + window?.requestRender(); + } + + lastFrame(rect: Rect): GrayImage | null { + return this.player?.lastFrame(rect.width, rect.height) ?? null; + } + + release(): void { + this.player?.release(); + this.player = null; + } + + private ensurePlayer(): VideoPlayer { + if (!this.player) { + this.player = new VideoPlayer({ + onState: (state, positionMs) => this.onPlayerState(state, positionMs), + onError: (message) => { + this.error = message; + this.returnToPanel(this.positionMs()); + }, + }); + } + return this.player; + } + + private onPlayerState(state: VideoPlaybackState, _positionMs: number): void { + if (state === "ended") { + this.returnToPanel(0); + return; + } + // A paused seek decoded its new frame: repaint it under the overlay. + if (state === "paused") this.window?.requestRender(); + } +} + +type PanelRow = { kind: "size" } | { kind: "audio" } | { kind: "monochrome" } | { kind: "play"; fromStart: boolean }; + +/** + * The pre-play settings panel (the window's root): picture size, audio and + * monochrome, all remembered for the next video, then Play (or Resume plus + * Play from start once a position is kept). + */ +class VideoSettingsLayer implements Layer { + private readonly menu = new Menu({ + wrap: false, + rowGap: 1, + highlight: { radius: 6 }, + getHeight: () => listRowHeight(getDefaultSmallFont()), + draw: (args) => this.drawRow(args), + }); + constructor(private readonly session: VideoSession) {} + + private rows(): PanelRow[] { + if (!this.session.info) return []; + const rows: PanelRow[] = [{ kind: "size" }, { kind: "audio" }, { kind: "monochrome" }]; + rows.push({ kind: "play", fromStart: false }); + if (this.session.resumeMs > 0) rows.push({ kind: "play", fromStart: true }); + return rows; + } + + paint(ctx: LayerContext): GrayImage { + const font = getDefaultSmallFont(); + const { width, height } = ctx.stack.getBaseSize(); + const image = new GrayImage(width, height, 0); + image.drawText(font, MARGIN_X, TITLE_Y, truncateText(font, this.session.title, width - 2 * MARGIN_X), 220); + const step = lineStep(font); + let y = TITLE_Y + step; + + const info = this.session.info; + const errors: string[] = []; + if (!info) errors.push(`Can't play this video: ${(this.session.probe as { error: string }).error}`); + if (this.session.error) errors.push(`Playback stopped: ${this.session.error}`); + if (info) { + const facts = [`${info.width}x${info.height}`, formatMediaTime(info.durationMs), info.hasAudio ? "sound" : "no sound"]; + image.drawText(font, MARGIN_X, y, facts.join(" · "), 130); + y += step; + } + for (const error of errors) { + for (const line of wrapText(font, error, width - 2 * MARGIN_X, { breakLongWords: true }).slice(0, 3)) { + image.drawText(font, MARGIN_X, y, line, 200); + y += step; + } + } + y += 6; + + const rows = this.rows(); + const selected = this.menu.selectedItem; + const index = selected ? rows.findIndex((row) => sameRow(row, selected)) : -1; + // Land on Resume/Play by default: the settings usually stay as they were. + const playIndex = rows.findIndex((row) => row.kind === "play"); + this.menu.setItems(rows, index >= 0 ? index : playIndex >= 0 ? playIndex : undefined); + const panelWidth = Math.min(PANEL_WIDTH, width - 2 * (MARGIN_X - 6)); + this.menu.paint(image, { x: MARGIN_X - 6, y, width: panelWidth, height: Math.max(0, height - y - 4) }, + ctx.stack.isFocused()); + return image; + } + + async handleInput(event: InputEvent, ctx: LayerContext): Promise { + switch (event.type) { + case "scroll-up": + case "scroll-down": + await this.menu.handleInput(event); + return; + case "click": { + const row = this.menu.selectedItem; + if (row) this.activate(row, ctx); + return; + } + default: + return; + } + } + + private activate(row: PanelRow, ctx: LayerContext): void { + switch (row.kind) { + case "size": + videoSizeSetting.set(videoSizeSetting.next()); + return; + case "audio": + if (this.session.info?.hasAudio) videoAudioSetting.toggle(); + return; + case "monochrome": + videoMonochromeSetting.toggle(); + return; + case "play": + this.session.play(ctx, row.fromStart); + return; + } + } + + private drawRow({ image, item, x, y, width, selected }: MenuDrawArgs): void { + const font = getDefaultSmallFont(); + const textX = x + 10; + const textWidth = width - 20; + switch (item.kind) { + case "size": { + const size = videoSizeSetting.get(); + // The picture size this choice gets in its own band (full screen plays in the tall window). + const rect = this.session.rectFor(size, appViewportSize(videoHeightMode(size))); + drawRightValueMenuItem(image, font, textX, y, textWidth, "Size", + `${videoSizeLabel(size)} ${rect.width}x${rect.height}`); + return; + } + case "audio": { + const hasAudio = this.session.info?.hasAudio ?? false; + drawToggleMenuItem(image, font, textX, y, textWidth, hasAudio ? "Audio" : "Audio (none in file)", + hasAudio && videoAudioSetting.get(), selected); + return; + } + case "monochrome": + drawToggleMenuItem(image, font, textX, y, textWidth, "Monochrome", videoMonochromeSetting.get(), selected); + return; + case "play": { + const resumeMs = this.session.resumeMs; + const label = item.fromStart ? "Play from start" : resumeMs > 0 ? `Resume from ${formatMediaTime(resumeMs)}` : "Play"; + image.drawText(font, textX, y + LIST_ROW_TEXT_INSET, label, selected ? 255 : 200); + return; + } + } + } +} + +function sameRow(a: PanelRow, b: PanelRow): boolean { + return a.kind === b.kind && (a.kind !== "play" || b.kind !== "play" || a.fromStart === b.fromStart); +} + +/** + * The playing video. The native player draws frames into the video rect on + * its own; this layer paints only when the window renders (input, pause, + * focus): black around the latest frame, plus a status box while paused. + * Click pauses/resumes, scroll seeks 10s, double-click returns to the panel. + */ +class VideoPlaybackLayer implements Layer { + private leaving = false; + + constructor( + private readonly session: VideoSession, + private readonly rect: Rect, + /** The viewport the rect was laid out in. */ + private readonly viewport: { width: number; height: number }, + ) {} + + paint(ctx: LayerContext): GrayImage { + const { width, height } = ctx.stack.getBaseSize(); + if ((width !== this.viewport.width || height !== this.viewport.height) && !this.leaving) { + // The window was relaid out (display mode change) and the native player's rect no + // longer fits the surface: back out to the panel, which lays out afresh on Play. + this.leaving = true; + setTimeout(() => this.session.returnToPanel(this.session.positionMs()), 0); + } + const image = new GrayImage(width, height, 0); + const frame = this.session.lastFrame(this.rect); + if (frame) image.bitBlt(frame, this.rect.x, this.rect.y); + if (!this.session.isPlaying()) this.drawPausedBox(image, frame === null); + return image; + } + + async handleInput(event: InputEvent): Promise { + switch (event.type) { + case "click": + this.session.togglePause(); + return; + case "scroll-up": + this.session.seekBy(-SEEK_STEP_MS); + return; + case "scroll-down": + this.session.seekBy(SEEK_STEP_MS); + return; + case "double-click": + this.session.returnToPanel(this.session.positionMs()); + return; + default: + return; + } + } + + /** + * "Paused 1:23 / 3:52" over a progress bar, below the picture when there is + * room (small sizes), else over its bottom edge. + */ + private drawPausedBox(image: GrayImage, loading: boolean): void { + const font = getDefaultSmallFont(); + const duration = this.session.info?.durationMs ?? 0; + const position = this.session.positionMs(); + const text = loading ? "Loading..." : `Paused ${formatMediaTime(position)} / ${formatMediaTime(duration)}`; + const boxWidth = Math.min(image.width - 8, font.measureText(text) + 24); + const boxHeight = font.lineHeight + 14; + const rect = this.rect; + const x = Math.round(rect.x + (rect.width - boxWidth) / 2); + const below = rect.y + rect.height + 4; + const y = below + boxHeight <= image.height ? below : Math.max(0, rect.y + rect.height - boxHeight - 6); + image.fillRoundedRect(x, y, boxWidth, boxHeight, 1, 6); + image.drawRoundedRect(x, y, boxWidth, boxHeight, 72, 6); + image.drawText(font, x + 12, y + 5, text, 220); + if (!loading && duration > 0) { + const barWidth = boxWidth - 24; + image.fillRect(x + 12, y + boxHeight - 5, barWidth, 2, 40); + image.fillRect(x + 12, y + boxHeight - 5, Math.round((barWidth * Math.min(position, duration)) / duration), 2, 200); + } + } +} + +/** A video file's player as its own window, opened from the Files app. */ +export function createVideoPlayerWindow( + windowId: string, + title: string, + path: string, + options: InProcessAppOptions, +): InProcessWindow { + const session = new VideoSession(path, title, `window:${windowId}`); + const window = createInProcessWindow({ + appId: "files", + windowId, + title, + iconLetter: "V", + icon: "film", + closeable: true, + actions: options.actions, + baseLayer: new YieldAtRootLayer(new VideoSettingsLayer(session)), + // A playing video is the thing being watched: no idle screen-off. + keepsScreenOn: () => session.isPlaying(), + onForegroundChanged: (foreground) => { + if (!foreground) session.pauseForHost(); + }, + setScreenOn: (on) => { + if (!on) session.pauseForHost(); + }, + submitFrame: options.submitFrame, + setSurfaceVisible: options.setSurfaceVisible, + removeSurface: options.removeSurface, + reconfigureSurface: options.reconfigureSurface, + onClosed: () => { + session.release(); + options.onClosed(); + }, + }); + session.attach(window); + return window; +} diff --git a/app/native/video-player.ts b/app/native/video-player.ts new file mode 100644 index 00000000..c7b0b165 --- /dev/null +++ b/app/native/video-player.ts @@ -0,0 +1,148 @@ +/** + * Bridge to the Android FaceclawVideoPlayer: decodes a video file and + * streams its frames, scaled to gray, straight into a rect of a window's + * compositor surface, with the audio on the phone's default media route. + * Android only; on iOS probeVideo reports an error and nothing plays. + */ +import { Utils } from "@nativescript/core"; +import { GrayImage } from "../graphics/image"; + +declare const com: any; +declare const java: any; +declare const global: any; + +/** Containers MediaExtractor opens (AVI is not one of them). */ +const PLAYABLE_VIDEO = /\.(mp4|m4v|mkv|webm|3gp|mov)$/i; + +export function isPlayableVideoFile(name: string): boolean { + return PLAYABLE_VIDEO.test(name); +} + +export type VideoInfo = { + /** Display size, rotation already applied. */ + width: number; + height: number; + durationMs: number; + hasAudio: boolean; +}; + +/** Read a video's size, duration and tracks; an error string when it can't be played. */ +export function probeVideo(path: string): VideoInfo | { error: string } { + if (!global.isAndroid) return { error: "Video playback is not supported on this phone" }; + try { + const raw = JSON.parse(String(com.faceclaw.app.FaceclawVideoPlayer.probe(path))); + if (raw.error) return { error: String(raw.error) }; + return { + width: Number(raw.width) || 0, + height: Number(raw.height) || 0, + durationMs: Number(raw.durationMs) || 0, + hasAudio: Boolean(raw.hasAudio), + }; + } catch (error) { + return { error: String(error) }; + } +} + +export type VideoPlaybackState = "playing" | "paused" | "ended"; + +export type VideoPlayerCallbacks = { + /** State change, or a paused seek that landed on a new frame (state "paused"). */ + onState: (state: VideoPlaybackState, positionMs: number) => void; + onError: (message: string) => void; +}; + +export type VideoStartOptions = { + path: string; + surfaceId: string; + /** The video's rect in surface coordinates. */ + rect: { x: number; y: number; width: number; height: number }; + monochrome: boolean; + /** Tone curve for gray output (ignored for monochrome); see PHOTO_GAMMA. */ + gamma: number; + audio: boolean; + startMs: number; +}; + +/** One player; frames go to whatever surface the latest start() named. Main thread only. */ +export class VideoPlayer { + private readonly player: any; + // The Java listener proxy must stay referenced or it gets GC'd. + private readonly listenerProxy: any; + // Reused direct buffer (and its JS view) for copyLastFrame; see java-direct-buffer.ts + // for why frames cross as a Java-allocated buffer. + private frameBuffer: any = null; + private frameView: Uint8Array | null = null; + + constructor(callbacks: VideoPlayerCallbacks) { + this.player = new com.faceclaw.app.FaceclawVideoPlayer(Utils.android.getApplicationContext()); + this.listenerProxy = new com.faceclaw.app.FaceclawVideoPlayer.Listener({ + onStateChanged: (state: string, positionMs: number) => { + callbacks.onState(String(state) as VideoPlaybackState, Number(positionMs)); + }, + onError: (message: string) => callbacks.onError(String(message ?? "Playback failed")), + }); + this.player.setListener(this.listenerProxy); + } + + start(options: VideoStartOptions): void { + const { rect } = options; + this.player.start( + options.path, + options.surfaceId, + Math.round(rect.x), + Math.round(rect.y), + Math.round(rect.width), + Math.round(rect.height), + options.monochrome, + options.gamma, + options.audio, + Math.max(0, Math.round(options.startMs)), + ); + } + + /** Once this returns, no more frames reach the surface until resume(). */ + pause(): void { + this.player.pause(); + } + + resume(): void { + this.player.resume(); + } + + seekTo(positionMs: number): void { + this.player.seekTo(Math.max(0, Math.round(positionMs))); + } + + positionMs(): number { + return Number(this.player.getPositionMs()); + } + + isPlaying(): boolean { + return Boolean(this.player.isPlaying()); + } + + /** The latest decoded frame at the given size, or null before one exists. */ + lastFrame(width: number, height: number): GrayImage | null { + const bytes = width * height; + if (bytes <= 0) return null; + if (!this.frameView || this.frameView.length !== bytes) { + this.frameBuffer = java.nio.ByteBuffer.allocateDirect(bytes); + this.frameView = new Uint8Array((ArrayBuffer as any).from(this.frameBuffer)); + } + if (!this.player.copyLastFrame(this.frameBuffer)) return null; + const image = new GrayImage(width, height, 0); + image.pixels.set(this.frameView); + return image; + } + + /** End playback and free the decoder and audio (the last frame stays readable). */ + stop(): void { + this.player.stop(); + } + + release(): void { + this.player.release(); + this.frameBuffer = null; + this.frameView = null; + } +} diff --git a/app/ui/shell/in-process-window.ts b/app/ui/shell/in-process-window.ts index a3ec71d5..b372593a 100644 --- a/app/ui/shell/in-process-window.ts +++ b/app/ui/shell/in-process-window.ts @@ -44,6 +44,10 @@ export type InProcessWindowOptions = { onSystemMenuOpened?: () => void; onAppMenuOpened?: () => void; setScreenOn?: ShellWindow["setScreenOn"]; + /** See ShellWindow.keepsScreenOn. */ + keepsScreenOn?: ShellWindow["keepsScreenOn"]; + /** The window came to or left the foreground (after its surface visibility follows). */ + onForegroundChanged?: (foreground: boolean) => void; /** Shared actions; requestRender is rebound to this window's render. */ actions: LayerActions; /** @@ -162,6 +166,7 @@ export function createInProcessWindow(options: InProcessWindowOptions): InProces acceptsDirectional: true, holdToTalk: options.holdToTalk, isVoiceCapturing: options.isVoiceCapturing, + keepsScreenOn: options.keepsScreenOn, setScreenOn: options.setScreenOn, heightMode, hasAppMenu: () => appMenuItems().length > 0, @@ -218,6 +223,7 @@ export function createInProcessWindow(options: InProcessWindowOptions): InProces onFocus: options.onFocus, setForeground: (foreground) => { options.setSurfaceVisible(foreground); + options.onForegroundChanged?.(foreground); }, }; const setHeightMode = (mode: WindowHeightMode) => { diff --git a/app/ui/shell/shell.ts b/app/ui/shell/shell.ts index 1eeb5243..451a5e27 100644 --- a/app/ui/shell/shell.ts +++ b/app/ui/shell/shell.ts @@ -101,6 +101,12 @@ export type ShellWindow = { holdToTalk?: boolean; /** A window owns microphone capture outside the shell voice dialog. */ isVoiceCapturing?: () => boolean; + /** + * True while the window shows something the wearer watches without + * touching anything (a playing video): the idle screen timeout waits, as + * it does for voice capture, while this window is in the foreground. + */ + keepsScreenOn?: () => boolean; /** * True when the window gives swipe-left / swipe-right (watch directional * input) a meaning; otherwise the shell forwards directionalFallback(event). @@ -647,7 +653,10 @@ class Shell { // ring. An in-flight assistant turn suspends it for the same reason (a // tool loop can run for a while with no input); once the turn ends and // the Done/Follow-up menu is showing, the normal idle timeout resumes. - if (this.activeVoiceLayer || this.activeKeyboardLayer || this.assistantSession?.isTurnActive() || this.foregroundWindow()?.isVoiceCapturing?.()) { + // A foreground window that is playing video holds it off the same way. + const foreground = this.foregroundWindow(); + if (this.activeVoiceLayer || this.activeKeyboardLayer || this.assistantSession?.isTurnActive() || + foreground?.isVoiceCapturing?.() || foreground?.keepsScreenOn?.()) { this.lastInputAtMs = nowMs; return false; } diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/VideoFrameScaler.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/VideoFrameScaler.kt new file mode 100644 index 00000000..76a45c27 --- /dev/null +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/VideoFrameScaler.kt @@ -0,0 +1,133 @@ +package com.faceclaw.app + +import kotlin.jvm.JvmStatic + +/** + * Scales one decoded video frame's luma plane into an 8bpp gray rect for a compositor surface: + * a box filter (averaging up to [MAX_TAPS] x [MAX_TAPS] evenly spaced samples per output pixel, + * nearest-neighbor when upscaling), then the container's display rotation, then a tone lookup. + * + * Only luma is read: the glasses show gray, and Y is exactly the gray a decoder hands back + * without any color conversion. Platform code owns decoding and copies the plane into a + * ByteArray; this class owns the pixel math. One instance serves one (source size, rotation, + * output size) combination and reuses its scratch buffers across frames; not thread-safe. + */ +class VideoFrameScaler( + /** Visible luma size in coded (unrotated) orientation. */ + val sourceWidth: Int, + val sourceHeight: Int, + /** Clockwise display rotation in degrees: 0, 90, 180 or 270. */ + val rotation: Int, + /** Output size in display orientation. */ + val outputWidth: Int, + val outputHeight: Int, +) { + companion object { + /** Most samples averaged along each axis per output pixel; bounds work for big downscales. */ + const val MAX_TAPS = 4 + + /** Snap any angle to the nearest of 0/90/180/270, the only rotations containers use. */ + @JvmStatic + fun normalizeRotation(degrees: Int): Int = (((((degrees % 360) + 360) % 360 + 45) / 90) % 4) * 90 + + /** + * Luma to display gray. Limited ("TV") range video codes black at 16 and white at 235, so + * it is stretched to 0..255 first. Monochrome thresholds at mid-gray to 0 or 255 (a + * 1-bit image compresses and delta-encodes far better than 16 levels); otherwise the + * gamma curve applies, as for photos (see GrayPacket.fromArgb). + */ + @JvmStatic + fun toneLut(limitedRange: Boolean, gamma: Float, monochrome: Boolean): ByteArray { + val curve = GrayPacket.toneCurve(gamma) + val lut = ByteArray(256) + for (y in 0 until 256) { + val full = if (limitedRange) ((y - 16) * 255 + 109) / 219 else y + val v = full.coerceIn(0, 255) + lut[y] = (if (monochrome) (if (v >= 128) 255 else 0) else curve[v]).toByte() + } + return lut + } + + /** + * Sample positions for each output index along one axis: [count] entries per output, + * evenly spaced inside that output's box of source pixels. + */ + private fun taps(source: Int, output: Int, count: Int): IntArray { + val positions = IntArray(output * count) + for (i in 0 until output) { + for (j in 0 until count) { + // Center of sub-box j of output i, in source pixels: (i + (j + 0.5)/count) * source / output. + val numerator = (i.toLong() * count + j) * 2 + 1 + val position = (numerator * source / (2L * count * output)).toInt() + positions[i * count + j] = position.coerceIn(0, source - 1) + } + } + return positions + } + } + + private val swapsAxes = rotation == 90 || rotation == 270 + /** Scaled size before rotation (coded orientation). */ + private val scaledWidth = if (swapsAxes) outputHeight else outputWidth + private val scaledHeight = if (swapsAxes) outputWidth else outputHeight + private val tapsX = ((sourceWidth + scaledWidth - 1) / scaledWidth).coerceIn(1, MAX_TAPS) + private val tapsY = ((sourceHeight + scaledHeight - 1) / scaledHeight).coerceIn(1, MAX_TAPS) + private val xs = taps(sourceWidth, scaledWidth, tapsX) + private val ys = taps(sourceHeight, scaledHeight, tapsY) + private val sums = IntArray(scaledWidth) + /** Unrotated scaled frame, needed only when a rotation follows. */ + private val scaled: ByteArray? = if (rotation == 0) null else ByteArray(scaledWidth * scaledHeight) + + init { + require(sourceWidth > 0 && sourceHeight > 0) { "bad source size ${sourceWidth}x$sourceHeight" } + require(outputWidth > 0 && outputHeight > 0) { "bad output size ${outputWidth}x$outputHeight" } + require(rotation == 0 || rotation == 90 || rotation == 180 || rotation == 270) { "bad rotation $rotation" } + } + + /** + * Scale the luma plane into [out] (outputWidth * outputHeight bytes, row-major). The visible + * pixel (x, y) is at luma[offset + y * rowStride + x * pixelStride]; [lut] is a 256-entry + * table from [toneLut]. + */ + fun scale(luma: ByteArray, offset: Int, rowStride: Int, pixelStride: Int, lut: ByteArray, out: ByteArray) { + require(out.size >= outputWidth * outputHeight) { "output buffer too small" } + val target = scaled ?: out + val count = tapsX * tapsY + val half = count / 2 + for (oy in 0 until scaledHeight) { + sums.fill(0) + for (ty in 0 until tapsY) { + val row = offset + ys[oy * tapsY + ty] * rowStride + var tap = 0 + for (ox in 0 until scaledWidth) { + var sum = 0 + for (tx in 0 until tapsX) { + sum += luma[row + xs[tap++] * pixelStride].toInt() and 0xff + } + sums[ox] += sum + } + } + val base = oy * scaledWidth + for (ox in 0 until scaledWidth) { + target[base + ox] = lut[(sums[ox] + half) / count] + } + } + if (scaled != null) rotate(scaled, out) + } + + /** Rotate the coded-orientation frame clockwise by [rotation] into display orientation. */ + private fun rotate(source: ByteArray, out: ByteArray) { + val w = scaledWidth + val h = scaledHeight + for (y in 0 until outputHeight) { + val base = y * outputWidth + for (x in 0 until outputWidth) { + out[base + x] = when (rotation) { + 90 -> source[(h - 1 - x) * w + y] + 180 -> source[(h - 1 - y) * w + (w - 1 - x)] + else -> source[x * w + (w - 1 - y)] + } + } + } + } +} diff --git a/tests/ios-evenhub.test.cjs b/tests/ios-evenhub.test.cjs index 7b03403c..a1c114d3 100644 --- a/tests/ios-evenhub.test.cjs +++ b/tests/ios-evenhub.test.cjs @@ -56,6 +56,7 @@ test('Files on iOS exposes Run app for EHPKs and passes the selected local path' const load = loader({ global: { isIOS: true } }, { '../../native/file-access': {}, '../../native/font-files': { isFontFile: () => false }, '../../graphics/installed-fonts': {}, '../../native/image-files': { isDecodableImageFile: () => false }, + '../../native/video-player': { isPlayableVideoFile: () => true }, '../evenhub/installed-apps': { readEvenHubPackageManifest: () => null }, '../evenhub/permission-dialog': {}, './file-browser': { FileBrowserLayer: class { constructor(options) { browserOptions = options; } } }, './file-info-dialog': { FileInfoDialogLayer: class { constructor(entry, value) { actions = value; } } }, @@ -64,6 +65,8 @@ test('Files on iOS exposes Run app for EHPKs and passes the selected local path' }); load('app/apps/files/files-app.ts').createFilesAppWindow({ openEhpkApp: path => { opened = path; }, installEhpkApp: path => { installed = path; } }); assert.equal(browserOptions.isSupportedFile('test.EHPK'), true); + // Video playback is Android-only for now. + assert.equal(browserOptions.isSupportedFile('clip.mp4'), false); const ctx = { stack: { push() {}, pop() {} } }; browserOptions.onFilePicked({ name: 'test.ehpk', path: '/Documents/test.ehpk' }, ctx); assert.deepEqual(Array.from(actions, a => a.label), ['Run app', 'Install']); diff --git a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/VideoFrameScalerTest.kt b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/VideoFrameScalerTest.kt new file mode 100644 index 00000000..144369e4 --- /dev/null +++ b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/VideoFrameScalerTest.kt @@ -0,0 +1,75 @@ +package com.faceclaw.app + +import kotlin.test.* + +class VideoFrameScalerTest { + private val identity = ByteArray(256) { it.toByte() } + + private fun scale(scaler: VideoFrameScaler, luma: ByteArray, lut: ByteArray = identity): IntArray { + val out = ByteArray(scaler.outputWidth * scaler.outputHeight) + scaler.scale(luma, 0, scaler.sourceWidth, 1, lut, out) + return IntArray(out.size) { out[it].toInt() and 0xff } + } + + @Test fun twoToOneDownscaleAveragesEachBox() { + // 4x2 source -> 2x1: each output is the mean of a 2x2 box. + val luma = byteArrayOf(0, 100, 200.toByte(), 200.toByte(), 20, 80, 100, 100) + val scaler = VideoFrameScaler(4, 2, 0, 2, 1) + assertContentEquals(intArrayOf(50, 150), scale(scaler, luma)) + } + + @Test fun largeDownscaleStaysWithinTheTapBudget() { + // 100:1 horizontally still averages only MAX_TAPS samples, spread across the box. + val luma = ByteArray(200) { (if (it % 100 < 50) 0 else 200).toByte() } + val scaler = VideoFrameScaler(200, 1, 0, 2, 1) + assertContentEquals(intArrayOf(100, 100), scale(scaler, luma)) + } + + @Test fun upscaleIsNearestNeighbor() { + val scaler = VideoFrameScaler(2, 1, 0, 4, 2) + assertContentEquals(intArrayOf(10, 10, 90, 90, 10, 10, 90, 90), scale(scaler, byteArrayOf(10, 90))) + } + + @Test fun offsetAndStridesSelectTheVisiblePlane() { + // A 2x2 visible crop at (1, 1) of a 4-wide plane, with interleaved samples (pixelStride 2). + val plane = ByteArray(40) + fun put(x: Int, y: Int, v: Int) { plane[(1 + y) * 10 + 1 + x * 2] = v.toByte() } + put(0, 0, 11); put(1, 0, 22); put(0, 1, 33); put(1, 1, 44) + val scaler = VideoFrameScaler(2, 2, 0, 2, 2) + val out = ByteArray(4) + scaler.scale(plane, 11, 10, 2, identity, out) + assertContentEquals(byteArrayOf(11, 22, 33, 44), out) + } + + @Test fun rotationsMatchTheContainerClockwiseConvention() { + // Coded 3x2: 1 2 3 + // 4 5 6 + val luma = byteArrayOf(1, 2, 3, 4, 5, 6) + assertContentEquals(intArrayOf(4, 1, 5, 2, 6, 3), scale(VideoFrameScaler(3, 2, 90, 2, 3), luma)) + assertContentEquals(intArrayOf(6, 5, 4, 3, 2, 1), scale(VideoFrameScaler(3, 2, 180, 3, 2), luma)) + assertContentEquals(intArrayOf(3, 6, 2, 5, 1, 4), scale(VideoFrameScaler(3, 2, 270, 2, 3), luma)) + } + + @Test fun normalizeRotationSnapsToQuarterTurns() { + assertEquals(0, VideoFrameScaler.normalizeRotation(0)) + assertEquals(90, VideoFrameScaler.normalizeRotation(90)) + assertEquals(270, VideoFrameScaler.normalizeRotation(-90)) + assertEquals(180, VideoFrameScaler.normalizeRotation(540)) + assertEquals(0, VideoFrameScaler.normalizeRotation(359)) + } + + @Test fun limitedRangeStretchesAndMonochromeThresholds() { + val gray = VideoFrameScaler.toneLut(limitedRange = true, gamma = 1f, monochrome = false) + assertEquals(0, gray[16].toInt() and 0xff) + assertEquals(0, gray[0].toInt() and 0xff) + assertEquals(255, gray[235].toInt() and 0xff) + assertEquals(255, gray[255].toInt() and 0xff) + val mono = VideoFrameScaler.toneLut(limitedRange = false, gamma = 2.2f, monochrome = true) + assertEquals(0, mono[127].toInt() and 0xff) + assertEquals(255, mono[128].toInt() and 0xff) + // Gamma darkens midtones but leaves the ends alone. + val photo = VideoFrameScaler.toneLut(limitedRange = false, gamma = 2.2f, monochrome = false) + assertTrue((photo[128].toInt() and 0xff) < 64) + assertEquals(255, photo[255].toInt() and 0xff) + } +} diff --git a/tests/tsconfig.json b/tests/tsconfig.json index d743aa4b..bfc76199 100644 --- a/tests/tsconfig.json +++ b/tests/tsconfig.json @@ -36,6 +36,7 @@ "../app/g2/glasses-display-state.ts", "../app/g2/glance-state.ts", "../app/apps/glanceboard/layout.ts", + "../app/apps/files/video-layout.ts", "../app/g2/pairing-candidates.ts", "../app/apps/calculator/math/*.ts", "../app/apps/microphones/mic-protocol.ts", diff --git a/tests/video-layout.test.cjs b/tests/video-layout.test.cjs new file mode 100644 index 00000000..764df76f --- /dev/null +++ b/tests/video-layout.test.cjs @@ -0,0 +1,57 @@ +const test = require("node:test"); +const assert = require("node:assert/strict"); + +const { + fitVideo, + formatMediaTime, + videoHeightMode, + videoRect, +} = require("../.test-build/app/apps/files/video-layout.js"); + +const WINDOW = { width: 576, height: 260 }; +const TALL_WINDOW = { width: 576, height: 452 }; +// ../g2flash/demos/badapple.mp4 +const BAD_APPLE = { width: 1444, height: 1080 }; + +test("fixed sizes fit their box and keep the aspect ratio", () => { + assert.deepEqual(videoRect("small", BAD_APPLE, WINDOW), { x: 208, y: 70, width: 160, height: 120 }); + assert.deepEqual(videoRect("medium", BAD_APPLE, WINDOW), { x: 168, y: 40, width: 240, height: 180 }); + const wide = videoRect("small", { width: 1920, height: 1080 }, WINDOW); + assert.equal(wide.width, 160); + assert.equal(wide.height, 90); +}); + +test("large fills the window height; full screen fills the tall window's width", () => { + assert.deepEqual(videoRect("large", BAD_APPLE, WINDOW), { x: 112, y: 0, width: 348, height: 260 }); + assert.deepEqual(videoRect("full", BAD_APPLE, TALL_WINDOW), { x: 0, y: 10, width: 576, height: 430 }); + assert.equal(videoHeightMode("full"), "max"); + assert.equal(videoHeightMode("large"), "min"); +}); + +test("rects are aligned for the delta encoder and stay inside the viewport", () => { + for (const size of ["small", "medium", "large", "full"]) { + for (const video of [BAD_APPLE, { width: 1080, height: 1920 }, { width: 100, height: 20 }, { width: 7, height: 5 }]) { + for (const viewport of [WINDOW, TALL_WINDOW, { width: 150, height: 100 }]) { + const rect = videoRect(size, video, viewport); + const where = `${size} ${video.width}x${video.height} in ${viewport.width}x${viewport.height}`; + assert.equal(rect.x % 4, 0, where); + assert.equal(rect.y % 2, 0, where); + assert.equal(rect.width % 2, 0, where); + assert.equal(rect.height % 2, 0, where); + assert.ok(rect.width >= 2 && rect.height >= 2, where); + assert.ok(rect.x + rect.width <= viewport.width, where); + assert.ok(rect.y + rect.height <= viewport.height, where); + } + } + } +}); + +test("a tiny video is scaled up to the chosen size", () => { + assert.deepEqual(fitVideo({ width: 80, height: 60 }, { width: 240, height: 180 }), { width: 240, height: 180 }); +}); + +test("media times", () => { + assert.equal(formatMediaTime(0), "0:00"); + assert.equal(formatMediaTime(232_130), "3:52"); + assert.equal(formatMediaTime(3_723_000), "1:02:03"); +}); From 06146c2b080ca5a13f203f37b11f3f6250deed12 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Tue, 29 Sep 2026 11:33:28 -0700 Subject: [PATCH 16/60] Introduce oxlint, and fix lint warnings --- .oxlintrc.json | 85 +++ CLAUDE.md | 5 +- app/apps/ai-chat/ai-chat-app.ts | 7 +- app/apps/blocks/blocks-app.worker.ts | 11 +- app/apps/calculator/calculator-app.ts | 3 +- app/apps/calculator/math/advanced.ts | 2 +- app/apps/calculator/math/number-theory.ts | 2 +- app/apps/calculator/math/polynomial.ts | 4 +- app/apps/calculator/math/solver.ts | 1 - app/apps/calculator/math/symbolic-integral.ts | 2 +- app/apps/calculator/math/text-renderer.ts | 9 +- app/apps/calculator/math/trigonometry.ts | 20 +- app/apps/calendar/calendar-app.ts | 3 +- app/apps/compass/compass-app.ts | 3 +- app/apps/developer/accelerometer-demo.ts | 2 +- app/apps/developer/buzzer-demo.ts | 2 +- app/apps/developer/screen-test.ts | 2 + app/apps/developer/unicode-test.ts | 2 + app/apps/evenhub/even-platform.ts | 4 +- app/apps/evenhub/permissions.ts | 2 +- app/apps/evenhub/session.ts | 2 +- app/apps/evenhub/updates.ts | 2 +- app/apps/files/image-viewer.ts | 1 - app/apps/flappy/flappy-app.worker.ts | 9 +- app/apps/freecell/freecell-app.worker.ts | 13 +- app/apps/glanceboard/glanceboard-app.ts | 5 +- app/apps/glanceboard/widgets/index.ts | 2 +- .../glanceboard/widgets/terminal-widget.ts | 8 +- app/apps/launcher/launcher-app.ts | 1 - app/apps/microphones/mic-control.ts | 6 +- app/apps/microphones/mic-session.ts | 12 +- app/apps/microphones/translate.ts | 4 +- .../minesweeper/minesweeper-app.worker.ts | 7 +- app/apps/navigate/navigate-app.worker.ts | 56 +- app/apps/navigate/route-follower.ts | 4 +- app/apps/pinball/pinball-app.worker.ts | 9 +- app/apps/roam/roam-api.ts | 2 +- app/apps/roam/roam-app.worker.ts | 11 +- app/apps/terminal/terminal-app.worker.ts | 7 +- app/apps/timer/timer-app.ts | 1 + app/apps/transcribe/transcribe.ts | 2 +- app/apps/weather/weather-app.ts | 3 +- app/g2/dashboard-controller.ts | 10 +- app/g2/even-advertisement.ts | 2 +- app/g2/firmware-builder.ts | 2 +- app/g2/glance-host.ts | 2 +- app/g2/glance-state.ts | 2 +- app/g2/ios-preview-controller.ts | 14 +- app/graphics/display-list.ts | 10 +- app/graphics/draw-expression.ts | 8 +- app/graphics/glyph-wire.ts | 2 +- app/graphics/image.ts | 4 +- app/graphics/shell-scene.ts | 2 +- app/native/anthropic.ts | 2 +- app/native/calendar-permissions.ios.ts | 2 +- app/native/calendar.ios.ts | 2 +- app/native/faceclaw-communicator.ios.ts | 1 - app/native/g2mirror-client.ts | 1 - app/native/ios-bluetooth.ts | 4 +- app/native/kotlin-bridge.ts | 2 +- app/native/kotlin-platform.android.ts | 2 + app/native/media-browser.ts | 4 +- app/native/media-controller.ts | 4 +- app/native/nightscout-bridge.ts | 1 - app/native/notification-icons.ts | 2 +- app/native/openai.ts | 2 +- app/native/qr-scan.ios.ts | 3 +- app/native/voice-control.ios.ts | 6 +- app/native/voice-control.ts | 4 +- app/native/wear-bridge.ts | 4 +- app/phone-ui/main-page.ios.ts | 2 +- app/phone-ui/onboarding-flash-view-model.ts | 6 +- app/remote/service.ts | 2 + app/ui/dashboard-settings.ts | 9 +- app/ui/font-picker.ts | 2 +- app/ui/notifications.ts | 9 +- app/ui/shell/brightness-picker-layer.ts | 2 + app/ui/shell/open-apps-persistence.ts | 6 +- app/ui/shell/shell.ts | 3 +- app/ui/shell/tool-debug-layer.ts | 4 +- app/ui/shell/worker-state.ts | 10 +- app/ui/shell/worker-window.ts | 3 + faceclaw-extensions/dist/index.d.ts | 236 --------- faceclaw-extensions/dist/index.js | 40 -- faceclaw-extensions/src/index.ts | 2 +- faceclaw-extensions/tsconfig.json | 1 + package-lock.json | 500 ++++++++++++++++++ package.json | 3 + tsconfig.json | 5 +- 89 files changed, 818 insertions(+), 469 deletions(-) create mode 100644 .oxlintrc.json delete mode 100644 faceclaw-extensions/dist/index.d.ts delete mode 100644 faceclaw-extensions/dist/index.js diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 00000000..5f63cfb3 --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,85 @@ +{ + // Run via ./lint.sh (or `npm run lint`). Rule docs: + // https://oxc.rs/docs/guide/usage/linter/rules.html + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["eslint", "typescript", "unicorn", "oxc", "import", "promise"], + "options": { + // Type-aware rules run through oxlint-tsgolint (typescript-go), which + // reads tsconfig.json with TS7 semantics (no baseUrl, rootDir explicit). + "typeAware": true + }, + "categories": { + "correctness": "warn", + "suspicious": "warn", + "pedantic": "off", + "perf": "off", + "style": "off", + "restriction": "off", + "nursery": "off" + }, + "rules": { + // --- Opted in from non-default categories --- + "eslint/eqeqeq": ["warn", "always", { "null": "ignore" }], + "eslint/no-fallthrough": "warn", + "eslint/no-var": "warn", + "eslint/prefer-const": "warn", + "import/no-duplicates": "warn", + "typescript/no-deprecated": "warn", + "typescript/no-misused-promises": "warn", + // Rethrowing / rejecting with a caught `unknown` is propagation, not a bug. + "typescript/only-throw-error": ["warn", { "allowThrowingUnknown": true }], + "typescript/prefer-promise-reject-errors": ["warn", { "allowThrowingUnknown": true }], + "typescript/restrict-plus-operands": "warn", + "typescript/switch-exhaustiveness-check": [ + "warn", + { "considerDefaultExhaustiveForUnions": true } + ], + + // --- Turned off from the enabled categories --- + // Intentional control-character stripping and ANSI/terminal handling. + "eslint/no-control-regex": "off", + // Private-by-convention `_field` names are common here. + "eslint/no-underscore-dangle": "off", + // Side-effect imports (polyfills, registrations) are deliberate. + "import/no-unassigned-import": "off", + // Fires on `.then()` chains used for side effects. + "promise/always-return": "off", + // Worker onmessage/postMessage are NativeScript workers, not windows. + "unicorn/prefer-add-event-listener": "off", + "unicorn/require-post-message-target-origin": "off", + // In-place sort/reverse on locally owned arrays is fine. + "unicorn/no-array-sort": "off", + "unicorn/no-array-reverse": "off", + // Stylistic: prefers hoisting closures that don't capture anything. + "unicorn/consistent-function-scoping": "off", + // `for (const l of [...listeners])` snapshots before notifying. + "unicorn/no-useless-spread": "off", + // references.d.ts pulls in @nativescript/types this way. + "typescript/triple-slash-reference": "off", + // Mostly `${error}` on unknown catch values, which is fine. + "typescript/restrict-template-expressions": "off", + // Mostly String(x) on unknown-typed parsed JSON. + "typescript/no-base-to-string": "off", + // Flags exhaustive switches that tsc already checks. + "typescript/consistent-return": "off", + // The app is not strictNullChecks, so these misfire on `!` and on + // String()/Number() coercions of Java-bridged values. + "typescript/no-unnecessary-type-assertion": "off", + "typescript/no-unnecessary-type-conversion": "off", + // Too noisy for NativeScript code that casts bridged `any` values. + "typescript/no-unsafe-type-assertion": "off" + }, + // TypeScript only: scripts, tests and vendored web code are plain JS. + "ignorePatterns": [ + "**/*.js", + "**/*.cjs", + "**/*.mjs", + "**/*.jsx", + "node_modules/**", + "platforms/**", + "dist/**", + "faceclaw-extensions/dist/**", + "old/**", + "tmp/**" + ] +} diff --git a/CLAUDE.md b/CLAUDE.md index 7dd039ef..128f6379 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -21,9 +21,10 @@ relevant tools and an Android device ID to install on; do this in build_paths.sh, which is created from build_paths.sh.template and not checked into git. -To lint and typecheck, prefer to use build.sh; if the user asks you to run or +To typecheck, prefer to use build.sh; if the user asks you to run or test the app, use build_and_run.sh and then use `adb logcat` to view the -results. +results. `lint.sh` (`npm run lint`) runs oxlint over the TypeScript, including +type-aware rules; rule selection is in .oxlintrc.json. If you are working on low-level communication bits, consider checking out https://github.com/Commute773/g2-kit-unofficial/ and referring to ble/docs/ diff --git a/app/apps/ai-chat/ai-chat-app.ts b/app/apps/ai-chat/ai-chat-app.ts index 256c90af..83b176e4 100644 --- a/app/apps/ai-chat/ai-chat-app.ts +++ b/app/apps/ai-chat/ai-chat-app.ts @@ -108,6 +108,7 @@ class AiChatLayer implements Layer { return; case "long-press-release": this.draft.release(); return; case "double-click": this.draft.cancel(); shell.yieldFocusToSidebar(); return; + default: return; } } menuItems(): MenuItem[] { @@ -123,20 +124,20 @@ class AiChatLayer implements Layer { { label: "Switch session", disabled: () => external || busy(), onSelect: (ctx) => submenu(ctx, "Sessions", [...this.conversations.list()].reverse().map((item) => ({ label: `${item.id === record.id ? "✓ " : ""}${this.conversations.title(item)}`, - onSelect: (ctx) => { if (this.conversations.select(item.id)) ctx.stack.clearToBase(); }, + onSelect: (pickCtx) => { if (this.conversations.select(item.id)) pickCtx.stack.clearToBase(); }, }))) }, { label: `Model: ${assistantModelLabel(record.model)}`, disabled: () => external || busy(), onSelect: (ctx) => submenu(ctx, "Model", ASSISTANT_MODEL_CHOICES.map((model) => ({ label: `${model === record.model ? "✓ " : ""}${assistantModelLabel(model)}`, disabled: () => !this.conversations.available(model, record.reasoning), - onSelect: (ctx) => { if (this.conversations.configure(model, record.reasoning)) ctx.stack.clearToBase(); }, + onSelect: (pickCtx) => { if (this.conversations.configure(model, record.reasoning)) pickCtx.stack.clearToBase(); }, }))) }, { label: `Reasoning: ${record.reasoning}`, disabled: () => { const llm = resolveAssistantModel(record.model, { anthropic: anthropicApiKeySetting.get(), openai: openAiApiKeySetting.get() }); return external || busy() || !llm?.effort; }, onSelect: (ctx) => submenu(ctx, "Reasoning", (["default", "low", "medium", "high"] as ReasoningLevel[]).map((reasoning) => ({ label: `${reasoning === record.reasoning ? "✓ " : ""}${reasoning === "default" ? "Model default" : reasoning}`, - onSelect: (ctx) => { if (this.conversations.configure(record.model, reasoning)) ctx.stack.clearToBase(); }, + onSelect: (pickCtx) => { if (this.conversations.configure(record.model, reasoning)) pickCtx.stack.clearToBase(); }, }))) }, ...(record.session?.isTurnActive() ? [{ label: "Cancel response", onSelect: (ctx: LayerContext) => { record.session?.cancel(); ctx.stack.clearToBase(); diff --git a/app/apps/blocks/blocks-app.worker.ts b/app/apps/blocks/blocks-app.worker.ts index b17adaf0..fb4ffd3b 100644 --- a/app/apps/blocks/blocks-app.worker.ts +++ b/app/apps/blocks/blocks-app.worker.ts @@ -284,6 +284,11 @@ global.onmessage = (event: { data: WorkerAppMessage }) => { updateTickTimer(window); } break; + case "navigation-sensors": + case "resize-window": + case "text-input": + case "tool-call": + break; } }; @@ -349,7 +354,7 @@ function handleInput(window: BlocksWindow, event: InputEvent, frameId: number): // An open window menu owns all input (it closes itself via pop); menus are // list UIs, so watch swipes take their standard fallback meanings there. if (window.menu?.isOpen()) { - window.menu + void window.menu .handleInput(directionalFallback(event)) .catch((error) => console.error(`blocks menu input failed: ${error}`)) .then(() => renderAndSubmit(window, frameId)); @@ -605,7 +610,7 @@ function paintContent(window: BlocksWindow): GrayImage { drawCenteredIn(image, smallFont, BOARD_X, COLS * CELL, BOARD_Y + 150, `${GESTURE_DOUBLE_CLICK} leave`, 150); } else { paintBoard(image, window); - if (window.phase === "game-over") paintGameOver(image, window); + if (window.phase === "game-over") paintGameOver(image); } paintPanel(image, window); return image; @@ -637,7 +642,7 @@ function drawCell(image: GrayImage, x: number, y: number, shade: number): void { image.fillRect(BOARD_X + x * CELL, BOARD_Y + y * CELL, CELL - 1, CELL - 1, shade); } -function paintGameOver(image: GrayImage, window: BlocksWindow): void { +function paintGameOver(image: GrayImage): void { const boxY = BOARD_Y + 70; image.fillRect(BOARD_X, boxY, COLS * CELL, 100, 0); image.drawRect(BOARD_X + 4, boxY + 4, COLS * CELL - 8, 92, 150); diff --git a/app/apps/calculator/calculator-app.ts b/app/apps/calculator/calculator-app.ts index 53b68053..e71b827a 100644 --- a/app/apps/calculator/calculator-app.ts +++ b/app/apps/calculator/calculator-app.ts @@ -96,8 +96,7 @@ export function createCalculatorAppWindow(options: InProcessAppOptions): InProce }, ]; - let app: InProcessWindow; - app = createInProcessWindow({ + const app = createInProcessWindow({ appId: "calculator", windowId: CALCULATOR_WINDOW_ID, title: "Calculator", diff --git a/app/apps/calculator/math/advanced.ts b/app/apps/calculator/math/advanced.ts index 3ceb5112..fcba203e 100644 --- a/app/apps/calculator/math/advanced.ts +++ b/app/apps/calculator/math/advanced.ts @@ -24,7 +24,7 @@ import { findDigits, highlightedMatch, } from "./digit-search"; -import { type MathWorkload, longRunOffer as makeLongRunOffer, type LongRunOffer } from "./workload"; +import { type MathWorkload } from "./workload"; import { binomial, factorizationText, diff --git a/app/apps/calculator/math/number-theory.ts b/app/apps/calculator/math/number-theory.ts index 405b3c42..dd3f83e9 100644 --- a/app/apps/calculator/math/number-theory.ts +++ b/app/apps/calculator/math/number-theory.ts @@ -322,7 +322,7 @@ export function digitalRoot(value: number): number { export function isPalindrome(value: number): boolean { const text = String(Math.abs(value)); - return text === [...text].reverse().join(""); + return text === text.split("").reverse().join(""); } export function isPerfect(value: number): boolean { diff --git a/app/apps/calculator/math/polynomial.ts b/app/apps/calculator/math/polynomial.ts index 404ed4a7..b93e7269 100644 --- a/app/apps/calculator/math/polynomial.ts +++ b/app/apps/calculator/math/polynomial.ts @@ -123,7 +123,7 @@ export class Polynomial { */ dividingByRoot(root: MathNumber): Polynomial { if (this.degree < 1) return this; - const quotient: MathNumber[] = new Array(this.degree).fill(integer(0)); + const quotient: MathNumber[] = Array.from({ length: this.degree }, () => integer(0)); let carry: MathNumber = integer(0); for (let power = this.degree; power >= 1; power--) { const coefficient = add(this.at(power), carry); @@ -235,7 +235,7 @@ function addAt(value: MathNumber, power: number, coefficients: MathNumber[]): vo function convolve(lhs: MathNumber[], rhs: MathNumber[]): MathNumber[] { if (lhs.length === 0 || rhs.length === 0) return [integer(0)]; - const result: MathNumber[] = new Array(lhs.length + rhs.length - 1).fill(integer(0)); + const result: MathNumber[] = Array.from({ length: lhs.length + rhs.length - 1 }, () => integer(0)); for (let i = 0; i < lhs.length; i++) { if (isZero(lhs[i]!)) continue; for (let j = 0; j < rhs.length; j++) { diff --git a/app/apps/calculator/math/solver.ts b/app/apps/calculator/math/solver.ts index 385d2a44..1a34afab 100644 --- a/app/apps/calculator/math/solver.ts +++ b/app/apps/calculator/math/solver.ts @@ -19,7 +19,6 @@ import { multiplyExpr, negate, num, - numberValue, relation as relationExpr, spokenRelation, subtractExpr, diff --git a/app/apps/calculator/math/symbolic-integral.ts b/app/apps/calculator/math/symbolic-integral.ts index 6897868f..7d71367f 100644 --- a/app/apps/calculator/math/symbolic-integral.ts +++ b/app/apps/calculator/math/symbolic-integral.ts @@ -29,12 +29,12 @@ import { numberEquals, rational, reciprocal, + isZero, } from "./math-number"; import { simplify } from "./simplifier"; import { differentiate, integrateNumeric } from "./derivative"; import { evaluateValue } from "./evaluator"; import { Polynomial } from "./polynomial"; -import { isZero } from "./math-number"; /** Indefinite integral with respect to `variable`, without the constant. */ export function integrate(expression: MathExpression, variable: string): MathExpression | null { diff --git a/app/apps/calculator/math/text-renderer.ts b/app/apps/calculator/math/text-renderer.ts index 04adcb95..57dbad68 100644 --- a/app/apps/calculator/math/text-renderer.ts +++ b/app/apps/calculator/math/text-renderer.ts @@ -103,8 +103,7 @@ function render(expression: MathExpression, parentPrecedence: number): string { return wrap(`1/${inner}`, parentPrecedence > PRECEDENCE.product); } const body = - `${render(expression.base, PRECEDENCE.power + 1)}` + - `^${render(expression.exponent, PRECEDENCE.power + 1)}`; + `${render(expression.base, PRECEDENCE.power + 1)}^${render(expression.exponent, PRECEDENCE.power + 1)}`; return wrap(body, parentPrecedence > PRECEDENCE.power); } @@ -116,11 +115,7 @@ function render(expression: MathExpression, parentPrecedence: number): string { } case "relation": - return ( - `${render(expression.lhs, PRECEDENCE.relation)} ` + - `${expression.relation} ` + - `${render(expression.rhs, PRECEDENCE.relation)}` - ); + return `${render(expression.lhs, PRECEDENCE.relation)} ${expression.relation} ${render(expression.rhs, PRECEDENCE.relation)}`; } } diff --git a/app/apps/calculator/math/trigonometry.ts b/app/apps/calculator/math/trigonometry.ts index 53ba6fe7..82e19ab8 100644 --- a/app/apps/calculator/math/trigonometry.ts +++ b/app/apps/calculator/math/trigonometry.ts @@ -26,14 +26,14 @@ export type SolutionFamily = { baseExpression: MathExpression | null; }; -export function familyValues(family: SolutionFamily, lower: number, upper: number): number[] { - if (family.period <= 0) { - return family.base >= lower && family.base <= upper ? [family.base] : []; +export function familyValues(solutionFamily: SolutionFamily, lower: number, upper: number): number[] { + if (solutionFamily.period <= 0) { + return solutionFamily.base >= lower && solutionFamily.base <= upper ? [solutionFamily.base] : []; } const results: number[] = []; - let n = Math.floor((lower - family.base) / family.period); + let n = Math.floor((lower - solutionFamily.base) / solutionFamily.period); for (;;) { - const value = family.base + n * family.period; + const value = solutionFamily.base + n * solutionFamily.period; if (value > upper) break; if (value >= lower) results.push(value); n += 1; @@ -42,14 +42,14 @@ export function familyValues(family: SolutionFamily, lower: number, upper: numbe return results; } -export function familyText(family: SolutionFamily): string { - const baseText = family.baseExpression - ? plain(family.baseExpression) - : describeNumber(fromDecimal(family.base)); +export function familyText(solutionFamily: SolutionFamily): string { + const baseText = solutionFamily.baseExpression + ? plain(solutionFamily.baseExpression) + : describeNumber(fromDecimal(solutionFamily.base)); // The separator is load-bearing: "2*pi" run straight into the index reads // as "2*pin", a different and nonsensical expression to anyone scanning it // on the lens. - const periodText = describePi(family.period); + const periodText = describePi(solutionFamily.period); return `${baseText} + ${periodText}·n`; } diff --git a/app/apps/calendar/calendar-app.ts b/app/apps/calendar/calendar-app.ts index 80098e9b..39caf6ff 100644 --- a/app/apps/calendar/calendar-app.ts +++ b/app/apps/calendar/calendar-app.ts @@ -21,7 +21,6 @@ export const CALENDAR_SURFACE_ID = "window:calendar"; */ export function createCalendarAppWindow(options: InProcessAppOptions): InProcessWindow { let requesting = false; - let app: InProcessWindow; let unsubscribe = () => {}; let tick: ReturnType | null = null; @@ -37,7 +36,7 @@ export function createCalendarAppWindow(options: InProcessAppOptions): InProcess .finally(() => { requesting = false; }); }; - app = createInProcessWindow({ + const app = createInProcessWindow({ appId: "calendar", windowId: CALENDAR_WINDOW_ID, title: "Calendar", diff --git a/app/apps/compass/compass-app.ts b/app/apps/compass/compass-app.ts index 3c7b9b1c..00e0c818 100644 --- a/app/apps/compass/compass-app.ts +++ b/app/apps/compass/compass-app.ts @@ -211,10 +211,9 @@ class CompassLayer implements Layer { } export function createCompassAppWindow(options: InProcessAppOptions): InProcessWindow { - let app: InProcessWindow; let requestRender = () => {}; const layer = new CompassLayer(() => requestRender()); - app = createInProcessWindow({ + const app = createInProcessWindow({ appId: "compass", windowId: COMPASS_WINDOW_ID, title: "Compass", diff --git a/app/apps/developer/accelerometer-demo.ts b/app/apps/developer/accelerometer-demo.ts index 657e85cf..bdc88c0a 100644 --- a/app/apps/developer/accelerometer-demo.ts +++ b/app/apps/developer/accelerometer-demo.ts @@ -2,7 +2,7 @@ import { getDefaultMediumFont, getDefaultSmallFont } from "../../graphics/ui-fon import { GrayImage } from "../../graphics/image"; import { clamp } from "../../util/numeric-util"; import { addImuListener, imuSourceLabel, setImuReportEnabled, type ImuReading } from "../../native/imu"; -import { GESTURE_DOUBLE_CLICK, type InputEvent } from "../../ui/gestures"; +import { type InputEvent } from "../../ui/gestures"; import { Layer, type LayerContext } from "../../ui/layers"; import { shell } from "../../ui/shell/shell"; diff --git a/app/apps/developer/buzzer-demo.ts b/app/apps/developer/buzzer-demo.ts index 1772d555..258ace7c 100644 --- a/app/apps/developer/buzzer-demo.ts +++ b/app/apps/developer/buzzer-demo.ts @@ -1,7 +1,7 @@ import { getDefaultSmallFont } from "../../graphics/ui-fonts"; import { GrayImage } from "../../graphics/image"; import { Layer, type LayerActions, type LayerContext } from "../../ui/layers"; -import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL, type InputEvent } from "../../ui/gestures"; +import { GESTURE_CLICK, type InputEvent } from "../../ui/gestures"; import { Menu, type MenuDrawArgs } from "../../ui/menu-core"; import { centeredTextY, tightRowHeight } from "../../ui/metrics"; import { diff --git a/app/apps/developer/screen-test.ts b/app/apps/developer/screen-test.ts index af3e7491..52cb911f 100644 --- a/app/apps/developer/screen-test.ts +++ b/app/apps/developer/screen-test.ts @@ -64,6 +64,8 @@ export class ScreenTestLayer implements Layer { case "double-click": ctx.stack.pop(); return; + default: + return; } } } diff --git a/app/apps/developer/unicode-test.ts b/app/apps/developer/unicode-test.ts index 35c3ff37..200c86d7 100644 --- a/app/apps/developer/unicode-test.ts +++ b/app/apps/developer/unicode-test.ts @@ -236,6 +236,8 @@ export class UnicodeSampleLayer implements Layer { case "double-click": ctx.stack.pop(); return; + default: + return; } } diff --git a/app/apps/evenhub/even-platform.ts b/app/apps/evenhub/even-platform.ts index bee53a2c..18283f3d 100644 --- a/app/apps/evenhub/even-platform.ts +++ b/app/apps/evenhub/even-platform.ts @@ -1,4 +1,4 @@ -import { Application } from "@nativescript/core"; +import { Utils } from "@nativescript/core"; export function hmacSha256Base64(secret: string, message: string): string { const charset = java.nio.charset.StandardCharsets.UTF_8; @@ -10,7 +10,7 @@ export function hmacSha256Base64(secret: string, message: string): string { } export function getPhoneOpenUdid(): string { - const resolver = Application.android.context?.getContentResolver(); + const resolver = Utils.android.getApplicationContext()?.getContentResolver(); const id = resolver ? String(android.provider.Settings.Secure.getString(resolver, android.provider.Settings.Secure.ANDROID_ID) ?? "") : ""; if (!id) throw new Error("Android did not provide a device ID for EvenHub authentication."); return id; diff --git a/app/apps/evenhub/permissions.ts b/app/apps/evenhub/permissions.ts index 31c545f0..0eeb0f59 100644 --- a/app/apps/evenhub/permissions.ts +++ b/app/apps/evenhub/permissions.ts @@ -22,7 +22,7 @@ export type EvenHubPermissionName = | "album" | "camera" | "fs" - | string; + | (string & {}); export type EvenHubPermission = { name: EvenHubPermissionName; diff --git a/app/apps/evenhub/session.ts b/app/apps/evenhub/session.ts index 19bb344c..95957c1d 100644 --- a/app/apps/evenhub/session.ts +++ b/app/apps/evenhub/session.ts @@ -1177,7 +1177,7 @@ export class EvenHubSession implements EvenHubMicClient, EvenHubImuClient, EvenH } return out; }; - if (requested.length === 0 || requested.every((id) => this.grantedApiKeys.has(id))) { + if (requested.every((id) => this.grantedApiKeys.has(id))) { return Promise.resolve(buildGrant()); } if (!this.windowHooks) return Promise.resolve({}); diff --git a/app/apps/evenhub/updates.ts b/app/apps/evenhub/updates.ts index 05139c4c..0a2016aa 100644 --- a/app/apps/evenhub/updates.ts +++ b/app/apps/evenhub/updates.ts @@ -73,7 +73,7 @@ export async function checkForEvenHubUpdates( onProgress?: (done: number, total: number) => void, ): Promise { const installed = getInstalledEvenHubApps(); - const results: EvenHubAppUpdate[] = new Array(installed.length); + const results: EvenHubAppUpdate[] = []; let next = 0; let done = 0; const worker = async () => { diff --git a/app/apps/files/image-viewer.ts b/app/apps/files/image-viewer.ts index 974dae06..a6bf3456 100644 --- a/app/apps/files/image-viewer.ts +++ b/app/apps/files/image-viewer.ts @@ -1,4 +1,3 @@ -import { type BdfFont } from "../../graphics/bdffont"; import { getDefaultSmallFont } from "../../graphics/ui-fonts"; import { truncateText } from "../../graphics/textwrap"; import { GrayImage } from "../../graphics/image"; diff --git a/app/apps/flappy/flappy-app.worker.ts b/app/apps/flappy/flappy-app.worker.ts index bdfb7c7a..27fae1c7 100644 --- a/app/apps/flappy/flappy-app.worker.ts +++ b/app/apps/flappy/flappy-app.worker.ts @@ -287,6 +287,10 @@ global.onmessage = (event: { data: WorkerAppMessage }) => { syncTickTimer(window); } break; + case "navigation-sensors": + case "text-input": + case "tool-call": + break; } }; @@ -383,7 +387,7 @@ function handleInput(window: FlappyWindow, event: InputEvent, frameId: number): // An open window menu owns all input (it closes itself via pop); menus are // list UIs, so watch swipes take their standard fallback meanings there. if (window.menu?.isOpen()) { - window.menu + void window.menu .handleInput(directionalFallback(event)) .catch((error) => console.error(`flappy menu input failed: ${error}`)) .then(() => renderAndSubmit(window, frameId)); @@ -728,6 +732,9 @@ function paintHud(image: GrayImage, window: FlappyWindow): void { `${GESTURE_CLICK} new game ${GESTURE_DOUBLE_CLICK} leave`, ]); break; + case "playing": + case "dying": + break; } } diff --git a/app/apps/freecell/freecell-app.worker.ts b/app/apps/freecell/freecell-app.worker.ts index ae4f2dc0..fb939857 100644 --- a/app/apps/freecell/freecell-app.worker.ts +++ b/app/apps/freecell/freecell-app.worker.ts @@ -58,9 +58,6 @@ function rankOf(card: number): number { function isRed(card: number): boolean { return (card & 1) === 1; } -function cardLabel(card: number): string { - return RANK_CHARS[rankOf(card)]! + SUIT_CHARS[suitOf(card)]!; -} const CARD_W = 60; const CARD_H = 36; @@ -208,6 +205,13 @@ global.onmessage = (event: { data: WorkerAppMessage }) => { if (window.foreground) renderAndSubmit(window, 0); break; } + case "input-focus": + case "navigation-sensors": + case "resize-window": + case "screen": + case "text-input": + case "tool-call": + break; } }; @@ -285,7 +289,7 @@ function handleInput(window: FreecellWindow, event: InputEvent, frameId: number) // An open window menu owns all input (it closes itself via pop); menus are // list UIs, so watch swipes take their standard fallback meanings there. if (window.menu?.isOpen()) { - window.menu + void window.menu .handleInput(directionalFallback(event)) .catch((error) => console.error(`freecell menu input failed: ${error}`)) .then(() => renderAndSubmit(window, frameId)); @@ -792,7 +796,6 @@ function paintCard( if (selected) image.drawRoundedRect(x + 1, y + 1, CARD_W - 2, CARD_H - 2, 255, 3); const rankText: string = RANK_CHARS[rankOf(card)]! const suitText: string = SUIT_CHARS[suitOf(card)]!; - const labelText = rankText + suitText; image.drawText(labelFont, x + 5, y, rankText, 255); image.drawText(suitFont, x + 5 + labelFont.measureText(rankText), y + 3, suitText, 150); if (isRed(card)) { diff --git a/app/apps/glanceboard/glanceboard-app.ts b/app/apps/glanceboard/glanceboard-app.ts index e6bc38f7..f0af566c 100644 --- a/app/apps/glanceboard/glanceboard-app.ts +++ b/app/apps/glanceboard/glanceboard-app.ts @@ -344,7 +344,6 @@ class GlancePreviewLayer implements Layer { export function createGlanceboardAppWindow(options: InProcessAppOptions): InProcessWindow { let previewVisible = false; const heightMode = () => previewVisible && glanceLayoutSetting.get() === "2x3" ? "max" as const : "medium" as const; - let unsubscribeSettings: (() => void) | undefined; const app = createInProcessWindow({ appId: "glanceboard", windowId: GLANCEBOARD_WINDOW_ID, @@ -367,10 +366,10 @@ export function createGlanceboardAppWindow(options: InProcessAppOptions): InProc removeSurface: options.removeSurface, reconfigureSurface: options.reconfigureSurface, onClosed: () => { - unsubscribeSettings?.(); + unsubscribeSettings(); options.onClosed(); }, }); - unsubscribeSettings = onAnySettingChanged(() => app.setHeightMode(heightMode())); + const unsubscribeSettings = onAnySettingChanged(() => app.setHeightMode(heightMode())); return app; } diff --git a/app/apps/glanceboard/widgets/index.ts b/app/apps/glanceboard/widgets/index.ts index 2efd48ab..fa15a5ec 100644 --- a/app/apps/glanceboard/widgets/index.ts +++ b/app/apps/glanceboard/widgets/index.ts @@ -16,7 +16,7 @@ export const GLANCE_WIDGETS: readonly GlanceWidgetDefinition[] = [ { id: "music", label: "Music", create: () => new MusicWidget() }, ]; -export function findGlanceWidget(id: GlanceWidgetId | string): GlanceWidgetDefinition | null { +export function findGlanceWidget(id: GlanceWidgetId | (string & {})): GlanceWidgetDefinition | null { return GLANCE_WIDGETS.find((widget) => widget.id === id) ?? null; } diff --git a/app/apps/glanceboard/widgets/terminal-widget.ts b/app/apps/glanceboard/widgets/terminal-widget.ts index b48b8543..0401cf1c 100644 --- a/app/apps/glanceboard/widgets/terminal-widget.ts +++ b/app/apps/glanceboard/widgets/terminal-widget.ts @@ -26,7 +26,7 @@ const BOTTOM_MARGIN = 2; * once the snapshot is in. */ export class TerminalWidget implements GlanceWidget { - private snapshot: TerminalSessionsSnapshot | undefined = readWorkerState(TERMINAL_SESSIONS_STATE_KEY); + private snapshot = readWorkerState(TERMINAL_SESSIONS_STATE_KEY) as TerminalSessionsSnapshot | undefined; private unsubscribe: (() => void) | null = null; private requestRender: (() => void) | null = null; private phase = 0; @@ -34,9 +34,9 @@ export class TerminalWidget implements GlanceWidget { start(requestRender: () => void): void { this.requestRender = requestRender; - this.snapshot = readWorkerState(TERMINAL_SESSIONS_STATE_KEY); - this.unsubscribe = onWorkerStateChanged(TERMINAL_SESSIONS_STATE_KEY, (snapshot) => { - this.snapshot = snapshot; + this.snapshot = readWorkerState(TERMINAL_SESSIONS_STATE_KEY) as TerminalSessionsSnapshot | undefined; + this.unsubscribe = onWorkerStateChanged(TERMINAL_SESSIONS_STATE_KEY, (snapshot) => { + this.snapshot = snapshot as TerminalSessionsSnapshot; this.syncAnimation(); requestRender(); }); diff --git a/app/apps/launcher/launcher-app.ts b/app/apps/launcher/launcher-app.ts index 28ba2a90..a50ea683 100644 --- a/app/apps/launcher/launcher-app.ts +++ b/app/apps/launcher/launcher-app.ts @@ -1,4 +1,3 @@ -import { type BdfFont } from "../../graphics/bdffont"; import { getDefaultSmallFont } from "../../graphics/ui-fonts"; import { truncateText } from "../../graphics/textwrap"; import { GrayImage } from "../../graphics/image"; diff --git a/app/apps/microphones/mic-control.ts b/app/apps/microphones/mic-control.ts index 49b46251..fbb6a7b6 100644 --- a/app/apps/microphones/mic-control.ts +++ b/app/apps/microphones/mic-control.ts @@ -57,7 +57,7 @@ export function loadMicConfig(): MicConfig { return { ...defaults, ...parsed, - hostMics: { ...defaults.hostMics, ...(parsed.hostMics ?? {}) }, + hostMics: { ...defaults.hostMics, ...parsed.hostMics }, }; } catch { return defaultMicConfig(); @@ -72,8 +72,8 @@ class MicArrayController { private readonly statusListeners = new Set<(statuses: MicArrayStatuses) => void>(); private statuses: MicArrayStatuses = { left: null, right: null }; // The Java listener proxy must stay referenced or it gets GC'd. - private statusProxy: any | null = null; - private proxyCommunicator: any | null = null; + private statusProxy: any = null; + private proxyCommunicator: any = null; private leaseTimer: ReturnType | null = null; private armed = false; diff --git a/app/apps/microphones/mic-session.ts b/app/apps/microphones/mic-session.ts index 5f019ab8..9de1aba3 100644 --- a/app/apps/microphones/mic-session.ts +++ b/app/apps/microphones/mic-session.ts @@ -16,7 +16,6 @@ import { type HeadOrientation, } from "./dsp"; import { micArrayController, micControlSupported, loadMicConfig, saveMicConfig } from "./mic-control"; -import type { MicConfig } from "./mic-protocol"; import { micModelPath } from "./mic-models"; import { MIC_CHANNEL_KEYS, @@ -27,6 +26,7 @@ import { splitConcatenatedPcm16, templeActive, type MicChannelKey, + type MicConfig, type MicSide, } from "./mic-protocol"; import { @@ -158,8 +158,8 @@ class MicSession { // Captions state. private captionLines: CaptionLine[] = []; - private captionEngine: any | null = null; - private captionListenerProxy: any | null = null; + private captionEngine: any = null; + private captionListenerProxy: any = null; private captionsActive = false; private engineStartWallMs = 0; private sessionRowId = -1; @@ -168,7 +168,7 @@ class MicSession { private conversationLang = "und"; // Recording state. - private recorder: any | null = null; + private recorder: any = null; private recordingPath = ""; // Stock path subscriptions. @@ -177,7 +177,7 @@ class MicSession { private offCompass: (() => void) | null = null; // Extended path. - private forwardingProxy: any | null = null; + private forwardingProxy: any = null; private temples = new Map(); private templeAngles: { left: number | null; right: number | null } = { left: null, right: null }; private templeSsr: { left: number; right: number } = { left: 0, right: 0 }; @@ -193,7 +193,7 @@ class MicSession { private offVoiceActivity: (() => void) | null = null; // Phone-side spectral noise suppressor (FaceclawNoiseSuppressor). - private suppressor: any | null = null; + private suppressor: any = null; private suppressorEngine = ""; // True between the caption engine's speech-start event and the utterance diff --git a/app/apps/microphones/translate.ts b/app/apps/microphones/translate.ts index 8ddb1a2d..d27bbfa4 100644 --- a/app/apps/microphones/translate.ts +++ b/app/apps/microphones/translate.ts @@ -8,7 +8,7 @@ declare const java: any; * translation to the phone's default language beneath it. */ -let languageIdentifier: any | null = null; +let languageIdentifier: any = null; // Translators are expensive to build (model download on first use); cache by // "src>dst" and keep the proxies referenced so they aren't GC'd mid-flight. const translators = new Map(); @@ -59,7 +59,7 @@ export function identifyLanguage(text: string): Promise { }); } -function translatorFor(sourceLang: string, targetLang: string): any | null { +function translatorFor(sourceLang: string, targetLang: string): any { const key = `${sourceLang}>${targetLang}`; const cached = translators.get(key); if (cached) return cached; diff --git a/app/apps/minesweeper/minesweeper-app.worker.ts b/app/apps/minesweeper/minesweeper-app.worker.ts index ebc22c9f..a4320d83 100644 --- a/app/apps/minesweeper/minesweeper-app.worker.ts +++ b/app/apps/minesweeper/minesweeper-app.worker.ts @@ -250,6 +250,11 @@ global.onmessage = (event: { data: WorkerAppMessage }) => { syncClock(window); } break; + case "navigation-sensors": + case "resize-window": + case "text-input": + case "tool-call": + break; } }; @@ -350,7 +355,7 @@ function handleInput(window: MinesweeperWindow, event: InputEvent, frameId: numb // An open window menu owns all input (it closes itself via pop); menus are // list UIs, so watch swipes take their standard fallback meanings there. if (window.menu?.isOpen()) { - window.menu + void window.menu .handleInput(directionalFallback(event)) .catch((error) => console.error(`minesweeper menu input failed: ${error}`)) .then(() => renderAndSubmit(window, frameId)); diff --git a/app/apps/navigate/navigate-app.worker.ts b/app/apps/navigate/navigate-app.worker.ts index 14cdd830..4bdef4ab 100644 --- a/app/apps/navigate/navigate-app.worker.ts +++ b/app/apps/navigate/navigate-app.worker.ts @@ -63,7 +63,16 @@ import { GESTURE_SHORT_THEN_LONG_PRESS, type InputEvent, } from "../../ui/gestures"; -import { LocationTracker, type TrackedLocation } from "./navigation-sensors"; +import { + addCompassListener, + COMPASS_CHANGED, + handleNavigationSensorEvent, + LocationTracker, + magneticDeclinationDegrees, + setCompassEnabled, + type CompassEvent, + type TrackedLocation, +} from "./navigation-sensors"; import { fetchRoute, fetchStaticMapGray, @@ -75,14 +84,11 @@ import { type RouteProfile, type StaticMapCamera, } from "../../native/mapbox"; -import { addCompassListener, COMPASS_CHANGED, setCompassEnabled, type CompassEvent } from "./navigation-sensors"; -import { magneticDeclinationDegrees, handleNavigationSensorEvent } from "./navigation-sensors"; import { calibrateHeading, normalizeHeading } from "../compass/calibration"; import { bearingDegrees, haversineMeters, RouteFollower, type RouteProgress } from "./route-follower"; import { drawManeuverGlyph } from "./maneuver-icons"; declare const global: any; -declare const com: any; const MAP_SIZE = 260; const PANEL_X = MAP_SIZE + 10; @@ -376,6 +382,8 @@ global.onmessage = (event: { data: WorkerAppMessage }) => { ); break; } + case "input-focus": + break; } }; @@ -914,7 +922,7 @@ function describeRouteStatus(): string { * display and saved-destination settings (Home, Work, custom named places), and the * recent-destinations preference. */ -function windowMenuItems(win: NavWindow): MenuItem[] { +function windowMenuItems(): MenuItem[] { const items: MenuItem[] = []; if (phase !== "idle") { items.push({ @@ -993,15 +1001,15 @@ function savedDestinationMenuItems(): MenuItem[] { const work = saved.find((d) => d.id === WORK_DESTINATION_ID); items.push(addressMenuItem("Home", HOME_DESTINATION_ID, home?.address ?? "")); items.push(addressMenuItem("Work", WORK_DESTINATION_ID, work?.address ?? "")); - for (const destination of saved) { - if (destination.builtin) continue; + for (const dest of saved) { + if (dest.builtin) continue; items.push({ - label: destination.name, + label: dest.name, onSelect: (ctx) => { - ctx.stack.push(new WindowMenuLayer(destination.name, customDestinationMenuItems(destination))); + ctx.stack.push(new WindowMenuLayer(dest.name, customDestinationMenuItems(dest))); }, render: ({ image, x, y, width, height }) => { - drawAddressRow(image, x, y, width, destination.name, destination.address, true); + drawAddressRow(image, x, y, width, dest.name, dest.address, true); drawSubmenuIndicator(image, smallFont, x - 10, y, width + 20, height, 150); }, }); @@ -1028,14 +1036,14 @@ function addressMenuItem(label: string, id: string, address: string): MenuItem { }; } -function customDestinationMenuItems(destination: SavedDestination): MenuItem[] { +function customDestinationMenuItems(dest: SavedDestination): MenuItem[] { return [ { label: "Navigate there", - disabled: !destination.address, + disabled: !dest.address, onSelect: (ctx) => { closeMenusAnd(ctx, () => { - void startNavigationTo({ kind: "query", query: destination.address, label: destination.name }, profile).catch( + void startNavigationTo({ kind: "query", query: dest.address, label: dest.name }, profile).catch( () => {}, ); }); @@ -1044,16 +1052,16 @@ function customDestinationMenuItems(destination: SavedDestination): MenuItem[] { { label: "Set address", onSelect: (ctx) => { - closeMenusAnd(ctx, () => beginAddressEdit(destination.id, destination.name, destination.address)); + closeMenusAnd(ctx, () => beginAddressEdit(dest.id, dest.name, dest.address)); }, }, { label: "Rename", onSelect: (ctx) => { closeMenusAnd(ctx, () => { - navigateDestinationNameDraftSetting.set(destination.name); - beginEdit(navigateDestinationNameDraftSetting, `Rename ${destination.name}`, (name) => { - if (name) updateCustomDestination(destination.id, { name }); + navigateDestinationNameDraftSetting.set(dest.name); + beginEdit(navigateDestinationNameDraftSetting, `Rename ${dest.name}`, (name) => { + if (name) updateCustomDestination(dest.id, { name }); }); }); }, @@ -1062,7 +1070,7 @@ function customDestinationMenuItems(destination: SavedDestination): MenuItem[] { label: "Remove", onSelect: (ctx) => { closeMenusAnd(ctx, () => { - removeCustomDestination(destination.id); + removeCustomDestination(dest.id); syncIdleList(); }); }, @@ -1195,10 +1203,10 @@ function idleEntries(): IdleEntry[] { run: () => { void startMap(); }, }]; entries.push(...loadSavedDestinations() - .filter((destination) => destination.address) - .map((destination): IdleEntry => ({ kind: "saved", destination }))); - for (const destination of loadRecentDestinations()) { - entries.push({ kind: "recent", destination }); + .filter((dest) => dest.address) + .map((dest): IdleEntry => ({ kind: "saved", destination: dest }))); + for (const dest of loadRecentDestinations()) { + entries.push({ kind: "recent", destination: dest }); } return entries; } @@ -1250,7 +1258,7 @@ function windowMenu(win: NavWindow): WindowMenu { windowId: win.windowId, post, title: () => win.title, - items: () => windowMenuItems(win), + items: () => windowMenuItems(), size: { width: win.viewportWidth, height: win.viewportHeight }, paintBase: () => paintContent(win), isFocused: () => win.focused, @@ -1261,7 +1269,7 @@ function windowMenu(win: NavWindow): WindowMenu { function handleInput(win: NavWindow, event: InputEvent, frameId: number): void { if (win.menu?.isOpen()) { - win.menu + void win.menu .handleInput(event) .catch((error) => console.error(`navigate menu input failed: ${error}`)) .then(() => renderAndSubmit(win, frameId)); diff --git a/app/apps/navigate/route-follower.ts b/app/apps/navigate/route-follower.ts index e40fe8c1..455f83ba 100644 --- a/app/apps/navigate/route-follower.ts +++ b/app/apps/navigate/route-follower.ts @@ -46,7 +46,7 @@ export class RouteFollower { constructor(route: Route) { this.route = route; - this.vertexMeters = new Array(route.coordinates.length); + this.vertexMeters = Array.from({ length: route.coordinates.length }, () => 0); let along = 0; this.vertexMeters[0] = 0; for (let i = 1; i < route.coordinates.length; i++) { @@ -58,7 +58,7 @@ export class RouteFollower { // Each step's maneuver happens where the previous step's travel ends, so // the maneuver point of step k sits at the sum of steps 0..k-1 distances. // (Slight drift vs the geometry is fine at guidance granularity.) - this.stepStartMeters = new Array(route.steps.length); + this.stepStartMeters = Array.from({ length: route.steps.length }, () => 0); let stepAlong = 0; for (let i = 0; i < route.steps.length; i++) { this.stepStartMeters[i] = Math.min(stepAlong, this.totalMeters); diff --git a/app/apps/pinball/pinball-app.worker.ts b/app/apps/pinball/pinball-app.worker.ts index 30df48ed..57c6a5ea 100644 --- a/app/apps/pinball/pinball-app.worker.ts +++ b/app/apps/pinball/pinball-app.worker.ts @@ -405,6 +405,11 @@ global.onmessage = (event: { data: WorkerAppMessage }) => { syncTickTimer(window); } break; + case "navigation-sensors": + case "resize-window": + case "text-input": + case "tool-call": + break; } }; @@ -500,7 +505,7 @@ function handleInput(window: PinballWindow, event: InputEvent, frameId: number): // An open window menu owns all input (it closes itself via pop); menus are // list UIs, so watch swipes take their standard fallback meanings there. if (window.menu?.isOpen()) { - window.menu + void window.menu .handleInput(directionalFallback(event)) .catch((error) => console.error(`pinball menu input failed: ${error}`)) .then(() => renderAndSubmit(window, frameId)); @@ -744,6 +749,8 @@ function stepFlippers(window: PinballWindow, dt: number): void { flipper.state = "rest"; } break; + case "rest": + break; } } } diff --git a/app/apps/roam/roam-api.ts b/app/apps/roam/roam-api.ts index a42782d5..ef33022b 100644 --- a/app/apps/roam/roam-api.ts +++ b/app/apps/roam/roam-api.ts @@ -121,7 +121,7 @@ async function roamPost(endpoint: "q" | "pull" | "write", body: object): Promise base = API_BASE; continue; } - throw new Error(`Roam API request failed: ${(error as Error)?.message ?? error}`); + throw new Error(`Roam API request failed: ${(error as Error)?.message ?? error}`, { cause: error }); } if (response.status >= 300 && response.status < 400) { const location = response.headers?.get?.("Location") ?? response.headers?.get?.("location"); diff --git a/app/apps/roam/roam-app.worker.ts b/app/apps/roam/roam-app.worker.ts index 5ec556eb..5575154b 100644 --- a/app/apps/roam/roam-app.worker.ts +++ b/app/apps/roam/roam-app.worker.ts @@ -52,7 +52,6 @@ import { } from "./roam-doc"; declare const global: any; -declare const com: any; const HEADER_HEIGHT = 30; const BOTTOM_MARGIN = 6; @@ -252,6 +251,10 @@ global.onmessage = (event: { data: WorkerAppMessage }) => { ); break; } + case "input-focus": + case "navigation-sensors": + case "resize-window": + break; } }; @@ -339,7 +342,7 @@ function windowMenu(win: RoamWindow): WindowMenu { windowId: win.windowId, post, title: () => win.title, - items: () => menuItems(win), + items: () => menuItems(), size: { width: win.viewportWidth, height: win.viewportHeight }, paintBase: () => paintContent(win), isFocused: () => win.focused, @@ -348,7 +351,7 @@ function windowMenu(win: RoamWindow): WindowMenu { return win.menu; } -function menuItems(win: RoamWindow): MenuItem[] { +function menuItems(): MenuItem[] { const items: MenuItem[] = []; const today = todayRef(); if (currentRef?.uid !== today.uid) { @@ -415,7 +418,7 @@ function endSettingEdit(): void { function handleInput(win: RoamWindow, event: InputEvent, frameId: number): void { if (win.menu?.isOpen()) { - win.menu + void win.menu .handleInput(event) .catch((error) => console.error(`roam menu input failed: ${error}`)) .then(() => renderAndSubmit(win, frameId)); diff --git a/app/apps/terminal/terminal-app.worker.ts b/app/apps/terminal/terminal-app.worker.ts index 4dfefaf6..d6bb3963 100644 --- a/app/apps/terminal/terminal-app.worker.ts +++ b/app/apps/terminal/terminal-app.worker.ts @@ -39,7 +39,6 @@ import { flattenPlanesWithDraws, planesFingerprint, type Plane } from "../../gra import { prepareFrameDraws } from "../../graphics/glyph-wire"; import { getDefaultSmallFont, getTerminalFontConfig } from "../../graphics/ui-fonts"; import { layoutHubHeader } from "./hub-header"; -import { truncateText } from "../../graphics/textwrap"; import { TERMINAL_ICON_GLYPHS, type IconActivity } from "../../graphics/icons"; import { drawSessionRow, @@ -64,7 +63,6 @@ import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-win import type { ToolResult, ToolSpec } from "../../assistant/tool-registry"; declare const global: any; -declare const com: any; // Cell geometry comes from the terminal font setting (Settings > Terminal > // Font; the default is Terminus-12's 6x12). Each window derives its grid from @@ -429,6 +427,9 @@ global.onmessage = (event: { data: WorkerAppMessage }) => { ); break; } + case "input-focus": + case "navigation-sensors": + break; } }; @@ -1092,7 +1093,7 @@ function handleInput(window: TerminalWindow, event: InputEvent, frameId: number) if (window.kind === "view") activeViewId = window.windowId; // An open window menu owns all input (it closes itself via pop). if (window.menu?.isOpen()) { - window.menu + void window.menu .handleInput(event) .catch((error) => console.error(`terminal menu input failed: ${error}`)) .then(() => renderAndSubmit(window, frameId)); diff --git a/app/apps/timer/timer-app.ts b/app/apps/timer/timer-app.ts index af61c195..a08fec9a 100644 --- a/app/apps/timer/timer-app.ts +++ b/app/apps/timer/timer-app.ts @@ -368,6 +368,7 @@ export class TimersLayer implements Layer { else timerEngine.restartTimer(timer.id); return; } + return; } case "new-timer": this.openDial(""); diff --git a/app/apps/transcribe/transcribe.ts b/app/apps/transcribe/transcribe.ts index 4fa5952a..3da56357 100644 --- a/app/apps/transcribe/transcribe.ts +++ b/app/apps/transcribe/transcribe.ts @@ -43,7 +43,7 @@ export class TranscribeLayer implements Layer { const { width, height } = ctx.stack.getBaseSize(); const image = new GrayImage(width, height, 0); const text = this.transcript.text || (this.listening ? "Listening..." : this.detail); - const wrapped = wrapTranscribeText((text) => font.measureText(text), text, width - 64); + const wrapped = wrapTranscribeText((line) => font.measureText(line), text, width - 64); image.drawText(font, 24, 20, "Transcribe", 200); image.drawText(font, 24, 40, this.saveNotice || this.status, 110); diff --git a/app/apps/weather/weather-app.ts b/app/apps/weather/weather-app.ts index a0efec28..ffe0fba5 100644 --- a/app/apps/weather/weather-app.ts +++ b/app/apps/weather/weather-app.ts @@ -16,7 +16,6 @@ export function createWeatherAppWindow(options: InProcessAppOptions): InProcessW let closed = false; let requestingPermission = false; let unsubscribe: (() => void) | null = null; - let app: InProcessWindow; const requestUpdate = () => { if (closed || requestingPermission) return; @@ -33,7 +32,7 @@ export function createWeatherAppWindow(options: InProcessAppOptions): InProcessW }).catch((error) => { requestingPermission = false; console.warn(`Weather permission: ${error}`); }); }; - app = createInProcessWindow({ + const app = createInProcessWindow({ appId: "weather", windowId: WEATHER_WINDOW_ID, title: "Weather", diff --git a/app/g2/dashboard-controller.ts b/app/g2/dashboard-controller.ts index d07b9699..b7abb99b 100644 --- a/app/g2/dashboard-controller.ts +++ b/app/g2/dashboard-controller.ts @@ -47,7 +47,7 @@ const MIRROR_TOUCH_GESTURES: Record, WearRemoteI import { findSoundEffect, playSoundEffect } from "../ui/sound-effects"; import { GlanceHost } from "./glance-host"; import { type GlanceEvent } from "./glance-state"; -import { isWelcomeSoundPending, setWelcomeSoundPending } from "../phone-ui/onboarding-state"; +import { isPreviewOnlyMode, isWelcomeSoundPending, setWelcomeSoundPending } from "../phone-ui/onboarding-state"; import { beginRenderPass, endRenderPass } from "../util/render-freshness"; import { voiceControlBridge } from "../native/voice-control"; import { G2_LENS_HEIGHT, G2_LENS_WIDTH, GrayImage } from "../graphics/image"; @@ -92,7 +92,6 @@ import { wearerVerificationOptions } from "../apps/microphones/speakers"; import { micSession } from "../apps/microphones/mic-session"; import { glassesDisplayLabel } from "./glasses-display-state"; import { PreviewDisplayTarget, type DisplayTarget } from "../native/preview-display"; -import { isPreviewOnlyMode } from "../phone-ui/onboarding-state"; type ConnectionPhase = "disconnected" | "connecting" | "connected" | "charging" | "disconnecting"; @@ -186,6 +185,9 @@ function createInitialDisplayPreview(): ImageSource | null { return grayImageToPreviewSource(new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0)); } +/** Echo the controller's appendLog() trace to the console. */ +const VERBOSE_CONTROLLER_LOG = false; + function formatTimestamp(date: Date): string { return date.toISOString().slice(11, 23); } @@ -2004,7 +2006,7 @@ class DashboardController { } private startContinuousVoiceCapture(): void { - this.beginVoiceCapture("continuous"); + void this.beginVoiceCapture("continuous"); } private stopContinuousVoiceCapture(): void { @@ -2761,7 +2763,7 @@ class DashboardController { } private appendLog(line: string): void { - //console.log(`[${formatTimestamp(new Date())}] ${line}`); + if (VERBOSE_CONTROLLER_LOG) console.log(`[${formatTimestamp(new Date())}] ${line}`); } private setDisplayPreview(preview: ImageSource | null): void { diff --git a/app/g2/even-advertisement.ts b/app/g2/even-advertisement.ts index 342efdf9..84a9c3c0 100644 --- a/app/g2/even-advertisement.ts +++ b/app/g2/even-advertisement.ts @@ -95,7 +95,7 @@ export function g2NameAddressTail(name: string | null | undefined): string | nul * Even's wire order is reversed human order: "AA:BB:CC:DD:EE:FF" ⇄ [FF EE DD CC BB AA]. */ export function wireBytesFromHumanReadableAddress(address: string): Uint8Array | null { - const cleaned = address.replace(/[:\-]/g, "").trim(); + const cleaned = address.replace(/[:-]/g, "").trim(); if (cleaned.length !== 12 || !/^[0-9a-fA-F]{12}$/.test(cleaned)) return null; const human = hexToBytes(cleaned); return new Uint8Array(Array.from(human).reverse()); diff --git a/app/g2/firmware-builder.ts b/app/g2/firmware-builder.ts index bff6e2b5..1f5fb156 100644 --- a/app/g2/firmware-builder.ts +++ b/app/g2/firmware-builder.ts @@ -187,7 +187,7 @@ function persistEvenHubFonts(base: ArrayBuffer): void { writeError = error; }, ); - if (writeError) throw writeError; + if (writeError) throw writeError instanceof Error ? writeError : new Error(String(writeError)); // A degraded EvenHubFont (built before this extraction existed) is cached // per JS context; drop it so the next render picks up the real fonts // without an app restart. diff --git a/app/g2/glance-host.ts b/app/g2/glance-host.ts index 845e4cf8..e92613ad 100644 --- a/app/g2/glance-host.ts +++ b/app/g2/glance-host.ts @@ -79,7 +79,7 @@ export class GlanceHost { * "Show on head tilt" is off (it then wakes the regular UI). A release * always passes so a hold in progress can end. */ - eventForGesture(gesture: "head-tilt" | string): GlanceEvent | null { + eventForGesture(gesture: "head-tilt" | (string & {})): GlanceEvent | null { const provider = this.options.getProvider(); if (!provider?.isEnabled()) return null; if (gesture === "click" && !provider.showOnTap()) return null; diff --git a/app/g2/glance-state.ts b/app/g2/glance-state.ts index b8369486..9848d284 100644 --- a/app/g2/glance-state.ts +++ b/app/g2/glance-state.ts @@ -66,7 +66,7 @@ export function reduceGlance( * already handles or ignores while asleep. */ export function glanceEventForGesture( - gesture: "click" | "double-click" | "long-press" | "short-then-long-press" | "long-press-release" | "head-tilt" | string, + gesture: "click" | "double-click" | "long-press" | "short-then-long-press" | "long-press-release" | "head-tilt" | (string & {}), boardVisible: boolean, ): GlanceEvent | null { switch (gesture) { diff --git a/app/g2/ios-preview-controller.ts b/app/g2/ios-preview-controller.ts index 617ca2c6..a0da264f 100644 --- a/app/g2/ios-preview-controller.ts +++ b/app/g2/ios-preview-controller.ts @@ -1,9 +1,8 @@ import { startRemoteInput } from "../remote/service" import type { KeyboardInputSession } from '../ui/shell/keyboard-input' import { acceptInput, resetRingInputFilter } from "../ui/input-monitor"; -import { bindIosNotifications, iosNotificationsChanged, onIosNotificationPopup } from '../native/notification-icons.ios' +import { bindIosNotifications, iosNotificationsChanged, onIosNotificationPopup, readActiveNotifications } from '../native/notification-icons.ios' import { shouldShowNotificationOnGlasses } from '../native/notification-sources' -import { readActiveNotifications } from '../native/notification-icons.ios' import { launcherEntries } from '../apps/launcher' import { getInstalledEvenHubAppById, installedEvenHubPackageId, uninstallEvenHubPackage } from '../apps/evenhub/installed-apps' import { isInstalledPackagePresent } from '../apps/evenhub/updates' @@ -14,9 +13,8 @@ import { registerWindowTools } from '../assistant/window-tools' import { registerNavigateTools } from '../assistant/navigate-tools' import { registerRoamTools } from '../assistant/roam-tools' import { IosNavigationSensors } from '../native/ios-navigation-sensors' -import { Utils } from '@nativescript/core' import { bindCompassSession, receiveCompassEvent } from '../native/compass.ios' -import { Dialogs, File, knownFolders, path, type ImageSource } from '@nativescript/core' +import { Dialogs, File, knownFolders, path, Utils, type ImageSource } from '@nativescript/core' import { iosVoiceInput } from '../native/ios-voice-input' import { nightscoutBridge } from '../native/nightscout-bridge' import { FaceclawCommunicatorBridge, resolveIosPeripherals, type CommunicatorState, type RawInputEvent } from '../native/faceclaw-communicator.ios' @@ -32,7 +30,6 @@ import { ALL_APPS } from '../apps/all-apps' import type { AppContext, AppDefinition, AppLaunchParams } from '../apps/app-definition' import { WorkerAppHost } from '../ui/shell/worker-window' import { createInProcessWindow, YieldAtRootLayer, type InProcessAppOptions, type InProcessWindow } from '../ui/shell/in-process-window' -import { getStringSettingById, nightscoutSiteUrlSetting, nightscoutApiTokenSetting } from '../ui/dashboard-settings' import { readPhoneBatteryState } from '../native/phone-battery' import { iosAppUnavailableReason } from '../apps/ios-availability' import { flattenPlanesWithDraws, planesFingerprint, type Plane } from '../graphics/plane' @@ -44,7 +41,8 @@ import { TextViewerLayer } from '../apps/files/text-viewer' import { shell, rawInputEventToInputEvent, type ShellWindow } from '../ui/shell/shell' import { appViewportRect, SIDEBAR_WIDTH, sidebarStripVisible } from '../ui/shell/geometry' import { DISPLAY_MODE_VALUES, displayModeLabel, displayModeSetting, onAnySettingChanged, - previewColorSetting, lockScreenEnabledSetting, getBrightnessPreferences } from '../ui/dashboard-settings' + previewColorSetting, lockScreenEnabledSetting, getBrightnessPreferences, getStringSettingById, + nightscoutSiteUrlSetting, nightscoutApiTokenSetting } from '../ui/dashboard-settings' import type { PhoneGesture } from '../phone-ui/phone-gestures' import { isWelcomeSoundPending, setWelcomeSoundPending } from '../phone-ui/onboarding-state' import { findSoundEffect, playSoundEffect } from '../ui/sound-effects' @@ -548,10 +546,10 @@ export class IosPreviewController { this.requestShellRender() } async launchApp(id: string, params?: AppLaunchParams): Promise { - const app = ALL_APPS.find(app => app.appId === id) + const app = ALL_APPS.find(candidate => candidate.appId === id) if (!app) { const installed = getInstalledEvenHubAppById(id) - const host = ALL_APPS.find(app => app.appId === 'evenhub') + const host = ALL_APPS.find(candidate => candidate.appId === 'evenhub') if (installed && host) { try { if (isInstalledPackagePresent(installed.packageId)) diff --git a/app/graphics/display-list.ts b/app/graphics/display-list.ts index 924f87d7..108f9b27 100644 --- a/app/graphics/display-list.ts +++ b/app/graphics/display-list.ts @@ -121,24 +121,24 @@ export function readDisplayList(bytes: Uint8Array, offset: number, now = Date.no const x = r.i16(), y = r.i16(), width = r.u16(), height = r.u16(), depth = r.u8() << 24 >> 24; const token = r.u32(), elapsed = r.u32(), count = r.u16(); integer(count, 0, 256); const resources: ListImage[] = []; - for (let i = 0; i < count; i++) { const width = r.u16(), height = r.u16(); resources.push({ width, height, pixels: r.take(width * height) }); } + for (let i = 0; i < count; i++) { const w = r.u16(), h = r.u16(); resources.push({ width: w, height: h, pixels: r.take(w * h) }); } const calls: ListCall[] = [], callCount = r.u16(); integer(callCount, 0, 4096); for (let i = 0; i < callCount; i++) { - const header = r.u8(), op = header & ~CLIPPED, depth = r.i16(); + const header = r.u8(), op = header & ~CLIPPED, callDepth = r.i16(); const clip = header & CLIPPED ? { x: r.i16(), y: r.i16(), width: r.u16(), height: r.u16() } : undefined; - const common = clip ? { depth, clip } : { depth }; + const common = clip ? { depth: callDepth, clip } : { depth: callDepth }; if (op === DrawOp.ROUNDED_RECT) calls.push({ op, ...common, x: readValue(r), y: readValue(r), width: r.u16(), height: r.u16(), radius: r.u16(), background: r.u8(), border: r.u8() }); else if (op === DrawOp.IMAGE) calls.push({ op, ...common, resource: r.u16(), x: r.i16(), y: r.i16(), transparent: (r.u8() & 16) !== 0 }); else if (op === DrawOp.RECT_COPY) calls.push({ op, ...common, resource: r.u16(), x: readValue(r), y: readValue(r), width: r.u16(), height: r.u16(), dx: readValue(r), dy: readValue(r) }); else if (op === DrawOp.CLEAR) calls.push({ op, ...common, color: r.u8() }); else if (op === DrawOp.DRAWS) { - const x = readValue(r), y = readValue(r), records = r.u16(), start = r.offset; + const drawX = readValue(r), drawY = readValue(r), records = r.u16(), start = r.offset; for (let n = 0; n < records; n++) { const size = RECORD_BYTES[r.bytes[r.offset]!]; if (!size) throw new Error('Unsupported display-list draw record'); r.take(size); } - calls.push({ op, ...common, x, y, count: records, records: r.bytes.slice(start, r.offset) }); + calls.push({ op, ...common, x: drawX, y: drawY, count: records, records: r.bytes.slice(start, r.offset) }); } else throw new Error('Unsupported display-list call'); } if (r.offset !== length) throw new Error('Trailing display-list bytes'); diff --git a/app/graphics/draw-expression.ts b/app/graphics/draw-expression.ts index dab4604e..a8c3fa94 100644 --- a/app/graphics/draw-expression.ts +++ b/app/graphics/draw-expression.ts @@ -112,10 +112,10 @@ export function evaluate(value: DrawValue, elapsed: number, presentTime = 0): { if (typeof value === 'number') return { value, pending: false }; const reader = new DrawBytes(Uint8Array.from(value.code)), stack: { value: number; float: boolean }[] = []; let pending = false; - const push = (value: number, float = false) => { - value = float ? Math.fround(value) : value | 0; - if (!Number.isFinite(value) || stack.length === 32) throw new Error('Invalid expression stack'); - stack.push({ value, float }); + const push = (n: number, float = false) => { + n = float ? Math.fround(n) : n | 0; + if (!Number.isFinite(n) || stack.length === 32) throw new Error('Invalid expression stack'); + stack.push({ value: n, float }); }; const pop = (float: boolean) => { const v = stack.pop(); if (!v || v.float !== float) throw new Error('Expression type mismatch'); return v.value; }; const toInt = (v: number) => { if (v < -2147483648 || v >= 2147483648) throw new Error('Invalid integer conversion'); return Math.trunc(v); }; diff --git a/app/graphics/glyph-wire.ts b/app/graphics/glyph-wire.ts index 6d05f5b6..5dc9e176 100644 --- a/app/graphics/glyph-wire.ts +++ b/app/graphics/glyph-wire.ts @@ -192,7 +192,7 @@ export function prepareFrameDraws(draws: readonly DeferredDraw[]): ArrayBuffer | offset = writeGlyphRecord(out, offset, state, placed); } else if (placed.kind === "image") { if (!inRange16(placed.x) || !inRange16(placed.y)) continue; - if (placed.presentation) { const bytes = presentations.get(placed)!; new Uint8Array(out.buffer).set(bytes, offset); offset += bytes.length; continue; } + if (placed.presentation) { const record = presentations.get(placed)!; new Uint8Array(out.buffer).set(record, offset); offset += record.length; continue; } const id = imageId(placed); if (id === null) continue; offset = writeImageRecord(out, offset, id, placed); diff --git a/app/graphics/image.ts b/app/graphics/image.ts index 6f3164c8..340fbccf 100644 --- a/app/graphics/image.ts +++ b/app/graphics/image.ts @@ -288,7 +288,9 @@ export class GrayImage { const dst = this.pixels; // A blit within one image copies pixel by pixel, forwards, as it always has. const bulk = !opts.transparentZero && source !== this; - for (let row = rowStart; span > 0 && row < rowEnd; row++) { + // No columns in range means no rows to copy. + const rowLimit = span > 0 ? rowEnd : rowStart; + for (let row = rowStart; row < rowLimit; row++) { const from = (srcY + row) * source.width + srcX + colStart; const to = (destY + row) * this.width + destX + colStart; if (bulk) { diff --git a/app/graphics/shell-scene.ts b/app/graphics/shell-scene.ts index a7dcfdf0..640ca5f5 100644 --- a/app/graphics/shell-scene.ts +++ b/app/graphics/shell-scene.ts @@ -30,7 +30,7 @@ export function encodeShellScene(planes: readonly Plane[]): Uint8Array { presentation: { ...d.presentation!, depth: d.presentation!.depth + (plane.depth ?? 0) } })) layers.push({ depth: plane.depth ?? 0, selections, image: cropped.image, x: plane.x + left, y: plane.y + top, key: plane.shellKey!, dim: Math.round((plane.dimUnderneath ?? 1) * 256) }) } - const result = new Uint8Array(2 + layers.reduce((n, l) => n + 16 + l.image.pixels.length + l.selections.reduce((n, b) => n + b.length, 0), 0)) + const result = new Uint8Array(2 + layers.reduce((n, l) => n + 16 + l.image.pixels.length + l.selections.reduce((sum, b) => sum + b.length, 0), 0)) const view = new DataView(result.buffer); let p = 0 const word = (n: number) => { view.setUint16(p, n, true); p += 2 } word(layers.length) diff --git a/app/native/anthropic.ts b/app/native/anthropic.ts index 071867cb..8fd1ac0b 100644 --- a/app/native/anthropic.ts +++ b/app/native/anthropic.ts @@ -193,7 +193,7 @@ function finalizeBlocks(blocks: Map): AnthropicContentBl } /** Parse one SSE line; returns the JSON payload of a data: line, else null. */ -function parseSseDataLine(line: string): any | null { +function parseSseDataLine(line: string): any { if (!line.startsWith("data:")) return null; const payload = line.slice(5).trim(); if (!payload || payload === "[DONE]") return null; diff --git a/app/native/calendar-permissions.ios.ts b/app/native/calendar-permissions.ios.ts index 5758f457..42aa5cf7 100644 --- a/app/native/calendar-permissions.ios.ts +++ b/app/native/calendar-permissions.ios.ts @@ -24,7 +24,7 @@ async function requestPermission(): Promise { okButtonText: "Open Settings", cancelButtonText: "Cancel", }); - if (open) await Utils.openUrl("app-settings:"); + if (open) Utils.openUrl("app-settings:"); return false; } if (status === "restricted") { diff --git a/app/native/calendar.ios.ts b/app/native/calendar.ios.ts index 4b8b1c88..8c9eec23 100644 --- a/app/native/calendar.ios.ts +++ b/app/native/calendar.ios.ts @@ -97,7 +97,7 @@ export async function readUpcomingEventsAsync(maxEvents = 50, windowMs = DEFAULT try { if (!hasCalendarPermission()) throw new Error("Calendar permission is required."); resolve(parseEvents(json, error, maxEvents, endMs)); - } catch (error) { reject(error); } + } catch (err) { reject(err); } }); }); } diff --git a/app/native/faceclaw-communicator.ios.ts b/app/native/faceclaw-communicator.ios.ts index 704a4a66..eef18120 100644 --- a/app/native/faceclaw-communicator.ios.ts +++ b/app/native/faceclaw-communicator.ios.ts @@ -10,7 +10,6 @@ export type { FirmwareInfo }; // Kotlin/Native facades exported by FaceclawKit (see native/kotlin/shared/src/iosMain/.../ble). declare const FaceclawKitIosGlassesSession: any; -declare const FaceclawKitIosProtocolPlatform: any; declare const FaceclawKitFaceclawBleCommunicatorListener: any; declare const FaceclawKitIosAncsListener: any; declare const FaceclawKitIosAudioPacketListener: any; diff --git a/app/native/g2mirror-client.ts b/app/native/g2mirror-client.ts index c0b1274d..b93f18c7 100644 --- a/app/native/g2mirror-client.ts +++ b/app/native/g2mirror-client.ts @@ -1,7 +1,6 @@ import { openSocket } from "./socket"; import { toUint8Array } from "../util/array-util"; -declare const com: any; declare const android: any; declare const java: any; diff --git a/app/native/ios-bluetooth.ts b/app/native/ios-bluetooth.ts index b1016b29..5c523858 100644 --- a/app/native/ios-bluetooth.ts +++ b/app/native/ios-bluetooth.ts @@ -38,7 +38,7 @@ export class IosBluetooth { this.state = Number(state); this.authorization = Number(authorization) this.emit({ kind: 'state', state: this.state, authorization: this.authorization }) }, - onAdvertisementIdentifierNameManufacturerDataHexRssiConnectable: (identifier: string, name: string, manufacturerData: string, rssi: number, connectable: boolean) => { + onAdvertisementIdentifierNameManufacturerDataHexRssiConnectable: (identifier: string, name: string, manufacturerData: string, rssi: number, connectable: boolean | undefined) => { // The Kotlin central already merges split advertisements and bounds its cache. const raw: IosAdvertisement = { identifier: String(identifier), name: String(name ?? ''), manufacturerData: String(manufacturerData ?? ''), rssi: Number(rssi), connectable: connectable !== false } this.emit({ kind: 'advertisement', ...raw }) @@ -65,7 +65,7 @@ export class IosBluetooth { ensureReady(): Promise { if (this.state === BLE_STATE_POWERED_ON) return Promise.resolve() return new Promise((resolve, reject) => { - const finish = (error?: Error) => { clearTimeout(timer); off(); error ? reject(error) : resolve() } + const finish = (error?: Error) => { clearTimeout(timer); off(); if (error) reject(error); else resolve() } const off = this.onEvent(event => { if (event.kind !== 'state') return if (event.state === BLE_STATE_POWERED_ON) finish() diff --git a/app/native/kotlin-bridge.ts b/app/native/kotlin-bridge.ts index 6b463807..76ec68e4 100644 --- a/app/native/kotlin-bridge.ts +++ b/app/native/kotlin-bridge.ts @@ -33,6 +33,6 @@ export function runKotlinBridgeSmokeTest(): void { console.log("FACECLAW_KOTLIN_BRIDGE_PASS " + JSON.stringify({ platform, thread, reply })); } catch (error) { // Diagnostics must not prevent the rest of the app from launching. - console.error("FACECLAW_KOTLIN_BRIDGE_FAIL " + error); + console.error(`FACECLAW_KOTLIN_BRIDGE_FAIL ${error}`); } } diff --git a/app/native/kotlin-platform.android.ts b/app/native/kotlin-platform.android.ts index 3ece2aa1..cb33ffa3 100644 --- a/app/native/kotlin-platform.android.ts +++ b/app/native/kotlin-platform.android.ts @@ -4,6 +4,8 @@ import type { KotlinBridge } from './kotlin-platform'; // Handwritten declarations for the small native surface, checked against the // compiled API. NativeScript runtime metadata is generated from the AAR. declare namespace com.faceclaw.shared { + // Used as com.faceclaw.shared.KotlinBridge; oxlint misses qualified references. + // oxlint-disable-next-line no-unused-vars class KotlinBridge extends java.lang.Object { constructor(); platform(): string; diff --git a/app/native/media-browser.ts b/app/native/media-browser.ts index 80bd73b4..7da4d72a 100644 --- a/app/native/media-browser.ts +++ b/app/native/media-browser.ts @@ -30,8 +30,8 @@ type PendingRequest = { * Holds at most one connection at a time. */ export class FaceclawMediaBrowserBridge { - private browser: any | null = null; - private listenerProxy: any | null = null; + private browser: any = null; + private listenerProxy: any = null; private nextRequestId = 1; private readonly pendingConnects = new Map>(); private readonly pendingBrowses = new Map>(); diff --git a/app/native/media-controller.ts b/app/native/media-controller.ts index e685a123..e81a98e9 100644 --- a/app/native/media-controller.ts +++ b/app/native/media-controller.ts @@ -59,8 +59,8 @@ const DEFAULT_MEDIA_STATE: MediaControllerState = { export class FaceclawMediaControllerBridge { private readonly stateListeners = new Set<(state: MediaControllerState) => void>(); - private controller: any | null = null; - private listenerProxy: any | null = null; + private controller: any = null; + private listenerProxy: any = null; private state: MediaControllerState = { ...DEFAULT_MEDIA_STATE }; private stateUpdatedAtMs = Date.now(); private started = false; diff --git a/app/native/nightscout-bridge.ts b/app/native/nightscout-bridge.ts index de0856dc..9271d7c2 100644 --- a/app/native/nightscout-bridge.ts +++ b/app/native/nightscout-bridge.ts @@ -106,7 +106,6 @@ type NightscoutTreatmentResponse = { const NIGHTSCOUT_REFRESH_MS = 60_000; const NIGHTSCOUT_HISTORY_COUNT = 30; -const NIGHTSCOUT_GRAPH_WINDOW_MS = 2 * 60 * 60 * 1000; const NIGHTSCOUT_TREATMENT_LOOKBACK_MS = 3 * 60 * 60 * 1000; // The v1 treatments API silently adds `created_at >= now - 4 days` to any // query without an explicit date filter (lib/server/query.js enforceDateFilter), diff --git a/app/native/notification-icons.ts b/app/native/notification-icons.ts index 6d5c2665..4ea179dc 100644 --- a/app/native/notification-icons.ts +++ b/app/native/notification-icons.ts @@ -20,7 +20,7 @@ let cachedIcons: GrayImage[] = []; let cachedAtMs = 0; const keyedIconCache = new Map(); const KEYED_ICON_CACHE_MAX = 128; -let notificationListenerProxy: any | null = null; +let notificationListenerProxy: any = null; const notificationPostedListeners = new Set<(notificationKey: string) => void>(); function invalidateIconCaches(): void { diff --git a/app/native/openai.ts b/app/native/openai.ts index bba3b840..46e2e1f6 100644 --- a/app/native/openai.ts +++ b/app/native/openai.ts @@ -288,7 +288,7 @@ function extractMessageText(item: any): string { .join(""); } -function parseSseDataLine(line: string): any | null { +function parseSseDataLine(line: string): any { if (!line.startsWith("data:")) return null; const payload = line.slice(5).trim(); if (!payload || payload === "[DONE]") return null; diff --git a/app/native/qr-scan.ios.ts b/app/native/qr-scan.ios.ts index bc74376a..748331c7 100644 --- a/app/native/qr-scan.ios.ts +++ b/app/native/qr-scan.ios.ts @@ -14,7 +14,8 @@ export function scanQrCode(): Promise { if (settled) return settled = true if (activeScanner === scanner) activeScanner = null - error ? reject(new Error(String(error))) : resolve(text == null ? null : String(text)) + if (error) reject(new Error(String(error))) + else resolve(text == null ? null : String(text)) } try { scanner.startWithCompletion(finish) } catch (error) { finish(null, String(error)) } diff --git a/app/native/voice-control.ios.ts b/app/native/voice-control.ios.ts index a1095779..2896e21d 100644 --- a/app/native/voice-control.ios.ts +++ b/app/native/voice-control.ios.ts @@ -64,8 +64,8 @@ export class IosVoiceControlBridge { const generation = ++this.generation this.log = log; this.source = 'glasses'; this.session = session; this.packets = 0; this.capturing = true this.completion = new Promise(resolve => { this.resolveCompletion = resolve }) - const error = String(this.ensureNative().startWithEndpointing(endpointing) ?? '') - if (error) { this.stop(); this.setStatus(error); this.emitEnd(); return } + const startError = String(this.ensureNative().startWithEndpointing(endpointing) ?? '') + if (startError) { this.stop(); this.setStatus(startError); this.emitEnd(); return } try { await session.setMicrophone(true, packet => { if (generation !== this.generation || !this.capturing) return @@ -136,7 +136,7 @@ export class IosVoiceControlBridge { this.log(`Voice audio: ${event.seconds?.toFixed(1)}s, packets=${event.packets}, RMS=${event.rms?.toFixed(4)}, missing=${event.missing}, errors=${event.errors}`) if (this.capturing) this.setStatus(`Listening on ${this.source === 'phone' ? 'phone' : 'glasses'}… ${event.seconds?.toFixed(0)}s`) } else if (event.kind === 'finishing') { - this.stopPushToTalk(); this.emitEnd() + void this.stopPushToTalk(); this.emitEnd() } else if (event.kind === 'ended') { this.source = null this.capturing = this.finalizing = false diff --git a/app/native/voice-control.ts b/app/native/voice-control.ts index f3acadab..cdaedf74 100644 --- a/app/native/voice-control.ts +++ b/app/native/voice-control.ts @@ -102,8 +102,8 @@ export class FaceclawVoiceControlBridge { private readonly speechPauseListeners = new Set<() => void>(); private readonly speechPause = new SpeechPauseDetector(); private readonly speechEndListeners = new Set<() => void>(); - private controller: any | null = null; - private listenerProxy: any | null = null; + private controller: any = null; + private listenerProxy: any = null; private status = "Voice control stopped."; private listening = false; private detail = ""; diff --git a/app/native/wear-bridge.ts b/app/native/wear-bridge.ts index c11c55ae..a2871218 100644 --- a/app/native/wear-bridge.ts +++ b/app/native/wear-bridge.ts @@ -54,14 +54,14 @@ type MessageListener = (message: WearMessage) => void; type ConnectionListener = (connection: WearWatchConnection) => void; class WearBridge { - private java: any | null | undefined = undefined; + private java: any = undefined; // The Java-side listener proxy must stay referenced or it gets GC'd. private retainedListenerProxy: any = null; private readonly messageListeners = new Set(); private readonly connectionListeners = new Set(); private lastConnection: WearWatchConnection = { reachable: false, watchName: "" }; - private getJava(): any | null { + private getJava(): any { if (this.java !== undefined) return this.java; if (!global.isAndroid) { this.java = null; diff --git a/app/phone-ui/main-page.ios.ts b/app/phone-ui/main-page.ios.ts index 1646357c..3419dfc0 100644 --- a/app/phone-ui/main-page.ios.ts +++ b/app/phone-ui/main-page.ios.ts @@ -148,7 +148,7 @@ export function createMainPage(): Page { model.set('onPadTouch', touch(watchInput)) model.set('onRingPadTouch', touch(ringInput)) model.set('onSyntheticMicTap', () => controller.startVoiceInput()) - model.set('onKeyboardTap', () => { void controller.typeIntoApp() }) + model.set('onKeyboardTap', () => { controller.typeIntoApp() }) mirror.on('touch', touch(mirrorInput)) const cancelGestures = () => { watchInput.cancel(); ringInput.cancel(); mirrorInput.cancel() } model.on('propertyChange', (args: PropertyChangeData) => { diff --git a/app/phone-ui/onboarding-flash-view-model.ts b/app/phone-ui/onboarding-flash-view-model.ts index 3249c97c..7c459a7e 100644 --- a/app/phone-ui/onboarding-flash-view-model.ts +++ b/app/phone-ui/onboarding-flash-view-model.ts @@ -55,7 +55,7 @@ export class OnboardingFlashViewModel extends Observable { private promptBattery: FlashPromptBattery | null = null; private flasher: FirmwareFlasher | null = null; private flasherUnsubscribers: Array<() => void> = []; - private retryAction: () => void = () => this.beginPrompt(); + private retryAction: () => void | Promise = () => this.beginPrompt(); constructor(options?: { mode?: FlashMode; fromOnboarding?: boolean; autoStart?: boolean }) { super(); @@ -211,7 +211,7 @@ export class OnboardingFlashViewModel extends Observable { this.finish(); return; case "error": - this.retryAction(); + void this.retryAction(); return; default: return; @@ -569,7 +569,7 @@ export class OnboardingFlashViewModel extends Observable { }); } - private toError(message: string, retry: () => void, headline = "Something Went Wrong"): void { + private toError(message: string, retry: () => void | Promise, headline = "Something Went Wrong"): void { this.retryAction = retry; this.status = message; this.setPhase("error"); diff --git a/app/remote/service.ts b/app/remote/service.ts index 2c324229..46c06d97 100644 --- a/app/remote/service.ts +++ b/app/remote/service.ts @@ -22,6 +22,8 @@ export function startRemoteInput(host: RemoteHost): () => void { if (busy || stopped) return; busy = true; try { + // stop() can flip `stopped` while handleRequest is awaited. + // oxlint-disable-next-line no-unmodified-loop-condition while (!stopped) { const raw = native.nextRequest(); if (!raw) break; diff --git a/app/ui/dashboard-settings.ts b/app/ui/dashboard-settings.ts index 01ffac01..8ae9c943 100644 --- a/app/ui/dashboard-settings.ts +++ b/app/ui/dashboard-settings.ts @@ -100,7 +100,8 @@ export abstract class ConfigSetting { } export class ConfigSettingBoolean extends ConfigSetting { - constructor(options: ConfigSettingOptions) { + // Widens ConfigSetting's protected constructor. + public constructor(options: ConfigSettingOptions) { super(options); } @@ -1086,11 +1087,6 @@ export function isNightscoutSettingsConfigured(): boolean { } -function normalizeSystemCardName(name: string | null | undefined): string { - const normalized = (name ?? "").replace(/[\x00-\x1f]+/g, " ").replace(/\s+/g, " ").trim(); - return normalized; -} - function normalizeNightscoutSiteUrl(siteUrl: string | null | undefined): string { return (siteUrl ?? "").replace(/[\x00-\x1f]+/g, "").trim().replace(/\/+$/, ""); } @@ -1169,7 +1165,6 @@ export function toggleSettingMenuItem( export function textSettingMenuItem( setting: ConfigSettingString, - opts?: SettingsMenuOptions ): MenuItem { return { label: setting.label, diff --git a/app/ui/font-picker.ts b/app/ui/font-picker.ts index ba06b1b6..031fba76 100644 --- a/app/ui/font-picker.ts +++ b/app/ui/font-picker.ts @@ -22,7 +22,7 @@ import { type BitmapFace, type UiFontSelection, } from "../graphics/ui-fonts"; -import { GESTURE_DOUBLE_CLICK, type InputEvent } from "./gestures"; +import { type InputEvent } from "./gestures"; import { drawRightValueMenuItem, openModalMenu, type MenuItem } from "./menu"; import { Menu, type MenuDrawArgs } from "./menu-core"; import { LIST_ROW_TEXT_INSET, listRowHeight } from "./metrics"; diff --git a/app/ui/notifications.ts b/app/ui/notifications.ts index e52adfaa..57766945 100644 --- a/app/ui/notifications.ts +++ b/app/ui/notifications.ts @@ -1,9 +1,8 @@ import { clamp } from "~/util/numeric-util"; import { formatRelativeTime } from "~/util/date-util"; import { getDefaultSmallFont } from "../graphics/ui-fonts"; -import { truncateText } from "../graphics/textwrap"; +import { truncateText, wrapText } from "../graphics/textwrap"; import { GrayImage, type UiFont } from "../graphics/image"; -import { wrapText } from "../graphics/textwrap"; import { LIST_ROW_TEXT_INSET, lineStep, listRowHeight } from "./metrics"; import { ALL_NOTIFICATIONS, @@ -255,7 +254,7 @@ export class SingleNotificationLayer implements Layer { this.close(ctx); } else if (item.kind === "action") { invokeNotificationAction(this.notificationKey, item.action.index); - if (!readActiveNotifications(ALL_NOTIFICATIONS).some((item) => item.key === this.notificationKey)) { + if (!readActiveNotifications(ALL_NOTIFICATIONS).some((active) => active.key === this.notificationKey)) { this.closeUnavailableNotification(ctx); } } else if (item.kind === "dismiss") { @@ -276,8 +275,8 @@ export class SingleNotificationLayer implements Layer { wrap: true, rowGap: 1, getHeight: () => listRowHeight(getDefaultSmallFont()), - draw: ({ image, item, x, y, selected }) => { - image.drawText(getDefaultSmallFont(), x + CONFIRM_TEXT_X, y + LIST_ROW_TEXT_INSET, item.label, selected ? 255 : 200); + draw: ({ image, item: option, x, y, selected }) => { + image.drawText(getDefaultSmallFont(), x + CONFIRM_TEXT_X, y + LIST_ROW_TEXT_INSET, option.label, selected ? 255 : 200); }, }), }; diff --git a/app/ui/shell/brightness-picker-layer.ts b/app/ui/shell/brightness-picker-layer.ts index 85926a52..f735b0ab 100644 --- a/app/ui/shell/brightness-picker-layer.ts +++ b/app/ui/shell/brightness-picker-layer.ts @@ -61,6 +61,8 @@ export class BrightnessPickerLayer implements Layer { case "double-click": ctx.stack.pop(); return; + default: + return; } } } diff --git a/app/ui/shell/open-apps-persistence.ts b/app/ui/shell/open-apps-persistence.ts index 8f5cd4d6..fe7cb4de 100644 --- a/app/ui/shell/open-apps-persistence.ts +++ b/app/ui/shell/open-apps-persistence.ts @@ -57,12 +57,12 @@ export function savePersistedOpenApps(state: PersistedOpenApps): void { if (writeTimer !== null) clearTimeout(writeTimer); writeTimer = setTimeout(() => { writeTimer = null; - const state = pendingState; + const pending = pendingState; pendingState = null; - if (!state) return; + if (!pending) return; try { File.fromPath(openAppsFilePath()).writeTextSync( - JSON.stringify({ version: STATE_VERSION, ...state }), + JSON.stringify({ version: STATE_VERSION, ...pending }), ); } catch (error) { console.warn("open-apps state write failed", error); diff --git a/app/ui/shell/shell.ts b/app/ui/shell/shell.ts index 451a5e27..8ce042c8 100644 --- a/app/ui/shell/shell.ts +++ b/app/ui/shell/shell.ts @@ -1440,7 +1440,6 @@ class Shell { if (!this.screenOn || this.activeVoiceLayer || !this.stack.isAtBase()) return; const foreground = this.foregroundWindow(); if (!foreground) return; - let layer: ShellOverlayMenuLayer; const items: MenuItem[] = []; if (foreground.closeable) { items.push({ @@ -1500,7 +1499,7 @@ class Shell { const footer = foreground.hasAppMenu?.() ? (foreground.holdToTalk ? undefined : gestureHints([[GESTURE_SHORT_THEN_LONG_PRESS, "app menu"]])) : undefined; - layer = new ShellOverlayMenuLayer(items, footer, () => this.yieldFocusToSidebar()); + const layer = new ShellOverlayMenuLayer(items, footer, () => this.yieldFocusToSidebar()); layer.selectItem(initialSelection); this.stack.push(layer); // Tell the window the system menu opened over it: an app with its own diff --git a/app/ui/shell/tool-debug-layer.ts b/app/ui/shell/tool-debug-layer.ts index debc9d73..6dcdd333 100644 --- a/app/ui/shell/tool-debug-layer.ts +++ b/app/ui/shell/tool-debug-layer.ts @@ -6,7 +6,7 @@ import type { ToolDebugEntry } from "../../assistant/tool-registry"; import { InputEvent } from "../gestures"; import { Layer, LayerContext, PaintBelow } from "../layers"; import { MenuLayer, drawListScrollbar, type MenuItem } from "../menu"; -import { MIN_WINDOW_HEIGHT, minWindowTop, sidebarWidth, TOP_BAR_HEIGHT } from "./geometry"; +import { minWindowTop, sidebarWidth, TOP_BAR_HEIGHT } from "./geometry"; import { lineStep } from "../metrics"; /** @@ -153,6 +153,8 @@ class ToolDetailLayer implements Layer { case "double-click": ctx.stack.pop(); return; + default: + return; } } } diff --git a/app/ui/shell/worker-state.ts b/app/ui/shell/worker-state.ts index e8b7536d..3216aaaa 100644 --- a/app/ui/shell/worker-state.ts +++ b/app/ui/shell/worker-state.ts @@ -20,19 +20,19 @@ export function publishWorkerState(key: string, value: unknown): void { } /** The latest published value for `key`, or undefined when nothing was published yet. */ -export function readWorkerState(key: string): T | undefined { - return values.get(key) as T | undefined; +export function readWorkerState(key: string): unknown { + return values.get(key); } /** Subscribe to later publications of `key`; returns the unsubscribe. */ -export function onWorkerStateChanged(key: string, listener: (value: T) => void): () => void { +export function onWorkerStateChanged(key: string, listener: (value: unknown) => void): () => void { let set = listeners.get(key); if (!set) { set = new Set(); listeners.set(key, set); } - set.add(listener as (value: unknown) => void); + set.add(listener); return () => { - set!.delete(listener as (value: unknown) => void); + set!.delete(listener); }; } diff --git a/app/ui/shell/worker-window.ts b/app/ui/shell/worker-window.ts index 1657644d..3ef4685b 100644 --- a/app/ui/shell/worker-window.ts +++ b/app/ui/shell/worker-window.ts @@ -400,6 +400,9 @@ export class WorkerAppHost { } break; } + case "worker-stopped": + // Only meaningful as the reply to shutdown(), handled above. + break; } }; options.worker.onerror = (error) => { diff --git a/faceclaw-extensions/dist/index.d.ts b/faceclaw-extensions/dist/index.d.ts deleted file mode 100644 index 63a80290..00000000 --- a/faceclaw-extensions/dist/index.d.ts +++ /dev/null @@ -1,236 +0,0 @@ -/** - * faceclaw-extensions — type definitions for the Faceclaw extension API. - * - * Faceclaw (https://github.com/…/faceclaw) is an alternative host for EvenHub - * apps that runs them directly on the Even Realities G2 glasses instead of the - * stock Even app. An app built against the standard `@evenrealities/even_hub_sdk` - * runs unchanged. When it happens to be running inside Faceclaw, this package - * lets it detect that and reach a few extra, Faceclaw-only capabilities. - * - * Design contract: - * - The only entry point is the injected global `window.getFaceclawExtensions`. - * It is `(() => FaceclawExtensions) | null` inside Faceclaw and `undefined` - * in the stock Even app (and any other host). Nothing on the standard SDK or - * on built-in prototypes is modified — every Faceclaw capability lives behind - * this one global, so it is always obvious what is an extension and standard - * apps keep working everywhere. - * - New functionality is only ever *added* here; existing members keep their - * behavior, so pinning a version stays backwards-compatible. - * - * Usage: - * ```ts - * import { getFaceclawExtensions } from "faceclaw-extensions"; - * - * const fc = getFaceclawExtensions(); - * if (fc) { - * console.log("Running in", fc.getVersion()); // "Faceclaw/0.4.0" - * fc.addWindowLifecycleListener((e) => { - * if (e.type === "hidden") pauseExpensiveWork(); - * }); - * } - * ``` - */ -/** Third-party API-key services whose keys the user may have configured in Faceclaw. */ -export type ApiKeyService = "openai" | "anthropic" | "soniox" | "elevenlabs" | "mapbox"; -/** - * One step of a piezo-buzzer tone sequence. The G2 has a single monophonic PWM - * buzzer; a sequence plays back-to-back steps on the firmware's own timer. - */ -export interface BuzzerStep { - /** Tone frequency in Hz. The piezo is loudest ~1–4 kHz; faint below ~150 Hz. */ - freq: number; - /** Step duration in milliseconds (1–65535). */ - ms: number; - /** PWM duty cycle, 0–100 (default 50). `duty: 0` is a rest (silence) for `ms`. */ - duty?: number; -} -/** - * Window lifecycle transitions, delivered to - * {@link FaceclawExtensions.addWindowLifecycleListener}: - * - `visible` / `hidden`: the app's glasses window became the shown surface, or - * stopped being it — because the user switched the foreground window or the - * phone screen turned on/off. A hidden app keeps running (Faceclaw keeps its - * webview alive) but nothing it renders reaches the glasses. - * - `focused` / `blurred`: input focus moved onto or off the app's window (e.g. - * the user opened the app switcher). A blurred-but-visible app is still shown - * but no longer receives taps/scrolls. - * - * An app can assume it starts `visible` and `focused` at launch; events report - * changes from there. - */ -export type WindowLifecycleEventType = "visible" | "hidden" | "focused" | "blurred"; -export interface WindowLifecycleEvent { - type: WindowLifecycleEventType; -} -/** - * A magnetometer heading sample from {@link FaceclawExtensions.addCompassListener}. - * All headings are degrees clockwise in [0, 360). - */ -export interface CompassReading { - /** - * Raw magnetic heading as reported by the glasses, with no correction for - * how they sit on the wearer's head. Kept for apps that zero it themselves. - */ - headingDegrees: number; - /** - * Magnetic heading corrected by the wearer's calibration offset from the - * host's Compass app. Equal to `headingDegrees` until they calibrate. - */ - magneticHeadingDegrees: number; - /** - * Whether the wearer has been through the host's compass calibration, i.e. - * whether `magneticHeadingDegrees` and `trueHeadingDegrees` can be trusted - * as absolute rather than relative. - */ - wearerCalibrated: boolean; - /** - * Local magnetic declination (east positive), from the phone's location and - * the World Magnetic Model. Absent when the host has no location. - */ - declinationDegrees?: number; - /** `magneticHeadingDegrees` plus declination. Absent when declination is. */ - trueHeadingDegrees?: number; -} -export interface FaceclawContainerCommon { - containerID: number; - containerName: string; - xPosition: number; - yPosition: number; - width: number; - height: number; - zOrderIndex?: number; - isEventCapture?: 0 | 1 | boolean; - /** Inherit content from the same-named container in the previous layout. */ - preserve?: boolean; -} -export interface FaceclawTextContainer extends FaceclawContainerCommon { - content?: string; - borderWidth?: number; - borderRadius?: number; - paddingLength?: number; -} -/** Image containers may be up to 576x452 in the extended layout. */ -export type FaceclawImageContainer = FaceclawContainerCommon; -export interface FaceclawListContainer extends FaceclawContainerCommon { - itemContainer?: { - itemName?: string[]; - itemWidth?: number; - isItemSelectBorderEn?: 0 | 1 | boolean; - }; -} -export interface FaceclawLayout { - textObject?: FaceclawTextContainer[]; - imageObject?: FaceclawImageContainer[]; - listObject?: FaceclawListContainer[]; -} -/** - * A tool the app contributes to Faceclaw's voice assistant. The assistant sees - * it namespaced by the app's package name (`app..`); `name` - * here is the bare, un-prefixed name. - */ -export interface AssistantTool { - /** Bare tool name (no package prefix), e.g. `"set_color"`. */ - name: string; - /** What the tool does — the assistant reads this to decide when to call it. */ - description: string; - /** JSON Schema for the arguments object the assistant will pass to `handler`. */ - parameters?: object; - /** - * When the tool is callable: `"foreground"` (default) only while the app owns - * the visible window; `"open"` any time the app is running (even backgrounded). - */ - availability?: "open" | "foreground"; - /** - * Invoked when the assistant calls the tool. Return a string (or any - * JSON-serializable value) to report back to the assistant; throw to report an - * error. May be async. - */ - handler: (args: any) => unknown | Promise; -} -/** - * The Faceclaw-only capability surface. Obtained via {@link getFaceclawExtensions}. - * Every method is additive to the standard EvenHub SDK. - */ -export interface FaceclawExtensions { - /** Host version string, e.g. `"Faceclaw/0.4.0"`. */ - getVersion(): string; - /** - * Hand input focus back to Faceclaw's app switcher without closing the app - * (it keeps running in the background). Equivalent to the user double-tapping - * out, but explicit. - */ - returnToAppSwitcher(): void; - /** - * Close this app for real and tear down its window. Unlike the stock - * `shutDownPageContainer(1)` — which Faceclaw interprets as "return to the app - * switcher" so double-tap-to-quit apps stay alive — this always quits. - */ - quit(): void; - /** - * Subscribe to window lifecycle changes (see {@link WindowLifecycleEvent}). - * Returns an unsubscribe function. - */ - addWindowLifecycleListener(listener: (event: WindowLifecycleEvent) => void): () => void; - /** - * List which API-key services the user has configured in Faceclaw. Returns - * only the service names, never the key values — use - * {@link requestApiKeyAccess} to obtain values (with the user's consent). - */ - getConfiguredApiKeys(): Promise; - /** - * Ask the user to share one or more configured API keys with this app. Opens - * a consent prompt on the glasses. Resolves with a map of the granted keys' - * values (only for services that are both requested and configured); services - * the user declines, or that aren't configured, are absent. Resolves with an - * empty object if the user denies. - */ - requestApiKeyAccess(services: ApiKeyService[]): Promise>>; - /** - * Play a tone sequence on the glasses' piezo buzzer. Sequences longer than the - * firmware's per-message cap (48 steps) are split and paced automatically. - * Resolves once every message has been queued. - */ - playBuzzer(steps: BuzzerStep[]): Promise; - /** - * Activate the glasses' magnetometer compass and receive heading samples. - * Returns an unsubscribe function; the sensor stays on while at least one - * listener is registered and the app is the foreground window. - * - * The magnetometer sits inside the right arm, which rests against the - * wearer's head with a slight curl that differs between wearers (and between - * wears), so `headingDegrees` is relative. The host's Compass app lets the - * wearer calibrate that away and adds local declination: prefer - * `trueHeadingDegrees` when present, then `magneticHeadingDegrees`, and check - * `wearerCalibrated` before trusting either as absolute. - */ - addCompassListener(listener: (reading: CompassReading) => void): () => void; - /** - * Build the app's initial page from an extended layout (superset of the stock - * createStartUpPageContainer — full 576x452 canvas, no container-count limit, - * per-container `preserve`). Resolves true on success. - */ - createLayout(layout: FaceclawLayout): Promise; - /** - * Replace the current page with a new extended layout (superset of the stock - * rebuildPageContainer). Containers marked `preserve` inherit their content - * from the same-named container in the outgoing layout. Resolves true on success. - */ - replaceLayout(layout: FaceclawLayout): Promise; - /** - * Declare the app's voice-assistant tools, replacing any previously set. Each - * tool's `handler` runs in the app when the assistant calls it. The assistant - * sees the tools namespaced by the app's package name. Pass `[]` to remove all. - */ - setAssistantTools(tools: AssistantTool[]): void; -} -declare global { - interface Window { - /** Injected by Faceclaw; `undefined` in the stock Even app and other hosts. */ - getFaceclawExtensions?: (() => FaceclawExtensions) | null; - } -} -/** - * Return the Faceclaw extension API if the app is running inside Faceclaw, or - * `null` otherwise (the stock Even app, a browser, etc.). Safe to call anywhere. - */ -export declare function getFaceclawExtensions(): FaceclawExtensions | null; diff --git a/faceclaw-extensions/dist/index.js b/faceclaw-extensions/dist/index.js deleted file mode 100644 index 88c290ac..00000000 --- a/faceclaw-extensions/dist/index.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * faceclaw-extensions — type definitions for the Faceclaw extension API. - * - * Faceclaw (https://github.com/…/faceclaw) is an alternative host for EvenHub - * apps that runs them directly on the Even Realities G2 glasses instead of the - * stock Even app. An app built against the standard `@evenrealities/even_hub_sdk` - * runs unchanged. When it happens to be running inside Faceclaw, this package - * lets it detect that and reach a few extra, Faceclaw-only capabilities. - * - * Design contract: - * - The only entry point is the injected global `window.getFaceclawExtensions`. - * It is `(() => FaceclawExtensions) | null` inside Faceclaw and `undefined` - * in the stock Even app (and any other host). Nothing on the standard SDK or - * on built-in prototypes is modified — every Faceclaw capability lives behind - * this one global, so it is always obvious what is an extension and standard - * apps keep working everywhere. - * - New functionality is only ever *added* here; existing members keep their - * behavior, so pinning a version stays backwards-compatible. - * - * Usage: - * ```ts - * import { getFaceclawExtensions } from "faceclaw-extensions"; - * - * const fc = getFaceclawExtensions(); - * if (fc) { - * console.log("Running in", fc.getVersion()); // "Faceclaw/0.4.0" - * fc.addWindowLifecycleListener((e) => { - * if (e.type === "hidden") pauseExpensiveWork(); - * }); - * } - * ``` - */ -/** - * Return the Faceclaw extension API if the app is running inside Faceclaw, or - * `null` otherwise (the stock Even app, a browser, etc.). Safe to call anywhere. - */ -export function getFaceclawExtensions() { - const getter = typeof window !== "undefined" ? window.getFaceclawExtensions : null; - return typeof getter === "function" ? getter() : null; -} diff --git a/faceclaw-extensions/src/index.ts b/faceclaw-extensions/src/index.ts index d4706764..5ca31f5c 100644 --- a/faceclaw-extensions/src/index.ts +++ b/faceclaw-extensions/src/index.ts @@ -172,7 +172,7 @@ export interface AssistantTool { * JSON-serializable value) to report back to the assistant; throw to report an * error. May be async. */ - handler: (args: any) => unknown | Promise; + handler: (args: any) => unknown; } /** diff --git a/faceclaw-extensions/tsconfig.json b/faceclaw-extensions/tsconfig.json index a9bd75c7..f695761c 100644 --- a/faceclaw-extensions/tsconfig.json +++ b/faceclaw-extensions/tsconfig.json @@ -4,6 +4,7 @@ "module": "ESNext", "moduleResolution": "bundler", "declaration": true, + "rootDir": "src", "outDir": "dist", "strict": true, "skipLibCheck": true, diff --git a/package-lock.json b/package-lock.json index bb9bf530..10bc16d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,6 +26,8 @@ "@nativescript/ios": "9.0.3", "@nativescript/types": "~9.0.0", "@nativescript/webpack": "~5.0.25", + "oxlint": "^1.85.0", + "oxlint-tsgolint": "^7.0.2003", "typescript": "~5.4.0" } }, @@ -622,6 +624,437 @@ } } }, + "node_modules/@oxlint-tsgolint/darwin-arm64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/darwin-arm64/-/darwin-arm64-7.0.2003.tgz", + "integrity": "sha512-TgV33rXr6ueXBwvc+0nssUkTBSXHJxv77I8p4RCjDjCnvexHtmoPiudVRDfj3S3puMDdeQdHW6jdUgUPy3nr/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxlint-tsgolint/darwin-x64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/darwin-x64/-/darwin-x64-7.0.2003.tgz", + "integrity": "sha512-hY3FMAjIaPDdK3FNxyRXRfHPOFeoBn6dmnLyKZgQ2IbTTD1adXhl6PfCIqHhCPvurigv7nf7mYuWZZ19MmJzmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxlint-tsgolint/linux-arm64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/linux-arm64/-/linux-arm64-7.0.2003.tgz", + "integrity": "sha512-eAET4JpyfBbg8SO0K74o4R55tEjVC292pIyxGOw2XGf8x/HrPNyxwQ478jMYOM54FIVOHc8sJ6VRHxluy6lucw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxlint-tsgolint/linux-x64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/linux-x64/-/linux-x64-7.0.2003.tgz", + "integrity": "sha512-GXdyO/XyqDJ3s/llR/oOktLsYNjZtWSQBy0JMc+/0gsNPvTcseKPhn9c6KcFyWmnr6H4vljYALbujonqSzzEGw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxlint-tsgolint/win32-arm64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/win32-arm64/-/win32-arm64-7.0.2003.tgz", + "integrity": "sha512-TWauXnPfet0VgpmrstoAK58eJ4gbuwPUuUTQmYQAzE/RG1CpnxXtrKUJULf6lyerPE4KN3gM+DflIA1hOH+38Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oxlint-tsgolint/win32-x64": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/win32-x64/-/win32-x64-7.0.2003.tgz", + "integrity": "sha512-DoRmfe7j8VqNlukp8liRVW45GQDhzRccNenjD/pdzelgtffW47pCMd1xbJLkPaPbKnTwID3onn3VZlL7JbebEA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oxlint/binding-android-arm-eabi": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.85.0.tgz", + "integrity": "sha512-q2KO/Zso9UT+OMn0NF9ywn4E4t0MI3yxiDhNyhsQ7DyQJrC4FhFE4TXOi4bktFnOWXTMds8qZSbpv2XwRaNOBg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-android-arm64": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.85.0.tgz", + "integrity": "sha512-SxLN3ALjoT9NNdvpjEevGeHvfzTAFrF0NBYB5tzK7/GtCKMze3j1e/m/X2ozqGj2U9hfGG/dg/OG8vpVK4PiDA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-arm64": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.85.0.tgz", + "integrity": "sha512-Y/Sup/J4f0f9UGsSd/xyCNTeWL+gepO63GBdEDAfue9nBsnk9zMmnIXx1O6b1V8C90vB5nucYNZ0pbMXAp8zJA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-x64": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.85.0.tgz", + "integrity": "sha512-ApOSNC04ynpDTwvBD+//0wyfODRSbEzvRoKpX8teffmc27z8AockwSNeMXGJXn5KP85eahDgR/2llICWLkzcnw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-freebsd-x64": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.85.0.tgz", + "integrity": "sha512-bNrVrCOA/kHky3Tu79IXWXe5bhIgLXfUuUEDHlAGOHUk96MkvDZ1ecaQF19rwstrnaqfP1o9nBTqzIr9+ZHkUg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-gnueabihf": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.85.0.tgz", + "integrity": "sha512-NUrzOJ1s/EqsVvfn2L/1D8Wro2LPIZUbihL8kOJLh5fEdGEN3rdOGUYq3HwnUIL8sjpoP+4N6RaGrgmMJnaMPw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-musleabihf": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.85.0.tgz", + "integrity": "sha512-UJXrAT3E/RWkEqXLIs2ehETja1qfgkPb+5gwLIIS+o/6cf+grHvoOXTa5997a/YNQfcJS0DRBTOfZt95cvOI1g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-gnu": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.85.0.tgz", + "integrity": "sha512-lK40QLjI0HxigO7CjDDshEtfYIeiYS0020v5BHFPqN4uuQBQxd2K9LNom2dW15o9F1937quSCRVp4ZsVhdbYdg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-musl": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.85.0.tgz", + "integrity": "sha512-c2zbdBwGKreHXwRx3gWBuFGJxLhxgsg6YlZ+3H+RgRusU/UEV9jNwJ3HGYK+nRo0LvBa7mt6Kj86xoVotUo8cw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-ppc64-gnu": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.85.0.tgz", + "integrity": "sha512-tlt/Hy8lZ97/lCPmCgw/B3k/mwh+BzaIPbPkldZEly7TwLmx0xe2CQcaW2g/rR0dOgS9JNGCZsMEqLhUNMGvaw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-gnu": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.85.0.tgz", + "integrity": "sha512-3tNR9Xey82X0zKuY1d8hJ6Rc9gwRDurmqGLnQZa5xqOXy8/YyiqFXjAtugkKLY82obOlpK1eSiDRlgcNPuxtIg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-musl": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.85.0.tgz", + "integrity": "sha512-wbGRd5PqCcjkJFHhZuZ2OBSUQY9czlQsoA/cQQB9JK/L9mC5MQgGoKAh+xd8QjA5V+0D3j+Qd1lAWn1I8zlelA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-s390x-gnu": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.85.0.tgz", + "integrity": "sha512-3Sn0kSrE4DPZCWV/8o+n4x3aFZxI9ulMnkYlwCbJ8eUVkwRK2IerohE/A/z3SNbCwoPFOCJmGE5Avrq0rrvdvQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-gnu": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.85.0.tgz", + "integrity": "sha512-JY2pxxYfB62bAGfejljVCqc44etItehPuAyaeSAdMuEMtwNA00ggMnS66lC1oIhos6oOXUkuU6mZ9bpFh3BqWg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-musl": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.85.0.tgz", + "integrity": "sha512-5k74vZ6qJBjBHEOlBk9B/iv68Yu0F1Afw/vvT2ar6OGCqEeXLaSjXz2n/IPCbhLG22UoKoYEJTzpYraRdcp6PA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-openharmony-arm64": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.85.0.tgz", + "integrity": "sha512-GbAl5qt5TCkPLXTaIISZJnugrcBhra6rodcXc9jYt620UtdsTt71NlNmJmm0frxzFpd54x/G+MkitEJA8I/BoA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-arm64-msvc": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.85.0.tgz", + "integrity": "sha512-kjmws5MK0et2swk4ND85D7NVQyDHw162i6whtZDLUA/lo6FQyBZDcmMRCMcVZcNrAhIaftVb00x9ChGDOjjNJA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-ia32-msvc": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.85.0.tgz", + "integrity": "sha512-eSsIJx9n4yxvOqYTZyPEMyEXRmE60XH7xGAU7i0Qbsn1lf6Za3CWJ9aRd82oSFKXaxhp+sA6/yMJVRIpLpna6A==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-x64-msvc": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.85.0.tgz", + "integrity": "sha512-pBebIPUpKKhWrhSMWhy8TdAZBewiXnfxmaAGxhzxM1068GagqFaTwgKlU6e+UyJ2sPR+VoHouhXuGJkQjsrDvA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, "node_modules/@parcel/watcher": { "version": "2.5.6", "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.6.tgz", @@ -3235,6 +3668,73 @@ "opener": "bin/opener-bin.js" } }, + "node_modules/oxlint": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.85.0.tgz", + "integrity": "sha512-bc26s97nuvPj1ViyPsqmKecVkUWFMEdtayO8MaQ6oiLfs1pj94cQlZZhrh4BPNlr9HQosjhIlwgZKsfcwmcNgg==", + "dev": true, + "license": "MIT", + "bin": { + "oxlint": "bin/oxlint" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/oxc-project" + }, + "optionalDependencies": { + "@oxlint/binding-android-arm-eabi": "1.85.0", + "@oxlint/binding-android-arm64": "1.85.0", + "@oxlint/binding-darwin-arm64": "1.85.0", + "@oxlint/binding-darwin-x64": "1.85.0", + "@oxlint/binding-freebsd-x64": "1.85.0", + "@oxlint/binding-linux-arm-gnueabihf": "1.85.0", + "@oxlint/binding-linux-arm-musleabihf": "1.85.0", + "@oxlint/binding-linux-arm64-gnu": "1.85.0", + "@oxlint/binding-linux-arm64-musl": "1.85.0", + "@oxlint/binding-linux-ppc64-gnu": "1.85.0", + "@oxlint/binding-linux-riscv64-gnu": "1.85.0", + "@oxlint/binding-linux-riscv64-musl": "1.85.0", + "@oxlint/binding-linux-s390x-gnu": "1.85.0", + "@oxlint/binding-linux-x64-gnu": "1.85.0", + "@oxlint/binding-linux-x64-musl": "1.85.0", + "@oxlint/binding-openharmony-arm64": "1.85.0", + "@oxlint/binding-win32-arm64-msvc": "1.85.0", + "@oxlint/binding-win32-ia32-msvc": "1.85.0", + "@oxlint/binding-win32-x64-msvc": "1.85.0" + }, + "peerDependencies": { + "oxlint-tsgolint": ">=7.0.2001", + "vite-plus": "*" + }, + "peerDependenciesMeta": { + "oxlint-tsgolint": { + "optional": true + }, + "vite-plus": { + "optional": true + } + } + }, + "node_modules/oxlint-tsgolint": { + "version": "7.0.2003", + "resolved": "https://registry.npmjs.org/oxlint-tsgolint/-/oxlint-tsgolint-7.0.2003.tgz", + "integrity": "sha512-VnK4zlqgmgq/7ZcjzCk/WpN8kKFsYGcB85Io9qT3wL4K8Un3RKmJkp793crNETieMusPMKOA4a+Mw2wbteI6TQ==", + "dev": true, + "license": "MIT", + "bin": { + "tsgolint": "bin/tsgolint.js" + }, + "optionalDependencies": { + "@oxlint-tsgolint/darwin-arm64": "7.0.2003", + "@oxlint-tsgolint/darwin-x64": "7.0.2003", + "@oxlint-tsgolint/linux-arm64": "7.0.2003", + "@oxlint-tsgolint/linux-x64": "7.0.2003", + "@oxlint-tsgolint/win32-arm64": "7.0.2003", + "@oxlint-tsgolint/win32-x64": "7.0.2003" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", diff --git a/package.json b/package.json index 96173ab8..bea34dac 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "prepare:ios": "scripts/ios.sh prepare ios", "doctor:ios": "scripts/ios.sh doctor ios", "build": "./build.sh", + "lint": "./lint.sh", "run": "./build_and_run.sh", "release": "scripts/release.sh", "clean": "rm -rf platforms", @@ -39,6 +40,8 @@ "@nativescript/ios": "9.0.3", "@nativescript/types": "~9.0.0", "@nativescript/webpack": "~5.0.25", + "oxlint": "^1.85.0", + "oxlint-tsgolint": "^7.0.2003", "typescript": "~5.4.0" } } diff --git a/tsconfig.json b/tsconfig.json index 4951dbe8..1c920328 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,10 +9,9 @@ "noEmitOnError": true, "skipLibCheck": true, "lib": ["ESNext", "dom"], - "baseUrl": ".", "paths": { - "~/*": ["app/*"], - "@/*": ["app/*"] + "~/*": ["./app/*"], + "@/*": ["./app/*"] } }, "include": ["app/**/*"], From 48f7f3d01f70e60ee1644396b9765b7174265fe1 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Tue, 29 Sep 2026 12:44:26 -0700 Subject: [PATCH 17/60] Fix Kotlin warnings --- native/kotlin/shared/build.gradle.kts | 8 ++++++++ .../com/faceclaw/app/graphics/DrawRedraw.android.kt | 2 +- .../kotlin/com/faceclaw/app/g2protocol/BleProtocol.kt | 2 +- .../kotlin/com/faceclaw/app/g2protocol/TexturePlanner.kt | 8 ++++---- .../faceclaw/app/g2protocol/session/GlassesSessionSend.kt | 4 ++-- .../kotlin/com/faceclaw/app/graphics/MenuSelection.kt | 2 +- .../kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt | 7 ++----- .../kotlin/com/faceclaw/app/util/FrameTimingsCore.kt | 2 +- .../src/iosMain/kotlin/com/faceclaw/app/IosNativeApi.kt | 2 +- .../iosMain/kotlin/com/faceclaw/app/ble/IosBleCentral.kt | 8 +++++++- .../kotlin/com/faceclaw/app/net/IosStreamingHttp.kt | 6 +----- tests/kotlin/build.gradle.kts | 5 +++++ wear/app/build.gradle.kts | 3 +++ wear/gradle/wrapper/gradle-wrapper.properties | 2 +- 14 files changed, 38 insertions(+), 23 deletions(-) diff --git a/native/kotlin/shared/build.gradle.kts b/native/kotlin/shared/build.gradle.kts index cdcf1f87..a3df3c82 100644 --- a/native/kotlin/shared/build.gradle.kts +++ b/native/kotlin/shared/build.gradle.kts @@ -6,6 +6,14 @@ plugins { id("com.android.kotlin.multiplatform.library") } kotlin { + compilerOptions { + // expect/actual classes are Beta in Kotlin 2.x; opt in deliberately. + freeCompilerArgs.add("-Xexpect-actual-classes") + // The compiler prints a warning only when it recompiles that file, and + // up-to-date or incremental builds never replay it, so warnings are easy + // to miss. Fail the build instead. + allWarningsAsErrors.set(true) + } android { namespace = "com.faceclaw.shared" compileSdk = 35 diff --git a/native/kotlin/shared/src/androidMain/kotlin/com/faceclaw/app/graphics/DrawRedraw.android.kt b/native/kotlin/shared/src/androidMain/kotlin/com/faceclaw/app/graphics/DrawRedraw.android.kt index 3b2e422f..f91c68a3 100644 --- a/native/kotlin/shared/src/androidMain/kotlin/com/faceclaw/app/graphics/DrawRedraw.android.kt +++ b/native/kotlin/shared/src/androidMain/kotlin/com/faceclaw/app/graphics/DrawRedraw.android.kt @@ -11,5 +11,5 @@ private object DrawRedrawScheduler { internal actual fun scheduleDrawRedraw(delayMs: Int, action: () -> Unit): () -> Unit { val future = DrawRedrawScheduler.executor.schedule(action, delayMs.toLong(), TimeUnit.MILLISECONDS) - return { future.cancel(false); Unit } + return { future.cancel(false) } } diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/BleProtocol.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/BleProtocol.kt index a59a4817..cf3c2b3b 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/BleProtocol.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/BleProtocol.kt @@ -859,7 +859,7 @@ class BleProtocol { private fun concat(parts: MutableList): ByteArray { var out: ByteSink = ByteSink() for (part in parts) { - if (((part != null) && (part.size > 0))) { + if (part.size > 0) { out.write(part, 0, part.size) } } diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/TexturePlanner.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/TexturePlanner.kt index a5eb02cf..8386a202 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/TexturePlanner.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/TexturePlanner.kt @@ -308,7 +308,7 @@ class TexturePlanner { i++ continue } - var entry: FwGlyphAtlas.Entry? = FwGlyphAtlas.get(draw.fwCps!![i]) + var entry: FwGlyphAtlas.Entry? = FwGlyphAtlas.get(draw.fwCps[i]) if ((entry == null)) { baked++ i++ @@ -351,7 +351,7 @@ class TexturePlanner { var bytesToLastInk: Int = 0 var bytesSoFar: Int = 0 while (((j < n) && ok[j])) { - var encodedLength: Int = utf8Length(draw.fwCps!![j]) + var encodedLength: Int = utf8Length(draw.fwCps[j]) if (((bytesSoFar + encodedLength) > 255)) { break } @@ -379,7 +379,7 @@ class TexturePlanner { run { var k: Int = i while ((k <= lastInk)) { - var encoded: ByteArray = codePointUtf8(draw.fwCps!![k]) + var encoded: ByteArray = codePointUtf8(draw.fwCps[k]) encoded.copyInto(sub, pos, 0, 0 + encoded.size) pos += encoded.size k++ @@ -393,7 +393,7 @@ class TexturePlanner { outPunches.add( FwPunch( entries[k]!!, - ((draw.x + draw.fwDx!![k]) + entries[k]!!.ofsX), + ((draw.x + draw.fwDx[k]) + entries[k]!!.ofsX), (draw.y + entries[k]!!.inkTop), ) ) diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt index 44386bbe..20c069be 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt @@ -130,7 +130,7 @@ internal fun GlassesSessionCore.driveSession(): Long { finishDesiredFrameLocked("discarded: glasses charging") if (sessionReady && inFlightMessages.isEmpty() && !pendingMessages.isEmpty()) { messageToWrite = pendingMessages.removeFirst() - logLine("sending pending message (charging): " + messageToWrite!!.label) + logLine("sending pending message (charging): " + messageToWrite.label) } else if (sessionReady && pendingMessages.isEmpty() && inFlightMessages.isEmpty() && now - lastBatteryRefreshAtMs >= ConnectionOptions.CHARGING_BATTERY_POLL_MS) { logLine("Writing charging-mode battery poll") @@ -203,7 +203,7 @@ internal fun GlassesSessionCore.driveSession(): Long { if (messageToPrewrite == null && sessionReady && windowHasRoom && !pendingMessages.isEmpty() && CfwMessageWindow.canSend(inFlightMessages, pendingMessages.firstOrNull()!!)) { messageToWrite = pendingMessages.removeFirst() - logLine("sending pending message: " + messageToWrite!!.label) + logLine("sending pending message: " + messageToWrite.label) } else if (messageToPrewrite == null && !shutdownRequested && !benchmarkActive && fixedLayoutCreated && windowHasRoom && !hasPendingImageLocked() diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/MenuSelection.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/MenuSelection.kt index 40328574..b8a9438e 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/MenuSelection.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/MenuSelection.kt @@ -39,7 +39,7 @@ class MenuSelection(val x: Int, val y: Int, val width: Int, val height: Int, val val radius = reader.getShort().toInt() and 65535 val background = BmpUtil.nibbleForGray(reader.get() and 255) val border = BmpUtil.nibbleForGray(reader.get() and 255) - val depth = reader.get().toByte().toInt() + val depth = reader.get().toInt() val count = reader.getShort().toInt() and 65535 require(count <= 2048) require(w in 1..640 && h in 1..480 && 5 + (w + 1) / 2 * h <= 65536 && reader.remaining() >= w * h) diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt index 57d92c5f..4fea1860 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt @@ -392,10 +392,7 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr surface = Surface(id) surfaces.put(id, surface) } - if ( - (((surface.pixels == null) || (surface.width != width)) || - (surface.height != height)) - ) { + if ((surface.width != width) || (surface.height != height)) { surface.pixels = ByteArray((width * height)) surface.fingerprint = "" surface.draws = NO_DRAWS @@ -825,7 +822,7 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr var col: Int = 0 while ((col < copyWidth)) { var value: Int = (surface.pixels[(srcOffset + col)] and 0xff) - if ((value.toInt() != 0)) { + if ((value != 0)) { gray[(dstOffset + col)] = (dimValue(value, dim)).toByte() } else { if ((surface.transparency == TRANSPARENCY_OPAQUE)) { diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/util/FrameTimingsCore.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/util/FrameTimingsCore.kt index ee4e8598..e24f763e 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/util/FrameTimingsCore.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/util/FrameTimingsCore.kt @@ -92,7 +92,7 @@ class FrameTimingsCore( fun root(): Frame { var frame: Frame = this while (frame.parent != null) { - frame = frame.parent!! + frame = frame.parent } return frame } diff --git a/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/IosNativeApi.kt b/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/IosNativeApi.kt index e9f6be48..5c56d330 100644 --- a/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/IosNativeApi.kt +++ b/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/IosNativeApi.kt @@ -1,4 +1,4 @@ -@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class) +@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class, kotlinx.cinterop.BetaInteropApi::class) package com.faceclaw.app diff --git a/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/ble/IosBleCentral.kt b/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/ble/IosBleCentral.kt index 38af3ba8..9101e159 100644 --- a/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/ble/IosBleCentral.kt +++ b/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/ble/IosBleCentral.kt @@ -52,6 +52,9 @@ fun interface IosAncsAuthorizationListener { fun onAncsAuthorization(identifier: String, authorized: Boolean) } +/** The canonical 8-4-4-4-12 hex form -[NSUUID initWithUUIDString:] accepts. */ +private val UUID_STRING = Regex("^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$") + /** * CoreBluetooth central used by the shared session and stock-firmware flows on iOS. It is * the iOS counterpart of Android's FaceclawBleManager: every [SessionLink]/[StockLink] call @@ -268,7 +271,10 @@ class IosBleCentral(private val platform: ProtocolPlatform = IosProtocolPlatform var retrieved: CBPeripheral? = null dispatch_sync(queue) { val manager = central ?: return@dispatch_sync - val uuid = NSUUID(uUIDString = identifier) ?: return@dispatch_sync + // NSUUID's initializer can return nil, but Kotlin imports it as a + // non-null constructor: screen out malformed identifiers first. + if (!UUID_STRING.matches(identifier)) return@dispatch_sync + val uuid = NSUUID(uUIDString = identifier) retrieved = manager.retrievePeripheralsWithIdentifiers(listOf(uuid)).firstOrNull() as? CBPeripheral } retrieved?.let { return remember(it) } diff --git a/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/net/IosStreamingHttp.kt b/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/net/IosStreamingHttp.kt index 91a32f72..209bbc36 100644 --- a/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/net/IosStreamingHttp.kt +++ b/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/net/IosStreamingHttp.kt @@ -8,7 +8,6 @@ import platform.Foundation.NSData import platform.Foundation.NSError import platform.Foundation.NSHTTPURLResponse import platform.Foundation.NSMutableURLRequest -import platform.Foundation.NSString import platform.Foundation.NSURL import platform.Foundation.NSURLRequest import platform.Foundation.NSURLResponse @@ -19,9 +18,6 @@ import platform.Foundation.NSURLSessionDataTask import platform.Foundation.NSURLSessionResponseAllow import platform.Foundation.NSURLSessionResponseDisposition import platform.Foundation.NSURLSessionTask -import platform.Foundation.NSUTF8StringEncoding -import platform.Foundation.create -import platform.Foundation.dataUsingEncoding import platform.Foundation.setHTTPBody import platform.Foundation.setHTTPMethod import platform.Foundation.setValue @@ -31,7 +27,7 @@ import platform.darwin.NSObject internal fun buildRequest(url: NSURL, method: String, body: String?, headers: List>): NSMutableURLRequest { val request = NSMutableURLRequest.requestWithURL(url) request.setHTTPMethod(method) - if (body != null) request.setHTTPBody((body as NSString).dataUsingEncoding(NSUTF8StringEncoding)) + if (body != null) request.setHTTPBody(body.encodeToByteArray().data()) var hasUserAgent = false for ((name, value) in headers) { if (name.equals("User-Agent", ignoreCase = true)) hasUserAgent = true diff --git a/tests/kotlin/build.gradle.kts b/tests/kotlin/build.gradle.kts index 0c97093c..bbf4cfeb 100644 --- a/tests/kotlin/build.gradle.kts +++ b/tests/kotlin/build.gradle.kts @@ -7,6 +7,11 @@ plugins { // Compile the production sources without building NativeScript or touching BLE. kotlin { + // Match native/kotlin/shared/build.gradle.kts. + compilerOptions { + freeCompilerArgs.add("-Xexpect-actual-classes") + allWarningsAsErrors.set(true) + } android { namespace = "com.faceclaw.protocoltests" compileSdk = 35 diff --git a/wear/app/build.gradle.kts b/wear/app/build.gradle.kts index 963e22cf..3af540f5 100644 --- a/wear/app/build.gradle.kts +++ b/wear/app/build.gradle.kts @@ -46,6 +46,9 @@ android { } kotlinOptions { jvmTarget = "17" + // Warnings print only when a file is recompiled; fail instead so they + // can't scroll by unnoticed (as in native/kotlin/shared). + allWarningsAsErrors = true } } diff --git a/wear/gradle/wrapper/gradle-wrapper.properties b/wear/gradle/wrapper/gradle-wrapper.properties index d4081da4..4f5eb9dc 100644 --- a/wear/gradle/wrapper/gradle-wrapper.properties +++ b/wear/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME From 6267afaff7df9fcc4d6658575a8dbded0878eae5 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Tue, 29 Sep 2026 14:33:23 -0700 Subject: [PATCH 18/60] Improve connection stability, I hope --- .../com/faceclaw/app/AndroidSessionLink.kt | 4 + .../com/faceclaw/app/FaceclawBleManager.kt | 476 ++++++++++-------- .../app/g2protocol/ConnectionOptions.kt | 12 +- .../session/GlassesSessionControls.kt | 35 +- .../g2protocol/session/GlassesSessionCore.kt | 86 +++- .../g2protocol/session/GlassesSessionSend.kt | 47 +- .../app/g2protocol/session/SessionPorts.kt | 12 + tests/kotlin/build.gradle.kts | 4 +- .../faceclaw/app/GlassesSessionCoreTest.kt | 64 ++- 9 files changed, 497 insertions(+), 243 deletions(-) diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/AndroidSessionLink.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/AndroidSessionLink.kt index 8f7cb4cb..18417050 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/AndroidSessionLink.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/AndroidSessionLink.kt @@ -6,6 +6,10 @@ import android.bluetooth.BluetoothGatt class AndroidSessionLink(private val bleManager: FaceclawBleManager) : SessionLink { override fun connect(address: String, timeoutMs: Int): Boolean = bleManager.connect(address, timeoutMs) + override fun beginConnect(address: String, background: Boolean): Boolean = bleManager.beginConnect(address, background) + + override fun isConnected(address: String): Boolean = bleManager.isConnected(address) + override fun requestHighPriority(address: String) { bleManager.requestConnectionPriority(address, BluetoothGatt.CONNECTION_PRIORITY_HIGH) } diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleManager.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleManager.kt index 2335605f..8cc7808a 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleManager.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleManager.kt @@ -11,14 +11,13 @@ import android.bluetooth.BluetoothGattService import android.bluetooth.BluetoothManager import android.bluetooth.BluetoothProfile import android.content.Context -import android.os.Handler -import android.os.Looper -import android.os.SystemClock import android.util.Log import java.util.UUID import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.CountDownLatch +import java.util.concurrent.ExecutorService +import java.util.concurrent.Executors import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicLong @@ -28,6 +27,26 @@ class FaceclawBleManager(context: Context) { private const val TAG = "FaceclawBle" private val WRITE_RETRY_DELAYS_MS = intArrayOf(1, 1, 1, 2, 4, 8, 12, 20, 35, 100, 200) + // Handed to an operation waiter whose link dropped before its completion + // callback arrived; never a real GATT status. + private const val STATUS_LINK_LOST = -1 + + // Android's Bluetooth stack has process-wide command-pipeline constraints on some + // devices, so every GATT operation in the process is serialized on this one lock, + // across manager instances too (the session and each stock-firmware flow own one). + // An operation holds it until its completion callback; waiting for a connection + // to come up does not. + private val bluetoothApiLock = Any() + + // Listener callbacks run here, in arrival order, instead of on the binder thread + // that delivered them. BluetoothGatt's callback interface is oneway, so a listener + // that blocks (the session core waits for its monitor) would otherwise hold back + // every later callback for that device, including the write completion that the + // monitor's holder may itself be waiting for. + private val callbackExecutor: ExecutorService = Executors.newSingleThreadExecutor { runnable -> + Thread(runnable, "FaceclawBleCallbacks").apply { isDaemon = true } + } + // Process-wide outbound-traffic totals, sampled by the phone UI's BLE // bandwidth indicator. Static so counts from every manager instance and // isolate land in the same totals. @@ -48,28 +67,34 @@ class FaceclawBleManager(context: Context) { } } + /** + * One BluetoothGatt client for an address: a pending connection attempt until + * [connected]. [gatt] is set once connectGatt returns; a callback can arrive before + * that, while it is still null. + */ + private class GattLink { + @Volatile var gatt: BluetoothGatt? = null + @Volatile var connected = false + val connectLatch = CountDownLatch(1) + } + + private enum class OpKind { MTU, SERVICES, DESCRIPTOR, WRITE } + + /** The GATT operation awaiting its completion callback (the global lock allows one at a time). */ + private class PendingOp(val address: String, val kind: OpKind) { + val latch = CountDownLatch(1) + @Volatile var status: Int? = null + } + private val context: Context + private val bluetoothManager: BluetoothManager private val bluetoothAdapter: BluetoothAdapter - private val mainHandler = Handler(Looper.getMainLooper()) - private val gattClients = ConcurrentHashMap() - private val bluetoothApiLock = Any() - - private val connectLatches = ConcurrentHashMap() - private val connectResults = ConcurrentHashMap() - - private val servicesLatches = ConcurrentHashMap() - private val servicesStatuses = ConcurrentHashMap() - - private val mtuLatches = ConcurrentHashMap() + private val links = ConcurrentHashMap() private val negotiatedMtus = ConcurrentHashMap() - private val mtuStatuses = ConcurrentHashMap() - private val descriptorLatches = ConcurrentHashMap() - private val descriptorStatuses = ConcurrentHashMap() - - private val writeLatches = ConcurrentHashMap() - private val writeStatuses = ConcurrentHashMap() + @Volatile + private var pendingOp: PendingOp? = null @Volatile private var listener: FaceclawBleListener? = null @@ -80,6 +105,7 @@ class FaceclawBleManager(context: Context) { if (bluetoothManager == null || bluetoothManager.adapter == null) { throw IllegalStateException("Bluetooth adapter unavailable") } + this.bluetoothManager = bluetoothManager this.bluetoothAdapter = bluetoothManager.adapter } @@ -122,67 +148,81 @@ class FaceclawBleManager(context: Context) { } } - /** Whether a GATT client for this address is open, i.e. no disconnect callback has arrived for it. */ + /** Whether a connection to this address is up (not merely pending). */ fun isConnected(address: String?): Boolean { - return address != null && gattClients.containsKey(address) + return address != null && links[address]?.connected == true + } + + /** + * Start connecting without waiting; a later [connect] waits on the same attempt. + * [background] uses Android's autoConnect: a low-duty-cycle attempt with no timeout + * that lands whenever the device next advertises (a direct attempt scans hard but + * gives up after about 30 s). Returns true while a connection exists or is pending. + */ + fun beginConnect(address: String?, background: Boolean): Boolean { + return startConnect(requireAddress(address), background) != null } fun connect(address: String?, timeoutMs: Int): Boolean { - if (address == null || address.trim().isEmpty()) { - throw IllegalArgumentException("address is required") + val key = requireAddress(address) + val link = startConnect(key, false) ?: return false + if (link.connected) { + return true } - val latch = CountDownLatch(1) - connectLatches[address] = latch - connectResults.remove(address) + if (!awaitLatch(link.connectLatch, timeoutMs)) { + Log.w(TAG, "connect timed out after ${timeoutMs}ms: address=$key" + + " (no connection event; the device may not be advertising, or may be connected to something else)") + dropLink(key, link) + return false + } + return link.connected + } - val gattLock = gattLock(address) - synchronized(gattLock) { - val existing = gattClients[address] + /** The current client for [address], starting a connection attempt when there is none. */ + private fun startConnect(address: String, background: Boolean): GattLink? { + synchronized(bluetoothApiLock) { + val existing = links[address] if (existing != null) { - connectLatches.remove(address) - return true + if (!existing.connected || isOsConnected(existing)) { + return existing + } + // A client can go stale without a disconnect callback (the Bluetooth + // service drops its clients when the adapter turns off). + Log.w(TAG, "dropping stale client: address=$address (Android reports no GATT connection)") + dropLink(address, existing) } - val device = bluetoothAdapter.getRemoteDevice(address) - if (device == null) { - connectLatches.remove(address) - throw IllegalArgumentException("remote device not found: $address") - } - + val link = GattLink() + links[address] = link val gatt: BluetoothGatt? = device.connectGatt( context, - false, + background, gattCallback, BluetoothDevice.TRANSPORT_LE, BluetoothDevice.PHY_LE_2M or BluetoothDevice.PHY_LE_1M ) - if (gatt != null) { - gattClients[address] = gatt - } - if (gatt == null) { - connectLatches.remove(address) - return false + links.remove(address, link) + Log.w(TAG, "connectGatt returned null: address=$address") + return null } + link.gatt = gatt + Log.i(TAG, "connect started: address=$address background=$background") + return link + } + } - if (!awaitLatch(latch, timeoutMs)) { - connectLatches.remove(address) - connectResults.remove(address) - gattClients.remove(address, gatt) - negotiatedMtus.remove(address) - gatt.disconnect() - gatt.close() - return false - } - - val connected = connectResults.remove(address) - connectLatches.remove(address) - return connected == true + private fun isOsConnected(link: GattLink): Boolean { + val gatt = link.gatt ?: return false + return try { + bluetoothManager.getConnectionState(gatt.device, BluetoothProfile.GATT) == BluetoothProfile.STATE_CONNECTED + } catch (t: Throwable) { + true } } fun requestConnectionPriority(address: String, priority: Int): Boolean { - synchronized(gattLock(address)) { + synchronized(bluetoothApiLock) { val gatt = requireGatt(address) return gatt.requestConnectionPriority(priority) } @@ -190,7 +230,7 @@ class FaceclawBleManager(context: Context) { /** One-shot benchmark preferences; success is established by callbacks/HCI, not submission. */ fun prepareBenchmarkLink(address: String, mode: Int) { - synchronized(gattLock(address)) { + synchronized(bluetoothApiLock) { val gatt = requireGatt(address) if ((mode and 1) != 0) { val accepted = gatt.requestConnectionPriority(BluetoothGatt.CONNECTION_PRIORITY_HIGH) @@ -211,69 +251,27 @@ class FaceclawBleManager(context: Context) { } fun requestMtu(address: String, mtu: Int, timeoutMs: Int): Boolean { - synchronized(gattLock(address)) { - val latch = CountDownLatch(1) - mtuLatches[address] = latch - mtuStatuses.remove(address) - - val gatt = requireGatt(address) - val started = gatt.requestMtu(mtu) - if (!started) { - mtuLatches.remove(address) - return false - } - if (!awaitLatch(latch, timeoutMs)) { - mtuLatches.remove(address) - mtuStatuses.remove(address) - return false - } - val status = mtuStatuses.remove(address) - mtuLatches.remove(address) - return status != null && status == BluetoothGatt.GATT_SUCCESS - } + val status = runOp(address, OpKind.MTU, timeoutMs) { gatt -> gatt.requestMtu(mtu) } + return status == BluetoothGatt.GATT_SUCCESS } fun discoverServices(address: String, timeoutMs: Int): Boolean { - synchronized(gattLock(address)) { - val latch = CountDownLatch(1) - servicesLatches[address] = latch - servicesStatuses.remove(address) - - val gatt = requireGatt(address) - val started = gatt.discoverServices() - if (!started) { - servicesLatches.remove(address) - return false - } - if (!awaitLatch(latch, timeoutMs)) { - servicesLatches.remove(address) - servicesStatuses.remove(address) - return false - } - val status = servicesStatuses.remove(address) - servicesLatches.remove(address) - return status != null && status == BluetoothGatt.GATT_SUCCESS - } + val status = runOp(address, OpKind.SERVICES, timeoutMs) { gatt -> gatt.discoverServices() } + return status == BluetoothGatt.GATT_SUCCESS } fun enableNotifications(address: String, characteristicUuid: String, enable: Boolean, timeoutMs: Int): Boolean { - synchronized(gattLock(address)) { - val latch = CountDownLatch(1) - descriptorLatches[address] = latch - descriptorStatuses.remove(address) - + synchronized(bluetoothApiLock) { val gatt = requireGatt(address) val characteristic = requireCharacteristic(gatt, characteristicUuid) val notificationSet = gatt.setCharacteristicNotification(characteristic, enable) if (!notificationSet) { - descriptorLatches.remove(address) return false } val descriptor = characteristic.getDescriptor(java.util.UUID.fromString(BleProtocol.CCCD_UUID)) if (descriptor == null) { - descriptorLatches.remove(address) return true } @@ -281,20 +279,39 @@ class FaceclawBleManager(context: Context) { BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE else BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE - val started = gatt.writeDescriptor(descriptor) - if (!started) { - descriptorLatches.remove(address) - descriptorStatuses.remove(address) - return false + val status = runOp(address, OpKind.DESCRIPTOR, timeoutMs) { client -> client.writeDescriptor(descriptor) } + return status == BluetoothGatt.GATT_SUCCESS + } + } + + /** + * Start one GATT operation and wait for its completion callback, holding the global + * lock throughout. Returns the callback's status ([STATUS_LINK_LOST] when the link + * dropped first), or null when Android refused the request or it timed out. + */ + private fun runOp(address: String, kind: OpKind, timeoutMs: Int, start: (BluetoothGatt) -> Boolean): Int? { + synchronized(bluetoothApiLock) { + val op = PendingOp(address, kind) + // Published before the connected check in requireGatt, so a disconnect racing + // with this start either fails that check or finds the op to release. + pendingOp = op + try { + val gatt = requireGatt(address) + if (!start(gatt)) { + Log.w(TAG, "$kind not started: address=$address") + return null + } + if (!awaitLatch(op.latch, timeoutMs)) { + Log.w(TAG, "$kind timed out after ${timeoutMs}ms: address=$address") + return null + } + if (op.status == STATUS_LINK_LOST) { + Log.w(TAG, "$kind abandoned: link lost: address=$address") + } + return op.status + } finally { + pendingOp = null } - if (!awaitLatch(latch, timeoutMs)) { - descriptorLatches.remove(address) - descriptorStatuses.remove(address) - return false - } - val status = descriptorStatuses.remove(address) - descriptorLatches.remove(address) - return status != null && status == BluetoothGatt.GATT_SUCCESS } } @@ -310,7 +327,7 @@ class FaceclawBleManager(context: Context) { } val startMs = System.currentTimeMillis() - synchronized(gattLock(address)) { + synchronized(bluetoothApiLock) { val gatt = requireGatt(address) val characteristic = requireCharacteristic(gatt, characteristicUuid) @@ -338,45 +355,45 @@ class FaceclawBleManager(context: Context) { ): Boolean { var retryCount = 0 while (true) { - val latch = CountDownLatch(1) - writeLatches[address] = latch - writeStatuses.remove(address) - - val currentTime = System.currentTimeMillis() - val result = gatt.writeCharacteristic(characteristic, data!!, writeType) - val timeAsleep = System.currentTimeMillis() - currentTime - //Log.i(TAG, "writeCharacteristic: spent " + timeAsleep + "ms"); - - if (result == android.bluetooth.BluetoothStatusCodes.ERROR_GATT_WRITE_REQUEST_BUSY) { - writeLatches.remove(address, latch) - writeStatuses.remove(address) - if (!sleepBeforeWriteRetry(address, "busy", retryCount++)) { + val op = PendingOp(address, OpKind.WRITE) + pendingOp = op + try { + if (!isConnected(address)) { + Log.w(TAG, "writeCharacteristic abandoned: link lost: address=$address") return false } - continue - } else { - //Log.i(TAG, "writeCharacteristic with writeType=" + writeType + " result=" + result + " retryCount=" + retryCount); + val result = gatt.writeCharacteristic(characteristic, data!!, writeType) if (result != android.bluetooth.BluetoothStatusCodes.SUCCESS) { - writeLatches.remove(address, latch) - writeStatuses.remove(address) - if (!sleepBeforeWriteRetry(address, "start result=$result", retryCount++)) { + if (!isConnected(address)) { + Log.w(TAG, "writeCharacteristic abandoned: link lost: address=$address") + return false + } + val reason = if (result == android.bluetooth.BluetoothStatusCodes.ERROR_GATT_WRITE_REQUEST_BUSY) + "busy" + else + "start result=$result" + if (!sleepBeforeWriteRetry(address, reason, retryCount++)) { return false } continue } - if (!awaitLatch(latch, timeoutMs)) { - writeLatches.remove(address, latch) - writeStatuses.remove(address) + if (!awaitLatch(op.latch, timeoutMs)) { + Log.w(TAG, "writeCharacteristic timed out after ${timeoutMs}ms waiting for completion: address=$address") return false } - val status = writeStatuses.remove(address) - writeLatches.remove(address) - if (status != null && status == BluetoothGatt.GATT_SUCCESS) { + val status = op.status + if (status == BluetoothGatt.GATT_SUCCESS) { return true } + if (status == STATUS_LINK_LOST) { + Log.w(TAG, "writeCharacteristic abandoned: link lost: address=$address") + return false + } if (!sleepBeforeWriteRetry(address, "callback status=$status", retryCount++)) { return false } + } finally { + pendingOp = null } } } @@ -397,28 +414,70 @@ class FaceclawBleManager(context: Context) { } } + /** Close this address's client, cancelling a pending connection attempt. */ fun disconnect(address: String?) { - val gattLock = gattLock(address) - synchronized(gattLock) { - val gatt = if (address != null) gattClients.remove(address) else null - if (address != null) negotiatedMtus.remove(address) - if (gatt == null) { - return - } + if (address == null) { + return + } + val link = links[address] ?: return + dropLink(address, link) + } + + fun close() { + for (address in links.keys) { + disconnect(address) + } + } + + /** + * Forget [link] if it is still current for [address], release anything waiting on it, + * then disconnect and close its client. Closing suppresses the client's remaining + * callbacks, so listeners hear nothing about a link dropped here. + */ + private fun dropLink(address: String, link: GattLink) { + if (!links.remove(address, link)) { + return + } + link.connected = false + negotiatedMtus.remove(address) + failPendingOp(address) + link.connectLatch.countDown() + // startConnect holds the lock until link.gatt is set, so it is set by the time + // this block runs (or connectGatt failed and there is nothing to close). + synchronized(bluetoothApiLock) { + val gatt = link.gatt ?: return gatt.disconnect() gatt.close() } } - fun close() { - for (address in gattClients.keys) { - disconnect(address) + private fun failPendingOp(address: String) { + val op = pendingOp + if (op != null && op.address == address && op.latch.count > 0) { + op.status = STATUS_LINK_LOST + op.latch.countDown() } } + private fun completeOp(address: String, kind: OpKind, status: Int) { + val op = pendingOp + if (op != null && op.address == address && op.kind == kind) { + op.status = status + op.latch.countDown() + } + } + + private fun requireAddress(address: String?): String { + if (address == null || address.trim().isEmpty()) { + throw IllegalArgumentException("address is required") + } + return address + } + private fun requireGatt(address: String): BluetoothGatt { - val gatt = gattClients[address] - if (gatt == null) { + val link = links[address] + val gatt = link?.gatt + if (link == null || gatt == null || !link.connected) { throw IllegalStateException("Not connected: $address") } return gatt @@ -444,52 +503,54 @@ class FaceclawBleManager(context: Context) { } } - private fun gattLock(address: String?): Any { - // Android's Bluetooth stack has process-wide command-pipeline constraints on some devices. - // Keep every BluetoothGatt API call serialized globally, even for different MAC addresses. - return bluetoothApiLock - } - private val gattCallback: BluetoothGattCallback = object : BluetoothGattCallback() { override fun onConnectionStateChange(gatt: BluetoothGatt, status: Int, newState: Int) { - Log.i(TAG, "onConnectionStateChange: status=$status newState=$newState") val address = gatt.device.address - - if (newState == BluetoothProfile.STATE_CONNECTED && status == BluetoothGatt.GATT_SUCCESS) { - connectResults[address] = true - val latch = connectLatches.remove(address) - latch?.countDown() - dispatchConnectionState(address, true) + Log.i(TAG, "onConnectionStateChange: address=$address status=$status newState=$newState") + val link = links[address] + val current = link?.gatt + if (link == null || (current != null && current !== gatt)) { + // A client this manager no longer tracks: make sure it is released. + synchronized(bluetoothApiLock) { + if (newState != BluetoothProfile.STATE_DISCONNECTED) gatt.disconnect() + gatt.close() + } return } - if (newState == BluetoothProfile.STATE_DISCONNECTED) { - connectResults[address] = false - val latch = connectLatches.remove(address) - latch?.countDown() - val gattLock = gattLock(address) - synchronized(gattLock) { - gattClients.remove(address, gatt) - negotiatedMtus.remove(address) - gatt.close() - } - dispatchConnectionState(address, false) + if (newState == BluetoothProfile.STATE_CONNECTED && status == BluetoothGatt.GATT_SUCCESS) { + link.connected = true + link.connectLatch.countDown() + dispatchConnectionState(address, link, true) + return + } + if (newState != BluetoothProfile.STATE_DISCONNECTED && status == BluetoothGatt.GATT_SUCCESS) { + return + } + + // Disconnected, or a failed attempt (including a connection reported with an + // error status). Wake the waiters first: the lock below may be held by one of + // them, waiting for a callback that will now never come. + links.remove(address, link) + link.connected = false + negotiatedMtus.remove(address) + failPendingOp(address) + link.connectLatch.countDown() + dispatchConnectionState(address, link, false) + synchronized(bluetoothApiLock) { + if (newState != BluetoothProfile.STATE_DISCONNECTED) gatt.disconnect() + gatt.close() } } override fun onServicesDiscovered(gatt: BluetoothGatt, status: Int) { - val address = gatt.device.address - servicesStatuses[address] = status - val latch = servicesLatches.remove(address) - latch?.countDown() + completeOp(gatt.device.address, OpKind.SERVICES, status) } override fun onMtuChanged(gatt: BluetoothGatt, mtu: Int, status: Int) { val address = gatt.device.address if (status == BluetoothGatt.GATT_SUCCESS) negotiatedMtus[address] = mtu - mtuStatuses[address] = status - val latch = mtuLatches.remove(address) - latch?.countDown() + completeOp(address, OpKind.MTU, status) } override fun onPhyRead(gatt: BluetoothGatt, txPhy: Int, rxPhy: Int, status: Int) { @@ -503,17 +564,11 @@ class FaceclawBleManager(context: Context) { } override fun onDescriptorWrite(gatt: BluetoothGatt, descriptor: BluetoothGattDescriptor, status: Int) { - val address = gatt.device.address - descriptorStatuses[address] = status - val latch = descriptorLatches.remove(address) - latch?.countDown() + completeOp(gatt.device.address, OpKind.DESCRIPTOR, status) } override fun onCharacteristicWrite(gatt: BluetoothGatt, characteristic: BluetoothGattCharacteristic, status: Int) { - val address = gatt.device.address - writeStatuses[address] = status - val latch = writeLatches.remove(address) - latch?.countDown() + completeOp(gatt.device.address, OpKind.WRITE, status) } override fun onCharacteristicChanged(gatt: BluetoothGatt, characteristic: BluetoothGattCharacteristic, value: ByteArray) { @@ -526,14 +581,31 @@ class FaceclawBleManager(context: Context) { } } - private fun dispatchConnectionState(address: String, connected: Boolean) { - val current = listener ?: return - current.onConnectionStateChange(address, connected) + private fun dispatchConnectionState(address: String, link: GattLink, connected: Boolean) { + callbackExecutor.execute { + // Drop news about a client that a newer attempt has already replaced. + val current = links[address] + if (if (connected) current !== link else current != null && current !== link) { + return@execute + } + val target = listener ?: return@execute + try { + target.onConnectionStateChange(address, connected) + } catch (t: Throwable) { + Log.w(TAG, "connection-state listener failed: address=$address", t) + } + } } private fun dispatchNotification(address: String, characteristicUuid: String, data: ByteArray?) { - val current = listener ?: return val copy = data?.clone() ?: ByteArray(0) - current.onNotification(address, characteristicUuid, copy) + callbackExecutor.execute { + val target = listener ?: return@execute + try { + target.onNotification(address, characteristicUuid, copy) + } catch (t: Throwable) { + Log.w(TAG, "notification listener failed: address=$address", t) + } + } } } diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/ConnectionOptions.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/ConnectionOptions.kt index 735502aa..41609c20 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/ConnectionOptions.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/ConnectionOptions.kt @@ -8,6 +8,10 @@ class ConnectionOptions { const val DESIRED_MTU = 512 const val CONNECT_TIMEOUT_MS = 5_000 + // How long one session connect attempt keeps both arms' connections pending before + // giving up. Both are dialed at once, so a slow or missing arm gets the whole + // window (it stays under Android's own ~30 s direct-connect timeout). + const val ARM_CONNECT_WINDOW_MS = 20_000 const val SERVICES_TIMEOUT_MS = 5_000 const val DESCRIPTOR_TIMEOUT_MS = 5_000 const val RING_DESIRED_MTU = 247 @@ -36,7 +40,13 @@ class ConnectionOptions { const val MAX_CONSECUTIVE_ACK_TIMEOUTS = 8 const val EVEN_APP_WRITE_FAILURE_WINDOW_MS = 15_000 const val IDLE_SLEEP_MS = 100 - const val RECONNECT_DELAY_MS = 2_000 + // Delay before each consecutive reconnect attempt (the last entry repeats). Android + // keeps an LE link up for a few seconds after its last GATT client closes (4 s on a + // Pixel), so the quick first retry reuses the old links and the glasses never see a + // disconnect; later retries wait long enough for the links to really drop. + @JvmField val RECONNECT_BACKOFF_MS = intArrayOf(2_000, 6_000, 10_000) + // A session that stayed up this long starts the backoff over when it fails. + const val STABLE_SESSION_MS = 30_000 // Cap on rects per batch. Each rect consumes a distinct CFW frame id, and the // firmware's duplicate-fid ring holds 16, so keep several batches of history // within it. Above this the split is abandoned for a single bounding box. diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionControls.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionControls.kt index 7694eb3a..eaa97776 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionControls.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionControls.kt @@ -386,11 +386,17 @@ internal fun GlassesSessionCore.handleUnpairedFailure(address: String) { interruptibleSleep.interrupt() } -internal fun GlassesSessionCore.handleTransportFailure(reason: String?) { +/** + * Tear the session down and schedule a reconnect. [displayStatus], when given, replaces the + * generic "Reconnecting after " status line. + */ +internal fun GlassesSessionCore.handleTransportFailure(reason: String?, displayStatus: String? = null) { logError("Transport failure: $reason") + val retryDelayMs: Long monitor.withLock { maybeEmitEvenAppConflictLocked(reason) finishBenchmarkLocked(true, "transport failure") + val sessionWasReady = sessionReady sessionReady = false fixedLayoutCreated = false startupProbePending = false @@ -402,16 +408,38 @@ internal fun GlassesSessionCore.handleTransportFailure(reason: String?) { lastFaceclawWakeLeaseQueuedAtMs = 0 faceclawWakeControlSentCount = 0 clearAllMessagesLocked("transport failure: $reason") - reconnectAfterMs = now() + ConnectionOptions.RECONNECT_DELAY_MS + retryDelayMs = scheduleReconnectLocked(sessionWasReady) link.disconnect(rightAddress) link.disconnect(leftAddress) } + logLine("reconnect attempt in " + retryDelayMs + "ms") if (!userDisconnectRequested) { - setStateDisplay("retrying", if (reason == null || reason.isEmpty()) "Reconnecting..." else "Reconnecting after $reason") + setStateDisplay("retrying", when { + displayStatus != null -> displayStatus + " Retrying in " + ((retryDelayMs + 999) / 1000) + "s." + reason == null || reason.isEmpty() -> "Reconnecting..." + else -> "Reconnecting after $reason" + }) } interruptibleSleep.interrupt() } +/** + * Set [reconnectAfterMs] for the next attempt after a failure and return the delay. Repeated + * failures back off along RECONNECT_BACKOFF_MS; a session that stayed up for + * STABLE_SESSION_MS before failing ([sessionWasReady]) starts the schedule over. + */ +internal fun GlassesSessionCore.scheduleReconnectLocked(sessionWasReady: Boolean): Long { + val now = now() + if (sessionWasReady && now - lastSessionReadyAtMs >= ConnectionOptions.STABLE_SESSION_MS) { + consecutiveReconnects = 0 + } + val schedule = ConnectionOptions.RECONNECT_BACKOFF_MS + val delayMs = schedule[minOf(consecutiveReconnects, schedule.size - 1)].toLong() + consecutiveReconnects++ + reconnectAfterMs = now + delayMs + return delayMs +} + internal fun GlassesSessionCore.resetSessionStateLocked() { ringBattery = -1 ringCharging = -1 @@ -424,6 +452,7 @@ internal fun GlassesSessionCore.resetSessionStateLocked() { ringConnected = false ringNotificationsReady = false reconnectAfterMs = 0 + consecutiveReconnects = 0 reconnectHalted = false ringReconnectAfterMs = 0 lastAckAtMs = 0 diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt index f0822e98..a8adabb0 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt @@ -192,6 +192,8 @@ class GlassesSessionCore( internal var lastCfwCleanupAckMagic = 0 internal var reconnectAfterMs = 0L + // Failed connects/sessions since the last stable session; indexes RECONNECT_BACKOFF_MS. + internal var consecutiveReconnects = 0 internal var ringReconnectAfterMs = 0L internal var lastAckAtMs = 0L internal var lastIncomingAtMs = 0L @@ -1611,19 +1613,26 @@ class GlassesSessionCore( } override fun onConnectionStateChange(address: String?, connected: Boolean) { - monitor.withLock { - if (address == null) { - return - } - if (isConfiguredRingAddress(address)) { + if (address == null) { + return + } + if (isConfiguredRingAddress(address)) { + monitor.withLock { ringConnected = connected - ringNotificationsReady = false - if (!connected) { + if (connected) { + // A background connect landed: finish setting it up right away. + ringReconnectAfterMs = 0 + } else { + ringNotificationsReady = false ringReconnectAfterMs = now() + ConnectionOptions.RING_RECONNECT_DELAY_MS } - logLine(if (connected) "direct ring BLE connected" else "direct ring BLE disconnected") - return } + logLine(if (connected) "direct ring BLE connected" else "direct ring BLE disconnected") + interruptibleSleep.interrupt() + return + } + var lostSession = false + monitor.withLock { if (address.equals(rightAddress, ignoreCase = true)) { rightConnected = connected } else if (address.equals(leftAddress, ignoreCase = true)) { @@ -1632,6 +1641,10 @@ class GlassesSessionCore( return } if (!connected) { + // Before the session is ready, this is an attempt failing (or an arm + // dropping mid-setup): the connect sequence notices on its own and + // schedules the retry, so leave the backoff alone. + lostSession = sessionReady sessionReady = false fixedLayoutCreated = false startupProbePending = false @@ -1640,17 +1653,14 @@ class GlassesSessionCore( audioPacketListener = null clearAllMessagesLocked("connection lost") displayedFingerprint = "" - if (!reconnectHalted) { - reconnectAfterMs = now() + ConnectionOptions.RECONNECT_DELAY_MS + if (lostSession && !reconnectHalted) { + scheduleReconnectLocked(true) } } } interruptibleSleep.interrupt() - if (connected) { - setStateDisplay("connected", "Connected.") - } else if (!reconnectHalted) { - // While parked on a missing bond, keep the "unpaired" display: this - // callback is just the teardown of the arm that did connect. + if (lostSession && !reconnectHalted) { + // While parked on a missing bond, keep the "unpaired" display. setStateDisplay("connecting", "Connecting to the glasses...") } } @@ -1667,8 +1677,13 @@ class GlassesSessionCore( } setStateDisplay("connecting", "Connecting to the glasses...") try { - connectArm(rightAddress, true) - connectArm(leftAddress, true) + // Dial both arms at once, so the left arm's attempt is already pending (and + // can land) while the right arm is being set up; they share one window. + val deadlineMs = now() + ConnectionOptions.ARM_CONNECT_WINDOW_MS + link.beginConnect(rightAddress, false) + link.beginConnect(leftAddress, false) + connectArm(rightAddress, true, deadlineMs) + connectArm(leftAddress, true, deadlineMs) if (!sleepDuringConnectSettling(800)) { return } @@ -1733,6 +1748,17 @@ class GlassesSessionCore( val unpairedArm = firstUnpairedArm() if (unpairedArm != null) { handleUnpairedFailure(unpairedArm) + } else if (t is ArmUnreachableException) { + val otherArm = if (t.side == "left") rightAddress else leftAddress + if (link.isConnected(otherArm)) { + handleTransportFailure( + t.side + " arm not found", + "Can't reach the " + t.side + " arm of the glasses. It may be connected to" + + " another device, or be off or out of range." + ) + } else { + handleTransportFailure("glasses not found", "Can't find the glasses. They may be off or out of range.") + } } else { handleTransportFailure("connect failed") } @@ -1753,9 +1779,10 @@ class GlassesSessionCore( } } - internal fun connectArm(address: String, enableRenderNotify: Boolean) { - if (!link.connect(address, ConnectionOptions.CONNECT_TIMEOUT_MS)) { - throw IllegalStateException("connect failed: $address") + internal fun connectArm(address: String, enableRenderNotify: Boolean, deadlineMs: Long) { + val timeoutMs = maxOf(deadlineMs - now(), ConnectionOptions.CONNECT_TIMEOUT_MS.toLong()) + if (!link.connect(address, timeoutMs.toInt())) { + throw ArmUnreachableException(if (address.equals(leftAddress, ignoreCase = true)) "left" else "right", address) } // requestConnectionPriority has no callback in this Android compile target, so there is // no reliable completion point to keep it in the global GATT operation pipeline. But it's @@ -1802,6 +1829,16 @@ class GlassesSessionCore( return } try { + // The ring is often out of range or bound to the glasses. Rather than block this + // worker (and every frame and heartbeat behind it) on a timed connect, keep a + // low-duty background connection pending; its callback wakes us to finish setup. + // The periodic recheck re-arms it if the attempt died without a callback. + if (!link.isConnected(ringAddress) && link.beginConnect(ringAddress, true)) { + monitor.withLock { + ringReconnectAfterMs = now() + ConnectionOptions.RING_RECONNECT_DELAY_MS + } + return + } connectRing() } catch (t: Throwable) { monitor.withLock { @@ -1810,6 +1847,9 @@ class GlassesSessionCore( ringReconnectAfterMs = now() + ConnectionOptions.RING_RECONNECT_DELAY_MS } logLine("direct ring connect failed (" + reason + "): " + safeMessage(t)) + // Start the next attempt from a fresh connection rather than retrying setup on + // one that just failed it. + link.disconnect(ringAddress) } } @@ -1980,3 +2020,7 @@ class GlassesSessionCore( } } } + +/** An arm's connection never came up within the connect window ([side] is "left" or "right"). */ +internal class ArmUnreachableException(val side: String, address: String) : + IllegalStateException("connect failed: $side arm $address") diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt index 20c069be..3a151c19 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt @@ -46,6 +46,7 @@ internal fun GlassesSessionCore.driveSession(): Long { } var messageToWrite: OutboundMessage? = null var messageToPrewrite: OutboundMessage? = null + var heartbeatToWrite: OutboundMessage? = null val now = now() maybeFinishNoChangeDesiredFrame() @@ -196,9 +197,16 @@ internal fun GlassesSessionCore.driveSession(): Long { && (hasPendingImageLocked() || desiredFingerprintSnapshot() != lastEnqueuedFingerprint))) noteImageStallLocked(now, windowHasRoom) - if (messageToPrewrite == null && handleHeartbeat(imageWaiting)) { + val heartbeatStep = if (messageToPrewrite == null) heartbeatStepLocked(imageWaiting) else HeartbeatStep.NONE + if (heartbeatStep == HeartbeatStep.HOLD) { return ConnectionOptions.IDLE_SLEEP_MS.toLong() } + if (heartbeatStep == HeartbeatStep.SEND) { + logLine("Writing heartbeat") + heartbeatToWrite = createHeartbeatMessage() + lastHeartbeatSentAtMs = now() + return@withLock + } if (messageToPrewrite == null && sessionReady && windowHasRoom && !pendingMessages.isEmpty() && CfwMessageWindow.canSend(inFlightMessages, pendingMessages.firstOrNull()!!)) { @@ -227,6 +235,15 @@ internal fun GlassesSessionCore.driveSession(): Long { } } + val heartbeat = heartbeatToWrite + if (heartbeat != null) { + // Like every write, outside `monitor`: waiting for the write to complete while + // holding it would stall notification handling, which needs it. A failed write + // just leaves the heartbeat to its ack timeout (see createHeartbeatMessage). + writeMessage(heartbeat) + return ConnectionOptions.IDLE_SLEEP_MS.toLong() + } + val prewrite = messageToPrewrite if (prewrite != null) { if (prewriteMessage(prewrite)) { @@ -285,7 +302,17 @@ internal fun GlassesSessionCore.canPrewriteCandidate(message: OutboundMessage?): return message.message.size + 2 > 232 } -internal fun GlassesSessionCore.handleHeartbeat(imageWaiting: Boolean): Boolean { +/** What the heartbeat schedule wants from one driveSession pass. */ +internal enum class HeartbeatStep { + /** Nothing due: carry on with other traffic. */ + NONE, + /** Send nothing else this pass (a heartbeat is pending, or overdue but blocked). */ + HOLD, + /** Write a heartbeat now, then hold. */ + SEND, +} + +internal fun GlassesSessionCore.heartbeatStepLocked(imageWaiting: Boolean): HeartbeatStep { val now = now() val heartbeatEligible = !shutdownRequested && fixedLayoutCreated val heartbeatPending = heartbeatEligible && hasPendingOrInflightKindLocked("heartbeat") @@ -300,22 +327,18 @@ internal fun GlassesSessionCore.handleHeartbeat(imageWaiting: Boolean): Boolean // the heartbeat still fires once we reach the URGENT threshold // if rendering goes quiet again. Preserves the pending-heartbeat // inter-lens-sync invariant below (that path is untouched). - return false + return HeartbeatStep.NONE } - logLine("Writing heartbeat") - val heartbeatMessage = createHeartbeatMessage() - lastHeartbeatSentAtMs = now - writeMessage(heartbeatMessage) - return true + return HeartbeatStep.SEND } else if (heartbeatUrgent) { - return true + return HeartbeatStep.HOLD } else if (heartbeatPending) { // Don't send other message types while a heartbeat is pending because that // can lead to inter-lens sync issues - return true + return HeartbeatStep.HOLD } - return false + return HeartbeatStep.NONE } internal fun GlassesSessionCore.createHeartbeatMessage(): OutboundMessage { @@ -1099,7 +1122,7 @@ internal fun GlassesSessionCore.describeWriteBlockerLocked(now: Long, windowHasR if (hasPendingOrInflightKindLocked("heartbeat")) { return "heartbeat in flight" } - // handleHeartbeat is a barrier: while one is due it holds back every + // heartbeatStepLocked is a barrier: while one is due it holds back every // other write, so a frame queued at the wrong moment waits a heartbeat // round trip. Reported explicitly because it is otherwise invisible -- // heartbeats belong to no frame. diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/SessionPorts.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/SessionPorts.kt index 1630beb4..c7b7b45a 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/SessionPorts.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/SessionPorts.kt @@ -13,8 +13,20 @@ import kotlin.contracts.contract * must call from whatever thread the platform stack delivers on. */ interface SessionLink { + /** Connect, waiting up to [timeoutMs]; waits on an attempt already started by [beginConnect]. */ fun connect(address: String, timeoutMs: Int): Boolean + /** + * Start connecting without waiting, so the attempt can land while the caller does other + * work. [background] asks for a low-duty-cycle attempt that stays pending until the + * device shows up. Returns true while a connection exists or is pending, false when the + * link can't do this (callers then fall back to a blocking [connect]). + */ + fun beginConnect(address: String, background: Boolean): Boolean = false + + /** Whether a connection to [address] is up (not merely pending). */ + fun isConnected(address: String): Boolean = false + /** Best effort; no completion point (see connectArm). */ fun requestHighPriority(address: String) diff --git a/tests/kotlin/build.gradle.kts b/tests/kotlin/build.gradle.kts index bbf4cfeb..29264b46 100644 --- a/tests/kotlin/build.gradle.kts +++ b/tests/kotlin/build.gradle.kts @@ -18,7 +18,9 @@ kotlin { minSdk = 24 withJava() compilerOptions { jvmTarget.set(JvmTarget.JVM_17) } - withHostTestBuilder {}.configure {} + // Production code logs through android.util.Log, which the host-test android.jar + // stubs to throw; a throw on the session worker turns into a spurious reconnect. + withHostTestBuilder {}.configure { isReturnDefaultValues = true } } iosArm64() iosSimulatorArm64() diff --git a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/GlassesSessionCoreTest.kt b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/GlassesSessionCoreTest.kt index bd144189..214a3092 100644 --- a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/GlassesSessionCoreTest.kt +++ b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/GlassesSessionCoreTest.kt @@ -62,6 +62,8 @@ private class FakeLink(private val platform: ProtocolPlatform) : SessionLink { val connected = HashSet() val disconnected = ArrayList() @Volatile var closed = false + /** An address whose connection attempts fail, like an arm that isn't advertising. */ + @Volatile var unreachable: String? = null var seq = 0 val writes: List @@ -71,10 +73,13 @@ private class FakeLink(private val platform: ProtocolPlatform) : SessionLink { fun cfwMessages(): List = writes.filter { it.sid == CfwTransport.SID && it.kind == "image" }.mapNotNull { it.message } override fun connect(address: String, timeoutMs: Int): Boolean { - connected.add(address) + if (address == unreachable) return false + lock.withLock { connected.add(address) } return true } + override fun isConnected(address: String): Boolean = lock.withLock { address in connected } + override fun requestHighPriority(address: String) {} override fun requestMtu(address: String, mtu: Int, timeoutMs: Int): Boolean = true @@ -115,8 +120,10 @@ private class FakeLink(private val platform: ProtocolPlatform) : SessionLink { } override fun disconnect(address: String) { - disconnected.add(address) - connected.remove(address) + lock.withLock { + disconnected.add(address) + connected.remove(address) + } } override fun close() { @@ -196,12 +203,14 @@ private class FakeHost(private val platform: ProtocolPlatform) : SessionHost { private class FakeListener : FaceclawBleCommunicatorListener { val phases = ArrayList() + @Volatile var lastStatus = "" val events = ArrayList() val finished = ArrayList() val batteries = ArrayList() override fun onStateChange(phase: String?, status: String?) { phases.add(phase ?: "") + lastStatus = status ?: "" } override fun onRingEvent(kind: String?, containerName: String?, eventType: Int, eventSource: Int, systemExitReasonCode: Int, frameId: Int, ringTick: Long, ringType: Int, ringAux: Int, ringSpeed: Int) { @@ -454,4 +463,53 @@ class GlassesSessionCoreTest { assertContentEquals(first.message, second.message) s.core.disconnect() } + + @Test + fun reconnectBackoffGrowsAndRestartsAfterAStableSession() { + val core = Session().core + core.monitor.withLock { + assertEquals(2_000L, core.scheduleReconnectLocked(false)) + assertEquals(6_000L, core.scheduleReconnectLocked(false)) + assertEquals(10_000L, core.scheduleReconnectLocked(false)) + assertEquals(10_000L, core.scheduleReconnectLocked(false)) + // A session that dies soon after coming up keeps backing off... + core.lastSessionReadyAtMs = core.now() - 1_000 + assertEquals(10_000L, core.scheduleReconnectLocked(true)) + // ...one that stayed up starts the schedule over. + core.lastSessionReadyAtMs = core.now() - ConnectionOptions.STABLE_SESSION_MS + assertEquals(2_000L, core.scheduleReconnectLocked(true)) + assertEquals(6_000L, core.scheduleReconnectLocked(false)) + } + } + + @Test + fun unreachableArmIsNamedAndRetriedWithBackoff() { + val s = Session() + s.link.unreachable = LEFT + fun retryDelayMs() = s.core.monitor.withLock { s.core.reconnectAfterMs } - s.platform.elapsedRealtimeMs() + fun attempts() = s.core.monitor.withLock { s.core.consecutiveReconnects } + try { + assertTrue(s.core.start()) + assertTrue(waitUntil(5_000) { attempts() == 1 }, s.host.logs().takeLast(10).toString()) + assertTrue(s.host.hasLog("Transport failure: left arm not found")) + assertTrue(s.listener.lastStatus.startsWith("Can't reach the left arm"), s.listener.lastStatus) + assertTrue(retryDelayMs() in 1_000L..2_000L) + // Both arms are torn down, so the right arm doesn't sit connected on its own. + assertTrue(s.link.disconnected.containsAll(listOf(RIGHT, LEFT))) + + s.platform.offsetMs += 2_000 + assertTrue(waitUntil(5_000) { attempts() == 2 }) + assertTrue(retryDelayMs() in 5_000L..6_000L) + s.platform.offsetMs += 6_000 + assertTrue(waitUntil(5_000) { attempts() == 3 }) + assertTrue(retryDelayMs() in 9_000L..10_000L) + + // Once the arm answers again, the session comes up. + s.link.unreachable = null + s.platform.offsetMs += 10_000 + assertTrue(waitUntil(5_000) { s.layoutCreated() }, s.host.logs().takeLast(10).toString()) + } finally { + s.core.close() + } + } } From 2e1501772f1606a2f5042398e28fb523d331841f Mon Sep 17 00:00:00 2001 From: James Babcock Date: Tue, 29 Sep 2026 14:33:35 -0700 Subject: [PATCH 19/60] Add lint.sh --- lint.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 lint.sh diff --git a/lint.sh b/lint.sh new file mode 100755 index 00000000..a901afd1 --- /dev/null +++ b/lint.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Lint the TypeScript sources with oxlint. Which files get linted (TypeScript +# only) and which rules are enabled are both set in .oxlintrc.json. +# Arguments are passed through to oxlint, e.g. `./lint.sh --fix` or +# `./lint.sh app/g2` to lint only some paths. +cd "$(dirname "$0")" + +exec node_modules/.bin/oxlint "$@" From 81b7f3df64512c5ee66e6241874118a59168daeb Mon Sep 17 00:00:00 2001 From: James Babcock Date: Wed, 30 Sep 2026 13:37:28 -0700 Subject: [PATCH 20/60] Remove some unused test code --- app/bootstrap.android.ts | 6 ---- app/bootstrap.ios.ts | 4 --- app/native/kotlin-bridge.ts | 38 -------------------- app/native/kotlin-platform.android.ts | 2 -- app/native/kotlin-platform.ios.ts | 2 -- app/native/kotlin-protocol-smoke.ios.ts | 46 ------------------------- app/native/kotlin-protocol-smoke.ts | 22 ------------ 7 files changed, 120 deletions(-) delete mode 100644 app/native/kotlin-bridge.ts delete mode 100644 app/native/kotlin-protocol-smoke.ios.ts delete mode 100644 app/native/kotlin-protocol-smoke.ts diff --git a/app/bootstrap.android.ts b/app/bootstrap.android.ts index 43e44042..0e42f85c 100644 --- a/app/bootstrap.android.ts +++ b/app/bootstrap.android.ts @@ -3,12 +3,6 @@ import { registerShareIntentHandler } from './native/share-intents' import { installNativeUserAgent } from './util/http' import { registerPhoneRotation } from './native/phone-rotation' -import { runKotlinBridgeSmokeTest } from './native/kotlin-bridge' - -declare const __DEV__: boolean; - -if (__DEV__) runKotlinBridgeSmokeTest() - installNativeUserAgent() registerShareIntentHandler() registerPhoneRotation() diff --git a/app/bootstrap.ios.ts b/app/bootstrap.ios.ts index 6897e8dc..7ef6831e 100644 --- a/app/bootstrap.ios.ts +++ b/app/bootstrap.ios.ts @@ -1,9 +1,5 @@ import { Application, Frame } from '@nativescript/core' -import { runKotlinBridgeSmokeTest } from './native/kotlin-bridge' declare const FaceclawConfigPort: any -declare const __DEV__: boolean; - -if (__DEV__) runKotlinBridgeSmokeTest() // Apply transferred preferences before settings getters or app workers load. FaceclawConfigPort.processPendingRequest() diff --git a/app/native/kotlin-bridge.ts b/app/native/kotlin-bridge.ts deleted file mode 100644 index 76ec68e4..00000000 --- a/app/native/kotlin-bridge.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { isAndroid } from "@nativescript/core"; -import { createKotlinBridge } from "./kotlin-platform"; - -/** Exercise the real native metadata and both directions of return values. */ -export function runKotlinBridgeSmokeTest(): void { - try { - const bridge = createKotlinBridge(); - const platform = bridge.platform(); - const thread = bridge.threadName(); - const callerOnMain = bridge.isMainThread(); - const greeting = bridge.greet("Faceclaw"); - const message = "Faceclaw \u2194 Kotlin \ud83d\udc53"; - let callbackCount = 0; - let callbackMessage = ""; - let callbackOnMain = false; - // Validate after returning; never throw from a native callback. - const reply = bridge.roundTrip(message, (value: string): string => { - callbackCount++; - callbackMessage = value; - callbackOnMain = bridge.isMainThread(); - return `TypeScript received: ${value}`; - }); - if (greeting !== "Hello, Faceclaw, from Kotlin" - || platform !== (isAndroid ? "Android" : "iOS") - || !thread || !callerOnMain || !callbackOnMain - || callbackCount !== 1 - || callbackMessage !== `Kotlin received: ${message}` - || reply !== `Kotlin received callback: TypeScript received: Kotlin received: ${message}`) { - throw new Error(`Unexpected Kotlin bridge result: ${JSON.stringify({ - platform, thread, callerOnMain, callbackOnMain, greeting, callbackCount, callbackMessage, reply, - })}`); - } - console.log("FACECLAW_KOTLIN_BRIDGE_PASS " + JSON.stringify({ platform, thread, reply })); - } catch (error) { - // Diagnostics must not prevent the rest of the app from launching. - console.error(`FACECLAW_KOTLIN_BRIDGE_FAIL ${error}`); - } -} diff --git a/app/native/kotlin-platform.android.ts b/app/native/kotlin-platform.android.ts index cb33ffa3..dda27bc5 100644 --- a/app/native/kotlin-platform.android.ts +++ b/app/native/kotlin-platform.android.ts @@ -1,4 +1,3 @@ -import { runKotlinProtocolSmokeTest } from './kotlin-protocol-smoke'; import type { KotlinBridge } from './kotlin-platform'; // Handwritten declarations for the small native surface, checked against the @@ -20,7 +19,6 @@ declare namespace com.faceclaw.shared { } export function createKotlinBridge(): KotlinBridge { - runKotlinProtocolSmokeTest(); const bridge = new com.faceclaw.shared.KotlinBridge(); return { platform: () => bridge.platform(), diff --git a/app/native/kotlin-platform.ios.ts b/app/native/kotlin-platform.ios.ts index f137f627..24e4ea2c 100644 --- a/app/native/kotlin-platform.ios.ts +++ b/app/native/kotlin-platform.ios.ts @@ -1,4 +1,3 @@ -import { runKotlinProtocolSmokeTest } from './kotlin-protocol-smoke.ios'; import type { KotlinBridge } from './kotlin-platform'; // Handwritten declarations matching FaceclawKit's Objective-C header. @@ -27,7 +26,6 @@ class KotlinCallback extends NSObject implements FaceclawKitKotlinBridgeListener } export function createKotlinBridge(): KotlinBridge { - runKotlinProtocolSmokeTest(); const bridge = FaceclawKitKotlinBridge.alloc().init(); return { platform: () => bridge.platform(), diff --git a/app/native/kotlin-protocol-smoke.ios.ts b/app/native/kotlin-protocol-smoke.ios.ts deleted file mode 100644 index ecd2629e..00000000 --- a/app/native/kotlin-protocol-smoke.ios.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { GrayImage } from "../graphics/image" -import { encodeShellScene } from "../graphics/shell-scene" -import { decodeImageBytes } from './image-bytes.ios' -import * as protocol from '../g2/ble-protocol.ios' -import { SurfaceCompositor } from '../graphics/surface-compositor.ios' -import { lvglMetrics } from './lvgl-font.ios' - -/** Development-only checks of real NativeScript selectors and bulk data crossings. */ -export function runKotlinProtocolSmokeTest(): void { - const hex = (data: Uint8Array) => Array.from(data, byte => byte.toString(16).padStart(2, '0')).join('') - const assert = (condition: boolean, what: string) => { if (!condition) throw new Error(`Kotlin protocol bridge: ${what}`) } - const auth = protocol.authentication(101) - assert(hex(auth) === '080410651a0408011004', 'authentication') - assert(protocol.crc16(new Uint8Array([1, 2, 3])) === 0xadad, 'CRC') - const receiver = new protocol.MessageReceiver() - const frame = protocol.frameMessage(auth, 128, 0, 64)[0] - const received = receiver.receive('test', frame) - assert(received.length === 1 && received[0].magic === 101 && hex(received[0].payload) === hex(auth), 'reassembly') - const payload = protocol.bytes(13, protocol.bytes(3, protocol.concat(protocol.integer(1, 12), protocol.integer(2, 2)))) - const event = protocol.decodeGlassesInput({ sid: 224, flag: 1, payload, command: 0, magic: 0 }) - assert(event?.kind === 'display-wake' && event.eventSource === 2, 'event') - const c = new SurfaceCompositor(3, 2) - c.configureSurface('test', { x: 0, y: 0, width: 3, height: 2, zOrder: 0, transparency: 'opaque' }) - c.submitSurfaceFrame('test', new Uint8Array([0, 16, 255, 32, 48, 64]), { x: 0, y: 0, width: 3, height: 2 }) - assert(hex(c.composite()) === '0010ff203040', 'composition') - assert(hex(protocol.packGray4(c.composite(), 3, 2)) === '01f02340', 'packing') - c.setShellScene(new Uint8Array([1,0,1,0,0,0,0,0,1,0,1,0,128,0,0,0,0,0,255])) - assert(hex(c.composite()) === 'f00070101020', 'shell scene bridge and 4bpp composition') - c.setScreenBlanked(true); assert(c.composite().every(p => p === 0), 'blanking') - const selectedSurface = new GrayImage(8, 4, 1) - selectedSurface.drawMenuSelection(new GrayImage(4, 2, 255), 1, 1, 16, 48, 0, 2) - const selectedPreview = new SurfaceCompositor(8, 4) - selectedPreview.setShellScene(encodeShellScene([{ image: selectedSurface, x: 0, y: 0, shellKey: 100 }])) - const selectedPixels = selectedPreview.composite() - assert(selectedPixels[10] === 240 && selectedPixels[9] === 0, 'menu selection depth and bridge') - assert(lvglMetrics('/nonexistent/faceclaw-font').length === 0, 'font bridge') - const compass = protocol.decodeCompassInput({ sid: 8, flag: 1, command: 15, magic: 0, - payload: new Uint8Array([8, 15, 16, 0, 82, 3, 8, 231, 2, 162, 6, 12, 67, 77, 1, 3, 2, 3, 140, 0, 152, 186, 220, 254]) }) - if (compass?.headingDegrees !== 359 || compass.diagnostics?.sampleTimeMs !== 0xfedcba98) - throw new Error('Kotlin compass notification mismatch') - const png = NSData.alloc().initWithBase64EncodedStringOptions('iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAEklEQVR4nGP4z8DAAMIM/4EAAB/uBfsL2WiLAAAAAElFTkSuQmCC', 0 as NSDataBase64DecodingOptions) - const decoded = decodeImageBytes(interop.bufferFromData(png), 2, 2) - assert(!!decoded && Array.from(decoded.pixels).join(',') === '54,182,18,255', 'native map image orientation and grayscale') - assert(decodeImageBytes(new ArrayBuffer(0), 2, 2) === null, 'invalid map image') - console.log('FACECLAW_KOTLIN_PROTOCOL_PASS iOS') -} diff --git a/app/native/kotlin-protocol-smoke.ts b/app/native/kotlin-protocol-smoke.ts deleted file mode 100644 index 062ae21d..00000000 --- a/app/native/kotlin-protocol-smoke.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { copyToJavaByteBuffer } from './java-direct-buffer' - -declare const com: any - -/** Development-only checks of NativeScript metadata and bulk ByteBuffer crossings. */ -export function runKotlinProtocolSmokeTest(): void { - const native = com.faceclaw.app - const hex = (data: any) => Array.from({ length: data.length }, (_, i) => (data[i] & 255).toString(16).padStart(2, '0')).join('') - const assert = (condition: boolean, what: string) => { if (!condition) throw new Error(`Kotlin protocol bridge: ${what}`) } - const auth = native.BleProtocol.buildAuthenticationRequest(101) - assert(hex(auth) === '080410651a0408011004', 'authentication') - const compositor = new native.SurfaceCompositor() - compositor.configureScreen(3, 2) - compositor.configureSurface('test', 0, 0, 3, 2, 0, 0) - const pixels = copyToJavaByteBuffer(new Uint8Array([0, 16, 255, 32, 48, 64])) - compositor.submitSurface('test', new native.AndroidByteReader(pixels), 0, 0, 3, 2, '1') - assert(hex(compositor.composite().gray) === '0010ff203040', 'composition/ByteBuffer') - assert(hex(native.BmpUtil.pack4bppFromGray8(compositor.composite().gray, 3, 2)) === '01f02340', 'packing') - const id = native.ImageAtlas.ensure('kotlin-smoke', 3, 2, new native.AndroidByteReader(pixels)) - assert(id > 0 && native.ImageAtlas.get(id).width === 3, 'image atlas/reused buffer') - console.log('FACECLAW_KOTLIN_PROTOCOL_PASS Android') -} From 2c088378bdf7351eff5be41f61a5d7fabbc14a24 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Wed, 30 Sep 2026 13:38:12 -0700 Subject: [PATCH 21/60] Lint --- app/apps/developer/microphones-monitor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/apps/developer/microphones-monitor.ts b/app/apps/developer/microphones-monitor.ts index 0023a242..44100a34 100644 --- a/app/apps/developer/microphones-monitor.ts +++ b/app/apps/developer/microphones-monitor.ts @@ -74,7 +74,7 @@ function emptyStats(): ArmStats { lastOtherBytes: 0, lastArrivalWallMs: null, recent: [], - buckets: new Array(BUCKETS).fill(0), + buckets: Array.from({ length: BUCKETS }, () => 0), stockCounter: null, stockLost: 0, stockDuplicate: 0, From 7d8f03ffe54b8f3ac17939a91905a27faa9f189c Mon Sep 17 00:00:00 2001 From: James Babcock Date: Wed, 30 Sep 2026 13:54:50 -0700 Subject: [PATCH 22/60] Clean up unused code Mostly remnants of iOS porting, where some things were temporarily in typescript but became shared kotlin --- .../app/FaceclawSystemStatusIconProvider.kt | 113 ------------------ app/g2/ble-protocol.ios.ts | 80 ------------- app/graphics/lvgl-font.ts | 53 -------- app/graphics/surface-compositor.ios.ts | 7 +- app/graphics/surface-compositor.ts | 103 ---------------- app/native/kotlin-platform.android.ts | 33 ----- app/native/kotlin-platform.d.ts | 11 -- app/native/kotlin-platform.ios.ts | 42 ------- app/native/preview-display.ios.ts | 2 +- app/native/system-status-icons.ts | 42 ------- native/kotlin/migrated-java-sources.json | 4 - .../com/faceclaw/shared/KotlinBridge.kt | 35 ------ .../com/faceclaw/shared/PlatformInfo.kt | 9 ++ tests/ios-evenhub.test.cjs | 23 ---- tests/ios-glanceboard.test.cjs | 64 ++++++---- tests/menu-display-list.test.cjs | 38 ++---- tests/surface-compositor.test.cjs | 49 -------- tests/tsconfig.json | 2 - 18 files changed, 66 insertions(+), 644 deletions(-) delete mode 100644 App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawSystemStatusIconProvider.kt delete mode 100644 app/g2/ble-protocol.ios.ts delete mode 100644 app/graphics/lvgl-font.ts delete mode 100644 app/graphics/surface-compositor.ts delete mode 100644 app/native/kotlin-platform.android.ts delete mode 100644 app/native/kotlin-platform.d.ts delete mode 100644 app/native/kotlin-platform.ios.ts delete mode 100644 app/native/system-status-icons.ts delete mode 100644 native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/shared/KotlinBridge.kt create mode 100644 native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/shared/PlatformInfo.kt delete mode 100644 tests/surface-compositor.test.cjs diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawSystemStatusIconProvider.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawSystemStatusIconProvider.kt deleted file mode 100644 index b5108f48..00000000 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawSystemStatusIconProvider.kt +++ /dev/null @@ -1,113 +0,0 @@ -package com.faceclaw.app - -import android.content.Context -import android.net.ConnectivityManager -import android.net.Network -import android.net.NetworkCapabilities -import android.net.wifi.WifiInfo -import android.net.wifi.WifiManager -import android.os.Build -import android.telephony.SignalStrength -import android.telephony.TelephonyManager -import android.util.Log - -import java.io.ByteArrayOutputStream -import java.lang.reflect.Method - -/** Reads Wi-Fi/cell/hotspot state; the icon artwork is the shared StatusIconArt. */ -class FaceclawSystemStatusIconProvider private constructor() { - companion object { - private const val TAG = "FaceclawStatusIcons" - - @JvmStatic - fun getSystemStatusIconGrays(context: Context?, iconSize: Int): ByteArray { - if (context == null) { - return ByteArray(0) - } - val appContext = context.applicationContext - val size = Math.max(1, Math.min(96, iconSize)) - val out = ByteArrayOutputStream(size * size * 3) - - val wifiLevel = getWifiLevel(appContext) - if (wifiLevel >= 0) { - append(out, StatusIconArt.scale(StatusIconArt.wifi(wifiLevel), size)) - } - - val cellLevel = getCellLevel(appContext) - if (cellLevel >= 0) { - append(out, StatusIconArt.scale(StatusIconArt.cell(cellLevel), size)) - } - - if (isHotspotEnabled(appContext)) { - append(out, StatusIconArt.scale(StatusIconArt.hotspot(), size)) - } - - return out.toByteArray() - } - - private fun getWifiLevel(context: Context): Int { - try { - val connectivityManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager? - val activeNetwork: Network? = if (connectivityManager == null) null else connectivityManager.activeNetwork - val capabilities: NetworkCapabilities? = if (activeNetwork == null) null else connectivityManager!!.getNetworkCapabilities(activeNetwork) - if (capabilities == null || !capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) { - return -1 - } - val wifiManager = context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager? - val info: WifiInfo? = if (wifiManager == null) null else wifiManager.connectionInfo - if (info == null || !isValidRssi(info.rssi)) { - return -1 - } - return Math.max(0, Math.min(4, WifiManager.calculateSignalLevel(info.rssi, 5))) - } catch (t: Throwable) { - Log.w(TAG, "failed to read Wi-Fi status", t) - return -1 - } - } - - private fun getCellLevel(context: Context): Int { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { - return -1 - } - try { - val telephonyManager = context.getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager? - val signalStrength: SignalStrength? = if (telephonyManager == null) null else telephonyManager.signalStrength - if (signalStrength == null) { - return -1 - } - return Math.max(0, Math.min(4, signalStrength.level)) - } catch (e: SecurityException) { - // Most Android versions require READ_PHONE_STATE for this. We skip it - // rather than prompting for a broad phone permission just for an icon. - return -1 - } catch (t: Throwable) { - Log.w(TAG, "failed to read cellular status", t) - return -1 - } - } - - private fun isHotspotEnabled(context: Context): Boolean { - try { - val wifiManager = context.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager? - if (wifiManager == null) { - return false - } - val method: Method = wifiManager.javaClass.getDeclaredMethod("getWifiApState") - method.isAccessible = true - val result: Any? = method.invoke(wifiManager) - val state = if (result is Int) result else -1 - return state == 13 || state == 12 // WIFI_AP_STATE_ENABLED / ENABLING - } catch (ignored: Throwable) { - return false - } - } - - private fun isValidRssi(rssi: Int): Boolean { - return rssi > -127 && rssi < 0 - } - - private fun append(out: ByteArrayOutputStream, bytes: ByteArray) { - out.write(bytes, 0, bytes.size) - } - } -} diff --git a/app/g2/ble-protocol.ios.ts b/app/g2/ble-protocol.ios.ts deleted file mode 100644 index 68453a17..00000000 --- a/app/g2/ble-protocol.ios.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { type RingInput } from "./ring-input"; -import { type CompassEvent } from '../native/compass-types' -/** iOS binary bridge to the same Kotlin protocol used by Android. */ -import { fromData, toData, nativeArray } from '../native/kotlin-data' -import { OsEventTypeList } from './events' -declare const FaceclawKitIosProtocol: any, FaceclawKitIosMessageReceiver: any -const protocol = FaceclawKitIosProtocol.new() -export const G2_WRITE = '00002760-08c2-11e1-9073-0e8ac72e5401' -export const G2_NOTIFY = '00002760-08c2-11e1-9073-0e8ac72e5402' -export const G2_RENDER_NOTIFY = '00002760-08c2-11e1-9073-0e8ac72e6402' -export const RING_NOTIFY = ['bae80011-4f05-4503-8e65-3af1f7329d1f', 'bae80013-4f05-4503-8e65-3af1f7329d1f'] -export const SID = { auth: 0x80, launch: 1, hub: 0xe0, settings: 9, cfw: 0xf0 } as const -export function concat(...parts: Uint8Array[]): Uint8Array { - const output = new Uint8Array(parts.reduce((n, p) => n + p.length, 0)) - let offset = 0 - for (const part of parts) { output.set(part, offset); offset += part.length } - return output -} -export const integer = (field: number, value: number): Uint8Array => fromData(protocol.integerFieldValue(field, value)) -export const bytes = (field: number, value: Uint8Array): Uint8Array => fromData(protocol.bytesFieldData(field, toData(value))) -export const authentication = (magic: number) => fromData(protocol.authenticationMagic(magic)) -export const prelude = () => fromData(protocol.prelude()) -export const heartbeat = (magic: number) => fromData(protocol.heartbeatMagic(magic)) -export const audioControl = (magic: number, enabled: boolean) => fromData(protocol.audioControlMagicEnabled(magic, enabled)) -export const settingsQuery = (magic: number) => fromData(protocol.settingsQueryMagic(magic)) -export const shutdown = (magic: number) => fromData(protocol.shutdownMagic(magic)) -export const framebufferLease = (acquire: boolean) => fromData(protocol.framebufferLeaseAcquire(acquire)) -export const createLayout = (magic: number) => fromData(protocol.createLayoutMagic(magic)) -export const crc16 = (data: Uint8Array): number => protocol.crcData(toData(data)) -export function frameMessage(payload: Uint8Array, sid: number, flag: number, sequence: number, maxWrite = 240): Uint8Array[] { - const capacity = Math.min(232, Math.floor(maxWrite) - 8) - if (capacity < 12 || !Number.isFinite(capacity)) throw new Error('Negotiated BLE write size is too small') - if (Math.ceil((payload.length + 2) / capacity) > 255) throw new Error('Protocol message exceeds the fragment limit') - return nativeArray(protocol.frameDataSidFlagSequenceMaxWrite(toData(payload), sid, flag, sequence, Math.floor(maxWrite)), fromData) -} -export type ProtocolMessage = { sid: number; flag: number; payload: Uint8Array; command: number; magic: number; packet?: Uint8Array } -export class MessageReceiver { - private native = FaceclawKitIosMessageReceiver.new() - clear(): void { this.native.clear() } - receive(link: string, data: Uint8Array, now = Date.now()): ProtocolMessage[] { - return nativeArray(this.native.receiveLinkDataNow(link, toData(data), now), (message: any) => ({ - sid: message.sid, flag: message.flag, payload: fromData(message.payload), command: message.command, - magic: message.magic, ...(message.packet ? { packet: fromData(message.packet) } : {}), - })) - } -} -export const readInteger = (data: Uint8Array, field: number, fallback = 0): number => protocol.readIntegerDataFieldFallback(toData(data), field, fallback) -export const readBytes = (data: Uint8Array, field: number): Uint8Array | undefined => { - const value = protocol.readBytesDataField(toData(data), field) - return value ? fromData(value) : undefined -} -export const readString = (data: Uint8Array, field: number): string => protocol.readStringDataField(toData(data), field) -export function authenticationSucceeded(message: ProtocolMessage, magic: number): boolean { - return message.sid === SID.auth && message.command === 4 && message.magic === magic && readBytes(message.payload, 3)?.length === 0 -} -export type GlassesInput = { ringInput?: RingInput; kind: 'sys-event' | 'list-click' | 'text-click' | 'display-wake' | 'even-ai'; eventType: number; eventSource: number; systemExitReasonCode: number; containerName: string; frameId: number } -function input(event: any): GlassesInput | null { - return event ? { kind: event.kind === 'sys-event' && event.eventType === OsEventTypeList.HEAD_UP_EVENT ? 'display-wake' : event.kind, - eventType: event.eventType, eventSource: event.eventSource, systemExitReasonCode: event.systemExitReasonCode, - ringInput: Number(event.ringTick) >= 0 ? { tick: Number(event.ringTick), type: Number(event.ringType), - aux: Number(event.ringAux), speed: Number(event.ringSpeed) } : undefined, - containerName: event.containerName, frameId: 0 } : null -} -export const decodeGlassesInput = (message: ProtocolMessage): GlassesInput | null => input(protocol.glassesInputDataSidFlag(toData(message.payload), message.sid, message.flag)) -export const decodeRingInput = (data: Uint8Array): GlassesInput | null => input(protocol.ringInputData(toData(data))) -export function packGray4(gray: Uint8Array, width: number, height: number): Uint8Array { - if (!Number.isInteger(width) || !Number.isInteger(height) || width < 1 || height < 1 || gray.length !== width * height) throw new Error('Invalid display frame') - return fromData(protocol.packDataWidthHeight(toData(gray), width, height)) -} -export const rle4 = (packed: Uint8Array): Uint8Array => fromData(protocol.rleData(toData(packed))) - -export function decodeCompassInput(message: ProtocolMessage): CompassEvent | null { - const event = protocol.compassInputDataSidFlag(toData(message.payload), message.sid, message.flag) - return event ? { command: event.command, headingDegrees: event.headingDegrees, - ...(event.diagnosticFlags >= 0 ? { diagnostics: { - magneticAccuracy: event.magneticAccuracy, magneticAnomalies: event.magneticAnomalies, - orientationSource: event.orientationSource, flags: event.diagnosticFlags, sampleTimeMs: Number(event.sampleTimeMs), - } } : {}), - } : null -} diff --git a/app/graphics/lvgl-font.ts b/app/graphics/lvgl-font.ts deleted file mode 100644 index 60dd57e2..00000000 --- a/app/graphics/lvgl-font.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** Reader for the bundled Source Han Sans serialized LVGL font. Matches - * Android LvglFontFile's metrics/glyph byte format, without a Java dependency. */ -export class LvglFont { - readonly metrics: Uint8Array - private readonly view: DataView - private readonly ids = new Map() - private readonly bitmaps: number - private readonly descriptors: number - constructor(private readonly bytes: Uint8Array) { - this.view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength) - if (bytes.length < 64 || bytes.slice(0, 4).some(v => v !== 90)) throw new Error('Missing LVGL font header') - const height = this.u16(0x38), baseline = height - this.u16(0x3a) - const descriptor = this.pointer(this.u32(0x34)) - this.bitmaps = this.pointer(this.u32(descriptor)); this.descriptors = this.pointer(this.u32(descriptor + 4)) - const cmaps = this.pointer(this.u32(descriptor + 8)), packed = this.u16(descriptor + 18), count = packed & 0x1ff - if (!height || baseline < 0 || !count || ((packed >>> 9) & 15) !== 4 || (packed >>> 14) !== 3) throw new Error('Unsupported LVGL font') - this.metrics = new Uint8Array([height, baseline]) - for (let i = 0; i < count; i++) { - const at = cmaps + i * 20, start = this.u32(at), length = this.u16(at + 4), first = this.u16(at + 6) - const unicodePtr = this.u32(at + 8), offsetsPtr = this.u32(at + 12), listLength = this.u16(at + 16), type = this.u8(at + 18) - if (type === 2 || type === 0) { - const offsets = type === 0 ? this.pointer(offsetsPtr) : 0 - for (let n = 0; n < length; n++) { - const offset = type === 0 ? this.u8(offsets + n) : n - if (n && !offset) continue - this.ids.set(start + n, first + offset) - } - } else if (type === 1 || type === 3) { - const unicode = this.pointer(unicodePtr), offsets = offsetsPtr ? this.pointer(offsetsPtr) : -1 - for (let n = 0; n < listLength; n++) { - const offset = offsets < 0 ? n : type === 1 ? this.u16(offsets + n * 2) : this.u8(offsets + n) - if (n && !offset) continue - this.ids.set(start + this.u16(unicode + n * 2), first + offset) - } - } else throw new Error('Unsupported LVGL cmap') - } - } - glyph(codePoint: number): Uint8Array { - const id = this.ids.get(codePoint) - if (!id) return new Uint8Array() - const at = this.descriptors + id * 16, bitmap = this.bitmaps + this.u32(at) - const width = this.u16(at + 8), height = this.u16(at + 10), length = width && height ? (Math.floor(width / 2) + 1) * height : 0 - this.check(bitmap, length) - const result = new Uint8Array(8 + length) - result.set(this.bytes.subarray(at + 8, at + 16)); result.set(this.bytes.subarray(bitmap, bitmap + length), 8) - return result - } - private check(at: number, size: number): void { if (at < 0 || at + size > this.bytes.length) throw new Error('Truncated LVGL font') } - private pointer(address: number): number { const at = address - 0x80100000; this.check(at, 1); return at } - private u8(at: number): number { this.check(at, 1); return this.bytes[at] } - private u16(at: number): number { return this.view.getUint16(at, true) } - private u32(at: number): number { return this.view.getUint32(at, true) } -} diff --git a/app/graphics/surface-compositor.ios.ts b/app/graphics/surface-compositor.ios.ts index be080bfc..065be122 100644 --- a/app/graphics/surface-compositor.ios.ts +++ b/app/graphics/surface-compositor.ios.ts @@ -1,6 +1,9 @@ import { fromData, toData } from '../native/kotlin-data' -import type { SurfaceConfiguration, SurfaceRect } from './surface-compositor' -export type { SurfaceConfiguration, SurfaceRect } from './surface-compositor' +export type SurfaceRect = { x: number; y: number; width: number; height: number } +export type SurfaceConfiguration = SurfaceRect & { + zOrder: number + transparency: 'opaque' | 'color-key' +} declare const FaceclawKitIosSurfaceCompositor: any /** Retained pixels, clipping, layers and composition live in shared Kotlin. */ export class SurfaceCompositor { diff --git a/app/graphics/surface-compositor.ts b/app/graphics/surface-compositor.ts deleted file mode 100644 index 30a86dfa..00000000 --- a/app/graphics/surface-compositor.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { presentationRecords, readPresentation, paintPresentation, type Selection } from "./presentation-wire" -/** Platform-independent 8bpp surface composition for the local display. */ -export type SurfaceRect = { x: number; y: number; width: number; height: number } -export type SurfaceConfiguration = SurfaceRect & { - zOrder: number - transparency: 'opaque' | 'color-key' -} -type Surface = SurfaceConfiguration & { pixels: Uint8Array; visible: boolean; selections: Selection[] } - -export class SurfaceCompositor { - private readonly surfaces = new Map() - private shellScene: Uint8Array | null = null - private shellReceivedAt = 0 - setShellScene(bytes: Uint8Array): void { this.shellScene = new Uint8Array(bytes); this.shellReceivedAt = Date.now() } - private dimBelow = 0 - private dimFactor = 1 - private blanked = false - constructor(readonly width: number, readonly height: number) { - if (!Number.isInteger(width) || !Number.isInteger(height) || width <= 0 || height <= 0) { - throw new Error('Invalid compositor size') - } - } - configureSurface(id: string, options: SurfaceConfiguration): void { - if (![options.x, options.y, options.width, options.height, options.zOrder].every(Number.isInteger) - || options.width <= 0 || options.height <= 0) throw new Error('Invalid surface geometry') - const previous = this.surfaces.get(id) - const pixels = previous?.width === options.width && previous.height === options.height - ? previous.pixels : new Uint8Array(options.width * options.height) - this.surfaces.set(id, { ...options, pixels, visible: previous?.visible ?? true, selections: previous?.selections ?? [] }) - } - removeSurface(id: string): void { this.surfaces.delete(id) } - setSurfaceVisible(id: string, visible: boolean): void { - const surface = this.surfaces.get(id) - if (surface) surface.visible = visible - } - /** Stereo depth only shifts the lenses; this local composite shows the unshifted screen. */ - setSurfaceDepth(_id: string, _depth: number): void {} - setUnderlayDim(belowZOrder: number, factor: number): void { - if (!Number.isFinite(factor)) throw new Error('Invalid dim factor') - this.dimBelow = belowZOrder - this.dimFactor = Math.max(0, Math.min(1, factor)) - } - setScreenBlanked(blanked: boolean): void { this.blanked = blanked } - submitSurfaceFrame(id: string, pixels: Uint8Array, rect: SurfaceRect, _draws: ArrayBuffer | null = null): void { - const surface = this.surfaces.get(id) - if (!surface) throw new Error(`Unknown surface: ${id}`) - if (![rect.x, rect.y, rect.width, rect.height].every(Number.isInteger) - || rect.width <= 0 || rect.height <= 0 || pixels.length !== rect.width * rect.height) { - throw new Error('Invalid frame buffer or rectangle') - } - surface.selections = presentationRecords(_draws) - const left = Math.max(0, rect.x), right = Math.min(surface.width, rect.x + rect.width) - const top = Math.max(0, rect.y), bottom = Math.min(surface.height, rect.y + rect.height) - for (let y = top; y < bottom; y++) { - if (right <= left) break - const source = (y - rect.y) * rect.width + left - rect.x - surface.pixels.set(pixels.subarray(source, source + right - left), y * surface.width + left) - } - } - composite(): Uint8Array { - const output = new Uint8Array(this.width * this.height) - if (this.blanked) return output - const surfaces = [...this.surfaces.values()].filter(s => s.visible && !(this.shellScene && s === this.surfaces.get('shell'))).sort((a, b) => a.zOrder - b.zOrder) - for (const surface of surfaces) { - const left = Math.max(0, surface.x), right = Math.min(this.width, surface.x + surface.width) - const top = Math.max(0, surface.y), bottom = Math.min(this.height, surface.y + surface.height) - const dim = !this.shellScene && surface.zOrder < this.dimBelow ? this.dimFactor : 1 - for (let y = top; y < bottom; y++) { - let source = (y - surface.y) * surface.width + left - surface.x - let target = y * this.width + left - for (let x = left; x < right; x++, source++, target++) { - const value = surface.pixels[source] - // Test the original value: opaque near-black must still cover the - // window beneath, even when dimming rounds it down to black. - if (surface.transparency === 'color-key' && value === 0) continue - output[target] = Math.round(value * dim) - } - } - } - const screen = output.slice() - if (!surfaces.some(s => s.zOrder > 1) && (this.shellScene || surfaces.some(s => s.selections.length))) { - for(let i=0;i>4)*16 - for(const surface of surfaces) for(const row of surface.selections) paintPresentation(output,screen,this.width,this.height,{...row,x:row.x+surface.x,y:row.y+surface.y,occlusions:row.occlusions.map(r=>({...r,x:r.x+surface.x,y:r.y+surface.y}))}) - } - if (this.shellScene && !surfaces.some(s => s.zOrder > 1)) { - const quantize = (v: number) => Math.min(15, (v + 8) >> 4) - for (let i=0;i=0 && y+yy>=0 && x+xx+shift bridge.platform(), - threadName: () => bridge.threadName(), - isMainThread: () => bridge.isMainThread(), - greet: name => bridge.greet(name), - roundTrip(message, transform) { - const listener = new com.faceclaw.shared.KotlinBridgeListener({ transform }); - return bridge.roundTrip(message, listener); - }, - }; -} diff --git a/app/native/kotlin-platform.d.ts b/app/native/kotlin-platform.d.ts deleted file mode 100644 index 0322448c..00000000 --- a/app/native/kotlin-platform.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** Exported native API normalized across Java interfaces and Obj-C protocols. */ -export interface KotlinBridge { - platform(): string; - threadName(): string; - isMainThread(): boolean; - greet(name: string): string; - /** Synchronous callback; must not throw across the native boundary. */ - roundTrip(message: string, transform: (message: string) => string): string; -} - -export function createKotlinBridge(): KotlinBridge; diff --git a/app/native/kotlin-platform.ios.ts b/app/native/kotlin-platform.ios.ts deleted file mode 100644 index 24e4ea2c..00000000 --- a/app/native/kotlin-platform.ios.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { KotlinBridge } from './kotlin-platform'; - -// Handwritten declarations matching FaceclawKit's Objective-C header. -declare class FaceclawKitKotlinBridge extends NSObject { - static alloc(): FaceclawKitKotlinBridge; - init(): this; - platform(): string; - threadName(): string; - isMainThread(): boolean; - greetName(name: string): string; - roundTripMessageListener(message: string, listener: FaceclawKitKotlinBridgeListener): string; -} -interface FaceclawKitKotlinBridgeListener { - transformMessage(message: string): string; -} -declare const FaceclawKitKotlinBridgeListener: { - prototype: FaceclawKitKotlinBridgeListener; -}; - -@NativeClass() -class KotlinCallback extends NSObject implements FaceclawKitKotlinBridgeListener { - static ObjCProtocols = [FaceclawKitKotlinBridgeListener]; - transform!: (message: string) => string; - - transformMessage(message: string): string { return this.transform(message); } -} - -export function createKotlinBridge(): KotlinBridge { - const bridge = FaceclawKitKotlinBridge.alloc().init(); - return { - platform: () => bridge.platform(), - threadName: () => bridge.threadName(), - isMainThread: () => bridge.isMainThread(), - greet: name => bridge.greetName(name), - roundTrip(message, transform) { - const listener = KotlinCallback.new() as KotlinCallback; - listener.transform = transform; - // Kotlin uses this listener synchronously and never retains it. - return bridge.roundTripMessageListener(message, listener); - }, - }; -} diff --git a/app/native/preview-display.ios.ts b/app/native/preview-display.ios.ts index 655ed620..10edad53 100644 --- a/app/native/preview-display.ios.ts +++ b/app/native/preview-display.ios.ts @@ -1,5 +1,5 @@ import { File, knownFolders, path, type ImageSource } from "@nativescript/core"; -import { SurfaceCompositor } from "../graphics/surface-compositor"; +import { SurfaceCompositor } from "../graphics/surface-compositor.ios"; import { G2_LENS_WIDTH, G2_LENS_HEIGHT } from "../graphics/image"; import { previewPixels } from "./ios-graphics"; import { toData } from "./kotlin-data"; diff --git a/app/native/system-status-icons.ts b/app/native/system-status-icons.ts deleted file mode 100644 index 21df7305..00000000 --- a/app/native/system-status-icons.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Utils } from "@nativescript/core"; -import { GrayImage } from "../graphics/image"; -import { spanCurrent } from "./frame-timings"; -import { toUint8Array } from "~/util/array-util"; - -declare const com: any; - -const ICON_SIZE = 24; -const ICON_CACHE_MS = 5_000; - -let cachedIcons: GrayImage[] = []; -let cachedAtMs = 0; - -export function readSystemStatusIcons(): GrayImage[] { - if (!global.isAndroid) return []; - - const now = Date.now(); - if (now - cachedAtMs < ICON_CACHE_MS) { - return cachedIcons.map(cachedIcon => cachedIcon.clone()); - } - - const context = Utils.android.getApplicationContext(); - if (!context) return []; - - const bytes = spanCurrent("fetch-system-status-icons", () => - toUint8Array( - com.faceclaw.app.FaceclawSystemStatusIconProvider.getSystemStatusIconGrays(context, ICON_SIZE), - ), - ); - const iconByteLength = ICON_SIZE * ICON_SIZE; - const iconCount = Math.floor(bytes.length / iconByteLength); - const icons: GrayImage[] = []; - for (let index = 0; index < iconCount; index++) { - const icon = new GrayImage(ICON_SIZE, ICON_SIZE, 0); - icon.pixels.set(bytes.subarray(index * iconByteLength, (index + 1) * iconByteLength)); - icons.push(icon); - } - - cachedIcons = icons; - cachedAtMs = now; - return icons.map(icon => icon.clone()); -} diff --git a/native/kotlin/migrated-java-sources.json b/native/kotlin/migrated-java-sources.json index 6f65dba4..955b1e4e 100644 --- a/native/kotlin/migrated-java-sources.json +++ b/native/kotlin/migrated-java-sources.json @@ -359,10 +359,6 @@ "java": "com/faceclaw/app/FaceclawSseRequest.java", "kotlin": "App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawSseRequest.kt" }, - { - "java": "com/faceclaw/app/FaceclawSystemStatusIconProvider.java", - "kotlin": "App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawSystemStatusIconProvider.kt" - }, { "java": "com/faceclaw/app/FaceclawVoiceController.java", "kotlin": "App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawVoiceController.kt" diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/shared/KotlinBridge.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/shared/KotlinBridge.kt deleted file mode 100644 index b43e81ab..00000000 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/shared/KotlinBridge.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.faceclaw.shared - -/** NativeScript implements this Kotlin-owned contract in TypeScript. */ -interface KotlinBridgeListener { - fun transform(message: String): String -} - -/** - * Portable Kotlin at the same commonMain source path used by ios-port. Calls and callbacks are - * synchronous on the caller's thread. The listener is used only during roundTrip and is never - * retained. - */ -class KotlinBridge { - fun platform(): String = PlatformInfo.name - - fun threadName(): String = PlatformInfo.threadName() - - fun isMainThread(): Boolean = PlatformInfo.isMainThread() - - fun greet(name: String): String = "Hello, $name, from Kotlin" - - fun roundTrip(message: String, listener: KotlinBridgeListener): String { - val reply = listener.transform("Kotlin received: $message") - // Consume the TypeScript return value, then return it across the bridge. - return "Kotlin received callback: $reply" - } -} - -internal expect object PlatformInfo { - val name: String - - fun threadName(): String - - fun isMainThread(): Boolean -} diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/shared/PlatformInfo.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/shared/PlatformInfo.kt new file mode 100644 index 00000000..42aa0c34 --- /dev/null +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/shared/PlatformInfo.kt @@ -0,0 +1,9 @@ +package com.faceclaw.shared + +internal expect object PlatformInfo { + val name: String + + fun threadName(): String + + fun isMainThread(): Boolean +} diff --git a/tests/ios-evenhub.test.cjs b/tests/ios-evenhub.test.cjs index a1c114d3..6e35cef7 100644 --- a/tests/ios-evenhub.test.cjs +++ b/tests/ios-evenhub.test.cjs @@ -1,10 +1,8 @@ const test = require('node:test'); const assert = require('node:assert/strict'); const fs = require('node:fs'), vm = require('node:vm'); -const { createHash } = require('node:crypto'); const { zstdCompressSync } = require('node:zlib'); const { loader } = require('./helpers/load-typescript.cjs'); -const { LvglFont } = require('../.test-build/app/graphics/lvgl-font.js'); function pack(files) { const key = Buffer.from('EVEN REALITIES'); @@ -17,27 +15,6 @@ function pack(files) { })]); } -test('iOS LVGL reader loads the bundled font including CJK and game symbols', () => { - const bytes = new Uint8Array(fs.readFileSync('app/fonts/source-han-sans/SourceHanSansSC-Light-20.lvgl.bin')); - const font = new LvglFont(bytes); - // Metrics and full glyph SHA-256 vectors from production Java LvglFontFile. - assert.deepEqual([...font.metrics], [25, 19]); - const vectors = [ - [0x25a6, 'b08ecb603fd059b0a00ba3088f18b79185c421e73049797cd3cb0828e1e5cd04'], - [0x25c6, 'c176d5dcdb5f7e3a7220455528efde3760672c40cee39b422fc3f5ad20df66dd'], - [0x4e2d, '9bde2c8f1ffcf7afc598f4d0350c9ff262484816aa0c9b46d31f0c3c09613003'], - [0xff21, '0074f96299a75b86912282416e47e0823790e091352aec852eff49b89b2e719d'], - ]; - for (const [cp, hash] of vectors) { - const glyph = font.glyph(cp); - const w = glyph[0] | glyph[1] << 8, h = glyph[2] | glyph[3] << 8; - assert.ok(w > 0 && h > 0); assert.equal(glyph.length, 8 + (Math.floor(w / 2) + 1) * h); - assert.equal(createHash('sha256').update(glyph).digest('hex'), hash); - } - assert.equal(font.glyph(0x10ffff).length, 0); - assert.throws(() => new LvglFont(bytes.subarray(0, 80)), /bounds|Truncated/); -}); - test('EHPK entrypoints and extraction paths cannot escape their package directory', () => { const load = loader({}, { fzstd: require('fzstd') }); const api = load('app/apps/evenhub/ehpk.ts'); diff --git a/tests/ios-glanceboard.test.cjs b/tests/ios-glanceboard.test.cjs index ed20c569..cea8077b 100644 --- a/tests/ios-glanceboard.test.cjs +++ b/tests/ios-glanceboard.test.cjs @@ -5,7 +5,6 @@ const path = require('node:path'); const vm = require('node:vm'); const ts = require('typescript'); const images = require('../.test-build/app/graphics/image.js'); -const { SurfaceCompositor } = require('../.test-build/app/graphics/surface-compositor.js'); const events = require('../.test-build/app/g2/events.js'); function load(file, modules, globals = {}) { @@ -20,6 +19,7 @@ function load(file, modules, globals = {}) { } const planes = load('app/graphics/plane.ts', { './image': images }); const timings = load('app/native/frame-timings.ts', {}); +const LAUNCHER_GRAY = 75; function fixture() { const observers = new Map(), phoneState = { protectedDataAvailable: true }; @@ -38,7 +38,7 @@ function fixture() { '../util/render-freshness': { beginRenderPass() {}, endRenderPass: () => false }, './glance-state': require('../.test-build/app/g2/glance-state.js'), }, clock); - const launcherPixels = new Uint8Array(640 * 480).fill(75), fullRect = { x: 0, y: 0, width: 640, height: 480 }; + const launcherPixels = new Uint8Array(640 * 480).fill(LAUNCHER_GRAY), fullRect = { x: 0, y: 0, width: 640, height: 480 }; const window = { windowId: 'launcher', surfaceId: 'launcher', appId: 'launcher', title: 'Apps', // The launcher repaints into whichever display target the controller has after a switch. requestRender() { void controller?.displayReady.then(() => controller.display?.submitSurfaceFrame('launcher', launcherPixels, fullRect, 'launcher')); }, setScreenOn() {} }; @@ -55,21 +55,43 @@ function fixture() { if (input.type === 'display-wake' || !screenOn && input.type === 'double-click') shell.wake(); }, }; - // Both display targets compose with the real (TypeScript reference) compositor so - // the pixel assertions below exercise real layering, blanking and lock surfaces. + // Both display targets share a minimal compositor (z-ordered opaque and + // color-keyed surfaces, visibility, blanking) so the pixel assertions below + // exercise layering, blanking and lock surfaces. class Display { - compositor = new SurfaceCompositor(640, 480); + surfaces = new Map(); blanked = false; depths = []; async configureCompositorScreen() {} - async configureSurface(id, options) { this.compositor.configureSurface(id, options); } - async removeSurface(id) { this.compositor.removeSurface(id); this.changed(); } - async setSurfaceVisible(id, visible) { this.compositor.setSurfaceVisible(id, visible); this.changed(); } - depths = []; - async setSurfaceDepth(id, depth) { this.depths.push([id, depth]); this.compositor.setSurfaceDepth(id, depth); } - async setUnderlayDim(below, factor) { this.compositor.setUnderlayDim(below, factor); this.changed(); } - async setScreenBlanked(blanked) { this.compositor.setScreenBlanked(blanked); this.changed(); } - async submitSurfaceFrame(id, pixels, rect, _fingerprint, _paintMs, _frameId, draws = null) { this.compositor.submitSurfaceFrame(id, pixels, rect, draws); this.changed(); } - async submitShellScene(bytes) { this.compositor.setShellScene(bytes); this.changed(); } - getCompositePreview() { return this.compositor.composite(); } + async configureSurface(id, options) { + const previous = this.surfaces.get(id); + const pixels = previous?.width === options.width && previous.height === options.height + ? previous.pixels : new Uint8Array(options.width * options.height); + this.surfaces.set(id, { ...options, pixels, visible: previous?.visible ?? true }); + } + async removeSurface(id) { this.surfaces.delete(id); this.changed(); } + async setSurfaceVisible(id, visible) { const surface = this.surfaces.get(id); if (surface) surface.visible = visible; this.changed(); } + async setSurfaceDepth(id, depth) { this.depths.push([id, depth]); } + async setUnderlayDim() { this.changed(); } + async setScreenBlanked(blanked) { this.blanked = blanked; this.changed(); } + async submitSurfaceFrame(id, pixels, rect) { + const surface = this.surfaces.get(id); + if (!surface) throw new Error(`Unknown surface: ${id}`); + for (let y = 0; y < rect.height; y++) { + surface.pixels.set(pixels.subarray(y * rect.width, (y + 1) * rect.width), (rect.y + y) * surface.width + rect.x); + } + this.changed(); + } + async submitShellScene() { this.changed(); } + getCompositePreview() { + const output = new Uint8Array(640 * 480); + if (this.blanked) return output; + for (const s of [...this.surfaces.values()].filter(s => s.visible).sort((a, b) => a.zOrder - b.zOrder)) { + for (let y = 0; y < s.height; y++) for (let x = 0; x < s.width; x++) { + const value = s.pixels[y * s.width + x]; + if (s.transparency !== 'color-key' || value) output[(s.y + y) * 640 + s.x + x] = value; + } + } + return output; + } changed() {} } class PreviewDisplayTarget extends Display { @@ -93,7 +115,7 @@ function fixture() { async start() { this.emitState('connected', 'Connected.'); } async disconnect() { this.emitState('disconnected', 'Disconnected.'); } waitForFrameFinished() { return Promise.resolve('sent'); } - changed() { if (this.phase === 'connected') sent.push(this.compositor.composite()); } + changed() { if (this.phase === 'connected') sent.push(this.getCompositePreview()); } } const provider = { isEnabled: () => settings.enabled, showOnTap: () => settings.tap, @@ -221,17 +243,17 @@ test('double-tap and other shell wakes replace Glanceboard without waking it aga const f = fixture(); await f.connect(); f.shell.sleep(); await f.hardware(9); await f.hardware(3); assert.equal(f.shell.isScreenOn(), true); assert.equal(f.controller.glance.isVisible(), false); - assert.equal(f.sent.at(-1)[0], 80); assert.equal(f.boardStats.stops, 1); + assert.equal(f.sent.at(-1)[0], LAUNCHER_GRAY); assert.equal(f.boardStats.stops, 1); f.shell.sleep(); await f.hardware(0); f.shell.wake(); await f.render(); - assert.equal(f.controller.glance.isVisible(), false); assert.equal(f.sent.at(-1)[0], 80); - await f.advance(5000); await f.render(); assert.equal(f.sent.at(-1)[0], 80); + assert.equal(f.controller.glance.isVisible(), false); assert.equal(f.sent.at(-1)[0], LAUNCHER_GRAY); + await f.advance(5000); await f.render(); assert.equal(f.sent.at(-1)[0], LAUNCHER_GRAY); }); test('head tilt uses Glanceboard when enabled and otherwise wakes the regular UI', async () => { const f = fixture(); await f.connect(); f.shell.sleep(); await f.hardware(12, 1); assertBoard(f.sent.at(-1)); assert.equal(f.shell.isScreenOn(), false); await f.hardware(3); f.shell.sleep(); f.settings.tilt = false; - await f.hardware(12, 1); assert.equal(f.shell.isScreenOn(), true); assert.equal(f.sent.at(-1)[0], 80); + await f.hardware(12, 1); assert.equal(f.shell.isScreenOn(), true); assert.equal(f.sent.at(-1)[0], LAUNCHER_GRAY); }); test('disabled triggers and scrolls do not show the board; awake taps still reach the shell', async () => { @@ -276,7 +298,7 @@ test('iOS lock hides apps and Glanceboard, blocks input, and stays locked when p await f.hardware(12, 1); assert.ok(f.sent.at(-1).every(p => p === 123)); f.observers.get('unlock')(); await f.render(); assert.equal(f.controller.glassesLocked, false); - assert.equal(f.sent.at(-1)[0], 80); + assert.equal(f.sent.at(-1)[0], LAUNCHER_GRAY); await f.hardware(0); assert.equal(f.received.length, 1); }); diff --git a/tests/menu-display-list.test.cjs b/tests/menu-display-list.test.cjs index 57a57a6b..ef29615b 100644 --- a/tests/menu-display-list.test.cjs +++ b/tests/menu-display-list.test.cjs @@ -7,7 +7,6 @@ const graphics=require('../.test-build/app/graphics/image.js'); const planes=require('../.test-build/app/graphics/plane.js'); const wire=require('../.test-build/app/graphics/presentation-wire.js'); const {encodeShellScene}=require('../.test-build/app/graphics/shell-scene.js'); -const {SurfaceCompositor}=require('../.test-build/app/graphics/surface-compositor.js'); function load(file,modules) { const context={exports:{},require:name=>{assert.ok(name in modules, name);return modules[name];}}; vm.runInNewContext(ts.transpileModule(fs.readFileSync(file,'utf8'),{compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2020}}).outputText,context); @@ -37,27 +36,17 @@ test('menu retains the selected text and rounded highlight on the menu plane',as assert.ok(row.source.pixels.some(v=>v===255));assert.ok(!image.withDrawsBaked(false).pixels.some(v=>v===255)); const flat=planes.flattenPlanesWithDraws([{image,x:0,y:0}]); const records=wire.presentationRecords(prepareFrameDraws(flat.draws));assert.equal(records.length,1); - const c=new SurfaceCompositor(80,80);c.configureSurface('app',{x:0,y:0,width:80,height:80,zOrder:0,transparency:'opaque'}); - c.submitSurfaceFrame('app',flat.image.pixels,{x:0,y:0,width:80,height:80},prepareFrameDraws(flat.draws)); - const screen=flat.image.pixels.slice(),preview=c.composite(); - assert.ok(preview.some(v=>v===240));assert.deepEqual(flat.image.pixels,screen); await m.layer.handleInput({type:'scroll-down'},m.context); const next=m.paint().draws.find(d=>d.presentation);assert.ok(next.y>row.y);assert.equal(next.presentation.depth,0); }); -test('shell menu selection survives serialization and is not baked into its surface',()=>{ +test('shell menu selection survives serialization',()=>{ const image=menu().paint(),bytes=encodeShellScene([{image,x:0,y:0,shellKey:7}]); assert.equal(new DataView(bytes.buffer).getUint16(14,true),1); - const c=new SurfaceCompositor(80,80);c.setShellScene(bytes);assert.ok(c.composite().some(v=>v===240)); }); -test('later opaque planes occlude a replayed selection without erasing its visible part',()=>{ +test('later opaque planes add an occlusion to a replayed selection',()=>{ const image=menu().paint(),row=image.draws.find(d=>d.presentation),cover=new graphics.GrayImage(10,8,1); const flat=planes.flattenPlanesWithDraws([{image,x:0,y:0},{image:cover,x:row.x+10,y:row.y+2}]); const records=wire.presentationRecords(prepareFrameDraws(flat.draws));assert.ok(records[0].displayList.calls.some(c => c.op === 2 && c.resource === 65535)); - const c=new SurfaceCompositor(80,80);c.configureSurface('app',{x:0,y:0,width:80,height:80,zOrder:0,transparency:'opaque'}); - c.submitSurfaceFrame('app',flat.image.pixels,{x:0,y:0,width:80,height:80},prepareFrameDraws(flat.draws)); - const preview=c.composite(); - for(let y=row.y+2;yv===240)); }); const {LayerStack,noopLayerActions}=load('app/ui/layers.ts',{ @@ -71,24 +60,15 @@ test('context menu surface and selected row both use +4 without changing the app assert.deepEqual(frame.image.pixels,base.pixels); const records=wire.presentationRecords(prepareFrameDraws(frame.draws)); assert.deepEqual(records.map(r=>r.depth),[4,4]);assert.equal(records[0].mode,'masked-image'); - const c=new SurfaceCompositor(100,90);c.configureSurface('app',{x:0,y:0,width:100,height:90,zOrder:0,transparency:'opaque'}); - c.submitSurfaceFrame('app',frame.image.pixels,{x:0,y:0,width:100,height:90},prepareFrameDraws(frame.draws)); - const preview=c.composite(); - assert.equal(preview[45*100+10],96); // old left edge has no baked menu - assert.equal(preview[45*100+13],0); // shifted opaque black interior - assert.equal(preview[8*100+12],96); // transparent rounded corner - assert.ok(preview.some(v=>v===240)); stack.pop();const closed=planes.flattenPlanesWithDraws(stack.paint()); - c.submitSurfaceFrame('app',closed.image.pixels,{x:0,y:0,width:100,height:90},prepareFrameDraws(closed.draws)); - assert.deepEqual(c.composite(),base.pixels); + assert.deepEqual(closed.image.pixels,base.pixels); + assert.deepEqual(wire.presentationRecords(prepareFrameDraws(closed.draws)),[]); }); test('system menu bridge shifts its surface and selected row together by +4',()=>{ const image=menu().paint(),bytes=encodeShellScene([{image,x:8,y:0,shellKey:7,depth:4}]); const view=new DataView(bytes.buffer),w=view.getUint16(8,true),h=view.getUint16(10,true); assert.equal(view.getInt16(16,true),4); assert.equal(wire.readPresentation(bytes,18+w*h).selection.depth,4); - const c=new SurfaceCompositor(100,80);c.setShellScene(bytes);const preview=c.composite(); - assert.equal(preview[40*100+8],0);assert.equal(preview[40*100+10],80); }); test('unselected sidebar icons retain -2 depth through shell cropping, including attention badges',()=>{ const shellScene=require('../.test-build/app/graphics/shell-scene.js'); @@ -106,10 +86,10 @@ test('unselected sidebar icons retain -2 depth through shell cropping, including chrome.drawSidebar(image,state); assert.deepEqual(Array.from(image.draws.filter(d=>d.presentation),d=>d.presentation.depth),[-2,-2]); const crop=shellScene.shellCrop(image,0,0,64,280,1),bytes=encodeShellScene([crop]); - const c=new SurfaceCompositor(640,480);c.setShellScene(bytes);const preview=c.composite(); - assert.equal(preview[34*640+30],240); // selected icon stays at its original x - assert.equal(preview[74*640+29],240); // unselected icon moves left by one - assert.equal(preview[74*640+33],0); // no baked copy at the original right edge + const view=new DataView(bytes.buffer),w=view.getUint16(8,true),h=view.getUint16(10,true); + assert.equal(view.getUint16(14,true),2); + const first=wire.readPresentation(bytes,18+w*h),second=wire.readPresentation(bytes,first.end); + assert.deepEqual([first.selection.depth,second.selection.depth],[-2,-2]); state.selectedIndex=1;const next=new graphics.GrayImage(640,480);chrome.drawSidebar(next,state); assert.equal(next.draws.filter(d=>d.presentation).length,2); }); @@ -128,6 +108,4 @@ test('shell modal carries its inner menu highlight animation instead of baking i const image=paint(),row=image.draws.find(d=>d.presentation); assert.ok(row.y>before.y);assert.ok(row.presentation.displayList.timeline,'the slide stays a timed display list'); assert.ok(!image.withDrawsBaked(false).pixels.some(v=>v===255),'selected text is not baked into the modal surface'); - const c=new SurfaceCompositor(200,200);c.setShellScene(encodeShellScene([{image,x:0,y:0,shellKey:9}])); - assert.ok(c.composite().some(v=>v===240)); }); diff --git a/tests/surface-compositor.test.cjs b/tests/surface-compositor.test.cjs deleted file mode 100644 index de5e497b..00000000 --- a/tests/surface-compositor.test.cjs +++ /dev/null @@ -1,49 +0,0 @@ -const test = require('node:test'); -const assert = require('node:assert/strict'); -const { SurfaceCompositor } = require('../.test-build/app/graphics/surface-compositor.js'); -const rect = (x, y, width, height) => ({ x, y, width, height }); -function surface(c, id, box, values, zOrder = 0, transparency = 'opaque') { - c.configureSurface(id, { ...box, zOrder, transparency }); - c.submitSurfaceFrame(id, Uint8Array.from(values), rect(0, 0, box.width, box.height)); -} -test('shell color key preserves underlying text while opaque black covers it', () => { - const c = new SurfaceCompositor(3, 2); - surface(c, 'app', rect(0, 0, 3, 2), [200, 200, 200, 200, 200, 200]); - surface(c, 'shell', rect(0, 0, 3, 2), [0, 1, 255, 0, 0, 0], 1, 'color-key'); - c.setUnderlayDim(1, 0.5); - assert.deepEqual([...c.composite()], [100, 1, 255, 100, 100, 100]); - c.setSurfaceVisible('shell', false); - assert.deepEqual([...c.composite()], [100, 100, 100, 100, 100, 100]); - surface(c, 'opaque', rect(1, 0, 1, 2), [0, 0], 2); - assert.deepEqual([...c.composite()], [100, 0, 100, 100, 0, 100]); -}); -test('partial frames clip in surface coordinates, then surfaces clip to the screen', () => { - const c = new SurfaceCompositor(3, 2); - surface(c, 'app', rect(-1, 0, 3, 2), [1, 2, 3, 4, 5, 6]); - const source = Uint8Array.from([99, 10, 20, 99, 30, 40, 99]); - c.submitSurfaceFrame('app', source.subarray(1, 5), rect(1, 1, 2, 2)); - source.fill(0); - assert.deepEqual([...c.composite()], [2, 3, 0, 10, 20, 0]); - c.submitSurfaceFrame('app', Uint8Array.from([50, 60, 70, 80]), rect(-1, -1, 2, 2)); - // The clipped update changed the offscreen column, leaving visible pixels intact. - assert.deepEqual([...c.composite()], [2, 3, 0, 10, 20, 0]); -}); -test('moving a surface retains its frame; resizing clears it; blanking is reversible', () => { - const c = new SurfaceCompositor(3, 1); - surface(c, 'app', rect(0, 0, 2, 1), [7, 9]); - c.configureSurface('app', { ...rect(1, 0, 2, 1), zOrder: 0, transparency: 'opaque' }); - assert.deepEqual([...c.composite()], [0, 7, 9]); - c.setScreenBlanked(true); assert.deepEqual([...c.composite()], [0, 0, 0]); - c.setScreenBlanked(false); assert.deepEqual([...c.composite()], [0, 7, 9]); - c.configureSurface('app', { ...rect(0, 0, 3, 1), zOrder: 0, transparency: 'opaque' }); - assert.deepEqual([...c.composite()], [0, 0, 0]); -}); -test('layer order is independent of creation order; removal reveals lower surfaces', () => { - const c = new SurfaceCompositor(1, 1); - surface(c, 'top', rect(0, 0, 1, 1), [20], 10); - surface(c, 'bottom', rect(0, 0, 1, 1), [80], -1); - assert.equal(c.composite()[0], 20); - c.removeSurface('top'); assert.equal(c.composite()[0], 80); - assert.throws(() => c.submitSurfaceFrame('missing', new Uint8Array(1), rect(0, 0, 1, 1))); - assert.throws(() => c.submitSurfaceFrame('bottom', new Uint8Array(2), rect(0, 0, 1, 1))); -}); diff --git a/tests/tsconfig.json b/tests/tsconfig.json index bfc76199..fe42d759 100644 --- a/tests/tsconfig.json +++ b/tests/tsconfig.json @@ -16,11 +16,9 @@ "../app/remote/protocol.ts", "../app/remote/listeners.ts", "../app/g2/ancs-client.ts", - "../app/graphics/lvgl-font.ts", "../app/phone-ui/ble-bandwidth-meter.ts", "../app/apps/terminal/hub-header.ts", "../app/g2/ios-peripheral-identity.ts", - "../app/graphics/surface-compositor.ts", "../app/graphics/image.ts", "../app/graphics/plane.ts", "../app/graphics/shell-scene.ts", From 7684403491c186d10b17399c5826eae7bf3c7cbb Mon Sep 17 00:00:00 2001 From: James Babcock Date: Wed, 30 Sep 2026 16:01:39 -0700 Subject: [PATCH 23/60] Less-sensitive disconnect detection to avoid reconnect loops under BLE contention --- .../app/g2protocol/CfwMessageWindow.kt | 18 +++++-- .../faceclaw/app/g2protocol/MessageBuilder.kt | 2 +- .../g2protocol/session/GlassesSessionCore.kt | 18 ++++++- .../g2protocol/session/GlassesSessionSend.kt | 31 ++++++++++- .../faceclaw/app/GlassesSessionCoreTest.kt | 53 +++++++++++++++++++ .../kotlin/com/faceclaw/app/ProtocolTest.kt | 12 +++++ 6 files changed, 128 insertions(+), 6 deletions(-) diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/CfwMessageWindow.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/CfwMessageWindow.kt index c75f3215..73b9e79e 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/CfwMessageWindow.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/CfwMessageWindow.kt @@ -5,11 +5,23 @@ import kotlin.jvm.JvmStatic /** Ordered completion and go-back-N recovery for the custom-message window. */ class CfwMessageWindow private constructor() { companion object { - // Flappy capture: p99 ACK 63ms, max 77ms. Allow full-frame processing - // while recovering a lost reply well before the stock timeout. - const val ACK_TIMEOUT_MS = 500 + // An unresolved message is presumed lost only once both kinds of progress on + // its arm have stopped: no write completion for DATA_STALL_MS, and no CFW ack + // for ACK_STALL_MS since it was sent. Android withholds write completions + // while its outgoing queue is congested, so completions mean data is still + // draining; acks mean the firmware is still working through the window. A + // single 500 ms deadline from send replayed large uploads whose acks were + // just slow (an 11 KB upload acked by one lens at 536 ms), and under + // bandwidth pressure (LE Audio streaming) it tore the session down. + const val DATA_STALL_MS = 500 + const val ACK_STALL_MS = 3_000 const val MAX_RETRIES = 3 + /** When a message sent at [sentAtMs] counts as lost, given its arm's latest write completion and CFW ack. */ + @JvmStatic + fun ackDeadline(sentAtMs: Long, lastArmWriteAtMs: Long, lastArmAckAtMs: Long): Long = + maxOf(lastArmWriteAtMs + DATA_STALL_MS, maxOf(sentAtMs, lastArmAckAtMs) + ACK_STALL_MS) + /** ID reuse must not invalidate an earlier command still eligible for replay. */ @JvmStatic fun canSend(messages: Iterable, candidate: OutboundMessage): Boolean = diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/MessageBuilder.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/MessageBuilder.kt index 218c7d4c..7aea441e 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/MessageBuilder.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/MessageBuilder.kt @@ -97,7 +97,7 @@ class MessageBuilder { 0, streamId, payload, - CfwMessageWindow.ACK_TIMEOUT_MS, + CfwMessageWindow.ACK_STALL_MS, tileIndex, leftArm, ) diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt index a8967265..a65cca61 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt @@ -314,6 +314,11 @@ class GlassesSessionCore( internal val pendingMessages = ArrayDeque() internal val cfwTransports = arrayOf(CfwTransport(platform), CfwTransport(platform)) + // Per arm (0 = left, 1 = right, like cfwTransports): when a write to it last + // completed and when a CFW ack last arrived from it. The CFW window's liveness + // signals (see CfwMessageWindow.ackDeadline). + internal val lastArmWriteAtMs = LongArray(2) + internal val lastArmCfwAckAtMs = LongArray(2) internal val inFlightMessages = ArrayDeque() internal var prewrittenMessage: OutboundMessage? = null internal var prewrittenFrames: List = emptyList() @@ -350,8 +355,10 @@ class GlassesSessionCore( val active = monitor.withLock { running } if (!active) return false return try { - link.writeFrames(address, BleProtocol.WRITE_CHAR_UUID, listOf(packet), ConnectionOptions.WRITE_MODE, + val result = link.writeFrames(address, BleProtocol.WRITE_CHAR_UUID, listOf(packet), ConnectionOptions.WRITE_MODE, ConnectionOptions.WRITE_TIMEOUT_MS) + if (result) monitor.withLock { noteWriteCompletedLocked(address, now()) } + result } catch (t: Throwable) { logLine("raw packet write failed: " + safeMessage(t)) false @@ -1348,6 +1355,8 @@ class GlassesSessionCore( val acks = CfwTransport.parseAcks(data) ?: return monitor.withLock { lastIncomingAtMs = now() + val arm = armIndex(address) + if (arm >= 0) lastArmCfwAckAtMs[arm] = lastIncomingAtMs for (ack in acks) { for (message in inFlightMessages) { val ingress = if (message.isLeftArmMessage) leftAddress else rightAddress @@ -2018,6 +2027,13 @@ class GlassesSessionCore( return id } + /** 0 for the left arm, 1 for the right (the cfwTransports order), -1 for anything else. */ + internal fun armIndex(address: String): Int = when { + address.equals(leftAddress, ignoreCase = true) -> 0 + address.equals(rightAddress, ignoreCase = true) -> 1 + else -> -1 + } + internal fun hasRingAddress(): Boolean { return ringAddress.trim().isNotEmpty() } diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt index 3a151c19..a7548611 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt @@ -79,6 +79,7 @@ internal fun GlassesSessionCore.driveSession(): Long { ) } if (!inFlightMessages.isEmpty()) { + refreshCfwAckDeadlinesLocked() val oldest = inFlightMessages.firstOrNull() val replay = CfwMessageWindow.replayWindow(inFlightMessages, now) if (!replay.isEmpty()) { @@ -415,6 +416,7 @@ internal fun GlassesSessionCore.writeMessage(message: OutboundMessage): Boolean monitor.withLock { val sentAtMs = now() + if (result) noteWriteCompletedLocked(writeAddress, sentAtMs) message.sentAtMs = sentAtMs message.ackDeadlineAtMs = sentAtMs + message.ackTimeoutMs logImageUpdateSendLandmarkLocked(message) @@ -463,6 +465,7 @@ internal fun GlassesSessionCore.prewriteMessage(message: OutboundMessage): Boole if (!result) { return false } + monitor.withLock { noteWriteCompletedLocked(writeAddress, now()) } prewrittenMessage = message prewrittenFrames = frames.toList() @@ -486,13 +489,39 @@ internal fun GlassesSessionCore.spoilPrewrittenMessage(reason: String): Boolean val writeAddress = if (message.isLeftArmMessage) leftAddress else rightAddress logLine("spoiling prewritten " + message.label + ": " + reason) - return link.writeFrames( + val result = link.writeFrames( writeAddress, BleProtocol.WRITE_CHAR_UUID, listOf(finalFrame), ConnectionOptions.WRITE_MODE, ConnectionOptions.WRITE_TIMEOUT_MS ) + if (result) monitor.withLock { noteWriteCompletedLocked(writeAddress, now()) } + return result +} + +/** + * Record that writes to [address] just completed: every frame's onCharacteristicWrite + * fired. The drive loop only checks ack deadlines between writes, so noting it when + * writeFrames returns is as good as noting each callback. + */ +internal fun GlassesSessionCore.noteWriteCompletedLocked(address: String, atMs: Long) { + val arm = armIndex(address) + if (arm >= 0) lastArmWriteAtMs[arm] = atMs +} + +/** + * Re-derive each written, unresolved CFW message's ack deadline from its arm's latest + * write completion and CFW ack (CfwMessageWindow.ackDeadline), so either kind of + * progress keeps the window waiting. Deadlines only move later. + */ +internal fun GlassesSessionCore.refreshCfwAckDeadlinesLocked() { + for (message in inFlightMessages) { + if (message.sid != CfwTransport.SID || message.ackDeadlineAtMs <= 0) continue + val arm = if (message.isLeftArmMessage) 0 else 1 + message.ackDeadlineAtMs = CfwMessageWindow.ackDeadline( + message.sentAtMs, lastArmWriteAtMs[arm], lastArmCfwAckAtMs[arm]) + } } internal fun GlassesSessionCore.removePreparedMessageLocked(message: OutboundMessage?): Boolean { diff --git a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/GlassesSessionCoreTest.kt b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/GlassesSessionCoreTest.kt index 214a3092..3a41526e 100644 --- a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/GlassesSessionCoreTest.kt +++ b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/GlassesSessionCoreTest.kt @@ -464,6 +464,59 @@ class GlassesSessionCoreTest { s.core.disconnect() } + @Test + fun aCfwAckSlowerThanHalfASecondIsNotReplayed() { + val s = Session() + s.link.muted.add("image") + s.startAndAwaitLayout() + s.core.configureCompositorScreen(64, 32) + s.core.configureSurface("s", 0, 0, 64, 32, 0, SurfaceCompositor.TRANSPARENCY_OPAQUE) + try { + s.submitFrame(3, 0x20, 1) + assertTrue(waitUntil(5_000) { s.link.cfwMessages().size == 1 }) + // Well past the old 500 ms deadline, but inside the 3 s ack window. + s.platform.offsetMs += 1_500 + sleepMs(400) + assertFalse(s.host.hasLog("CFW recovery"), s.host.logs().takeLast(10).toString()) + assertEquals(1, s.link.cfwMessages().size) + // The late ack still completes the frame. + val first = s.link.writes.first { it.sid == CfwTransport.SID && it.kind == "image" } + val message = assertNotNull(s.core.monitor.withLock { s.core.inFlightMessages.firstOrNull { it.magic == first.magic } }) + for (lens in 1..2) { + s.core.onNotification(LEFT, BleProtocol.NOTIFY_CHAR_UUID, cfwAck(first.magic, lens, message.message.size, message.cfwChecksum)) + } + assertTrue(waitUntil(3_000) { s.displayedMatchesDesired() }) + } finally { + s.core.close() + } + } + + @Test + fun cfwAckDeadlinesFollowTheirOwnArmsWritesAndAcks() { + val core = Session().core + fun cfw(magic: Int, leftArm: Boolean) = OutboundMessage( + "image", "m$magic", CfwTransport.SID, 0, magic, byteArrayOf(1), CfwMessageWindow.ACK_STALL_MS, 0, leftArm) + val left = cfw(1, true) + val right = cfw(2, false) + core.monitor.withLock { + for (message in listOf(left, right)) { + message.sentAtMs = 1_000 + message.ackDeadlineAtMs = 4_000 + core.inFlightMessages.addLast(message) + } + core.lastArmCfwAckAtMs[0] = 2_000 + core.lastArmWriteAtMs[1] = 5_000 + core.refreshCfwAckDeadlinesLocked() + } + assertEquals(5_000L, left.ackDeadlineAtMs) + assertEquals(5_500L, right.ackDeadlineAtMs) + // Any CFW ack from an arm counts as that arm's progress, matched or not. + val before = core.now() + core.onNotification(LEFT, BleProtocol.NOTIFY_CHAR_UUID, cfwAck(77, 1, 1, 0)) + assertTrue(core.monitor.withLock { core.lastArmCfwAckAtMs[0] } >= before) + assertEquals(0L, core.monitor.withLock { core.lastArmCfwAckAtMs[1] }) + } + @Test fun reconnectBackoffGrowsAndRestartsAfterAStableSession() { val core = Session().core diff --git a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/ProtocolTest.kt b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/ProtocolTest.kt index 17db733f..9671f98f 100644 --- a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/ProtocolTest.kt +++ b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/ProtocolTest.kt @@ -212,6 +212,18 @@ class ProtocolTest { assertTrue(CfwMessageWindow.canSend(listOf(eviction), upload)) } + @Test + fun cfwAckDeadlineWaitsWhileEitherWritesOrAcksProgress() { + // Sent at 1000 into an idle arm: 3 s from the send. + assertEquals(4_000L, CfwMessageWindow.ackDeadline(1_000, 1_000, 0)) + // An ack from the arm restarts the 3 s ack window. + assertEquals(5_500L, CfwMessageWindow.ackDeadline(1_000, 1_000, 2_500)) + // Writes still completing keep it waiting past the ack window, 500 ms at a time. + assertEquals(6_700L, CfwMessageWindow.ackDeadline(1_000, 6_200, 2_500)) + // An ack from before the send doesn't shorten anything. + assertEquals(4_000L, CfwMessageWindow.ackDeadline(1_000, 1_000, 900)) + } + @Test fun orderedCompletionAndWholeWindowRecovery() { val head = message() From def027943c6e3a9a87d4b9d39fffcb9b5d92ff40 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Wed, 30 Sep 2026 17:44:50 -0700 Subject: [PATCH 24/60] Update changelog --- CHANGELOG | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index c88a73aa..d8ad76da 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,14 +2,23 @@ ## 0.8.1 - Future +### Assorted Features and Bug Fixes + +* Improve connection reliability +* Add a video player, launched by picking a video file in the Files app +* Fix some bugs impacting the Microphones app * Add config settings to disable animation categories -* EvenHub compatibility uses menu animations and is closer to style matched * Reduce phone CPU usage -* Fix a crash on install of larger EvenHub apps -* Fix line wrapping on EvenHub permissions dialog * Putting on the glasses auto-wakes the screen * Add a button to the phone screen top bar to open EvenHub app phone UI +### EvenHub + +* EvenHub compatibility uses menu animations and is closer to style matched +* EvenHub apps show an icon in the phone top bar to open their phone-side UI +* Fix a crash on install of larger EvenHub apps +* Fix line wrapping on EvenHub permissions dialog + ## 0.8.0 - 2026-09-26 ### Depth and Animation From 4bc35511351a18ec3cc41c8370957c9dbaa98c99 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Wed, 30 Sep 2026 21:10:11 -0700 Subject: [PATCH 25/60] Glanceboard has separately configurable font --- app/apps/glanceboard/glance-font.ts | 8 ++ app/apps/glanceboard/glanceboard-app.ts | 9 +- .../glanceboard/widgets/calendar-widget.ts | 6 +- .../glanceboard/widgets/compass-widget.ts | 6 +- app/apps/glanceboard/widgets/music-widget.ts | 8 +- .../glanceboard/widgets/nightscout-widget.ts | 6 +- app/apps/glanceboard/widgets/system-card.ts | 8 +- .../glanceboard/widgets/terminal-widget.ts | 4 +- app/graphics/ui-fonts.ts | 102 +++++++++++++----- app/ui/font-picker.ts | 92 ++++++++++++---- tests/ios-calendar.test.cjs | 1 + tests/nightscout.test.cjs | 2 +- 12 files changed, 187 insertions(+), 65 deletions(-) create mode 100644 app/apps/glanceboard/glance-font.ts diff --git a/app/apps/glanceboard/glance-font.ts b/app/apps/glanceboard/glance-font.ts new file mode 100644 index 00000000..4857110d --- /dev/null +++ b/app/apps/glanceboard/glance-font.ts @@ -0,0 +1,8 @@ +import { UiFontOverride } from "../../graphics/ui-fonts"; + +/** + * The font Glanceboard widgets paint with: the Glanceboard's own Font + * setting, or the Display UI font while that is unset. Its small, medium and + * large roles carry the same line-height guarantees as getDefault*Font. + */ +export const glanceFont = new UiFontOverride("glanceboard.font"); diff --git a/app/apps/glanceboard/glanceboard-app.ts b/app/apps/glanceboard/glanceboard-app.ts index f0af566c..877937b0 100644 --- a/app/apps/glanceboard/glanceboard-app.ts +++ b/app/apps/glanceboard/glanceboard-app.ts @@ -2,6 +2,7 @@ import { GrayImage } from "../../graphics/image"; import { truncateText, wrapText } from "../../graphics/textwrap"; import { getDefaultSmallFont } from "../../graphics/ui-fonts"; import { enumSettingMenuItem, onAnySettingChanged, toggleSettingMenuItem } from "../../ui/dashboard-settings"; +import { uiFontOverridePickerMenuItem } from "../../ui/font-picker"; import { type InputEvent } from "../../ui/gestures"; import { type Layer, type LayerContext } from "../../ui/layers"; import { drawSelectionHighlight, isMenuItemDisabled, MenuLayer, openModalMenu, type MenuItem } from "../../ui/menu"; @@ -10,6 +11,7 @@ import { LIST_ROW_TEXT_INSET, lineStep, listRowHeight } from "../../ui/metrics"; import { createInProcessWindow, type InProcessAppOptions, type InProcessWindow } from "../../ui/shell/in-process-window"; import { shell } from "../../ui/shell/shell"; import { GlanceBoard } from "./board"; +import { glanceFont } from "./glance-font"; import { clearConflictingSlots, glanceboardEnabledSetting, @@ -298,7 +300,7 @@ function openSlotPicker(ctx: LayerContext, slotIndex: number): void { openModalMenu(ctx, setting.label, items, Math.max(0, setting.values.indexOf(current))); } -/** Settings: layout, sleep gestures, duration, slot lines, and stereo depth. */ +/** Settings: layout, sleep gestures, duration, slot lines, widget font, and stereo depth. */ function openGlanceSettings(ctx: LayerContext): void { const items: MenuItem[] = [ enumSettingMenuItem(glanceLayoutSetting), @@ -306,6 +308,11 @@ function openGlanceSettings(ctx: LayerContext): void { toggleSettingMenuItem(glanceShowOnLongPressSetting), toggleSettingMenuItem(glanceShowOnHeadTiltSetting), toggleSettingMenuItem(glanceShowLinesSetting), + uiFontOverridePickerMenuItem(glanceFont, { + title: "Glanceboard font", + description: + "Typeface for the Glanceboard's widgets. Same as UI font follows the Font setting in Settings > Display.", + }), enumSettingMenuItem(glanceDepthSetting), ]; ctx.stack.push(new MenuLayer("Glanceboard settings", items, pageMenuLayout(ctx.stack.getBaseSize().width))); diff --git a/app/apps/glanceboard/widgets/calendar-widget.ts b/app/apps/glanceboard/widgets/calendar-widget.ts index 4607cd55..99d9b9fe 100644 --- a/app/apps/glanceboard/widgets/calendar-widget.ts +++ b/app/apps/glanceboard/widgets/calendar-widget.ts @@ -1,10 +1,10 @@ import { type GrayImage, type UiFont } from "../../../graphics/image"; import { truncateText } from "../../../graphics/textwrap"; -import { getDefaultMediumFont, getDefaultSmallFont } from "../../../graphics/ui-fonts"; import { hasCalendarPermission } from "../../../native/calendar-permissions"; import { getCalendarReadState, onCalendarChanged, readUpcomingEvents, type CalendarEvent } from "../../../native/calendar"; import { lineStep } from "../../../ui/metrics"; import { dayHeaderLabel, formatEventTime } from "../../calendar/calendar"; +import { glanceFont } from "../glance-font"; import { type GlanceWidget } from "../widget"; const PAD = 8; @@ -38,8 +38,8 @@ export class CalendarWidget implements GlanceWidget { } paint(image: GrayImage): void { - const small = getDefaultSmallFont(); - const medium = getDefaultMediumFont(); + const small = glanceFont.small(); + const medium = glanceFont.medium(); const step = lineStep(small); const textWidth = image.width - 2 * PAD; diff --git a/app/apps/glanceboard/widgets/compass-widget.ts b/app/apps/glanceboard/widgets/compass-widget.ts index 8e6716f0..adf0eda8 100644 --- a/app/apps/glanceboard/widgets/compass-widget.ts +++ b/app/apps/glanceboard/widgets/compass-widget.ts @@ -1,11 +1,11 @@ import { type GrayImage } from "../../../graphics/image"; -import { getDefaultMediumFont, getDefaultSmallFont } from "../../../graphics/ui-fonts"; import { hasLocationPermission } from "../../../native/location-permissions"; import { addCompassListener, COMPASS_CHANGED, setCompassEnabled } from "../../../native/compass"; import { isCompassCalibrated, normalizeHeading } from "../../compass/calibration"; import { cardinalDirection, createCompassBackground, drawCompassRose, layoutCompassRose, TICK_HEIGHT } from "../../compass/compass-rose"; import { getDeclinationAvailability, onDeclinationChanged, refreshDeclination } from "../../compass/declination"; import { getNorthReference, resolveHeading } from "../../compass/heading"; +import { glanceFont } from "../glance-font"; import { type GlanceWidget } from "../widget"; /** Owner token for the refcounted magnetometer, distinct from the Compass app's. */ @@ -63,8 +63,8 @@ export class CompassWidget implements GlanceWidget { } paint(image: GrayImage): void { - const medium = getDefaultMediumFont(); - const small = getDefaultSmallFont(); + const medium = glanceFont.medium(); + const small = glanceFont.small(); const { width, height } = image; const heading = this.rawHeading === null ? null : resolveHeading(this.rawHeading).displayDegrees; const headingText = heading === null ? "--°" : `${Math.round(heading)}° ${cardinalDirection(heading)}`; diff --git a/app/apps/glanceboard/widgets/music-widget.ts b/app/apps/glanceboard/widgets/music-widget.ts index b142f28f..f94418e3 100644 --- a/app/apps/glanceboard/widgets/music-widget.ts +++ b/app/apps/glanceboard/widgets/music-widget.ts @@ -1,9 +1,9 @@ import { GrayImage } from "../../../graphics/image"; import { renderIcon } from "../../../graphics/icons"; -import { getDefaultMediumFont, getDefaultSmallFont } from "../../../graphics/ui-fonts"; import { truncateText } from "../../../graphics/textwrap"; import { mediaControllerBridge, type MediaControllerState } from "../../../native/media-controller"; import { clamp } from "../../../util/numeric-util"; +import { glanceFont } from "../glance-font"; import { type GlanceWidget } from "../widget"; const PAD = 8; @@ -75,8 +75,8 @@ export class MusicWidget implements GlanceWidget { } paint(image: GrayImage): void { - const medium = getDefaultMediumFont(); - const small = getDefaultSmallFont(); + const medium = glanceFont.medium(); + const small = glanceFont.small(); const media = mediaControllerBridge.snapshot(); this.media = media; if (!media.available || (!media.title && !media.artist)) { @@ -142,7 +142,7 @@ export class MusicWidget implements GlanceWidget { image.drawRect(dx - 1, dy - 1, this.art.width + 2, this.art.height + 2, 60); } else { image.drawRect(ART_X, artY, ART_SIZE, ART_SIZE, 60); - const font = getDefaultSmallFont(); + const font = glanceFont.small(); image.drawText(font, ART_X + Math.round((ART_SIZE - font.measureText("no art")) / 2), artY + Math.round((ART_SIZE - font.lineHeight) / 2), "no art", 90); } diff --git a/app/apps/glanceboard/widgets/nightscout-widget.ts b/app/apps/glanceboard/widgets/nightscout-widget.ts index 14139486..0b3f9d6b 100644 --- a/app/apps/glanceboard/widgets/nightscout-widget.ts +++ b/app/apps/glanceboard/widgets/nightscout-widget.ts @@ -1,5 +1,4 @@ import { GrayImage } from "../../../graphics/image"; -import { getDefaultLargeFont, getDefaultSmallFont } from "../../../graphics/ui-fonts"; import { truncateText } from "../../../graphics/textwrap"; import { nightscoutBridge, type NightscoutState } from "../../../native/nightscout-bridge"; import { isNightscoutSettingsConfigured, loadNightscoutThresholds } from "../../../ui/dashboard-settings"; @@ -13,6 +12,7 @@ import { formatDelta, isNightscoutPointStale, } from "../../nightscout/nightscout"; +import { glanceFont } from "../glance-font"; import { type GlanceWidget } from "../widget"; const PAD = 8; @@ -48,8 +48,8 @@ export class NightscoutWidget implements GlanceWidget { } paint(image: GrayImage): void { - const small = getDefaultSmallFont(); - const large = getDefaultLargeFont(); + const small = glanceFont.small(); + const large = glanceFont.large(); const state = this.state; const nowMs = Date.now(); const step = lineStep(small); diff --git a/app/apps/glanceboard/widgets/system-card.ts b/app/apps/glanceboard/widgets/system-card.ts index c9b2c601..0404907d 100644 --- a/app/apps/glanceboard/widgets/system-card.ts +++ b/app/apps/glanceboard/widgets/system-card.ts @@ -1,6 +1,5 @@ import { BATTERY_ICON_WIDTH, drawBattery } from "../../../graphics/battery"; import { type GrayImage, type UiFont } from "../../../graphics/image"; -import { getDefaultLargeFont, getDefaultMediumFont, getDefaultSmallFont } from "../../../graphics/ui-fonts"; import { onAndroidNotificationPosted, readActiveNotificationIcons } from "../../../native/notification-icons"; import { readPhoneBatteryState } from "../../../native/phone-battery"; import { formatClockDate, formatClockTime } from "../../../ui/clock-format"; @@ -20,6 +19,7 @@ import { truncateText } from "../../../graphics/textwrap"; import { timerEngine } from "../../timer/timer-engine"; import { formatCountdown, sortTimers, timerDisplayName, timerPhase, timerRemainingMs } from "../../timer/timer-model"; import { lineStep } from "../../../ui/metrics"; +import { glanceFont } from "../glance-font"; import { type GlanceWidget } from "../widget"; const PAD = 8; @@ -97,9 +97,9 @@ export class SystemCardWidget implements GlanceWidget { } paint(image: GrayImage): void { - const large = getDefaultLargeFont(); - const medium = getDefaultMediumFont(); - const small = getDefaultSmallFont(); + const large = glanceFont.large(); + const medium = glanceFont.medium(); + const small = glanceFont.small(); const now = new Date(); // Clock and date down the left; batteries take the right edge. diff --git a/app/apps/glanceboard/widgets/terminal-widget.ts b/app/apps/glanceboard/widgets/terminal-widget.ts index 0401cf1c..e3e55728 100644 --- a/app/apps/glanceboard/widgets/terminal-widget.ts +++ b/app/apps/glanceboard/widgets/terminal-widget.ts @@ -1,6 +1,5 @@ import { type GrayImage } from "../../../graphics/image"; import { truncateText } from "../../../graphics/textwrap"; -import { getDefaultSmallFont } from "../../../graphics/ui-fonts"; import { lineStep } from "../../../ui/metrics"; import { onWorkerStateChanged, readWorkerState } from "../../../ui/shell/worker-state"; import { @@ -10,6 +9,7 @@ import { TERMINAL_SESSIONS_STATE_KEY, type TerminalSessionsSnapshot, } from "../../terminal/session-list"; +import { glanceFont } from "../glance-font"; import { type GlanceWidget } from "../widget"; const PAD = 8; @@ -72,7 +72,7 @@ export class TerminalWidget implements GlanceWidget { } paint(image: GrayImage): void { - const font = getDefaultSmallFont(); + const font = glanceFont.small(); const step = lineStep(font); const textWidth = image.width - 2 * PAD; const snapshot = this.snapshot; diff --git a/app/graphics/ui-fonts.ts b/app/graphics/ui-fonts.ts index 9a04505e..93d0324f 100644 --- a/app/graphics/ui-fonts.ts +++ b/app/graphics/ui-fonts.ts @@ -111,21 +111,49 @@ export function fontSelectionLabel(selection: UiFontSelection): string { // --- Resolution, cached per isolate --- -const resolved = new Map(); -let invalidationInstalled = false; +type UiFontRole = "small" | "medium" | "large"; -function cacheKey(role: string): string { - return role; +const UI_FONT_KEYS: readonly string[] = [UI_FONT_SELECTION_KEY, LEGACY_UI_FONT_KEY]; + +/** + * The three role fonts for one selection source, resolved lazily and cached + * until a change to any of `keys` (the settings the selection reads). + */ +class RoleFonts { + private readonly resolved = new Map(); + + constructor( + readonly keys: readonly string[], + private readonly selection: () => UiFontSelection, + ) {} + + get(role: UiFontRole): UiFont { + installInvalidation(); + const cached = this.resolved.get(role); + if (cached) return cached; + const font = resolveRole(this.selection(), role); + this.resolved.set(role, font); + return font; + } + + clear(): void { + this.resolved.clear(); + } } +const roleFontSets: RoleFonts[] = []; +const uiRoleFonts = new RoleFonts(UI_FONT_KEYS, getUiFontSelection); +roleFontSets.push(uiRoleFonts); +let invalidationInstalled = false; + function installInvalidation(): void { if (invalidationInstalled) return; invalidationInstalled = true; onSettingsStoreChanged((key) => { - if (key === UI_FONT_SELECTION_KEY || key === LEGACY_UI_FONT_KEY || key === TERMINAL_FONT_SELECTION_KEY) { - resolved.clear(); - cachedTerminalConfig = null; + for (const fonts of roleFontSets) { + if (fonts.keys.includes(key)) fonts.clear(); } + if (key === TERMINAL_FONT_SELECTION_KEY) cachedTerminalConfig = null; }); } @@ -148,46 +176,72 @@ function resolveTtf(selection: UiFontSelection, minLineHeight = 0): TtfFont | nu return null; } -function resolveRole(role: "small" | "medium" | "large"): UiFont { - installInvalidation(); - const key = cacheKey(role); - const cached = resolved.get(key); - if (cached) return cached; - const selection = getUiFontSelection(); - let font: UiFont | null = null; +function resolveRole(selection: UiFontSelection, role: UiFontRole): UiFont { // Enforce the guaranteed small-font range even against a stale or // hand-edited selection: an out-of-range selection falls back to bitmap for // every role (medium/large derive from small, so their documented ranges // follow and the roles never mix faces). if (selection.kind === "ttf" && uiFontSizeAllowed(installedFontPath(selection.file), selection.size)) { - font = + const font = role === "small" ? resolveTtf(selection) : resolveTtf(selection, role === "medium" ? MEDIUM_MIN_LINE_HEIGHT : LARGE_MIN_LINE_HEIGHT); + if (font) return font; } - if (!font) { - font = bitmapForRole(selection.kind === "bitmap" ? selection.face : "terminus", role); - } - resolved.set(key, font); - return font; + return bitmapForRole(selection.kind === "bitmap" ? selection.face : "terminus", role); } // Only the small (12px) bitmap font has a TerminusV alternative (it ships no // larger sizes); bitmap medium/large stay Terminus, as before the picker. -function bitmapForRole(face: BitmapFace, role: "small" | "medium" | "large"): BdfFont { +function bitmapForRole(face: BitmapFace, role: UiFontRole): BdfFont { if (role === "medium") return getFont("terminus16"); if (role === "large") return getFont("terminus24"); return getFont(face === "terminusv" ? "terminusv12" : "terminus12"); } export function getDefaultSmallFont(): UiFont { - return resolveRole("small"); + return uiRoleFonts.get("small"); } export function getDefaultMediumFont(): UiFont { - return resolveRole("medium"); + return uiRoleFonts.get("medium"); } export function getDefaultLargeFont(): UiFont { - return resolveRole("large"); + return uiRoleFonts.get("large"); +} + +/** + * A per-app UI font that defaults to the Display UI font: a selection stored + * as JSON under `storageKey`, or nothing to inherit. Its small/medium/large + * fonts derive from the selection exactly as the UI font's roles do, with + * the same line-height guarantees, so layouts written against + * getDefault*Font work unchanged. + */ +export class UiFontOverride { + private readonly fonts: RoleFonts; + + constructor(readonly storageKey: string) { + this.fonts = new RoleFonts([storageKey, ...UI_FONT_KEYS], () => this.getSelection() ?? getUiFontSelection()); + roleFontSets.push(this.fonts); + } + + /** The app's own selection, or null when it inherits the UI font. */ + getSelection(): UiFontSelection | null { + return parseFontSelection(getStringSetting(this.storageKey, "")); + } + + setSelection(selection: UiFontSelection | null): void { + setStringSetting(this.storageKey, selection ? JSON.stringify(selection) : ""); + } + + small(): UiFont { + return this.fonts.get("small"); + } + medium(): UiFont { + return this.fonts.get("medium"); + } + large(): UiFont { + return this.fonts.get("large"); + } } // --- Terminal font --- diff --git a/app/ui/font-picker.ts b/app/ui/font-picker.ts index 031fba76..4dc6679c 100644 --- a/app/ui/font-picker.ts +++ b/app/ui/font-picker.ts @@ -4,8 +4,9 @@ * styles), and a pixel size, with a live preview line rendered in the draft * font. Selections only persist on Save; double-click cancels. * - * Used for both the UI font (Display section) and the terminal font - * (Terminal section, filtered to monospace faces). + * Used for the UI font (Display section), the terminal font (Terminal + * section, filtered to monospace faces), and per-app overrides of the UI font + * (UiFontOverride, which add an "inherit" face ahead of the others). */ import { getFont } from "../graphics/bdffont"; import { GrayImage, type UiFont } from "../graphics/image"; @@ -20,6 +21,7 @@ import { setTerminalFontSelection, setUiFontSelection, type BitmapFace, + type UiFontOverride, type UiFontSelection, } from "../graphics/ui-fonts"; import { type InputEvent } from "./gestures"; @@ -31,6 +33,11 @@ import type { Layer, LayerContext } from "./layers"; const SIZE_CHOICES = [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28] as const; const DEFAULT_TTF_SIZE = 16; const PREVIEW_TEXT = "The quick brown fox jumps over 0123456789"; +const INHERIT_UI_FONT_LABEL = "Same as UI font"; +const UI_BITMAP_FACES: FontPickerOptions["bitmapFaces"] = [ + { face: "terminus", label: "Terminus" }, + { face: "terminusv", label: "TerminusV" }, +]; type FontPickerOptions = { title: string; @@ -43,8 +50,12 @@ type FontPickerOptions = { sizeAllowed?: (path: string, size: number) => boolean; /** Bitmap faces offered ahead of the installed TTF families. */ bitmapFaces: readonly { face: BitmapFace; label: string }[]; - get(): UiFontSelection; - set(selection: UiFontSelection): void; + /** When set, the first face choice is this label for "no selection of + * its own" (get/set null), which previews and stores as inheriting. */ + inheritLabel?: string; + /** Null (inherit) only when inheritLabel is set. */ + get(): UiFontSelection | null; + set(selection: UiFontSelection | null): void; }; type FontFamily = { @@ -52,8 +63,9 @@ type FontFamily = { fonts: InstalledFont[]; }; -/** The draft being edited: a bitmap face, or a TTF family + style + size. */ +/** The draft being edited: inherit, a bitmap face, or a TTF family + style + size. */ type Draft = + | { kind: "inherit" } | { kind: "bitmap"; face: BitmapFace } | { kind: "ttf"; family: FontFamily; font: InstalledFont; size: number }; @@ -77,7 +89,8 @@ export class FontPickerLayer implements Layer { this.draft = this.draftFromSelection(options.get()); } - private draftFromSelection(selection: UiFontSelection): Draft { + private draftFromSelection(selection: UiFontSelection | null): Draft { + if (selection === null) return { kind: "inherit" }; if (selection.kind === "ttf") { for (const family of this.families) { const font = family.fonts.find((f) => f.fileName === selection.file); @@ -91,14 +104,20 @@ export class FontPickerLayer implements Layer { return { kind: "bitmap", face }; } - private draftSelection(): UiFontSelection { - return this.draft.kind === "bitmap" - ? { kind: "bitmap", face: this.draft.face } - : { kind: "ttf", file: this.draft.font.fileName, size: this.draft.size }; + private draftSelection(): UiFontSelection | null { + switch (this.draft.kind) { + case "inherit": + return null; + case "bitmap": + return { kind: "bitmap", face: this.draft.face }; + case "ttf": + return { kind: "ttf", file: this.draft.font.fileName, size: this.draft.size }; + } } /** The draft's concrete font for the preview (bitmap fallback if unloadable). */ private previewFont(): UiFont { + if (this.draft.kind === "inherit") return getDefaultSmallFont(); if (this.draft.kind === "ttf") { const font = TtfFont.load(this.draft.font.path, this.draft.size); if (font) return font; @@ -154,18 +173,19 @@ export class FontPickerLayer implements Layer { } private rowDisabled(row: RowId): boolean { - return (row === "weight" || row === "size") && this.draft.kind === "bitmap"; + return (row === "weight" || row === "size") && this.draft.kind !== "ttf"; } private rowValue(row: RowId): string { if (row === "face") { + if (this.draft.kind === "inherit") return this.options.inheritLabel ?? ""; if (this.draft.kind === "bitmap") { return this.options.bitmapFaces.find((b) => b.face === (this.draft as { face: BitmapFace }).face)?.label ?? "Terminus"; } return this.draft.family.label; } - if (this.draft.kind === "bitmap") return "-"; + if (this.draft.kind !== "ttf") return "-"; if (row === "weight") return this.draft.font.style || "Regular"; return String(this.draft.size); } @@ -198,6 +218,16 @@ export class FontPickerLayer implements Layer { private openFaceMenu(ctx: LayerContext): void { const items: MenuItem[] = []; + const inheritLabel = this.options.inheritLabel; + if (inheritLabel !== undefined) { + items.push({ + label: inheritLabel, + onSelect: (innerCtx) => { + this.draft = { kind: "inherit" }; + innerCtx.stack.pop(); + }, + }); + } for (const bitmap of this.options.bitmapFaces) { items.push({ label: `${bitmap.label} (bitmap)`, @@ -216,10 +246,13 @@ export class FontPickerLayer implements Layer { }, }); } + const inheritRows = inheritLabel !== undefined ? 1 : 0; const currentIndex = - this.draft.kind === "bitmap" - ? Math.max(0, this.options.bitmapFaces.findIndex((b) => b.face === (this.draft as { face: BitmapFace }).face)) - : this.options.bitmapFaces.length + this.families.indexOf(this.draft.family); + this.draft.kind === "inherit" + ? 0 + : this.draft.kind === "bitmap" + ? inheritRows + Math.max(0, this.options.bitmapFaces.findIndex((b) => b.face === (this.draft as { face: BitmapFace }).face)) + : inheritRows + this.options.bitmapFaces.length + this.families.indexOf(this.draft.family); openModalMenu(ctx, "Font Face", items, Math.max(0, currentIndex)); } @@ -306,15 +339,33 @@ export function uiFontPickerMenuItem(): MenuItem { title: "UI font", monospaceOnly: false, sizeAllowed: uiFontSizeAllowed, - bitmapFaces: [ - { face: "terminus", label: "Terminus" }, - { face: "terminusv", label: "TerminusV" }, - ], + bitmapFaces: UI_BITMAP_FACES, get: getUiFontSelection, set: setUiFontSelection, }); } +/** + * Settings row for an app's own UI font, defaulting to the Display UI font + * (same faces and size bounds as the UI font picker). + */ +export function uiFontOverridePickerMenuItem( + override: UiFontOverride, + options: { title: string; description: string }, +): MenuItem { + return fontPickerMenuItem({ + rowLabel: "Font", + description: options.description, + title: options.title, + monospaceOnly: false, + sizeAllowed: uiFontSizeAllowed, + bitmapFaces: UI_BITMAP_FACES, + inheritLabel: INHERIT_UI_FONT_LABEL, + get: () => override.getSelection(), + set: (selection) => override.setSelection(selection), + }); +} + /** Settings row for the terminal font (monospace faces only). */ export function terminalFontPickerMenuItem(): MenuItem { return fontPickerMenuItem({ @@ -337,6 +388,7 @@ function fontPickerMenuItem(options: FontPickerOptions & { rowLabel: string; des ctx.stack.push(new FontPickerLayer(options)); }, render: ({ image, x, y, width }) => { + const selection = options.get(); drawRightValueMenuItem( image, getDefaultSmallFont(), @@ -344,7 +396,7 @@ function fontPickerMenuItem(options: FontPickerOptions & { rowLabel: string; des y, width, options.rowLabel, - fontSelectionLabel(options.get()), + selection ? fontSelectionLabel(selection) : options.inheritLabel ?? "", ); }, }; diff --git a/tests/ios-calendar.test.cjs b/tests/ios-calendar.test.cjs index 7a8e93d6..135d2c32 100644 --- a/tests/ios-calendar.test.cjs +++ b/tests/ios-calendar.test.cjs @@ -166,6 +166,7 @@ function screenFixture() { const calendar = load('app/apps/calendar/calendar.ts', modules('../../')); const widget = load('app/apps/glanceboard/widgets/calendar-widget.ts', { ...modules('../../../'), '../../calendar/calendar': calendar, + '../glance-font': { glanceFont: { small: () => font, medium: () => font } }, }, { ...f.clock, setInterval: fn => { timers.set(++nextTimer, fn); return nextTimer; }, clearInterval: id => timers.delete(id) }); return { ...f, ...calendar, ...widget, timers, Image }; } diff --git a/tests/nightscout.test.cjs b/tests/nightscout.test.cjs index 38e892f3..e1deee44 100644 --- a/tests/nightscout.test.cjs +++ b/tests/nightscout.test.cjs @@ -73,7 +73,7 @@ function paintWidget(smallHeight, largeHeight, height = 144, measurements = {}) }; const { NightscoutWidget } = load('app/apps/glanceboard/widgets/nightscout-widget.ts', { '../../../graphics/image': { GrayImage }, - '../../../graphics/ui-fonts': { getDefaultSmallFont: () => small, getDefaultLargeFont: () => ({ ...small, lineHeight: largeHeight }) }, + '../glance-font': { glanceFont: { small: () => small, large: () => ({ ...small, lineHeight: largeHeight }) } }, '../../../graphics/textwrap': require('../.test-build/app/graphics/textwrap.js'), '../../../native/nightscout-bridge': { nightscoutBridge: { snapshot: () => state } }, '../../../ui/dashboard-settings': { isNightscoutSettingsConfigured: () => true, loadNightscoutThresholds: () => limits }, From 2ff764d6ea9ed39f2d90e132579a6ce34fcfe642 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Wed, 30 Sep 2026 21:52:56 -0700 Subject: [PATCH 26/60] Move Terminal and Navigate settings out of the Settings app and into their respective apps --- app/apps/glanceboard/glanceboard-app.ts | 2 +- app/apps/glanceboard/widgets/system-card.ts | 2 +- app/apps/navigate/destinations.ts | 2 +- app/apps/navigate/navigate-app.worker.ts | 4 +- app/apps/settings/settings-app.ts | 2 +- app/apps/terminal/terminal-app.worker.ts | 69 +++++++++++++++++---- app/ui/dashboard/settings-menus.ts | 51 +++------------ app/ui/font-picker.ts | 9 +-- app/ui/menu-animation-pref.ts | 2 +- app/ui/shell/chrome-layer.ts | 2 +- app/ui/window-menu.ts | 41 ++++++++++-- 11 files changed, 114 insertions(+), 72 deletions(-) diff --git a/app/apps/glanceboard/glanceboard-app.ts b/app/apps/glanceboard/glanceboard-app.ts index 877937b0..303b02d7 100644 --- a/app/apps/glanceboard/glanceboard-app.ts +++ b/app/apps/glanceboard/glanceboard-app.ts @@ -311,7 +311,7 @@ function openGlanceSettings(ctx: LayerContext): void { uiFontOverridePickerMenuItem(glanceFont, { title: "Glanceboard font", description: - "Typeface for the Glanceboard's widgets. Same as UI font follows the Font setting in Settings > Display.", + "Typeface for the Glanceboard's widgets. Same as UI font follows the Font setting in Settings > Customization.", }), enumSettingMenuItem(glanceDepthSetting), ]; diff --git a/app/apps/glanceboard/widgets/system-card.ts b/app/apps/glanceboard/widgets/system-card.ts index 0404907d..4c363b39 100644 --- a/app/apps/glanceboard/widgets/system-card.ts +++ b/app/apps/glanceboard/widgets/system-card.ts @@ -35,7 +35,7 @@ type BatteryItem = { label: string; percent: number; charging: boolean }; * battery indicators (the Wear OS watch's only while one is reachable), and * the Timers app's countdowns: the top bar's contents plus timers, laid out * for a card. Battery style and per-device visibility - * follow Settings > Display > Battery indicators, so the card agrees with + * follow Settings > Customization > Battery indicators, so the card agrees with * the bar. Countdowns tick once a second only while one is running. */ export class SystemCardWidget implements GlanceWidget { diff --git a/app/apps/navigate/destinations.ts b/app/apps/navigate/destinations.ts index 03849521..689e1783 100644 --- a/app/apps/navigate/destinations.ts +++ b/app/apps/navigate/destinations.ts @@ -1,6 +1,6 @@ /** * Saved and recent destinations for the Navigate app: Home and Work (plain - * address settings, also editable in the Settings app), custom named + * address settings), custom named * destinations, and a recency list of resolved places. Pure settings-store * accessors, usable from the worker and the main thread alike. */ diff --git a/app/apps/navigate/navigate-app.worker.ts b/app/apps/navigate/navigate-app.worker.ts index 4bdef4ab..28fbf975 100644 --- a/app/apps/navigate/navigate-app.worker.ts +++ b/app/apps/navigate/navigate-app.worker.ts @@ -262,8 +262,8 @@ function post(message: WorkerAppReply): void { global.postMessage(message); } -// Destinations edited on the phone (the text editor, or the Settings app's -// Home/Work rows) repaint the idle list / the edit screen live. +// Destinations edited on the phone (the text editor) repaint the idle list / +// the edit screen live. onSettingsStoreChanged((key) => { // The token key repaints too: the phone editor writes it live during // Edit token, and the idle page changes shape once one is set. diff --git a/app/apps/settings/settings-app.ts b/app/apps/settings/settings-app.ts index 99436d6b..56761d45 100644 --- a/app/apps/settings/settings-app.ts +++ b/app/apps/settings/settings-app.ts @@ -22,7 +22,7 @@ export type SettingsAppWindow = { /** The full in-process window record, for hosts that manage window lifecycle. */ inProcess: InProcessWindow; requestRender: () => void; - /** Select a section in the left column by label (e.g. "Terminal"). */ + /** Select a section in the left column by label (e.g. "Voice"). */ focusSection: (label: string) => void; /** Whether the glasses-side text-setting editor is the top layer. */ isTextEditorOnTop: () => boolean; diff --git a/app/apps/terminal/terminal-app.worker.ts b/app/apps/terminal/terminal-app.worker.ts index d6bb3963..066ce950 100644 --- a/app/apps/terminal/terminal-app.worker.ts +++ b/app/apps/terminal/terminal-app.worker.ts @@ -23,7 +23,7 @@ * Frames are painted here and submitted directly to the Java compositor from * this worker's thread. * - * Auto-reconnect (Settings > Terminal, default on): while any terminal window + * Auto-reconnect (window menu > Settings, default on): while any terminal window * is open, a dropped control connection reconnects with exponential backoff; * the first session list after reconnect delivers bells that rang while * disconnected (attention + wake) via their advanced lastBellAt. A dropped @@ -51,20 +51,31 @@ import { GESTURE_DOUBLE_CLICK, type InputEvent } from "../../ui/gestures"; import { G2MirrorClient, type G2MirrorClientOptions, type G2MirrorSession, type G2MirrorState } from "../../native/g2mirror-client"; import { onSettingsStoreChanged } from "../../native/settings-store"; import { clamp } from "../../util/numeric-util"; -import { terminalAutoReconnectSetting, terminalLaunchPresetsSetting, terminalNewConnectionSetting, terminalWakeOnBellSetting } from "../../ui/dashboard-settings"; +import { + enumSettingMenuItem, + terminalAutoReconnectSetting, + terminalDisplayModeSetting, + terminalLaunchPresetsSetting, + terminalNewConnectionSetting, + terminalVerticalPositionSetting, + terminalWakeOnBellSetting, + textSettingMenuItem, + toggleSettingMenuItem, +} from "../../ui/dashboard-settings"; +import { terminalFontPickerMenuItem } from "../../ui/font-picker"; import { connectionDisplayName, loadConnections, parseConnectionString, saveConnections, TERMINAL_CONNECTIONS_KEY, updateConnection, type TerminalConnection } from "./connections"; import { TerminalEmulator } from "./terminal-emulator"; -import { type MenuItem } from "../../ui/menu"; +import { drawSubmenuIndicator, type MenuItem } from "../../ui/menu"; import { Menu, type MenuDrawArgs } from "../../ui/menu-core"; -import { lineStep, listRowHeight } from "../../ui/metrics"; -import { WindowMenu } from "../../ui/window-menu"; +import { LIST_ROW_TEXT_INSET, lineStep, listRowHeight } from "../../ui/metrics"; +import { WindowMenu, WindowMenuLayer } from "../../ui/window-menu"; import { appViewportSize } from "../../ui/shell/geometry"; import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window"; import type { ToolResult, ToolSpec } from "../../assistant/tool-registry"; declare const global: any; -// Cell geometry comes from the terminal font setting (Settings > Terminal > +// Cell geometry comes from the terminal font setting (window menu > Settings > // Font; the default is Terminus-12's 6x12). Each window derives its grid from // the viewport in its open-window message (the hub is min-height, session // views full-height). Grid dimensions are baked into each session's websocket @@ -92,6 +103,8 @@ const RECONNECT_MAX_DELAY_MS = 60_000; // Storage key of terminalNewConnectionSetting (the Add-connection draft the // phone text editor types into); its changes just repaint the add screen. const NEW_CONNECTION_DRAFT_KEY = "terminal.newConnectionDraft"; +// Storage key of terminalLaunchPresetsSetting, edited from the window menu. +const LAUNCH_PRESETS_KEY = "terminal.launchPresets"; type BaseWindow = { windowId: string; @@ -434,8 +447,7 @@ global.onmessage = (event: { data: WorkerAppMessage }) => { }; // React to setting changes (connections edited here or in another isolate, -// toggles edited in the Settings app, the Add-connection draft typed on the -// phone). +// the window menu's settings, the Add-connection draft typed on the phone). onSettingsStoreChanged((key) => { if (key.startsWith("glanceboard.")) { reportIdle(); @@ -462,8 +474,17 @@ onSettingsStoreChanged((key) => { } } return; + case LAUNCH_PRESETS_KEY: + // Live keystrokes from the phone editor (Settings > Launch presets in + // the window menu): repaint its edit page, and the hub, whose host + // headings launch presets. + for (const window of windows.values()) { + if (window.menu?.isOpen()) scheduleRender(window); + } + renderHubWindows(); + return; default: - // launchPresets, wakeOnBell: no connection impact. + // wakeOnBell: no connection impact. return; } }); @@ -539,6 +560,8 @@ function closeWindow(windowId: string): void { // Window closed mid-add: shut the phone editor down. endAddConnection(window); } + // Likewise for a setting being edited from the window menu. + window.menu?.close(); windows.delete(windowId); windowIconActivity.delete(windowId); updateHubAnimation(); @@ -1032,8 +1055,12 @@ function windowMenuItems(window: TerminalWindow): MenuItem[] { { label: "Settings", onSelect: (ctx) => { - ctx.stack.pop(); - post({ type: "open-settings", section: "Terminal" }); + ctx.stack.push(new WindowMenuLayer("Terminal settings", settingsMenuItems())); + }, + render: ({ image, x, y, width, height, text }) => { + const font = chromeFont(); + image.drawText(font, x, y + LIST_ROW_TEXT_INSET, text, 200); + drawSubmenuIndicator(image, font, x - 10, y, width + 20, height, 150); }, }, ]; @@ -1089,6 +1116,22 @@ function windowMenuItems(window: TerminalWindow): MenuItem[] { return items; } +/** + * The app's settings (the window menu's Settings submenu). Connections are + * managed in the hub's Manage Connections section instead. + */ +function settingsMenuItems(): MenuItem[] { + return [ + enumSettingMenuItem(terminalDisplayModeSetting), + enumSettingMenuItem(terminalVerticalPositionSetting), + terminalFontPickerMenuItem(), + // Opens the phone text editor; the settings listener repaints its page. + textSettingMenuItem(terminalLaunchPresetsSetting), + toggleSettingMenuItem(terminalAutoReconnectSetting), + toggleSettingMenuItem(terminalWakeOnBellSetting), + ]; +} + function handleInput(window: TerminalWindow, event: InputEvent, frameId: number): void { if (window.kind === "view") activeViewId = window.windowId; // An open window menu owns all input (it closes itself via pop). @@ -1565,7 +1608,7 @@ function openViewWindow(control: ControlConnection, socket: string, label: strin }); } -/** Preset names the user listed in Settings > Terminal (the wire protocol has no way to enumerate the server's). */ +/** Preset names the user listed in the app's settings (the wire protocol has no way to enumerate the server's). */ function launchPresetNames(): string[] { const names: string[] = []; for (const piece of terminalLaunchPresetsSetting.get().split(",")) { @@ -1874,7 +1917,7 @@ function handleTerminalTool(name: string, args: any): ToolResult | Promise Terminal > Launch presets)." }; + return { ok: true, content: "No launch presets configured (Terminal window menu > Settings > Launch presets)." }; } return { ok: true, content: presets.map((preset) => `- ${preset}`).join("\n") }; } diff --git a/app/ui/dashboard/settings-menus.ts b/app/ui/dashboard/settings-menus.ts index 6a24ee4c..5bf6b411 100644 --- a/app/ui/dashboard/settings-menus.ts +++ b/app/ui/dashboard/settings-menus.ts @@ -45,16 +45,9 @@ import { ringBatteryVisibilitySetting, watchBatteryVisibilitySetting, displayModeSetting, - navigateDisplayModeSetting, - navigateVerticalPositionSetting, - terminalDisplayModeSetting, - terminalVerticalPositionSetting, elevenLabsApiKeySetting, mapboxApiKeySetting, mirrorTouchSetting, - navigateHomeAddressSetting, - navigateRememberRecentSetting, - navigateWorkAddressSetting, openAiApiKeySetting, previewColorSetting, phoneRotationSetting, @@ -68,9 +61,6 @@ import { saveVoiceRecordingsSetting, showBleBandwidthSetting, suspendEvenHubWhenScreenOffSetting, - terminalAutoReconnectSetting, - terminalLaunchPresetsSetting, - terminalWakeOnBellSetting, textSettingMenuItem, timeFormatSetting, toggleSettingMenuItem, @@ -84,10 +74,9 @@ import { watchMirrorAssistantSetting, watchRemoteEnabledSetting, } from "../dashboard-settings"; -import { clearRecentDestinations } from "../../apps/navigate/destinations"; import { wearBridge } from "../../native/wear-bridge"; import { openSettingsSubMenu, SettingsPanelLayer, type SettingsSection } from "./settings-panel"; -import { terminalFontPickerMenuItem, uiFontPickerMenuItem } from "../font-picker"; +import { uiFontPickerMenuItem } from "../font-picker"; /** The Settings app's master-detail panel (sections on the left, contents on the right). */ export function createSettingsPanelLayer(): SettingsPanelLayer { @@ -114,6 +103,11 @@ function settingsSections(): SettingsSection[] { enumSettingMenuItem(verticalPositionSetting), // Band / tall / full-panel; the dashboard controller reflows windows. enumSettingMenuItem(displayModeSetting), + ], + }, + { + label: "Customization", + items: [ // Submenu: top-bar battery indicator style plus per-device visibility. batteryIndicatorsMenuItem(), // Submenu: toggles for menu/icon-grid motion and the screen on/off fade. @@ -161,35 +155,6 @@ function settingsSections(): SettingsSection[] { textSettingMenuItem(mapboxApiKeySetting), ], }, - { - label: "Terminal", - // Connections (g2mirror:// strings) are managed inside the Terminal - // app's Manage Connections section, not here. - items: [ - enumSettingMenuItem(terminalDisplayModeSetting), - enumSettingMenuItem(terminalVerticalPositionSetting), - terminalFontPickerMenuItem(), - textSettingMenuItem(terminalLaunchPresetsSetting), - toggleSettingMenuItem(terminalAutoReconnectSetting), - toggleSettingMenuItem(terminalWakeOnBellSetting), - ], - }, - { - label: "Navigate", - // Home/Work are plain addresses; other named destinations (and the - // recent list) are managed inside the Navigate app's context menu. - items: [ - enumSettingMenuItem(navigateDisplayModeSetting), - enumSettingMenuItem(navigateVerticalPositionSetting), - textSettingMenuItem(navigateHomeAddressSetting), - textSettingMenuItem(navigateWorkAddressSetting), - toggleSettingMenuItem(navigateRememberRecentSetting, { - onChange: (_ctx, enabled) => { - if (!enabled) clearRecentDestinations(); - }, - }), - ], - }, { label: "Phone display", // The phone app's mirror of the glasses screen and its controls @@ -284,7 +249,7 @@ function autoBrightnessMenuItem(): MenuItem { } /** - * The Display section's "Battery indicators" row: opens a modal submenu with + * The Customization section's "Battery indicators" row: opens a modal submenu with * the style (icon / percentage / stacked) and, per device, when its * indicator is visible. The row itself shows the current style. */ @@ -316,7 +281,7 @@ function batteryIndicatorsMenuItem(): MenuItem { }; } -/** The Display section's "Animations" row: opens a modal submenu of animation toggles. */ +/** The Customization section's "Animations" row: opens a modal submenu of animation toggles. */ function animationsMenuItem(): MenuItem { return { label: "Animations", diff --git a/app/ui/font-picker.ts b/app/ui/font-picker.ts index 4dc6679c..eda1c8f5 100644 --- a/app/ui/font-picker.ts +++ b/app/ui/font-picker.ts @@ -1,12 +1,13 @@ /** - * Modal font picker for the Settings app: choose a face (bitmap Terminus + * Modal font picker for font settings: choose a face (bitmap Terminus * variants or any installed TTF family), a weight (the family's installed * styles), and a pixel size, with a live preview line rendered in the draft * font. Selections only persist on Save; double-click cancels. * - * Used for the UI font (Display section), the terminal font (Terminal - * section, filtered to monospace faces), and per-app overrides of the UI font - * (UiFontOverride, which add an "inherit" face ahead of the others). + * Used for the UI font (Settings > Customization), the terminal font (the + * Terminal app's settings, filtered to monospace faces), and per-app + * overrides of the UI font (UiFontOverride, which add an "inherit" face + * ahead of the others). */ import { getFont } from "../graphics/bdffont"; import { GrayImage, type UiFont } from "../graphics/image"; diff --git a/app/ui/menu-animation-pref.ts b/app/ui/menu-animation-pref.ts index 40381fb2..9592211e 100644 --- a/app/ui/menu-animation-pref.ts +++ b/app/ui/menu-animation-pref.ts @@ -1,5 +1,5 @@ /** - * Whether menus and icon grids animate on the glasses (Settings > Display > + * Whether menus and icon grids animate on the glasses (Settings > Customization > * Animations > Menu animation). The motion classes can't read the settings * store themselves (it is native, and they load under Node in unit tests), * so ui/menu.ts installs a reader in each isolate that paints menus. Without diff --git a/app/ui/shell/chrome-layer.ts b/app/ui/shell/chrome-layer.ts index 8dbc8364..e192df9a 100644 --- a/app/ui/shell/chrome-layer.ts +++ b/app/ui/shell/chrome-layer.ts @@ -377,7 +377,7 @@ export class ShellChromeLayer implements Layer { * Labelled battery indicators for the phone, Wear OS watch, G2, and R1, * right-aligned in the top bar. The watch one exists only while a watch * running the Faceclaw watch app is reachable (no placeholder otherwise). - * The Settings > Display > Battery indicators submenu picks the style (label beside a gauge icon or percentage, or stacked above + * The Settings > Customization > Battery indicators submenu picks the style (label beside a gauge icon or percentage, or stacked above * either) and, per device, whether the indicator shows always, only below * 50%, or never. Returns the left edge of the battery block. */ diff --git a/app/ui/window-menu.ts b/app/ui/window-menu.ts index a06d4165..cb71474f 100644 --- a/app/ui/window-menu.ts +++ b/app/ui/window-menu.ts @@ -1,7 +1,7 @@ import { GrayImage } from "../graphics/image"; import { singlePlane, type Plane } from "../graphics/plane"; import { GESTURE_LONG_PRESS, GESTURE_SHORT_THEN_LONG_PRESS, gestureHints, type InputEvent } from "./gestures"; -import { type Layer, LayerStack, noopLayerActions } from "./layers"; +import { type Layer, type LayerActions, LayerStack, noopLayerActions } from "./layers"; import { CONTEXT_MENU_DIM, MenuLayer, type MenuItem, type MenuLayout } from "./menu"; import type { WorkerAppReply } from "./shell/worker-window"; @@ -69,10 +69,16 @@ export type WindowMenuOptions = { * content with the menu drawn over it and keeps the shell told about the * window's gesture bindings (whether it has a menu, whether it claims * long-press). + * + * Text-setting rows (textSettingMenuItem) work here too: the phone editor + * opens through the shell, and the app repaints the edit page as the setting + * changes. Call close() when the window closes so an open edit is ended. */ export class WindowMenu { private stack: LayerStack | null = null; private reported: { hasAppMenu: boolean; claimsLongPress: boolean } | null = null; + /** A text-setting row opened the phone editor and nothing has closed it yet. */ + private textEditOpen = false; constructor(private readonly options: WindowMenuOptions) {} @@ -105,11 +111,39 @@ export class WindowMenu { paint: () => this.options.paintBase(), handleInput: () => {}, }; - const stack = new LayerStack(base, { ...noopLayerActions }, this.options.size, this.options.isFocused); + const stack = new LayerStack(base, this.layerActions(), this.options.size, this.options.isFocused); stack.push(new WindowMenuLayer(title, items)); this.stack = stack; } + /** Close the menu outright (the window is closing), ending any phone edit. */ + close(): void { + this.stack?.clearToBase(); + this.stack = null; + this.endTextEdit(); + } + + /** + * No-ops apart from the phone text editor, which the shell owns: a worker + * can only ask for it by setting id. + */ + private layerActions(): LayerActions { + return { + ...noopLayerActions, + startTextSettingEdit: (setting) => { + this.textEditOpen = true; + this.options.post({ type: "start-text-setting-edit", settingId: setting.id }); + }, + endTextSettingEdit: () => this.endTextEdit(), + }; + } + + private endTextEdit(): void { + if (!this.textEditOpen) return; + this.textEditOpen = false; + this.options.post({ type: "end-text-setting-edit" }); + } + /** * Paint the window content with the menu over it. `content` paints the * closed-state content (default: paintBase alone), for windows whose @@ -142,8 +176,7 @@ export class WindowMenu { // The shell opened its system menu over this window; close ours so the // two context menus never stack. if (event.type === "system-menu-opened") { - stack.clearToBase(); - this.stack = null; + this.close(); return; } await stack.handleInput(event); From c451883836c86e780d6a02786912d35cbcc6a7db Mon Sep 17 00:00:00 2001 From: James Babcock Date: Wed, 30 Sep 2026 22:06:37 -0700 Subject: [PATCH 27/60] Version 0.8.1 --- CHANGELOG | 2 ++ app/version.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index d8ad76da..d71e108f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,8 @@ * Reduce phone CPU usage * Putting on the glasses auto-wakes the screen * Add a button to the phone screen top bar to open EvenHub app phone UI +* Glanceboard font can be configured separately from the main font +* Move Terminal and Navigate settings out of the Settings app and into their respective apps ### EvenHub diff --git a/app/version.ts b/app/version.ts index b4ab7c40..005d22ab 100644 --- a/app/version.ts +++ b/app/version.ts @@ -1,2 +1,2 @@ -export const FACECLAW_VERSION = "0.8.0"; +export const FACECLAW_VERSION = "0.8.1"; export const USER_AGENT = "Faceclaw/"+FACECLAW_VERSION; From 41929308c4c9ebdd9ea4b0449229b8b76972cf91 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Wed, 30 Sep 2026 22:12:42 -0700 Subject: [PATCH 28/60] Fix a failing unit test --- tests/microphones-protocol.test.cjs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/microphones-protocol.test.cjs b/tests/microphones-protocol.test.cjs index b85a5bcf..c9aeba4f 100644 --- a/tests/microphones-protocol.test.cjs +++ b/tests/microphones-protocol.test.cjs @@ -1,7 +1,7 @@ // Pins the mic_control wire codec against the firmware contract in g2flash's // patches/mic_control.c (microphone-configurations branch): field-103 control // records, the 21-byte field-104 status, and the 21-byte 'SM' stream header -// with concatenated (not interleaved) channel payloads. +// with interleaved PCM16 channel payloads. const test = require("node:test"); const assert = require("node:assert/strict"); @@ -13,7 +13,7 @@ const { encodeMicControl, decodeMicStatus, decodeMicStreamFrame, - splitConcatenatedPcm16, + splitInterleavedPcm16, defaultMicConfig, micEnabled, setMicEnabled, @@ -154,12 +154,13 @@ function buildSmFrame({ channels = 2, samplesPerChannel = 4, angle = -30, ssr = data[18] = ssr >> 8; data[19] = payLen & 0xff; data[20] = payLen >> 8; - // Channel blocks are CONCATENATED: channel 0 all-1000s, channel 1 all-(-2000)s. + // Channels are INTERLEAVED (ch0, ch1, ch0, ch1, ...): channel 0 all-1000s, + // channel 1 all-(-2000)s. for (let c = 0; c < channels; c++) { const value = c === 0 ? 1000 : -2000; const unsigned = value < 0 ? value + 0x10000 : value; for (let s = 0; s < samplesPerChannel; s++) { - const base = SM_HEADER_BYTES + c * samplesPerChannel * 2 + s * 2; + const base = SM_HEADER_BYTES + (s * channels + c) * 2; data[base] = unsigned & 0xff; data[base + 1] = unsigned >> 8; } @@ -182,9 +183,9 @@ test("SM frame decode: header fields and negative angle", () => { assert.equal(decodeMicStreamFrame(buildSmFrame({ truncated: true })).truncated, true); }); -test("SM payload splits as concatenated channel blocks", () => { +test("SM payload deinterleaves into per-channel samples", () => { const frame = decodeMicStreamFrame(buildSmFrame({ samplesPerChannel: 3 })); - const channels = splitConcatenatedPcm16(frame); + const channels = splitInterleavedPcm16(frame); assert.ok(channels); assert.equal(channels.length, 2); assert.equal(channels[0].length, 3); From 46fded856aee53d9c8afd84fe2a70994a10d3a94 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Wed, 30 Sep 2026 22:15:53 -0700 Subject: [PATCH 29/60] Add date for 0.8.1 to changelog --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index d71e108f..6b68dd24 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,6 @@ # Changelog -## 0.8.1 - Future +## 0.8.1 - 2026-09-30 ### Assorted Features and Bug Fixes From 8f99779f98227a27a126d943228d22851dca25b1 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Thu, 1 Oct 2026 02:40:13 -0700 Subject: [PATCH 30/60] Add an option to move the app switcher to the right or bottom, and adjust screen depth if bottom --- app/apps/compass/calibration-layer.ts | 2 +- app/apps/compass/compass-app.ts | 2 +- app/g2/dashboard-controller.ts | 62 ++- app/g2/ios-preview-controller.ts | 5 +- app/graphics/shell-scene.ts | 11 +- app/ui/dashboard-settings.ts | 72 ++- app/ui/dashboard/settings-menus.ts | 43 +- app/ui/dashboard/settings-panel.ts | 3 +- app/ui/shell/chrome-layer.ts | 432 ++++++++++++------ app/ui/shell/geometry.ts | 173 +++++-- app/ui/shell/shell.ts | 105 +++-- app/ui/shell/tool-debug-layer.ts | 13 +- .../faceclaw/app/g2protocol/DrawProtocol.kt | 21 + .../com/faceclaw/app/graphics/ShellScene.kt | 25 +- .../app/graphics/SurfaceCompositor.kt | 16 +- tests/ai-chat.test.cjs | 5 +- tests/app-layout.test.cjs | 74 ++- .../com/faceclaw/app/DisplayListTest.kt | 42 ++ .../com/faceclaw/app/FrameDisplayListTest.kt | 2 +- .../com/faceclaw/app/PreviewPackingTest.kt | 2 +- tests/menu-display-list.test.cjs | 3 +- 21 files changed, 827 insertions(+), 286 deletions(-) diff --git a/app/apps/compass/calibration-layer.ts b/app/apps/compass/calibration-layer.ts index 55acb41d..772fccef 100644 --- a/app/apps/compass/calibration-layer.ts +++ b/app/apps/compass/calibration-layer.ts @@ -80,7 +80,7 @@ export class CompassCalibrationLayer implements Layer { // The crosshair marks where the wearer is looking, so its horizontal // position must be the true centre of the display, not of the app - // viewport the sidebar has pushed to the right. Vertically it just sits in + // viewport a side strip has pushed off centre. Vertically it just sits in // the free space between the instructions and the readouts; the window // band's own placement on screen is the wearer's Display setting and // doesn't affect the heading being aimed. diff --git a/app/apps/compass/compass-app.ts b/app/apps/compass/compass-app.ts index 00e0c818..15beac96 100644 --- a/app/apps/compass/compass-app.ts +++ b/app/apps/compass/compass-app.ts @@ -161,7 +161,7 @@ class CompassLayer implements Layer { const readoutHeight = headingFont.lineHeight; // One column centred on the display's true centre, so the rose sits where - // the wearer is looking rather than 32px right of it. + // the wearer is looking rather than 32px beside it (with a side strip). const cx = screenCenterInViewportX(); // The rose is sized and placed first — it hangs off the bottom edge — and diff --git a/app/g2/dashboard-controller.ts b/app/g2/dashboard-controller.ts index b7abb99b..b8d9ae6f 100644 --- a/app/g2/dashboard-controller.ts +++ b/app/g2/dashboard-controller.ts @@ -68,10 +68,10 @@ import { ALL_APPS } from "../apps/all-apps"; import { type AppContext, type AppDefinition, type AppLaunchParams, type TextEditorHost } from "../apps/app-definition"; import { type InProcessAppOptions, type InProcessWindow } from "../ui/shell/in-process-window"; import { loadPersistedOpenApps, savePersistedOpenApps } from "../ui/shell/open-apps-persistence"; -import { appViewportRect, SIDEBAR_WIDTH, sidebarStripVisible, type WindowHeightMode } from "../ui/shell/geometry"; +import { appViewportRect, isOnSwitcherEdge, sidebarStripVisible, type WindowHeightMode } from "../ui/shell/geometry"; import { type LayerActions, type TextSettingsEditToggle } from "../ui/layers"; import { type KeyboardInputSession } from "../ui/shell/keyboard-input"; -import { assistantAllowProactiveSetting, assistantBackendSetting, assistantBridgeHostSetting, assistantBridgePortSetting, assistantBridgeTokenSetting, getBrightnessPreferences, displayModeSetting, navigateDisplayModeSetting, navigateVerticalPositionSetting, terminalDisplayModeSetting, terminalVerticalPositionSetting, elevenLabsApiKeySetting, getStringSettingById, openAiApiKeySetting, nightscoutApiTokenSetting, firmwareDebugFlagsSetting, lockScreenEnabledSetting, nightscoutSiteUrlSetting, onAnySettingChanged, previewColorSetting, ringConnectionModeSetting, saveVoiceRecordingsSetting, sonioxApiKeySetting, screenTimeoutSetting, screenTimeoutSettingToMs, suspendEvenHubWhenScreenOffSetting, verticalPositionSetting, voiceProviderSetting, wakeWordActionSetting, type ConfigSettingString } from "../ui/dashboard-settings"; +import { appSwitcherPositionSetting, assistantAllowProactiveSetting, assistantBackendSetting, assistantBridgeHostSetting, assistantBridgePortSetting, assistantBridgeTokenSetting, getBrightnessPreferences, displayModeSetting, navigateDisplayModeSetting, navigateVerticalPositionSetting, terminalDisplayModeSetting, terminalVerticalPositionSetting, elevenLabsApiKeySetting, getStringSettingById, openAiApiKeySetting, nightscoutApiTokenSetting, firmwareDebugFlagsSetting, lockScreenEnabledSetting, nightscoutSiteUrlSetting, onAnySettingChanged, previewColorSetting, ringConnectionModeSetting, saveVoiceRecordingsSetting, sonioxApiKeySetting, screenTimeoutSetting, screenTimeoutSettingToMs, suspendEvenHubWhenScreenOffSetting, verticalPositionSetting, voiceProviderSetting, wakeWordActionSetting, type ConfigSettingString } from "../ui/dashboard-settings"; import { isIgnoringBatteryOptimizations, requestIgnoreBatteryOptimizations } from "../native/battery-optimization"; import { getInstalledEvenHubAppById, @@ -181,6 +181,19 @@ const EVEN_APP_DETECTED_MESSAGE = // The launcher grid's app list; also fixes the app ids apps.launch accepts. const LAUNCHABLE_APPS = ALL_APPS.filter((app) => app.showInLauncher !== false); +/** + * The global settings window viewport sizes depend on: the display mode, and + * whether the app switcher takes width beside windows or height below them. + */ +function viewportSizesKey(): string { + return `${displayModeSetting.get()}|${appSwitcherPositionSetting.get() === "bottom" ? "row" : "strip"}`; +} + +/** The global settings that move window surfaces without resizing them. */ +function windowPlacementKey(): string { + return `${verticalPositionSetting.get()}|${appSwitcherPositionSetting.get()}`; +} + function createInitialDisplayPreview(): ImageSource | null { return grayImageToPreviewSource(new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0)); } @@ -427,8 +440,10 @@ class DashboardController { this.pushFirmwareDebugFlags(); this.pushBrightness(); this.syncEvenHubScreenOffSetting(); - this.applyVerticalPositionIfChanged(); + // Display mode first: a reflow repositions every surface too, so the + // vertical-position check after it then has nothing left to do. this.applyDisplayModeIfChanged(); + this.applyVerticalPositionIfChanged(); this.applyAppLayoutsIfChanged(); this.syncAssistantBridgeIfChanged(); this.syncLockScreenSettingIfChanged(); @@ -506,24 +521,28 @@ class DashboardController { }); } - // Vertical-position changes move every window surface (and the chrome that - // aligns with them); the value is tracked so unrelated setting changes - // don't trigger a full reposition. - private lastVerticalPosition = verticalPositionSetting.get(); + // Vertical-position changes (and moving the app switcher between the left + // and right edges) move every window surface and the chrome that aligns + // with them; the values are tracked so unrelated setting changes don't + // trigger a full reposition. + private lastWindowPlacement = windowPlacementKey(); - private lastDisplayMode = displayModeSetting.get(); + private lastViewportSizes = viewportSizesKey(); /** - * Display mode changed (Settings > Display, or the phone page's picker): - * every window's viewport size changes. In-process windows re-measure in - * place; workers that support resizing receive the new viewport. Other - * worker windows are closed and launched again at the new size. + * Display mode changed (Settings > Display, or the phone page's picker), + * or the app switcher moved to or from the bottom edge: every window's + * viewport size changes. In-process windows re-measure in place; workers + * that support resizing receive the new viewport. Other worker windows are + * closed and launched again at the new size. */ private applyDisplayModeIfChanged(): void { - const mode = displayModeSetting.get(); - if (mode === this.lastDisplayMode) return; - this.lastDisplayMode = mode; - this.appendLog(`display mode: ${mode}`); + const sizes = viewportSizesKey(); + if (sizes === this.lastViewportSizes) return; + this.lastViewportSizes = sizes; + // The reflow below reconfigures every surface, covering any move too. + this.lastWindowPlacement = windowPlacementKey(); + this.appendLog(`display layout: ${sizes}`); const foregroundWindowId = shell.foregroundWindow()?.windowId; void (async () => { const relaunch: string[] = []; @@ -579,9 +598,9 @@ class DashboardController { } private applyVerticalPositionIfChanged(): void { - const position = verticalPositionSetting.get(); - if (position === this.lastVerticalPosition) return; - this.lastVerticalPosition = position; + const placement = windowPlacementKey(); + if (placement === this.lastWindowPlacement) return; + this.lastWindowPlacement = placement; void (async () => { for (const window of shell.getWindows()) { await this.configureWindowSurface( @@ -1925,9 +1944,10 @@ class DashboardController { } const x = Math.round(Math.min(1, Math.max(0, nx)) * G2_LENS_WIDTH); const y = Math.round(Math.min(1, Math.max(0, ny)) * G2_LENS_HEIGHT); - const stripShown = sidebarStripVisible(shell.getFocus(), shell.foregroundWindow()?.appId); + const foreground = shell.foregroundWindow(); + const stripShown = sidebarStripVisible(shell.getFocus(), foreground?.appId); this.appendLog(`mirror tap at ${x},${y}`); - if (!shell.hasOverlay() && stripShown && x < SIDEBAR_WIDTH) { + if (!shell.hasOverlay() && stripShown && isOnSwitcherEdge(x, y, foreground?.heightMode ?? "min", foreground?.appId)) { const target = shell.windowAtSidebarPoint(x, y); if (target) { this.appendLog(`mirror tap: sidebar -> ${target.title}`); diff --git a/app/g2/ios-preview-controller.ts b/app/g2/ios-preview-controller.ts index a0da264f..1d4bf056 100644 --- a/app/g2/ios-preview-controller.ts +++ b/app/g2/ios-preview-controller.ts @@ -39,7 +39,7 @@ import { makeInputEvent, type InputEvent, type InputEventPayload } from '../ui/g import { noopLayerActions, type LayerActions } from '../ui/layers' import { TextViewerLayer } from '../apps/files/text-viewer' import { shell, rawInputEventToInputEvent, type ShellWindow } from '../ui/shell/shell' -import { appViewportRect, SIDEBAR_WIDTH, sidebarStripVisible } from '../ui/shell/geometry' +import { appViewportRect, isOnSwitcherEdge, sidebarStripVisible } from '../ui/shell/geometry' import { DISPLAY_MODE_VALUES, displayModeLabel, displayModeSetting, onAnySettingChanged, previewColorSetting, lockScreenEnabledSetting, getBrightnessPreferences, getStringSettingById, nightscoutSiteUrlSetting, nightscoutApiTokenSetting } from '../ui/dashboard-settings' @@ -531,7 +531,8 @@ export class IosPreviewController { const x = Math.max(0, Math.min(639, Math.floor(nx * 640))) const y = Math.max(0, Math.min(479, Math.floor(ny * 480))) const window = shell.foregroundWindow() - if (!shell.hasOverlay() && sidebarStripVisible(shell.getFocus(), window?.appId) && x < SIDEBAR_WIDTH) { + if (!shell.hasOverlay() && sidebarStripVisible(shell.getFocus(), window?.appId) + && isOnSwitcherEdge(x, y, window?.heightMode ?? 'min', window?.appId)) { const target = shell.windowAtSidebarPoint(x, y) if (target) { shell.focusWindow(target.windowId); target.requestRender(); this.requestShellRender() } return diff --git a/app/graphics/shell-scene.ts b/app/graphics/shell-scene.ts index 640ca5f5..06207366 100644 --- a/app/graphics/shell-scene.ts +++ b/app/graphics/shell-scene.ts @@ -10,8 +10,12 @@ export function shellCrop(image: GrayImage, x: number, y: number, width: number, return { image: crop, x, y, shellKey: key } } -/** Shared Kotlin receives original 8-bit pixels and quantizes once, before composing. */ -export function encodeShellScene(planes: readonly Plane[]): Uint8Array { +/** + * Shared Kotlin receives original 8-bit pixels and quantizes once, before + * composing. `screenDepth` is the whole display's stereo depth (geometry.ts + * uiDepth), trailing the layers. + */ +export function encodeShellScene(planes: readonly Plane[], screenDepth = 0): Uint8Array { const layers: { image: GrayImage; x: number; y: number; key: number; depth: number; dim: number; selections: Uint8Array[] }[] = [] for (const plane of planes) { const image = plane.image.withDrawsBaked(false) @@ -30,10 +34,11 @@ export function encodeShellScene(planes: readonly Plane[]): Uint8Array { presentation: { ...d.presentation!, depth: d.presentation!.depth + (plane.depth ?? 0) } })) layers.push({ depth: plane.depth ?? 0, selections, image: cropped.image, x: plane.x + left, y: plane.y + top, key: plane.shellKey!, dim: Math.round((plane.dimUnderneath ?? 1) * 256) }) } - const result = new Uint8Array(2 + layers.reduce((n, l) => n + 16 + l.image.pixels.length + l.selections.reduce((sum, b) => sum + b.length, 0), 0)) + const result = new Uint8Array(4 + layers.reduce((n, l) => n + 16 + l.image.pixels.length + l.selections.reduce((sum, b) => sum + b.length, 0), 0)) const view = new DataView(result.buffer); let p = 0 const word = (n: number) => { view.setUint16(p, n, true); p += 2 } word(layers.length) for (const l of layers) { word(l.key); word(l.x); word(l.y); word(l.image.width); word(l.image.height); word(l.dim); word(l.selections.length); word(l.depth); result.set(l.image.pixels, p); p += l.image.pixels.length; for (const selection of l.selections) { result.set(selection, p); p += selection.length } } + word(screenDepth) return result } diff --git a/app/ui/dashboard-settings.ts b/app/ui/dashboard-settings.ts index 8ae9c943..c07f7b41 100644 --- a/app/ui/dashboard-settings.ts +++ b/app/ui/dashboard-settings.ts @@ -308,19 +308,32 @@ export const timeFormatSetting = new ConfigSettingEnum({ * How much of the 640x480 panel the UI uses. "576x288" is the stock band * (sidebar + a 288px-tall window at the vertical position); "576x480" keeps * the sidebar and gives every window the full height; "640x480" is the whole - * panel, with the sidebar an overlay that shows only while it has focus. + * panel, with the sidebar an overlay that shows only while it has focus. The + * values name the sizes beside a side strip; with the app switcher along the + * bottom, the tall height loses the switcher row (displayModeLabel shows the + * actual size). */ export const DISPLAY_MODE_VALUES = ["576x288", "576x480", "640x480"] as const; export type DisplayModeSetting = (typeof DISPLAY_MODE_VALUES)[number]; -const DISPLAY_MODE_LABELS: Record = { - "576x288": "Band · 576×288", - "576x480": "Tall · 576×480", - "640x480": "Full panel · 640×480", +const DISPLAY_MODE_NAMES: Record = { + "576x288": "Band", + "576x480": "Tall", + "640x480": "Full panel", +}; + +/** Window size per mode with the app switcher along the bottom (see geometry.ts). */ +const BOTTOM_SWITCHER_SIZES: Record = { + "576x288": "576×288", + "576x480": "576×444", + "640x480": "640×480", }; export function displayModeLabel(value: DisplayModeSetting): string { - return DISPLAY_MODE_LABELS[value] ?? value; + const name = DISPLAY_MODE_NAMES[value]; + if (!name) return value; + const size = appSwitcherPositionSetting.get() === "bottom" ? BOTTOM_SWITCHER_SIZES[value] : value.replace("x", "×"); + return `${name} · ${size}`; } export const displayModeSetting = new ConfigSettingEnum({ @@ -331,7 +344,52 @@ export const displayModeSetting = new ConfigSettingEnum({ values: DISPLAY_MODE_VALUES, formatValue: displayModeLabel, description: - "Band: the stock 576×288 window beside the sidebar. Tall: the sidebar plus full-height windows. Full panel: the whole 640×480 display; the sidebar overlays the app only while you are in it. Open apps reopen in the new size.", + "Band: the stock 288px-tall window beside the app switcher. Tall: the app switcher plus full-height windows. Full panel: the whole 640×480 display; the app switcher overlays the app only while you are in it. Open apps reopen in the new size.", +}); + +/** Which edge of the display the app switcher (the strip of open-window icons) sits on. */ +export type AppSwitcherPosition = "left" | "right" | "bottom"; + +const APP_SWITCHER_POSITION_LABELS: Record = { + left: "Left", + right: "Right", + bottom: "Bottom", +}; + +export const appSwitcherPositionSetting = new ConfigSettingEnum({ + id: "app-switcher-position", + label: "App switcher position", + storageKey: "display.appSwitcherPosition", + defaultValue: "left", + values: ["left", "right", "bottom"], + formatValue: (value) => APP_SWITCHER_POSITION_LABELS[value] ?? value, + description: + "Which edge of the display the strip of open-app icons sits on. Left and right take a column beside windows; bottom puts a row beneath the window, which leaves room at the sides to set the display's depth, and makes full-height windows a little shorter. Moving it to or from the bottom reopens open apps in the new size.", +}); + +const UI_DEPTH_VALUES = ["-64", "-48", "-32", "-16", "0", "16", "32", "48", "64"] as const; +export type UiDepth = (typeof UI_DEPTH_VALUES)[number]; + +/** + * Stereo depth of the whole display, in the firmware's depth units: the + * lenses shift everything by half this many pixels each, in opposite + * directions. Only applies with the app switcher at the bottom, where the + * windows' 576px width leaves 32px at each side to shift into (see + * geometry.ts uiDepth); values stay even so the per-lens halves of nested + * depths add exactly. + */ +export const uiDepthSetting = new ConfigSettingEnum({ + id: "ui-depth", + label: "Depth", + storageKey: "display.uiDepth", + defaultValue: "0", + values: UI_DEPTH_VALUES, + formatValue: (value) => { + const depth = Number(value); + return depth === 0 ? "0" : depth > 0 ? `+${depth} (nearer)` : `${depth} (farther)`; + }, + description: + "Moves the whole display nearer (positive) or farther away (negative) by shifting it in opposite directions on the two lenses. Available with the app switcher at the bottom. Full-panel windows lose a sliver at the edges.", }); export const brightnessSetting = new ConfigSettingEnum({ diff --git a/app/ui/dashboard/settings-menus.ts b/app/ui/dashboard/settings-menus.ts index 5bf6b411..7aa6564c 100644 --- a/app/ui/dashboard/settings-menus.ts +++ b/app/ui/dashboard/settings-menus.ts @@ -28,6 +28,8 @@ import { drawRightValueMenuItem, openModalMenu, type MenuItem } from "../menu"; import { shell } from "../shell/shell"; import { anthropicApiKeySetting, + appSwitcherPositionSetting, + uiDepthSetting, assistantAllowProactiveSetting, assistantBackendSetting, assistantBridgeHostSetting, @@ -84,6 +86,7 @@ export function createSettingsPanelLayer(): SettingsPanelLayer { } function settingsSections(): SettingsSection[] { + const customizationItems = customizationRows(); const sections: SettingsSection[] = [ { label: "Display", @@ -107,16 +110,11 @@ function settingsSections(): SettingsSection[] { }, { label: "Customization", - items: [ - // Submenu: top-bar battery indicator style plus per-device visibility. - batteryIndicatorsMenuItem(), - // Submenu: toggles for menu/icon-grid motion and the screen on/off fade. - animationsMenuItem(), - // Controls the top-bar clock (24-hour vs 12-hour). - enumSettingMenuItem(timeFormatSetting), - // Opens the modal font picker (face, weight, size) for UI text. - uiFontPickerMenuItem(), - ], + // Depth only applies (and only shows) with the app switcher at the + // bottom; the panel re-reads the rows each paint. + get items() { + return customizationItems(); + }, }, { label: "Voice", @@ -234,6 +232,31 @@ function settingsSections(): SettingsSection[] { }); } +/** + * The Customization rows, as a function of the current settings: the same + * array while the switcher position stays put, so the panel's menu sees a + * stable list between paints. + */ +function customizationRows(): () => MenuItem[] { + // Left / right / bottom edge; the dashboard controller moves (or, to and + // from the bottom, resizes) windows on change. + const position = enumSettingMenuItem(appSwitcherPositionSetting); + // The whole display's stereo depth; the shell sends it with its scene. + const depth = enumSettingMenuItem(uiDepthSetting); + const rest = [ + // Submenu: top-bar battery indicator style plus per-device visibility. + batteryIndicatorsMenuItem(), + // Submenu: toggles for menu/icon-grid motion and the screen on/off fade. + animationsMenuItem(), + // Controls the top-bar clock (24-hour vs 12-hour). + enumSettingMenuItem(timeFormatSetting), + // Opens the modal font picker (face, weight, size) for UI text. + uiFontPickerMenuItem(), + ]; + const withDepth = [position, depth, ...rest], withoutDepth = [position, ...rest]; + return () => appSwitcherPositionSetting.get() === "bottom" ? withDepth : withoutDepth; +} + function autoBrightnessMenuItem(): MenuItem { return { label: "Auto-brightness", diff --git a/app/ui/dashboard/settings-panel.ts b/app/ui/dashboard/settings-panel.ts index 1dd957df..687c3f97 100644 --- a/app/ui/dashboard/settings-panel.ts +++ b/app/ui/dashboard/settings-panel.ts @@ -10,7 +10,8 @@ import { shell } from "../shell/shell"; /** * One left-column entry. `items` are the right-column rows (reusing the shared - * MenuItem builders). `renderDetail`, when set, draws custom informational + * MenuItem builders); it may be a getter for rows that come and go with other + * settings, since the panel re-reads it on every paint. `renderDetail`, when set, draws custom informational * content (e.g. About) at the top of the pane and returns the pixel height it * consumed; the row list renders below it. Returning nothing claims the whole * pane (an info-only section). diff --git a/app/ui/shell/chrome-layer.ts b/app/ui/shell/chrome-layer.ts index e192df9a..30a644a3 100644 --- a/app/ui/shell/chrome-layer.ts +++ b/app/ui/shell/chrome-layer.ts @@ -16,6 +16,7 @@ import { phoneBatteryVisibilitySetting, ringBatteryVisibilitySetting, watchBatteryVisibilitySetting, + type AppSwitcherPosition, type BatteryIndicatorVisibility, } from "../dashboard-settings"; import { formatClockDate, formatClockTime } from "../clock-format"; @@ -24,34 +25,43 @@ import { Layer, LayerStack } from "../layers"; import { scrollToKeepSelectionVisible } from "../menu"; import { lineStep } from "../metrics"; import { + appViewportRect, MIN_WINDOW_HEIGHT, minWindowTop, SHELL_OPAQUE_BLACK, SIDEBAR_WIDTH, sidebarStripVisible, + SWITCHER_ROW_HEIGHT, + switcherPosition, + switcherRect, TOP_BAR_HEIGHT, windowTop, type WindowHeightMode, } from "./geometry"; /** - * Sidebar icon layout comes in two variants. Few enough windows for a single - * column keeps the roomy 36px slots (32px icons) right-aligned against the - * separator; past one column's worth it switches to two 32px slots (28px - * icons) that exactly fill the 64px sidebar. In the two-column variant the - * right column (against the app area) fills first and windows past that - * overflow into the left column, so the common case keeps every icon next to - * the content it belongs to. + * Sidebar icon layout (the app switcher on the left or right edge) comes in + * two variants. Few enough windows for a single column keeps the roomy 36px + * slots (32px icons) aligned against the separator; past one column's worth + * it switches to two 32px slots (28px icons) that exactly fill the 64px + * sidebar. In the two-column variant the column against the app area fills + * first and windows past that overflow into the outer column, so the common + * case keeps every icon next to the content it belongs to. A bottom row + * always uses the roomy slots, laid out left to right. */ type SidebarVariant = { columns: number; columnWidth: number; iconSize: number }; const ONE_COLUMN: SidebarVariant = { columns: 1, columnWidth: 36, iconSize: 32 }; const TWO_COLUMN: SidebarVariant = { columns: 2, columnWidth: 32, iconSize: 28 }; const ICON_SPACING = 8; -/** Icon list top/bottom margins within the sidebar band, below the top bar. */ +/** Icon list top/bottom margins within the sidebar band, below the top bar (and a bottom row's end margins). */ const LIST_MARGIN = 10; const LIST_HEIGHT = MIN_WINDOW_HEIGHT - TOP_BAR_HEIGHT - 2 * LIST_MARGIN; +/** Bottom-row icons: one tall tab's worth of row, the icon inset 2px all round. */ +const ROW_ICON_SIZE = SWITCHER_ROW_HEIGHT - 4; +const ROW_STEP = ROW_ICON_SIZE + ICON_SPACING; + /** Icon rows that fit in one sidebar column. */ function rowsPerColumn(variant: SidebarVariant): number { return Math.max(1, ((LIST_HEIGHT + ICON_SPACING) / (variant.iconSize + ICON_SPACING)) | 0); @@ -61,23 +71,14 @@ function sidebarVariant(windowCount: number): SidebarVariant { return windowCount > rowsPerColumn(ONE_COLUMN) ? TWO_COLUMN : ONE_COLUMN; } -/** Left x of a sidebar column; columns pack rightward against the separator. */ -function columnLeft(variant: SidebarVariant, column: number): number { - return SIDEBAR_WIDTH - (variant.columns - column) * variant.columnWidth; -} - /** - * Column and top y of a visible sidebar slot; `position` counts from the - * first visible (scrolled-to) icon. Slots fill the rightmost column top to - * bottom, then overflow leftward. The single source of slot geometry for - * both drawing and hit testing. + * Left x of a sidebar column. Column 0 sits against the separator (the + * strip's inner edge, toward the app area); further columns pack outward. */ -function slotPosition(variant: SidebarVariant, listTop: number, position: number): { column: number; y: number } { - const rows = rowsPerColumn(variant); - return { - column: variant.columns - 1 - ((position / rows) | 0), - y: listTop + (position % rows) * (variant.iconSize + ICON_SPACING), - }; +function columnLeft(variant: SidebarVariant, column: number, position: AppSwitcherPosition): number { + return position === "right" + ? G2_LENS_WIDTH - SIDEBAR_WIDTH + column * variant.columnWidth + : SIDEBAR_WIDTH - (column + 1) * variant.columnWidth; } /** Top y of the sidebar's icon list (below the band's top bar). */ @@ -86,12 +87,88 @@ function sidebarListTop(appId?: string): number { } /** - * Left edge of the sidebar region that actually holds icons: the one-column - * variant leaves a dead strip left of its single right-aligned column. - * Screenshot cropping uses this to trim the unused part. + * One visible switcher icon's selection cell: the 2px-margined box around + * the icon that a selection tab or box fills. `atSeparator` is whether the + * cell touches the separator, so the selection can divert it (a tab) rather + * than sit apart from it (a box, for sidebar overflow-column icons). */ -export function sidebarContentLeft(windowCount: number): number { - return columnLeft(sidebarVariant(windowCount), 0); +type SwitcherCell = { x: number; y: number; width: number; height: number; atSeparator: boolean }; + +type SwitcherLayout = { + position: AppSwitcherPosition; + iconSize: number; + /** How many icons fit at once; the list scrolls to keep the selection among them. */ + visibleCount: number; + /** + * Cell of the icon `slot` places past the first visible (scrolled-to) one. + * The single source of slot geometry for both drawing and hit testing. + */ + cell: (slot: number) => SwitcherCell; +}; + +/** Switcher geometry for the foreground window (a bottom row sits under it). */ +function switcherLayout(windowCount: number, heightMode: WindowHeightMode, appId?: string): SwitcherLayout { + const position = switcherPosition(); + if (position === "bottom") { + const row = switcherRect(heightMode, appId); + return { + position, + iconSize: ROW_ICON_SIZE, + visibleCount: Math.max(1, ((row.width - 2 * LIST_MARGIN + ICON_SPACING) / ROW_STEP) | 0), + cell: (slot) => ({ + x: row.x + LIST_MARGIN - 2 + slot * ROW_STEP, y: row.y, width: ROW_ICON_SIZE + 4, height: SWITCHER_ROW_HEIGHT, + atSeparator: true, + }), + }; + } + // Slots fill the column against the separator top to bottom, then + // overflow outward. + const variant = sidebarVariant(windowCount); + const rows = rowsPerColumn(variant); + const listTop = sidebarListTop(appId); + return { + position, + iconSize: variant.iconSize, + visibleCount: rows * variant.columns, + cell: (slot) => { + const column = (slot / rows) | 0; + return { + x: columnLeft(variant, column, position), + y: listTop + (slot % rows) * (variant.iconSize + ICON_SPACING) - 2, + width: variant.columnWidth, + height: variant.iconSize + 4, + atSeparator: column === 0, + }; + }, + }; +} + +/** + * Horizontal extent of the sidebar region that actually holds icons: the + * one-column variant leaves a dead strip on the outer side of its single + * column. Screenshot cropping uses this to trim the unused part. + */ +export function sidebarContentSpan(windowCount: number): { left: number; right: number } { + const variant = sidebarVariant(windowCount); + const width = variant.columns * variant.columnWidth; + return switcherPosition() === "right" + ? { left: G2_LENS_WIDTH - SIDEBAR_WIDTH, right: G2_LENS_WIDTH - SIDEBAR_WIDTH + width } + : { left: SIDEBAR_WIDTH - width, right: SIDEBAR_WIDTH }; +} + +/** + * Horizontal extent of the top bar: the foreground window's, short of a side + * strip overlaid on it (full-panel mode, sidebar focused). + */ +function topBarSpan(state: ShellChromeState): { left: number; right: number } { + const viewport = appViewportRect(state.foregroundHeightMode, state.foregroundAppId); + let left = viewport.x, right = viewport.x + viewport.width; + if (sidebarStripVisible(state.focus, state.foregroundAppId)) { + const position = switcherPosition(); + if (position === "left") left = Math.max(left, SIDEBAR_WIDTH); + if (position === "right") right = Math.min(right, G2_LENS_WIDTH - SIDEBAR_WIDTH); + } + return { left, right }; } const NOTIFICATION_ICON_SIZE = 24; const BORDER_VALUE = 40; @@ -195,12 +272,12 @@ export function makeImageWindowIcon( } /** - * Base layer of the shell surface: the window sidebar on the left and the - * status top bar. Everything not explicitly painted stays 0 (transparent on - * the color-key shell surface), so the app viewport shows through. + * Base layer of the shell surface: the window sidebar (or bottom row) and + * the status top bar. Everything not explicitly painted stays 0 (transparent + * on the color-key shell surface), so the app viewport shows through. */ export class ShellChromeLayer implements Layer { - // First sidebar row shown; adjusted each paint to keep the selection visible. + // First switcher icon shown; adjusted each paint to keep the selection visible. private scrollRow = 0; constructor(private readonly getState: () => ShellChromeState) {} @@ -214,7 +291,7 @@ export class ShellChromeLayer implements Layer { this.drawSidebar(image, state); } this.drawTopBar(image, state); - drawAmbientCards(image); + drawAmbientCards(image, topBarSpan(state).right); return image; } @@ -223,13 +300,14 @@ export class ShellChromeLayer implements Layer { if (sidebarStripVisible(state.focus, state.foregroundAppId)) { const canvas = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); this.drawSidebar(canvas, state); - parts.push(shellCrop(canvas, 0, minWindowTop(state.foregroundAppId), SIDEBAR_WIDTH, MIN_WINDOW_HEIGHT, 1)); + const strip = switcherRect(state.foregroundHeightMode, state.foregroundAppId); + parts.push(shellCrop(canvas, strip.x, strip.y, strip.width, strip.height, 1)); } const canvas = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); this.drawTopBar(canvas, state); - const left = sidebarStripVisible(state.focus, state.foregroundAppId) ? SIDEBAR_WIDTH : 0; - parts.push({ ...shellCrop(canvas, left, windowTop(state.foregroundHeightMode, state.foregroundAppId), G2_LENS_WIDTH-left, TOP_BAR_HEIGHT, 2), depth: -2 }); - drawAmbientCards(canvas, parts); + const bar = topBarSpan(state); + parts.push({ ...shellCrop(canvas, bar.left, windowTop(state.foregroundHeightMode, state.foregroundAppId), bar.right - bar.left, TOP_BAR_HEIGHT, 2), depth: -2 }); + drawAmbientCards(canvas, bar.right, parts); return parts; } @@ -239,19 +317,18 @@ export class ShellChromeLayer implements Layer { } /** - * Which window's sidebar icon is under (x, y) on screen, if any — the same - * slot geometry drawSidebar uses, so a touch on the phone's mirror lands on - * the icon the mirror showed. + * Which window's switcher icon is under (x, y) on screen, if any — the + * same slot geometry drawSidebar uses, so a touch on the phone's mirror + * lands on the icon the mirror showed. */ windowIndexAt(x: number, y: number, windowCount: number): number | null { - if (x < 0 || x >= SIDEBAR_WIDTH || windowCount === 0) return null; - const variant = sidebarVariant(windowCount); - const listTop = sidebarListTop(this.getState().foregroundAppId); - const lastVisible = Math.min(windowCount, this.scrollRow + rowsPerColumn(variant) * variant.columns); + if (windowCount === 0) return null; + const state = this.getState(); + const layout = switcherLayout(windowCount, state.foregroundHeightMode, state.foregroundAppId); + const lastVisible = Math.min(windowCount, this.scrollRow + layout.visibleCount); for (let index = this.scrollRow; index < lastVisible; index++) { - const { column, y: slotY } = slotPosition(variant, listTop, index - this.scrollRow); - const left = columnLeft(variant, column); - if (x >= left && x < left + variant.columnWidth && y >= slotY - 2 && y < slotY + variant.iconSize + 2) { + const cell = layout.cell(index - this.scrollRow); + if (x >= cell.x && x < cell.x + cell.width && y >= cell.y && y < cell.y + cell.height) { return index; } } @@ -259,60 +336,48 @@ export class ShellChromeLayer implements Layer { } private drawSidebar(image: GrayImage, state: ShellChromeState): void { - // Align the sidebar with the app's preferred band. Legacy tall terminal - // sessions keep the sidebar at the global band position. - const bandTop = minWindowTop(state.foregroundAppId); - const bandBottom = bandTop + MIN_WINDOW_HEIGHT; - image.fillRect(0, bandTop, SIDEBAR_WIDTH, MIN_WINDOW_HEIGHT, SHELL_OPAQUE_BLACK); + // A side strip aligns with the app's preferred band (legacy tall + // terminal sessions keep it at the global band position); a bottom row + // sits under the foreground window. + const strip = switcherRect(state.foregroundHeightMode, state.foregroundAppId); + image.fillRect(strip.x, strip.y, strip.width, strip.height, SHELL_OPAQUE_BLACK); // Scroll the icon list to keep the selection visible; chevrons mark - // windows off-screen above/below. Icons fill the right column top to - // bottom, then overflow into the left one, so a visible slot's column is - // decided by its position within the scrolled window. + // windows off-screen before/after. Sidebar icons fill the column against + // the separator top to bottom, then overflow into the outer one, so a + // visible slot's column is decided by its position within the scrolled + // window. const count = state.windows.length; - const variant = sidebarVariant(count); - const iconSize = variant.iconSize; - const iconMarginX = ((variant.columnWidth - iconSize) / 2) | 0; - // Column index of the rightmost column (the one that fills first). - const firstColumn = variant.columns - 1; - const listTop = sidebarListTop(state.foregroundAppId); - const visibleCount = rowsPerColumn(variant) * variant.columns; - this.scrollRow = scrollToKeepSelectionVisible(this.scrollRow, state.selectedIndex, visibleCount, count); - const lastVisible = Math.min(count, this.scrollRow + visibleCount); - const slotOf = (index: number) => slotPosition(variant, listTop, index - this.scrollRow); + const layout = switcherLayout(count, state.foregroundHeightMode, state.foregroundAppId); + const { iconSize, position } = layout; + this.scrollRow = scrollToKeepSelectionVisible(this.scrollRow, state.selectedIndex, layout.visibleCount, count); + const lastVisible = Math.min(count, this.scrollRow + layout.visibleCount); + const cellOf = (index: number) => layout.cell(index - this.scrollRow); - // The selection is a "diversion" of the sidebar/main separator line: the - // line bulges right around the selected icon (rounded on the left, open - // to the main area on the right), so the separator is drawn with a gap - // there. When the sidebar has focus, the diversion is filled white and - // the icon drawn inverted. Only the right column touches the separator; - // a selected overflow icon gets a self-contained box instead. - const sep = SIDEBAR_WIDTH - 1; - // Start beside the app content, leaving the area alongside the top bar open. - const sepTop = Math.max(bandTop, windowTop(state.foregroundHeightMode, state.foregroundAppId) + TOP_BAR_HEIGHT); + // The selection is a "diversion" of the switcher/main separator line: + // the line bulges toward the main area around the selected icon (rounded + // on the outer side, open to the main area), so the separator is drawn + // with a gap there. When the switcher has focus, the diversion is filled + // white and the icon drawn inverted. Only the sidebar column against the + // separator touches it; a selected overflow icon gets a self-contained + // box instead. const selVisible = state.selectedIndex >= this.scrollRow && state.selectedIndex < lastVisible; - const selSlot = selVisible ? slotOf(state.selectedIndex) : null; - const selTabTop = selSlot && selSlot.column === firstColumn ? selSlot.y - 2 : null; - if (selTabTop !== null) { - image.drawLine(sep, sepTop, sep, selTabTop, BORDER_VALUE); - image.drawLine(sep, selTabTop + iconSize + 4, sep, bandBottom - 1, BORDER_VALUE); - } else { - image.drawLine(sep, sepTop, sep, bandBottom - 1, BORDER_VALUE); - } + const selCell = selVisible ? cellOf(state.selectedIndex) : null; + drawSeparator(image, state, strip, selCell?.atSeparator ? selCell : null); for (let index = this.scrollRow; index < lastVisible; index++) { const window = state.windows[index]!; - const { column, y } = slotOf(index); - const left = columnLeft(variant, column); - const x = left + iconMarginX; + const cell = cellOf(index); + const x = cell.x + (((cell.width - iconSize) / 2) | 0); + const y = cell.y + (((cell.height - iconSize) / 2) | 0); const selected = index === state.selectedIndex; const focused = selected && state.focus === "sidebar"; - if (selected && column === firstColumn) { - drawSelectionTab(image, left, y - 2, y + iconSize + 2, focused); + if (selected && cell.atSeparator) { + drawSelectionTab(image, cell, position, focused); } else if (selected) { // Spans the full column: only 2px of margin flanks the icon in its // slot, so anything wider would clip at the screen edge. - drawSelectionBox(image, left, y - 2, variant.columnWidth, iconSize + 4, focused); + drawSelectionBox(image, cell.x, cell.y, cell.width, cell.height, focused); } // Paint unselected icons into their own resource so only the replayed copy moves. const icon = selected ? image : new GrayImage(iconSize, iconSize + 1); @@ -327,14 +392,26 @@ export class ShellChromeLayer implements Layer { if (!selected) image.drawDepthImage(icon, x, y - 1, -2); } + if (position === "bottom") { + // Chevrons sit in the row's end margins, pointing off either end. + const chevronY = strip.y + ((strip.height / 2) | 0); + if (this.scrollRow > 0) { + drawChevron(image, strip.x + 6, chevronY, "left"); + } + if (lastVisible < count) { + drawChevron(image, strip.x + strip.width - 6, chevronY, "right"); + } + return; + } // Chevrons center over the icon area, which in the one-column variant is // narrower than the sidebar strip. - const chevronX = ((columnLeft(variant, 0) + SIDEBAR_WIDTH) / 2) | 0; + const span = sidebarContentSpan(count); + const chevronX = ((span.left + span.right) / 2) | 0; if (this.scrollRow > 0) { - drawChevron(image, chevronX, bandTop + TOP_BAR_HEIGHT + 6, -1); + drawChevron(image, chevronX, strip.y + TOP_BAR_HEIGHT + 6, "up"); } if (lastVisible < count) { - drawChevron(image, chevronX, bandBottom - 6, 1); + drawChevron(image, chevronX, strip.y + strip.height - 6, "down"); } } @@ -344,11 +421,11 @@ export class ShellChromeLayer implements Layer { // its height mode puts that (screen top for max height). It moves when // the foreground switches to a window of a different height. const barTop = windowTop(state.foregroundHeightMode, state.foregroundAppId); - // The bar spans the app viewport; with the sidebar overlaid (full-panel - // mode, sidebar focused) it still starts past the strip. - const barLeft = sidebarStripVisible(state.focus, state.foregroundAppId) ? SIDEBAR_WIDTH : 0; - image.fillRect(barLeft, barTop, G2_LENS_WIDTH - barLeft, TOP_BAR_HEIGHT, SHELL_OPAQUE_BLACK); - image.drawLine(barLeft, barTop + TOP_BAR_HEIGHT - 1, G2_LENS_WIDTH - 1, barTop + TOP_BAR_HEIGHT - 1, BORDER_VALUE); + // The bar spans the app viewport; with a side strip overlaid (full-panel + // mode, sidebar focused) it still stops at the strip. + const { left: barLeft, right: barRight } = topBarSpan(state); + image.fillRect(barLeft, barTop, barRight - barLeft, TOP_BAR_HEIGHT, SHELL_OPAQUE_BLACK); + image.drawLine(barLeft, barTop + TOP_BAR_HEIGHT - 1, barRight - 1, barTop + TOP_BAR_HEIGHT - 1, BORDER_VALUE); const now = new Date(); const clock = `${formatClockDate(now)} ${formatClockTime(now)}`; @@ -356,7 +433,7 @@ export class ShellChromeLayer implements Layer { const textY = barTop + Math.max(0, ((TOP_BAR_HEIGHT - font.lineHeight) / 2) | 0); image.drawText(font, clockX, textY, clock, 210); - const batteryLeft = this.drawTopBarBatteries(image, state, barTop); + const batteryLeft = this.drawTopBarBatteries(image, state, barTop, barRight); const trayLeft = drawTrayIcons(image, state.trayIcons, batteryLeft, barTop); const iconsX = clockX + font.measureText(clock) + 16; @@ -379,9 +456,10 @@ export class ShellChromeLayer implements Layer { * running the Faceclaw watch app is reachable (no placeholder otherwise). * The Settings > Customization > Battery indicators submenu picks the style (label beside a gauge icon or percentage, or stacked above * either) and, per device, whether the indicator shows always, only below - * 50%, or never. Returns the left edge of the battery block. + * 50%, or never. `barRight` is the bar's right edge (short of a right-hand + * sidebar). Returns the left edge of the battery block. */ - private drawTopBarBatteries(image: GrayImage, state: ShellChromeState, barTop: number): number { + private drawTopBarBatteries(image: GrayImage, state: ShellChromeState, barTop: number, barRight: number): number { const mode = batteryDisplayModeSetting.get(); const items: BatteryItem[] = []; const phone = readPhoneBatteryState(); @@ -401,9 +479,9 @@ export class ShellChromeLayer implements Layer { pushBatteryItem(items, ringBatteryVisibilitySetting.get(), "R1", state.battery.ring, Boolean(state.battery.ringCharging)); } - if (!items.length) return G2_LENS_WIDTH; + if (!items.length) return barRight; if (mode === "stacked" || mode === "stacked-percentage") { - return drawStackedBatteries(image, items, barTop, mode === "stacked-percentage"); + return drawStackedBatteries(image, items, barTop, barRight, mode === "stacked-percentage"); } const font = getDefaultSmallFont(); @@ -411,7 +489,7 @@ export class ShellChromeLayer implements Layer { const labelGap = 5; const itemGap = 12; const textY = barTop + Math.max(0, ((TOP_BAR_HEIGHT - font.lineHeight) / 2) | 0); - let x = G2_LENS_WIDTH - BATTERY_BLOCK_RIGHT_MARGIN; + let x = barRight - BATTERY_BLOCK_RIGHT_MARGIN; for (let index = items.length - 1; index >= 0; index--) { const item = items[index]!; const percentText = `${item.percent}%`; @@ -474,14 +552,14 @@ const STACKED_ITEM_GAP = 10; /** * Stacked styles: each label centered above its gauge icon (or percentage - * text), right-aligned in the bar. Returns the left edge of the battery - * block. + * text), right-aligned in the bar (ending at barRight). Returns the left edge + * of the battery block. */ -function drawStackedBatteries(image: GrayImage, items: BatteryItem[], barTop: number, percentage: boolean): number { +function drawStackedBatteries(image: GrayImage, items: BatteryItem[], barTop: number, barRight: number, percentage: boolean): number { const font = getFont("terminusv12"); const labelTop = barTop + STACKED_LABEL_BASELINE - font.ascent; const percentTop = barTop + STACKED_PERCENT_BASELINE - font.ascent; - let x = G2_LENS_WIDTH - BATTERY_BLOCK_RIGHT_MARGIN; + let x = barRight - BATTERY_BLOCK_RIGHT_MARGIN; for (let index = items.length - 1; index >= 0; index--) { const item = items[index]!; const percentText = `${item.percent}%`; @@ -521,16 +599,18 @@ const AMBIENT_MAX_LINES_PER_CARD = 3; /** * Paint the active ambient cards bottom-up: the oldest card sits at the very * bottom of the window band and newer ones stack above it. Cards that would - * cross into the top bar are dropped rather than clipped. + * cross into the top bar are dropped rather than clipped. `right` is the + * top bar's right edge, which the cards align to. */ const ambientKeys = new Map(); -function drawAmbientCards(image: GrayImage, parts?: Plane[]): void { +function drawAmbientCards(image: GrayImage, right: number, parts?: Plane[]): void { const cards = activeAmbientCards(); if (!cards.length) return; const font = getDefaultSmallFont(); const bandTop = minWindowTop(); const bandBottom = bandTop + MIN_WINDOW_HEIGHT; - const x = G2_LENS_WIDTH - AMBIENT_CARD_WIDTH - AMBIENT_CARD_MARGIN; + // Right-aligned with the top bar: clear of a right-hand sidebar. + const x = right - AMBIENT_CARD_WIDTH - AMBIENT_CARD_MARGIN; const textWidth = AMBIENT_CARD_WIDTH - 2 * AMBIENT_CARD_PADDING_X; let bottom = bandBottom - AMBIENT_CARD_MARGIN; for (const card of cards) { @@ -591,33 +671,81 @@ const TAB_EXTEND = 0; const TAB_STROKE = 150; /** - * Draw the selection "diversion" of the separator line around a sidebar icon - * in the rightmost column: rounded on the left, square and open on the right, - * extending a few px past the separator into the main area. Focused = filled - * white; otherwise an outline. `left` is the column's left edge, which the - * rounded corners curve in from. + * Draw the switcher/main separator line along the strip's inner edge, with + * a gap where the selection tab `gap` diverts it. */ -function drawSelectionTab(image: GrayImage, left: number, top: number, bottom: number, focused: boolean): void { - const right = SIDEBAR_WIDTH - 1 + TAB_EXTEND; - if (focused) { - for (let yy = top; yy < bottom; yy++) { - const x = left + tabLeftInset(yy, top, bottom, TAB_RADIUS); - image.fillRect(x, yy, right - x + 1, 1, 255); +function drawSeparator( + image: GrayImage, + state: ShellChromeState, + strip: { x: number; y: number; width: number; height: number }, + gap: SwitcherCell | null, +): void { + if (switcherPosition() === "bottom") { + // Along the row's top edge, the full width of the row. + const y = strip.y, right = strip.x + strip.width - 1; + if (gap) { + image.drawLine(strip.x, y, gap.x, y, BORDER_VALUE); + image.drawLine(gap.x + gap.width, y, right, y, BORDER_VALUE); + } else { + image.drawLine(strip.x, y, right, y, BORDER_VALUE); } return; } - // Outline: the tab shape minus the same shape inset by a pixel, row by row. - // Stroking the curve one pixel per row instead would leave gaps wherever the - // corner steps in by more than one pixel, and the top/bottom edges have to - // start at the same inset the curve uses or they part company from it. - for (let yy = top; yy < bottom; yy++) { - const outer = left + tabLeftInset(yy, top, bottom, TAB_RADIUS); - // The top and bottom rows are the horizontal edges: solid out to the open - // right side. In between only the left edge is stroked. - const inner = yy > top && yy < bottom - 1 - ? left + 1 + tabLeftInset(yy, top + 1, bottom - 1, TAB_RADIUS - 1) - : right + 1; - image.fillRect(outer, yy, Math.max(1, Math.min(inner, right + 1) - outer), 1, TAB_STROKE); + const sep = switcherPosition() === "right" ? strip.x : strip.x + strip.width - 1; + const bottom = strip.y + strip.height - 1; + // Start beside the app content, leaving the area alongside the top bar open. + const top = Math.max(strip.y, windowTop(state.foregroundHeightMode, state.foregroundAppId) + TOP_BAR_HEIGHT); + if (gap) { + image.drawLine(sep, top, sep, gap.y, BORDER_VALUE); + image.drawLine(sep, gap.y + gap.height, sep, bottom, BORDER_VALUE); + } else { + image.drawLine(sep, top, sep, bottom, BORDER_VALUE); + } +} + +/** + * Draw the selection "diversion" of the separator line around a switcher + * icon whose cell touches the separator: rounded on the outer side, square + * and open on the side toward the main area, extending TAB_EXTEND px past + * the separator into it. Focused = filled white; otherwise an outline. + * + * Drawn in tab-local coordinates: `along` runs parallel to the separator, + * `across` from the rounded outer edge (0) to the open edge, and fillAcross + * maps a run of one along-line onto the screen for the strip's orientation. + */ +function drawSelectionTab(image: GrayImage, cell: SwitcherCell, position: AppSwitcherPosition, focused: boolean): void { + const vertical = position !== "bottom"; + const along = vertical ? cell.height : cell.width; + const across = (vertical ? cell.width : cell.height) + TAB_EXTEND; + const fillAcross = (i: number, from: number, to: number, value: number) => { + switch (position) { + case "left": + image.fillRect(cell.x + from, cell.y + i, to - from, 1, value); + break; + case "right": + image.fillRect(cell.x + cell.width - to, cell.y + i, to - from, 1, value); + break; + default: + image.fillRect(cell.x + i, cell.y + cell.height - to, 1, to - from, value); + } + }; + if (focused) { + for (let i = 0; i < along; i++) { + fillAcross(i, tabInset(i, 0, along, TAB_RADIUS), across, 255); + } + return; + } + // Outline: the tab shape minus the same shape inset by a pixel, line by + // line. Stroking the curve one pixel per line instead would leave gaps + // wherever the corner steps in by more than one pixel, and the two edges + // running across have to start at the same inset the curve uses or they + // part company from it. + for (let i = 0; i < along; i++) { + const outer = tabInset(i, 0, along, TAB_RADIUS); + // The first and last lines are the edges running across: solid out to + // the open side. In between only the outer edge is stroked. + const inner = i > 0 && i < along - 1 ? 1 + tabInset(i, 1, along - 1, TAB_RADIUS - 1) : across; + fillAcross(i, outer, Math.max(outer + 1, Math.min(inner, across)), TAB_STROKE); } } @@ -634,24 +762,36 @@ function drawSelectionBox(image: GrayImage, x: number, y: number, width: number, } } -/** Left boundary x of the tab at row yy: 0 in the middle, curving to the rounded left corners. */ -function tabLeftInset(yy: number, top: number, bottom: number, radius: number): number { - const cy = yy + 0.5; - let dy = 0; - if (cy < top + radius) { - dy = top + radius - cy; - } else if (cy > bottom - radius) { - dy = cy - (bottom - radius); +/** + * How far the tab's outer edge is inset at along-line i (of the tab spanning + * start..end): 0 in the middle, curving in toward the rounded corners. + */ +function tabInset(i: number, start: number, end: number, radius: number): number { + const c = i + 0.5; + let d = 0; + if (c < start + radius) { + d = start + radius - c; + } else if (c > end - radius) { + d = c - (end - radius); } else { return 0; } - return Math.max(0, Math.round(radius - Math.sqrt(Math.max(0, radius * radius - dy * dy)))); + return Math.max(0, Math.round(radius - Math.sqrt(Math.max(0, radius * radius - d * d)))); } -/** Small triangle marker for sidebar overflow; direction -1 = up, 1 = down. */ -function drawChevron(image: GrayImage, centerX: number, y: number, direction: -1 | 1): void { +/** + * Small triangle marker for switcher overflow, pointing the way the hidden + * icons are; (x, y) is the middle of its base. + */ +function drawChevron(image: GrayImage, x: number, y: number, direction: "up" | "down" | "left" | "right"): void { const half = 5; - const tipY = direction < 0 ? y - 3 : y + 3; - image.drawLine(centerX - half, y, centerX, tipY, 140); - image.drawLine(centerX, tipY, centerX + half, y, 140); + if (direction === "left" || direction === "right") { + const tipX = direction === "left" ? x - 3 : x + 3; + image.drawLine(x, y - half, tipX, y, 140); + image.drawLine(tipX, y, x, y + half, 140); + return; + } + const tipY = direction === "up" ? y - 3 : y + 3; + image.drawLine(x - half, y, x, tipY, 140); + image.drawLine(x, tipY, x + half, y, 140); } diff --git a/app/ui/shell/geometry.ts b/app/ui/shell/geometry.ts index 58454526..2a983b22 100644 --- a/app/ui/shell/geometry.ts +++ b/app/ui/shell/geometry.ts @@ -1,5 +1,7 @@ import { G2_LENS_HEIGHT, G2_LENS_WIDTH } from "../../graphics/image"; import { + appSwitcherPositionSetting, + type AppSwitcherPosition, displayModeSetting, type DisplayModeSetting, verticalPositionSetting, @@ -7,19 +9,36 @@ import { navigateVerticalPositionSetting, terminalDisplayModeSetting, terminalVerticalPositionSetting, + uiDepthSetting, } from "../dashboard-settings"; /** Top bar: 24px notification icons plus a little padding. */ export const TOP_BAR_HEIGHT = 28; /** - * Width of the sidebar strip as painted. Leaves the app viewport exactly - * 576px wide — the surface width EvenHub apps expect — except in the - * full-panel display mode, where the strip overlays the app (see - * sidebarWidth). Icon column layout within the strip (one wide column vs. - * two narrow ones) is the chrome layer's business. + * Width of the sidebar strip as painted (the app switcher on the left or + * right edge). App windows get the other 576px — the surface width EvenHub + * apps expect — and keep that width with the switcher at the bottom too, + * except in the full-panel display mode, where the switcher overlays the + * app (see sidebarWidth). Icon column layout within the strip (one wide + * column vs. two narrow ones) is the chrome layer's business. */ export const SIDEBAR_WIDTH = 64; +/** + * Height of the app switcher as a row under the window: one tall tab, the + * same 36px (a 32px icon plus 2px either side) as a one-column sidebar slot. + * The row is wide enough that it never needs the sidebar's smaller + * two-column icons. It comes out of the height available to windows; their + * width stays 576, centred, leaving SIDEBAR_WIDTH / 2 at each side for the + * whole display's stereo shift (uiDepth). + */ +export const SWITCHER_ROW_HEIGHT = 36; + +/** Which edge the app switcher is on (Settings > Customization). */ +export function switcherPosition(): AppSwitcherPosition { + return appSwitcherPositionSetting.get(); +} + /** The Display > Display mode setting (see dashboard-settings.ts). */ function appDisplayMode(appId?: string) { return appId === "navigate" ? navigateDisplayModeSetting.get() @@ -31,21 +50,110 @@ export function displayMode(appId?: string): DisplayModeSetting { return mode === "global" || mode === "default" ? displayModeSetting.get() : mode; } -/** - * How much of the screen's width the sidebar takes away from app windows: - * the strip, or nothing in the full-panel mode (where the chrome paints the - * strip over the window while the sidebar has focus). - */ -export function sidebarWidth(appId?: string): number { - return displayMode(appId) === "640x480" ? 0 : SIDEBAR_WIDTH; +/** The full-panel mode: windows fill the panel; the switcher overlays them only while it has focus. */ +function fullPanel(appId?: string): boolean { + return displayMode(appId) === "640x480"; } /** - * Whether the sidebar strip is on screen: always when it reserves width; in + * How much of the screen's width the sidebar takes away from app windows: + * the strip, or nothing when the switcher is a bottom row or in the + * full-panel mode (where the chrome paints the strip over the window while + * the sidebar has focus). + */ +export function sidebarWidth(appId?: string): number { + return fullPanel(appId) || switcherPosition() === "bottom" ? 0 : SIDEBAR_WIDTH; +} + +/** + * How much of the screen's height a bottom switcher row takes away from app + * windows: the row, or nothing beside a side strip or in the full-panel mode + * (where the row overlays the window's bottom edge while it has focus). + */ +export function switcherRowHeight(appId?: string): number { + return !fullPanel(appId) && switcherPosition() === "bottom" ? SWITCHER_ROW_HEIGHT : 0; +} + +/** + * Whether the switcher strip is on screen: always when it reserves room; in * the full-panel mode (where it overlays the window) only while it has focus. */ export function sidebarStripVisible(focus: "sidebar" | "window", appId?: string): boolean { - return sidebarWidth(appId) > 0 || focus === "sidebar"; + return !fullPanel(appId) || focus === "sidebar"; +} + +/** + * Screen rect of the switcher strip. A side strip aligns to the min-height + * band (like the shell overlays). A bottom row sits right under the given + * (foreground) window and spans its width, so a band shorter than the + * screen has no gap below it; it moves when the foreground switches to a + * window of another height, as the top bar does. In the full-panel mode the + * row overlays the bottom edge of the screen. + */ +export function switcherRect(heightMode: WindowHeightMode, appId?: string): { x: number; y: number; width: number; height: number } { + switch (switcherPosition()) { + case "bottom": + return { + x: appViewportLeft(appId), + y: switcherRowHeight(appId) > 0 + ? windowTop(heightMode, appId) + windowBandHeight(heightMode, appId) + : G2_LENS_HEIGHT - SWITCHER_ROW_HEIGHT, + width: appViewportWidth(appId), + height: SWITCHER_ROW_HEIGHT, + }; + case "right": + return { x: G2_LENS_WIDTH - SIDEBAR_WIDTH, y: minWindowTop(appId), width: SIDEBAR_WIDTH, height: MIN_WINDOW_HEIGHT }; + default: + return { x: 0, y: minWindowTop(appId), width: SIDEBAR_WIDTH, height: MIN_WINDOW_HEIGHT }; + } +} + +/** + * Whether a screen point lies on the switcher's side of the screen, for + * touches on the phone's mirror: anywhere in a side strip's column, or from + * the top of a bottom row (under the given foreground window) down. + */ +export function isOnSwitcherEdge(x: number, y: number, heightMode: WindowHeightMode, appId?: string): boolean { + switch (switcherPosition()) { + case "bottom": + return y >= switcherRect(heightMode, appId).y; + case "right": + return x >= G2_LENS_WIDTH - SIDEBAR_WIDTH; + default: + return x < SIDEBAR_WIDTH; + } +} + +/** Width of app windows: the panel's in the full-panel mode, else 576 (see SIDEBAR_WIDTH). */ +function appViewportWidth(appId?: string): number { + return fullPanel(appId) ? G2_LENS_WIDTH : G2_LENS_WIDTH - SIDEBAR_WIDTH; +} + +/** + * Left edge (x) of app windows: past a left strip, centred above a bottom + * row (see SWITCHER_ROW_HEIGHT), else the screen edge. + */ +export function appViewportLeft(appId?: string): number { + if (fullPanel(appId)) return 0; + switch (switcherPosition()) { + case "left": + return SIDEBAR_WIDTH; + case "bottom": + return SIDEBAR_WIDTH / 2; + default: + return 0; + } +} + +/** + * Stereo depth of the whole display (Settings > Customization > Depth), in + * the firmware's depth units; the shell scene carries it to the compositor, + * which shifts the screen and everything drawn over it per lens. Only with + * the switcher at the bottom, where the windows' side margins leave room for + * the shift. + */ +export function uiDepth(): number { + return switcherPosition() === "bottom" ? Number(uiDepthSetting.get()) : 0; } /** @@ -57,13 +165,13 @@ export function effectiveHeightMode(mode: WindowHeightMode, appId?: string): Win } /** - * X of the display's true horizontal centre, in app-viewport coordinates. The - * sidebar pushes the viewport to the right, so UI the wearer physically aims - * with — a compass rose, a calibration crosshair — has to offset by it rather - * than use the viewport's own centre. + * X of the display's true horizontal centre, in app-viewport coordinates. A + * side strip pushes the viewport off centre, so UI the wearer physically + * aims with — a compass rose, a calibration crosshair — has to offset by it + * rather than use the viewport's own centre. */ export function screenCenterInViewportX(): number { - return Math.round(G2_LENS_WIDTH / 2) - sidebarWidth(); + return Math.round(G2_LENS_WIDTH / 2) - appViewportLeft(); } /** @@ -78,20 +186,27 @@ export const SHELL_OPAQUE_BLACK = 1; * firmware uses, leaving most of the field of view clear; "medium" is one * top bar taller, so the content area below the bar is a full 288px (the * EvenHub app surface height); "max" uses the whole 480px screen (terminal - * views). All include a top bar drawn by the shell at the window's top edge. + * views), less a bottom switcher row. All include a top bar drawn by the + * shell at the window's top edge. */ export type WindowHeightMode = "min" | "medium" | "max"; /** Total height (top bar + content) of a min-height window. */ export const MIN_WINDOW_HEIGHT = 288; -/** Farthest down a min-height window can start. */ -export const MIN_WINDOW_MAX_TOP = G2_LENS_HEIGHT - MIN_WINDOW_HEIGHT; + +/** + * Height of the screen area windows are placed in: the whole screen, less + * a bottom switcher row's height. + */ +function windowAreaHeight(appId?: string): number { + return G2_LENS_HEIGHT - switcherRowHeight(appId); +} /** Total height (top bar + content) of a window's band in the given mode. */ export function windowBandHeight(mode: WindowHeightMode, appId?: string): number { switch (effectiveHeightMode(mode, appId)) { case "max": - return G2_LENS_HEIGHT; + return windowAreaHeight(appId); case "medium": return MIN_WINDOW_HEIGHT + TOP_BAR_HEIGHT; default: @@ -129,15 +244,19 @@ export function minWindowTop(appId?: string): number { return windowTop("min", appId); } -/** Top edge (y) of a window's top bar; max-height windows pin to the screen top. */ +/** + * Top edge (y) of a window's top bar; max-height windows pin to the screen + * top. A bottom switcher row hangs under the band, so the band and row + * together distribute the screen's slack. + */ export function windowTop(mode: WindowHeightMode, appId?: string): number { - return Math.round((G2_LENS_HEIGHT - windowBandHeight(mode, appId)) * verticalPositionFraction(appId)); + return Math.round((windowAreaHeight(appId) - windowBandHeight(mode, appId)) * verticalPositionFraction(appId)); } /** App-content viewport size for a height mode (independent of vertical position). */ export function appViewportSize(mode: WindowHeightMode, appId?: string): { width: number; height: number } { return { - width: G2_LENS_WIDTH - sidebarWidth(appId), + width: appViewportWidth(appId), height: windowBandHeight(mode, appId) - TOP_BAR_HEIGHT, }; } @@ -150,7 +269,7 @@ export function appViewportRect(mode: WindowHeightMode, appId?: string): { height: number; } { return { - x: sidebarWidth(appId), + x: appViewportLeft(appId), y: windowTop(mode, appId) + TOP_BAR_HEIGHT, ...appViewportSize(mode, appId), }; diff --git a/app/ui/shell/shell.ts b/app/ui/shell/shell.ts index 8ce042c8..d73f6bdf 100644 --- a/app/ui/shell/shell.ts +++ b/app/ui/shell/shell.ts @@ -7,6 +7,7 @@ import { acceptInput } from "../input-monitor"; import type { RawInputEvent } from "../../native/faceclaw-communicator"; import { directionalFallback, + type DirectionalInputEvent, GESTURE_SHORT_THEN_LONG_PRESS, gestureHints, InputEvent, @@ -44,19 +45,23 @@ import { wakeWordActionSetting, } from "../dashboard-settings"; import { onAmbientCardsChanged } from "./ambient-cards"; -import { ShellChromeLayer, sidebarContentLeft, type ShellChromeState, type ShellChromeWindow } from "./chrome-layer"; +import { ShellChromeLayer, sidebarContentSpan, type ShellChromeState, type ShellChromeWindow } from "./chrome-layer"; import { ShellModalLayer } from "./modal-layer"; import { ToolDebugMenuLayer } from "./tool-debug-layer"; import { BrightnessPickerLayer } from "./brightness-picker-layer"; import { toolRegistry } from "../../assistant/tool-registry"; import { + appViewportRect, minWindowTop, sidebarWidth, - TOP_BAR_HEIGHT, + switcherPosition, + switcherRowHeight, + uiDepth, windowBandHeight, windowTop, type WindowHeightMode, } from "./geometry"; +import type { AppSwitcherPosition } from "../dashboard-settings"; /** * The shell: owns the window registry, focus, screen on/off, and the shell @@ -228,12 +233,14 @@ class ShellOverlayMenuLayer extends MenuLayer { constructor(items: MenuItem[], footer: string | undefined, private readonly onClosed: () => void) { // Aligned to the min-height window band (like the sidebar), wherever the // vertical position setting currently puts it; centered over the - // application area, i.e. the part of the screen past the sidebar strip - // (the whole screen in the full-panel mode, where the strip overlays). + // application area, i.e. the part of the screen beside a side strip + // (the whole width with a bottom row, or in the full-panel mode, where + // the strip overlays). const width = 272; + const area = appViewportRect("min"); super("System", items, { - x: sidebarWidth() + (((G2_LENS_WIDTH - sidebarWidth() - width) / 2) | 0), - y: minWindowTop() + TOP_BAR_HEIGHT + 8, + x: area.x + (((area.width - width) / 2) | 0), + y: area.y + 8, width, minHeight: 150, squareCorners: true, @@ -308,9 +315,28 @@ class ShellAlertLayer implements Layer { } } -/** Every setting the top bar paints from, as one comparable string. */ -function topBarSettingsKey(): string { - return `${batteryIndicatorSettingsKey()}|${timeFormatSetting.get()}`; +/** + * What a watch swipe means while the app switcher has focus, as the ring + * gesture it stands for. Swipes are spatial: along the strip they move the + * selection, toward the app area they enter the selected window, and away + * from it there is nowhere further to go (ignored). + */ +const SWITCHER_SWIPES: Record< + AppSwitcherPosition, + Partial> +> = { + left: { "swipe-up": "scroll-up", "swipe-down": "scroll-down", "swipe-right": "click" }, + right: { "swipe-up": "scroll-up", "swipe-down": "scroll-down", "swipe-left": "click" }, + bottom: { "swipe-left": "scroll-up", "swipe-right": "scroll-down", "swipe-up": "click" }, +}; + +/** + * Every setting the shell's paint depends on that nothing else repaints it + * for (the top bar's contents, the scene's stereo depth), as one comparable + * string. + */ +function chromeSettingsKey(): string { + return `${batteryIndicatorSettingsKey()}|${timeFormatSetting.get()}|${uiDepth()}`; } class Shell { @@ -373,8 +399,8 @@ class Shell { // Top-bar settings we mirror into the chrome; a change to any of them // repaints the shell surface so the top bar reflects it immediately. - private topBarSettingsSubscribed = false; - private lastTopBarSettingsKey: string | null = null; + private chromeSettingsSubscribed = false; + private lastChromeSettingsKey: string | null = null; configure(config: ShellConfig): void { // Nearly every state change ends in a shell render request, so it is @@ -387,7 +413,7 @@ class Shell { }, }; this.stack.setActions(config.actions); - this.subscribeToTopBarSettings(); + this.subscribeToChromeSettings(); this.subscribeToAmbientCards(); } @@ -405,14 +431,14 @@ class Shell { }); } - private subscribeToTopBarSettings(): void { - if (this.topBarSettingsSubscribed) return; - this.topBarSettingsSubscribed = true; - this.lastTopBarSettingsKey = topBarSettingsKey(); + private subscribeToChromeSettings(): void { + if (this.chromeSettingsSubscribed) return; + this.chromeSettingsSubscribed = true; + this.lastChromeSettingsKey = chromeSettingsKey(); onAnySettingChanged(() => { - const key = topBarSettingsKey(); - if (key === this.lastTopBarSettingsKey) return; - this.lastTopBarSettingsKey = key; + const key = chromeSettingsKey(); + if (key === this.lastChromeSettingsKey) return; + this.lastChromeSettingsKey = key; this.config.requestShellRender(); }); } @@ -701,8 +727,13 @@ class Shell { this.config.requestShellRender(); } - /** Paint the shell surface: transparent chrome, or all-transparent when asleep. */ - paintScene(): Uint8Array { return encodeShellScene(this.screenOn ? this.stack.paintUndimmed() : []); } + /** + * Paint the shell surface: transparent chrome, or all-transparent when + * asleep. The scene also carries the whole display's stereo depth. + */ + paintScene(): Uint8Array { + return this.screenOn ? encodeShellScene(this.stack.paintUndimmed(), uiDepth()) : encodeShellScene([]); + } paintSurface(): Plane[] { if (!this.screenOn) { @@ -904,20 +935,24 @@ class Shell { /** * Screen rect actually occupied by content, for cropping screenshots: the - * foreground window's band (full screen for a max-height window, the - * vertical-position-dependent 288px band otherwise), minus the sidebar - * strip left of the icon columns when the one-column variant is active. + * foreground window's band (full height for a max-height window, the + * vertical-position-dependent 288px band otherwise) plus the switcher: a + * side strip's icon columns (minus the outer dead strip the one-column + * variant leaves), or the row under it. */ screenshotCropRect(): { x: number; y: number; width: number; height: number } { const appId = this.foregroundWindow()?.appId; const heightMode = this.foregroundWindow()?.heightMode ?? "min"; - const x = sidebarWidth(appId) === 0 ? 0 : sidebarContentLeft(this.windows.length); - return { - x, - y: windowTop(heightMode, appId), - width: G2_LENS_WIDTH - x, - height: windowBandHeight(heightMode, appId), - }; + const viewport = appViewportRect(heightMode, appId); + let left = viewport.x, right = viewport.x + viewport.width; + if (sidebarWidth(appId) > 0) { + const strip = sidebarContentSpan(this.windows.length); + left = Math.min(left, strip.left); + right = Math.max(right, strip.right); + } + const y = windowTop(heightMode, appId); + const bottom = y + windowBandHeight(heightMode, appId) + switcherRowHeight(appId); + return { x: left, y, width: right - left, height: bottom - y }; } /** @@ -966,7 +1001,8 @@ class Shell { } private handleSidebarInput(event: InputEvent): ShellInputOutcome { - switch (event.type) { + const type = isDirectionalInput(event) ? SWITCHER_SWIPES[switcherPosition()][event.type] : event.type; + switch (type) { case "double-click": // A double-tap at the root (the app switcher selected) turns the // display off — from the ring and the watch scheme alike; watch-scheme @@ -974,17 +1010,12 @@ class Shell { this.sleep(); return { shell: true, window: false }; case "scroll-up": - case "swipe-up": this.moveSelection(-1); return { shell: true, window: false }; case "scroll-down": - case "swipe-down": this.moveSelection(1); return { shell: true, window: false }; case "click": - case "swipe-right": - // Right: into the selected window (spatially, the window is to the - // sidebar's right). Left has nowhere further to go and is ignored. if (this.windows.length) { this.focus = "window"; this.foregroundWindow()?.onFocus?.(this.lastInput); diff --git a/app/ui/shell/tool-debug-layer.ts b/app/ui/shell/tool-debug-layer.ts index 6dcdd333..752b4548 100644 --- a/app/ui/shell/tool-debug-layer.ts +++ b/app/ui/shell/tool-debug-layer.ts @@ -1,4 +1,4 @@ -import { G2_LENS_WIDTH, GrayImage } from "../../graphics/image"; +import { GrayImage } from "../../graphics/image"; import { getDefaultSmallFont } from "../../graphics/ui-fonts"; import { wrapText } from "../../graphics/textwrap"; import { clamp } from "../../util/numeric-util"; @@ -6,7 +6,7 @@ import type { ToolDebugEntry } from "../../assistant/tool-registry"; import { InputEvent } from "../gestures"; import { Layer, LayerContext, PaintBelow } from "../layers"; import { MenuLayer, drawListScrollbar, type MenuItem } from "../menu"; -import { minWindowTop, sidebarWidth, TOP_BAR_HEIGHT } from "./geometry"; +import { appViewportRect } from "./geometry"; import { lineStep } from "../metrics"; /** @@ -21,18 +21,19 @@ const DIALOG_WIDTH = 420; // the band below the top bar with an 8px margin on each side. const DETAIL_HEIGHT = 208; -/** Dialog left edge: past the sidebar strip where one reserves width. */ +/** Dialog left edge: inside the app area, clear of a left sidebar strip. */ function dialogX(): number { - return sidebarWidth() + 8; + return appViewportRect("min").x + 8; } +/** Detail box width: the app area (clear of a right sidebar strip) less margins. */ function detailWidth(): number { - return G2_LENS_WIDTH - dialogX() - 8; + return appViewportRect("min").width - 16; } /** Dialog top edge, aligned to the min-height band's content area. */ function dialogY(): number { - return minWindowTop() + TOP_BAR_HEIGHT + 8; + return appViewportRect("min").y + 8; } const DETAIL_PADDING = 14; diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/DrawProtocol.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/DrawProtocol.kt index 7ab1b12d..6567a056 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/DrawProtocol.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/DrawProtocol.kt @@ -62,6 +62,27 @@ object DrawProtocol { write: DrawWriter.() -> Unit): ByteArray = call(op, encode(write), target, depth, clip) + /** + * [call] moved [extra] depth units further, as if played from a list called at that depth: + * adds to its depth field, or inserts one (after any target override) when it has none. The + * sum saturates at the field's range rather than failing the whole presentation. + */ + fun withAddedDepth(call: ByteArray, extra: Int): ByteArray { + if (extra == 0) return call + val flags = call[1].toInt() and 255 + val at = if (flags and DRAW_FLAG_RESOURCE_TARGET != 0) 4 else 2 + val result = if (flags and DRAW_FLAG_DEPTH != 0) { + call.copyOf().also { it[at] = addDepth(call[at].toInt(), extra).toByte() } + } else { + call.copyOfRange(0, at) + byteArrayOf(addDepth(0, extra).toByte()) + call.copyOfRange(at, call.size) + } + result[1] = (flags or DRAW_FLAG_DEPTH).toByte() + return result + } + + /** Two depths combined, saturated to the s8 depth field. */ + fun addDepth(depth: Int, extra: Int): Int = (depth + extra).coerceIn(-128, 127) + fun depthOffset(depth: Int, right: Boolean): Int = if (right) -floorHalf(depth + 1) else floorHalf(depth) diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/ShellScene.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/ShellScene.kt index fa0c46ed..62544f8a 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/ShellScene.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/ShellScene.kt @@ -1,6 +1,10 @@ package com.faceclaw.app -/** Immutable shell snapshot. Keys identify writable surfaces across repaints, not their pixels. */ +/** + * Immutable shell snapshot. Keys identify writable surfaces across repaints, not their pixels. + * [screenDepth] is the stereo depth of the whole presentation: the screen copy and everything + * drawn over it shift together per lens (see [calls]). + */ class ShellScene(val layers: List, val selections: List = emptyList(), val screenDepth: Int = 0) { class Layer(val key: Int, val x: Int, val y: Int, val width: Int, val height: Int, val dim: Int, val packed: ByteArray, val selections: List = emptyList(), val depth: Int = 0) { // Layers are reused by every composite until the shell repaints, and hashing packed @@ -13,22 +17,32 @@ class ShellScene(val layers: List, val selections: List val retainedResources = allSelections.flatMap { it.resources } init { require(retainedResources.size + layers.size < 511 && screenDepth in -128..127) } val fingerprint: String = layers.joinToString(";") { it.fingerprint } + selections.joinToString { it.fingerprint } + "|depth:$screenDepth" + /** + * The root list. A nonzero [screenDepth] adds to every positional call's own depth, so the + * scene moves as one; depths are even (see uiDepthSetting) so the per-lens halves add + * exactly. Dim LUTs stay put: they cover the whole target, and a shifted one would leave an + * undimmed strip at one edge. + */ fun calls(width: Int, height: Int, surfaces: IntArray, selected: IntArray): List { val calls = ArrayList(); var rowId = 0 val now = drawAnimationTimeMs() + fun shifted(call: ByteArray) = DrawProtocol.withAddedDepth(call, screenDepth) calls.addAll(DrawProtocol.screenCopy(width, height, screenDepth)) fun add(row: RetainedDrawing) { - calls.addAll(row.calls(selected.copyOfRange(rowId, rowId + row.resources.size), now)) + for (call in row.calls(selected.copyOfRange(rowId, rowId + row.resources.size), now)) calls.add(shifted(call)) rowId += row.resources.size } for (row in selections) add(row) for ((index, layer) in layers.withIndex()) { if (layer.dim < 256) calls.add(DrawProtocol.lut(width, height, layer.dim)) - calls.add(DrawProtocol.image(surfaces[index], layer.x, layer.y, depth = layer.depth)) + calls.add(DrawProtocol.image(surfaces[index], layer.x, layer.y, depth = DrawProtocol.addDepth(layer.depth, screenDepth))) for (row in layer.selections) add(row) } return calls } + /** This scene without its whole-presentation shift: the phone mirror's view (see SurfaceCompositor.previewScene). */ + fun unshifted(): ShellScene = if (screenDepth == 0) this else ShellScene(layers, selections, 0) + fun preview(screenGray: ByteArray, width: Int, height: Int, rightLens: Boolean = false): ByteArray { val screen = BmpUtil.pack4bppFromGray8(screenGray, width, height) val output = ByteArray(screen.size); val resources = HashMap() @@ -89,10 +103,11 @@ class ShellScene(val layers: List, val selections: List val selections = List(selectionCount) { readRetainedDrawing(reader, reader.get().toInt()) } layers.add(Layer(key, x, y, w, h, dim, BmpUtil.pack4bppFromGray8(gray, w, h), selections, depth)) } - require(reader.remaining() == 0) + require(reader.remaining() == 2) + val screenDepth = reader.getShort().toInt() require(layers.sumOf { layer -> layer.selections.sumOf { it.resources.size } } + layers.size < 511) require(layers.map { it.key }.toSet().size == layers.size) - return ShellScene(layers) + return ShellScene(layers, screenDepth = screenDepth) } } } diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt index 4fea1860..19f60f16 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt @@ -316,10 +316,14 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr private var lastScene: ShellScene? = null private var previewKey: String? = null + /** + * The phone mirror's view of [scene]: without the whole-screen stereo shift, which would move + * it off centre by half the depth and put mirror touches that far from what they land on. + */ private fun previewScene(scene: ShellScene, gray: ByteArray, key: String): ByteArray { if (previewKey != key) { animatedPreview?.player?.stop() - animatedPreview = scene.animatedPreview(gray, screenWidth, screenHeight, + animatedPreview = scene.unshifted().animatedPreview(gray, screenWidth, screenHeight, schedule = { delay, action -> scheduleDrawRedraw(delay) { lock.withLock(action) } }) previewKey = key } @@ -480,12 +484,16 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr } } - /** The screen's stereo depth: see setSurfaceDepth. */ + /** + * The screen's stereo depth: a covering surface's own (see setSurfaceDepth), else the shell + * scene's depth for the whole display (the regular UI's Depth setting). + */ private fun screenDepthLocked(ordered: List): Int { - val top = ordered.lastOrNull { it.visible } ?: return 0 + val uiDepth = shellScene?.screenDepth ?: 0 + val top = ordered.lastOrNull { it.visible } ?: return uiDepth val covers = top.transparency == TRANSPARENCY_OPAQUE && top.x <= 0 && top.y <= 0 && top.x + top.width >= screenWidth && top.y + top.height >= screenHeight - return if (covers) top.depth else 0 + return if (covers) top.depth else uiDepth } /** diff --git a/tests/ai-chat.test.cjs b/tests/ai-chat.test.cjs index bfbcf03b..ddc6b05b 100644 --- a/tests/ai-chat.test.cjs +++ b/tests/ai-chat.test.cjs @@ -261,7 +261,10 @@ function shellEnv({ wakeAction = 'voice-input', skipConfirmation = false } = {}) '../notifications': {}, '../dashboard-settings': settings, './ambient-cards': {}, './chrome-layer': { ShellChromeLayer: class {} }, './modal-layer': {}, './tool-debug-layer': {}, './brightness-picker-layer': {}, - '../../assistant/tool-registry': {}, './geometry': { sidebarWidth: () => 64, minWindowTop: () => 96, TOP_BAR_HEIGHT: 28 }, + '../../assistant/tool-registry': {}, './geometry': { + sidebarWidth: () => 64, minWindowTop: () => 96, switcherPosition: () => 'left', uiDepth: () => 0, + appViewportRect: () => ({ x: 64, y: 124, width: 576, height: 260 }), + }, }); const { createInProcessWindow } = load('app/ui/shell/in-process-window.ts', { '../../graphics/image': images, '../../native/frame-timings': timings, diff --git a/tests/app-layout.test.cjs b/tests/app-layout.test.cjs index 26f6e4d2..1b451f48 100644 --- a/tests/app-layout.test.cjs +++ b/tests/app-layout.test.cjs @@ -14,6 +14,7 @@ function geometry() { displayModeSetting: '576x288', verticalPositionSetting: 'middle', navigateDisplayModeSetting: 'global', navigateVerticalPositionSetting: 'global', terminalDisplayModeSetting: 'default', terminalVerticalPositionSetting: 'global', + appSwitcherPositionSetting: 'left', uiDepthSetting: '0', }).map(([name, value]) => [name, { value, get() { return this.value; } }])); const context = { exports: {}, require: (name) => { if (name === '../../graphics/image') return { G2_LENS_WIDTH: 640, G2_LENS_HEIGHT: 480 }; @@ -65,23 +66,74 @@ test('Terminal can disable its tall default, inherit position or override both d test('all explicit size/position combinations stay within the display and align content below the bar', () => { const g = geometry(); - for (const globalMode of ['576x288', '576x480', '640x480']) { - g.settings.displayModeSetting.value = globalMode; - for (const appId of ['navigate', 'terminal']) { - for (const mode of ['global', '576x288', '576x480', '640x480']) { - g.settings[`${appId}DisplayModeSetting`].value = mode; - for (const position of ['global', 'top', 'upper', 'middle', 'lower', 'bottom']) { - g.settings[`${appId}VerticalPositionSetting`].value = position; - const rect = g.rect('max', appId); - assert.equal(rect.x + rect.width, 640); - assert.equal(rect.y, g.windowTop('max', appId) + g.TOP_BAR_HEIGHT); - assert.ok(rect.y >= 28 && rect.y + rect.height <= 480); + for (const switcher of ['left', 'right', 'bottom']) { + g.settings.appSwitcherPositionSetting.value = switcher; + for (const globalMode of ['576x288', '576x480', '640x480']) { + g.settings.displayModeSetting.value = globalMode; + for (const appId of ['navigate', 'terminal']) { + for (const mode of ['global', '576x288', '576x480', '640x480']) { + g.settings[`${appId}DisplayModeSetting`].value = mode; + for (const position of ['global', 'top', 'upper', 'middle', 'lower', 'bottom']) { + g.settings[`${appId}VerticalPositionSetting`].value = position; + for (const heightMode of ['min', 'medium', 'max']) { + const rect = g.rect(heightMode, appId); + const fullPanel = g.displayMode(appId) === '640x480'; + assert.equal(rect.x + rect.width, fullPanel ? 640 : { left: 640, right: 576, bottom: 608 }[switcher]); + assert.equal(rect.y, g.windowTop(heightMode, appId) + g.TOP_BAR_HEIGHT); + assert.ok(rect.y >= 28 && rect.y + rect.height <= 480 - g.switcherRowHeight(appId)); + const row = g.switcherRect(heightMode, appId); + assert.ok(row.y + row.height <= 480); + // A reserved bottom row hangs right under the window, as wide as it. + if (g.switcherRowHeight(appId)) assert.deepEqual([row.x, row.y, row.width], [rect.x, rect.y + rect.height, rect.width]); + } + } } } } } }); +test('the app switcher can sit on the right edge', () => { + const g = geometry(); + g.settings.appSwitcherPositionSetting.value = 'right'; + assert.deepEqual(g.rect('min'), { x: 0, y: 124, width: 576, height: 260 }); + assert.deepEqual({ ...g.switcherRect('max') }, { x: 576, y: 96, width: 64, height: 288 }); + assert.equal(g.screenCenterInViewportX(), 320); + assert.equal(g.isOnSwitcherEdge(600, 10, 'min'), true); + assert.equal(g.isOnSwitcherEdge(10, 200, 'min'), false); + // Depth needs the bottom row's side margins. + g.settings.uiDepthSetting.value = '32'; + assert.equal(g.uiDepth(), 0); + g.settings.displayModeSetting.value = '640x480'; + assert.deepEqual(g.rect('max'), { x: 0, y: 28, width: 640, height: 452 }); +}); + +test('a bottom app switcher centres 576-wide windows and hangs one tall tab under them', () => { + const g = geometry(); + g.settings.appSwitcherPositionSetting.value = 'bottom'; + assert.equal(g.SWITCHER_ROW_HEIGHT, 36); + assert.deepEqual(g.rect('max', 'terminal'), { x: 32, y: 28, width: 576, height: 416 }); + assert.deepEqual({ ...g.switcherRect('max', 'terminal') }, { x: 32, y: 444, width: 576, height: 36 }); + // Band and row share the slack: no gap under a band shorter than the screen. + assert.deepEqual(g.rect('min'), { x: 32, y: 106, width: 576, height: 260 }); + assert.deepEqual({ ...g.switcherRect('min') }, { x: 32, y: 366, width: 576, height: 36 }); + assert.equal(g.isOnSwitcherEdge(10, 370, 'min'), true); + assert.equal(g.isOnSwitcherEdge(10, 360, 'min'), false); + g.settings.verticalPositionSetting.value = 'bottom'; + assert.equal(g.switcherRect('min').y, 444); + // The true centre is the viewport's own with the window centred. + assert.equal(g.screenCenterInViewportX(), 288); + // Depth applies only here. + g.settings.uiDepthSetting.value = '-48'; + assert.equal(g.uiDepth(), -48); + // Full panel: windows fill the panel and the row overlays the bottom edge while focused. + g.settings.displayModeSetting.value = '640x480'; + assert.deepEqual(g.rect('max'), { x: 0, y: 28, width: 640, height: 452 }); + assert.deepEqual({ ...g.switcherRect('max') }, { x: 0, y: 444, width: 640, height: 36 }); + assert.equal(g.sidebarStripVisible('window'), false); + assert.equal(g.sidebarStripVisible('sidebar'), true); +}); + // Exercise the real worker message handler with platform work stubbed out. function resizeHandler(file, globals) { const source = ts.createSourceFile(file, read(file), ts.ScriptTarget.Latest, true); diff --git a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/DisplayListTest.kt b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/DisplayListTest.kt index db3110a1..92419258 100644 --- a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/DisplayListTest.kt +++ b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/DisplayListTest.kt @@ -299,6 +299,48 @@ class DisplayListTest { assertEquals(0, output.get(if (right) 639 else 0, 240)) // cleared, not stale } } + @Test fun addedDepthJoinsOrInsertsTheDepthField() { + val copy = DrawProtocol.rectCopy(DrawProtocol.SCREEN, 0, 0, 4, 4, 0, 0) + assertContentEquals(DrawProtocol.rectCopy(DrawProtocol.SCREEN, 0, 0, 4, 4, 0, 0, depth = 8), DrawProtocol.withAddedDepth(copy, 8)) + val targeted = DrawProtocol.image(3, 1, 2, target = 5, depth = -2) + assertContentEquals(DrawProtocol.image(3, 1, 2, target = 5, depth = 6), DrawProtocol.withAddedDepth(targeted, 8)) + assertSame(copy, DrawProtocol.withAddedDepth(copy, 0)) + assertContentEquals(DrawProtocol.image(3, 1, 2, depth = 127), DrawProtocol.withAddedDepth(DrawProtocol.image(3, 1, 2, depth = 120), 16)) + } + /** The bottom switcher's Depth setting: the shell scene's depth moves the screen, shell layers and selections together. */ + @Test fun shellSceneDepthShiftsTheWholePresentationButNotDimming() { + val c = SurfaceCompositor() + c.configureScreen(640, 480) + c.configureSurface("app", 32, 0, 576, 480, 0, 0) + c.submitSurface("app", ArrayByteReader(ByteArray(576 * 480) { if (it % 576 in 100 until 110) 255.toByte() else 0 }), + 0, 0, 576, 480, "stripe") + // One white 2x1 shell layer at (200, 10), dimming what is under it, at layer depth -2; scene depth 8. + val header = listOf(1, 1, 200, 10, 2, 1, 128, 0, -2).flatMap { listOf(it.toByte(), (it shr 8).toByte()) }.toByteArray() + c.setShellScene(ArrayByteReader(header + byteArrayOf(-1, -1) + DrawProtocol.word(8))) + val composite = c.composite() + assertEquals(8, composite.shellScene.screenDepth) + val calls = composite.shellScene.calls(640, 480, intArrayOf(1), IntArray(0)) + assertTrue(calls.any { it.contentEquals(DrawProtocol.lut(640, 480, 128)) }) // the dim stays whole-screen + val screen = BmpUtil.pack4bppFromGray8(composite.screenGray, 640, 480) + for (right in listOf(false, true)) { + val glasses = Glasses(right) + glasses.apply(ScenePlanner(ResourceCacheState()).plan(screen, 640, 480, null, composite.shellScene, 1).commands) + val output = DisplayListRenderer.Target(glasses.composition, 640, 480) + // Screen: half of 8 per lens. Layer: depth -2 + 8, so one pixel less than the screen's shift on each lens. + val shift = if (right) -4 else 4 + val layerShift = if (right) -3 else 3 + assertEquals(0, output.get(131 + shift, 200)); assertTrue(output.get(132 + shift, 200) > 0) + assertTrue(output.get(141 + shift, 200) > 0); assertEquals(0, output.get(142 + shift, 200)) + assertEquals(15, output.get(200 + layerShift, 10)); assertEquals(15, output.get(201 + layerShift, 10)) + } + // The phone mirror shows the scene unshifted, so touches land where they look. + val preview = assertNotNull(c.previewComposite()).gray + assertEquals(0, preview[131].toInt() and 255); assertTrue((preview[132].toInt() and 255) > 0) + // A covering surface's own depth still wins over the scene's. + c.configureSurface("glance", 0, 0, 640, 480, 900, 0) + c.setSurfaceDepth("glance", -16) + assertEquals(-16, c.composite().shellScene.screenDepth) + } @Test fun noisyFramesRemainBoundedAndResourceBudgetIs192KiB() { val cache=ResourceCacheState();val planner=ScenePlanner(cache);val glasses=Glasses() val app=ByteArray(640*480/2){(it*37).toByte()} diff --git a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/FrameDisplayListTest.kt b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/FrameDisplayListTest.kt index 72d29f46..3f23ecd5 100644 --- a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/FrameDisplayListTest.kt +++ b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/FrameDisplayListTest.kt @@ -98,7 +98,7 @@ class FrameDisplayListTest { // One opaque 1x1 shell layer, with one generic list after its pixels. val layer = DrawProtocol.word(1) + DrawProtocol.word(1) + DrawProtocol.word(0) + DrawProtocol.word(0) + DrawProtocol.word(1) + DrawProtocol.word(1) + DrawProtocol.word(256) + DrawProtocol.word(1) + - DrawProtocol.word(0) + byteArrayOf(32) + hex(multi) + DrawProtocol.word(0) + byteArrayOf(32) + hex(multi) + DrawProtocol.word(0) val shell = ShellScene.decode(ArrayByteReader(layer)) assertEquals(2, shell.retainedResources.size) assertEquals(240, shell.preview(ByteArray(64) { 32 }, 8, 8)[21].toInt() and 255) diff --git a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/PreviewPackingTest.kt b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/PreviewPackingTest.kt index 7d197217..a48fd42d 100644 --- a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/PreviewPackingTest.kt +++ b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/PreviewPackingTest.kt @@ -43,7 +43,7 @@ class PreviewPackingTest { compositor.configureSurface("app", 0, 0, 3, 2, 0, SurfaceCompositor.TRANSPARENCY_OPAQUE) // One white 2x1 shell layer at (0,0), with no dimming or selection. val header = listOf(1, 1, 0, 0, 2, 1, 256, 0, 0).flatMap { listOf(it.toByte(), (it shr 8).toByte()) }.toByteArray() - compositor.setShellScene(ArrayByteReader(header + byteArrayOf(-16, -16))) + compositor.setShellScene(ArrayByteReader(header + byteArrayOf(-16, -16) + DrawProtocol.word(0))) val wire = compositor.applyAndComposite("app", ArrayByteReader(ByteArray(6) { 32 }), 0, 0, 3, 2, "first") assertSame(wire.screenGray, wire.gray) // ShellScene.preview allocates its own pixels. assertContentEquals(ByteArray(6) { 32 }, wire.screenGray) diff --git a/tests/menu-display-list.test.cjs b/tests/menu-display-list.test.cjs index ef29615b..afb11032 100644 --- a/tests/menu-display-list.test.cjs +++ b/tests/menu-display-list.test.cjs @@ -79,7 +79,8 @@ test('unselected sidebar icons retain -2 depth through shell cropping, including '../../native/notification-icons':{},'../../native/phone-battery':{},'../../util/render-freshness':{}, '../../graphics/icons':{},'../dashboard-settings':{},'../clock-format':{},'../../graphics/bdffont':{}, '../layers':{LayerStack},'../menu':{scrollToKeepSelectionVisible:()=>0},'../metrics':{}, - './geometry':{MIN_WINDOW_HEIGHT:280,minWindowTop:()=>0,windowTop:()=>0,SHELL_OPAQUE_BLACK:1,SIDEBAR_WIDTH:64,TOP_BAR_HEIGHT:24}, + './geometry':{MIN_WINDOW_HEIGHT:280,minWindowTop:()=>0,windowTop:()=>0,SHELL_OPAQUE_BLACK:1,SIDEBAR_WIDTH:64,TOP_BAR_HEIGHT:24, + SWITCHER_ROW_HEIGHT:36,switcherPosition:()=>'left',switcherRect:()=>({x:0,y:0,width:64,height:280})}, }); const state={selectedIndex:0,focus:'sidebar',windows:[0,1,2].map(n=>({attention:n===1,drawIcon:(image,x,y)=>image.fillRect(x,y,4,4,240)}))}; const chrome=new ShellChromeLayer(()=>state),image=new graphics.GrayImage(640,480); From ee8b98d1b0ed2a78e7a50d0397abe3fa65f8ce69 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Thu, 1 Oct 2026 18:26:46 -0700 Subject: [PATCH 31/60] Refine the UI of app-switcher-on-bottom UI --- CHANGELOG | 4 ++ app/ui/dashboard-settings.ts | 7 +-- app/ui/shell/chrome-layer.ts | 84 +++++++++++++++++++++++++++++++++--- app/ui/shell/geometry.ts | 18 ++++++-- app/ui/shell/shell.ts | 7 ++- tests/app-layout.test.cjs | 79 ++++++++++++++++++++++++++++++++- 6 files changed, 186 insertions(+), 13 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6b68dd24..cccf23ec 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ # Changelog +## 0.8.2 - Future + +* Add an option to move the app switcher to the right or bottom, and adjust screen depth if bottom + ## 0.8.1 - 2026-09-30 ### Assorted Features and Bug Fixes diff --git a/app/ui/dashboard-settings.ts b/app/ui/dashboard-settings.ts index c07f7b41..6b82638f 100644 --- a/app/ui/dashboard-settings.ts +++ b/app/ui/dashboard-settings.ts @@ -367,15 +367,16 @@ export const appSwitcherPositionSetting = new ConfigSettingEnum({ diff --git a/app/ui/shell/chrome-layer.ts b/app/ui/shell/chrome-layer.ts index 30a644a3..8a6607b5 100644 --- a/app/ui/shell/chrome-layer.ts +++ b/app/ui/shell/chrome-layer.ts @@ -35,6 +35,7 @@ import { switcherPosition, switcherRect, TOP_BAR_HEIGHT, + windowFramed, windowTop, type WindowHeightMode, } from "./geometry"; @@ -291,6 +292,8 @@ export class ShellChromeLayer implements Layer { this.drawSidebar(image, state); } this.drawTopBar(image, state); + const frame = windowFrameRect(state); + if (frame) drawWindowFrame(image, frame); drawAmbientCards(image, topBarSpan(state).right); return image; } @@ -307,6 +310,20 @@ export class ShellChromeLayer implements Layer { this.drawTopBar(canvas, state); const bar = topBarSpan(state); parts.push({ ...shellCrop(canvas, bar.left, windowTop(state.foregroundHeightMode, state.foregroundAppId), bar.right - bar.left, TOP_BAR_HEIGHT, 2), depth: -2 }); + const frame = windowFrameRect(state); + if (frame) { + // Over the top bar, whose bottom row it shares, but at the screen's + // own depth rather than the bar's -2, which on top of a -62 screen + // depth would shift a side off the screen. Split into its two sides + // (corners included) and the top between them, as one surface would + // be almost all transparent. + const frameCanvas = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); + drawWindowFrame(frameCanvas, frame); + const [leftKey, rightKey, topKey] = windowFrameKeys(), sideHeight = frame.height - 1; + parts.push(shellCrop(frameCanvas, frame.x, frame.y, FRAME_RADIUS, sideHeight, leftKey)); + parts.push(shellCrop(frameCanvas, frame.x + frame.width - FRAME_RADIUS, frame.y, FRAME_RADIUS, sideHeight, rightKey)); + parts.push(shellCrop(frameCanvas, frame.x + FRAME_RADIUS, frame.y, frame.width - 2 * FRAME_RADIUS, 1, topKey)); + } drawAmbientCards(canvas, bar.right, parts); return parts; } @@ -425,7 +442,10 @@ export class ShellChromeLayer implements Layer { // mode, sidebar focused) it still stops at the strip. const { left: barLeft, right: barRight } = topBarSpan(state); image.fillRect(barLeft, barTop, barRight - barLeft, TOP_BAR_HEIGHT, SHELL_OPAQUE_BLACK); - image.drawLine(barLeft, barTop + TOP_BAR_HEIGHT - 1, barRight - 1, barTop + TOP_BAR_HEIGHT - 1, BORDER_VALUE); + // A framed window's frame draws this line as its top (drawWindowFrame). + if (!windowFramed(state.foregroundAppId)) { + image.drawLine(barLeft, barTop + TOP_BAR_HEIGHT - 1, barRight - 1, barTop + TOP_BAR_HEIGHT - 1, BORDER_VALUE); + } const now = new Date(); const clock = `${formatClockDate(now)} ${formatClockTime(now)}`; @@ -665,6 +685,55 @@ function attentionDot(value: number): GrayImage { return dot; } +type Rect = { x: number; y: number; width: number; height: number }; + +/** Corner radius of the foreground window's frame. */ +const FRAME_RADIUS = 8; + +/** + * The rounded frame around the foreground window's content (below its top + * bar), when it has one (geometry.ts windowFramed): one pixel all round. + * Its sides run down the pixel just outside each side of the window, and + * its top is the top bar's bottom row, in place of the bar's divider. Its + * bottom is the switcher row's top edge, where drawSeparator draws it so + * the selection tab can divert it. + */ +function windowFrameRect(state: ShellChromeState): Rect | null { + if (!windowFramed(state.foregroundAppId)) return null; + const viewport = appViewportRect(state.foregroundHeightMode, state.foregroundAppId); + return { x: viewport.x - 1, y: viewport.y - 1, width: viewport.width + 2, height: viewport.height + 2 }; +} + +/** Shell surface keys of the window frame's left side, right side and top. */ +let frameKeys: [number, number, number] | undefined; +function windowFrameKeys(): [number, number, number] { + if (!frameKeys) frameKeys = [LayerStack.allocateShellKey(), LayerStack.allocateShellKey(), LayerStack.allocateShellKey()]; + return frameKeys; +} + +/** + * Draw the window frame (see windowFrameRect) but for its bottom row, + * stroked line by line like the selection tab's outline. Outside each + * rounded corner it paints opaque black, so the window's square corners + * don't show past the curve. Everything but the top's straight run lies + * within FRAME_RADIUS of the sides. + */ +function drawWindowFrame(image: GrayImage, frame: Rect): void { + const { x, y, width, height } = frame; + for (let i = 0; i < height - 1; i++) { + const outer = tabInset(i, 0, height, FRAME_RADIUS); + image.fillRect(x, y + i, outer, 1, SHELL_OPAQUE_BLACK); + image.fillRect(x + width - outer, y + i, outer, 1, SHELL_OPAQUE_BLACK); + if (i === 0) { + image.fillRect(x + outer, y, width - 2 * outer, 1, BORDER_VALUE); + continue; + } + const stroke = Math.max(1, 1 + tabInset(i, 1, height - 1, FRAME_RADIUS - 1) - outer); + image.fillRect(x + outer, y + i, stroke, 1, BORDER_VALUE); + image.fillRect(x + width - outer - stroke, y + i, stroke, 1, BORDER_VALUE); + } +} + const TAB_RADIUS = 6; // How far the diversion pokes past the separator into the main area. const TAB_EXTEND = 0; @@ -681,13 +750,18 @@ function drawSeparator( gap: SwitcherCell | null, ): void { if (switcherPosition() === "bottom") { - // Along the row's top edge, the full width of the row. - const y = strip.y, right = strip.x + strip.width - 1; + // Along the row's top edge: the full width of the row, or between the + // corners of the window frame, whose bottom side this is. + const frame = windowFrameRect(state); + const inset = frame ? tabInset(frame.height - 1, 0, frame.height, FRAME_RADIUS) : 0; + const left = frame ? frame.x + inset : strip.x; + const right = frame ? frame.x + frame.width - 1 - inset : strip.x + strip.width - 1; + const y = strip.y; if (gap) { - image.drawLine(strip.x, y, gap.x, y, BORDER_VALUE); + image.drawLine(left, y, gap.x, y, BORDER_VALUE); image.drawLine(gap.x + gap.width, y, right, y, BORDER_VALUE); } else { - image.drawLine(strip.x, y, right, y, BORDER_VALUE); + image.drawLine(left, y, right, y, BORDER_VALUE); } return; } diff --git a/app/ui/shell/geometry.ts b/app/ui/shell/geometry.ts index 2a983b22..de41a0f2 100644 --- a/app/ui/shell/geometry.ts +++ b/app/ui/shell/geometry.ts @@ -29,7 +29,8 @@ export const SIDEBAR_WIDTH = 64; * same 36px (a 32px icon plus 2px either side) as a one-column sidebar slot. * The row is wide enough that it never needs the sidebar's smaller * two-column icons. It comes out of the height available to windows; their - * width stays 576, centred, leaving SIDEBAR_WIDTH / 2 at each side for the + * width stays 576, centred, leaving SIDEBAR_WIDTH / 2 at each side: one + * pixel for the side of the window's frame (windowFramed), the rest for the * whole display's stereo shift (uiDepth). */ export const SWITCHER_ROW_HEIGHT = 36; @@ -108,6 +109,17 @@ export function switcherRect(heightMode: WindowHeightMode, appId?: string): { x: } } +/** + * Whether the foreground window's content gets a rounded frame (drawn by + * the chrome layer): with a reserved bottom switcher row, whose top edge is + * the frame's bottom side, as the top bar's divider is its top. Its left and right sides take the pixel just outside + * the 576-wide window; there's no room in the full-panel mode, nor need + * beside a side strip. + */ +export function windowFramed(appId?: string): boolean { + return switcherRowHeight(appId) > 0; +} + /** * Whether a screen point lies on the switcher's side of the screen, for * touches on the phone's mirror: anywhere in a side strip's column, or from @@ -149,8 +161,8 @@ export function appViewportLeft(appId?: string): number { * Stereo depth of the whole display (Settings > Customization > Depth), in * the firmware's depth units; the shell scene carries it to the compositor, * which shifts the screen and everything drawn over it per lens. Only with - * the switcher at the bottom, where the windows' side margins leave room for - * the shift. + * the switcher at the bottom, where the windows' side margins, less the + * window frame's pixel, leave room for the shift. */ export function uiDepth(): number { return switcherPosition() === "bottom" ? Number(uiDepthSetting.get()) : 0; diff --git a/app/ui/shell/shell.ts b/app/ui/shell/shell.ts index d73f6bdf..5df8d535 100644 --- a/app/ui/shell/shell.ts +++ b/app/ui/shell/shell.ts @@ -58,6 +58,7 @@ import { switcherRowHeight, uiDepth, windowBandHeight, + windowFramed, windowTop, type WindowHeightMode, } from "./geometry"; @@ -938,7 +939,7 @@ class Shell { * foreground window's band (full height for a max-height window, the * vertical-position-dependent 288px band otherwise) plus the switcher: a * side strip's icon columns (minus the outer dead strip the one-column - * variant leaves), or the row under it. + * variant leaves), or the row under it and the window frame's sides. */ screenshotCropRect(): { x: number; y: number; width: number; height: number } { const appId = this.foregroundWindow()?.appId; @@ -950,6 +951,10 @@ class Shell { left = Math.min(left, strip.left); right = Math.max(right, strip.right); } + if (windowFramed(appId)) { + left -= 1; + right += 1; + } const y = windowTop(heightMode, appId); const bottom = y + windowBandHeight(heightMode, appId) + switcherRowHeight(appId); return { x: left, y, width: right - left, height: bottom - y }; diff --git a/tests/app-layout.test.cjs b/tests/app-layout.test.cjs index 1b451f48..49a0972c 100644 --- a/tests/app-layout.test.cjs +++ b/tests/app-layout.test.cjs @@ -85,6 +85,9 @@ test('all explicit size/position combinations stay within the display and align assert.ok(row.y + row.height <= 480); // A reserved bottom row hangs right under the window, as wide as it. if (g.switcherRowHeight(appId)) assert.deepEqual([row.x, row.y, row.width], [rect.x, rect.y + rect.height, rect.width]); + // The frame's sides, just outside the window, survive the + // deepest shift (±62 moves each lens 31px). + if (g.windowFramed(appId)) assert.ok(rect.x - 1 - 31 >= 0 && rect.x + rect.width + 31 < 640); } } } @@ -101,6 +104,7 @@ test('the app switcher can sit on the right edge', () => { assert.equal(g.screenCenterInViewportX(), 320); assert.equal(g.isOnSwitcherEdge(600, 10, 'min'), true); assert.equal(g.isOnSwitcherEdge(10, 200, 'min'), false); + assert.equal(g.windowFramed(), false); // Depth needs the bottom row's side margins. g.settings.uiDepthSetting.value = '32'; assert.equal(g.uiDepth(), 0); @@ -123,15 +127,88 @@ test('a bottom app switcher centres 576-wide windows and hangs one tall tab unde assert.equal(g.switcherRect('min').y, 444); // The true centre is the viewport's own with the window centred. assert.equal(g.screenCenterInViewportX(), 288); - // Depth applies only here. + // Depth applies only here, as does the window frame. g.settings.uiDepthSetting.value = '-48'; assert.equal(g.uiDepth(), -48); + assert.equal(g.windowFramed(), true); // Full panel: windows fill the panel and the row overlays the bottom edge while focused. g.settings.displayModeSetting.value = '640x480'; assert.deepEqual(g.rect('max'), { x: 0, y: 28, width: 640, height: 452 }); assert.deepEqual({ ...g.switcherRect('max') }, { x: 0, y: 444, width: 640, height: 36 }); assert.equal(g.sidebarStripVisible('window'), false); assert.equal(g.sidebarStripVisible('sidebar'), true); + assert.equal(g.windowFramed(), false); +}); + +test('a bottom app switcher frames the foreground window\'s content in a rounded border', () => { + const g = geometry(); + g.settings.appSwitcherPositionSetting.value = 'bottom'; + g.settings.uiDepthSetting.value = '62'; + const graphics = require('../.test-build/app/graphics/image.js'); + const shellScene = require('../.test-build/app/graphics/shell-scene.js'); + const font = { lineHeight: 12, ascent: 10, measureText: (text) => text.length * 4, drawText() {} }; + let nextKey = 100; + const modules = { + '../../graphics/shell-scene': shellScene, '../../graphics/image': graphics, + '../../graphics/ui-fonts': { getDefaultSmallFont: () => font, getDefaultMediumFont: () => font }, + './ambient-cards': { activeAmbientCards: () => [] }, + '../../native/notification-icons': { readActiveNotificationIcons: () => ({ icons: [], stale: false }) }, + '../../native/phone-battery': { readPhoneBatteryState: () => ({ battery: null }) }, + '../../util/render-freshness': { renderPassAllowsStaleData: () => false }, + '../dashboard-settings': { batteryDisplayModeSetting: { get: () => 'icon' } }, + '../clock-format': { formatClockDate: () => '', formatClockTime: () => '' }, + '../layers': { LayerStack: { allocateShellKey: () => nextKey++ } }, + '../menu': { scrollToKeepSelectionVisible: () => 0 }, + './geometry': g, + }; + const context = { exports: {}, require: (name) => modules[name] ?? {} }; + vm.runInNewContext(js(read('app/ui/shell/chrome-layer.ts')), context); + const state = { + windows: [{ attention: false, drawIcon() {} }], selectedIndex: 0, focus: 'window', foregroundHeightMode: 'min', + battery: { headset: null, ring: null, watch: null }, trayIcons: [], + }; + const chrome = new context.exports.ShellChromeLayer(() => state); + const parts = chrome.paintParts(); + // The min band's content spans y=106..365, between the bar's bottom row + // (the frame's top) at 105 and the row's top edge (its bottom) at 366. + const part = (key) => parts.find((p) => p.shellKey === key); + const [left, right, top, strip] = [part(100), part(101), part(102), part(1)]; + assert.deepEqual([left.x, left.y, left.image.width, left.image.height], [31, 105, 8, 261]); + assert.deepEqual([right.x, right.image.width], [601, 8]); + assert.deepEqual([top.x, top.y, top.image.width, top.image.height], [39, 105, 562, 1]); + assert.ok(!left.depth && !right.depth && !top.depth); + const at = (p, x, y) => p.image.pixels[(y - p.y) * p.image.width + x - p.x]; + // Straight sides just outside the window; the top along the bar's bottom row. + assert.equal(at(left, 31, 200), 40); + assert.equal(at(right, 608, 200), 40); + assert.equal(at(top, 300, 105), 40); + // Rounded corners: black outside the curve, the window's own corner masked. + assert.equal(at(left, 31, 105), 1); + assert.equal(at(left, 36, 105), 40); + assert.equal(at(left, 32, 106), 1); + assert.equal(at(left, 32, 365), 1); + assert.equal(at(right, 607, 365), 1); + // The separator is the bottom side, starting where the corner's curve ends. + assert.equal(at(strip, 35, 366), 1); + assert.equal(at(strip, 36, 366), 40); + assert.equal(at(strip, 603, 366), 40); + assert.equal(at(strip, 604, 366), 1); + // Parts after the -2 top bar, so the frame draws over it. + assert.ok(parts.indexOf(part(2)) < parts.indexOf(left)); + shellScene.encodeShellScene(parts, g.uiDepth()); + // The flat paint matches. The bar's own divider gives way to the frame's + // top, and the frame stops short of the bar. + const image = chrome.paint(); + assert.equal(image.pixels[200 * 640 + 31], 40); + assert.equal(image.pixels[200 * 640 + 608], 40); + assert.equal(image.pixels[105 * 640 + 33], 1); + assert.equal(image.pixels[105 * 640 + 300], 40); + assert.equal(image.pixels[90 * 640 + 31], 0); + const bar = part(2); + assert.equal(bar.image.pixels[(105 - bar.y) * bar.image.width + 300 - bar.x], 1); + // No frame in the full-panel mode. + g.settings.displayModeSetting.value = '640x480'; + assert.equal(chrome.paintParts().filter((p) => p.shellKey >= 100).length, 0); }); // Exercise the real worker message handler with platform work stubbed out. From 566592c074944bff5c621212772bacf9c10023c7 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Thu, 1 Oct 2026 20:23:22 -0700 Subject: [PATCH 32/60] Add Dense style for battery indicators --- app/apps/glanceboard/widgets/system-card.ts | 28 ++-- app/apps/microphones/microphones-app.ts | 2 +- app/apps/transcribe/transcribe-app.ts | 2 +- app/graphics/battery.ts | 155 ++++++++++++++++++-- app/graphics/image.ts | 17 ++- app/ui/dashboard-settings.ts | 7 +- app/ui/shell/chrome-layer.ts | 30 ++-- tests/ascii-art.test.cjs | 19 +++ tests/dense-batteries.test.cjs | 87 +++++++++++ tests/tsconfig.json | 1 + 10 files changed, 309 insertions(+), 39 deletions(-) create mode 100644 tests/ascii-art.test.cjs create mode 100644 tests/dense-batteries.test.cjs diff --git a/app/apps/glanceboard/widgets/system-card.ts b/app/apps/glanceboard/widgets/system-card.ts index 4c363b39..c952b67d 100644 --- a/app/apps/glanceboard/widgets/system-card.ts +++ b/app/apps/glanceboard/widgets/system-card.ts @@ -1,4 +1,4 @@ -import { BATTERY_ICON_WIDTH, drawBattery } from "../../../graphics/battery"; +import { BATTERY_ICON_WIDTH, drawBattery, drawDenseBatteries, type BatteryDevice } from "../../../graphics/battery"; import { type GrayImage, type UiFont } from "../../../graphics/image"; import { onAndroidNotificationPosted, readActiveNotificationIcons } from "../../../native/notification-icons"; import { readPhoneBatteryState } from "../../../native/phone-battery"; @@ -28,7 +28,7 @@ const NOTIFICATION_ICON_GAP = 4; const BATTERY_ITEM_GAP = 12; const BATTERY_LABEL_VALUE = 150; -type BatteryItem = { label: string; percent: number; charging: boolean }; +type BatteryItem = { label: string; device: BatteryDevice; percent: number; charging: boolean }; /** * Date and time, the phone's notification icons, the phone/watch/G2/R1 @@ -130,19 +130,25 @@ export class SystemCardWidget implements GlanceWidget { function collectBatteryItems(): BatteryItem[] { const items: BatteryItem[] = []; - const push = (visibility: BatteryIndicatorVisibility, label: string, percent: number | null, charging: boolean | null) => { + const push = ( + visibility: BatteryIndicatorVisibility, + label: string, + device: BatteryDevice, + percent: number | null, + charging: boolean | null, + ) => { if (percent === null || !Number.isFinite(percent)) return; const clamped = Math.max(0, Math.min(100, Math.round(percent))); if (!batteryIndicatorVisible(visibility, clamped)) return; - items.push({ label, percent: clamped, charging: Boolean(charging) }); + items.push({ label, device, percent: clamped, charging: Boolean(charging) }); }; const phone = readPhoneBatteryState(); - push(phoneBatteryVisibilitySetting.get(), "Phone", phone.battery, phone.charging); + push(phoneBatteryVisibilitySetting.get(), "Phone", "phone", phone.battery, phone.charging); const levels = shell.getBatteryLevels(); - push(watchBatteryVisibilitySetting.get(), "Watch", levels.watch, levels.watchCharging); - push(glassesBatteryVisibilitySetting.get(), "G2", levels.headset, levels.headsetCharging); + push(watchBatteryVisibilitySetting.get(), "Watch", "watch", levels.watch, levels.watchCharging); + push(glassesBatteryVisibilitySetting.get(), "G2", "glasses", levels.headset, levels.headsetCharging); if (levels.ring !== null && Number.isInteger(levels.ring) && levels.ring >= 0 && levels.ring <= 100) { - push(ringBatteryVisibilitySetting.get(), "R1", levels.ring, levels.ringCharging); + push(ringBatteryVisibilitySetting.get(), "R1", "ring", levels.ring, levels.ringCharging); } return items; } @@ -150,13 +156,15 @@ function collectBatteryItems(): BatteryItem[] { /** * The battery indicators right-aligned at `right`, in the configured style. * Side-by-side styles put the label beside the gauge (or percentage) on one - * line; stacked styles centre the label above it. Returns the block's left - * edge (or `right` when nothing is shown). + * line; stacked styles centre the label above it; the dense style swaps + * labels for device icons and stacks two indicators per column, as in the + * top bar. Returns the block's left edge (or `right` when nothing is shown). */ function drawBatteryBlock(image: GrayImage, font: UiFont, right: number, top: number): number { const items = collectBatteryItems(); if (!items.length) return right; const mode = batteryDisplayModeSetting.get(); + if (mode === "dense") return drawDenseBatteries(image, items, right, top); const percentage = mode === "percentage" || mode === "stacked-percentage"; const stacked = mode === "stacked" || mode === "stacked-percentage"; const gaugeHeight = drawBattery(0, false).height; diff --git a/app/apps/microphones/microphones-app.ts b/app/apps/microphones/microphones-app.ts index ef0d491e..f567e651 100644 --- a/app/apps/microphones/microphones-app.ts +++ b/app/apps/microphones/microphones-app.ts @@ -60,7 +60,7 @@ const TRAY_ICON = imageFromAsciiArt( " # # ", " ### ### ", ], - 220, + { "#": 220 }, ); const MENU_LAYOUT = { diff --git a/app/apps/transcribe/transcribe-app.ts b/app/apps/transcribe/transcribe-app.ts index b0a17639..21ac40d4 100644 --- a/app/apps/transcribe/transcribe-app.ts +++ b/app/apps/transcribe/transcribe-app.ts @@ -32,7 +32,7 @@ const MIC_ICON = imageFromAsciiArt( " # ", " ###### ", ], - 220, + { "#": 220 }, ); export type TranscribeAppOptions = InProcessAppOptions & { diff --git a/app/graphics/battery.ts b/app/graphics/battery.ts index e3b0e1f0..3c8a66fe 100644 --- a/app/graphics/battery.ts +++ b/app/graphics/battery.ts @@ -34,17 +34,154 @@ export const BATTERY_ICON_WIDTH = BODY_WIDTH + NUB_WIDTH; const BATTERY_BOLT_ICON = imageFromAsciiArt( [ - "....#..", - "...##..", - "..##...", - ".######", - "...##..", - "..##...", - "..#....", - ], - 255, + " # ", + " ## ", + " ## ", + " ######", + " ## ", + " ## ", + " # ", + ], { + "#": 255, + " ": 0, + }, ); +const PHONE_ICON = imageFromAsciiArt( + [ + " ###### ", + " #//### ", + " #//### ", + " ###### ", + " ###### ", + " ###### ", + " ###### ", + " ###### ", + " ###### ", + " ###### ", + ], { + "#": 255, + "/": 64, + " ": 0, + } +); + +const GLASSES_ICON = imageFromAsciiArt( + [ + " _ _ ", + "# #", + "# #", + "# #", + "# #", + "####/ /####", + "#___###___#", + "#___# #___#", + " ### ### ", + " ", + ], { + "#": 255, + "/": 192, + "_": 32, + " ": 0, + } +); + +const WATCH_ICON = imageFromAsciiArt( + [ + " // ", + " // ", + " // ", + " #### ", + " #!!# ", + " #!!# ", + " #### ", + " // ", + " // ", + " // ", + ], { + "#": 255, + "!": 192, + "/": 140, + " ": 0, + } +); + +const RING_ICON = imageFromAsciiArt( + [ + " /###/ ", + " /#####/ ", + "/# #/", + "# #", + "# #", + "# #", + "/# #/", + " /# #/ ", + " /###/ ", + " ", + ], { + "#": 255, + "/": 96, + " ": 0, + }, +); + +/** A device with a battery indicator, for the dense style's icon labels. */ +export type BatteryDevice = "phone" | "watch" | "glasses" | "ring"; + +const DEVICE_ICONS: Readonly> = { + phone: PHONE_ICON, + watch: WATCH_ICON, + glasses: GLASSES_ICON, + ring: RING_ICON, +}; + +export type DenseBatteryItem = { device: BatteryDevice; percent: number; charging: boolean }; + +/** Clear rows between the two indicators in a dense column. */ +const DENSE_ROW_GAP = 2; +/** Clear columns between a device icon's slot and its gauge. */ +const DENSE_ICON_GAP = 3; +const DENSE_COLUMN_GAP = 8; + +/** Height of a dense block: two indicator rows and the gap between them. */ +export const DENSE_BATTERY_BLOCK_HEIGHT = 2 * ICON_HEIGHT + DENSE_ROW_GAP; + +/** + * Dense style: each device's icon to the left of its gauge, two indicators + * stacked per column, columns right-aligned at `right` with `top` the upper + * row's top edge. Columns pair from the right, so an odd count leaves the + * first indicator alone in the leftmost column, centered vertically. Within + * a column the gauges line up and each icon is centered in a slot as wide as + * the column's widest icon. Returns the block's left edge (`right` when there + * are no items). + */ +export function drawDenseBatteries( + image: GrayImage, + items: readonly DenseBatteryItem[], + right: number, + top: number, +): number { + if (!items.length) return right; + let x = right; + for (let end = items.length; end > 0; end -= 2) { + const column = items.slice(Math.max(0, end - 2), end); + const slotWidth = Math.max(...column.map((item) => DEVICE_ICONS[item.device].width)); + x -= slotWidth + DENSE_ICON_GAP + BATTERY_ICON_WIDTH; + const firstRowTop = column.length === 2 ? top : top + (((DENSE_BATTERY_BLOCK_HEIGHT - ICON_HEIGHT) / 2) | 0); + for (let row = 0; row < column.length; row++) { + const item = column[row]!; + const rowTop = firstRowTop + row * (ICON_HEIGHT + DENSE_ROW_GAP); + const icon = DEVICE_ICONS[item.device]; + image.bitBlt(icon, x + (((slotWidth - icon.width) / 2) | 0), rowTop, { transparentZero: true }); + image.bitBlt(drawBattery(item.percent, item.charging), x + slotWidth + DENSE_ICON_GAP, rowTop, { + transparentZero: true, + }); + } + x -= DENSE_COLUMN_GAP; + } + return x + DENSE_COLUMN_GAP; +} + /** The empty outline, built once from the geometry constants. */ const EMPTY_BATTERY_ICON = buildEmptyBattery(); diff --git a/app/graphics/image.ts b/app/graphics/image.ts index 340fbccf..f36a0dd7 100644 --- a/app/graphics/image.ts +++ b/app/graphics/image.ts @@ -8,17 +8,24 @@ export const G2_LENS_WIDTH = 640; export const G2_LENS_HEIGHT = 480; const DEFAULT_CORNER_RADIUS = 8; -export function imageFromAsciiArt(lines: readonly string[], value = 255): GrayImage { +/** + * Maps ASCII-art characters to gray levels 0-255. Space and "." are 0 unless + * the palette overrides them; any other character must have an entry. + */ +export type AsciiArtPalette = Readonly>; + +export function imageFromAsciiArt(lines: readonly string[], palette: AsciiArtPalette): GrayImage { const width = Math.max(0, ...lines.map((line) => line.length)); const image = new GrayImage(width, lines.length, 0); - const fill = clampByte(value); for (let y = 0; y < lines.length; y++) { const line = lines[y]!; for (let x = 0; x < line.length; x++) { - const pixel = line[x]; - if (pixel && pixel !== " " && pixel !== ".") { - image.pixels[y * width + x] = fill; + const pixel = line[x]!; + const value = palette[pixel] ?? (pixel === " " || pixel === "." ? 0 : undefined); + if (value === undefined) { + throw new Error(`imageFromAsciiArt: no palette entry for ${JSON.stringify(pixel)}`); } + image.pixels[y * width + x] = clampByte(value); } } return image; diff --git a/app/ui/dashboard-settings.ts b/app/ui/dashboard-settings.ts index 8ae9c943..b4a44548 100644 --- a/app/ui/dashboard-settings.ts +++ b/app/ui/dashboard-settings.ts @@ -27,7 +27,7 @@ export type NightscoutSettings = { siteUrl: string; apiToken: string; }; -export type BatteryDisplayMode = "icon" | "percentage" | "stacked" | "stacked-percentage"; +export type BatteryDisplayMode = "icon" | "percentage" | "stacked" | "stacked-percentage" | "dense"; /** When a top-bar battery indicator is shown: always, only below 50%, or never. */ export type BatteryIndicatorVisibility = "always" | "low" | "never"; export type TimeFormat = "24h" | "12h"; @@ -235,9 +235,9 @@ export const batteryDisplayModeSetting = new ConfigSettingEnum Customization > Battery indicators submenu picks the style (label beside a gauge icon or percentage, or stacked above - * either) and, per device, whether the indicator shows always, only below - * 50%, or never. Returns the left edge of the battery block. + * The Settings > Customization > Battery indicators submenu picks the + * style (label beside a gauge icon or percentage, stacked above either, or + * dense: device icons beside gauges, two per column) and, per device, + * whether the indicator shows always, only below 50%, or never. Returns + * the left edge of the battery block. */ private drawTopBarBatteries(image: GrayImage, state: ShellChromeState, barTop: number): number { const mode = batteryDisplayModeSetting.get(); const items: BatteryItem[] = []; const phone = readPhoneBatteryState(); if (phone.battery !== null && Number.isFinite(phone.battery)) { - pushBatteryItem(items, phoneBatteryVisibilitySetting.get(), "Phone", phone.battery, Boolean(phone.charging)); + pushBatteryItem(items, phoneBatteryVisibilitySetting.get(), "Phone", "phone", phone.battery, Boolean(phone.charging)); } if (state.battery.watch !== null && Number.isFinite(state.battery.watch)) { - pushBatteryItem(items, watchBatteryVisibilitySetting.get(), "Watch", state.battery.watch, + pushBatteryItem(items, watchBatteryVisibilitySetting.get(), "Watch", "watch", state.battery.watch, Boolean(state.battery.watchCharging)); } if (state.battery.headset !== null && Number.isFinite(state.battery.headset)) { - pushBatteryItem(items, glassesBatteryVisibilitySetting.get(), "G2", state.battery.headset, + pushBatteryItem(items, glassesBatteryVisibilitySetting.get(), "G2", "glasses", state.battery.headset, Boolean(state.battery.headsetCharging)); } if (state.battery.ring !== null && Number.isInteger(state.battery.ring) && state.battery.ring >= 0 && state.battery.ring <= 100) { - pushBatteryItem(items, ringBatteryVisibilitySetting.get(), "R1", state.battery.ring, + pushBatteryItem(items, ringBatteryVisibilitySetting.get(), "R1", "ring", state.battery.ring, Boolean(state.battery.ringCharging)); } if (!items.length) return G2_LENS_WIDTH; if (mode === "stacked" || mode === "stacked-percentage") { return drawStackedBatteries(image, items, barTop, mode === "stacked-percentage"); } + if (mode === "dense") { + return drawDenseBatteries(image, items, G2_LENS_WIDTH - BATTERY_BLOCK_RIGHT_MARGIN, barTop + DENSE_TOP); + } const font = getDefaultSmallFont(); const percentageMode = mode === "percentage"; @@ -440,7 +445,7 @@ export class ShellChromeLayer implements Layer { } } -type BatteryItem = { label: string; percent: number; charging: boolean }; +type BatteryItem = { label: string; device: BatteryDevice; percent: number; charging: boolean }; const BATTERY_BLOCK_RIGHT_MARGIN = 8; const BATTERY_LABEL_VALUE = 150; @@ -450,12 +455,13 @@ function pushBatteryItem( items: BatteryItem[], visibility: BatteryIndicatorVisibility, label: string, + device: BatteryDevice, percent: number, charging: boolean, ): void { const clamped = Math.max(0, Math.min(100, Math.round(percent))); if (!batteryIndicatorVisible(visibility, clamped)) return; - items.push({ label, percent: clamped, charging }); + items.push({ label, device, percent: clamped, charging }); } // Stacked style geometry, in rows below the bar's top edge. The bar has 27 @@ -472,6 +478,10 @@ const STACKED_ICON_TOP = 13; const STACKED_PERCENT_BASELINE = 21; const STACKED_ITEM_GAP = 10; +// Dense style: two 10px indicator rows with a 2px gap span rows 2..23, the +// same vertical center as the stacked styles' ink. +const DENSE_TOP = (((TOP_BAR_HEIGHT - 1 - DENSE_BATTERY_BLOCK_HEIGHT) / 2) | 0); + /** * Stacked styles: each label centered above its gauge icon (or percentage * text), right-aligned in the bar. Returns the left edge of the battery diff --git a/tests/ascii-art.test.cjs b/tests/ascii-art.test.cjs new file mode 100644 index 00000000..85e48a78 --- /dev/null +++ b/tests/ascii-art.test.cjs @@ -0,0 +1,19 @@ +const test = require('node:test'); +const assert = require('node:assert/strict'); +const { imageFromAsciiArt } = require('../.test-build/app/graphics/image.js'); + +test('imageFromAsciiArt maps characters through the palette', () => { + const image = imageFromAsciiArt(['#/.', ' _#'], { '#': 255, '/': 128, '_': 64 }); + assert.equal(image.width, 3); + assert.equal(image.height, 2); + assert.deepEqual([...image.pixels], [255, 128, 0, 0, 64, 255]); +}); + +test('imageFromAsciiArt pads short lines and lets the palette override the background', () => { + const image = imageFromAsciiArt(['.#', '.'], { '#': 300, '.': 10 }); + assert.deepEqual([...image.pixels], [10, 255, 10, 0]); +}); + +test('imageFromAsciiArt rejects characters missing from the palette', () => { + assert.throws(() => imageFromAsciiArt(['#x'], { '#': 255 }), /"x"/); +}); diff --git a/tests/dense-batteries.test.cjs b/tests/dense-batteries.test.cjs new file mode 100644 index 00000000..0d446718 --- /dev/null +++ b/tests/dense-batteries.test.cjs @@ -0,0 +1,87 @@ +const test = require('node:test'); +const assert = require('node:assert/strict'); +const { GrayImage } = require('../.test-build/app/graphics/image.js'); +const { + BATTERY_ICON_WIDTH, + DENSE_BATTERY_BLOCK_HEIGHT, + drawBattery, + drawDenseBatteries, +} = require('../.test-build/app/graphics/battery.js'); + +const RIGHT = 120; +const TOP = 4; +const LOWER_ROW = DENSE_BATTERY_BLOCK_HEIGHT - drawBattery(0, false).height; + +/** Every top-left position where exactly this gauge was drawn. */ +function findGauges(image, percent, charging) { + const gauge = drawBattery(percent, charging); + const found = []; + for (let y = 0; y + gauge.height <= image.height; y++) { + for (let x = 0; x + gauge.width <= image.width; x++) { + let match = true; + for (let gy = 0; match && gy < gauge.height; gy++) { + for (let gx = 0; match && gx < gauge.width; gx++) { + match = image.pixels[(y + gy) * image.width + x + gx] === gauge.pixels[gy * gauge.width + gx]; + } + } + if (match) found.push({ x, y }); + } + } + return found; +} + +function hasInk(image, x0, x1, y0, y1) { + for (let y = y0; y < y1; y++) { + for (let x = x0; x < x1; x++) { + if (image.pixels[y * image.width + x] > 0) return true; + } + } + return false; +} + +function gaugeAt(image, percent, charging = false) { + const found = findGauges(image, percent, charging); + assert.equal(found.length, 1, `one ${percent}% gauge`); + return found[0]; +} + +test('dense batteries stack two per column, right-aligned', () => { + const image = new GrayImage(RIGHT + 8, 32, 0); + const left = drawDenseBatteries(image, [ + { device: 'phone', percent: 80, charging: false }, + { device: 'watch', percent: 35, charging: true }, + { device: 'glasses', percent: 60, charging: false }, + { device: 'ring', percent: 100, charging: false }, + ], RIGHT, TOP); + const phone = gaugeAt(image, 80); + const watch = gaugeAt(image, 35, true); + const glasses = gaugeAt(image, 60); + const ring = gaugeAt(image, 100); + assert.deepEqual(glasses, { x: RIGHT - BATTERY_ICON_WIDTH, y: TOP }); + assert.deepEqual(ring, { x: RIGHT - BATTERY_ICON_WIDTH, y: TOP + LOWER_ROW }); + assert.equal(phone.y, TOP); + assert.deepEqual(watch, { x: phone.x, y: TOP + LOWER_ROW }); + // Each gauge has its device icon to its left. + assert.ok(hasInk(image, left, phone.x, TOP, TOP + 10)); + assert.ok(hasInk(image, left, watch.x, TOP + LOWER_ROW, TOP + LOWER_ROW + 10)); + assert.ok(hasInk(image, phone.x + BATTERY_ICON_WIDTH, glasses.x, TOP, TOP + 10)); + assert.ok(hasInk(image, watch.x + BATTERY_ICON_WIDTH, ring.x, TOP + LOWER_ROW, TOP + LOWER_ROW + 10)); +}); + +test('an odd count leaves the first indicator alone, vertically centered', () => { + const image = new GrayImage(RIGHT + 8, 32, 0); + drawDenseBatteries(image, [ + { device: 'phone', percent: 80, charging: false }, + { device: 'glasses', percent: 60, charging: false }, + { device: 'ring', percent: 20, charging: false }, + ], RIGHT, TOP); + assert.equal(gaugeAt(image, 80).y, TOP + LOWER_ROW / 2); + assert.deepEqual(gaugeAt(image, 60), { x: RIGHT - BATTERY_ICON_WIDTH, y: TOP }); + assert.deepEqual(gaugeAt(image, 20), { x: RIGHT - BATTERY_ICON_WIDTH, y: TOP + LOWER_ROW }); +}); + +test('no indicators draws nothing', () => { + const image = new GrayImage(RIGHT + 8, 32, 0); + assert.equal(drawDenseBatteries(image, [], RIGHT, TOP), RIGHT); + assert.ok(image.pixels.every((value) => value === 0)); +}); diff --git a/tests/tsconfig.json b/tests/tsconfig.json index fe42d759..1adf047c 100644 --- a/tests/tsconfig.json +++ b/tests/tsconfig.json @@ -20,6 +20,7 @@ "../app/apps/terminal/hub-header.ts", "../app/g2/ios-peripheral-identity.ts", "../app/graphics/image.ts", + "../app/graphics/battery.ts", "../app/graphics/plane.ts", "../app/graphics/shell-scene.ts", "../app/ui/metrics.ts", From 756e21feb83c37518d842ef8ddf3acf7b61b05d7 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Fri, 2 Oct 2026 00:45:17 -0700 Subject: [PATCH 33/60] Option to combine top bar with the app switcher --- app/g2/dashboard-controller.ts | 11 +- app/g2/firmware-compat.ts | 2 +- app/g2/firmware/cfw-patches.ts | 16 +- app/graphics/display-list.ts | 25 +- app/ui/dashboard-settings.ts | 19 ++ app/ui/dashboard/settings-menus.ts | 6 +- app/ui/shell/chrome-layer.ts | 218 ++++++++++++------ app/ui/shell/geometry.ts | 45 ++-- app/ui/shell/shell.ts | 3 +- .../com/faceclaw/app/g2protocol/DrawFlags.kt | 2 + .../faceclaw/app/g2protocol/DrawProtocol.kt | 10 +- .../app/graphics/DisplayListRenderer.kt | 7 +- .../faceclaw/app/graphics/FrameDisplayList.kt | 8 +- tests/app-layout.test.cjs | 194 +++++++++++----- tests/display-list-authoring.test.cjs | 28 ++- .../kotlin/com/faceclaw/app/DrawWireTest.kt | 4 +- .../com/faceclaw/app/FrameDisplayListTest.kt | 28 ++- tests/menu-display-list.test.cjs | 2 +- tests/menu-scroll-animation.test.cjs | 2 +- 19 files changed, 462 insertions(+), 168 deletions(-) diff --git a/app/g2/dashboard-controller.ts b/app/g2/dashboard-controller.ts index b8d9ae6f..1c504cb0 100644 --- a/app/g2/dashboard-controller.ts +++ b/app/g2/dashboard-controller.ts @@ -71,7 +71,7 @@ import { loadPersistedOpenApps, savePersistedOpenApps } from "../ui/shell/open-a import { appViewportRect, isOnSwitcherEdge, sidebarStripVisible, type WindowHeightMode } from "../ui/shell/geometry"; import { type LayerActions, type TextSettingsEditToggle } from "../ui/layers"; import { type KeyboardInputSession } from "../ui/shell/keyboard-input"; -import { appSwitcherPositionSetting, assistantAllowProactiveSetting, assistantBackendSetting, assistantBridgeHostSetting, assistantBridgePortSetting, assistantBridgeTokenSetting, getBrightnessPreferences, displayModeSetting, navigateDisplayModeSetting, navigateVerticalPositionSetting, terminalDisplayModeSetting, terminalVerticalPositionSetting, elevenLabsApiKeySetting, getStringSettingById, openAiApiKeySetting, nightscoutApiTokenSetting, firmwareDebugFlagsSetting, lockScreenEnabledSetting, nightscoutSiteUrlSetting, onAnySettingChanged, previewColorSetting, ringConnectionModeSetting, saveVoiceRecordingsSetting, sonioxApiKeySetting, screenTimeoutSetting, screenTimeoutSettingToMs, suspendEvenHubWhenScreenOffSetting, verticalPositionSetting, voiceProviderSetting, wakeWordActionSetting, type ConfigSettingString } from "../ui/dashboard-settings"; +import { appSwitcherPositionSetting, statusBarPositionSetting, assistantAllowProactiveSetting, assistantBackendSetting, assistantBridgeHostSetting, assistantBridgePortSetting, assistantBridgeTokenSetting, getBrightnessPreferences, displayModeSetting, navigateDisplayModeSetting, navigateVerticalPositionSetting, terminalDisplayModeSetting, terminalVerticalPositionSetting, elevenLabsApiKeySetting, getStringSettingById, openAiApiKeySetting, nightscoutApiTokenSetting, firmwareDebugFlagsSetting, lockScreenEnabledSetting, nightscoutSiteUrlSetting, onAnySettingChanged, previewColorSetting, ringConnectionModeSetting, saveVoiceRecordingsSetting, sonioxApiKeySetting, screenTimeoutSetting, screenTimeoutSettingToMs, suspendEvenHubWhenScreenOffSetting, verticalPositionSetting, voiceProviderSetting, wakeWordActionSetting, type ConfigSettingString } from "../ui/dashboard-settings"; import { isIgnoringBatteryOptimizations, requestIgnoreBatteryOptimizations } from "../native/battery-optimization"; import { getInstalledEvenHubAppById, @@ -182,11 +182,14 @@ const EVEN_APP_DETECTED_MESSAGE = const LAUNCHABLE_APPS = ALL_APPS.filter((app) => app.showInLauncher !== false); /** - * The global settings window viewport sizes depend on: the display mode, and - * whether the app switcher takes width beside windows or height below them. + * The global settings window viewport sizes depend on: the display mode, + * whether the app switcher takes width beside windows or height below them, + * and, below them, whether the status bar joins it (dropping the top bar). */ function viewportSizesKey(): string { - return `${displayModeSetting.get()}|${appSwitcherPositionSetting.get() === "bottom" ? "row" : "strip"}`; + const switcher = appSwitcherPositionSetting.get() !== "bottom" ? "strip" + : statusBarPositionSetting.get() === "switcher" ? "row+status" : "row"; + return `${displayModeSetting.get()}|${switcher}`; } /** The global settings that move window surfaces without resizing them. */ diff --git a/app/g2/firmware-compat.ts b/app/g2/firmware-compat.ts index a52a311f..e5c0c17f 100644 --- a/app/g2/firmware-compat.ts +++ b/app/g2/firmware-compat.ts @@ -26,7 +26,7 @@ export type FirmwareInfo = { }; /** The Faceclaw firmware revision this build of the app needs. */ -export const REQUIRED_FACECLAW_FIRMWARE_VERSION = 35; +export const REQUIRED_FACECLAW_FIRMWARE_VERSION = 36; const FACECLAW_PREFIX = "Faceclaw/"; const LEGACY_PREFIX = "EVENCFW"; diff --git a/app/g2/firmware/cfw-patches.ts b/app/g2/firmware/cfw-patches.ts index 7e871139..407735aa 100644 --- a/app/g2/firmware/cfw-patches.ts +++ b/app/g2/firmware/cfw-patches.ts @@ -19,7 +19,7 @@ export type FirmwarePatchSet = { export const CFW_PATCH_SET: FirmwarePatchSet = { "base": "g2_2.3.0.24.bin", "baseSha256": "187ccf2bcc5c17a212106e8a376745511e8289c4232b634a7ea94b9bf25a0979", - "outputSha256": "354f23f88a4aaf9c56cf62078bf13e814faa25b1fbb4dc69a7754110d6502386", + "outputSha256": "0c262bee7ee38b3387426933a8abd631cd6caed9896ababfcd881224686631f8", "patches": [ { "offset": 1045797, @@ -210,43 +210,43 @@ export const CFW_PATCH_SET: FirmwarePatchSet = { { "offset": 4537963, "old": "", - "new": "b0b581ea00039b0701d0034637e0c2b110f0030315d000f1010ca2f1010e0023cc5c9e45c45403f1010404d0634413f003032346f4d121440319121b102a14d302e00346102a10d3d1f800c0d1f804e0cc688d68103adc609d60c3f804e043f810cb0f2a01f11001eed8042a07d300bf51f8045b043a032a43f8045bf8d8002a08bfb0bd0139013b11f8015f013a03f8015ff9d1b0bd00bf884218bf002a00d1704710b50b1a38bf431a934207d288420ad281ea00039b0726d0034669e0fff79fffbde81040704781ea000300eb020c9b0701eb020e42d15fea8c732bd0a0f1010c00bf8b1813f801ec8418531e04f801ec04d0624412f003021a46f2d101eb030e00eb030c17e0830736d0a2f1010c00f1010e002300bfcc5c9c45c45403f1010404d0734413f003032346f4d1121b2144031922e01346042b0ed3aef10402acf1040152f80449043b032b41f80449f8d802f1040e01f1040c1a4653b1aef10101acf1010300bf11f80149013a03f80149f9d1bde8104070470346042a06d351f8044b043a032a43f8044bf8d8002af0d00139013b00bf11f8014f013a03f8014ff9d1e6e700bf80b5002a18bf10f0030301d186460ce000f1010c864600bf013a0ef8011b04d01cf003030cf1010cf6d1102a11d35ffa81fc4ff001330cfb03fc00bf103acef80cc0cef808c0cef804c04ef810cb0f2af4d8042a0bd35ffa81fc4ff001330cfb03fc00bf043a032a4ef804cbfad8002a08bf80bdaef10103013a03f8011ffbd180bd00bf2de9f04fc7b04ff29c5bc2f2290b4ff6ff754ff47d7400274ff0010847f67f7a7f261191cde90f3007e000bf48f2a351c0f24501bff32f8f8847dbf80090bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14068b0f57d7f00f096804ff47d7006f0c8fc002800f0c8814ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff010160446080f80e80a0f8c4a180f8c361058445848584c584058545858585c585058645868586c586058745878587c5875be8001f49457ff452afbff35f8f4be8000121b15be8001f4945f8d047e74ff47d7800274ff0010a47f67f797f2607e000bf48f2a351c0f24501bff32f8f8847dbf80040bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f098804ff47d7006f006fc002800f006814ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff010160c0f8048080f80ea0a0f8c49180f8c361058445848584c584058545858585c585058645868586c586058745878587c5875be8001fa1427ff451afbff35f8f00bf4be8000121b15be8001fa142f8d045e7d0f8944242f6f76ac0f2440a002cbff35f8f4bd00af19a0220464ff0ff314ff0ff379047002840f09081119800285fd010980778a7f11700022859d811980c2840f07d81109b58789978084300f07781d8780138022800f272819a79d9795e7a42ea0122197a187942ea014242ea06619a7ade7a93f805c0192f42ea062200f0c981172f40f0df81002a40f05881fe2800f03e86812800f03086002840f045865cea010040f04b8100f092be04460020d047d0b104f5257151e8004f5cb9bff35f8f00bf41e80002002a00f0e38051e8004f002cf6d00021bff32f8f0029bff35f8f00f0d380044694e74ff0ff372ce147f6df40c0f24f000e94804700274ff47d784ff0010947f67f744ff07f0a1397adf8507007e000bf48f2a351c0f24501bff32f8f8847dbf80060bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f09f804ff47d7006f0c0fa002800f097804ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff010160c0f8048080f80e90a0f8c44180f8c3a1058445848584c584058545858585c585058645868586c586058745878587c5875be8001fb1427ff451afbff35f8f00bf4be8000159b15be8001fb142f8d045e70af5a9718847bfe6012121e70020109f42f6f76ac0f2440a9fb1119989b1397801f07f02b2f10b0418bf0124b2f11c0618bf01268a2928dc0b292ad01c2928d041e00f9012a803f037ff4ff0ff374ff001080e9c9df85100002812a818bf4ff0ff3704f04ff8b8f1000f054608d19df8500028b94af21f30c0f247004c3080470f98002818bf056115e09c2901d08b2919d168b14af21f31c0f247010746884797f8681121b997f824133846109f51b10e9c4ff0ff370af5807120468847384647b0bde8f08f0f9012a804ea060803f0f3fe387800f07f041e2c05d11199384607f048fe0746b4e71d2c00f07e0018bf1a2819d1dbf800100322cff680720a40b2f1005fbff35f8f12d10a684ef66c63ccf2ff039a420bd14a68b2f57d7f04bf002281f8a12303e0a4f115010129e1d90f2c12dc092c00f31781052c00f0c982072c40f0c183cdf8348000274ff0010947f67f764ff07f0852e0142c00f3ea81102c00f08083112c40f0ae8311980e9c022806d13878112803d17878002800f09a864ff0ff3765e7bcf1000f4ff0ff3708bf00298fd11328bff48daf102a4ff0000138bf01211228b2fa82f218bf510901297ff480af00f0c5bc182f4ff0ff3708bfbcf1000f7ff476af00297ff473af352800f34284002800f09c84012800f0a884312840f09a84082abff464af00f0a9bc48f2a351c0f24501bff32f8f8847dbf80040bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f000864ff47d7006f00df9002800f0f8854ff60c41cff6ff7142182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff0101604ff47d71416080f80e90a0f8c46180f8c381058445848584c584058545858585c585058645868586c586058745878587c5875be8001fa1427ff451afbff35f8f4be80001002900f06c855be8001fa142f6d044e70a2c00f083820b2c40f0aa82dbf800500320cff68070bff35f8f28400e9cb0f1005f40f08a8528684ef66c61ccf2ff01884240f0828568680027b0f57d7f7ff455aed5f8900342f68d46c0f244060028a5f8a07318bfb0470021a5f8d013c5f8cc13c5f86c1185f86a1185f86811d5f87001c5f8641185f86911c5f87011c5f82013a5f88c1320b148f2a351c0f245018847d5f89802002818bf03f0ddff0024c5f89842d5f8880320b148f2a351c0f245018847c5f88843a5f88c43686ca5f8484040b1b047686c06f166018847002804bf002068644bf63940c0f251008047dbf800400320cff680702040b0f1005fbff35f8f48d120684ef66c61ccf2ff01884241d16068b0f57d7f3dd194f87b01c1464ff00008c4f8848100b384f87b8194f8750149f259620138b0fa80f04109c0f2590240f20b1090474ef6e37710f1800fd8bf6ff07f00c0f25a077e28a8bf7e2084f8c401b84707f1bc008047d4f8880142f6f76a84f87481c0f2440ac84650b1b047d4f8880106f166018847002804bf0020c4f88801dbf800000321cff680710140b1f1005fbff35f8f40f0358701684ef66c62ccf2ff02914240f02d874168b1f57d7f40f0288790f8cc11002900f01d8706f0a2fb00f01fbf152c00f0bf81162c40f0c481119801380228c0f084827878b9780e9c40ea0120b0f5007f4ff0ff373ff67aad0321119a01eb400191427ff473ad002700288df8dc708df8dd708df8de708df8df708df8e0708df8e1708df8e2708df8e3708df8e4708df8e5708df8e6708df8e7708df8e8708df8e9708df8ea708df8eb708df8ec708df8ed708df8ee708df8ef708df8f0708df8f1708df8f2708df8f3708df8f4708df8f5708df8f6708df8f7708df8f8708df8f9708df8fa708df8fb708df8fc708df8fd708df8fe708df8ff708df800718df801718df802718df803718df804718df805718df806718df807718df808718df809718df80a718df80b718df80c718df80d718df80e718df80f718df810718df811718df812718df813718df814718df815718df816718df817718df818718df819718df81a718df81b713ff4efac109937aa03314ff0010c4b78012b3ff67dad0f7847ea0323db08d65c07f007070cfa07f737427ff471add65c013847ea060701f10201d754e7d1cdf8348004f078ff002800f081854ff47d7800244ff0010a47f67f797f2600f045bc1198cdf834804ff47d7800244ff0010a47f67f797f2602282cbf7878ff200c9006e048f2a351c0f24501bff32f8f8847dbf80070bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f0d2804ff47d7005f08cfe002800f06c834ff60c41cff6ff7142182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ef66c61ccf2ff010160c0f8048080f80ea0a0f8c49180f8c361058445848584c584058545858585c585058645868586c586058745878587c5875be8001fb9427ff452afbff35f8f4be8000100293fd05be8001fb942f7d046e71199384606f015fb0746fff7efbb11980228c0f0eb8000f0f6fd002800f0e6807c78002c00f0b482022c00f2df8040f03e85014611984646062880f07e8442f6f76a0e9c4ff0ff37c0f2440ab046fff7cebb1199781c013907f0affa0746fff7c5bb1d2c51d11199781c013907f093ff0746fff7bbbb90f8481042f6f76a0e9c109ddde90c68c0f2440a69b1416c41b142f68d42c0f2440204460846904720460e9c002180f848100121119a032a0dd366b9a878082800f2c1824bf63941c0f25101963188470027fff791bb119a052ac0f0e280012e40f0df80a8780027411e06293ff684abe97803293ff680ab2a79002a3ff47cab4bf63943c0f2510303f59a7398470027fff772bb1a2818bf1c2c6cd104f016fe002868d000f074fd814608f02ffab9f1000f4ff0ff3718bf00283ff45cab834647f63400c2f20700d0f81806d9f894131b2ca0eb0100c9f89c0300f061841a2c40f08284109900254f1c11994ff4f0724e1e4ff4a071cde93d5037a84ff420744ff4805acde90950cde901214846394632465b46cde937a53f95cde90755cde90555cde90355009408f030fd002840f05884d9f89c033946cde93e0537a80a90012009904ff4a07002904ff4f0700190484632465b464ff42077cde937a53d95cde90755cde90555cde90355009708f00dfd00f04dbc4ff0ff37fff7fcba362872d046286dd057285ad1002e7ff425ab6ae0bcf10c0f4ff0ff377ff41eabb1f5005f61d3fff719bbacf101001f284ff0ff373ff612abccf51630814254d9fff70cbb00297ff407ab421f18bf0122b0f1350318bf01231a40b0f1590318bf01231a40b0f1470318bf0123134208bfbcf1010f39d0b0f1370218bf0122b0f1c10318bf01231a4208bfbcf1020f2cd09f284ff0ff377ff4e1aabcf1040f24d0fff7dcba022e40f03f814bf63940c0f2510080470027fff7a0ba022abff4ceaa13e0002a7ff4caaaa0f1fd0102290cd397287ff4c3aa08e06ff0780002427ff4bdaa02e0402abff4b9aa45f64d50c0f24600804710990128c9784ff0010008bf022008424ff000073ff4a8aa0e944ff47d7847f67f797f2406e048f2a351c0f24501bff32f8f8847dbf80060bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f096804ff47d7005f04cfc00283ff475aa4ff60c41cff6ff7142182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff0101600121c0f804808173a0f8c49180f8c341058445848584c584058545858585c585058645868586c586058745878587c5875be8001fb1427ff452afbff35f8f4be8000121b15be8001fb142f8d047e74af21f35c0f247050446a84794f86801109f00287ff4daa994f82403214600287ff4d4a93878172812d0d1f8840320b904f0bcf9c4f8840360b342f68d41c0f24401a1f140024ff47a719047214608bb01f226300e4639460c22fef771fd0f98002186f825030120bff35f8f86f824034ff4f07001904ff4207005f5106600900020002200230027b047002800f0138284f8247305f14c008047fff797b9119a072ac0f09b81032e40f09881a878ea78297940ea02206c79ad7901284ff0010698bf304644f62062904228bf10464bf63942c0f2510202f5e272642928bf6421904747f63400c2f207000068002800f0348344ea0521012988bf0e4642f68d41c0f24401a1f14002314690470027fff72eb9002780f8477145f64d50c0f2460080470e9c01287ff423a943f2a310c0f2560080470746fff71bb942f6f76a0e9c109ddde90c6800210020c0f2440a6de500201199dde90d84022910992cbf4978ff2160b302294ff000072fd0012929d000297ff4fda84cf67e21caf2101187778783cbf8041087818760058445848584c584058545858585c585058645868586c586058745878587c58780f8407080f8d17380f8d073c0f8cc73fff7d9b80027fff7d6b801218173fff7d2b88773fff7cfb845f64d50c0f24600804701284ff000077ff4c5a840f20830c0f210003790ff208df8d80044f25220c0f20100359040f2c960c0f24800cde93877804798b148f27e30c2f2070000880122c1b264298df8d72008d80721b0f5807f38bf03218df8d7108df8d80040f2d260adf8e000052037ae8df8e200f01d35a90522fef777fc4ff22507c0f247070120092132460c23b8470746fff783b848f2a351c0f24501bff32f8f8847dbf80070bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f0de804ff47d7005f05ffa002800f010814ff60c41cff6ff7142182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ef66c61ccf2ff010160c0f8048080f80ea0a0f8c49180f8c361058445848584c584058545858585c585058645868586c586058745878587c5875be8001fb9427ff452afbff35f8f4be8000100294bd05be8001fb942f7d046e7c146804611980027032838d3301fb0fa80f04009084032d01198109a4cf6cd410338ccf6cc419578a0fb0101b5eb910f88bf8d082e46302d28bf302608f14a00d11c06eb8602fef78dfb002788f8486088f849709db1d8f8440038b9404600f0c1fa0028c8f8440000f0968142f68d41c0f24401a1f1400201219047002742f6f76a0e9cc0f2440ac846fef783bfd0f870110027002900f089804ff400624ff0ff3c0df1dc0e04e033681a44b2f5403f29d28e18b568b7eb552ff5d1ec081ef8044005f0070324fa03f3db071ebf41f82570c6f808c0f760e6e70e9cfef78bbf109fb878fa783b797f7940ea022043ea072232283790389280f09a803220a2e04ff0ff3752e04ff0000c4ff400634ff0000ec0f820c305e077463344b3f5403fbe4642d2cf18ba68ce580132f4d1f418220c022a2fd80a19956801352bd115682e443e6012681444220c022a23d80a19956801351fd115682e443e6012681444220c022a17d80a199568013513d115682e443e6012681444220c022a0bd80a199568013507d115682e443e6012681444b4f5403fcfd3bef1000fc7f804c00cbfc0f82033cef80430b7e7002742f6f76adde90d84c0f2440afef7ecbe1198032840f0e48010994ff4f077487889785a4640ea012600200890cde90600cde90400cde902004ff4a0700190484631464ff42073009707f0dcfe002800f0c3804ff0ff37c3e01198012840f0c08009f57970bff35f8f50e8001f013140e80012002af8d113a94846012207f0fcfe0746ade042f6f76ab0f5fa6f0846c0f2440ab04608d94ff4fa6042f6f76a37900846c0f2440ab0460121054680f8471145f64d50c0f246008047012840f0898043f2a316c0f25606a6f188008047022c074608bf002f01d05fb980e04bf2110237a9c0f24b0202209047002877d00746b047002085f8470172e090f8cd11002918bf05f081fcdbf800000321cff680710140b1f1005fbff35f8f24d101684ef66c62ccf2ff0291421dd14168b1f57d7f19d1d0f8d813b1b14ff00041bff35f8fc0f8d4134af21f30c0f2470000f510674ff4f07001904ff4207400200021002200230094b84795f84701002785f8477158b145f64d50c0f246008047012804d143f2a310c0f256008047d5f8400195f84641c5f83c7185f84671a5f8447150b1b047d5f8400106f166018847002804bf0020c5f840010120a87354b14af27366c0f246060021002200230027b047fef70abe0027fef707be701ca9f88c03002742f6f76ac0f2440afef7fdbd4bf639400027c0f2510088f84870804769e600bf2de9f04f81b04ef66c644ff29c55ccf2ff04c2f229054ff6ff7600274ff0010a47f67f7b4ff07f0807e000bf48f2a351c0f24501bff32f8f8847d5f80090bff35f8f2868bff35f8f01466ff39601b1f1005f07d10168a14204d14168b1f57d7f00f095804ff47d7004f0c0ff002800f08d804ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ff47d710460416080f80ea0a0f8c4b180f8c381068446848684c684068546858685c685068646868686c686068746878687c68755e8001f49457ff45aafbff35f8f45e8000129b155e8001f4945f8d04fe7002001b0bde8f08f70b500284dd001684ef66c62ccf2ff02914218bf70bd90f8481090f849504bf6394c8d42c0f2510c2ad205eb8501014491f84d2091f84e4091f84ae091f84b3091f84c1042ea0424012c4ff0010298bf14466e1c054680f84960b9b164294eea032028bf6421012888bf024644f62060824228bf02460cf5e2731046984706e0002180f84810bde870406047e047686c38b142f64d42c0f244022146bde87040104770bd02464ff64b70cff6ff7042f6653c7844c0f2440c00210023604700bf2de9f04fcdb04ff29c57c2f229073c6840f2030b20464ef66c696ff39600cff6807bccf2ff09b0f1005fbff35f8f40f0e9812068484540f0e5816068b0f57d7f40f0e08194f8710347f64c65c2f2070504f5497628b347f61800c2f20700016d4bf67c52c0f2720291421ad1406cc0b1d4f87c032968401a012802db03f034ff78b93046b8460df02bf850b142f69570c0f25b0080474746002084f8720384f8710394f8700368b1d4f880032968401a012802db03f018ff20b9002084f8700384f86a013078bff35f8f70b194f86fa3ac46baf1000f00961cd094f8250394f83e13091a18bf012115e094f87103002840f0888194f87003002840f08381d4f88403002800f07e8142f68d41c0f24401884777e1012194f8270394f83133059094f8280394f83d23069094f8265394f82a0394f82b9394f82ce394f82db394f82e8394f82f63934235d194f8302394f83c339a422fd194f83b2396422bd194f83a23904527d194f83923934523d194f8382396451fd194f8372391451bd194f83623904217d194f8292394f835339a4211d194f83423069b93420cd194f83323059b934207d194f83223954203d111b994f82583a9e00023012284f8403384f8433384f8443384f8453384f8463384f8473384f8483384f8493384f84a3384f84b3384f84c3384f84d3384f84e3384f84f3384f8503384f8513384f8523384f8533384f8543384f8553384f8563384f8573384f8583384f8593384f85a3384f85b3384f85c3384f85d3384f85e3384f85f3384f8603384f8613384f8623384f8633384f8643384f8653384f8663384f8673384f8683384f8693384f86a3384f86b3384f86c3384f86d3384f86e3384f83f2384f8415384f84203dcf8002047f61803170a84f8432384f84473170c120e84f846230822c2f2070384f8457384f86f231a6d4bf67c57c0f2720704f22631ba4204f2323a1bd15a6ccab140f6b803c2f200031a689ab1182d00f02984172d40f03584fe2804f2473c0d4600f05684002840f0608400980cf0acff294602e0022084f8400350460c22fdf733ff94f8258394f86fa384f83e8345f64d50c0f246008047811eb1fa81f14fea511b012808bf4ff0020bbaf1000f5ad004f23f3007a9049040f261400631c0f2470003910aa9023100254ff00309a0f5b84000240291019015e000bf029807a91a468df828908df82980fdf7fdfe47f00802019ff0200aa90023b8470334e0b25045b1462fd2aaeb0400c7b20420032f28bf4f468df81c0005983a468df81d0006988df81fb08df81e0004988df8204050fa84f103988df821a08df822508df823508df82450fdf7cffeb81dc345c3b24ff00306c2d14ef60b670120f02107aac0f24707c9e7bff35f8f00994ff29c574ef66c6940f2030b0020c2f22907ccf2ff09cff6807b08703d68bff35f8f05ea0b00b0f1005f59d12868484556d16868b0f57d7f52d105f575700021bff35f8f50e8006f40e80012002af9d147f64c60bff35f8fc2f207000468b6f1004f0fd0b84603f04bfd58b1002e00f04d8195f8ec03320a002800f0e38195f8ed13ece195f8ec03e8b147f61800c2f207000068b8b145f60960c2f207000478002040f261430a9007900aa907aac0f247032046984707990a9a43f69b53c0f24e0320469847002085f8ee0385f8ec03d5f8d80320b142f68d41c0f244018847d7f800a0bff35f8f0aea0b00b0f1005f40f00481daf80000484540f0ff80daf80400b0f57d7f40f0f9809af8700338b100208af86801caf864014db0bde8f08f9af86801002800f0d780daf86441002c00f0d28040f6b800c2f20000056807a802f066f9002d00f0d781284621464ff416324e464ff6ff770695fdf70ffe002547f67f744ff07f0806e048f2a351c0f24501bff32f8f88474ff29c50c2f22900d0f80090bff35f8f0068bff35f8f00ea0b01b1f1005f07d10168b14204d14168b1f57d7f00f0b8804ff47d7004f000fc002802f00c814ff60c41cff6ff7100bf42182e3182f8f45382f8f55382f8f65382f8f75382f8f85382f8f95382f8fa5382f8fb5382f8fc5382f8fd5382f8fe5382f8ff5382f8005482f8015482f8025482f8035482f8045482f8055482f8065482f8075482f8085482f8095482f80a5482f80b5482f80c5482f80d5482f80e5482f80f5482f8105482f8115482f8125482f8135482f8145482f8155482f8165482f8175482f8185482f8195482f81a5482f81b5482f81c5482f81d5482f81e5482f81f5482f8205482f82154a0d14ff47d71416001214ff29c5206608173a0f8c44180f8c381078447848784c784078547858785c785078647868786c786078747878787c787c2f2290252e8001f49457ff453afbff35f8f42e8000121b352e8001f4945f8d048e79af86a0170b1daf86c0140b147f64c61c2f207010968401a002802f3848000208af86a0140f6a120c0f2470080474db0bde8f08f95f8ec03002840f0db80e3e6817b002942f05780027f0021002a8df8281000f028824ff29c550aaac2f22905535c002b00f0928253185f78002f00f050829f78002f00f04e82df78002f00f04c821f79002f00f04a825f79002f00f048829f79002f00f04682df79002f00f044821f7a002f00f042825f7a002f00f040829f7a002f00f03e82df7a002f00f03c821f7b002f00f03a825f7b002f00f038829f7b002f00f03682df7b002f00f034821f7c002f00f032825f7c002f00f030829f7c002f00f02e82df7c002f00f02c821f7d002f00f02a825f7d002f00f028829f7d002f00f02682df7d002f00f024821f7e002f00f022825f7e002f00f020829f7e002f00f01e82df7e002f00f01c821f7f002f00f01a825f7f002f00f018829f7f002f00f01682db7f002b00f01482203160297ff47baf33e20120a5f8ec0340f20220a5f8f0030220002185f8ef03c5f8e01302f00103c6f300208b42c6f34b2206d123b395f8f233f7b2bb421fd00ce05bb995f8ef13a5f8ea2385f8f013022185f8f113c5f8dc4311e095f8ef3385f8f03385f8f163a5f8ea23c5f8dc4331b9012185f8ee13c6f34951a5f8e813002804bf002185f8ee1385f8ed0385f8f26395f8ee1341b395f8680160b1d5f8e403bff35f8fb5f8e8136ff39f20884216d195f8ee13c1b195f8ef6340e000208af86801caf864018af86a0101208af8690140f6a120c0f24700804701f06dbf002085f8ee03c5f8dc43d5f8dc13b5f8ea0395f8f163611a814220d28902b1fbf0f04ff4406395f8f01300fb00f2a3eb40005043000d721a00fb02f34ff60c47002b4ff40073cff6ff7748bf07f5fa7310fb0230c21700eb925001eb9026002147f61800c2f207000068e0b1d5f8e003f4b2a0421ad0002040f261430a9007900aa907aac0f247032046984707990a9a43f69b53c0f24e0320469847c5f8e04395f8ee1302e00020c5f8e003d5f8d80385f8ef6311b14ff47a7108e095f8f113f2b28a424ff0280108bf4ff47a7142f68d42c0f24402403a904795f8ee034746c8b13868bff35f8f00ea0b01b1f1005f41f0f8860168494541f0f4864168b1f57d7f41f0ef86002180f86811c0f864114db0bde8f08f95f8ed0300287ff453adf0b20228ddd140f6b800c2f2000001680029d6d001684ff416322139002301f8403f403a01f81f3c01f81e3c01f81d3c01f81c3c01f81b3c01f81a3c01f8193c01f8183c01f8173c01f8163c01f8153c01f8143c01f8133c01f8123c01f8113c01f8103c01f80f3c01f80e3c01f80d3c01f80c3c01f80b3c01f80a3c01f8093c01f8083c01f8073c01f8063c01f8053c01f8043c01f8033c01f8023c01f8013c4b708b70cb700b714b718b71cb710b724b728b72cb720b734b738b73cb730b744b748b74cb740b754b758b75cb750b764b768b76cb760b774b778b77cb7781f820309cd100684ef217310a904ff416300b900aa8c0f247018847474661e700980d460cf0f2fc10b302304ff0030008bf022084f840032946fff7dcbb84f87003dcf800204ef660231a44c4f88023b8b100980d460cf0b7fe0cf08bfe294660b9fff7c8bb4ff29c55c2f2290595e00cf080fe002829463ff4bdab0320fff7b8bb002084f86a01fff7b5bb18684a4600eb0b20704400eb084000eb06616046fdf7e0fa0ee04eea0b2141ea084141ea066361464a460cf07ffc00281cbf032084f8400309f1080084f86f032946fff792bb01313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2921d84ff0520353541dd00a4445235e29537018d04f235d29937014d052235c29d37010d044235b2913710cd045235a29537108d052235929937104d020235829d37141f0c48200218df887100121427f002a00f0c28000220aab9f5c002f00f0a0809f187e78002e5ed0be78002e5dd0fe78002e5cd03e79002e5bd07e79002e5ad0be79002e59d0fe79002e58d03e7a002e57d07e7a002e56d0be7a002e55d0fe7a002e54d03e7b002e53d07e7b002e52d0be7b002e51d0fe7b002e50d03e7c002e4fd07e7c002e4ed0be7c002e4dd0fe7c002e4cd03e7d002e4bd07e7d002e4ad0be7d002e49d0fe7d002e48d03e7e002e47d07e7e002e46d0be7e002e45d0fe7e002e44d03e7f002e43d07e7f002e42d0be7f002e41d0ff7f002f40d02032602a7ff49aaf54e001323ae0023238e0033236e0043234e0053232e0063230e007322ee008322ce009322ae00a3228e00b3226e00c3224e00d3222e00e3220e00f321ee010321ce011321ae0123218e0133216e0143214e0153212e0163210e017320ee018320ce019320ae01a3208e01b3206e01c3204e01d3202e01e3200e01f325f2a15d84ff053079f5411d013444b275e2a5f700cd049275d2a9f7008d050275c2adf7004d020275b2a1f7140f0f08100228df887200131827f002a00f0be8000210aaa535c002b00f0a08053185f78002f5ed09f78002f5dd0df78002f5cd01f79002f5bd05f79002f5ad09f79002f59d0df79002f58d01f7a002f57d05f7a002f56d09f7a002f55d0df7a002f54d01f7b002f53d05f7b002f52d09f7b002f51d0df7b002f50d01f7c002f4fd05f7c002f4ed09f7c002f4dd0df7c002f4cd01f7d002f4bd05f7d002f4ad09f7d002f49d0df7d002f48d01f7e002f47d05f7e002f46d09f7e002f45d0df7e002f44d01f7f002f43d05f7f002f42d09f7f002f41d0db7f002b40d0203160297ff49aaf50e001313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2911d84ff0440353540dd00a4455235e29537008d050235d29937004d020235c29d37040f0098100218df8871001216a6846f23f53c5f28803b3eb520f40f08b80d20700f08d8000210aaa535c002b00f0858153185f78002f00f0f9809f78002f00f0f980df78002f00f0f9801f79002f00f0f9805f79002f00f0f9809f79002f00f0f980df79002f00f0f9801f7a002f00f0fc805f7a002f00f0fc809f7a002f00f0fc80df7a002f00f0fc801f7b002f00f0fc805f7b002f00f0fc809f7b002f00f0fc80df7b002f00f0fc801f7c002f00f0fc805f7c002f00f0fc809f7c002f00f0fc80df7c002f00f0fc801f7d002f00f0fc805f7d002f00f0fc809f7d002f00f0fc80df7d002f00f0fc801f7e002f00f0fc805f7e002f00f0fc809f7e002f00f0fc80df7e002f00f0fc801f7f002f00f00d815f7f002f00f00b819f7f002f00f00981db7f002b00f00781203160297ff47baf1de14cf67e22caf210126a60002940f0198100210aaa535c002b00f0dc8053185f78002f61d09f78002f60d0df78002f5fd01f79002f5ed05f79002f5fd09f79002f60d0df79002f61d01f7a002f62d05f7a002f63d09f7a002f64d0df7a002f68d01f7b002f69d05f7b002f6ad09f7b002f6bd0df7b002f6cd01f7c002f6dd05f7c002f6ed09f7c002f6fd0df7c002f70d01f7d002f71d05f7d002f72d09f7d002f73d0df7d002f74d01f7e002f75d05f7e002f76d09f7e002f77d0df7e002f78d01f7f002f79d05f7f002f7ad09f7f002f7bd0db7f002b7cd0203160297ff49aaface000211171f6e6013173e0023171e003316fe004316de0013184e0053169e0023180e0063165e003317ce0073161e0043178e008315de0053174e0093159e0063170e00a3155e007316ce000225a710fe60b314ee0083165e00c314ae0093161e00d3146e00a315de00e3142e00b3159e00f313ee00c3155e010313ae00d3151e0113136e00e314de0123132e00f3149e013312ee0103145e014312ae0113141e0153126e012313de0163122e0133139e017311ee0143135e018311ae0153131e0193116e016312de01a3112e0173129e01b310ee0183125e01c310ae0193121e01d3106e01a311de01e3102e01b3119e01f315f2931d84ff04f0353542dd00a444b235e29537028d020235d29937024d00021d17024e01c3104e01d3102e01e3100e01f315f2918d84ff04103535414d00a444c235e2953700fd05d2993700cd04f235c29d37008d043235b29137104d020235a29537140f0828700218df8871000220aafb95c002900f0a080bb18597800295ed0997800295dd0d97800295cd0197900295bd0597900295ad09979002959d0d979002958d0197a002957d0597a002956d0997a002955d0d97a002954d0197b002953d0597b002952d0997b002951d0d97b002950d0197c00294fd0597c00294ed0997c00294dd0d97c00294cd0197d00294bd0597d00294ad0997d002949d0d97d002948d0197e002947d0597e002946d0997e002945d0d97e002944d0197f002943d0597f002942d0997f002941d0d97f002940d02032602a7ff49aaf42e001323ae0023238e0033236e0043234e0053232e0063230e007322ee008322ce009322ae00a3228e00b3226e00c3224e00d3222e00e3220e00f321ee010321ce011321ae0123218e0133216e0143214e0153212e0163210e017320ee018320ce019320ae01a3208e01b3206e01c3204e01d3202e01e3200e01f325f2a03d84ff07701b95403d100218df8871002e0b91800224a7004694ff0000917f80910002900f0c48007eb09025178002962d09178002962d0d178002962d01179002962d05179002962d09179002962d0d179002962d0117a002962d0517a002962d0917a002962d0d17a002962d0117b002962d0517b002962d0917b002962d0d17b002962d0117c002962d0517c002962d0917c002962d0d17c002962d0117d002962d0517d002962d0917d002962d0d17d002962d0117e002962d0517e002962d0917e002962d0d17e002962d0117f002962d0517f002962d0917f002962d0d17f002962d009f12009b9f1600f7ff496af4ff060095be009f1010958e009f1020955e009f1030952e009f104094fe009f105094ce009f1060949e009f1070946e009f1080943e009f1090940e009f10a093de009f10b093ae009f10c0937e009f10d0934e009f10e0931e009f10f092ee009f110092be009f1110928e009f1120925e009f1130922e009f114091fe009f115091ce009f1160919e009f1170916e009f1180913e009f1190910e009f11a090de009f11b090ae009f11c0907e009f11d0904e009f11e0901e009f11f0901250a2c1ed364214ff47a7242f2107305eb85077f00b4fbf7f60a2e11d305fb01f7b4fbf7f60a2e0bd305fb02f7b4fbf7f60a2e05d35d43b4fbf5f7092fe7d800e03d464946b9f15f0f98bf5f21c1f1000e05911eeb090b54d0b4fbf5f30aa903f1300201f809204cf6cd41ccf6cc410a2da5fb017248d31bf1010742d003fb154cd608bcfbf6f80aa901eb090448f21f5108f13002c5f2eb116270642da5fb013235d31bf102032cd008fb16c65309b6fbf3f244f6d35102f13007c1f26201a770b5f57a7fa5fb011724d31bf1030118d002fb1361ba0941f25977b1fbf2f3cdf2b717a5fb077603f13007e77003fb121442f2107109f104098d424fea5635a8d20ae0ddf8149007e009f1010904e009f1020901e009f1030900240aab03f80940195d002900f0a0801f19797800295ed0b97800295dd0f97800295cd0397900295bd0797900295ad0b979002959d0f979002958d0397a002957d0797a002956d0b97a002955d0f97a002954d0397b002953d0797b002952d0b97b002951d0f97b002950d0397c00294fd0797c00294ed0b97c00294dd0f97c00294cd0397d00294bd0797d00294ad0b97d002949d0f97d002948d0397e002947d0797e002946d0b97e002945d0f97e002944d0397f002943d0797f002942d0b97f002941d0f97f002940d02034602c7ff49aaf50e001343ae0023438e0033436e0043434e0053432e0063430e007342ee008342ce009342ae00a3428e00b3426e00c3424e00d3422e00e3420e00f341ee010341ce011341ae0123418e0133416e0143414e0153412e0163410e017340ee018340ce019340ae01a3408e01b3406e01c3404e01d3402e01e3400e01f345f2c11d84ff0750119550dd0191973225e2c4a7008d020225d2c8a7004d070225c2cca7040f09d8000218df8871044694ff0000e13f80e10002900f0c78003eb0e056978002962d0a978002962d0e978002962d02979002962d06979002962d0a979002962d0e979002962d0297a002962d0697a002962d0a97a002962d0e97a002962d0297b002962d0697b002962d0a97b002962d0e97b002965d0297c002965d0697c002965d0a97c002965d0e97c002965d0297d002965d0697d002965d0a97d002965d0e97d002965d0297e002965d0697e002965d0a97e002965d0e97e002965d0297f002965d0697f002965d0a97f002965d0e97f002965d00ef1200ebef1600f7ff496af4ff0600e5ee00ef1010e5be00ef1020e58e00ef1030e55e00ef1040e52e00ef1050e4fe00ef1060e4ce00ef1070e49e00ef1080e46e00ef1090e43e00ef10a0e40e00ef10b0e3de00ef10c0e3ae00ef10d0e37e00ef10e0e34e000220a7162e70ef10f0e2ee00ef1100e2be00ef1110e28e00ef1120e25e00ef1130e22e00ef1140e1fe00ef1150e1ce00ef1160e19e00ef1170e16e00ef1180e13e00ef1190e10e00ef11a0e0de00ef11b0e0ae00ef11c0e07e00ef11d0e04e00ef11e0e01e00ef11f0e01250a2c1ed364214ff47a7242f2107305eb85077f00b4fbf7f60a2e11d305fb01f7b4fbf7f60a2e0bd305fb02f7b4fbf7f60a2e05d35d43b4fbf5f7092fe7d800e03d46f446bef15f0f98bf4ff05f0cccf1000842f2107b18eb0e0952d0b4fbf5f20aa902f1300301f80e304cf6cd41ccf6cc410a2da5fb016345d319f1010640d002fb1546db08b6fbf3f20aa901eb0e0448f21f5102f13007c5f2eb116770642da5fb011732d319f102012ad002fb13637a09b3fbf2f6b5f57a7f06f13001a17044f6d351c1f26201a5fb011721d319f1030116d006fb1231ba0941f25976b1fbf2f3cdf2b716a5fb066703f13006e67003fb12140ef1040e5d454fea5735aad209e0e64607e00ef1010e04e00ef1020e01e00ef1030e00240df1280b0bf80e401bf80410002900f0a1800beb0405697800295ed0a97800295dd0e97800295cd0297900295bd0697900295ad0a979002959d0e979002958d0297a002957d0697a002956d0a97a002955d0e97a002954d0297b002953d0697b002952d0a97b002951d0e97b002950d0297c00294fd0697c00294ed0a97c00294dd0e97c00294cd0297d00294bd0697d00294ad0a97d002949d0e97d002948d0297e002947d0697e002946d0a97e002945d0e97e002944d0297f002943d0697f002942d0a97f002941d0e97f002940d02034602c7ff498af5ee001343ae0023438e0033436e0043434e0053432e0063430e007342ee008342ce009342ae00a3428e00b3426e00c3424e00d3422e00e3420e00f341ee010341ce011341ae0123418e0133416e0143414e0153412e0163410e017340ee018340ce019340ae01a3408e01b3406e01c3404e01d3402e01e3400e01f345f2c1fd84ff075010bf804101ad00beb040173225e2c4a7014d020225d2c8a7010d074225c2cca700cd031225b2c0a7108d030225a2c4a7104d02022592c8a7140f0898200218df88710d0f8cc734ff000091bf80910002900f0c4800beb09046178002962d0a178002962d0e178002962d02179002962d06179002962d0a179002962d0e179002962d0217a002962d0617a002962d0a17a002962d0e17a002962d0217b002962d0617b002962d0a17b002962d0e17b002962d0217c002962d0617c002962d0a17c002962d0e17c002962d0217d002962d0617d002962d0a17d002962d0e17d002962d0217e002962d0617e002962d0a17e002962d0e17e002962d0217f002962d0617f002962d0a17f002962d0e17f002962d009f12009b9f1600f7ff496af4ff060095be009f1010958e009f1020955e009f1030952e009f104094fe009f105094ce009f1060949e009f1070946e009f1080943e009f1090940e009f10a093de009f10b093ae009f10c0937e009f10d0934e009f10e0931e009f10f092ee009f110092be009f1110928e009f1120925e009f1130922e009f114091fe009f115091ce009f1160919e009f1170916e009f1180913e009f1190910e009f11a090de009f11b090ae009f11c0907e009f11d0904e009f11e0901e009f11f0901240a2f1ed364214ff47a7242f2107304eb84067600b7fbf6f50a2d11d304fb01f6b7fbf6f50a2d0bd304fb02f6b7fbf6f50a2d05d35c43b7fbf4f6092ee7d800e03446c846b9f15f0f98bf4ff05f08c8f1000e42f2107c1eeb09054dd0b7fbf4f14cf6cd4001f13002ccf6cc400bf809200a2ca4fb002341d36a1c3dd001fb1476d908b6fbf1f348f21f5003f130020beb0907c5f2eb107a70642ca4fb000230d3a81c29d003fb11615309b1fbf3f6b4f57a7f06f13000b87044f6d350c1f26200a4fb000220d3e81c16d006fb1310910941f25973b0fbf1f2cdf2b713a4fb033502f13003fb7002fb110709f1040964454fea5534afd209e0c14607e009f1010904e009f1020901e009f10309069d40f6b8060022c2f200060bf809201bf80200002800f0a1800beb0200417800295ed0817800295dd0c17800295cd0017900295bd0417900295ad08179002959d0c179002958d0017a002957d0417a002956d0817a002955d0c17a002954d0017b002953d0417b002952d0817b002951d0c17b002950d0017c00294fd0417c00294ed0817c00294dd0c17c00294cd0017d00294bd0417d00294ad0817d002949d0c17d002948d0017e002947d0417e002946d0817e002945d0c17e002944d0017f002943d0417f002942d0817f002941d0c07f002840d02032602a7ff498af49e001323ae0023238e0033236e0043234e0053232e0063230e007322ee008322ce009322ae00a3228e00b3226e00c3224e00d3222e00e3220e00f321ee010321ce011321ae0123218e0133216e0143214e0153212e0163210e017320ee018320ce019320ae01a3208e01b3206e01c3204e01d3202e01e3200e01f325f2a0ad84ff075000bf8020005d00beb020073215e2a41705dd100208df887000aaf42f2941845f29c14284602213a46c2f22008c2f213040bf0a3fc00208df8280038460bf01bfe28460e213a460bf098fc4ff6a420cff6ff703058a0426ad14ff6b020cff6ff703058b0f54d2f62d14ff6b420cff6ff703058a0425bd145f610634ff0000ec2f213034cf6394408f1040c00274ff0ff3263454cd8186830f003051bd0984528bf0c2846d3a8eb03018d424ff0ff3142d8bd42394688bf2946c00703eb05001cbf0f46ae44013c00f10403e1d12fe000218170a1e70421b7f5807f21d300223d46b5f5007f17d3b5f5806f16d3b5f5006f15d30901b2eb153f4fea1515f0d10fe00022ca7176e500219171fff77db800211172fef73bbd490002e0890000e0c900634504d1484207ea0002714603e04ff0ff324ff0ff3147f64c60c2f20700d0f8840008f1080342f6941c9842c2f2270c4dd142f610674ff0000bc2f2200746f6b9700cf1040e00244ff0ff384ff0ff3977453cd83e6836f0030515d0bc4528bf0c2e36d3aceb07039d4234d82346a54288bf2b46f6071cbf1c46ab447b19013803f10407e4d122e00420b4f5807f17d34ff000082546b5f5007f0cd3b5f5806f0bd3b5f5006f0ad30001b8eb153f4fea1515f0d104e0400002e0800000e0c000774504d1404204ea0008d94603e04ff0ff384ff0ff394ff6882040f6b807cff6ff70c2f200073b580cf10800834264d14ff69423cff6ff73fb58b3f5333f5cd14ff69823cff6ff73fb58834255d14ff29c5043f21063c2f229004ff0000bc2f2270342f6f935a0f1040ca0f1080e0024634542d81e6836f003071ad09e454ff0ff30059028bf0c2e3ad3aeeb030087424ff0ff3034d82046a74288bf3846f6071cbf0446bb44d819013d00f10403dfd123e00427b4f5807f17d34ff0000e2546b5f5007f0cd3b5f5806f0bd3b5f5006f0ad33f01beeb153f4fea1515f0d104e07f0002e0bf0000e0ff00634505d17b4204ea03000590584602e04ff0ff300590064666208df8280072208df8290065208df82a008df82b002f208df82c006d204b238df82d0061208df8313069238df82e0078208df83230422356278df82f0020208df833303a238df8377047270aac8df830008df834308df835004c238df838708df83a00002720468df836308df839308df83b700bf0dafd069de05d002800f0a080e019417800295ed0817800295dd0c17800295cd0017900295bd0417900295ad08179002959d0c179002958d0017a002957d0417a002956d0817a002955d0c17a002954d0017b002953d0417b002952d0817b002951d0c17b002950d0017c00294fd0417c00294ed0817c00294dd0c17c00294cd0017d00294bd0417d00294ad0817d002949d0c17d002948d0017e002947d0417e002946d0817e002945d0c17e002944d0017f002943d0417f002942d0817f002941d0c07f002840d02037602f7ff49aaf64e001373ae0023738e0033736e0043734e0053732e0063730e007372ee008372ce009372ae00a3728e00b3726e00c3724e00d3722e00e3720e00f371ee010371ce011371ae0123718e0133716e0143714e0153712e0163710e017370ee018370ce019370ae01a3708e01b3706e01c3704e01d3702e01e3700e01f375f2f25d84ff02000e05521d0e01945215e2f41701cd076215d2f817018d065215c2fc17014d06e215b2f017110d048215a2f41710cd07521592f817108d06221582fc17104d02021572f017240f0f88000208df887002046494642460bf005fd0020215c002900f0a08021184a78002a5ed08a78002a5dd0ca78002a5cd00a79002a5bd04a79002a5ad08a79002a59d0ca79002a58d00a7a002a57d04a7a002a56d08a7a002a55d0ca7a002a54d00a7b002a53d04a7b002a52d08a7b002a51d0ca7b002a50d00a7c002a4fd04a7c002a4ed08a7c002a4dd0ca7c002a4cd00a7d002a4bd04a7d002a4ad08a7d002a49d0ca7d002a48d00a7e002a47d04a7e002a46d08a7e002a45d0ca7e002a44d00a7f002a43d04a7f002a42d08a7f002a41d0c97f002940d0203060287ff49aaf5be001303ae0023038e0033036e0043034e0053032e0063030e007302ee008302ce009302ae00a3028e00b3026e00c3024e00d3022e00e3020e00f301ee010301ce011301ae0123018e0133016e0143014e0153012e0163010e017300ee018300ce019300ae01a3008e01b3006e01c3004e01d3002e01e3000e01f305f281cd84ff02001215418d021184f225e284a7013d074225d288a700fd068225c28ca700bd065225b280a7107d072225a284a7103d0202259288a7128d100208df887000aac059a204631460bf038fc28461a2122460bf069f900208af86801caf8640106984ef217310a904ff416300b900aa8c0f24701884701208af86a0107a800f031f9caf814004db0bde8f08f0020c871d6e70021417207e72de9f04f81b0009041f204024cf65560cef20002ccf2ac50c2f8ac0f4ef6fc50cef2000001684ef66c6641f08071016052f8040c4ff29c57ccf2ff06c2f229074ff6ff7440f0010000254ff0010847f67f794ff07f0a42f8040c06e048f2a351c0f24501bff32f8f8847d7f800b0bff35f8f3868bff35f8f01466ff39601b1f1005f07d10168b14204d14168b1f57d7f00f094804ff47d7002f082fa002800f0ca804ff60c41cff6ff7100bf42182e3182f8f45382f8f55382f8f65382f8f75382f8f85382f8f95382f8fa5382f8fb5382f8fc5382f8fd5382f8fe5382f8ff5382f8005482f8015482f8025482f8035482f8045482f8055482f8065482f8075482f8085482f8095482f80a5482f80b5482f80c5482f80d5482f80e5482f80f5482f8105482f8115482f8125482f8135482f8145482f8155482f8165482f8175482f8185482f8195482f81a5482f81b5482f81c5482f81d5482f81e5482f81f5482f8205482f82154a0d14ff47d710660416080f80e80a0f8c49180f8c3a1048444848484c484048544858485c485048644868486c486048744878487c48757e8001f59457ff45aafbff35f8f47e8000121b157e8001f5945f8d04fe78169d1bb47f64c6245f6e466c2f20702cff6f8761368314617689f420ed117689f420bd117689f4208d117689f4203d1002901f10401efd19f421ed041f20401cef200010b6817681168b9420ed11168b9420bd11168b94208d11168b94203d1002e06f10406efd1b94206d041f20401cef200010968c91a816141f20400cef2000000680099086001b0bde8f08f00bf2de9f04f83b041f20401cef200014ef66c674ff29c5609680068ccf2ff07c2f229064ff6ff744ff000084ff0010947f67f7a4ff07f0b0291019006e048f2a351c0f24501bff32f8f88473568bff35f8f3068bff35f8f01466ff39601b1f1005f07d10168b94204d14168b1f57d7f00f093804ff47d7002f06df9002800f0e7804ff60c41cff6ff7142182e3182f8f48382f8f58382f8f68382f8f78382f8f88382f8f98382f8fa8382f8fb8382f8fc8382f8fd8382f8fe8382f8ff8382f8008482f8018482f8028482f8038482f8048482f8058482f8068482f8078482f8088482f8098482f80a8482f80b8482f80c8482f80d8482f80e8482f80f8482f8108482f8118482f8128482f8138482f8148482f8158482f8168482f8178482f8188482f8198482f81a8482f81b8482f81c8482f81d8482f81e8482f81f8482f8208482f82184a0d14ff47d710760416080f80e90a0f8c4a180f8c3b1048444848484c484048544858485c485048644868486c486048744878487c48756e8001fa9427ff45cafbff35f8f46e8000121b156e8001fa942f8d051e7816961b144f6d350c1f26200a1fb0001880901284ff0010088bf88094ce047f64c6245f6e466c2f20702cff6f8761368314600bf17689f420ed117689f420bd117689f4208d117689f4203d1002901f10401efd19f422ed041f20401cef200010b6817681168b9420ed11168b9420bd11168b94208d11168b94203d1002e06f10406efd1b94216d041f20401cef20001096844f6d357ca1ac1f26207a2fb07768261b00901284ff0010088bfb009994208bffa2000e0fa20dde90121891ab1fbf0f003b0bde8f08f2ab1a2fb0103002b1cbf0020704702fb01f0ffe7b0b54ff2a054c2f229040146206846f23f52c5f28802b2eb500f40f258304df681124cf67e25c2f20000c0f24802caf2101518bf25609047002804bf691c2160b0bd00bf0846ffe7014640f258304df69f22c2f20000c0f248021047002855d1002953d0082a51d30b78aa2b4ed18b79f02b4bd12de9f04182b045f64d550b2ac0f2460547d3c878a2f10803834242d14878212841d1087901283ed1487901283bd1c879c8bb0c4614f8080f10f03c0f33d18818884610f8021c10f8010c164641ea0027a2f10a0081b220460af032f8874222d1a847811eb1fa81f14f09012808bf0227002f4ad0207887f00301084247d0012039464246334600f07ff90446002898f8080018bf06243be04ff27143c0f24c0318470b2400e00a24a847811eb1fa81f14e09012808bf02261eb3304600f090f8f8b10546407ce0b10027284631463246032300970af0acf8686840b14bf69b71c0f25d0188476868fff774ff6f602868af75002818bffff76dff00202860a8602882204602b0bde8f0810624f9e700243842f6d0404631463a463b4600f056f9002818bf0446ece70b291dd3c278a1f10803934218d10278aa2a13d14278212a10d10279012a0dd14279012a0ad18279f02a07d1c2792ab9024612f8083f13f03c0f03d00a2070470b20704710b5084410f8023c10f8010c43ea0024a1f10a0081b2104609f09cff201a18bf0a2010bd002808bf7047b0b582b00446407cd0b100252046032300950af042f8606840b14bf69b71c0f25d0188476068fff70aff65602068a575002818bffff703ff00202060a060208202b0bde8b040704700bf2de9f04f81b04ef66c654ff29c56ccf2ff05c2f229064ff6ff7700244ff0010b47f67f784ff07f09009006e048f2a351c0f24501bff32f8f8847d6f800a0bff35f8f3068bff35f8f01466ff39601b1f1005f07d10168a94204d14168b1f57d7f00f095804ff47d7001f010ff002800f08d804ff60c41cff6ff7100bf42182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d710560416080f80eb0a0f8c48180f8c391078447848784c784078547858785c785078647868786c786078747878787c78756e8001f51457ff45aafbff35f8f46e8000129b156e8001f5145f8d04fe700200099002801eb410100eb011118bf01f51b7001b0bde8f08f00bfb0b5c4b0dc08202c03d94ff0ff3044b0b0bd0df107048df807008df80810a01c11461a461d46fbf743f8a81c4af6610582b2c0f24605f02021460023a84744b0b0bd00bf2de9f04f89b0064618469a4617468946fff700ff002800f09983044696f908000796b0f1ff3f00f003050add264616f8110f00283fd12068002818bffff7e4fd2de3207c10b3607c00b34ff000082046394652460323cdf8008009f003ff606848b14bf69b71c0f25d0188476068fff7cbfdc4f80480206884f81680002818bffff7c2fd00202060a06020822068002818bffff7b9fd4ff480710020218207992060a0608978a081092004f11106e174a174257560760799a07c8978884240f0d382217da94240f0cf82411ca9f10b00627e01961e2828bf1e209042a17488bf6076a9f10200039787b20a2f4ff00005c0f0db82092241f2210809200497cdf808a017e02068049f002818bffff77cfda089002d00f10100069d26602674a660a08118bf0625059e06eb0b0082b2ba4280f0bb82217c80b20429064600f28080079b461c9a5c4b1c0129237405dd022906d0032968d1e28106e021b9627503e0238943ea02222281be4280f09e82042966d0079a831c925d8f1c0129277406dd049fff290bd003290bd11e464ce000291cbf278947ea0222049f228102e0627500e0e281bb4280f08082022935d8079ac61cd25ccb1c0129237405dd022933d0fe2905d1627506e021b9238943ea0222228100e0e281be4280f0678202292fd0079a031d925d41f00407fc2927740add049ffd290cd0fe2903d0278947ea0222049f228105e0049f0029bed1e28100e06275bb4280f0498209b11e4610e0461d0798c25c05202074e189208941ea0221e18128b1fff7c4fc0028206000f06682b4f808906089a9eb00011ffa81fbb1b27a1a5a45b8bf93465fea0b420ad022681044079a11441ffa8bf2faf7fffe6089b4f80890584481b2494560817ff454afd4f800a0607dbaf1000f05964ff000060df1230108bf8a460f288df8236006d8217d00f00302511ab1fa81f14e0900074ff0000706d4217e607e814238bf20760fe000bf606840b14bf69b71c0f25d0188476068fff798fc6760607e20760120e0820695a6b1607da67d400715d4002e4ff0000500f089811ffa89f100294ff6ff7300f00a8101295cd10020cfe000bf607d400750d4002577e14ff48030fff74ffc002e824600f06f81a07d002800f06b81baf1000f00f067816668002e00f0fb8020890428c0f05f8121680a1812f8043c002b40f0588112f8033c002b40f0538112f8023cff2b40f04e8112f8012cff2a40f049814ff4803531607060c6f80ca03561002800f0648107464bf69b70c0f25d0000f5857230460021904740b9316931b170688d420d46ebd187420d46e8d15546002728e14ff48030fff700fc054622e14ff6fe7000ea0900ac4642426ff001000aeb0007be78ff7883ea06231eb25d002db208ead63686ea430308ead5355e0085ea430336b25d002db208ead63686ea430308ead5355e0085ea430336b25d002db208ead63686ea430308ead5355e0085ea430336b25d002db208ead63686ea430308ead53686ea430383ea07231fb25e0036b208ead73787ea430308ead6365f0086ea43033fb25e0036b208ead73787ea430308ead6365f0086ea43033fb25e0036b208ead73787ea430308ead6365f0086ea43033fb25e0036b208ead737023087ea430308ead6371618023687ea430395d10230002765465feac97232d01af8000083ea002002b243001bb208ead23282ea400008ead333420083ea400012b243001bb208ead23282ea400008ead333420083ea400012b243001bb208ead23282ea400008ead333420083ea400012b243001bb208ead23282ea400008ead33282ea4003e0899ab2824273d15046ddf808a05346faf7b5fe00286bd10026012378e03820fff741fb002862d00646077047708770c770077147718771c771077247728772c772077347738773c773077447748774c774077547758775c775077647768776c776077747778777c77780f8287080f8297080f82a7080f82b7080f82c7080f82d7080f82e7080f82f7080f8307080f8317080f8327080f8337080f8347080f8357080f8367080f837704ff2dd50cff6ff70784430624ff22960cff6ff70784470624bf69b70c0f25d0045f6e46200f13c0730460f21c0f27c0238230025b84738b33046fff703fb2f46554600e05546606840b14bf69b71c0f25d0188476068fff7f5fa6760ddf808a000260323a77503991ffa89f720465246009709f015fc002d294605463ff460ad0846fff7dffa5be50027666077e6c5f580390027b5f5803f55463760f7607ff649aed0e700252046394652460323009509f0f6fb606840b14bf69b71c0f25d0188476068fff7befa65602068a575002818bffff7b7fa0020307000202060a06020820a2551e00798007a40064dd5207c00b301980078e0b103990025204652460323009509f0ccfb606840b14bf69b71c0f25d0188476068fff794fa65602068a575002818bffff78dfa00202060a06020820b252068002818bffff783fa00202060a060208220e001980078e0b103990025204652460323009509f0a1fb606840b14bf69b71c0f25d0188476068fff769fa65602068a575002818bffff762fa00202060a06020820625284609b0bde8f08f00bf2de9f041f0284bd100294ff00b0000f07f80022a7cd345f64d50c0f246000e4617468047811eb1fa81f14c09012808bf0224002c4ff00a006ad07578e91ec9b2fe2938bfbde8f081307833463946032860d002282dd001281cbf0a20bde8f081ac4204bf0020bde8f0814808842884bf0b20bde8f081881e03f1020887b240463946fff7bffa002869d006462846fff715fb21462a46fff7e9fa3046bde8f08145f64d57c0f2460707f5e27cbde8f0416047ac421cbf0020bde8f081a1f1210010f1160f48d36ff0480048432330c0b2242841d81a4612f8020f40f00207032f4bd19b796340032b47d10b2904d0032804bf0b20bde8f081881e4ef60b6783b2c0f247070120f021b847002818bf0620bde8f081ac422dd1a1f10c0010f1030f1ad31a4612f8020f042815d158796040032811d1d879a0f1310717f1300f0bd39b79984208d9a1f10807c01a874284bf0b20bde8f081cfe70b20bde8f081b07a204207d04046394622462b46bde8f041fff79abb0020bde8f0810a20bde8f08140f20d00c0f2000042f6653c7844c0f2440c012100220023604700bf80b582b04ff4f0704af61f4e01904ff4207cc0f2470e0020002100220023cdf800c0f04702b080bd4ff29c51c2f229010968bff35f8f0a466ff39602b2f1005f19d10a684ef66c63ccf2ff039a4212d14a68b2f57d7f0ed1d1f86c1159b147f64c62c2f207021268891a012903db0178042938bf7047002101707047b0b541f23154c0f252041d46a0474ff29c51c2f229010968bff35f8f0a466ff39602b2f1005f0cd10a684ef66c63ccf2ff039a4205d14a68b2f57d7f18bf002100e00021421c18bf002900d1b0bd95f84d20002afad091f84721002a08bfb0bd46f25863c2f206031a68132aeed8c2ebc20403eb04135b6801ebc2014ff40042c1f8e431a1f8ea212a7a01f5f271002a0fbf802248f20112ca808122ab7c33b1ab7d23b1022342f002028b71ca7195f820303bb195f8243023b1032342f004028b71ca7195f846304bb195f8443042f008020b7195f84530ca714b71b0bd48f27342c2f207021378002b14bf9378ff230b711378002b14bf5278ff224a71b0bdf0b589b048f66502c0f24b020c46054690474ff29c51c2f229010e68bff35f8f31466ff39601b1f1005f0cd131684ef66c62ccf2ff02914205d17168b1f57d7f08bf092d01d009b0f0bde1082c29fad896f847110029f6d045f64d51c0f2460107468847014638460129ecd1ff22079244f6435246f258610020cff60172c2f20601089006920b685a1e132a4fd8c3ebc30501eb05111a1fa1f5de7191f85451ad0618d4d51c42d091f8e450ad0616d4951c3cd091f87450ad0613d4551c36d00d79ad0610d4043aa1f5e071151da3f10403e3d12be05a1e01f5a87104e09a1ee03101e0da1e703106ebc203096893f9eb21b2f1ff3f1adc03f5f2731e688e4215d11e798df81b605e798df81c609b798df81e200a0a8df820108df821200a0c090e8df81d308df822208df823100f228df8012010228df80220522208218df80420b4f5804f4ff080028df800108df8061038bf4ff48042b4f5001f6ff07f0604f07f0138bf0026802c28bf80318df807109df809509df80a108df8030004d29df808200223002415e0c4f3c610b4f5804f024403d20323012400200be0b4f5001f03d204230224012003e0052303240120002135468df8053004f108038df808208df809508df80a1070b96846a222c118c254062048700c208870c81c06a90c22faf70bfa04f117034ff225066a46c0f2470601200821b047384609b0f0bd70b582b00546ff208df8040044f25220c0f20100009040f2c960c0f2480016460c46804798b148f27e30c2f2070000880122c1b264298df8032008d80721b0f5807f38bf03218df803108df80400301b28bf08280cd3d221281929550621417005218170033069460522faf7c7f90834204602b070bd00bf024600284ff0ff3009d0022918bf70471078112801d1507810b14ff0ff30704710b586b045f64d50c0f24600804701284ff000003ed1cde9020040f20830c0f210000190ff208df8140044f25220c0f20100049040f2c960c0f24800804798b148f27e30c2f2070000880122c1b264298df8132008d80721b0f5807f38bf03218df813108df8140040f2d260adf80800052001ac8df80a00e01d04a90522faf771f94ff2250cc0f2470c0120092122460c23e04706b010bd4ff29c50c2f22900016808466ff39600b0f1005f1ad108684ef66c62ccf2ff02904213d14868b0f57d7f0fd1d1f83c0160b147f64c62c2f207021268801a0028cebf01200020c1f83c017047002070474ff29c50c2f22900026810466ff39600b0f1005f32d110684ef66c61ccf2ff0188422bd15068b0f57d7f27d1d2f86c0120b347f64c61c2f207010968401a0028c4bf01207047d2f8701100200029c2f86c0182f86a01c2f87001c2f82003a2f88c0308bf704780b548f2a352c0f24502084690470020bde88040704700207047f0b101684ef66c62ccf2ff02914218bf704790f8461199b110b54af273644ff0000cc0f24604864680f846c10120002100220023aef844c1a446bde810406047704700bf02464ff6ab70cff6ff7042f6653c7844c0f2440c00210023604700bf70b5002866d0044600796179a279e37940ea012040ea024050ea036007d00e2803d0032856d1032502e0042500e00225fff74eff00284dd04ff29c50c2f22900066830466ff39600b0f1005f42d130684ef66c61ccf2ff0188423bd17068b0f57d7f18bf70bd45f64d50a478c0f24600804701282ed1082086f88402032086f88502102086f88602b22086f88802062086f8890286f88a02462086f88b0243204ff0000e86f88c0201204ef6057c06f5217286f887e286f88d0286f88e5286f88f42c0f2470c09210d2386f890e2bde87040604770bd00bf2de9f04f81b04ef66c6a4ff29c560446ccf2ff0ac2f229064ff6ff77002547f67f784ff07f0906e048f2a351c0f24501bff32f8f8847d6f800b0bff35f8f3068bff35f8f01466ff39601b1f1005f07d10168514504d14168b1f57d7f00f096804ff47d7000f048fe002800f0bb804ff60c41cff6ff7100bf42182e3182f8f45382f8f55382f8f65382f8f75382f8f85382f8f95382f8fa5382f8fb5382f8fc5382f8fd5382f8fe5382f8ff5382f8005482f8015482f8025482f8035482f8045482f8055482f8065482f8075482f8085482f8095482f80a5482f80b5482f80c5482f80d5482f80e5482f80f5482f8105482f8115482f8125482f8135482f8145482f8155482f8165482f8175482f8185482f8195482f81a5482f81b5482f81c5482f81d5482f81e5482f81f5482f8205482f82154a0d14ff47d7141600121c0f800a08173a0f8c48180f8c391078447848784c784078547858785c785078647868786c786078747878787c78756e8001f59457ff459afbff35f8f00bf46e8000121b156e8001f5945f8d04de7002780f85b712a270821032380f85c71042780f8581180f85931102380f85d7180f85e1101214ff2250c074600f5ac7280f85a3180f85f1180f86031002c18bf0124c0f2470c012010210a2387f8614101b0bde8f04f604701b0bde8f08f00bf80b582b04ff0010ccdf800c000f002f802b080bd2de9f04381b04ff29c57c2f229073f68ddf820803c466ff39604b4f1005f10d13e684ef66c65ccf2ff05ae424ff0000904d17e68b6f57d7f08bfb946012804d013e04ff0000901280fd11c4615460e460746fff7d1fd2346044631462a463846002c18bfb9f1000f07d14af2736cc0f2460c01b0bde8f043604799f8460180b1b8f1010f7cd1d9f84001002189f84611a9f84411a0b342f68d41c0f2440188472ee0b9f844010121013080b2012898bf0846a9f84401d9f8400142f68d44c0f2440489f8461128b94846fff71ffec9f8400140b1a047d9f84001a4f140024ff4c8719047a8b199f84601002848d0d9f84001002189f84611a9f8441100b1a0474af2736cc0f2460c0120002100220023afe745f64d50c0f24600804701282fd1082089f84801032089f84901102089f84a01002089f84b01b22089f84c01062089f84d0189f84e01462089f84f01432089f85001012089f85101b9f844014ef6057c070a09f5a47289f8528189f85301c0f2470c012009210d2389f8547178e701b0bde8f08300bf80b582b04ff0050ccdf800c0fff734ff02b080bd2de9f04f83b04468002c00f0ba828368002b00f0b68204eb030b4ff000090027002614e047f64c63c2f207031b6845f69077c0f201073b44c6f83c310ceb0a0300275b451c464ff0000680f09a82a04618f9013b03f07f05bd40002b46ea050610d406f00703012b16dc0bb3012b40f08882abeb0803082bc0f0838204f10903dee700bfd84580f07c82182f07f107074446dcd975e200bf022b3ad0052b40f07082abeb0803042bc0f06b82631dc7e7d84580f0668294f90130002b04f10203bed55b4580f05d8294f90230b3f1ff3f04f10303b4dc5b4580f0538294f90330b3f1ff3f04f10403aadc5b4580f0498294f90430b3f1ff3f04f10503a0dc5b4580f03f8294f90530002b00f13a82a31d96e7d84580f0358294f9013004f1020c002b03f07f0a1fd5dc4580f02a8294f90270e31c07f07f05b7f1ff3f4aeac51a02dde0469c460fe05b4580f01a8294f9037004f1040c07f07f05b7f1ff3f4aea853a40f3ff809846abeb0c039a4500f20882f308672b1dd0652b7ff45fafbaf1060ffff45baf9cf80030462b7ff456af98f80230432b7ff451af98f80330012b7ff44caf4ff29c54c2f229040290cde9002118e0044660460e4651461746654600f036fcac4631463a46204636e748f2a3513046c0f24501bff32f8f8847dde900210298ac462768bff35f8f2668bff35f8f33466ff39603b3f1005f0bd133684ef66c65ccf2ff05ab4204d17368b3f57d7f00f0c2804ff47d70654600f09efbdde9002106460298ac46002e3ff406af4ff60c43cff6ff73f4182e3384f8f49384f8f59384f8f69384f8f79384f8f89384f8f99384f8fa9384f8fb9384f8fc9384f8fd9384f8fe9384f8ff9384f8009484f8019484f8029484f8039484f8049484f8059484f8069484f8079484f8089484f8099484f80a9484f80b9484f80c9484f80d9484f80e9484f80f9484f8109484f8119484f8129484f8139484f8149484f8159484f8169484f8179484f8189484f8199484f81a9484f81b9484f81c9484f81d9484f81e9484f81f9484f8209484f82194a0d14ef66c63ccf2ff0333604ff47d7373600123b37347f67f73a6f8c4317f2386f8c3314ff6ff734ff29c5433847384b384f38433857385b385f38533867386b386f38633877387b387f387c2f2290454e8003fbb427ff440afbff35f8f00bf44e80063fbb154e8003fbb42f8d034e7dc4580f00c8194f90470631d07f07f05b7f1ff3f4aea455a3ff7e1ae5b4580f0fe8094f90570002f00f1f98004f1060c4aea077ae5e698f8043098f8057098f80650032b47ea052837dd052b58dc042b78d0052b7ff440aed6f86c313bb147f64c67c2f207073f68db1b002b18dcd6f8703186f86a91c6f87091c6f82093a6f88c936bb10c4648f2a35180461846c0f24501174665468847ac4621463a46404647f64c63c2f207031b6845f69077c0f201073b44c6f86c310ee6012b3ff400ae022b00f08780032b7ff406ae17460c466546fff711fb03460298ac4621463a46002b3ff4f9ad96f84631002b3ff4f4ad304641f28831a6f8448109f0d9f847e0062b4ad0072b7ff4e7ad80464df6db50c0f24a0016460f466446804703465d1ea446394632464046012d3ff6d5ad981eb0fa80f04009fff7e3fba446394632464046c9e517460c466546fff7d5fa03460298ac4621463a46002b3ff4bdad96f84631002b3ff4b8adb6f8443143457ff4b3add6f8403186f84691002ba6f844913ff4aaad42f68d411846c0f2440188470298ac4621463a469ee5d6f87031c6f86c91002b86f86a91c6f87091c6f82093a6f88c933ff490ad0f4648f2a35104461846c0f24501164665468847ac463946324648e696f84631c6f83c91002b3ff47bad0446d6f8400165468846174686f84691a6f8449120b142f68d41c0f2440188474af273660120002100220023c0f24606b04720463a464146ac465ce54ff2a513c0f2490303b0bde8f04f184700bf7fb50646002806d1fff75efa002807d19de80f00064649f29b1cc0f24f0c60477fbd00bff0b583b01d46144609294ed106460f46f22d10d8a22160196155062141700b2181704af2bc51c0f20001033079440b22f9f79efb0e35204629464ff4807200f03df80546ff208df8080044f25220c0f20100019040f2c960c0f24800804798b148f27e30c2f2070000880122c1b264298df8072008d80721b0f5807f38bf03218df807108df80800f82d0cd8d221601961550621417005218170033001a90522f9f766fb0835394630464ef60577c0f2470722462b46b84703b0f0bd70b58ab00c464ff29c51c2f229010b68bff35f8f19466ff39601b1f1005f16d119684ef66c66ccf2ff06b1420fd15968b1f57d7f0bd1694605461846164600f039fc324628462825a24231d244e04d218df8001043218df8011001218df80210002115258df803108df804108df805108df806108df807108df808108df809108df80a108df80b108df80c108df80d108df80e108df80f108df810108df811108df812108df813108df81410a24213d3111b022910d30fd003398d420cd8c22201190255062048708d70c81c69462a46f9f7f0fa6019c41c20460ab070bd00bf46f65450c2f20700016840f2230cc0f2000cfc44c26861454ff001034ff0040008bf0223624508bf0820002a08bf1046002918bf184370472de9f04f81b04ff29c53c2f229031c68bff35f8f23466ff39603b3f1005f40f0cc8023684ef66c67ccf2ff07bb4240f0c4806368b3f57d7f40f0bf80d4f8bc310133c4f8bc314ff6ff739a4238bf134694f87471a4f8c03184f8c2011fb1002a18bf002907d1b4f8c6010130a4f8c60101b0bde8f08f94f87b010028f3d0d4f8840170b147f64c69c2f20709d9f80030c01a002805dd94f87501012809d101270ce0b4f8c8010130a4f8c80101b0bde8f08f94f87771012f18bf022794f87a510020eb0793468846adf80200adf8000012d0022f10d194f8790168b90df1020641f281556b46c0f25b05404611463246a84794f87a515a461646b2f5c86f28bf4ff4c86606f1150a504600f061f8002856d0bbf5c86f88bf45f08005d9f80010d4f8802153230271120a42710a0a8171c2710a0c090e03704d234172a02143700123c17200218370c57002728772017394f87911bdf802204173bdf800108373c173090a0174110a8174310a017500f115014274c6740746084641463246f9f70dfa4ff27d12c0f2470238465146904710f1800fd8bf6ff07f007e28a8bf7e20d4f8801184f8c501481c48f2a351c4f88001c0f245013846884701b0bde8f08fb4f8ca010130a4f8ca0101b0bde8f08fb0b54ff2a054c2f22904216846f23f52c5f28802b2eb510f48f25f514cf67e25c0f24501caf2101518bf25608847002804bf691c2160b0bd10b301684ef66c62ccf2ff0291421bd190f87b11c1b1d0f88411b1b147f64c62c2f207021368cb1a012b0edb1268d0f88801002808bf7047891a42f64d42c0f2440208bf01211047704710b590f875210021c0f8841180f87b11511eb1fa81f149f259624909c0f25902044640f20b10904710f1800fd8bf6ff07f007e28a8bf7e2084f8c4014ef6e374c0f25a04a04704f1bc00bde81040004700bf2de9f04f81b00429c0f0e980834600784d2840f0e4809bf80100432840f0df809bf80200012840f0da804ef66c684ff29c570d46ccf2ff08c2f229074ff6ff7600244ff07f0906e048f2a351c0f24501bff32f8f8847d7f800a0bff35f8f3868bff35f8f01466ff39601b1f1005f07d10168414504d14168b1f57d7f00f098804ff47d70fff752ff002800f0a8804ff60c41cff6ff7100bf42182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d7141600121817347f67f71c0f80080a0f8c41180f8c391068446848684c684068546858685c685068646868686c686068746878687c68757e8001f51457ff457afbff35f8f00bf47e8000121b157e8001f5145f8d04be79bf80310022905dc01290ed0022900f09e800ce003290dd0042908d190f8741129b101b0bde8f04fdce00d2d06d201b0bde8f08f044600f031f987e090f87b1119b390f87521002180f87b11511eb1fa81f149f259624909c0f25902044640f20b1090474ef6e37510f1800fd8bf6ff07f00c0f25a057e28a8bf7e2084f8c401a84705f1bc00804720469bf804100446012988bf002180f875119bf8051001f00302012a4ff0010198bf0a4680f877219bf80630012b88bf002380f878319bf80730022b88bf002380f879319bf808309bf8097043ea0723502b98bf5023b3f5f07f28bf4ff4f073a0f87c319bf80a309bf80b7043ea072341f28837bb4238bf1f46a0f87e719bf80c3080f8741103f0030380f87a3102f00103002103eb5202c0f88011c0f8bc11a0f8c01180f8c211c0f8c811a0f8c6117f2180f8762180f8c51100f009f8204600f04cf8204601b0bde8f04f78e000bfb0b5044690f87a01800758bfb0bd94f875014ef633750128c0f25a0507d105f1b000804705f58b71002088470ee005f5b670804794f87501012801d1002004e094f87701013818bf0120a84794f875014ff6ed120138b0fa80f0cff6ff7249f2015341097a44c0f2590340f20b10984710f1800fd8bf6ff07f007e28a8bf7e2084f8c301012084f87b01b0bd70b5044647f64c60c2f20700006894f87b1145f69075c0f2010500292844c4f8840108bf70bdd4f8880142f66536c0f2440658b94ff69130cff6ff707844002122460023b047c4f8880150b106f594718847d4f8880106f1e8022946bde87040104770bdb0b5044600f5c675082084f88c01032084f88d01102084f88e01002084f88f01c22084f89001062084f8910104f29311204600f065f84ff0280e4ef6057cc0f2470c012009212a462f2384f892e1bde8b040604770b54ff29c50c2f229000468bff35f8f20466ff39600b0f1005f46d120684ef66c61ccf2ff0188423fd16068b0f57d7f18bf70bd94f87b010025c4f8845100b394f8750149f259620138b0fa80f04109c0f2590240f20b1084f87b5190474ef6e37610f1800fd8bf6ff07f00c0f25a067e28a8bf7e2084f8c401b04706f1bc008047d4f8880184f8745170b142f68d45c0f24405a847d4f8880105f166018847002804bf0020c4f8880170bd70b505464d200870432048700120887095f874010c46c87095f87501087195f87701487195f87801887195f87901c87195f87c01087295f87d01487295f87e01887295f87f01c87295f87a01087395f87b01487345f64d50c0f246008047a073d5f880010026e073d5f88001000a2074b5f88201607495f883012675a074a020e074d5f8bc016075d5f8bc01000aa075b5f8be01e07595f8bf01207695f8c001607695f8c101a07695f8c201e07695f8c601207795f8c701607795f8c801a07795f8c901e07795f8ca0184f8200095f8cb0184f8210095f8c30184f8220095f8c40184f8230095f8c50184f82400fff79dfb84f82500d5f88401a0b147f64c61c2f207010a68821a012a0bdb0968401a44f6d35100f2e730c1f26201a0fb01018e0900e00026300a84f8266084f8270070bd00bf2de9f04182b04ff29c51c2f229010c68bff35f8f21466ff39601b1f1005f79d121684ef66c62ccf2ff02914272d16168b1f57d7f6ed194f8cc1179b394f8ce01c0070ad0d4f86c0178b347f64c61c2f207010968401a002827dd47f24c45c2f2070555f8040c002854d042f29707c0f24c074af6e908002607f5437101a8c0f24b0801968847a8b1032084f8cf612860b4f8d001c04702b0bde8f081d4f8d811c1b302b0bde8f0410847204602b0bde8f04133e0019841f60d56c0f24c06a861b04706f5af708047e861b847012084f8cf0103202860b4f8d001c047d4f8e001a0b10199d4f8dc21b4f8d271531a38bf8b1abb420ad2b4f8d41159b147f64c62c2f207021268101a884203d32046022100f078f802b0bde8f08100bfb0b590f8cc41002c4cd044f28442c2f200021188082911462cd0114631f8083f082b27d0114631f8103f082b22d0114631f8183f082b1dd0114631f8203f082b18d0114631f8283f082b13d0114631f8303f082b0ed0114631f8383f082b09d0114631f8403f082b04d032f8481f0829114614d14a68b2f5870f10d36ff35602012a0cd14a684ff65363cff6ff737b449a4204d1d0f8d821002a18bf4a60002180f8cc1190f8cd11b1b1002180f8cd1145f60a61c2f20701097869b947f24841c2f20701096839b14af68171c0f24b010546042088472846002c08bfb0bd0321bde8b04000e000bfb0b588b0044645f64d50c0f246000d468047012840f08f8008208df8010003208df8020010208df8030000208df80400ca208df8050006208df8060018208df8070047f26440c2f2070050f81c2c94f8cc11002a18bf0122002945f60961c2f207014b7818bf0232002b94f8cf3118bf0432002b4ff0410318bf08328df808304c238df8093001238df80a308df80b508df80c2050f8182c4ef605758df80d200268c0f24705130a8df80e208df80f30130c120e8df810308df811204268130a8df812208df81330130c120e8df814308df8152002698df81620120a8df8172009788df8181081688df819106821c2f2000109688df81a10090a8df81b1047f64c61c2f207010a68130a8df81c208df81d30130c120e8df81e308df81f2000680df10102c4f8dc0108680921c4f8e00101201f23a84708b0b0bd00bf2de9f04f83b0022902d24ff0ff35ece0cde901100120cff680704ef66c644ff29c56ccf2ff04c2f229064ff6ff77851c4ff0000947f67f7b4ff07f0807e000bf48f2a351c0f24501bff32f8f8847d6f800a0bff35f8f3068bff35f8f00ea0501b1f1005f07d10168a14204d14168b1f57d7f00f093804ff47d70fff7a1fa0028c3d04ff60c41cff6ff7100bf42182e3182f8f49382f8f59382f8f69382f8f79382f8f89382f8f99382f8fa9382f8fb9382f8fc9382f8fd9382f8fe9382f8ff9382f8009482f8019482f8029482f8039482f8049482f8059482f8069482f8079482f8089482f8099482f80a9482f80b9482f80c9482f80d9482f80e9482f80f9482f8109482f8119482f8129482f8139482f8149482f8159482f8169482f8179482f8189482f8199482f81a9482f81b9482f81c9482f81d9482f81e9482f81f9482f8209482f82194a0d14ff47d714160012104608173a0f8c4b180f8c381078447848784c784078547858785c785078647868786c786078747878787c78756e8001f51457ff45cafbff35f8f46e8000121b156e8001f5145f8d051e7044645f64d50c0f24600804701281dd1029d6978022916d00129204607d000297ff425af00210025fff77efe0fe0019f41f28831022f0ed14ff4fa730022012741f2883624e02046fff7fafd0025284603b0bde8f08faa78052f11d3eb782e79072f43ea062310d395f805c0ae79092f4cea0627e4d3ee792d7a46ea052607e041f288364ff4fa7301e041f288360127642b98bf64238b4228bf0b4690f8cc1180f8ce21a0f8d031a0f8d271a0f8d46171b147f24841c2f20701096800295ed001210446fff730fe0025c4f8e051bee744f28442c2f200021188082911462cd0114631f8083f082b27d0114631f8103f082b22d0114631f8183f082b1dd0114631f8203f082b18d0114631f8283f082b13d0114631f8303f082b0ed0114631f8383f082b09d0114631f8403f082b04d032f8481f0829114632d14a686ff00105b2f5870ffff483af0123cff680731a40012a7ff47caf4b684ff6c112cff6ff727a44934214bfc0f8d831d0f8d831002b3ff46daf4a60012180f8cc1199e74af60771c0f24b010420884720b105462046fff756fd5be70121204684f8cd118fe76ff0010553e700bf10b582b00c464df6cb61c0f24501884724b12178042901d1617809b102b010bda1780d29fad1e1780029f7d121790029f4d161790029f1d10028efd00168e029ecd10446fef7c2f9014620460029e5d004204ff6591e01904ff0000cc0f24e0e0020002100220e23cdf800c0f047204602b010bd3146fff7c3bf00bfb0b582b00c460546fef7a2f90146002d4ff0000018bf002901d102b0b0bd47f2fc70c2f2070000684df6cb61c0f24501884790b10068e0284ff00000edd129784ff6591c0191c0f24e0c0021002223460090e047012002b0b0bd002002b0b0bd08b530460921fff7cbff002805d002b045f28310c0f24400004744f62703c0f24603984708bd00bf08b530460a21fff7b7ff002805d002b045f28310c0f24400004744f62703c0f24603984708bd00bf08b530460b21fff7a3ff002805d002b045f28310c0f24400004744f62703c0f24603984708bd00bf10b589b38968012805d104460846fef7a3f9204628e039b30a794b798c79c97942ea032242ea044242ea016106291bd147f29121c0f24601044688470146204691b144f2e970c0f24400804701462046002918bf10bd49f21a30c0f2000078440c21fff761ffd4e710bd00bf10b5059c4ff20340c0f2460080472146fff7c0ff10bd00bfb0b5c4b0044600284ff0000000f0c78089b20b2940f0c380207838b96078092804d1a078612801d1e07810b1002044b0b0bdfef7dff80028f8d045f64d50c0f24600804701281cd00228efd103208df8070001200df107058df80800a81c21460b22f8f705fa4af66104c0f24604f02029460d220023a047b0fa80f0400944b0b0bd4ff29c50c2f22900006801466ff39601b1f1005fc9d101684ef66c62ccf2ff029142c2d14168b1f57d7fbed122797f21042a06dc012a0cdcbab1012a08bf00211ae0082a0bdc052a11d0082a08bf0a2112e0022a0dd0042a08bf01210ce0092a09d00a2a08bf0e2106e0092104e0022102e0032100e00b2180f80b1310216a2580f80c13a22180f80653152580f80e13062180f807531a2580f80f130c2180f80853132580f8101352210822022380f8095380f811134921012580f8042380f8053380f80a2380f80d3380f8121380f8135380f81453217900f5417280f815136179192380f81613a17980f81713002180f81813e17980f81913217a80f81a13617a80f81b13a17a4ff2250480f81c13c0f247040120e021a047284644b0b0bd00bf1fb5fff72bff002803d0bde81f4000207047bde81f4038b584b049f21f13c0f24703184710b5f0281bd1d1b1cab10c78032c16d10d2a1cbf0b2010bd487801281cbf0a2010bd45f64d50c0f246000c468047012803d1a01c0b21fff7fffe002010bdbde81040fdf7a7bc00bf4ff29c52c2f229021268bff35f8f13466ff39603b3f1005f10d1d2f800c04ef66c63ccf2ff039c4508d15368b3f57d7f02bf0023c2f8fc32c2f8003347f2c942c0f24d02104700bf4ff29c50c2f229000068bff35f8f01466ff39601b1f1005f0fd101684ef66c62ccf2ff02914208d14168b1f57d7f02bf0021c0f8fc12c0f8001347f2d940c0f24d0000472de9f04184b0dde90a76022f16d340f64705a94212d08eb13578412d0ed175784e2d0bd1014602f0bf0012284ff00d0008bf002b0ed004b0bde8f0810c9d0097cde9016546f63916c0f24d06b04704b0bde8f081082feed3b078012802d1f078022803d90d2004b0bde8f081002953d045f6f444c2f2060414f8040c81424bd12068002848d048f22732c0f254020d4608460221904700283ed024682088d8b36088c8b3a088b8b3e088a8b330797179b279f37940ea012040ea024050ea0368d0d04ff29c50c2f229000068bff35f8f01466ff39601b1f1005f1bd101684ef66c62ccf2ff02914214d14168b1f57d7f10d1f178a1b190f8fc22aa420cd1d0f80023424508d101295bd1082faad100f09bf875e0f07818b1082004b0bde8f081082f9fd1f9f77afec8b10646d0f86c010028f1d047f64c61c2f207010968401a0128e9db96f8fc0268b196f8fd02032809d00628e0d1304600f076f8dce7112004b0bde8f08146f63917c0f24d0707f53a60804707f539622846214690470120002786f8fd020df10f02304600210123a6f8fe7286f8fc52c6f800838df80f70adf80c7000f07ef861884af2bd6603abc0f24c0628460222b047384604b0bde8f081a7f1510189b24ff6b87291424ff00d0119d390f8fd02032808467ff42baf334613f8080fa7f108018ab280b9052a0ed9a1884af2bd67c0f24c072846b847002004b0bde8f081084604b0bde8f08101280dd1042a0bd3981810f8021c00297ff420af10f8010c00287ff41bafe0e702284ff00d0008bf062a7ff4fcae707b01283ff60fafd4e790f8fd120a1f022a38bf7047022905d0012907d1042180f8fd127047052180f8fd12704780b582b0052180f8fd120121adf8061045f6f441c2f2060190f8fc0209684af2bd6c49880df10603c0f24c0c0222e04702b0bde8804070472de9f04fc7b0054690f8fc0203920591d8b145f6f041c2f206010978884214d148f22732c0f2540202211c46904760b195f8fc0240f66502c0f255020021904718b100690088172802d247b0bde8f08f033880b2f42828bff42007af0b3807f101084ff000094ff0000a01900495029414e000bf0699cde94509adf810112121adf8121143f23d5144a8c0f255018847049d029c1ffa8af0a042d6d2a4eb0a01019a1ffa81fbb5f8fe1241235a45b8bf93468df81c304e234a1c8df81d300123a5f8fe22d5f800238df81e30059b1ffa8af08df81f30130a8df82410090a8df820208df82130130c120e8df82510b0fa80f18df823204a091ffa8bf111fa8afaa2458df8223008bf0232bbf1000f8df826202fd001390329039901eb000c01d2002115e04ff6fc700bea00020cf10103002100bf5e1816f8014c7d187078ec725c5cb67804318a422c736873ae73f1d1049d1bf003020dd01cf80160cb19012ade7207d00ceb01004178022a19731cbf8078587395f8fc020bf10b0406900b2010fa84f649f6cd713046c0f24c01884700283ff47eaf26f003031ffa84fc06f003025e426ff00303c1180433f518043581f8049081f8059081f8069081f80790f2d152b10344012a83f8049005d0022a83f8059018bf83f806900bf10e0202701b22442108230272220480f801908170c370417283723ff43dafbcf1040f01d2002214e047f6fc710cea0103002200bfb95c8618f17218f8021008eb020531736978ad78043293427173b573f0d11cf003033ff41fafbe5c00f10b01012b8e543ff418af561cbd5d022b8d553ff412af0232bb5c8b540de7f0b583b04ff29c51c2f229010c68bff35f8f21466ff39601b1f1005f4bd121684ef66c62ccf2ff02914244d16168b1f57d7f40d194f8fc12e9b3002840d002888a423dd145f6f446c2f2060616f8041c8a4235d1316899b3356894f8fd12032919d8d4f86c1139b147f64c62c2f207021268891a00290edc02218df80b100df10b020746204600210123fff78dfe2046fff75cfe38468278092a1bd141896b8894f8fd72994217d1032f3adc012f6ad0022f3dd004e018b181780939022901d203b0f0bd47f6ed31c0f24d0103b0bde8f040084794f8fd72032ff1d8a2f10d0102290cd2c178d1b302208df8040001aa204600210123fff757fe03b0f0bd092a08bf032fdcd14189aa889142d8d1c078002800f0818002200df105028df80500e6e7052f04d0042fcad1c07805262fe0c078002848d0062084f8fd0202208df807000df10702204600210123fff72cfe052fb5d02046fff7f9fd03b0f0bd4268002aadd00389a3f2012189b2b1f57e4fa6d34089082b48d12988884245d12046012108234ce0c0780526002808bf022650b102208df80a000df10a02204600210123fff701fe6988012294f8fc024af2bd67adf8082002abc0f24c07022284f8fd62b84703b0f0bd052f15d1002094f8fc523668c4f8fc02c4f8000347f2c944c0f24d0404f11000804728463146224603b0bde8f0401047032084f8fd0201208df806000df1060272e7e98888427ff457af2046022103e0204603210022002303b0bde8f040bfe506290ad14178012907d18178653911f1630f02d3c178012902d94ff0ff307047f0b581b00179427941ea022540f6b8318d421fd80646fdf7fdfbd8b1f9f75cfbc0b10446d0f8d80342f66537c0f2440758b941f26f60c0f200007844012100220023b847c4f8d80320b107f1e8022821904718b14ff0ff3001b0f0bdb078f178d4f8e4230023c7f6e07340ea452003ea425240ea0120bff35f8f1043bff35f8fc4f8d403002001b0f0bd00bf02293cbf4ff0ff3070472de9f04f9bb00278437842ea0325b5f5007f04d94ff0ff301bb0bde8f08f4ef66c6a4ff29c56ccf2ff0ac2f229064ff6ff774ff0000b4ff07f090791099008e000bf48f2a3512046c0f24501bff32f8f8847d6f80080bff35f8f3468bff35f8f20466ff39600b0f1005f07d12068504504d16068b0f57d7f00f09a804ff47d70fef7d5fa002800f0928004464ff60c40cff6ff7000bf21182e3081f8f4b381f8f5b381f8f6b381f8f7b381f8f8b381f8f9b381f8fab381f8fbb381f8fcb381f8fdb381f8feb381f8ffb381f800b481f801b481f802b481f803b481f804b481f805b481f806b481f807b481f808b481f809b481f80ab481f80bb481f80cb481f80db481f80eb481f80fb481f810b481f811b481f812b481f813b481f814b481f815b481f816b481f817b481f818b481f819b481f81ab481f81bb481f81cb481f81db481f81eb481f81fb481f820b481f821b4a0d14ff47d7060600120a07347f67f70c4f800a0a4f8c40184f8c39127846784a784e78427856785a785e78527866786a786e78627876787a787e78756e8000f40457ff455afbff35f8f00bf46e8004028b156e8000f4045f8d049e70024ddf824805db1fdf7e2fa0146002c4ff0ff3018bf002902d11bb0bde8f08fb5fa85f040094ff000098df82c908df82d908df82e908df82f908df830908df831908df832908df833908df834908df835908df836908df837908df838908df839908df83a908df83b908df83c908df83d908df83e908df83f908df840908df841908df842908df843908df844908df845908df846908df847908df848908df849908df84a908df84b908df84c908df84d908df84e908df84f908df850908df851908df852908df853908df854908df855908df856908df857908df858908df859908df85a908df85b908df85c908df85d908df85e908df85f908df860908df861908df862908df863908df864908df865908df866908df867908df868908df869908df86a908df86b90bcb1d4f87021a2b14ff4006304e03f683b44b3f5403f0cd2d718be680136f6d07e68033626f0030609eb060101f11009ede7002d4ff0020a039500f00581ddf81cc0acf102020a2ac0f00081002608eb0a0b9bf801504ff0ff30012d3ff648af9bf802209bf803309bf8047042ea03229bf8053042ea074747ea0361a1f1011212f5803f0a91fff433af9bf808109bf809e0029141ea0e210af10a020497aceb02034f1e9f42bff423afcde905269bf806209bf807300a9e42ea032cb6eb0c07fff416afb9423ff613af18f80a70089147ea052a4feada000ba90e5c07f00705012707fa05f5354240f001830e5c45ea06050d5407994ff6ff75c0f20205b4b3d4f8700198b317461a0201924fea0e264ff4006200eb0208d8f8083053454bd0d8f800301a44aa4221d800eb0208d8f80830534540d0d8f800301a44aa4216d800eb0208d8f80830534535d0d8f800301a44aa420bd800eb0208d8f8083053452ad0d8f800301a44aa42d3d900bfbcf1000f40f0bc8204980a464ff6fc710330c0f2030108404844944600f1100908980599069e00eb010a0398013686424ff0000028bf0120ddf824804fd2aceb0a02092a3ff64caf49e0d8f804000a9a904240f09582d8f80c006045c0f0908236d9089aa0eb0c00824200f289827ab3029831180198c1f1000cc2199044a1f1010e002208eb02050beb0203287c9e7ab04240f0758296451cd06e7cdf7abe4240f06e820ceb0207be1c13d0ae7c187b864240f06582079ef81c07d0e87c5b7b984240f05d8204329142dbd1b446a7e78c46a5e7ddf81cc0a2e7ddf81cc0002800f04e82baeb0c004ff0000118bf0120b9f53e3f88bf0121014303980028c1f100003ff43eae00297ff43baed4f870b1bbf1000f40f08b804ff44030fef764f8002800f02d82834600206ff0200100220beb02030bf8020040320beb0107b2f5006f01f1400158709870d870187158719871d871187258729872d872187358739873d873187458749874d874187558759875d875187658769876d87618775877987787f8400087f8410087f8420083f8220083f8230083f8240083f8250083f8260083f8270083f8280083f8290083f82a0083f82b0083f82c0083f82d0083f82e0083f82f0083f8300083f8310083f8320083f8330083f8340083f8350083f8360083f8370083f8380083f8390083f83a0083f83b0083f83c0083f83d0083f83e0083f83f0093d14ff43e30cbf800080020cbf804084ff0ff31cbf80c084ff40060c4f870b1cbf80818c4f820034ff6ff760221c0f202064ff000090ae00aeb080109f10109ddf8248099454ff000003ff497ad08eb010518f801006f78cdf81c900a9195f802c0eb7895f804906a7995f806a0e97995f808e06d7a40ea072808955cb3012f29d84ff400670beb0705a868404500f0a28028680744b7421dd80beb0705a868404500f0988028680744b74213d80beb0705a868404500f08e8028680744b74209d80beb0705a868404500f0848028680744b742d7d94cea032040ea094040ea0267f81c20f00300d4f82093cdf818a000f1100a0020cde904e10297b9f1000f26d00beb09035bf809105a68514580f09b80eab10beb02005bf80210d0f80490514580f08c80b9f1000f11d00beb09035bf809105a68514580f0868042b10beb02005bf80210d0f804905145d6d376e000204ff400694ff4006504e000bf3d44b5f5403f23d20beb05018a685bf805700132f4d04868ca68033020f0030000f110060beb09001032f7f75df94168c2684bf809608368d4f870b18a424ff00001b14408bf00f110014bf82310d7e7c9f540310f294ff00002c4f8202310d90beb09004bf809104ff0ff3142608160c260c4f820930ae0e868039b0a9a089f60e010b10268114401604ff000090020b9f1000f7ad00beb09035bf809105a68514522d2002a71d00beb02005bf80210d0f80490514513d2b9f1000f66d00beb09035bf809105a6851450ed2002a5dd00beb02005bf80210d0f804905145d7d30546cc469146184601e01d469446a1eb0a0110290fd309eb0a020beb02034bf802104ff0ff31c3f804c0996000219446d960c5f800a0039b0a9addf818a0dde904e1089f00280cbfc4f820c3c0f804c002984ff6ff7668600020c0f20206c5f80880e8604aea0121ddf81c904eea072a814202f10a087ff4c0ae05f1100778180999524641449b46f7f772f8e9685b466868aa68d4f870b15144e96081424ff0000018bf07464bf82270a6e600204ff400684ff4006703e02f44b7f5403f23d20beb07018a685bf807500132f4d04868ca68033020f0030000f110060beb08001032f7f791f84168c2684bf808608368d4f870b18a424ff00001b04408bf00f110014bf82310d7e7c8f5403200210f2ac4f820130dd90beb08034ff0ff304bf8082059609860d960c4f820831bb0bde8f08f00281ebf0168114401604ff0ff301bb0bde8f08f00bf02293cbf4ff0ff3070472de9f04f8bb00278437842ea0325b5f5007f00f2f08005eb4502022303eb4202914240f0e8800590fcf7bbfe002800f0e2804ef66c694ff29c56ccf2ff09c2f229064ff6ff77002447f67f784ff07f0b06e048f2a351c0f24501bff32f8f8847d6f800a0bff35f8f3068bff35f8f01466ff39601b1f1005f07d10168494504d14168b1f57d7f00f096804ff47d70fdf7e0fd002800f0af804ff60c41cff6ff7100bf42182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d7141600121c0f800908173a0f8c48180f8c3b1078447848784c784078547858785c785078647868786c786078747878787c78756e8001f51457ff459afbff35f8f00bf46e8000121b156e8001f5145f8d04de7d0f870c10495bcf1000f20d000234ff4006104e03f683944b1f5403f0bd20ceb0107be680136f5d07e68033626f0030633441033eee775b9b3f53e3f40f2e0804ff0ff310bb0bde8f04f08467047002d00f0d680002305994ff0000901f1020a153103914ff0ff31059109eb49060aeb46056c784ff0ff31012ce3d8af78ea7857ea022e1ebf2a796d7952ea0528d9d0bef5207fd6d8b8f5f07fd3d80ef10102520802fb08fb4ff6fb724ff6ff779345c0f20207c6d81af81610059e41ea0421039cb9f1000f28d014f8132c14f8125c42ea05228a42b3d0feb114f80d2c14f80c5c42ea05228a42aad0012e15d014f8072c14f8065c42ea05228a42a0d0022e0bd014f8012c257842ea05228a4297d0043e721c04f11804d6d15646bcf1000f2fd00bf105054ff400640ceb040adaf808208a4230d0daf800201444bc4220d80ceb040adaf808208a4225d0daf800201444bc4215d80ceb040adaf808208a421ad0daf800201444bc420ad80ceb040adaf808208a420fd0daf800201444bc42d3d94ff6fc720bf10801c0f201021140194401f1100320e0daf80410a9427ff44fafdaf80c10a9427ff44aaf9af8101004297ff445af9af811109af8122041ea022171457ff43caf9af813109af8142041ea022141457ff433af049909f1010989450599b24601f1010105917ff43dafb3f53e3f3ff624af00240025019019e000211fe7d0f870c14a688b684ff6ff7793454ff00002c0f20207c1f80cb008bf01f110024cf82320013575454ff000013ff408af05eb45000aeb40011af8100091f8018091f802e091f803b091f804904979bcf1000f40ea082605912cd0b8f1010f29d84ff400610ceb01039a68b24200f0a8801a681144b9421dd80ceb01039a68b24200f09e801a681144b94213d80ceb01039a68b24200f094801a681144b94209d80ceb01039a68b24200f08a801a681144b942d7d94eea0b21059b013149ea0322490801fb02f75a4607f1050b8df81d004fea1b208df820004fea1b408df8210005208df82500042001218df8270048468df81b1003908df82a000df11b0011218df81c408df81e808df81fb08df822408df824408df823408df82640cdf808e08df828e091468df829208df82b30fff797f800287ff482ae01980021d0f870c1bcf1000f3fd0ddf810e0b8f1010f3cd84ff400630ceb03018a68b24235d009680b444ff6ff71c0f202018b4226d80ceb03018a68b24228d009680b444ff6ff71c0f202018b4219d80ceb03018a68b2421bd009680b444ff6ff71c0f202018b420cd80ceb03018a68b2420ed009680b444ff6ff71c0f202018b42cbd9002104e0ddf810e02ee7ddf810e0002f3ff41aaf4fea0922029f059b42f001023a44039f1b0252083b4353435a1e032a01d200220ae023f0030700228e18043297427475b475f4753476f7d113f003033ff4f8ae01f11507012bbc543ff4f2ae3a44022b547018bf9470ebe62de9f04f81b04ef66c644ff29c55ccf2ff04c2f229054ff6ff7600274ff0010a47f67f7b4ff07f0807e000bf48f2a351c0f24501bff32f8f8847d5f80090bff35f8f2868bff35f8f01466ff39601b1f1005f07d10168a14204d14168b1f57d7f00f094804ff47d70fdf702fb002800f005814ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ff47d710460416080f80ea0a0f8c4b180f8c381068446848684c684068546858685c685068646868686c686068746878687c68755e8001f49457ff45aafbff35f8f45e8000121b155e8001f4945f8d04fe7d0f88813002974d104464ff41630fdf769fa014600284ff0000069d0002200bf8b1888544032b2f5163f58709870d870187158719871d871187258729872d872187358739873d873187458749874d874187558759875d875187658769876d876187758779877d87783f8200083f8210083f8220083f8230083f8240083f8250083f8260083f8270083f8280083f8290083f82a0083f82b0083f82c0083f82d0083f82e0083f82f0083f8300083f8310083f8320083f8330083f8340083f8350083f8360083f8370083f8380083f8390083f83a0083f83b0083f83c0083f83d0083f83e0083f83f009ad1c4f8881300e00021084601b0bde8f08f00bf2de9f04f93b04ff6ff75a9424ff0000c2cd0dde91c874ff4805ecde90aecd0f89ce3cde90087229fdde920a9dde91e6b249c0697239f0aadcdf840c0cde911eccde90845cde9026bcde904a90546079704f0f0fd84464cb1bcf1000f06d19df8480095f8a013084385f8a003604613b0bde8f08f2de9f04f93b00446002047f64c65a4f8a003c2f207052868002a89461abfc4f894030146d4f89413401ac4f89c03fcf749fa002800f05a81d4f88803002800f0558104f01fff002800f050810646b4f88c03002853d0a0f10108d4f89c0300254ff4a0714ff4f0774ff4805acde911050df1280bcde901152046414632464ff42073cde90aa51095cdf824b0cde90755cde90555cde90355009704f091fd002840f02481d4f89c034146cde91105012008904ff4a0700190204632464ff420734ff4f077cde90aa51095cdf824b0cde90655cde90455cde90255009704f070fd002840f003819df8480094f8a01347f64c65084384f8a003c2f2070506e0d4f8881330464ff41632f6f71afb4ef66c684ff29c57ccf2ff08c2f229074ff6ff764ff0000a07e000bf48f2a351c0f24501bff32f8f8847d7f800b0bff35f8f3868bff35f8f01466ff39601b1f1005f07d10168414504d14168b1f57d7f00f098804ff47d70fdf706f9002800f0c4804ff60c41cff6ff7100bf42182e3182f8f4a382f8f5a382f8f6a382f8f7a382f8f8a382f8f9a382f8faa382f8fba382f8fca382f8fda382f8fea382f8ffa382f800a482f801a482f802a482f803a482f804a482f805a482f806a482f807a482f808a482f809a482f80aa482f80ba482f80ca482f80da482f80ea482f80fa482f810a482f811a482f812a482f813a482f814a482f815a482f816a482f817a482f818a482f819a482f81aa482f81ba482f81ca482f81da482f81ea482f81fa482f820a482f821a4a0d14ff47d7141600121817347f67f71a0f8c4117f21c0f8008080f8c311068446848684c684068546858685c685068646868686c686068746878687c68757e8001f59457ff456afbff35f8f47e8000121b157e8001f5945f8d04be7064604f0f7fd002e18bf002803d1012089f8050022e0c6f864014ff0010a4ff4f07086f868a101904ff420704af61f4c0090c0f2470c00200021002200230027e04730b186f86871c6f8647189f805a004e099f8050089f804a030b14ff0ff3013b0bde8f08f0026cbe794f8a00384f8a10338b3d4f8900342f66536c0f2440620b129682d31c4f8981310e044f64d60c0f200007844002122460023b047c4f89003296801f12d01c4f8981320b106f1e8022d21904728b1002084f8a10313b0bde8f08f002013b0bde8f08f80b582b04ff4f0704af61f4e01904ff4207cc0f2470e0020002100220023cdf800c0f04702b080bd022a3cbf4ff0ff3070472de9f04fadf2245d1e9008784f788c1850ea072001f102071f9002f07b82209300231d94a74202f06f82781ca04202f06b8238787978ba1c40ea0121a01a814228922b9102f260822098ddf870253290ddf84805ddf868153390ddf84c053b913490ddf8500522933590ddf854053690ddf858053790ddf85c053890ddf860053990ddf864053a901068411e0028116002f03a822b98002802f036822b98841c032c02f03182fe78072e02f22d82289890f800e0f00702d107f1040829e02b9820f00100022802f01f8297f804907d791e9849ea052a514632aaf04602f023fa002842f01182ddf85405c64607f10608012d36900dd8ddf87005806948b14feada0209f00701835c012505fa01f119438154b00707eb040bcdf88cb005d44ff00009042e29d2a1e000bff246d84504d018f9014b4ff0000903e000244ff00109d84645f64d55c0f24605a847012808bf0134601e81b2670800ebd130002c48bf4710a8470128369808bf7f42ddf88cb03844d6463690042e78d3b9f1000f42d1d84540d0424612f8011b36985a453dd098f8012008f10203120642ea01415b4500eb214c3ed008f1030298f802105a4534d098f8032008f10403120642ea01415b454fea214129d008f1050398f804205b4500f0898698f8057008f106035b4542ea072200f0808608f1070798f806305f4501f0b48298f8077008f108083f024ff0000915e03698002100e0d84600eb010c4ff001090022002108e04ff00109002203e04ff0010900220021d846002300273b43379f62440b447fb1dde93876dde93a40bc45d8bfbc46b142d8bf3146a242a8bf22468342a8bf0346ddf88cb00120cde938c1cde93a233790b9f1000f42f04a81bef1040f40f38380bef1060f40f3f280bef1070f00f0e682bef1080f00f06b81bef1090f42f03681d84502f0338118f801cbd84542f02e81bcf10f0f02f22a81ddf86c05002801f04f8337993298dde9342a002900f006863399dde939733b9e994227eae775b8bf0b46b242b8bf1646b542319681f2388338994fea630b21eae1794fea0c112f91319909f10104491b4fea590e4cea0c1211f003084fea540130942e9100f0d786994581f23e8205fb0a045feac97171464e4609d014f80e10309e01f0f00141ea0c0104f80e102e99594521442d9681f21a8204eb0b060c4604f8012bb44281f014828f1cb7424a7081f01082cf1cb7428a7081f00b820f1dca70b7423946ead301f004ba00bfbef1020f36dcbef1010f00f09f81bef1020f42f0b8803298dde933a530903798dde935412a90ddf87005dde93a32c0694ff000093e90d84524a8dde93867cde9428bcdf81091cdf8fc9029922793c2c000f0a48208f10100429098f80090584500f09c8208f10200429098f801004fea002897e2bef1030f00f0ca81bef1040f42f08180ddf87005dde932cec069dde93473dde93691dde93826dde93a5a002440943c90d8453d943eac2ca8cde93e8bcde92f7ecde9292680e80a1000f0e98208f101003e9098f800405845319400f0e38408f102003e9098f801003eac4fea002b00f0debcbef1050f00f02782bef1060f42f04880d84502f0458008f10100584502f0408008f10200584502f03b8008f10300584502f0368008f10400584502f0318008f10500584502f02c8008f10600584502f0278008f10700584502f0228008f1080cabeb0c001028c2f01b8008f11800584542f0168098f8040098f8051050ea01261ebf98f8060098f8071050ea012502f0078098f8000098f80120339940ea0224081bc1f0fd87864201f2fa8798f8020098f80330349a40ea0327d01bc1f0f087854201f2ed87ddf86c05002801f0128235980df1d80e329b30909ee8014fcdf8c4e0cde906478de8010f1846dde93037cdf828c0cde90865059704f00ef801f0f9b93298cde94a8b2e9033980021309034980df59479319035980df584782f903698dde937a62d90ddf87005dde93954c0693b9f4c91cde942014846414602f076fa83464846414602f071fa4c99002940f04084dde94a21a846319d8a4200f03984531c8b4200f03584931c8b4200f03184d31c8b4200f02d84131d8b4200f02984531d8b4200f02584931d8b4200f02184d31d8b4200f01d8402f108038b4240f0188411785378d646b446ba4651ea03264ff0ff3700f00f849378d17853ea01212c9100f00884b6f5207f00f204842c99b1f5f07f00f2ff83917925960f29279100f2f983d379102b299300f2f4832a901079ddf8706524904399306a53790843ddf86c153062002901f08a842d982599084440428345c1f283842d9830990027081a834580f2d7832c982a9a40428242c0f2d1832a9aaa4280f2cd83bef1000f01f087842ceaec70269028eae87018903098a042a8bf204630905545a8bf554601f07abcd84501f01a87424612f8010b012801f21487329900282a9133992f913499319135992c91dde936c1309138992991399927913a9926913b99249100f01f825a4501f0fb8608f102025a4501f0f68608f103025a4501f0f18608f104025a4501f0ec8608f105025a4501f0e78608f106025a4501f0e28608f107025a4501f0dd8608f108025a4501f0d88698f8012098f8023098f8046042ea032398f8032098f8054098f8061042ea0622259244ea012a98f8071098f8082008f10904159441ea0221fee1abeb0806052ec1f0b68608f1050ada4501f0b18608f1060998f80540abeb0900a042c1f0a88609eb0400584541f0a38632981c90339831903498269035981b90dde93650309038982d9039982e90dde93ab02f90c4b1002703e000bf0137a74212d219f8070001381e28f7d909eb0700e11b4aaa42ab02f083fd002801f07b864a980744a742ecd3ddf86c05002801f09c8030982c954546002800f062832d9820eae0702d902e9820eae070219031985845a8bf5846319026982f998842a8bf0846269050e3d84501f0558608f10100584501f0508608f10200584541f04b8698f8001098f80100dde9375441ea0021ddf870050df1c80c0990ddf86c059ce80c10089004a8dde93576dde939aeddf8ec9080e810441e98cde900c7cde90265cdf81c9003f0bcff0746c0e2ddf87005dde93432c069dde93691dde93876dde93a4a5d46cde9428b4ff0000b3e90a8452ea8dde932cecdf810b1cdf8fcb03193cde92964279780e80450cde92c9172d008f10100429098f800b0a8426bd008f10200429098f80100070267e0012044904ff0000842ae3eaf3046394602f0b2f831903046394602f0adf84499074600292f9469d0d3462c46002600202d9001202e963e464490002042af0df1f80a2c903846514602f096f805463846514602f091f84499002940f060828446dde942014ff0ff37884240f05a82319b002b00f15682002e00f15382ddf870253f98116a239508431062309848ea09054a904ff6fe7085422f98da46cde94bb44d9000f0a2834ff6ff70854240f081831e98d0f888934ff420704b904ff4f0704c904ff4a0704d9091e301204490002742ad3eac2846214602f04ef881462846214602f049f8449959b34ff0ff361d9c229b374617e20020319000e2dde94201884291d0024612f8016b8a42429200f02683821c429243788a4246ea032600f01e83c21c429283788a422d9300f09686011d4291c0782e963e46d3462c4600027ce78046dde942108142ced00a4612f801cb8242c9d08c1c4d78011ba9424ff0ff36c4d361198142c1d1ddf870253f98116a08431e9910620029b8d0d1f870110029b4d047ea0b070020b0eb572faed151f827000028aad0401a8207a7d16ff4403240f60f030244cff6fd739a429ed30a1852f8081cb94299d152f80c3ca3f1011111f5803f92d3002acde92557cde923c43ff48caf52f8041c99427ff487af1446c0f54030269a83423ff680afddf870051d46806940b1d2080bf00701835c012707fa01f119438154c12dfff46faf207801287ff46baf2598002801f08980dde9247ba4f13f0601f01bb85a4501f0dc8408f102025a4501f0d78408f103025a4501f0d28408f104025a4501f0cd8498f8012098f802609300710098f8032098f80460259108f105014fea820a15917100baf1000f169101f0b7841699002901f0b3842f99ca1ac1f0af84924501f2ac843199259a8a1ac1f0a7841699914201f2a384309903eb0c06084301d000230ce05feacc704ff0000307d1002e05d42f990aeb06008842d8bf0123159d169aabeb05001390ddf86c0502fb0af8b0fa80f04009184300244feac0794ff0000e1493cde9179822e02c992a9b07fb013b53081bf803702e9907f00f0c07f0f0070f44d2072d9908bf4cea01070bf80370ddf88cb021998e44dde91b128a424ff0000188bf01210c43e10708bf1544e10704d0f04507d801f050bc00bf5d4518bff04540f20782bbeb050701f0468429780b0901d0012211e0012f01f03e846b780bb102220ae0042fc1f03784aa78eb7852ea032301f03184042200bf1c92a8eb0e02934201f229842598b9f1000f21931b97bfd101f00f022e92219a0901012acde919542d912fd14ff0000c2199ddf88cb0dde91954dde91798c907aad00ceb0e01b1fbfaf202fb1a1117188a1957ea02019fd42f998a429cd231998f4299d2309900293ff480af29998a4292db27998f42fff68faf26998a42bff68baf24998f42fff671af85e72f9d22f0010b4ff0000c16e02c992a9b2e9f04fb01315308cc5cd20704f00f0504f0f0043c442d9a08bf45ea02042f9dcc540cf1020ce345b4d00eeb0c02b2fbfaf404fb1a2704eb000907eb060859ea080428d4a84526d23199894523d2309959b1299988451edb279989451bdb2699884518da2499894515da2c992a9b4fea580709fb01342e9de15d2d9801f00f0301f0f00129445feac8752f9d08bf43ea00012598e155511cb1fbfaf202fb1a1114188a1954ea0201bbd4aa42b9d231998c42b6d230990029a0d029998a42b0db27998c42addb26998a42aada24998c4294dba6e73eac012040904ff0000b3caf2046394601f034fe80462046394601f02ffe409941b14ff0ff371d9c229b002f00f08b8501f05dbbdde93e129142f2d011f8016b9142eed1ddf870353d991a6a11431e9a1962002ae5d0d2f870114ff0ff370029e1d0319a1d9c4bea020b0022229bb2eb5b2fdad151f82b20002ad6d0a2eb010e5fea8e72d1d16ff44032bc4640f60f077244cff6fd77ba426746c6d301eb0e0c5cf8081c594507d15cf80c1ca1f1011212f5803f80f0db844ff0ff37b5e70ceb0c110afb02f2f5f73bfb00f03abd00234ff00109d846fff79eb9002021902d90052e01f004831c98002801f00083fbf715f9002801f0fb829af8008008f10600864241f0f48247f65420c2f207000768002f01f0ec82387b797bba7bfb7b40ea012040ea024040ea0363a3f1810010f1800fc1f0dc82387c797cfa7c40ea0120b97c40ea014040ea02601090813810f5817f41f2cc82b8f1000f4ff000002e9317972f9079d0ddf884a04ff0000e00270ae000bf00f100404aa941f826000137474506f1010e17d219f807007646411e1e29efd909eb0700a8eb070142aa3eab02f0aaf900283ff43caf42993e984aaa0f4442f82600e3e7bef1000f00f0dd80aef101094ff000080df5947a09e0be46c14508f10108a6f101060af1040a00f0c8804aa850f828100029f1d40020434686421dd00aeb80077a68b2f1ff3f18dc5a1c914514d0ba68b2f1ff3f11dc9a1c91450dd0fa68b2f1ff3f0adcda1c914506d03a690433002a00f10400e0d400e00022179842ab3eac7746009402f0e8f900283ff4eeae3e980028c0d04af20d3142a8c0f24e018847b9e701204ff0000e88e0d3462c4664e45d4508bff04541f03e82ddf86c05002818bf012014990840012840f05e842c9b2a9825994fea5a0701fb0300139900eb5602169800970190159801f0f5fa002840f04b8401f01fba2f4600f041bc1e9829464aaa674601f025fa00287ff4adaeddf87005319b8069bc4660b10021b1eb552f08d1ea0809f00701875c012505fa01f139438154ddf828912e9a239db9f1000f3ff492ae002a4ff0ff371cbfdde92c1051ea00083ff48aae4b999942fff486aec91a8a423ff682ae4c99b142fff47eae891b88453ff67aaeddf86c15002700293ff474aea5f1011111f1021f7ff66eae2a99002900f02685259921eae17b269921eae17527998a45a8bf8a4629998c42a8bf0c4600f019bd0020ddf884a002e04ff0000e01202a7995f800c095f80180ab78ef7895060f2102f00f0601eae575754389214d43ed0a8df8f8500e25309212f0200f08bf012506fb05f501fb05f54fead5258df8f9504ff00d0508bf022506fb05f501fb05f54fead5258df8fa504ff00c0508bf032506fb05f501fb05f54fead5258df8fb504ff00b0508bf042506fb05f501fb05f54fead5258df8fc504ff00a0508bf052506fb05f501fb05f54fead5258df8fd504ff0090508bf062506fb05f501fb05f54fead5258df8fe504ff0080508bf072506fb05f501fb05f54fead5258df8ff504ff0070508bf082506fb05f501fb05f54fead5258df800514ff0060508bf092506fb05f501fb05f54fead5258df801514ff0050508bf0a2506fb05f501fb05f54fead5258df802514ff0040508bf0b2506fb05f501fb05f54fead5258df803514ff0030508bf0c2506fb05f501fb05f54fead5258df804514ff0020508bf0d2506fb05f501fb05f54fead5258df805514ff0010508bf0e2506fb05f501fb05f54fead5258df806514ff0000508bf0f256e434e43f60a00288df8076140f022824fea086242ea0c412c9a380602eb21492e9940ea0340ddf85c80aef1010501eb204000260f90cdf84ce0119507e001f01f000b3801367645814400f0f8814aa850f82610b1f1ff3ff1dd33469d421cd04aa800eb83004268b2f1ff3f16dc0133ab4212d08268b2f1ff3f0fdc0133ab420bd0c268b2f1ff3f08dc0133ab4204d002690133002ae1d400e00022404642ab3caf009702f033f8002800f0d0813c990029199100f0ba819df810019df81111149650ea0125cdf8589000f09f819df814719df815613f0447ea0667109e9df80f019df80e112e444fea002c41ea00229df8120106eb27470f9e9df813310004f71b169e40ea03604ff0010e06eb204924920eeb5202031418920ceb010201f0030009f10101159109f10201129119992997571e1a97f718f31a01312590101a2a910eeb52012d9a2f90d8074ff0000b2e90f80727912c90239509e000bf2a9827990bf1010bab4508442a9000f04e8129980beb00035345f1db26988342eeda24980028ebd0dde91b104ff0000803fb01071a98032880f09c802598ddf884a0239d0028dbd0dde9181001230bfb010c30984fea58011cf8011000f0100083ea1014c8b201f00f035feac87e08bf03091846002b18bf01202043012815d108eb0906964211db319886420eda7008395c3eadeb5c01f00f0501f0f0011943f60708bf45ea0311239d395425980128a6d008f1010040081cf80000bef1000fc1b24fea111a08bf00f00f0a5ffa8af0002818bf01202043012817d1159808eb0003934212db319883420fda5808395c3eae16f80a6001f00f0501f0f0013143db0708bf45ea0611239d39542598ddf884a002283ff474af08f1020040081cf80000bef1000f00f00f03c1b208bf0b091846002b18bf0120204301287ff460af129808eb00069642fff65aaf31988642bff656af7008395c3eadeb5c01f00f0501f0f0011943f60708bf45ea0311239d395445e7ddf8a8c008e000bf2f9808f1040840450cf1020c3ff458af30981cf8016c00f010030120f6b2002580ea13130f2e88bf01251d43012d09eb080a15d1924513db3198824510da4fea5a053609795d3ea8865d01f00f0401f0f00131435feac97008bf44ea061179551cf8010c10f00f0e704618bf01201843012818d10af10106964214db3198864211da7008395c3eaa12f80e6001f00f052e9c2d9a45ea061501f0f001002c08bf41ea06053d549cf80000c6b200200f2e88bf01201843012816d10af10205954212db319885420fda690830097e5c3ead285c06f00f0506f0f0062c9c0643002c08bf45ea00167e549cf8000010f00f06304618bf0120184301287ff481af0af103039342fff67caf31988342bff678af5808395c3eab9b5d01f00f062e9d46ea031601f0f001002d08bf41ea03063e5466e74af20d3142a8c0f24e0188479df80c019df80d11dde91698119ddde913e605e09df80c019df80d11ddf84ce040ea012002e6002007e000274ff00109d846fef764bd4ff0ff302f901d9c229b2f9ffff765bbd3462c46fff7e7b80f4600e04f1cd90708d02d99994205da39782f9c01f00f0121433970b8f1010f05f1010700f0d480994537da07fb0a045feac97171464e4609d014f80e10309e01f0f00141ea0c0104f80e102e99594521442d9614da04eb0b060c4604f8012bb4420fd28f1cb7424a700cd2cf1cb7428a7008d20f1dca70b7423946edd302e00f4600e04f1cd90708d02d99994205da39782f9c01f00f0121433970b8f1020f05f1020700f09480994580f2908007fb0a045feac9717146c8460ad014f80e10ddf8c08001f0f00141ea0c0104f80e102e995945214414da04eb0b060c4604f8012bb44268d28f1cb7424a7065d2cf1cb7428a7061d20f1dca70b7423946edd35be00f4659e0bcf1000f4ff0ff373ff4d8aa5cf8042c8a427ff4d3aacef5403291423ff6ceaacde92660ddf87005806950b1319a4feadb0302f00702c65c012404fa02f23243c2546046002242ab00f077fe00284ff0000708bf4ff0ff373ff4aeaaddf86c0500283ff4a9aaa8f1011010f1021f4ff000077ff6a1aa2798a0f1011010f1021f7ff69aaa2c98002300284a9300f03c83299820eae0722a9820eae0733098a842a8bf284630902f985045a8bf50462f902be34f1cd90707d0984505da39782f9c01f00f0121433970ef1c3199691a11f1040f10d91d9c229b1f980133834228982b9900eb01077ef459ab00f0cfbd319904378f42eed0994539da07fb0a045feac97171464d4609d014f80e10309d01f0f00141ea0c0104f80e102e995945214418da04eb0b060c4604f8012bb44280f0cd8001f10208b0454a700cd201f10308b0458a7007d201f10408ca70b0454146e9d300e08846d90709d09d4207da98f800102f9c01f00f01214388f80010994536da791c01fb0a015feac97474464d4609d011f80e40309d04f0f00444ea0c0401f80e402e9c5c4501eb040615da01eb0b04314601f8012ba14280f09580b11ca14272700ad2f11ca142b27006d2311df270a1420e46ecd300e03146dc0707d09d4205da0c782f9d04f00f042c430c70994536dab91c01fb0a015feac97474464d4609d011f80e40309d04f0f00444ea0c0401f80e402e9c5c4501eb040615da01eb0b0400bf314601f8012ba14260d2b11ca14272700ad2f11ca142b27006d2311df270a1420e46edd300e03146dc0707d09d4205da0c782f9d04f00f042c430c709945bff64baff91c01fb0a015feac97474464d4609d011f80e40309d04f0f00444ea0c0401f80e402e9c5c4501eb040615da01eb0b0400bf314601f8012ba1422ad2b11ca14272700ad2f11ca142b27006d2311df270a1420e46edd300e03146dc073ff41baf9d42bff618af0c782f9d04f00f042c430c7010e701f10108d9077ff442af4ae7711cdc077ff478af7ee7711cdc07acd1b3e7711cdc07e3d1fde6bbf1010b67d017f8010b411e1f29f7d341b22029fef63baf06eb400116f81000497840ea0122c12afef431af204629464aab00f009fd0028e2d1fef728bf00254ff0000bd345b8bfa542bff63ca9dde9230100eb010ed645bff635a9a445bff632a9abeb02018e457ff72da9a5eb08018c457ff728a9bbeb0e075846b8bf7046f3454ff0000ed8bf774607eb030bd31bb5eb0c07d8bf7746ac450246aaeb0000a8eb0701c8bf6546834238bf1846631b9942299328bf1946309b1195994507eb060326931b913fd1269b9d422fdd119d4ff0010e37e0ddf86c05002800f03a84a9f1011010f1021f4ff000067ef6d1aea8f1011010f1021f7ef6cbae2d98002300284a9300f029842798309920eae072299820eae0732a988142a8bf0146319830915045a8bf5046319000f017bc119d269b0027eb1ab3fa83f35b095a45c8bf012703ea070e1b99002900f06181114602f0010a83185a464fea5b064ff0040b2bea820717971718013f03f0010418967e0816962bea87060aeb040715962e94c61bdde92c740aeb0100274402eb0a044a40490814915908cdf8c4a0139107eb0c01ddf8a4a0491b4fea560b514538bf8a460121cdf8a4a0bbf1010f88bf710801f0030321f003010e9161082491410823913099129301eb5000411c03381090d00721904d9809eb54032d904ff0ff3000eb560027906ff0010000eb56002590981e0f906ff00200199600eb56002f9eddf86cc04ff000080c910d931c90cdf868e008e0299808f101082f9e80454ff000073ff448a86fea08014046bef1000f18bf0ceb01002699319b42182d9902fb01910bb9002305e0189b179ccb5ce34003f00f032c932e9b0bb9002304e0169b159ccb5ce3401b012a9343193098219c03fb060a2398002c249c504421441cd15a46f4f71dfbdde91aec319840b114992c9a1af8010000f0f00010440af801002e980028b6d013992a9a1af8010000f00f0010430af80100ace703fb06f42d9bbef1000f03fb02f23ed019980228dcd30f98109910442144002200eb0b039c785f78279ec4f3031444ea071701eb0b049642a770c9d05f7810f80b60c7f3031747ea0617259e67709642bed010f80b7013f8016cc7f3031747ea06171c9e01f80b709642b1d013f8017c13f8023cc7f30317043247ea031304389345a1f1040104f8013cc9d1a0e7199b022b9dd3199b082b01d200222be00d9bddf838e003eb020c0c9a144400220ceb02077e781cf80250c6f3031646ea0516a51805f8016cbe787b78c6f3031646ea0313a354fb78be78c3f3031343ea06136b703b79ff780432c3f3031343ea07139645ab70dbd1129b119ddde91aec002b3ff466af531ccf5c8e5c129cc7f3031747ea0617012c87543ff45aaf941c0f5dce5cc7f3031747ea0617129ec754022e3ff44eaf0a44d278095dc2f3031242ea0111015544e70027fef758bf00224aa80690269808eb090105902798cde902b104902f98309f0190dde92d10009701f0dcfa0746fef742bf0020189026902498259940ea0320b0eb510f28bf48082c990023b0eb510f28bf48081b90013838bf184611902a98189a161ad8bf1e462b1a8b42a8bf0b469e422393bef61faf2d99ddf86cc00beb01024fea4c011c910cfb0cf1259b89001a91991824910021032b319138bf01212c9f0023032f38bf012319431991791e1691b91e1491119921924b00494389000e91511c1291299913930b0141ea011110930f916ff00801189b01eb4c0115919842c8bf0346dde92e214ff0000b01fb03212d9112e0012002902798009501900846269902f084fc2a982d99013639442d91239900278e42bef6cdae2c9af14311448e42b8bf31461c9a6fea41011144012938db1a984ff0ff3201fb11001b99a1eb0b01012902eb410137db01fb01f2824233dd1599a1eb4b0202f10803032b02f1060122db01fb01f787421edd052b02f104011ddb01fb01f7874219dd072b02f1020118db01fb01f7874214dd0bf1040b092ba2f1080103db524382420a46dbdc08310ae04ff0000b35e00bf1010b04e00bf1020b01e00bf1030bbbf1010f29db08318a1f5243824224dcbbf1020f16db0a1f5243824215dcbbf1020f0fd08a1e5243824211dcbbf1040f08db01fb01f282420ddcbbf1040b01f10801e1d14ff0000b07e0abf1010b04e0abf1020b01e0abf1030b2a98dde92e17304400fb07112998219b10282498309a5b44a0eb0b053ff460af2591b6fa86f01999400908434cd11698864249d01499701e891b179518968842b8bf01466fea4100139908440128c0f2a6800e99319a00fb101011998a1a4ff0ff31012a01eb420174db01fb01f7874270dd5100a1f1090202f10807032f02f106015edb01fb01f686425add052f02f1040159db01fb01f6864255dd072f02f1020154db01fb01f6864250dd3199092f01f104013191a2f1080103db524382420a46d9dc083145e02698b4468342d8bf03469542a8bf1546ab4280f2b080ae46d80708d0259d5808295c299a01f0f0011143013329544fea5308b8eb6e0f1cda25982d9e0f9900eb6e0206eb08052f4607f8011b974280f08280a81c9042397080f08280ef1c974201707cd2043606eb080090423970e8d376e0259800eb530072e0319a013204e0319a023201e0319a03323192319a012a23db08318a1f524382421edc319a022a19db0a1f5243824200f3d480319a022a11d08a1e5243824200f3cf80319a042a09db01fb01f2824200f3ca80319a0831043a3192ded1002031903198129901eb000c26988342d8bf0346309eb445b646b8bfe64673454fdad90708d025985908425c299f02f0f0023a43013342544fea5308b8eb6e0f1ada25982d9e00eb6e070f9806eb0802154605f8010bbd4214d2911cb942287023d2d51cbd4208701ed2043606eb0801b9422870ead318e0259800eb530114e0681c02e0511c10e038465feace7107d0734505da0178109a01f00f01114301702a982f9f664656e62946309e5feace7207d0734505da0878109a00f00f001043087031982499c04301eb000801200290279832460190dde9250563462946cdf8008002f0bbfaa845d8bfa8461798b042a8bf304680453eda84465feac8700ad0259b4fea5800195c299a01f0f001114308f1010819544fea5801b1eb6c0f18da25982d9b0f9f00eb6c025d182e4606f8017b964211d2a81c9042377010d2ee1c964207700bd20433581890423770ecd306e0259800eb580002e0681c00e030465feacc7107d0e04505da0178109a01f00f01114301702a982f9f189eebe5319801383ee7319802383be73198033838e70026fef79cba00222c984aa908912599484407912499cde903082698069123990290319805910190dde92e10309f009701f0c2fd0646fef782ba4ff0ff300df2245dbde8f08f381b18bf4ff0ff300df2245dbde8f08f00bfb0b586b008b3d0f87001f0b10023b3eb512f1ad150f82130bbb11b1a9d0714d16ff4403540f60f041d44cff6fd74a5420bd3184450f8085c8d4206d150f80c1ca1f1011515f5803f03d24ff0ff3006b0b0bd50f8045c8d42f7d1c3f540339942f3d80028f1d0037813f00b0fedd1144601ab0022002500f011f80028e5d00198dde903122060481c40086160a260e06028462561656106b0b0bd00bf91429cbf002070472de9f041855c4ff0050c6e0758bf4ff0030c15f0f30f02d1891a614502d20020bde8f0818418627894f802e0002e05d5e078267942ea0e2240ea062e002a4ff0000018bfbef1000fead0b2f5207fe7d8bef5f07f88bfbde8f081082d38bf0120072d18610ad8501c400800fb0ef0a1eb0c018842d3d804eb0c0828e004eb0c080efb02f5002000bf00eb0c04a142c6d008eb00073e78360903d00127b54213d2bde70c1b012cbad07e781eb10227b5420ad2b4e7042cb2d3bc78fe7854ea0626add00427b542aad3ad1b3844dcd158600120c3f800809a60c3f80ce0bde8f0812de9f04f89b0dde91257069005fb07f000294fea4007029100f0d48100200390089002984ff0010e00264ff0000b4ff000084ff0000c4ff000090497079205930be000bf4ff0000c4ff00308cdf80ca009f10109814500f0ba81bcf1000f40f0b4810699b8f1020f11f809a0ead0b8f1010f15d0ddf81cc0b8f1000f40f086805fea1a100af00f01089100f092800499814280f09a804ff0010c4ff0000882e1079abaf1000f00f07f800499514576d3a1eb0a010491089901eb01100901019114e000bfa15d089f01f0f0013943a1550136aaf1010a4ff0010eae4224bf00260bf1010bbaf1000f00f0598113998b45d1d20bfb0324bef1000fe3d0a91bb1eb5a0f88bf4fea5a0141b38d0804eb060817d0002208f10107a2eb850c6ff003057b1904350ceb05020432d870187158719871f5d1059b079a2f1d11f0030504d10ce0002711f0030508d0012d08f8070004d04744022d787018bfb870aaeb410abaf1000f0e440dd0129dae42b5d2a15d019f01f00f013943aaf1010a4ff0000ea155afe7129d4ff0000aa6e7039a52ea0a2213d004990392914280f08f804ff0010c4ff0000853e74ff0000c4ff002084ee74ff0000c4ff00108f4e000214ff0010c4ff00008039142e7089a091a049102eb02111201cdf80090019214e000bf1af80670089a07f0f00717440af80670013601384ff0010eae4224bf00260bf1010b002800f0d680139a934580f0cd800bfb03cabef1000fe2d0ad1bb5eb500ff14688bf45087db3ac080aeb06081ed0002308f10107a3eb840c6ff0030400bf07eb040e04340ceb040304338ef803108ef804108ef805108ef80610f0d1059bddf81cc0271d15f0030404d10ce0002715f0030408d0012c08f8071004d04744022c797018bfb970a0eb45002e4488b1129dae4210d21af80620019f02f00f023a430af8062001384ff0000e0028abd180e000bf129d0020ce469de7891a0491089901eb011009010191114613e000bf1af80620089c02f0f00222430af80620013601394ff0010eae4224bf00260bf1010b002953d0139a9345bff4ccae0bfb03cabef1000fe3d0ad1bb5eb510f88bf4d085db3ac080aeb060819d0002208f10107a2eb840c6ff0030400bf3a1904340ceb04030433d070107150719071f5d1059bddf81cc0271d15f0030404d10de0002715f0030409d0012c08f8070005d04744022c787018bfb87000bfa1eb45012e4489b1129dae42b6d21af80620019f02f00f023a4301394ff0000e0af806200029b0d103e000bf129d0021a4e74ff000084ff0000c029852e64ff0010c4ff0000803e04ff000084ff0000c0298ddf8009045e60120012107e04ff0010cb8fa88f0049f8cf001014009b7fa87f252091140084009b0bde8f08f00bf2de9f041826882b10121816007220020511e20fa01f1c90708bfbde8f0814ff0ff3191400843bde8f0818c46056841688d42e9d06b1c03602c78ff2c11d18b4200f0dc80ac1c046095f90120b2f1ff3fd6b200f3d080bf2e22d806f03f0602238fe062b2b2f1ff3f02dd07222046cfe7bf2c09d804f03f070e224ff0010e4ff000084ff0000c2ee0df2c0fd804f01f0715224ff0000c4ff001084ff0010e22e0df2e0fd806f01f0603236ae0ef2c0fd804f00f071c224ff0010c4ff000084ff0010e10e0ef2e58d806f00f06042358e0f02c40f093804ff0000820224ff0000c4ff0000e00278b424fea072603d0af1c07606d7803e00125856000251f46c02c45ea06046cd35b1a7d1ab3fa83f3b5fa85f55b096d092b434fea042403d001258560002503e07e1c06603d783746b8f1000f44ea050453d17d1ab5fa85f56d092b434fea042403d001258560002503e07e1c06603d783746bcf1000f44ea05043ed1791ab1fa81f1490919434fea042131d001238360002030e0f02e3ed1002605234ff0010e00250127ea074fea062617d18c4215d0621c0260247801379f4246ea040623d000bf8a424fea062609d0541c0460127801371643bb422246f3d116e02246013701254ff0000e9f4214468560dad112e07b1c0360387840ea0104bef1000f20467ff413afbde8f08114465feace7202d0091b8e4204d9012181600020bde8f081a11907462046002263463960bde8f041ffe78446081ab0f5806f01d90020704761454ff00000fad0002a18bf70472de9f04fabb09fed251a9fed250a9fed253a9e4600264ff0ff380df12c090df10c0ab7ee002ab0ee084ab6ee005ab1ee006ab9ee007a00206746019009e000bf49f826500af8064001368f42bc4600f0cb8217f8012b501e01280fd8012a23d18f4274d09cf901000cf10207b0f1ff3fc5b240f38f8000220724f5e1052a37d0042a30d0032a49d1002e00f0d982701e59f820501af8004093e200bf0000004f000000cf000000008f4254d00cf102079cf801008f4247d09cf802200cf103078f4240ea02203fd09cf803200cf104078f4240ea024037d09cf804200cf10507130600223ae0002e00f0aa82013eace7022ec0f0a582b21e59f82230701e59f8205049f820301af802301af800400af8003049f822500af8024096e702f0f80010281fd1002e00f08b82701e1af80030002b40f0858259f82050152a6fd16d420022002406463de20023012206e001220724002588e101220020002343ea000501242fe2a2f12000062827d8002e00f06782731e1af80300002800f0618259f82300242a40f0858080f00045012400221e4617e2bf2d5ad801220292002205f03f000e244ff0000b00928f4200f019819cf802300cf10308002215e1322a51d002f0fe0030284dd0402a40f0a380032ec0f03682701e1af80020002a00f03082b21e1af80230002b00f02a82033e1af80630002b00f0248209eb8202d2ed000a09eb860209eb8000d2ed001ad0ed002a70eee10a62eea00a71eea00acee1002800f00e82023e1af80600002840f0088259f82600122a58dc102a00f03081112a00f03381122a40f02c81454354e1df2d44d8002205f01f00152400924ff0010b0122bae0002e00f0eb81a2f13100013eb0fa80f01af806304009834240f0e08159f82600302a7bd100ee900af8eee00a94e1002b00f0d481023e1af80630002b00f0ce8159f82630212a40f3ed80222a00f02581232a00f02981252a40f03a8100ee903a01ee900af4ee610af1ee10fa48bff0ee601a11ee905a71e1ef2d72d805f00f001c24012274e0a2f11303022b80f0c480002d00f0a381b0f1004f08bf15f1010300f0eb80132a40f0f18090fbf5f5f1e0a2f1480010f1070f4ff00000c0f05f81002e00f05c81013e1af80600002800f0858109eb8600d0ed000af4ee420af1ee10faf5ee400ac8bff0ee420af1ee10fa48bff0ee430a432a72ee601a00f3b480412a00f0f380422a00f00f81432a40f0008161eea10a72ee600a1de1312a40f0948000ee900a20f00040b0f1ff4f4ff00002f4ee410aa8bf0122f1ee10fa4ff0000080f21c81f4ee400af1ee10fa00f11681002a40f01381fdeee00a10ee905a98e0f02d4ff0000040f00981002220244ff0000b009202928f427ff4e7ae00230122b8460002c02d43ea000535d3781aa8eb0103b0fa80f0b3fa83f340095b0918434fea05270ebf18f8013b00230122bbf1000f43ea07051fd1a8eb0103b3fa83f35b0918430ebf18f8013b002301222f02009d002d43ea07050ed1a8eb0103b3fa83f35b0918434fea05230ebf18f8010b0020012240ea0305474602984ff0ff3838b1601e25fa00f0c0071cbf08fa04f005430024a3e0162a10d1a842b8bf054637e0202a4cd0212a51d100ee903a01ee900a70eee10a8ee005442ae0a842c8bf054626e0451b24e0002800f1c680def800200546824238bf15469042019888bf0120019015e0442a48d0452a5fd0462a4ed161eea10a61e00025132a4ff0000208bf4ff00045002469e090fbf5f202fb15050022002462e000ee903a01ee900a61eea00a57e000ee900af5ee400af1ee10fa00f0928001ee903ac1eea00a4ae000ee903a01ee900a71eea00a43e000ee903a01ee900af4ee610af1ee10fac8bff0ee601a11ee905a37e060eea01a70eea00a74ee600a61eea00a2ce0f4ee450af1ee10fa18d570eea01a60eea10a22e0f4ee450af1ee10fa15d560ee861a60eea11a60eea10a16e060eea00a13e060eea01a60eea10a0ee071eea10a61eea00a72ee600a07e061ee870a61eea00a61eea00a70ee820a10ee905a012400224ff000005ab9202e09d0002c3ff436ad25f00040b0f1ff4ffff630ad00202bb0bde8f08f56b3701e1af8001059f82000d9b102ee100a20f00040b0f1ff4f4ff00001b4ee412aa8bf0121f1ee10fa4ff00000e4dab4ee402af1ee10fadfd40029ddd1bdeec20a10ee100a019adef804101143cef804102bb0bde8f08f00202bb0bde8f08f80b5002970d090f900c0bcf1200f5ffa8cfc07db012010604ff0010ec3f800c0704680bdacf1c20ebef11d0f0fd801295ad090f9011011f1410f55dc02211160407800f03f006cf38a108446e4e70cf0f00ebef1e00f23d1032945d390f901e01ef1410f40dc90f9021011f1410f3bdcbcf1e00f5ffa8ef101d1a02934d3bcf1ed0f01d19f292fd80321116042784fea0c3189b2807802f03f0241ea821136e004294ff0000ebbd3acf1f50111f1050fb6d390f901e01ef1410f15dc90f9021011f1410f10dc90f9031011f1410f0bdcbcf1f00f5ffa8ef101d1902904d3bcf1f40f03d18f2901d9002080bd042111604ff4e011427801ea8c4c817802f03f02c0784cea023201f03f0142ea811100f03f0001eb000c7fe72de9f04188b04af2bb261c46c0f24e0613460a46ddf83880002706f1ae05214627706770a770e77027716771a771e77127726772a772e77227736773a773e77327746774a774e77427756775a775e77527766776a776e77627776777a777e777a8470028c8f800705cd020786178a278e3780843104318434ff0010008d0e179a27911431ebf617a227a51ea020102d108b0bde8f081a07b14284ff00000f7d1217d8df8040041f0010121758df805008df806008df807008df808008df809008df80a008df80b008df80c008df80d008df80e008df80f008df810008df811008df812008df813008df814008df815008df816008df817008df818008df819008df81a008df81b008df81c008df81d008df81e008df81f0001a92046b047c8f8000018b1012008b0bde8f08106f1520120468847d8f80000002818bf012008b0bde8f081002804bf4ff0ff3070472de9f04f95b00df1200c8ce80f00f8f7d6fd002800f004824ef66c6a4ff29c5bccf2ff0ac2f2290b4ff6ff760024012547f67f797f2707e000bf48f2a351c0f24501bff32f8f8847dbf80080bff35f8fdbf80000bff35f8f01466ff39601b1f1005f07d10168514504d14168b1f57d7f00f093804ff47d70f9f7f9fc002800f0cf814ff60c41cff6ff7142182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d71c0f800a041608573a0f8c49180f8c371068446848684c684068546858685c685068646868686c686068746878687c6875be8001f41457ff45aafbff35f8f4be8000121b15be8001f4145f8d04fe7d0f87011209e4ff0ff3029b30022b2eb562f21d151f82600002800f03481431a98074ff0ff3017d16ff4403240f60f071a44cff6fd77ba420ed3ca1852f8080cb04240f0208152f80c1ca1f1011010f5803f04d24ff0ff3015b0bde8f08f002a4ff0ff30f8d052f8047c8f42f4d1c3f540339942f0d810ad104600222b460024fef716ff002800f0fe80239b0f22990603f00f0002eae17101fb00f289214a43d20a8df830200e2213f0200f08bf0f2408bf012200fb02f201fb02f24fead2228df831204ff00d0208bf022200fb02f201fb02f24fead2228df832204ff00c0208bf032200fb02f201fb02f24fead2228df833204ff00b0208bf042200fb02f201fb02f24fead2228df834204ff00a0208bf052200fb02f201fb02f24fead2228df835204ff0090208bf062200fb02f201fb02f24fead2228df836204ff0080208bf072200fb02f201fb02f24fead2228df837204ff0070208bf082200fb02f201fb02f24fead2228df838204ff0060208bf092200fb02f201fb02f24fead2228df839204ff0050208bf0a2200fb02f201fb02f24fead2228df83a204ff0040208bf0b2200fb02f201fb02f24fead2228df83b204ff0030208bf0c2200fb02f201fb02f24fead2228df83c204ff0020208bf0d2200fb02f201fb02f24fead2228df83d204ff0010208bf0e22424360434843c00a8df83f00c3f3001006900ca84a43cde9045008ac0b9dd20addf88890ddf884a0ddf87c8013cc1e9e8df83e2022462b46cdf80c90cdf808a0cdf80480009600f02df8dde91201a2455044c8bf5446a9454944c8bf4d46b042b8bf06464145b8bf8846a64211dd4146a8450edd249800680f280ad8249f491b321b07ebc0030130dc801d815a8199813860002015b0bde8f08f4ff0ff3015b0bde8f08f2de9f04f8fb0dde91c5a0e9129691e9eddf868c0002900f05c812f68002e40f05381874200f050819af80f100f2940f04b819af80e100e2940f046819af80d100d2940f041819af80c100c2940f03c819af80b100b2940f037819af80a100a2940f032819af80910092940f02d819af80810082940f028819af80710072940f023819af80610062940f01e819af80510052940f019819af80410042940f014819af80310032940f00f819af80210022940f00a819af80110012940f005819af80010002940f000811b9fb2eb0c044ff00001d8bf0c46db1bd8bf0b46d5f808e0ea681d46e919189fa444aeeb0403a7eb0c070694bb42b8bf1f46199b521b0b91591a8a42b8bf1146012f0c910797c0f2e5820c990129c0f2e1820ef101014c08069900eb6c000a9048100990042020ea81000590079801310138cde903014810029004fb05f000f102094ff0000acde9005c089407e000bf0c980af1010a8245a14400f0bb821c980e9b01680aeb050000fb04120b980a9f504400fb03705feacc7303d1099fdde9063810e0099b2e46d35c059d0778eb4007f0f00703f00f033b4400f8013b049bdde902783546d619da074fea580b0d9208d131465a466446f2f726fca446089c68e000bfb8f1020f64d3abf10102032a04d200211bf0030e35d15be06ff0030202ea58034f44b646c3f1000c3944471c8e18f578b478c5f3031545ea0415bc18e5703579f378c5f3031545ea0313237173793579c3f3031343ea05136371b3797679c3f30313043243ea06130ceb02060436a371dcd1dde9005c089c111d76461bf0030e26d04b1cf75c3246765cc7f30317ddf804c047ea06171646bef1010f475417d08f1cd65dd55cc6f3031646ea0516009dddf804c0bef1020fc654164608d03144c978f25dc1f3031141ea0211c15500bf5feac8713ff45aaf0d9a16f80b10002a4ff0000208bf042210f80b30d14003f00f0242ea011100f80b1047e7874200f095810026a1e16d68002d00f0018200244ff000090ae000bfdde90c14d8f804500c44ddf874a0ac4280f0f281ddf870800d94d8f800100f5d3e0903d001210c910ce000bf2e1b012e00f0e28121444d78002d00f0628102210c912e4617f00f011e9f1af801a0b7fa87f74fea571718bf012147ea010e1b9f4fea0a1b16f003014c4600f08980cde90a16d8f808100026b9fbf1f404fb119161449142a8bf012606ea0e06012e18d13c449c4215db189da94212da199dac420fda0e9d4e0804fb0504c907a75d6ff00f01554604bf0f215d4639401b9f2943a1550a990b9e012909f1010458d0d8f80810b4fbf1f606fb1141002461449142a8bf012404ea0e04012c18d1f4199c4215db189da94212da199dac420fda0e9d574604fb05044d08c907665d6ff00f0104bf0f215f46314039431b9f61550a990b9e022909f102042ad0d8f80810b4fbf1f505fb1141002461449142a8bf012404ea0e04012c19d1ec199c4216db189da94213da199dac4210da0e9d574604fb05044d08c907665d6ff00f0104bf0f215f4631400b9e39431b9f615509f10304711e0329b14405d23ae700bf0434a1453ff436afd8f808100026b4fbf1f505fb114161449142a8bf012606ea0e06012e1bd13d449d4218db189eb14215da199eb54212da0e9ed04605fb06054e08c907af5d6ff00f0104bf0f21d84639401b9f41ea0801ddf87080a955d8f80810661cb6fbf1f505fb1161002661449142a8bf012606ea0e06012e1cd13d449d4219db189eb14216da199eb54213da0e9e574605fb06054e08c90715f806806ff00f0104bf0f215f4601ea0801ddf8708039431b9fa955d8f80810a61cb6fbf1f505fb1161002661449142a8bf012606ea0e06012e1cd13d449d4219db189eb14216da199eb54213da0e9e574605fb06054e08c90715f806806ff00f0104bf0f215f4601ea0801ddf8708039431b9fa955d8f80810e61cb6fbf1f505fb1161002661449142a8bf012606ea0e06012e7ff466af3d449d42fff662af189eb142bff65eaf199eb542bff65aaf0e9e574605fb06054e08c90715f806806ff00f0104bf0f215f4601ea0801ddf8708039431b9fa95544e7042e78d38e78c97856ea012673d0042188e61b99002901dd012609e0b1fa81f149090027bcf1000fc8bf012707ea0106d5f808e0d5f80cb00bfb0ef9b9f1000f59d01e990024b1fa81f149094ff0ff380d91f1070c9107e000bf01340bfb0ef94c45a8f1010846d20c991c9e0029214618bf09eb0801b1fbfef536680ef1010705fb1e117f0805fb07664f08f65d042727ea8107fe4016f00f094f4618bf01270d9e3743012fd8d161449142d5db1b9f3d449d42d1db189fb942ceda199fbd42cbda0e9f1af8096005fb070e4d081ef80570c90707f00f0907f0f00747ea06071c9908bf49ea06170ef80570d1f808e0d1f80cb0b1e70fb0bde8f08f00bf002804bf4ff0ff3070472de9f04f99b01c461546cde90e01f8f74af8002800f0fb814ef66c6b4ff29c59cde90c54ccf2ff0bc2f229094ff6ff7a0024012547f67f787f2607e000bf48f2a351c0f24501bff32f8f8847d9f80070bff35f8fd9f80000bff35f8f01466ff39601b1f1005f07d10168594504d14168b1f57d7f00f0a3804ff47d70f8f76bff002800f0c4814ff60c41cff6ff7142182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d71c0f800b041608573a0f8c48180f8c361a0f820a0a0f822a0a0f824a0a0f826a0a0f828a0a0f82aa0a0f82ca0a0f82ea0a0f830a0a0f832a0a0f834a0a0f836a0a0f838a0a0f83aa0a0f83ca0a0f83ea059e8001fb9427ff44aafbff35f8f49e8000121b159e8001fb942f8d03fe7d0f87021279e249d4ff0ff302ab30021b1eb552f21d152f82500002800f01881811a88074ff0ff3017d16ff4403340f60f070b44cff6fd77bb420ed3571857f8080ca84240f0048157f80cacaaf1011010f5803f04d24ff0ff3019b0bde8f08f57f8040c50454ff0ff30f6d1c1f540318a45f2d8002ff0d0baf1c10fedd33878012840f0e580b0060f2206f00f0102eae070484389225043c00a8df854000e2016f0200f08bf012001fb00f002fb00f04fead0208df855004ff00d0008bf022001fb00f002fb00f04fead0208df856004ff00c0008bf032001fb00f002fb00f04fead0208df857004ff00b0008bf042001fb00f002fb00f04fead0208df858004ff00a0008bf052001fb00f002fb00f04fead0208df859004ff0090008bf062001fb00f002fb00f04fead0208df85a004ff0080008bf072001fb00f002fb00f04fead0208df85b004ff0070008bf082001fb00f002fb00f04fead0208df85c004ff0060008bf092001fb00f002fb00f04fead0208df85d004ff0050008bf0a2001fb00f002fb00f04fead0208df85e004ff0040008bf0b2001fb00f002fb00f04fead0208df85f004ff0030008bf0c2001fb00f002fb00f04fead0208df860004ff0020008bf0d2001fb00f002fb00f04fead0208df861004ff0010008bf0e2001fb00f002fb00f04fead0204ff000038df8620008bf0f235943299d51430020c90a002d8df863103ff427af289cc6f30010a7f13f0810ae0b9001e0013d1cd014f8010b411e1f29f8d341b220290fdb08eb400118f81000497840ea0122c12a06d3384651463346fef794f80028e5d14ff0ff3019b0bde8f08f0d9c2698ddf894b0a042c8bf04462a980894dde9289406300790cde909a704e058440b38013c834653d019f8010b1f28f6d908eb400118f81000497840ea0122c12ad8d3384651463346fef766f80028d1d00b980c9f069015a8cde90460ddf898a0229ddde90e010d9b239e3a46cde902ba00950196fff740fadde91201bb4558445144d8bfbb46a8422a46b8bf0246b142a8bf31465a4517dd089b994214dd2a9b1b680f2b10d8089ea2eb0b02a1eb060c079901ebc307ba802a9a21f833b0591c7e80a7f806c01160dde909a710aea8e7002019b0bde8f08f2de9f04fd3b0dde95ce5dde9648cdde9629a0d9075b1dde96050dde95e47a94224eae47b27eae774a8bf29468242a8bf024602e000244ff0000b09eb0e0008eb00055845c8bf83468d420ceb0a07b8bf2946a24588bf54469742b8bf3a468b45b8bf944202db53b0bde8f08f669804f0010701974fea5b07033809970bf101070090580008974e080c90002701200df14c0e0df10c0c02948ce80e00cde90a6b06e000bf0798012700284ff00000dad0c00707906698069708bf0830ddf800906ff007086ff004044ff0000b4ff0000a0f9018bf09f10809cdf838900f994fea5a00085c102300f0f002cc46a14610901194cdf8488000bf1cf8041f0eeb08001cf8014c9cf8015042ea141704f00f041443447242ea111401f00f01847211430eeb0904217242ea15119cf802600772617205f00f011143a17242ea1611817306f00f01114308f10808083b09f10809c173d1d11098ddf83890000110224b465d4600bf13f8041f0eeb050713f8014c5e7840ea141804f00f0404437c7440ea111401f00f010143f97440ea161193f802c0397506f00f010143797540ea1c11b9750cf00f010143083a05f1080587f81080bc74f975d5d1ddf84880119c0af1020a08f120082034baf1100f0bf1200b84d101980699049a48400299059b00eb01090399dde90a6b9145bff65baf0d9803fb090807e000bf0c9809f1020991458044bff64faf0d98dc4609fb03045feacb700bd0099dddf820c0605d1ef8007000f0f00007f00f0738446055b6eb5c0f28d94fea5c0a04eb060b464616f80a0006eb0a041ef80050204600f8015b58451dd205781ef80570a51c5d45077017d228781ef800002870e51c5d4510d2287804361ef80000287006eb0a055d45ddd306e000bf04eb5c05c80705d1b4e7651cdde90a6bc807afd08c45adda28781ef8007000f00f0007f0f00738442870a3e72de9f04f8bb01d9d6c68072c00f286802cb12f89b94200f08180012c7bd100287cd0d0f87061002e78d00027b7eb512f74d156f82170002f70d0a7eb060c5fea8c776bd16ff440370ceb070e40f60f07cff6fd77be4561d306eb0c0e5ef8086c8e425bd15ef80c6ca6f1011717f5803f54d35ef8047cb74250d1ccf54037be424cd8bef1000f49d0032e47d39ef80070022f43d19446aa69ddf86ca0dde91987dde917b9b2b14fead10801f00704da464ff0010b4f4612f808900bfa04f444ea090402f80840d346ddf86ca0b946dde919876c6805eb44021181721e1c9e01346c600996169e0ef101010396159e0a950296149ecde904b9cde900366346cde90687cdf820a0fbf75dfb6968013969600bb0bde8f08f6f89b94204d14ff0ff300bb0bde8f08f022c3ff479afaf89b942f4d0032c3ff473afef89b942eed0042c3ff46daf2f8ab942e8d0052c3ff467af6f8ab942e2d0062c3ff461afaf8ab9427ff45dafdae700bf70b5049d8b42c8bf19469542b8bf2a46914205dadde905e3bef1000f01d103b170bdbef10f0c18bf9c46cb070ed04b10c45cbcf1000f03d004f00f05ae4504d904f0f00444ea0e04c45401314c1000eb61035510bcf1000f00eb620049d0ac425fda00bf1c78764604f00f05beeb141f38bf2609754598bf754645ea06141d4605f8014b854265d25c78764604f00f05beeb141f38bf2609754598bf75469c1c45ea061584425d7040d29c78764604f00f05beeb141f38bf2609754598bf7546dc1c45ea061584429d702fd2dc78764604f00f05beeb141f38bf2609754598bf754645ea06151c1ddd7084422346b9d31ce0ac4219da4eea0e1500bf1c4604f8015b844226d29c1c84425d700ed2dc1c84429d700ad21c1ddd7084422346edd304e01c46d00704d17ae71c46d0073ff477af9142bff674af2078bcf1000f03d0beeb101f98bf70bd00f00f0040ea0e10207070bd5c1cd007ebd161e72de9f04f81b04ef66c644ff29c55ccf2ff04c2f229054ff6ff7600274ff0010a47f67f7b4ff07f0807e000bf48f2a351c0f24501bff32f8f8847d5f80090bff35f8f2868bff35f8f01466ff39601b1f1005f07d10168a14204d14168b1f57d7f00f094804ff47d70f8f742fa002800f005814ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ff47d710460416080f80ea0a0f8c4b180f8c381068446848684c684068546858685c685068646868686c686068746878687c68755e8001f49457ff45aafbff35f8f45e8000121b155e8001f4945f8d04fe7d0f89812002974d104464ff41630f6f739f9014600284ff0000069d0002200bf8b1888544032b2f5163f58709870d870187158719871d871187258729872d872187358739873d873187458749874d874187558759875d875187658769876d876187758779877d87783f8200083f8210083f8220083f8230083f8240083f8250083f8260083f8270083f8280083f8290083f82a0083f82b0083f82c0083f82d0083f82e0083f82f0083f8300083f8310083f8320083f8330083f8340083f8350083f8360083f8370083f8380083f8390083f83a0083f83b0083f83c0083f83d0083f83e0083f83f009ad1c4f8981200e00021084601b0bde8f08f00bf70b5044690f8a00384f8a10350b3d4f8900347f64c6642f66535c2f20706c0f2440520b131682d31c4f8981310e040f22f00c0f200007844002122460023a847c4f89003316801f12d01c4f8981330b105f1e8022d219047002808bf70bd002084f8a10370bd00bf2de9f047a4b0d0f89442bff35f8fa4b142f691760546c0f2440620460021b04770b1d5f8900340b142f64d42c0f244022d2124b0bde8f047104724b0bde8f08747f64c69c2f20709d9f8007095f8a10300283fd0f7f77cf9e0b3d5f89813781a17d495f8680110b995f82403e0b395f8a00385f8a10380b3d5f8900342f64d48c0f2440878b1d9f800102d31c5f898131de0d5f8900300b342f64d42c91bc0f24402904719e04ff64b70cff6ff70a8f1e807784400212a460023b847c5f89003d9f8001001f12d01c5f8981310b12d21c04710b1002085f8a10306f16601204624b0bde8f04708474af21f37c0f2470700200290adf80c00b84795f8680110b995f8240318b12846fff746ffe5e70df104084046f5f7a4fd02a9284600224ff0000afaf7b3fe81464046f5f7bffeb9f1000f02d085f8a1a303e00146284600f009f89df80c000028c7d107f14c008047c3e700bf2de9f04f90f8d13300f5697c4cf82310591c41f69a134b4390f8d0b31b0c03eb8303a1eb4301bbf1090f80f8d1139cbf0bf1010b80f8d0b3bbf1040f0bf0030e05d200244ff000094ff0000a2ee00bf0fc0800244ff000094ff0000a00eb8406d6f8a473d6f8a853b7fbfbf3d6f8ac1303eb090203fb1b73b5fbfbf7d6f8b06307fb1b5553443a44b1fbfbf72b44b6fbfbf53a4407fb1b1105eb020905fb1b6219440434a04502eb010ad7d1bef1000f1dd05cf82450bef1010fb5fbfbf606fb1b55b144aa4412d00ceb84056e68bef1020fb6fbfbf404fb1b66a144b24406d0ae68b6fbfbf505fb1b66a944b244bafbfbf202eb0901c0f8cc13bde8f08f00bff0b500294ff6ff7e00f0af80012903d10022c90775d1a8e021f00102c2f1000c6ff0010241f221038418a578e7788eea05252cb26e0036b203ead43484ea450503ead6366c0086ea450624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead53585ea460686ea07273eb27d002db203ead63686ea470703ead5357e0085ea470736b27d002db203ead63686ea470703ead5357e0085ea470736b27d002db203ead63686ea470703ead5357e0085ea470736b27d002db203ead636023286ea470703ead5360ceb0205023586ea470e95d10232c90733d0805c41f221038eea002001b2420012b203ead13181ea400003ead232410082ea400009b2420012b203ead13181ea400003ead232410082ea400009b2420012b203ead13181ea400003ead232410082ea400009b2420012b203ead13181ea400003ead23181ea400e1ffa8ef0f0bd2de9f04fcbb00646c07c8b468df80600b08954998df80700000a8df808008df80a10080af1898df80b00080a17468df80d000020012b8df805308df809b08df80c108df80e008df80f008df810008df811008df812008df813008df814008df815008df816008df817008df818008df819008df81a008df81b008df81c008df81d008df81e008df81f008df820008df821008df822004cd1307e96f81780a0f1090144f62510c2f29240a1fb0002891a02eb510100970df10500b8eb910f88bf4fea9108c8ebc80706f11a0400f1010a00f10509093021463a46f1f795f806f1210506f1280029460722f1f78df8284621460722f1f788f820465146032207f10905f1f781f806f11d0049460422f1f77bf8f07d02289cbf0130f075009fbb450cd0b8f1240f13d94ff0ff304bb0bde8f08fbb454ff00905f07509d14ef60b67abb20df10502c0f247070120f02115e002200df12304aab28df82300a01c0df105018df82470f1f74ff8a81c4af6610782b2c0f24607f02021460023b8474bb0bde8f08f2de9f04184b0044690f84d0000284ff0000000f09a8094f84f1042f28b0701f078018df8071094f85010c0f25b0701f007018df80610cde9020002a906200022b847054670b9002002adcde902000df1070128460122f1f715f8012029460122b847054694f84e00a8b1002602a906200022cde90266b84760b9cde9026602ae04f1540130460122f0f7fcff572031460122b8470543002602a906200022cde90266b84768b90df108080df1060140460122cde90266f0f7e5ff312041460122b847054302a906200022cde90266b84768b9002002ae04f15301cde9020030460122f0f7cfff462031460122b8470543002602a906200022cde90266b84768b90df1080804f1510140460222cde90266f0f7b8ff362041460222b847054302a9a3200022cde90266b847054302a997200022cde90266b84742f62b310543c0f2440102208847284615b104b0bde8f081002184f84e1084f84d10a16504b0bde8f08100bf2de9f04f8bb00190233002254ff000080df10c0a4ff001094ff0000b002402900be000bf09fa0bf0002f0bf1010b08bf0443bbf1070f354426d042f2d710c0f20000784410f80b0042f2d111c0f20001794411f80b6042f2fb0351463246c0f25b03cde90988cde90788cde90588cde90388984707460028d4d10298514628443246f0f74dffcde742f2fb00c0f25b004ff60073002600f1340703a9c0f21f0381200c22cde90966cde90766cde90566cde90366b84730b9029803a928440c22f0f72eff8026ddf804c040f6b80146ea0400220ac2f200018cf823008cf824200a68002a00f0ad8045f2fd774ff6ff766ff0020241f22103c0f202070d681544ed7886ea052635b203ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea46060d6824b2154403ead4342d7984ea460686ea052635b203ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea46060d6824b2154403ead4346d7984ea460686ea052635b2740024b203ead53585ea460603ead434750084ea46062db2740024b203ead53585ea460603ead434750084ea46062db2740024b203ead53585ea460603ead434750084ea46062db2740024b203ead53585ea460603ead4350332ba4285ea46067ff460afb1b2090a01e0ff26ff218cf83e109cf84c109cf84d208cf83f1026218cf83d608cf84020ff288cf84b101cbf04208cf81c000bb0bde8f08f70b588b042f2fb0514460e46c0f25b05002181280791cde90511cde90311cde90111009107d11b023435694681202246a84720b905e069462246a84708b108b070bd6946054630462246f0f72ffe284608b070bd2de9f0478cb08579972d17d00446fe2d0fd0fd2d2ad142f69570c0f25b008047002084f84e0084f84d00a0650cb0bde8f08720460cb0bde8f047cbe50020cde9040042f2fb00c0f25b00a0f1700304a9972000229847044642f62b31c0f244010220884720460cb0bde8f08742f2fb08002094f80c90677bc0f25b08cde90a00cde90800cde90600cde9040004a99f200422c047064620b901a804a90422f0f7dbfd002e6ff00100ddd19df80410bd29d9d19df805104029d5d19df806101029d1d194f84d00002852d047f64c60c2f20700006843f698210844a065002604a937200222cde90a66cde90866cde90666cde90466c047002840f0898002a804a90222f0f7a9fd04a947200122cde90a66cde90866cde90666cde90466c047002875d10df1030004a90122f0f795fd0020cde90a00cde90800cde90600cde9040004a905200122c047002860d10df1020004a9012249ea0726f0f77efd352d5bdc002d00f08180012d70d19df8020082e0002604a9052001228df80e60adf80c600296cde90a66cde90866cde90666cde90466c047d8bb0df1080a04a950460122f0f75afd04a935200122cde90a66cde90866cde90666cde90466c04738bb0af1010004a90122f0f747fd002604a937200222cde90a66cde90866cde90666cde90466c04798b90af1020004a90222f0f733fd04a947200122cde90a66cde90866cde90666cde904660126c04778b14ff0ff300cb0bde8f087362d6ed0572d15d194f84e00002800f08580572039e00af1040004a90122f0f70ffd04f14f0051460722f0f709fd84f84d603ee700208df801006946284601228df8009000f04ef9312d044627d036e09df80200002e00f0380618bf4036704010f0380f10d09df808009df8091041f6ce430e22c0f2000302ea96027b449a5a41ea0020904239d8012000218df80110694601228df8006000f024f904460df103014620012200f01df9054602a93620022200f017f945ea040141ea00040025a8f1700604a9a3200022cde90455b047044304a997200022cde90455b0470443aee69df802000e2101ea900041f65641c0f200017944085a864204d96ff001000cb0bde8f0876946362002228df800708df8019000f0e6f80446d0e70020cde90a00cde90800cde90600cde9040004a9592001220125c04700287ff45caf04f1540004a90122f0f77bfc84f84e5060e740f6b800c2f200000168002904bf4ff0ff30704780b584b000684ef2173102904ff41630039002a8c0f2470188474ff4f07042f29f7e01904ff4207cc0f25b0e0020002100220023cdf800c0f04704b080bd00bf2de9f04340f6b801c2f2000109684ff0000e01f1020c4cf6cd4340f2762808e00ef1010ebef5f07f0cf5a07c08bfbde8f083aef1a0096ff00906644607e000bf07eb0711a170053445452e46e8d290f84c1006f10a054f1e112905fb03f208bf570d122908d1a6f1e6019f294ff000079cbfb9f19f0f077b07eb071104f8021c90f84c1006f10c024f1e112903fb02f208bf570d122908d1a6f1e4019f294ff000079cbfb9f19f0f077b07eb071104f8011c90f84c1006f10e024f1e112903fb02f208bf570d122908d1a6f1e2019f294ff000079cbfb9f19f0f077b07eb0711217090f84c1006f110024f1e112903fb02f208bf570d122908d1a6f1e0019f294ff000079cbfb9f19f0f077b07eb0711617090f84c1006f112024f1e112903fb02f208bf570d12298ad1a6f1de019f294ff000079cbfb9f19f0f077b80e700bf2de9f04383b042f28b0914460e460546c0f25b090027694606200022cde90077c84710b103b0bde8f083e846404631462246cde90077f0f791fb284641462246c84703b0bde8f08370b50446d0f840010d4638b92046f6f7a5fa0028c4f8400108bf70bd42f64d46c0f2440606f140018847d4f8400129463246bde8704010472de9f04f81b0934612788ab1022300bf0beb030717f8012c62b11bf8032062b17a784ab1ba780433002af1d1023b04e0002205e0013b00e0013303eb4302520042eae272931c02f1010c01eb810203f0030e23f0030a00eb8213a3f5a0784ff0ff3906e009f10109b9f10d0f08f5a0786bd009eb010202eb8202bcf1030f00eb821605d24ff0ff34bef1000f2ed1e9e70024474604e000bfa24507f1020721d0621cd209042a03d83a7802f0f0023a70a21cd209042a03d87a7802f00f027a70e21cd209042a03d87a7802f0f0027a700434e209042adfd86208b55c05f00f05b554d9e7013cbef1000fbbd0a21cd509042d08d85208b55ce7076ff00f0708bf0f273d40b554bef1010fabd0e21cd509042d09d85208b55ce7074ff00f0708bf6ff00f073d40b554bef1020f9ad0221dd509042d96d85208e407b55c6ff00f0408bf0f242c40b4548ce79bf80010cdf800b0002900f0ce80022041f2410a41f2420b41f2430808e0009a063012f8011f03330029009200f0bd80a1f17f0717f15f0ff1d341f2d132c0f2000201eb41017a4402eb81014ff20014a1f5c079cff6ff7402e014f52074ded0494619f9027bc509042d09d8b7f1ff3f06dc1a1992f8016f46f0f00682f8016f5ffa87fe5fea4e6208d5042d06d81a1992f8017f47f00f0782f8017f5fea8e620ad540f27d22904206d81a1992f8027f47f0f00782f8027f5feace6209d5b0f51f7f06d81a1992f8027f47f00f0782f8027f5fea0e724fea900c09d5bcf19e0f06d81a1992f8036f46f0f00682f8036f5fea4e720ad540f27a22904206d81a1992f8037f47f00f0782f8037f91f90110042d09d8b1f1ff3f06dc1a1912f80a7047f0f00702f80a70c9b24a0608d5042d06d81a1912f80a7047f00f0702f80a708a060ad540f27d22904206d81a1912f80b7047f0f00702f80b70ca0609d5b0f51f7f06d81a1912f80b7047f00f0702f80b700a0709d5bcf19e0f06d81a1912f8087047f0f00702f8087049077ff565af40f27a2188423ff660af191911f8082042f00f0201f8082057e701b0bde8f08f00bf2de9f04381b04ff29c51c2f229010f68044638466ff39600b0f1005fbff35f8f0cd138684ef66c61ccf2ff01884205d17868b0f57d7f18bf002700e0002745f64d50c0f24600804741f2a961c0f2000141f2ae62c0f2000279447a44022808bf0a4641f29061c0f2000179440128204618bf114600f074fe47b197f87b0180b141f28e61c0f20001794419e041f27b61c0f200017944204601b0bde8f04300f05fbe97f8740141f26862c0f2000241f26561c0f2000179447a44002808bf1146204600f04dfe97f8750141f24562c0f2000241f24f61c0f200017944012820467a4408bf114600f03bfe41f23d61c0f200017944204600f033fe97f9c311204600f022ff41f22961c0f200017944204600f026fef6f77afe41f20b68c0f2000841f21766c0f200067e44054600f003003146f844012808bf414641f2f559c0f2000902282046f94408bf494600f008fea808012808bf4646022808bf4e462046314600f0fdfd41f2d351c0f200017944204600f0f5fdd7f8840198b147f64c61c2f207010a68821a012a0bdb0968401a44f6d35100f2e730c1f26201a0fb0101890900e00021204600f0eafe41f29551c0f200017944204600f0d2fdd7f8bc11204600f0ddfe41f28251c0f200017944204600f0c5fdb7f8c011204600f0d0fe41f26a51c0f200017944204600f0b8fd97f8c211204600f0c3fe41f25351c0f200017944204600f0abfdb7f8c611204600f0b6fe41f24055c0f200057d442046294600f09dfdb7f8c811204600f0a8fe2046294600f094fdb7f8ca11204600f09ffe41f21451c0f200017944204600f087fdd7f88011204600f092fe41f2ff41c0f200017944204600f07afd97f9c511204600f069fe41f2eb41c0f200017944204600f06dfd97f9c411204601b0bde8f04300f059be00bf2de9f04f81b0134681464a1c00f08f808e0a4ff0000b19f80b20002a00f0888109eb0b077a78002a00f00a81ba78002a00f00981fa78002a00f008813a79002a00f007817a79002a00f00681ba79002a00f00581fa79002a00f004813a7a002a00f003817a7a002a00f00281ba7a002a00f00181fa7a002a00f000813a7b002a00f0ff807a7b002a00f0fe80ba7b002a00f0fd80fa7b002a00f0fc803a7c002a00f0fb807a7c002a00f0fa80ba7c002a00f0fb80fa7c002a00f0fc803a7d002a00f0fd807a7d002a00f0fe80ba7d002a00f0ff80fa7d002a00f000813a7e002a00f001817a7e002a00f00281ba7e002a00f00381fa7e002a00f004813a7f002a00f005817a7f002a00f00681ba7f002a00f00781fa7f002a00f008810bf1200bbbf1600f7ff477af4ff0600b00e1002119f80120002a00f0af8109eb01056a78002a00f0b080aa78002a00f0b180ea78002a00f0b2802a79002a00f0b3806a79002a00f0b480aa79002a00f0b580ea79002a00f0b6802a7a002a00f0b7806a7a002a00f0b880aa7a002a00f0b980ea7a002a00f0ba802a7b002a00f0bb806a7b002a00f0bc80aa7b002a00f0bd80ea7b002a00f050812a7c002a00f04e816a7c002a00f04c81aa7c002a00f04a81ea7c002a00f048812a7d002a00f046816a7d002a00f04481aa7d002a00f04281ea7d002a00f040812a7e002a00f03e816a7e002a00f03c81aa7e002a00f03a81ea7e002a00f038812a7f002a00f036816a7f002a00f03481aa7f002a00f03281ea7f002a00f03081203160297ff479af32e10bf1010b74e00bf1020b71e00bf1030b6ee00bf1040b6be00bf1050b68e00bf1060b65e00bf1070b62e00bf1080b5fe00bf1090b5ce00bf10a0b59e00bf10b0b56e00bf10c0b53e00bf10d0b50e00bf10e0b4de00bf10f0b4ae00bf1100b47e00bf1110b44e00131f6e00bf1120b3fe00231f1e00bf1130b3ae00331ece00bf1140b35e00431e7e00bf1150b30e00531e2e00bf1160b2be00631dde00bf1170b26e00731d8e00bf1180b21e00831d3e00bf1190b1ce00931cee00bf11a0b17e00a31c9e00bf11b0b12e00b31c4e00bf11c0b0de00c31bfe00bf11d0b08e00d31bae00bf11e0b03e00e31b5e00bf11f0bb1f5205f4ff0010100931fd364234ff47a7442f2107700bf01eb81025200b6fbf2f50a2d11d301fb03f2b6fbf2f50a2d0bd301fb04f2b6fbf2f50a2d05d37943b6fbf1f2092ae7d800e011465846bbf15f0f98bf5f20c0f1000c1ceb0b0a53d0b6fbf1f74cf6cd4207f13003ccf6cc4209f80b300a29a1fb023547d31af1010342d007fb11674fead508b7fbf8fe48f21f520ef1300309eb0b06c5f2eb1273706429a1fb023434d31af102032cd00efb18776409b7fbf4f544f6d35205f13003c1f26202b370b1f57a7fa1fb022323d31af1030218d005fb14729b0941f25975b2fbf3f7cdf2b715a1fb055407f13005f57007fb132642f210720bf1040b91424fea5431a9d209e0834607e00bf1010b04e00bf1020b01e00bf1030b0020009b09f80b002de00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2904d849444ff03f020a7003d1002189f85f1001e000204870002119f80100002800f0a18009eb0105687800285ed0a87800285dd0e87800285cd0287900285bd0687900285ad0a879002859d0e879002858d0287a002857d0687a002856d0a87a002855d0e87a002854d0287b002853d0687b002852d0a87b002851d0e87b002850d0287c00284fd0687c00284ed0a87c00284dd0e87c00284cd0287d00284bd0687d00284ad0a87d002849d0e87d002848d0287e002847d0687e002846d0a87e002845d0e87e002844d0287f002843d0687f002842d0a87f002841d0e87f002840d0203160297ff498af44e001313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2905d849444ff02f00087040f09580002089f85f00581c00f094809d0a4ff0000e19f80e00002800f08d8109eb0e067078002800f00f81b078002800f00e81f078002800f00d813079002800f00c817079002800f00b81b079002800f00a81f079002800f00981307a002800f00881707a002800f00781b07a002800f00681f07a002800f00581307b002800f00481707b002800f00381b07b002800f00281f07b002800f00181307c002800f00081707c002800f0ff80b07c002800f00081f07c002800f00181307d002800f00281707d002800f00381b07d002800f00481f07d002800f00581307e002800f00681707e002800f00781b07e002800f00881f07e002800f00981307f002800f00a81707f002800f00b81b07f002800f00c81f07f002800f00d810ef1200ebef1600f7ff477af4ff0600e05e100204870581c7ff46caf002119f80100002800f0aa8109eb01025078002800f0b0809078002800f0b180d078002800f0b2801079002800f0b3805079002800f0b4809079002800f0b580d079002800f0b680107a002800f0b780507a002800f0b880907a002800f0b980d07a002800f0ba80107b002800f0bb80507b002800f0bc80907b002800f0bd80d07b002800f04b81107c002800f04981507c002800f04781907c002800f04581d07c002800f04381107d002800f04181507d002800f03f81907d002800f03d81d07d002800f03b81107e002800f03981507e002800f03781907e002800f03581d07e002800f03381107f002800f03181507f002800f02f81907f002800f02d81d07f002800f02b81203160297ff479af2de10ef1010e74e00ef1020e71e00ef1030e6ee00ef1040e6be00ef1050e68e00ef1060e65e00ef1070e62e00ef1080e5fe00ef1090e5ce00ef10a0e59e00ef10b0e56e00ef10c0e53e00ef10d0e50e00ef10e0e4de00ef10f0e4ae00ef1100e47e00ef1110e44e00131f1e00ef1120e3fe00231ece00ef1130e3ae00331e7e00ef1140e35e00431e2e00ef1150e30e00531dde00ef1160e2be00631d8e00ef1170e26e00731d3e00ef1180e21e00831cee00ef1190e1ce00931c9e00ef11a0e17e00a31c4e00ef11b0e12e00b31bfe00ef11c0e0de00c31bae00ef11d0e08e00d31b5e00ef11e0e03e00e31b0e00ef11f0e0122b3f5205f1ed364234ff47a7442f2107602eb82004100b5fbf1f00a2811d302fb03f1b5fbf1f00a280bd302fb04f1b5fbf1f00a2805d37243b5fbf2f00928e7d800e00a46f046bef15f0f98bf4ff05f08c8f1000c42f2107a1ceb0e074dd0b5fbf2f30a2a03f1300009f80e004cf6cd40ccf6cc40a2fb000641d3781c3dd003fb1253f608b3fbf6f409eb0e0504f13000687048f21f50c5f2eb10642aa2fb000130d3b81c29d004fb16334e09b3fbf6f4b2f57a7f04f13000a87044f6d350c1f26200a2fb000120d3f81c16d004fb1630890941f25974b0fbf1f3cdf2b714a2fb044603f13004ec7003fb11050ef1040e52454fea5632afd209e0c64607e00ef1010e04e00ef1020e01e00ef1030e002009f80e0001b0bde8f08f0f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2904d849444ff03f00087005d1002089f85f0001b0bde8f08f0020487001b0bde8f08f2de9f0411f22831813f81f7c002f00f0808013f81e7c002f7dd013f81d7c002f7bd013f81c7c002f79d013f81b7c002f77d013f81a7c002f75d013f8197c002f73d013f8187c002f71d013f8177c002f6fd013f8167c002f6dd013f8157c002f6bd013f8147c002f69d013f8137c002f67d013f8127c002f65d013f8117c002f63d013f8107c002f61d013f80f7c002f5fd013f80e7c002f5dd013f80d7c002f5bd013f80c7c002f59d013f80b7c002f57d013f80a7c002f55d013f8097c002f53d013f8087c002f51d013f8077c002f4fd013f8067c002f4dd013f8057c002f4bd013f8047c002f49d013f8037c002f47d013f8027c002f45d013f8013c002b43d0835c002b41d020327f2a7ff47baf64e01f3a3ae01e3a38e01d3a36e01c3a34e01b3a32e01a3a30e0193a2ee0183a2ce0173a2ae0163a28e0153a26e0143a24e0133a22e0123a20e0113a1ee0103a1ce00f3a1ae00e3a18e00d3a16e00c3a14e00b3a12e00a3a10e0093a0ee0083a0ce0073a0ae0063a08e0053a06e0043a04e0033a02e0023a00e0013a5f2a25d8c2f15d0cc2f15e0ec2f15f03c2f160080244002509e000bffc78002cf47008bfbde8f0810435a84510d04e5d565586b1ab420bd04f197c78561974704cb1ae4504d0bc78b47024b1ac45e5d1002180f85f10bde8f08100bf7f2905d140f2eb71c0f20001794403e7b1f1ff3fc8bf0fe0b0b540f2d572c0f200027a440d4611460446fff7f5fe20466942bde8b040ffe72de9f04f4ff0000c10f80c20002a00f0c48000eb0c035a78002a62d09a78002a62d0da78002a62d01a79002a62d05a79002a62d09a79002a62d0da79002a62d01a7a002a62d05a7a002a62d09a7a002a62d0da7a002a62d01a7b002a62d05a7b002a62d09a7b002a62d0da7b002a62d01a7c002a62d05a7c002a62d09a7c002a62d0da7c002a62d01a7d002a62d05a7d002a62d09a7d002a62d0da7d002a62d01a7e002a62d05a7e002a62d09a7e002a62d0da7e002a62d01a7f002a62d05a7f002a62d09a7f002a62d0da7f002a62d00cf1200cbcf1600f7ff496af4ff0600c5be00cf1010c58e00cf1020c55e00cf1030c52e00cf1040c4fe00cf1050c4ce00cf1060c49e00cf1070c46e00cf1080c43e00cf1090c40e00cf10a0c3de00cf10b0c3ae00cf10c0c37e00cf10d0c34e00cf10e0c31e00cf10f0c2ee00cf1100c2be00cf1110c28e00cf1120c25e00cf1130c22e00cf1140c1fe00cf1150c1ce00cf1160c19e00cf1170c16e00cf1180c13e00cf1190c10e00cf11a0c0de00cf11b0c0ae00cf11c0c07e00cf11d0c04e00cf11e0c01e00cf11f0c01230a291fd364274ff47a7642f2107500bf03eb83025200b1fbf2f40a2c11d303fb07f2b1fbf2f40a2c0bd303fb06f2b1fbf2f40a2c05d36b43b1fbf3f2092ae7d800e01346e2464cf6cd49bcf15f0f98bf4ff05f0acaf1000eccf6cc491eeb0c0b4ed0b1fbf3f50a2b05f1300200f80c20a3fb092446d31bf1010241d005fb1316e508b6fbf5f800eb0c0108f130024a7048f21f52c5f2eb12642ba3fb022434d31bf102022cd008fb15656609b5fbf6f4b3f57a7f04f130028a7044f6d352c1f26202a3fb027223d31bf1030718d004fb1654920941f25976b4fbf2f5cdf2b716a3fb066705f13006ce7005fb124142f210720cf1040c93424fea5733aed209e0d44607e00cf1010c04e00cf1020c01e00cf1030c002100f80c10bde8f08f0000434d01ffff0000000000000052420100ff00000008031000000000000000000046616365636c61772f3335000000000000000000000000000000002020202020002020000000505050000000000000000000005050f85050f85050000000002070a8a07028a8702000000048a85010202854480000000020505020689090680000002020200000000000000000000010204040404020100000000040201010101020400000000000005020f82050000000000000002020f82020000000000000000000000020204000000000000000f800000000000000000000000000202000000000080810102020404000000000708898a8c88888700000000020602020202020700000000070888808102040f8000000007088083008088870000000000818284888f8080800000000f88080f00808887000000000708080f08888887000000000f808081010202020000000007088887088888870000000007088888878080870000000000000202000002020000000000000202000002020400000000008102040201008000000000000f80000f8000000000000004020100810204000000000708888102000202000000000708898a8a89880780000000070888888f888888800000000f08888f0888888f000000000708880808080887000000000e0908888888890e000000000f88080f0808080f800000000f88080f0808080800000000070888080b888887000000000888888f888888888000000007020202020202070000000003810101010909060000000008890a0c0c0a090880000000080808080808080f80000000088d8a8a888888888000000008888c8a89888888800000000708888888888887000000000f0888888f080808000000000708888888888a87008000000f0888888f0a0908800000000708880700808887000000000f8202020202020200000000088888888888888700000000088888850505020200000000088888888a8a8d88800000000888850202050888800000000888850502020202000000000f8081020408080f8000000007040404040404070000000004040202010100808000000007010101010101070000000205088000000000000000000000000000000000000f80040200000000000000000000000000000700878888878000000008080f088888888f00000000000007088808088700000000008087888888888780000000000007088f8808078000000001820702020202020000000000000788888888878087000008080f08888888888000000202000602020202070000000080800180808080808483000004040485060605048000000006020202020202070000000000000f0a8a8a8a8a8000000000000f08888888888000000000000708888888870000000000000f088888888f0808000000000788888888878080800000000b8c0808080800000000000007880700808f00000000020207020202020180000000000008888888888780000000000008888505020200000000000008888a8a8a870000000000000885020205088000000000000888888888878087000000000f810204080f800000000182020402020201800000000202020202020202000000000601010081010106000000048a89000000000000000009f0535593747c181040101010201020c005353a829c51bd314a810260d5b0bfe096d6963205220006d6963204c20006d6963203f20006e6f206374780061726d200063666720006f6666200070646d00636f646563002072656720002074626c2000540053002d00206c65617365200073207461702000200042400020736b697020002f002066722000206e7466200020756e7265672000000000", + "new": "b0b581ea00039b0701d0034637e0c2b110f0030315d000f1010ca2f1010e0023cc5c9e45c45403f1010404d0634413f003032346f4d121440319121b102a14d302e00346102a10d3d1f800c0d1f804e0cc688d68103adc609d60c3f804e043f810cb0f2a01f11001eed8042a07d300bf51f8045b043a032a43f8045bf8d8002a08bfb0bd0139013b11f8015f013a03f8015ff9d1b0bd00bf884218bf002a00d1704710b50b1a38bf431a934207d288420ad281ea00039b0726d0034669e0fff79fffbde81040704781ea000300eb020c9b0701eb020e42d15fea8c732bd0a0f1010c00bf8b1813f801ec8418531e04f801ec04d0624412f003021a46f2d101eb030e00eb030c17e0830736d0a2f1010c00f1010e002300bfcc5c9c45c45403f1010404d0734413f003032346f4d1121b2144031922e01346042b0ed3aef10402acf1040152f80449043b032b41f80449f8d802f1040e01f1040c1a4653b1aef10101acf1010300bf11f80149013a03f80149f9d1bde8104070470346042a06d351f8044b043a032a43f8044bf8d8002af0d00139013b00bf11f8014f013a03f8014ff9d1e6e700bf80b5002a18bf10f0030301d186460ce000f1010c864600bf013a0ef8011b04d01cf003030cf1010cf6d1102a11d35ffa81fc4ff001330cfb03fc00bf103acef80cc0cef808c0cef804c04ef810cb0f2af4d8042a0bd35ffa81fc4ff001330cfb03fc00bf043a032a4ef804cbfad8002a08bf80bdaef10103013a03f8011ffbd180bd00bf2de9f04fc7b04ff29c5bc2f2290b4ff6ff754ff47d7400274ff0010847f67f7a7f261191cde90f3007e000bf48f2a351c0f24501bff32f8f8847dbf80090bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14068b0f57d7f00f096804ff47d7006f0c8fc002800f0c8814ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff010160446080f80e80a0f8c4a180f8c361058445848584c584058545858585c585058645868586c586058745878587c5875be8001f49457ff452afbff35f8f4be8000121b15be8001f4945f8d047e74ff47d7800274ff0010a47f67f797f2607e000bf48f2a351c0f24501bff32f8f8847dbf80040bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f098804ff47d7006f006fc002800f006814ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff010160c0f8048080f80ea0a0f8c49180f8c361058445848584c584058545858585c585058645868586c586058745878587c5875be8001fa1427ff451afbff35f8f00bf4be8000121b15be8001fa142f8d045e7d0f8944242f6f76ac0f2440a002cbff35f8f4bd00af19a0220464ff0ff314ff0ff379047002840f09081119800285fd010980778a7f11700022859d811980c2840f07d81109b58789978084300f07781d8780138022800f272819a79d9795e7a42ea0122197a187942ea014242ea06619a7ade7a93f805c0192f42ea062200f0c981172f40f0df81002a40f05881fe2800f03e86812800f03086002840f045865cea010040f04b8100f092be04460020d047d0b104f5257151e8004f5cb9bff35f8f00bf41e80002002a00f0e38051e8004f002cf6d00021bff32f8f0029bff35f8f00f0d380044694e74ff0ff372ce147f6df40c0f24f000e94804700274ff47d784ff0010947f67f744ff07f0a1397adf8507007e000bf48f2a351c0f24501bff32f8f8847dbf80060bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f09f804ff47d7006f0c0fa002800f097804ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff010160c0f8048080f80e90a0f8c44180f8c3a1058445848584c584058545858585c585058645868586c586058745878587c5875be8001fb1427ff451afbff35f8f00bf4be8000159b15be8001fb142f8d045e70af5a9718847bfe6012121e70020109f42f6f76ac0f2440a9fb1119989b1397801f07f02b2f10b0418bf0124b2f11c0618bf01268a2928dc0b292ad01c2928d041e00f9012a803f037ff4ff0ff374ff001080e9c9df85100002812a818bf4ff0ff3704f04ff8b8f1000f054608d19df8500028b94af21f30c0f247004c3080470f98002818bf056115e09c2901d08b2919d168b14af21f31c0f247010746884797f8681121b997f824133846109f51b10e9c4ff0ff370af5807120468847384647b0bde8f08f0f9012a804ea060803f0f3fe387800f07f041e2c05d11199384607f048fe0746b4e71d2c00f07e0018bf1a2819d1dbf800100322cff680720a40b2f1005fbff35f8f12d10a684ef66c63ccf2ff039a420bd14a68b2f57d7f04bf002281f8a12303e0a4f115010129e1d90f2c12dc092c00f31781052c00f0c982072c40f0c183cdf8348000274ff0010947f67f764ff07f0852e0142c00f3ea81102c00f08083112c40f0ae8311980e9c022806d13878112803d17878002800f09a864ff0ff3765e7bcf1000f4ff0ff3708bf00298fd11328bff48daf102a4ff0000138bf01211228b2fa82f218bf510901297ff480af00f0c5bc182f4ff0ff3708bfbcf1000f7ff476af00297ff473af352800f34284002800f09c84012800f0a884312840f09a84082abff464af00f0a9bc48f2a351c0f24501bff32f8f8847dbf80040bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f000864ff47d7006f00df9002800f0f8854ff60c41cff6ff7142182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff0101604ff47d71416080f80e90a0f8c46180f8c381058445848584c584058545858585c585058645868586c586058745878587c5875be8001fa1427ff451afbff35f8f4be80001002900f06c855be8001fa142f6d044e70a2c00f083820b2c40f0aa82dbf800500320cff68070bff35f8f28400e9cb0f1005f40f08a8528684ef66c61ccf2ff01884240f0828568680027b0f57d7f7ff455aed5f8900342f68d46c0f244060028a5f8a07318bfb0470021a5f8d013c5f8cc13c5f86c1185f86a1185f86811d5f87001c5f8641185f86911c5f87011c5f82013a5f88c1320b148f2a351c0f245018847d5f89802002818bf03f0ddff0024c5f89842d5f8880320b148f2a351c0f245018847c5f88843a5f88c43686ca5f8484040b1b047686c06f166018847002804bf002068644bf63940c0f251008047dbf800400320cff680702040b0f1005fbff35f8f48d120684ef66c61ccf2ff01884241d16068b0f57d7f3dd194f87b01c1464ff00008c4f8848100b384f87b8194f8750149f259620138b0fa80f04109c0f2590240f20b1090474ef6e37710f1800fd8bf6ff07f00c0f25a077e28a8bf7e2084f8c401b84707f1bc008047d4f8880142f6f76a84f87481c0f2440ac84650b1b047d4f8880106f166018847002804bf0020c4f88801dbf800000321cff680710140b1f1005fbff35f8f40f0358701684ef66c62ccf2ff02914240f02d874168b1f57d7f40f0288790f8cc11002900f01d8706f0a2fb00f01fbf152c00f0bf81162c40f0c481119801380228c0f084827878b9780e9c40ea0120b0f5007f4ff0ff373ff67aad0321119a01eb400191427ff473ad002700288df8dc708df8dd708df8de708df8df708df8e0708df8e1708df8e2708df8e3708df8e4708df8e5708df8e6708df8e7708df8e8708df8e9708df8ea708df8eb708df8ec708df8ed708df8ee708df8ef708df8f0708df8f1708df8f2708df8f3708df8f4708df8f5708df8f6708df8f7708df8f8708df8f9708df8fa708df8fb708df8fc708df8fd708df8fe708df8ff708df800718df801718df802718df803718df804718df805718df806718df807718df808718df809718df80a718df80b718df80c718df80d718df80e718df80f718df810718df811718df812718df813718df814718df815718df816718df817718df818718df819718df81a718df81b713ff4efac109937aa03314ff0010c4b78012b3ff67dad0f7847ea0323db08d65c07f007070cfa07f737427ff471add65c013847ea060701f10201d754e7d1cdf8348004f078ff002800f081854ff47d7800244ff0010a47f67f797f2600f045bc1198cdf834804ff47d7800244ff0010a47f67f797f2602282cbf7878ff200c9006e048f2a351c0f24501bff32f8f8847dbf80070bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f0d2804ff47d7005f08cfe002800f06c834ff60c41cff6ff7142182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ef66c61ccf2ff010160c0f8048080f80ea0a0f8c49180f8c361058445848584c584058545858585c585058645868586c586058745878587c5875be8001fb9427ff452afbff35f8f4be8000100293fd05be8001fb942f7d046e71199384606f015fb0746fff7efbb11980228c0f0eb8000f0f6fd002800f0e6807c78002c00f0b482022c00f2df8040f03e85014611984646062880f07e8442f6f76a0e9c4ff0ff37c0f2440ab046fff7cebb1199781c013907f0affa0746fff7c5bb1d2c51d11199781c013907f093ff0746fff7bbbb90f8481042f6f76a0e9c109ddde90c68c0f2440a69b1416c41b142f68d42c0f2440204460846904720460e9c002180f848100121119a032a0dd366b9a878082800f2c1824bf63941c0f25101963188470027fff791bb119a052ac0f0e280012e40f0df80a8780027411e06293ff684abe97803293ff680ab2a79002a3ff47cab4bf63943c0f2510303f59a7398470027fff772bb1a2818bf1c2c6cd104f016fe002868d000f074fd814608f02ffab9f1000f4ff0ff3718bf00283ff45cab834647f63400c2f20700d0f81806d9f894131b2ca0eb0100c9f89c0300f061841a2c40f08284109900254f1c11994ff4f0724e1e4ff4a071cde93d5037a84ff420744ff4805acde90950cde901214846394632465b46cde937a53f95cde90755cde90555cde90355009408f030fd002840f05884d9f89c033946cde93e0537a80a90012009904ff4a07002904ff4f0700190484632465b464ff42077cde937a53d95cde90755cde90555cde90355009708f00dfd00f04dbc4ff0ff37fff7fcba362872d046286dd057285ad1002e7ff425ab6ae0bcf10c0f4ff0ff377ff41eabb1f5005f61d3fff719bbacf101001f284ff0ff373ff612abccf51630814254d9fff70cbb00297ff407ab421f18bf0122b0f1350318bf01231a40b0f1590318bf01231a40b0f1470318bf0123134208bfbcf1010f39d0b0f1370218bf0122b0f1c10318bf01231a4208bfbcf1020f2cd09f284ff0ff377ff4e1aabcf1040f24d0fff7dcba022e40f03f814bf63940c0f2510080470027fff7a0ba022abff4ceaa13e0002a7ff4caaaa0f1fd0102290cd397287ff4c3aa08e06ff0780002427ff4bdaa02e0402abff4b9aa45f64d50c0f24600804710990128c9784ff0010008bf022008424ff000073ff4a8aa0e944ff47d7847f67f797f2406e048f2a351c0f24501bff32f8f8847dbf80060bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f096804ff47d7005f04cfc00283ff475aa4ff60c41cff6ff7142182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ef66c61ccf2ff0101600121c0f804808173a0f8c49180f8c341058445848584c584058545858585c585058645868586c586058745878587c5875be8001fb1427ff452afbff35f8f4be8000121b15be8001fb142f8d047e74af21f35c0f247050446a84794f86801109f00287ff4daa994f82403214600287ff4d4a93878172812d0d1f8840320b904f0bcf9c4f8840360b342f68d41c0f24401a1f140024ff47a719047214608bb01f226300e4639460c22fef771fd0f98002186f825030120bff35f8f86f824034ff4f07001904ff4207005f5106600900020002200230027b047002800f0138284f8247305f14c008047fff797b9119a072ac0f09b81032e40f09881a878ea78297940ea02206c79ad7901284ff0010698bf304644f62062904228bf10464bf63942c0f2510202f5e272642928bf6421904747f63400c2f207000068002800f0348344ea0521012988bf0e4642f68d41c0f24401a1f14002314690470027fff72eb9002780f8477145f64d50c0f2460080470e9c01287ff423a943f2a310c0f2560080470746fff71bb942f6f76a0e9c109ddde90c6800210020c0f2440a6de500201199dde90d84022910992cbf4978ff2160b302294ff000072fd0012929d000297ff4fda84cf67e21caf2101187778783cbf8041087818760058445848584c584058545858585c585058645868586c586058745878587c58780f8407080f8d17380f8d073c0f8cc73fff7d9b80027fff7d6b801218173fff7d2b88773fff7cfb845f64d50c0f24600804701284ff000077ff4c5a840f20830c0f210003790ff208df8d80044f25220c0f20100359040f2c960c0f24800cde93877804798b148f27e30c2f2070000880122c1b264298df8d72008d80721b0f5807f38bf03218df8d7108df8d80040f2d260adf8e000052037ae8df8e200f01d35a90522fef777fc4ff22507c0f247070120092132460c23b8470746fff783b848f2a351c0f24501bff32f8f8847dbf80070bff35f8fdbf800000321cff680710140b1f1005fbff35f8f0bd101684ef66c62ccf2ff02914204d14168b1f57d7f00f0de804ff47d7005f05ffa002800f010814ff60c41cff6ff7142182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ef66c61ccf2ff010160c0f8048080f80ea0a0f8c49180f8c361058445848584c584058545858585c585058645868586c586058745878587c5875be8001fb9427ff452afbff35f8f4be8000100294bd05be8001fb942f7d046e7c146804611980027032838d3301fb0fa80f04009084032d01198109a4cf6cd410338ccf6cc419578a0fb0101b5eb910f88bf8d082e46302d28bf302608f14a00d11c06eb8602fef78dfb002788f8486088f849709db1d8f8440038b9404600f0c1fa0028c8f8440000f0968142f68d41c0f24401a1f1400201219047002742f6f76a0e9cc0f2440ac846fef783bfd0f870110027002900f089804ff400624ff0ff3c0df1dc0e04e033681a44b2f5403f29d28e18b568b7eb552ff5d1ec081ef8044005f0070324fa03f3db071ebf41f82570c6f808c0f760e6e70e9cfef78bbf109fb878fa783b797f7940ea022043ea072232283790389280f09a803220a2e04ff0ff3752e04ff0000c4ff400634ff0000ec0f820c305e077463344b3f5403fbe4642d2cf18ba68ce580132f4d1f418220c022a2fd80a19956801352bd115682e443e6012681444220c022a23d80a19956801351fd115682e443e6012681444220c022a17d80a199568013513d115682e443e6012681444220c022a0bd80a199568013507d115682e443e6012681444b4f5403fcfd3bef1000fc7f804c00cbfc0f82033cef80430b7e7002742f6f76adde90d84c0f2440afef7ecbe1198032840f0e48010994ff4f077487889785a4640ea012600200890cde90600cde90400cde902004ff4a0700190484631464ff42073009707f0dcfe002800f0c3804ff0ff37c3e01198012840f0c08009f57970bff35f8f50e8001f013140e80012002af8d113a94846012207f0fcfe0746ade042f6f76ab0f5fa6f0846c0f2440ab04608d94ff4fa6042f6f76a37900846c0f2440ab0460121054680f8471145f64d50c0f246008047012840f0898043f2a316c0f25606a6f188008047022c074608bf002f01d05fb980e04bf2110237a9c0f24b0202209047002877d00746b047002085f8470172e090f8cd11002918bf05f081fcdbf800000321cff680710140b1f1005fbff35f8f24d101684ef66c62ccf2ff0291421dd14168b1f57d7f19d1d0f8d813b1b14ff00041bff35f8fc0f8d4134af21f30c0f2470000f510674ff4f07001904ff4207400200021002200230094b84795f84701002785f8477158b145f64d50c0f246008047012804d143f2a310c0f256008047d5f8400195f84641c5f83c7185f84671a5f8447150b1b047d5f8400106f166018847002804bf0020c5f840010120a87354b14af27366c0f246060021002200230027b047fef70abe0027fef707be701ca9f88c03002742f6f76ac0f2440afef7fdbd4bf639400027c0f2510088f84870804769e600bf2de9f04f81b04ef66c644ff29c55ccf2ff04c2f229054ff6ff7600274ff0010a47f67f7b4ff07f0807e000bf48f2a351c0f24501bff32f8f8847d5f80090bff35f8f2868bff35f8f01466ff39601b1f1005f07d10168a14204d14168b1f57d7f00f095804ff47d7004f0c0ff002800f08d804ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ff47d710460416080f80ea0a0f8c4b180f8c381068446848684c684068546858685c685068646868686c686068746878687c68755e8001f49457ff45aafbff35f8f45e8000129b155e8001f4945f8d04fe7002001b0bde8f08f70b500284dd001684ef66c62ccf2ff02914218bf70bd90f8481090f849504bf6394c8d42c0f2510c2ad205eb8501014491f84d2091f84e4091f84ae091f84b3091f84c1042ea0424012c4ff0010298bf14466e1c054680f84960b9b164294eea032028bf6421012888bf024644f62060824228bf02460cf5e2731046984706e0002180f84810bde870406047e047686c38b142f64d42c0f244022146bde87040104770bd02464ff64b70cff6ff7042f6653c7844c0f2440c00210023604700bf2de9f04fcdb04ff29c57c2f229073c6840f2030b20464ef66c696ff39600cff6807bccf2ff09b0f1005fbff35f8f40f0e9812068484540f0e5816068b0f57d7f40f0e08194f8710347f64c65c2f2070504f5497628b347f61800c2f20700016d4bf67c52c0f2720291421ad1406cc0b1d4f87c032968401a012802db03f034ff78b93046b8460df0f3f850b142f69570c0f25b0080474746002084f8720384f8710394f8700368b1d4f880032968401a012802db03f018ff20b9002084f8700384f86a013078bff35f8f70b194f86fa3ac46baf1000f00961cd094f8250394f83e13091a18bf012115e094f87103002840f0888194f87003002840f08381d4f88403002800f07e8142f68d41c0f24401884777e1012194f8270394f83133059094f8280394f83d23069094f8265394f82a0394f82b9394f82ce394f82db394f82e8394f82f63934235d194f8302394f83c339a422fd194f83b2396422bd194f83a23904527d194f83923934523d194f8382396451fd194f8372391451bd194f83623904217d194f8292394f835339a4211d194f83423069b93420cd194f83323059b934207d194f83223954203d111b994f82583a9e00023012284f8403384f8433384f8443384f8453384f8463384f8473384f8483384f8493384f84a3384f84b3384f84c3384f84d3384f84e3384f84f3384f8503384f8513384f8523384f8533384f8543384f8553384f8563384f8573384f8583384f8593384f85a3384f85b3384f85c3384f85d3384f85e3384f85f3384f8603384f8613384f8623384f8633384f8643384f8653384f8663384f8673384f8683384f8693384f86a3384f86b3384f86c3384f86d3384f86e3384f83f2384f8415384f84203dcf8002047f61803170a84f8432384f84473170c120e84f846230822c2f2070384f8457384f86f231a6d4bf67c57c0f2720704f22631ba4204f2323a1bd15a6ccab140f6b803c2f200031a689ab1182d00f02984172d40f03584fe2804f2473c0d4600f05684002840f0608400980df074f8294602e0022084f8400350460c22fdf733ff94f8258394f86fa384f83e8345f64d50c0f246008047811eb1fa81f14fea511b012808bf4ff0020bbaf1000f5ad004f23f3007a9049040f261400631c0f2470003910aa9023100254ff00309a0f5b84000240291019015e000bf029807a91a468df828908df82980fdf7fdfe47f00802019ff0200aa90023b8470334e0b25045b1462fd2aaeb0400c7b20420032f28bf4f468df81c0005983a468df81d0006988df81fb08df81e0004988df8204050fa84f103988df821a08df822508df823508df82450fdf7cffeb81dc345c3b24ff00306c2d14ef60b670120f02107aac0f24707c9e7bff35f8f00994ff29c574ef66c6940f2030b0020c2f22907ccf2ff09cff6807b08703d68bff35f8f05ea0b00b0f1005f59d12868484556d16868b0f57d7f52d105f575700021bff35f8f50e8006f40e80012002af9d147f64c60bff35f8fc2f207000468b6f1004f0fd0b84603f04bfd58b1002e00f04d8195f8ec03320a002800f0e38195f8ed13ece195f8ec03e8b147f61800c2f207000068b8b145f60960c2f207000478002040f261430a9007900aa907aac0f247032046984707990a9a43f69b53c0f24e0320469847002085f8ee0385f8ec03d5f8d80320b142f68d41c0f244018847d7f800a0bff35f8f0aea0b00b0f1005f40f00481daf80000484540f0ff80daf80400b0f57d7f40f0f9809af8700338b100208af86801caf864014db0bde8f08f9af86801002800f0d780daf86441002c00f0d28040f6b800c2f20000056807a802f066f9002d00f0d781284621464ff416324e464ff6ff770695fdf70ffe002547f67f744ff07f0806e048f2a351c0f24501bff32f8f88474ff29c50c2f22900d0f80090bff35f8f0068bff35f8f00ea0b01b1f1005f07d10168b14204d14168b1f57d7f00f0b8804ff47d7004f000fc002802f00c814ff60c41cff6ff7100bf42182e3182f8f45382f8f55382f8f65382f8f75382f8f85382f8f95382f8fa5382f8fb5382f8fc5382f8fd5382f8fe5382f8ff5382f8005482f8015482f8025482f8035482f8045482f8055482f8065482f8075482f8085482f8095482f80a5482f80b5482f80c5482f80d5482f80e5482f80f5482f8105482f8115482f8125482f8135482f8145482f8155482f8165482f8175482f8185482f8195482f81a5482f81b5482f81c5482f81d5482f81e5482f81f5482f8205482f82154a0d14ff47d71416001214ff29c5206608173a0f8c44180f8c381078447848784c784078547858785c785078647868786c786078747878787c787c2f2290252e8001f49457ff453afbff35f8f42e8000121b352e8001f4945f8d048e79af86a0170b1daf86c0140b147f64c61c2f207010968401a002802f3848000208af86a0140f6a120c0f2470080474db0bde8f08f95f8ec03002840f0db80e3e6817b002942f05780027f0021002a8df8281000f028824ff29c550aaac2f22905535c002b00f0928253185f78002f00f050829f78002f00f04e82df78002f00f04c821f79002f00f04a825f79002f00f048829f79002f00f04682df79002f00f044821f7a002f00f042825f7a002f00f040829f7a002f00f03e82df7a002f00f03c821f7b002f00f03a825f7b002f00f038829f7b002f00f03682df7b002f00f034821f7c002f00f032825f7c002f00f030829f7c002f00f02e82df7c002f00f02c821f7d002f00f02a825f7d002f00f028829f7d002f00f02682df7d002f00f024821f7e002f00f022825f7e002f00f020829f7e002f00f01e82df7e002f00f01c821f7f002f00f01a825f7f002f00f018829f7f002f00f01682db7f002b00f01482203160297ff47baf33e20120a5f8ec0340f20220a5f8f0030220002185f8ef03c5f8e01302f00103c6f300208b42c6f34b2206d123b395f8f233f7b2bb421fd00ce05bb995f8ef13a5f8ea2385f8f013022185f8f113c5f8dc4311e095f8ef3385f8f03385f8f163a5f8ea23c5f8dc4331b9012185f8ee13c6f34951a5f8e813002804bf002185f8ee1385f8ed0385f8f26395f8ee1341b395f8680160b1d5f8e403bff35f8fb5f8e8136ff39f20884216d195f8ee13c1b195f8ef6340e000208af86801caf864018af86a0101208af8690140f6a120c0f24700804701f06dbf002085f8ee03c5f8dc43d5f8dc13b5f8ea0395f8f163611a814220d28902b1fbf0f04ff4406395f8f01300fb00f2a3eb40005043000d721a00fb02f34ff60c47002b4ff40073cff6ff7748bf07f5fa7310fb0230c21700eb925001eb9026002147f61800c2f207000068e0b1d5f8e003f4b2a0421ad0002040f261430a9007900aa907aac0f247032046984707990a9a43f69b53c0f24e0320469847c5f8e04395f8ee1302e00020c5f8e003d5f8d80385f8ef6311b14ff47a7108e095f8f113f2b28a424ff0280108bf4ff47a7142f68d42c0f24402403a904795f8ee034746c8b13868bff35f8f00ea0b01b1f1005f41f0f8860168494541f0f4864168b1f57d7f41f0ef86002180f86811c0f864114db0bde8f08f95f8ed0300287ff453adf0b20228ddd140f6b800c2f2000001680029d6d001684ff416322139002301f8403f403a01f81f3c01f81e3c01f81d3c01f81c3c01f81b3c01f81a3c01f8193c01f8183c01f8173c01f8163c01f8153c01f8143c01f8133c01f8123c01f8113c01f8103c01f80f3c01f80e3c01f80d3c01f80c3c01f80b3c01f80a3c01f8093c01f8083c01f8073c01f8063c01f8053c01f8043c01f8033c01f8023c01f8013c4b708b70cb700b714b718b71cb710b724b728b72cb720b734b738b73cb730b744b748b74cb740b754b758b75cb750b764b768b76cb760b774b778b77cb7781f820309cd100684ef217310a904ff416300b900aa8c0f247018847474661e700980d460cf0bafd10b302304ff0030008bf022084f840032946fff7dcbb84f87003dcf800204ef660231a44c4f88023b8b100980d460cf07fff0cf053ff294660b9fff7c8bb4ff29c55c2f2290595e00cf048ff002829463ff4bdab0320fff7b8bb002084f86a01fff7b5bb18684a4600eb0b20704400eb084000eb06616046fdf7e0fa0ee04eea0b2141ea084141ea066361464a460cf047fd00281cbf032084f8400309f1080084f86f032946fff792bb01313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2921d84ff0520353541dd00a4445235e29537018d04f235d29937014d052235c29d37010d044235b2913710cd045235a29537108d052235929937104d020235829d37141f0c48200218df887100121427f002a00f0c28000220aab9f5c002f00f0a0809f187e78002e5ed0be78002e5dd0fe78002e5cd03e79002e5bd07e79002e5ad0be79002e59d0fe79002e58d03e7a002e57d07e7a002e56d0be7a002e55d0fe7a002e54d03e7b002e53d07e7b002e52d0be7b002e51d0fe7b002e50d03e7c002e4fd07e7c002e4ed0be7c002e4dd0fe7c002e4cd03e7d002e4bd07e7d002e4ad0be7d002e49d0fe7d002e48d03e7e002e47d07e7e002e46d0be7e002e45d0fe7e002e44d03e7f002e43d07e7f002e42d0be7f002e41d0ff7f002f40d02032602a7ff49aaf54e001323ae0023238e0033236e0043234e0053232e0063230e007322ee008322ce009322ae00a3228e00b3226e00c3224e00d3222e00e3220e00f321ee010321ce011321ae0123218e0133216e0143214e0153212e0163210e017320ee018320ce019320ae01a3208e01b3206e01c3204e01d3202e01e3200e01f325f2a15d84ff053079f5411d013444b275e2a5f700cd049275d2a9f7008d050275c2adf7004d020275b2a1f7140f0f08100228df887200131827f002a00f0be8000210aaa535c002b00f0a08053185f78002f5ed09f78002f5dd0df78002f5cd01f79002f5bd05f79002f5ad09f79002f59d0df79002f58d01f7a002f57d05f7a002f56d09f7a002f55d0df7a002f54d01f7b002f53d05f7b002f52d09f7b002f51d0df7b002f50d01f7c002f4fd05f7c002f4ed09f7c002f4dd0df7c002f4cd01f7d002f4bd05f7d002f4ad09f7d002f49d0df7d002f48d01f7e002f47d05f7e002f46d09f7e002f45d0df7e002f44d01f7f002f43d05f7f002f42d09f7f002f41d0db7f002b40d0203160297ff49aaf50e001313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2911d84ff0440353540dd00a4455235e29537008d050235d29937004d020235c29d37040f0098100218df8871001216a6846f23f53c5f28803b3eb520f40f08b80d20700f08d8000210aaa535c002b00f0858153185f78002f00f0f9809f78002f00f0f980df78002f00f0f9801f79002f00f0f9805f79002f00f0f9809f79002f00f0f980df79002f00f0f9801f7a002f00f0fc805f7a002f00f0fc809f7a002f00f0fc80df7a002f00f0fc801f7b002f00f0fc805f7b002f00f0fc809f7b002f00f0fc80df7b002f00f0fc801f7c002f00f0fc805f7c002f00f0fc809f7c002f00f0fc80df7c002f00f0fc801f7d002f00f0fc805f7d002f00f0fc809f7d002f00f0fc80df7d002f00f0fc801f7e002f00f0fc805f7e002f00f0fc809f7e002f00f0fc80df7e002f00f0fc801f7f002f00f00d815f7f002f00f00b819f7f002f00f00981db7f002b00f00781203160297ff47baf1de14cf67e22caf210126a60002940f0198100210aaa535c002b00f0dc8053185f78002f61d09f78002f60d0df78002f5fd01f79002f5ed05f79002f5fd09f79002f60d0df79002f61d01f7a002f62d05f7a002f63d09f7a002f64d0df7a002f68d01f7b002f69d05f7b002f6ad09f7b002f6bd0df7b002f6cd01f7c002f6dd05f7c002f6ed09f7c002f6fd0df7c002f70d01f7d002f71d05f7d002f72d09f7d002f73d0df7d002f74d01f7e002f75d05f7e002f76d09f7e002f77d0df7e002f78d01f7f002f79d05f7f002f7ad09f7f002f7bd0db7f002b7cd0203160297ff49aaface000211171f6e6013173e0023171e003316fe004316de0013184e0053169e0023180e0063165e003317ce0073161e0043178e008315de0053174e0093159e0063170e00a3155e007316ce000225a710fe60b314ee0083165e00c314ae0093161e00d3146e00a315de00e3142e00b3159e00f313ee00c3155e010313ae00d3151e0113136e00e314de0123132e00f3149e013312ee0103145e014312ae0113141e0153126e012313de0163122e0133139e017311ee0143135e018311ae0153131e0193116e016312de01a3112e0173129e01b310ee0183125e01c310ae0193121e01d3106e01a311de01e3102e01b3119e01f315f2931d84ff04f0353542dd00a444b235e29537028d020235d29937024d00021d17024e01c3104e01d3102e01e3100e01f315f2918d84ff04103535414d00a444c235e2953700fd05d2993700cd04f235c29d37008d043235b29137104d020235a29537140f0828700218df8871000220aafb95c002900f0a080bb18597800295ed0997800295dd0d97800295cd0197900295bd0597900295ad09979002959d0d979002958d0197a002957d0597a002956d0997a002955d0d97a002954d0197b002953d0597b002952d0997b002951d0d97b002950d0197c00294fd0597c00294ed0997c00294dd0d97c00294cd0197d00294bd0597d00294ad0997d002949d0d97d002948d0197e002947d0597e002946d0997e002945d0d97e002944d0197f002943d0597f002942d0997f002941d0d97f002940d02032602a7ff49aaf42e001323ae0023238e0033236e0043234e0053232e0063230e007322ee008322ce009322ae00a3228e00b3226e00c3224e00d3222e00e3220e00f321ee010321ce011321ae0123218e0133216e0143214e0153212e0163210e017320ee018320ce019320ae01a3208e01b3206e01c3204e01d3202e01e3200e01f325f2a03d84ff07701b95403d100218df8871002e0b91800224a7004694ff0000917f80910002900f0c48007eb09025178002962d09178002962d0d178002962d01179002962d05179002962d09179002962d0d179002962d0117a002962d0517a002962d0917a002962d0d17a002962d0117b002962d0517b002962d0917b002962d0d17b002962d0117c002962d0517c002962d0917c002962d0d17c002962d0117d002962d0517d002962d0917d002962d0d17d002962d0117e002962d0517e002962d0917e002962d0d17e002962d0117f002962d0517f002962d0917f002962d0d17f002962d009f12009b9f1600f7ff496af4ff060095be009f1010958e009f1020955e009f1030952e009f104094fe009f105094ce009f1060949e009f1070946e009f1080943e009f1090940e009f10a093de009f10b093ae009f10c0937e009f10d0934e009f10e0931e009f10f092ee009f110092be009f1110928e009f1120925e009f1130922e009f114091fe009f115091ce009f1160919e009f1170916e009f1180913e009f1190910e009f11a090de009f11b090ae009f11c0907e009f11d0904e009f11e0901e009f11f0901250a2c1ed364214ff47a7242f2107305eb85077f00b4fbf7f60a2e11d305fb01f7b4fbf7f60a2e0bd305fb02f7b4fbf7f60a2e05d35d43b4fbf5f7092fe7d800e03d464946b9f15f0f98bf5f21c1f1000e05911eeb090b54d0b4fbf5f30aa903f1300201f809204cf6cd41ccf6cc410a2da5fb017248d31bf1010742d003fb154cd608bcfbf6f80aa901eb090448f21f5108f13002c5f2eb116270642da5fb013235d31bf102032cd008fb16c65309b6fbf3f244f6d35102f13007c1f26201a770b5f57a7fa5fb011724d31bf1030118d002fb1361ba0941f25977b1fbf2f3cdf2b717a5fb077603f13007e77003fb121442f2107109f104098d424fea5635a8d20ae0ddf8149007e009f1010904e009f1020901e009f1030900240aab03f80940195d002900f0a0801f19797800295ed0b97800295dd0f97800295cd0397900295bd0797900295ad0b979002959d0f979002958d0397a002957d0797a002956d0b97a002955d0f97a002954d0397b002953d0797b002952d0b97b002951d0f97b002950d0397c00294fd0797c00294ed0b97c00294dd0f97c00294cd0397d00294bd0797d00294ad0b97d002949d0f97d002948d0397e002947d0797e002946d0b97e002945d0f97e002944d0397f002943d0797f002942d0b97f002941d0f97f002940d02034602c7ff49aaf50e001343ae0023438e0033436e0043434e0053432e0063430e007342ee008342ce009342ae00a3428e00b3426e00c3424e00d3422e00e3420e00f341ee010341ce011341ae0123418e0133416e0143414e0153412e0163410e017340ee018340ce019340ae01a3408e01b3406e01c3404e01d3402e01e3400e01f345f2c11d84ff0750119550dd0191973225e2c4a7008d020225d2c8a7004d070225c2cca7040f09d8000218df8871044694ff0000e13f80e10002900f0c78003eb0e056978002962d0a978002962d0e978002962d02979002962d06979002962d0a979002962d0e979002962d0297a002962d0697a002962d0a97a002962d0e97a002962d0297b002962d0697b002962d0a97b002962d0e97b002965d0297c002965d0697c002965d0a97c002965d0e97c002965d0297d002965d0697d002965d0a97d002965d0e97d002965d0297e002965d0697e002965d0a97e002965d0e97e002965d0297f002965d0697f002965d0a97f002965d0e97f002965d00ef1200ebef1600f7ff496af4ff0600e5ee00ef1010e5be00ef1020e58e00ef1030e55e00ef1040e52e00ef1050e4fe00ef1060e4ce00ef1070e49e00ef1080e46e00ef1090e43e00ef10a0e40e00ef10b0e3de00ef10c0e3ae00ef10d0e37e00ef10e0e34e000220a7162e70ef10f0e2ee00ef1100e2be00ef1110e28e00ef1120e25e00ef1130e22e00ef1140e1fe00ef1150e1ce00ef1160e19e00ef1170e16e00ef1180e13e00ef1190e10e00ef11a0e0de00ef11b0e0ae00ef11c0e07e00ef11d0e04e00ef11e0e01e00ef11f0e01250a2c1ed364214ff47a7242f2107305eb85077f00b4fbf7f60a2e11d305fb01f7b4fbf7f60a2e0bd305fb02f7b4fbf7f60a2e05d35d43b4fbf5f7092fe7d800e03d46f446bef15f0f98bf4ff05f0cccf1000842f2107b18eb0e0952d0b4fbf5f20aa902f1300301f80e304cf6cd41ccf6cc410a2da5fb016345d319f1010640d002fb1546db08b6fbf3f20aa901eb0e0448f21f5102f13007c5f2eb116770642da5fb011732d319f102012ad002fb13637a09b3fbf2f6b5f57a7f06f13001a17044f6d351c1f26201a5fb011721d319f1030116d006fb1231ba0941f25976b1fbf2f3cdf2b716a5fb066703f13006e67003fb12140ef1040e5d454fea5735aad209e0e64607e00ef1010e04e00ef1020e01e00ef1030e00240df1280b0bf80e401bf80410002900f0a1800beb0405697800295ed0a97800295dd0e97800295cd0297900295bd0697900295ad0a979002959d0e979002958d0297a002957d0697a002956d0a97a002955d0e97a002954d0297b002953d0697b002952d0a97b002951d0e97b002950d0297c00294fd0697c00294ed0a97c00294dd0e97c00294cd0297d00294bd0697d00294ad0a97d002949d0e97d002948d0297e002947d0697e002946d0a97e002945d0e97e002944d0297f002943d0697f002942d0a97f002941d0e97f002940d02034602c7ff498af5ee001343ae0023438e0033436e0043434e0053432e0063430e007342ee008342ce009342ae00a3428e00b3426e00c3424e00d3422e00e3420e00f341ee010341ce011341ae0123418e0133416e0143414e0153412e0163410e017340ee018340ce019340ae01a3408e01b3406e01c3404e01d3402e01e3400e01f345f2c1fd84ff075010bf804101ad00beb040173225e2c4a7014d020225d2c8a7010d074225c2cca700cd031225b2c0a7108d030225a2c4a7104d02022592c8a7140f0898200218df88710d0f8cc734ff000091bf80910002900f0c4800beb09046178002962d0a178002962d0e178002962d02179002962d06179002962d0a179002962d0e179002962d0217a002962d0617a002962d0a17a002962d0e17a002962d0217b002962d0617b002962d0a17b002962d0e17b002962d0217c002962d0617c002962d0a17c002962d0e17c002962d0217d002962d0617d002962d0a17d002962d0e17d002962d0217e002962d0617e002962d0a17e002962d0e17e002962d0217f002962d0617f002962d0a17f002962d0e17f002962d009f12009b9f1600f7ff496af4ff060095be009f1010958e009f1020955e009f1030952e009f104094fe009f105094ce009f1060949e009f1070946e009f1080943e009f1090940e009f10a093de009f10b093ae009f10c0937e009f10d0934e009f10e0931e009f10f092ee009f110092be009f1110928e009f1120925e009f1130922e009f114091fe009f115091ce009f1160919e009f1170916e009f1180913e009f1190910e009f11a090de009f11b090ae009f11c0907e009f11d0904e009f11e0901e009f11f0901240a2f1ed364214ff47a7242f2107304eb84067600b7fbf6f50a2d11d304fb01f6b7fbf6f50a2d0bd304fb02f6b7fbf6f50a2d05d35c43b7fbf4f6092ee7d800e03446c846b9f15f0f98bf4ff05f08c8f1000e42f2107c1eeb09054dd0b7fbf4f14cf6cd4001f13002ccf6cc400bf809200a2ca4fb002341d36a1c3dd001fb1476d908b6fbf1f348f21f5003f130020beb0907c5f2eb107a70642ca4fb000230d3a81c29d003fb11615309b1fbf3f6b4f57a7f06f13000b87044f6d350c1f26200a4fb000220d3e81c16d006fb1310910941f25973b0fbf1f2cdf2b713a4fb033502f13003fb7002fb110709f1040964454fea5534afd209e0c14607e009f1010904e009f1020901e009f10309069d40f6b8060022c2f200060bf809201bf80200002800f0a1800beb0200417800295ed0817800295dd0c17800295cd0017900295bd0417900295ad08179002959d0c179002958d0017a002957d0417a002956d0817a002955d0c17a002954d0017b002953d0417b002952d0817b002951d0c17b002950d0017c00294fd0417c00294ed0817c00294dd0c17c00294cd0017d00294bd0417d00294ad0817d002949d0c17d002948d0017e002947d0417e002946d0817e002945d0c17e002944d0017f002943d0417f002942d0817f002941d0c07f002840d02032602a7ff498af49e001323ae0023238e0033236e0043234e0053232e0063230e007322ee008322ce009322ae00a3228e00b3226e00c3224e00d3222e00e3220e00f321ee010321ce011321ae0123218e0133216e0143214e0153212e0163210e017320ee018320ce019320ae01a3208e01b3206e01c3204e01d3202e01e3200e01f325f2a0ad84ff075000bf8020005d00beb020073215e2a41705dd100208df887000aaf42f2941845f29c14284602213a46c2f22008c2f213040bf06bfd00208df8280038460bf0e3fe28460e213a460bf060fd4ff6a420cff6ff703058a0426ad14ff6b020cff6ff703058b0f54d2f62d14ff6b420cff6ff703058a0425bd145f610634ff0000ec2f213034cf6394408f1040c00274ff0ff3263454cd8186830f003051bd0984528bf0c2846d3a8eb03018d424ff0ff3142d8bd42394688bf2946c00703eb05001cbf0f46ae44013c00f10403e1d12fe000218170a1e70421b7f5807f21d300223d46b5f5007f17d3b5f5806f16d3b5f5006f15d30901b2eb153f4fea1515f0d10fe00022ca7176e500219171fff77db800211172fef73bbd490002e0890000e0c900634504d1484207ea0002714603e04ff0ff324ff0ff3147f64c60c2f20700d0f8840008f1080342f6941c9842c2f2270c4dd142f610674ff0000bc2f2200746f6b9700cf1040e00244ff0ff384ff0ff3977453cd83e6836f0030515d0bc4528bf0c2e36d3aceb07039d4234d82346a54288bf2b46f6071cbf1c46ab447b19013803f10407e4d122e00420b4f5807f17d34ff000082546b5f5007f0cd3b5f5806f0bd3b5f5006f0ad30001b8eb153f4fea1515f0d104e0400002e0800000e0c000774504d1404204ea0008d94603e04ff0ff384ff0ff394ff6882040f6b807cff6ff70c2f200073b580cf10800834264d14ff69423cff6ff73fb58b3f5333f5cd14ff69823cff6ff73fb58834255d14ff29c5043f21063c2f229004ff0000bc2f2270342f6f935a0f1040ca0f1080e0024634542d81e6836f003071ad09e454ff0ff30059028bf0c2e3ad3aeeb030087424ff0ff3034d82046a74288bf3846f6071cbf0446bb44d819013d00f10403dfd123e00427b4f5807f17d34ff0000e2546b5f5007f0cd3b5f5806f0bd3b5f5006f0ad33f01beeb153f4fea1515f0d104e07f0002e0bf0000e0ff00634505d17b4204ea03000590584602e04ff0ff300590064666208df8280072208df8290065208df82a008df82b002f208df82c006d204b238df82d0061208df8313069238df82e0078208df83230422356278df82f0020208df833303a238df8377047270aac8df830008df834308df835004c238df838708df83a00002720468df836308df839308df83b700bf0a2fe069de05d002800f0a080e019417800295ed0817800295dd0c17800295cd0017900295bd0417900295ad08179002959d0c179002958d0017a002957d0417a002956d0817a002955d0c17a002954d0017b002953d0417b002952d0817b002951d0c17b002950d0017c00294fd0417c00294ed0817c00294dd0c17c00294cd0017d00294bd0417d00294ad0817d002949d0c17d002948d0017e002947d0417e002946d0817e002945d0c17e002944d0017f002943d0417f002942d0817f002941d0c07f002840d02037602f7ff49aaf64e001373ae0023738e0033736e0043734e0053732e0063730e007372ee008372ce009372ae00a3728e00b3726e00c3724e00d3722e00e3720e00f371ee010371ce011371ae0123718e0133716e0143714e0153712e0163710e017370ee018370ce019370ae01a3708e01b3706e01c3704e01d3702e01e3700e01f375f2f25d84ff02000e05521d0e01945215e2f41701cd076215d2f817018d065215c2fc17014d06e215b2f017110d048215a2f41710cd07521592f817108d06221582fc17104d02021572f017240f0f88000208df887002046494642460bf0cdfd0020215c002900f0a08021184a78002a5ed08a78002a5dd0ca78002a5cd00a79002a5bd04a79002a5ad08a79002a59d0ca79002a58d00a7a002a57d04a7a002a56d08a7a002a55d0ca7a002a54d00a7b002a53d04a7b002a52d08a7b002a51d0ca7b002a50d00a7c002a4fd04a7c002a4ed08a7c002a4dd0ca7c002a4cd00a7d002a4bd04a7d002a4ad08a7d002a49d0ca7d002a48d00a7e002a47d04a7e002a46d08a7e002a45d0ca7e002a44d00a7f002a43d04a7f002a42d08a7f002a41d0c97f002940d0203060287ff49aaf5be001303ae0023038e0033036e0043034e0053032e0063030e007302ee008302ce009302ae00a3028e00b3026e00c3024e00d3022e00e3020e00f301ee010301ce011301ae0123018e0133016e0143014e0153012e0163010e017300ee018300ce019300ae01a3008e01b3006e01c3004e01d3002e01e3000e01f305f281cd84ff02001215418d021184f225e284a7013d074225d288a700fd068225c28ca700bd065225b280a7107d072225a284a7103d0202259288a7128d100208df887000aac059a204631460bf000fd28461a2122460bf031fa00208af86801caf8640106984ef217310a904ff416300b900aa8c0f24701884701208af86a0107a800f031f9caf814004db0bde8f08f0020c871d6e70021417207e72de9f04f81b0009041f204024cf65560cef20002ccf2ac50c2f8ac0f4ef6fc50cef2000001684ef66c6641f08071016052f8040c4ff29c57ccf2ff06c2f229074ff6ff7440f0010000254ff0010847f67f794ff07f0a42f8040c06e048f2a351c0f24501bff32f8f8847d7f800b0bff35f8f3868bff35f8f01466ff39601b1f1005f07d10168b14204d14168b1f57d7f00f094804ff47d7002f082fa002800f0ca804ff60c41cff6ff7100bf42182e3182f8f45382f8f55382f8f65382f8f75382f8f85382f8f95382f8fa5382f8fb5382f8fc5382f8fd5382f8fe5382f8ff5382f8005482f8015482f8025482f8035482f8045482f8055482f8065482f8075482f8085482f8095482f80a5482f80b5482f80c5482f80d5482f80e5482f80f5482f8105482f8115482f8125482f8135482f8145482f8155482f8165482f8175482f8185482f8195482f81a5482f81b5482f81c5482f81d5482f81e5482f81f5482f8205482f82154a0d14ff47d710660416080f80e80a0f8c49180f8c3a1048444848484c484048544858485c485048644868486c486048744878487c48757e8001f59457ff45aafbff35f8f47e8000121b157e8001f5945f8d04fe78169d1bb47f64c6245f6e466c2f20702cff6f8761368314617689f420ed117689f420bd117689f4208d117689f4203d1002901f10401efd19f421ed041f20401cef200010b6817681168b9420ed11168b9420bd11168b94208d11168b94203d1002e06f10406efd1b94206d041f20401cef200010968c91a816141f20400cef2000000680099086001b0bde8f08f00bf2de9f04f83b041f20401cef200014ef66c674ff29c5609680068ccf2ff07c2f229064ff6ff744ff000084ff0010947f67f7a4ff07f0b0291019006e048f2a351c0f24501bff32f8f88473568bff35f8f3068bff35f8f01466ff39601b1f1005f07d10168b94204d14168b1f57d7f00f093804ff47d7002f06df9002800f0e7804ff60c41cff6ff7142182e3182f8f48382f8f58382f8f68382f8f78382f8f88382f8f98382f8fa8382f8fb8382f8fc8382f8fd8382f8fe8382f8ff8382f8008482f8018482f8028482f8038482f8048482f8058482f8068482f8078482f8088482f8098482f80a8482f80b8482f80c8482f80d8482f80e8482f80f8482f8108482f8118482f8128482f8138482f8148482f8158482f8168482f8178482f8188482f8198482f81a8482f81b8482f81c8482f81d8482f81e8482f81f8482f8208482f82184a0d14ff47d710760416080f80e90a0f8c4a180f8c3b1048444848484c484048544858485c485048644868486c486048744878487c48756e8001fa9427ff45cafbff35f8f46e8000121b156e8001fa942f8d051e7816961b144f6d350c1f26200a1fb0001880901284ff0010088bf88094ce047f64c6245f6e466c2f20702cff6f8761368314600bf17689f420ed117689f420bd117689f4208d117689f4203d1002901f10401efd19f422ed041f20401cef200010b6817681168b9420ed11168b9420bd11168b94208d11168b94203d1002e06f10406efd1b94216d041f20401cef20001096844f6d357ca1ac1f26207a2fb07768261b00901284ff0010088bfb009994208bffa2000e0fa20dde90121891ab1fbf0f003b0bde8f08f2ab1a2fb0103002b1cbf0020704702fb01f0ffe7b0b54ff2a054c2f229040146206846f23f52c5f28802b2eb500f40f258304df681124cf67e25c2f20000c0f24802caf2101518bf25609047002804bf691c2160b0bd00bf0846ffe7014640f258304df69f22c2f20000c0f248021047002855d1002953d0082a51d30b78aa2b4ed18b79f02b4bd12de9f04182b045f64d550b2ac0f2460547d3c878a2f10803834242d14878212841d1087901283ed1487901283bd1c879c8bb0c4614f8080f10f03c0f33d18818884610f8021c10f8010c164641ea0027a2f10a0081b220460af0faf8874222d1a847811eb1fa81f14f09012808bf0227002f4ad0207887f00301084247d0012039464246334600f07ff90446002898f8080018bf06243be04ff27143c0f24c0318470b2400e00a24a847811eb1fa81f14e09012808bf02261eb3304600f090f8f8b10546407ce0b10027284631463246032300970af074f9686840b14bf69b71c0f25d0188476868fff774ff6f602868af75002818bffff76dff00202860a8602882204602b0bde8f0810624f9e700243842f6d0404631463a463b4600f056f9002818bf0446ece70b291dd3c278a1f10803934218d10278aa2a13d14278212a10d10279012a0dd14279012a0ad18279f02a07d1c2792ab9024612f8083f13f03c0f03d00a2070470b20704710b5084410f8023c10f8010c43ea0024a1f10a0081b210460af064f8201a18bf0a2010bd002808bf7047b0b582b00446407cd0b100252046032300950af00af9606840b14bf69b71c0f25d0188476068fff70aff65602068a575002818bffff703ff00202060a060208202b0bde8b040704700bf2de9f04f81b04ef66c654ff29c56ccf2ff05c2f229064ff6ff7700244ff0010b47f67f784ff07f09009006e048f2a351c0f24501bff32f8f8847d6f800a0bff35f8f3068bff35f8f01466ff39601b1f1005f07d10168a94204d14168b1f57d7f00f095804ff47d7001f010ff002800f08d804ff60c41cff6ff7100bf42182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d710560416080f80eb0a0f8c48180f8c391078447848784c784078547858785c785078647868786c786078747878787c78756e8001f51457ff45aafbff35f8f46e8000129b156e8001f5145f8d04fe700200099002801eb410100eb011118bf01f51b7001b0bde8f08f00bfb0b5c4b0dc08202c03d94ff0ff3044b0b0bd0df107048df807008df80810a01c11461a461d46fbf743f8a81c4af6610582b2c0f24605f02021460023a84744b0b0bd00bf2de9f04f89b0064618469a4617468946fff700ff002800f09983044696f908000796b0f1ff3f00f003050add264616f8110f00283fd12068002818bffff7e4fd2de3207c10b3607c00b34ff000082046394652460323cdf8008009f0cbff606848b14bf69b71c0f25d0188476068fff7cbfdc4f80480206884f81680002818bffff7c2fd00202060a06020822068002818bffff7b9fd4ff480710020218207992060a0608978a081092004f11106e174a174257560760799a07c8978884240f0d382217da94240f0cf82411ca9f10b00627e01961e2828bf1e209042a17488bf6076a9f10200039787b20a2f4ff00005c0f0db82092241f2210809200497cdf808a017e02068049f002818bffff77cfda089002d00f10100069d26602674a660a08118bf0625059e06eb0b0082b2ba4280f0bb82217c80b20429064600f28080079b461c9a5c4b1c0129237405dd022906d0032968d1e28106e021b9627503e0238943ea02222281be4280f09e82042966d0079a831c925d8f1c0129277406dd049fff290bd003290bd11e464ce000291cbf278947ea0222049f228102e0627500e0e281bb4280f08082022935d8079ac61cd25ccb1c0129237405dd022933d0fe2905d1627506e021b9238943ea0222228100e0e281be4280f0678202292fd0079a031d925d41f00407fc2927740add049ffd290cd0fe2903d0278947ea0222049f228105e0049f0029bed1e28100e06275bb4280f0498209b11e4610e0461d0798c25c05202074e189208941ea0221e18128b1fff7c4fc0028206000f06682b4f808906089a9eb00011ffa81fbb1b27a1a5a45b8bf93465fea0b420ad022681044079a11441ffa8bf2faf7fffe6089b4f80890584481b2494560817ff454afd4f800a0607dbaf1000f05964ff000060df1230108bf8a460f288df8236006d8217d00f00302511ab1fa81f14e0900074ff0000706d4217e607e814238bf20760fe000bf606840b14bf69b71c0f25d0188476068fff798fc6760607e20760120e0820695a6b1607da67d400715d4002e4ff0000500f089811ffa89f100294ff6ff7300f00a8101295cd10020cfe000bf607d400750d4002577e14ff48030fff74ffc002e824600f06f81a07d002800f06b81baf1000f00f067816668002e00f0fb8020890428c0f05f8121680a1812f8043c002b40f0588112f8033c002b40f0538112f8023cff2b40f04e8112f8012cff2a40f049814ff4803531607060c6f80ca03561002800f0648107464bf69b70c0f25d0000f5857230460021904740b9316931b170688d420d46ebd187420d46e8d15546002728e14ff48030fff700fc054622e14ff6fe7000ea0900ac4642426ff001000aeb0007be78ff7883ea06231eb25d002db208ead63686ea430308ead5355e0085ea430336b25d002db208ead63686ea430308ead5355e0085ea430336b25d002db208ead63686ea430308ead5355e0085ea430336b25d002db208ead63686ea430308ead53686ea430383ea07231fb25e0036b208ead73787ea430308ead6365f0086ea43033fb25e0036b208ead73787ea430308ead6365f0086ea43033fb25e0036b208ead73787ea430308ead6365f0086ea43033fb25e0036b208ead737023087ea430308ead6371618023687ea430395d10230002765465feac97232d01af8000083ea002002b243001bb208ead23282ea400008ead333420083ea400012b243001bb208ead23282ea400008ead333420083ea400012b243001bb208ead23282ea400008ead333420083ea400012b243001bb208ead23282ea400008ead33282ea4003e0899ab2824273d15046ddf808a05346faf7b5fe00286bd10026012378e03820fff741fb002862d00646077047708770c770077147718771c771077247728772c772077347738773c773077447748774c774077547758775c775077647768776c776077747778777c77780f8287080f8297080f82a7080f82b7080f82c7080f82d7080f82e7080f82f7080f8307080f8317080f8327080f8337080f8347080f8357080f8367080f837704ff2dd50cff6ff70784430624ff22960cff6ff70784470624bf69b70c0f25d0045f6e46200f13c0730460f21c0f27c0238230025b84738b33046fff703fb2f46554600e05546606840b14bf69b71c0f25d0188476068fff7f5fa6760ddf808a000260323a77503991ffa89f720465246009709f0ddfc002d294605463ff460ad0846fff7dffa5be50027666077e6c5f580390027b5f5803f55463760f7607ff649aed0e700252046394652460323009509f0befc606840b14bf69b71c0f25d0188476068fff7befa65602068a575002818bffff7b7fa0020307000202060a06020820a2551e00798007a40064dd5207c00b301980078e0b103990025204652460323009509f094fc606840b14bf69b71c0f25d0188476068fff794fa65602068a575002818bffff78dfa00202060a06020820b252068002818bffff783fa00202060a060208220e001980078e0b103990025204652460323009509f069fc606840b14bf69b71c0f25d0188476068fff769fa65602068a575002818bffff762fa00202060a06020820625284609b0bde8f08f00bf2de9f041f0284bd100294ff00b0000f07f80022a7cd345f64d50c0f246000e4617468047811eb1fa81f14c09012808bf0224002c4ff00a006ad07578e91ec9b2fe2938bfbde8f081307833463946032860d002282dd001281cbf0a20bde8f081ac4204bf0020bde8f0814808842884bf0b20bde8f081881e03f1020887b240463946fff7bffa002869d006462846fff715fb21462a46fff7e9fa3046bde8f08145f64d57c0f2460707f5e27cbde8f0416047ac421cbf0020bde8f081a1f1210010f1160f48d36ff0480048432330c0b2242841d81a4612f8020f40f00207032f4bd19b796340032b47d10b2904d0032804bf0b20bde8f081881e4ef60b6783b2c0f247070120f021b847002818bf0620bde8f081ac422dd1a1f10c0010f1030f1ad31a4612f8020f042815d158796040032811d1d879a0f1310717f1300f0bd39b79984208d9a1f10807c01a874284bf0b20bde8f081cfe70b20bde8f081b07a204207d04046394622462b46bde8f041fff79abb0020bde8f0810a20bde8f08140f20d00c0f2000042f6653c7844c0f2440c012100220023604700bf80b582b04ff4f0704af61f4e01904ff4207cc0f2470e0020002100220023cdf800c0f04702b080bd4ff29c51c2f229010968bff35f8f0a466ff39602b2f1005f19d10a684ef66c63ccf2ff039a4212d14a68b2f57d7f0ed1d1f86c1159b147f64c62c2f207021268891a012903db0178042938bf7047002101707047b0b541f23154c0f252041d46a0474ff29c51c2f229010968bff35f8f0a466ff39602b2f1005f0cd10a684ef66c63ccf2ff039a4205d14a68b2f57d7f18bf002100e00021421c18bf002900d1b0bd95f84d20002afad091f84721002a08bfb0bd46f25863c2f206031a68132aeed8c2ebc20403eb04135b6801ebc2014ff40042c1f8e431a1f8ea212a7a01f5f271002a0fbf802248f20112ca808122ab7c33b1ab7d23b1022342f002028b71ca7195f820303bb195f8243023b1032342f004028b71ca7195f846304bb195f8443042f008020b7195f84530ca714b71b0bd48f27342c2f207021378002b14bf9378ff230b711378002b14bf5278ff224a71b0bdf0b589b048f66502c0f24b020c46054690474ff29c51c2f229010e68bff35f8f31466ff39601b1f1005f0cd131684ef66c62ccf2ff02914205d17168b1f57d7f08bf092d01d009b0f0bde1082c29fad896f847110029f6d045f64d51c0f2460107468847014638460129ecd1ff22079244f6435246f258610020cff60172c2f20601089006920b685a1e132a4fd8c3ebc30501eb05111a1fa1f5de7191f85451ad0618d4d51c42d091f8e450ad0616d4951c3cd091f87450ad0613d4551c36d00d79ad0610d4043aa1f5e071151da3f10403e3d12be05a1e01f5a87104e09a1ee03101e0da1e703106ebc203096893f9eb21b2f1ff3f1adc03f5f2731e688e4215d11e798df81b605e798df81c609b798df81e200a0a8df820108df821200a0c090e8df81d308df822208df823100f228df8012010228df80220522208218df80420b4f5804f4ff080028df800108df8061038bf4ff48042b4f5001f6ff07f0604f07f0138bf0026802c28bf80318df807109df809509df80a108df8030004d29df808200223002415e0c4f3c610b4f5804f024403d20323012400200be0b4f5001f03d204230224012003e0052303240120002135468df8053004f108038df808208df809508df80a1070b96846a222c118c254062048700c208870c81c06a90c22faf70bfa04f117034ff225066a46c0f2470601200821b047384609b0f0bd70b582b00546ff208df8040044f25220c0f20100009040f2c960c0f2480016460c46804798b148f27e30c2f2070000880122c1b264298df8032008d80721b0f5807f38bf03218df803108df80400301b28bf08280cd3d221281929550621417005218170033069460522faf7c7f90834204602b070bd00bf024600284ff0ff3009d0022918bf70471078112801d1507810b14ff0ff30704710b586b045f64d50c0f24600804701284ff000003ed1cde9020040f20830c0f210000190ff208df8140044f25220c0f20100049040f2c960c0f24800804798b148f27e30c2f2070000880122c1b264298df8132008d80721b0f5807f38bf03218df813108df8140040f2d260adf80800052001ac8df80a00e01d04a90522faf771f94ff2250cc0f2470c0120092122460c23e04706b010bd4ff29c50c2f22900016808466ff39600b0f1005f1ad108684ef66c62ccf2ff02904213d14868b0f57d7f0fd1d1f83c0160b147f64c62c2f207021268801a0028cebf01200020c1f83c017047002070474ff29c50c2f22900026810466ff39600b0f1005f32d110684ef66c61ccf2ff0188422bd15068b0f57d7f27d1d2f86c0120b347f64c61c2f207010968401a0028c4bf01207047d2f8701100200029c2f86c0182f86a01c2f87001c2f82003a2f88c0308bf704780b548f2a352c0f24502084690470020bde88040704700207047f0b101684ef66c62ccf2ff02914218bf704790f8461199b110b54af273644ff0000cc0f24604864680f846c10120002100220023aef844c1a446bde810406047704700bf02464ff6ab70cff6ff7042f6653c7844c0f2440c00210023604700bf70b5002866d0044600796179a279e37940ea012040ea024050ea036007d00e2803d0032856d1032502e0042500e00225fff74eff00284dd04ff29c50c2f22900066830466ff39600b0f1005f42d130684ef66c61ccf2ff0188423bd17068b0f57d7f18bf70bd45f64d50a478c0f24600804701282ed1082086f88402032086f88502102086f88602b22086f88802062086f8890286f88a02462086f88b0243204ff0000e86f88c0201204ef6057c06f5217286f887e286f88d0286f88e5286f88f42c0f2470c09210d2386f890e2bde87040604770bd00bf2de9f04f81b04ef66c6a4ff29c560446ccf2ff0ac2f229064ff6ff77002547f67f784ff07f0906e048f2a351c0f24501bff32f8f8847d6f800b0bff35f8f3068bff35f8f01466ff39601b1f1005f07d10168514504d14168b1f57d7f00f096804ff47d7000f048fe002800f0bb804ff60c41cff6ff7100bf42182e3182f8f45382f8f55382f8f65382f8f75382f8f85382f8f95382f8fa5382f8fb5382f8fc5382f8fd5382f8fe5382f8ff5382f8005482f8015482f8025482f8035482f8045482f8055482f8065482f8075482f8085482f8095482f80a5482f80b5482f80c5482f80d5482f80e5482f80f5482f8105482f8115482f8125482f8135482f8145482f8155482f8165482f8175482f8185482f8195482f81a5482f81b5482f81c5482f81d5482f81e5482f81f5482f8205482f82154a0d14ff47d7141600121c0f800a08173a0f8c48180f8c391078447848784c784078547858785c785078647868786c786078747878787c78756e8001f59457ff459afbff35f8f00bf46e8000121b156e8001f5945f8d04de7002780f85b712a270821032380f85c71042780f8581180f85931102380f85d7180f85e1101214ff2250c074600f5ac7280f85a3180f85f1180f86031002c18bf0124c0f2470c012010210a2387f8614101b0bde8f04f604701b0bde8f08f00bf80b582b04ff0010ccdf800c000f002f802b080bd2de9f04381b04ff29c57c2f229073f68ddf820803c466ff39604b4f1005f10d13e684ef66c65ccf2ff05ae424ff0000904d17e68b6f57d7f08bfb946012804d013e04ff0000901280fd11c4615460e460746fff7d1fd2346044631462a463846002c18bfb9f1000f07d14af2736cc0f2460c01b0bde8f043604799f8460180b1b8f1010f7cd1d9f84001002189f84611a9f84411a0b342f68d41c0f2440188472ee0b9f844010121013080b2012898bf0846a9f84401d9f8400142f68d44c0f2440489f8461128b94846fff71ffec9f8400140b1a047d9f84001a4f140024ff4c8719047a8b199f84601002848d0d9f84001002189f84611a9f8441100b1a0474af2736cc0f2460c0120002100220023afe745f64d50c0f24600804701282fd1082089f84801032089f84901102089f84a01002089f84b01b22089f84c01062089f84d0189f84e01462089f84f01432089f85001012089f85101b9f844014ef6057c070a09f5a47289f8528189f85301c0f2470c012009210d2389f8547178e701b0bde8f08300bf80b582b04ff0050ccdf800c0fff734ff02b080bd2de9f04f83b04468002c00f0ba828368002b00f0b68204eb030b4ff000090027002614e047f64c63c2f207031b6845f69077c0f201073b44c6f83c310ceb0a0300275b451c464ff0000680f09a82a04618f9013b03f07f05bd40002b46ea050610d406f00703012b16dc0bb3012b40f08882abeb0803082bc0f0838204f10903dee700bfd84580f07c82182f07f107074446dcd975e200bf022b3ad0052b40f07082abeb0803042bc0f06b82631dc7e7d84580f0668294f90130002b04f10203bed55b4580f05d8294f90230b3f1ff3f04f10303b4dc5b4580f0538294f90330b3f1ff3f04f10403aadc5b4580f0498294f90430b3f1ff3f04f10503a0dc5b4580f03f8294f90530002b00f13a82a31d96e7d84580f0358294f9013004f1020c002b03f07f0a1fd5dc4580f02a8294f90270e31c07f07f05b7f1ff3f4aeac51a02dde0469c460fe05b4580f01a8294f9037004f1040c07f07f05b7f1ff3f4aea853a40f3ff809846abeb0c039a4500f20882f308672b1dd0652b7ff45fafbaf1060ffff45baf9cf80030462b7ff456af98f80230432b7ff451af98f80330012b7ff44caf4ff29c54c2f229040290cde9002118e0044660460e4651461746654600f036fcac4631463a46204636e748f2a3513046c0f24501bff32f8f8847dde900210298ac462768bff35f8f2668bff35f8f33466ff39603b3f1005f0bd133684ef66c65ccf2ff05ab4204d17368b3f57d7f00f0c2804ff47d70654600f09efbdde9002106460298ac46002e3ff406af4ff60c43cff6ff73f4182e3384f8f49384f8f59384f8f69384f8f79384f8f89384f8f99384f8fa9384f8fb9384f8fc9384f8fd9384f8fe9384f8ff9384f8009484f8019484f8029484f8039484f8049484f8059484f8069484f8079484f8089484f8099484f80a9484f80b9484f80c9484f80d9484f80e9484f80f9484f8109484f8119484f8129484f8139484f8149484f8159484f8169484f8179484f8189484f8199484f81a9484f81b9484f81c9484f81d9484f81e9484f81f9484f8209484f82194a0d14ef66c63ccf2ff0333604ff47d7373600123b37347f67f73a6f8c4317f2386f8c3314ff6ff734ff29c5433847384b384f38433857385b385f38533867386b386f38633877387b387f387c2f2290454e8003fbb427ff440afbff35f8f00bf44e80063fbb154e8003fbb42f8d034e7dc4580f00c8194f90470631d07f07f05b7f1ff3f4aea455a3ff7e1ae5b4580f0fe8094f90570002f00f1f98004f1060c4aea077ae5e698f8043098f8057098f80650032b47ea052837dd052b58dc042b78d0052b7ff440aed6f86c313bb147f64c67c2f207073f68db1b002b18dcd6f8703186f86a91c6f87091c6f82093a6f88c936bb10c4648f2a35180461846c0f24501174665468847ac4621463a46404647f64c63c2f207031b6845f69077c0f201073b44c6f86c310ee6012b3ff400ae022b00f08780032b7ff406ae17460c466546fff711fb03460298ac4621463a46002b3ff4f9ad96f84631002b3ff4f4ad304641f28831a6f8448109f0a1f947e0062b4ad0072b7ff4e7ad80464df6db50c0f24a0016460f466446804703465d1ea446394632464046012d3ff6d5ad981eb0fa80f04009fff7e3fba446394632464046c9e517460c466546fff7d5fa03460298ac4621463a46002b3ff4bdad96f84631002b3ff4b8adb6f8443143457ff4b3add6f8403186f84691002ba6f844913ff4aaad42f68d411846c0f2440188470298ac4621463a469ee5d6f87031c6f86c91002b86f86a91c6f87091c6f82093a6f88c933ff490ad0f4648f2a35104461846c0f24501164665468847ac463946324648e696f84631c6f83c91002b3ff47bad0446d6f8400165468846174686f84691a6f8449120b142f68d41c0f2440188474af273660120002100220023c0f24606b04720463a464146ac465ce54ff2a513c0f2490303b0bde8f04f184700bf7fb50646002806d1fff75efa002807d19de80f00064649f29b1cc0f24f0c60477fbd00bff0b583b01d46144609294ed106460f46f22d10d8a22160196155062141700b2181704af24c71c0f20001033079440b22f9f79efb0e35204629464ff4807200f03df80546ff208df8080044f25220c0f20100019040f2c960c0f24800804798b148f27e30c2f2070000880122c1b264298df8072008d80721b0f5807f38bf03218df807108df80800f82d0cd8d221601961550621417005218170033001a90522f9f766fb0835394630464ef60577c0f2470722462b46b84703b0f0bd70b58ab00c464ff29c51c2f229010b68bff35f8f19466ff39601b1f1005f16d119684ef66c66ccf2ff06b1420fd15968b1f57d7f0bd1694605461846164600f039fc324628462825a24231d244e04d218df8001043218df8011001218df80210002115258df803108df804108df805108df806108df807108df808108df809108df80a108df80b108df80c108df80d108df80e108df80f108df810108df811108df812108df813108df81410a24213d3111b022910d30fd003398d420cd8c22201190255062048708d70c81c69462a46f9f7f0fa6019c41c20460ab070bd00bf46f65450c2f20700016840f2230cc0f2000cfc44c26861454ff001034ff0040008bf0223624508bf0820002a08bf1046002918bf184370472de9f04f81b04ff29c53c2f229031c68bff35f8f23466ff39603b3f1005f40f0cc8023684ef66c67ccf2ff07bb4240f0c4806368b3f57d7f40f0bf80d4f8bc310133c4f8bc314ff6ff739a4238bf134694f87471a4f8c03184f8c2011fb1002a18bf002907d1b4f8c6010130a4f8c60101b0bde8f08f94f87b010028f3d0d4f8840170b147f64c69c2f20709d9f80030c01a002805dd94f87501012809d101270ce0b4f8c8010130a4f8c80101b0bde8f08f94f87771012f18bf022794f87a510020eb0793468846adf80200adf8000012d0022f10d194f8790168b90df1020641f281556b46c0f25b05404611463246a84794f87a515a461646b2f5c86f28bf4ff4c86606f1150a504600f061f8002856d0bbf5c86f88bf45f08005d9f80010d4f8802153230271120a42710a0a8171c2710a0c090e03704d234172a02143700123c17200218370c57002728772017394f87911bdf802204173bdf800108373c173090a0174110a8174310a017500f115014274c6740746084641463246f9f70dfa4ff27d12c0f2470238465146904710f1800fd8bf6ff07f007e28a8bf7e20d4f8801184f8c501481c48f2a351c4f88001c0f245013846884701b0bde8f08fb4f8ca010130a4f8ca0101b0bde8f08fb0b54ff2a054c2f22904216846f23f52c5f28802b2eb510f48f25f514cf67e25c0f24501caf2101518bf25608847002804bf691c2160b0bd10b301684ef66c62ccf2ff0291421bd190f87b11c1b1d0f88411b1b147f64c62c2f207021368cb1a012b0edb1268d0f88801002808bf7047891a42f64d42c0f2440208bf01211047704710b590f875210021c0f8841180f87b11511eb1fa81f149f259624909c0f25902044640f20b10904710f1800fd8bf6ff07f007e28a8bf7e2084f8c4014ef6e374c0f25a04a04704f1bc00bde81040004700bf2de9f04f81b00429c0f0e980834600784d2840f0e4809bf80100432840f0df809bf80200012840f0da804ef66c684ff29c570d46ccf2ff08c2f229074ff6ff7600244ff07f0906e048f2a351c0f24501bff32f8f8847d7f800a0bff35f8f3868bff35f8f01466ff39601b1f1005f07d10168414504d14168b1f57d7f00f098804ff47d70fff752ff002800f0a8804ff60c41cff6ff7100bf42182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d7141600121817347f67f71c0f80080a0f8c41180f8c391068446848684c684068546858685c685068646868686c686068746878687c68757e8001f51457ff457afbff35f8f00bf47e8000121b157e8001f5145f8d04be79bf80310022905dc01290ed0022900f09e800ce003290dd0042908d190f8741129b101b0bde8f04fdce00d2d06d201b0bde8f08f044600f031f987e090f87b1119b390f87521002180f87b11511eb1fa81f149f259624909c0f25902044640f20b1090474ef6e37510f1800fd8bf6ff07f00c0f25a057e28a8bf7e2084f8c401a84705f1bc00804720469bf804100446012988bf002180f875119bf8051001f00302012a4ff0010198bf0a4680f877219bf80630012b88bf002380f878319bf80730022b88bf002380f879319bf808309bf8097043ea0723502b98bf5023b3f5f07f28bf4ff4f073a0f87c319bf80a309bf80b7043ea072341f28837bb4238bf1f46a0f87e719bf80c3080f8741103f0030380f87a3102f00103002103eb5202c0f88011c0f8bc11a0f8c01180f8c211c0f8c811a0f8c6117f2180f8762180f8c51100f009f8204600f04cf8204601b0bde8f04f78e000bfb0b5044690f87a01800758bfb0bd94f875014ef633750128c0f25a0507d105f1b000804705f58b71002088470ee005f5b670804794f87501012801d1002004e094f87701013818bf0120a84794f875014ff6ed120138b0fa80f0cff6ff7249f2015341097a44c0f2590340f20b10984710f1800fd8bf6ff07f007e28a8bf7e2084f8c301012084f87b01b0bd70b5044647f64c60c2f20700006894f87b1145f69075c0f2010500292844c4f8840108bf70bdd4f8880142f66536c0f2440658b94ff69130cff6ff707844002122460023b047c4f8880150b106f594718847d4f8880106f1e8022946bde87040104770bdb0b5044600f5c675082084f88c01032084f88d01102084f88e01002084f88f01c22084f89001062084f8910104f29311204600f065f84ff0280e4ef6057cc0f2470c012009212a462f2384f892e1bde8b040604770b54ff29c50c2f229000468bff35f8f20466ff39600b0f1005f46d120684ef66c61ccf2ff0188423fd16068b0f57d7f18bf70bd94f87b010025c4f8845100b394f8750149f259620138b0fa80f04109c0f2590240f20b1084f87b5190474ef6e37610f1800fd8bf6ff07f00c0f25a067e28a8bf7e2084f8c401b04706f1bc008047d4f8880184f8745170b142f68d45c0f24405a847d4f8880105f166018847002804bf0020c4f8880170bd70b505464d200870432048700120887095f874010c46c87095f87501087195f87701487195f87801887195f87901c87195f87c01087295f87d01487295f87e01887295f87f01c87295f87a01087395f87b01487345f64d50c0f246008047a073d5f880010026e073d5f88001000a2074b5f88201607495f883012675a074a020e074d5f8bc016075d5f8bc01000aa075b5f8be01e07595f8bf01207695f8c001607695f8c101a07695f8c201e07695f8c601207795f8c701607795f8c801a07795f8c901e07795f8ca0184f8200095f8cb0184f8210095f8c30184f8220095f8c40184f8230095f8c50184f82400fff79dfb84f82500d5f88401a0b147f64c61c2f207010a68821a012a0bdb0968401a44f6d35100f2e730c1f26201a0fb01018e0900e00026300a84f8266084f8270070bd00bf2de9f04182b04ff29c51c2f229010c68bff35f8f21466ff39601b1f1005f79d121684ef66c62ccf2ff02914272d16168b1f57d7f6ed194f8cc1179b394f8ce01c0070ad0d4f86c0178b347f64c61c2f207010968401a002827dd47f24c45c2f2070555f8040c002854d042f29707c0f24c074af6e908002607f5437101a8c0f24b0801968847a8b1032084f8cf612860b4f8d001c04702b0bde8f081d4f8d811c1b302b0bde8f0410847204602b0bde8f04133e0019841f60d56c0f24c06a861b04706f5af708047e861b847012084f8cf0103202860b4f8d001c047d4f8e001a0b10199d4f8dc21b4f8d271531a38bf8b1abb420ad2b4f8d41159b147f64c62c2f207021268101a884203d32046022100f078f802b0bde8f08100bfb0b590f8cc41002c4cd044f28442c2f200021188082911462cd0114631f8083f082b27d0114631f8103f082b22d0114631f8183f082b1dd0114631f8203f082b18d0114631f8283f082b13d0114631f8303f082b0ed0114631f8383f082b09d0114631f8403f082b04d032f8481f0829114614d14a68b2f5870f10d36ff35602012a0cd14a684ff65363cff6ff737b449a4204d1d0f8d821002a18bf4a60002180f8cc1190f8cd11b1b1002180f8cd1145f60a61c2f20701097869b947f24841c2f20701096839b14af68171c0f24b010546042088472846002c08bfb0bd0321bde8b04000e000bfb0b588b0044645f64d50c0f246000d468047012840f08f8008208df8010003208df8020010208df8030000208df80400ca208df8050006208df8060018208df8070047f26440c2f2070050f81c2c94f8cc11002a18bf0122002945f60961c2f207014b7818bf0232002b94f8cf3118bf0432002b4ff0410318bf08328df808304c238df8093001238df80a308df80b508df80c2050f8182c4ef605758df80d200268c0f24705130a8df80e208df80f30130c120e8df810308df811204268130a8df812208df81330130c120e8df814308df8152002698df81620120a8df8172009788df8181081688df819106821c2f2000109688df81a10090a8df81b1047f64c61c2f207010a68130a8df81c208df81d30130c120e8df81e308df81f2000680df10102c4f8dc0108680921c4f8e00101201f23a84708b0b0bd00bf2de9f04f83b0022902d24ff0ff35ece0cde901100120cff680704ef66c644ff29c56ccf2ff04c2f229064ff6ff77851c4ff0000947f67f7b4ff07f0807e000bf48f2a351c0f24501bff32f8f8847d6f800a0bff35f8f3068bff35f8f00ea0501b1f1005f07d10168a14204d14168b1f57d7f00f093804ff47d70fff7a1fa0028c3d04ff60c41cff6ff7100bf42182e3182f8f49382f8f59382f8f69382f8f79382f8f89382f8f99382f8fa9382f8fb9382f8fc9382f8fd9382f8fe9382f8ff9382f8009482f8019482f8029482f8039482f8049482f8059482f8069482f8079482f8089482f8099482f80a9482f80b9482f80c9482f80d9482f80e9482f80f9482f8109482f8119482f8129482f8139482f8149482f8159482f8169482f8179482f8189482f8199482f81a9482f81b9482f81c9482f81d9482f81e9482f81f9482f8209482f82194a0d14ff47d714160012104608173a0f8c4b180f8c381078447848784c784078547858785c785078647868786c786078747878787c78756e8001f51457ff45cafbff35f8f46e8000121b156e8001f5145f8d051e7044645f64d50c0f24600804701281dd1029d6978022916d00129204607d000297ff425af00210025fff77efe0fe0019f41f28831022f0ed14ff4fa730022012741f2883624e02046fff7fafd0025284603b0bde8f08faa78052f11d3eb782e79072f43ea062310d395f805c0ae79092f4cea0627e4d3ee792d7a46ea052607e041f288364ff4fa7301e041f288360127642b98bf64238b4228bf0b4690f8cc1180f8ce21a0f8d031a0f8d271a0f8d46171b147f24841c2f20701096800295ed001210446fff730fe0025c4f8e051bee744f28442c2f200021188082911462cd0114631f8083f082b27d0114631f8103f082b22d0114631f8183f082b1dd0114631f8203f082b18d0114631f8283f082b13d0114631f8303f082b0ed0114631f8383f082b09d0114631f8403f082b04d032f8481f0829114632d14a686ff00105b2f5870ffff483af0123cff680731a40012a7ff47caf4b684ff6c112cff6ff727a44934214bfc0f8d831d0f8d831002b3ff46daf4a60012180f8cc1199e74af60771c0f24b010420884720b105462046fff756fd5be70121204684f8cd118fe76ff0010553e700bf10b582b00c464df6cb61c0f24501884724b12178042901d1617809b102b010bda1780d29fad1e1780029f7d121790029f4d161790029f1d10028efd00168e029ecd10446fef7c2f9014620460029e5d004204ff6591e01904ff0000cc0f24e0e0020002100220e23cdf800c0f047204602b010bd3146fff7c3bf00bfb0b582b00c460546fef7a2f90146002d4ff0000018bf002901d102b0b0bd47f2fc70c2f2070000684df6cb61c0f24501884790b10068e0284ff00000edd129784ff6591c0191c0f24e0c0021002223460090e047012002b0b0bd002002b0b0bd08b530460921fff7cbff002805d002b045f28310c0f24400004744f62703c0f24603984708bd00bf08b530460a21fff7b7ff002805d002b045f28310c0f24400004744f62703c0f24603984708bd00bf08b530460b21fff7a3ff002805d002b045f28310c0f24400004744f62703c0f24603984708bd00bf10b589b38968012805d104460846fef7a3f9204628e039b30a794b798c79c97942ea032242ea044242ea016106291bd147f29121c0f24601044688470146204691b144f2e970c0f24400804701462046002918bf10bd49f2aa40c0f2000078440c21fff761ffd4e710bd00bf10b5059c4ff20340c0f2460080472146fff7c0ff10bd00bfb0b5c4b0044600284ff0000000f0c78089b20b2940f0c380207838b96078092804d1a078612801d1e07810b1002044b0b0bdfef7dff80028f8d045f64d50c0f24600804701281cd00228efd103208df8070001200df107058df80800a81c21460b22f8f705fa4af66104c0f24604f02029460d220023a047b0fa80f0400944b0b0bd4ff29c50c2f22900006801466ff39601b1f1005fc9d101684ef66c62ccf2ff029142c2d14168b1f57d7fbed122797f21042a06dc012a0cdcbab1012a08bf00211ae0082a0bdc052a11d0082a08bf0a2112e0022a0dd0042a08bf01210ce0092a09d00a2a08bf0e2106e0092104e0022102e0032100e00b2180f80b1310216a2580f80c13a22180f80653152580f80e13062180f807531a2580f80f130c2180f80853132580f8101352210822022380f8095380f811134921012580f8042380f8053380f80a2380f80d3380f8121380f8135380f81453217900f5417280f815136179192380f81613a17980f81713002180f81813e17980f81913217a80f81a13617a80f81b13a17a4ff2250480f81c13c0f247040120e021a047284644b0b0bd00bf1fb5fff72bff002803d0bde81f4000207047bde81f4038b584b049f21f13c0f24703184710b5f0281bd1d1b1cab10c78032c16d10d2a1cbf0b2010bd487801281cbf0a2010bd45f64d50c0f246000c468047012803d1a01c0b21fff7fffe002010bdbde81040fdf7a7bc00bf4ff29c52c2f229021268bff35f8f13466ff39603b3f1005f10d1d2f800c04ef66c63ccf2ff039c4508d15368b3f57d7f02bf0023c2f8fc32c2f8003347f2c942c0f24d02104700bf4ff29c50c2f229000068bff35f8f01466ff39601b1f1005f0fd101684ef66c62ccf2ff02914208d14168b1f57d7f02bf0021c0f8fc12c0f8001347f2d940c0f24d0000472de9f04184b0dde90a76022f16d340f64705a94212d08eb13578412d0ed175784e2d0bd1014602f0bf0012284ff00d0008bf002b0ed004b0bde8f0810c9d0097cde9016546f63916c0f24d06b04704b0bde8f081082feed3b078012802d1f078022803d90d2004b0bde8f081002953d045f6f444c2f2060414f8040c81424bd12068002848d048f22732c0f254020d4608460221904700283ed024682088d8b36088c8b3a088b8b3e088a8b330797179b279f37940ea012040ea024050ea0368d0d04ff29c50c2f229000068bff35f8f01466ff39601b1f1005f1bd101684ef66c62ccf2ff02914214d14168b1f57d7f10d1f178a1b190f8fc22aa420cd1d0f80023424508d101295bd1082faad100f09bf875e0f07818b1082004b0bde8f081082f9fd1f9f77afec8b10646d0f86c010028f1d047f64c61c2f207010968401a0128e9db96f8fc0268b196f8fd02032809d00628e0d1304600f076f8dce7112004b0bde8f08146f63917c0f24d0707f53a60804707f539622846214690470120002786f8fd020df10f02304600210123a6f8fe7286f8fc52c6f800838df80f70adf80c7000f07ef861884af2bd6603abc0f24c0628460222b047384604b0bde8f081a7f1510189b24ff6b87291424ff00d0119d390f8fd02032808467ff42baf334613f8080fa7f108018ab280b9052a0ed9a1884af2bd67c0f24c072846b847002004b0bde8f081084604b0bde8f08101280dd1042a0bd3981810f8021c00297ff420af10f8010c00287ff41bafe0e702284ff00d0008bf062a7ff4fcae707b01283ff60fafd4e790f8fd120a1f022a38bf7047022905d0012907d1042180f8fd127047052180f8fd12704780b582b0052180f8fd120121adf8061045f6f441c2f2060190f8fc0209684af2bd6c49880df10603c0f24c0c0222e04702b0bde8804070472de9f04fc7b0054690f8fc0203920591d8b145f6f041c2f206010978884214d148f22732c0f2540202211c46904760b195f8fc0240f66502c0f255020021904718b100690088172802d247b0bde8f08f033880b2f42828bff42007af0b3807f101084ff000094ff0000a01900495029414e000bf0699cde94509adf810112121adf8121143f23d5144a8c0f255018847049d029c1ffa8af0a042d6d2a4eb0a01019a1ffa81fbb5f8fe1241235a45b8bf93468df81c304e234a1c8df81d300123a5f8fe22d5f800238df81e30059b1ffa8af08df81f30130a8df82410090a8df820208df82130130c120e8df82510b0fa80f18df823204a091ffa8bf111fa8afaa2458df8223008bf0232bbf1000f8df826202fd001390329039901eb000c01d2002115e04ff6fc700bea00020cf10103002100bf5e1816f8014c7d187078ec725c5cb67804318a422c736873ae73f1d1049d1bf003020dd01cf80160cb19012ade7207d00ceb01004178022a19731cbf8078587395f8fc020bf10b0406900b2010fa84f649f6cd713046c0f24c01884700283ff47eaf26f003031ffa84fc06f003025e426ff00303c1180433f518043581f8049081f8059081f8069081f80790f2d152b10344012a83f8049005d0022a83f8059018bf83f806900bf10e0202701b22442108230272220480f801908170c370417283723ff43dafbcf1040f01d2002214e047f6fc710cea0103002200bfb95c8618f17218f8021008eb020531736978ad78043293427173b573f0d11cf003033ff41fafbe5c00f10b01012b8e543ff418af561cbd5d022b8d553ff412af0232bb5c8b540de7f0b583b04ff29c51c2f229010c68bff35f8f21466ff39601b1f1005f4bd121684ef66c62ccf2ff02914244d16168b1f57d7f40d194f8fc12e9b3002840d002888a423dd145f6f446c2f2060616f8041c8a4235d1316899b3356894f8fd12032919d8d4f86c1139b147f64c62c2f207021268891a00290edc02218df80b100df10b020746204600210123fff78dfe2046fff75cfe38468278092a1bd141896b8894f8fd72994217d1032f3adc012f6ad0022f3dd004e018b181780939022901d203b0f0bd47f6ed31c0f24d0103b0bde8f040084794f8fd72032ff1d8a2f10d0102290cd2c178d1b302208df8040001aa204600210123fff757fe03b0f0bd092a08bf032fdcd14189aa889142d8d1c078002800f0818002200df105028df80500e6e7052f04d0042fcad1c07805262fe0c078002848d0062084f8fd0202208df807000df10702204600210123fff72cfe052fb5d02046fff7f9fd03b0f0bd4268002aadd00389a3f2012189b2b1f57e4fa6d34089082b48d12988884245d12046012108234ce0c0780526002808bf022650b102208df80a000df10a02204600210123fff701fe6988012294f8fc024af2bd67adf8082002abc0f24c07022284f8fd62b84703b0f0bd052f15d1002094f8fc523668c4f8fc02c4f8000347f2c944c0f24d0404f11000804728463146224603b0bde8f0401047032084f8fd0201208df806000df1060272e7e98888427ff457af2046022103e0204603210022002303b0bde8f040bfe506290ad14178012907d18178653911f1630f02d3c178012902d94ff0ff307047f0b581b00179427941ea022540f6b8318d421fd80646fdf7fdfbd8b1f9f75cfbc0b10446d0f8d80342f66537c0f2440758b941f26f60c0f200007844012100220023b847c4f8d80320b107f1e8022821904718b14ff0ff3001b0f0bdb078f178d4f8e4230023c7f6e07340ea452003ea425240ea0120bff35f8f1043bff35f8fc4f8d403002001b0f0bd00bf02293cbf4ff0ff3070472de9f04f9bb00278437842ea0325b5f5007f04d94ff0ff301bb0bde8f08f4ef66c6a4ff29c56ccf2ff0ac2f229064ff6ff774ff0000b4ff07f090791099008e000bf48f2a3512046c0f24501bff32f8f8847d6f80080bff35f8f3468bff35f8f20466ff39600b0f1005f07d12068504504d16068b0f57d7f00f09a804ff47d70fef7d5fa002800f0928004464ff60c40cff6ff7000bf21182e3081f8f4b381f8f5b381f8f6b381f8f7b381f8f8b381f8f9b381f8fab381f8fbb381f8fcb381f8fdb381f8feb381f8ffb381f800b481f801b481f802b481f803b481f804b481f805b481f806b481f807b481f808b481f809b481f80ab481f80bb481f80cb481f80db481f80eb481f80fb481f810b481f811b481f812b481f813b481f814b481f815b481f816b481f817b481f818b481f819b481f81ab481f81bb481f81cb481f81db481f81eb481f81fb481f820b481f821b4a0d14ff47d7060600120a07347f67f70c4f800a0a4f8c40184f8c39127846784a784e78427856785a785e78527866786a786e78627876787a787e78756e8000f40457ff455afbff35f8f00bf46e8004028b156e8000f4045f8d049e70024ddf824805db1fdf7e2fa0146002c4ff0ff3018bf002902d11bb0bde8f08fb5fa85f040094ff000098df82c908df82d908df82e908df82f908df830908df831908df832908df833908df834908df835908df836908df837908df838908df839908df83a908df83b908df83c908df83d908df83e908df83f908df840908df841908df842908df843908df844908df845908df846908df847908df848908df849908df84a908df84b908df84c908df84d908df84e908df84f908df850908df851908df852908df853908df854908df855908df856908df857908df858908df859908df85a908df85b908df85c908df85d908df85e908df85f908df860908df861908df862908df863908df864908df865908df866908df867908df868908df869908df86a908df86b90bcb1d4f87021a2b14ff4006304e03f683b44b3f5403f0cd2d718be680136f6d07e68033626f0030609eb060101f11009ede7002d4ff0020a039500f00581ddf81cc0acf102020a2ac0f00081002608eb0a0b9bf801504ff0ff30012d3ff648af9bf802209bf803309bf8047042ea03229bf8053042ea074747ea0361a1f1011212f5803f0a91fff433af9bf808109bf809e0029141ea0e210af10a020497aceb02034f1e9f42bff423afcde905269bf806209bf807300a9e42ea032cb6eb0c07fff416afb9423ff613af18f80a70089147ea052a4feada000ba90e5c07f00705012707fa05f5354240f001830e5c45ea06050d5407994ff6ff75c0f20205b4b3d4f8700198b317461a0201924fea0e264ff4006200eb0208d8f8083053454bd0d8f800301a44aa4221d800eb0208d8f80830534540d0d8f800301a44aa4216d800eb0208d8f80830534535d0d8f800301a44aa420bd800eb0208d8f8083053452ad0d8f800301a44aa42d3d900bfbcf1000f40f0bc8204980a464ff6fc710330c0f2030108404844944600f1100908980599069e00eb010a0398013686424ff0000028bf0120ddf824804fd2aceb0a02092a3ff64caf49e0d8f804000a9a904240f09582d8f80c006045c0f0908236d9089aa0eb0c00824200f289827ab3029831180198c1f1000cc2199044a1f1010e002208eb02050beb0203287c9e7ab04240f0758296451cd06e7cdf7abe4240f06e820ceb0207be1c13d0ae7c187b864240f06582079ef81c07d0e87c5b7b984240f05d8204329142dbd1b446a7e78c46a5e7ddf81cc0a2e7ddf81cc0002800f04e82baeb0c004ff0000118bf0120b9f53e3f88bf0121014303980028c1f100003ff43eae00297ff43baed4f870b1bbf1000f40f08b804ff44030fef764f8002800f02d82834600206ff0200100220beb02030bf8020040320beb0107b2f5006f01f1400158709870d870187158719871d871187258729872d872187358739873d873187458749874d874187558759875d875187658769876d87618775877987787f8400087f8410087f8420083f8220083f8230083f8240083f8250083f8260083f8270083f8280083f8290083f82a0083f82b0083f82c0083f82d0083f82e0083f82f0083f8300083f8310083f8320083f8330083f8340083f8350083f8360083f8370083f8380083f8390083f83a0083f83b0083f83c0083f83d0083f83e0083f83f0093d14ff43e30cbf800080020cbf804084ff0ff31cbf80c084ff40060c4f870b1cbf80818c4f820034ff6ff760221c0f202064ff000090ae00aeb080109f10109ddf8248099454ff000003ff497ad08eb010518f801006f78cdf81c900a9195f802c0eb7895f804906a7995f806a0e97995f808e06d7a40ea072808955cb3012f29d84ff400670beb0705a868404500f0a28028680744b7421dd80beb0705a868404500f0988028680744b74213d80beb0705a868404500f08e8028680744b74209d80beb0705a868404500f0848028680744b742d7d94cea032040ea094040ea0267f81c20f00300d4f82093cdf818a000f1100a0020cde904e10297b9f1000f26d00beb09035bf809105a68514580f09b80eab10beb02005bf80210d0f80490514580f08c80b9f1000f11d00beb09035bf809105a68514580f0868042b10beb02005bf80210d0f804905145d6d376e000204ff400694ff4006504e000bf3d44b5f5403f23d20beb05018a685bf805700132f4d04868ca68033020f0030000f110060beb09001032f7f75df94168c2684bf809608368d4f870b18a424ff00001b14408bf00f110014bf82310d7e7c9f540310f294ff00002c4f8202310d90beb09004bf809104ff0ff3142608160c260c4f820930ae0e868039b0a9a089f60e010b10268114401604ff000090020b9f1000f7ad00beb09035bf809105a68514522d2002a71d00beb02005bf80210d0f80490514513d2b9f1000f66d00beb09035bf809105a6851450ed2002a5dd00beb02005bf80210d0f804905145d7d30546cc469146184601e01d469446a1eb0a0110290fd309eb0a020beb02034bf802104ff0ff31c3f804c0996000219446d960c5f800a0039b0a9addf818a0dde904e1089f00280cbfc4f820c3c0f804c002984ff6ff7668600020c0f20206c5f80880e8604aea0121ddf81c904eea072a814202f10a087ff4c0ae05f1100778180999524641449b46f7f772f8e9685b466868aa68d4f870b15144e96081424ff0000018bf07464bf82270a6e600204ff400684ff4006703e02f44b7f5403f23d20beb07018a685bf807500132f4d04868ca68033020f0030000f110060beb08001032f7f791f84168c2684bf808608368d4f870b18a424ff00001b04408bf00f110014bf82310d7e7c8f5403200210f2ac4f820130dd90beb08034ff0ff304bf8082059609860d960c4f820831bb0bde8f08f00281ebf0168114401604ff0ff301bb0bde8f08f00bf02293cbf4ff0ff3070472de9f04f8bb00278437842ea0325b5f5007f00f2f08005eb4502022303eb4202914240f0e8800590fcf7bbfe002800f0e2804ef66c694ff29c56ccf2ff09c2f229064ff6ff77002447f67f784ff07f0b06e048f2a351c0f24501bff32f8f8847d6f800a0bff35f8f3068bff35f8f01466ff39601b1f1005f07d10168494504d14168b1f57d7f00f096804ff47d70fdf7e0fd002800f0af804ff60c41cff6ff7100bf42182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d7141600121c0f800908173a0f8c48180f8c3b1078447848784c784078547858785c785078647868786c786078747878787c78756e8001f51457ff459afbff35f8f00bf46e8000121b156e8001f5145f8d04de7d0f870c10495bcf1000f20d000234ff4006104e03f683944b1f5403f0bd20ceb0107be680136f5d07e68033626f0030633441033eee775b9b3f53e3f40f2e0804ff0ff310bb0bde8f04f08467047002d00f0d680002305994ff0000901f1020a153103914ff0ff31059109eb49060aeb46056c784ff0ff31012ce3d8af78ea7857ea022e1ebf2a796d7952ea0528d9d0bef5207fd6d8b8f5f07fd3d80ef10102520802fb08fb4ff6fb724ff6ff779345c0f20207c6d81af81610059e41ea0421039cb9f1000f28d014f8132c14f8125c42ea05228a42b3d0feb114f80d2c14f80c5c42ea05228a42aad0012e15d014f8072c14f8065c42ea05228a42a0d0022e0bd014f8012c257842ea05228a4297d0043e721c04f11804d6d15646bcf1000f2fd00bf105054ff400640ceb040adaf808208a4230d0daf800201444bc4220d80ceb040adaf808208a4225d0daf800201444bc4215d80ceb040adaf808208a421ad0daf800201444bc420ad80ceb040adaf808208a420fd0daf800201444bc42d3d94ff6fc720bf10801c0f201021140194401f1100320e0daf80410a9427ff44fafdaf80c10a9427ff44aaf9af8101004297ff445af9af811109af8122041ea022171457ff43caf9af813109af8142041ea022141457ff433af049909f1010989450599b24601f1010105917ff43dafb3f53e3f3ff624af00240025019019e000211fe7d0f870c14a688b684ff6ff7793454ff00002c0f20207c1f80cb008bf01f110024cf82320013575454ff000013ff408af05eb45000aeb40011af8100091f8018091f802e091f803b091f804904979bcf1000f40ea082605912cd0b8f1010f29d84ff400610ceb01039a68b24200f0a8801a681144b9421dd80ceb01039a68b24200f09e801a681144b94213d80ceb01039a68b24200f094801a681144b94209d80ceb01039a68b24200f08a801a681144b942d7d94eea0b21059b013149ea0322490801fb02f75a4607f1050b8df81d004fea1b208df820004fea1b408df8210005208df82500042001218df8270048468df81b1003908df82a000df11b0011218df81c408df81e808df81fb08df822408df824408df823408df82640cdf808e08df828e091468df829208df82b30fff797f800287ff482ae01980021d0f870c1bcf1000f3fd0ddf810e0b8f1010f3cd84ff400630ceb03018a68b24235d009680b444ff6ff71c0f202018b4226d80ceb03018a68b24228d009680b444ff6ff71c0f202018b4219d80ceb03018a68b2421bd009680b444ff6ff71c0f202018b420cd80ceb03018a68b2420ed009680b444ff6ff71c0f202018b42cbd9002104e0ddf810e02ee7ddf810e0002f3ff41aaf4fea0922029f059b42f001023a44039f1b0252083b4353435a1e032a01d200220ae023f0030700228e18043297427475b475f4753476f7d113f003033ff4f8ae01f11507012bbc543ff4f2ae3a44022b547018bf9470ebe62de9f04f81b04ef66c644ff29c55ccf2ff04c2f229054ff6ff7600274ff0010a47f67f7b4ff07f0807e000bf48f2a351c0f24501bff32f8f8847d5f80090bff35f8f2868bff35f8f01466ff39601b1f1005f07d10168a14204d14168b1f57d7f00f094804ff47d70fdf702fb002800f005814ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ff47d710460416080f80ea0a0f8c4b180f8c381068446848684c684068546858685c685068646868686c686068746878687c68755e8001f49457ff45aafbff35f8f45e8000121b155e8001f4945f8d04fe7d0f88813002974d104464ff41630fdf769fa014600284ff0000069d0002200bf8b1888544032b2f5163f58709870d870187158719871d871187258729872d872187358739873d873187458749874d874187558759875d875187658769876d876187758779877d87783f8200083f8210083f8220083f8230083f8240083f8250083f8260083f8270083f8280083f8290083f82a0083f82b0083f82c0083f82d0083f82e0083f82f0083f8300083f8310083f8320083f8330083f8340083f8350083f8360083f8370083f8380083f8390083f83a0083f83b0083f83c0083f83d0083f83e0083f83f009ad1c4f8881300e00021084601b0bde8f08f00bf2de9f04f93b04ff6ff75a9424ff0000c2cd0dde91c874ff4805ecde90aecd0f89ce3cde90087229fdde920a9dde91e6b249c0697239f0aadcdf840c0cde911eccde90845cde9026bcde904a90546079704f0b8fe84464cb1bcf1000f06d19df8480095f8a013084385f8a003604613b0bde8f08f2de9f04f93b00446002047f64c65a4f8a003c2f207052868002a89461abfc4f894030146d4f89413401ac4f89c03fcf749fa002800f05a81d4f88803002800f0558104f0e7ff002800f050810646b4f88c03002853d0a0f10108d4f89c0300254ff4a0714ff4f0774ff4805acde911050df1280bcde901152046414632464ff42073cde90aa51095cdf824b0cde90755cde90555cde90355009704f059fe002840f02481d4f89c034146cde91105012008904ff4a0700190204632464ff420734ff4f077cde90aa51095cdf824b0cde90655cde90455cde90255009704f038fe002840f003819df8480094f8a01347f64c65084384f8a003c2f2070506e0d4f8881330464ff41632f6f71afb4ef66c684ff29c57ccf2ff08c2f229074ff6ff764ff0000a07e000bf48f2a351c0f24501bff32f8f8847d7f800b0bff35f8f3868bff35f8f01466ff39601b1f1005f07d10168414504d14168b1f57d7f00f098804ff47d70fdf706f9002800f0c4804ff60c41cff6ff7100bf42182e3182f8f4a382f8f5a382f8f6a382f8f7a382f8f8a382f8f9a382f8faa382f8fba382f8fca382f8fda382f8fea382f8ffa382f800a482f801a482f802a482f803a482f804a482f805a482f806a482f807a482f808a482f809a482f80aa482f80ba482f80ca482f80da482f80ea482f80fa482f810a482f811a482f812a482f813a482f814a482f815a482f816a482f817a482f818a482f819a482f81aa482f81ba482f81ca482f81da482f81ea482f81fa482f820a482f821a4a0d14ff47d7141600121817347f67f71a0f8c4117f21c0f8008080f8c311068446848684c684068546858685c685068646868686c686068746878687c68757e8001f59457ff456afbff35f8f47e8000121b157e8001f5945f8d04be7064604f0bffe002e18bf002803d1012089f8050022e0c6f864014ff0010a4ff4f07086f868a101904ff420704af61f4c0090c0f2470c00200021002200230027e04730b186f86871c6f8647189f805a004e099f8050089f804a030b14ff0ff3013b0bde8f08f0026cbe794f8a00384f8a10338b3d4f8900342f66536c0f2440620b129682d31c4f8981310e044f6dd70c0f200007844002122460023b047c4f89003296801f12d01c4f8981320b106f1e8022d21904728b1002084f8a10313b0bde8f08f002013b0bde8f08f80b582b04ff4f0704af61f4e01904ff4207cc0f2470e0020002100220023cdf800c0f04702b080bd022a3cbf4ff0ff3070472de9f04fadf2345d239008784f780a4450ea072001f10207249002f04483259300232292974202f03883781c904202f0348338787978be1c40ea0121901b81422c962f9102f229832598ddf880253690ddf85805ddf878153790ddf85c053f913890ddf8600527933990ddf864053a90ddf868053b90ddf86c053c90ddf870053d90ddf874053e901068411e0028116002f003832f98002802f0ff822f98841c032c02f0fa82fe78072e02f2f6822c9890f80090f00702d107f1040e27e02f9820f00100022802f0e88297f804a07d7923984aea052b594636aa02f0ecfa002842f0db82ddf8640507f1060e012d3a900dd8ddf88005806948b14feadb020af00701835c012505fa01f119438154b00707eb0408cdf8a08005d44ff0000a042e29d2a1e000bfc64505d01ef9014b4ff0000af34603e000244ff0010ac34645f64d55c0f24605a847012808bf0134601e81b2670800ebd130002c48bf4710a84701283a9808bf7f42ddf8a0803844de463a90042e78d3baf1000f42d1c64540d0724612f8011b3a9842453dd09ef801200ef10203120642ea0141434500eb214c3ed00ef103029ef80210424534d09ef803200ef10403120642ea014143454fea214129d00ef105039ef80420434500f0ac869ef805700ef10603434542ea072200f0a3860ef107079ef80630474501f0dc829ef807700ef1080e3f024ff0000a15e03a98002100e0c64600eb010c4ff0010a0022002108e04ff0010a002203e04ff0010a00220021c646002300273b433b9f62440b447fb1dde93c76dde93e40bc45d8bfbc46b142d8bf3146a242a8bf22468342a8bf0346ddf8a0800120cde93cc1cde93e233b90baf1000f42f01582b9f1040f40f38380b9f1060f40f3f380b9f1070f00f0b982b9f1080f00f06c81b9f1090f42f00182c64502f0fe811ef801abc64542f0f981baf10f0f02f2f581ddf87c05002801f078833b993698dde93829002900f029863799dde93d733f9e994227eae775b8bf0b46b242b8bf1646b542359681f261833c994fea630c21eae17b4fea0a11339135990bf10104491b4fea5b0e4aea0a1211f003084fea54013494329100f0f7869b4581f2638205fb09045feacb7171465e4609d014f80e10349e01f0f00141ea0a0104f80e10329961452144319681f23f8204eb0c060c4604f8012bb44281f039828f1cb7424a7081f03582cf1cb7428a7081f030820f1dca70b7423946ead301f029ba00bfb9f1020f37dcb9f1010f00f06f81b9f1020f42f083813698dde937763490ddf88005dde939a1dde93b45dde93d32ddf8fcb0c0694ff00009c645cde946e8cdf820914290cdf80c91cde92a32cde928152e9400f07c820ef1010046909ef80090404500f074820ef1020046909ef80100b84604026fe2b9f1030f00f09681b9f1040f42f04b81dde936c0dde938633490ddf88005dde93aa2dde93c74dde93e59c0694ff0000bc645cde942e8cdf810b14090cdf804b1cde9323c3596cde92d74cde9305200f0af820ef1010042909ef800b0404500f0a7820ef1020042909ef801004fea0028a2e2b9f1050f00f0fa81b9f1060f42f01281c64502f00f810ef10100404502f00a810ef10200404502f005810ef10300404502f000810ef10400404502f0fb800ef10500404502f0f6800ef10600404502f0f1800ef10700404502f0ec800ef1080ca8eb0c001028c2f0e5800ef11800404542f0e0809ef804009ef8051050ea01261ebf9ef806009ef8071050ea012502f0d1809ef800009ef80120379940ea0224081bc2f0c780864202f2c4809ef802009ef80330389a40ea0327d01bc2f0ba80854202f2b780ddf87c05002801f03a8239980df1e80e369b34909ee8014fcdf8d4e0cde906478de8010f1846dde93437cdf828c0cde90865059704f0d7f801f021ba36983999339037983591349038983a9931904046cde94ee0ddf880053291c06900214eac46aedde93b7bdde93da5ddf8fc805091cde946012046314602f03ffb81462046314602f03afb5099002940f0ac82dde94ec2cdf8c080944500f0a5820cf10101914200f0a0820cf10201914200f09b820cf10301914200f096820cf10401914200f091820cf10501914200f08c820cf10601914200f087820cf10701914200f082822d909cf800009cf804102b909cf805003b4628900cf108005e46d646cdf8a8909cf801b09cf802709cf8039029919cf806a09cf80710a2eb0008b8f1010f2e9141f0fe80904200f05d829cf808100f2900f258820cf1090001f0f3b8c64502f01580724612f8010b012802f20f80369900283091dde93751359139993191dde93ac134913c992d913d992b913e992a913f99299100f0d982424501f0f7870ef10202424501f0f2870ef10302424501f0ed870ef10402424501f0e8870ef10502424501f0e3870ef10602424501f0de870ef10702424501f0d9870ef10802424501f0d4879ef801209ef802309ef8046042ea03239ef803209ef805409ef80610774642ea062e44ea012af9793a7a07f109041a9441ea0221b8e2a8eb0e06052ec1f0b4870ef10505454501f0af870ef1060b9ef80540a8eb0b00a042c1f0a6870beb0400404541f0a187369820903798359038982a9039981f90dde93a9034903c9831903d983290dde93e803390ecb14ff0000a04e000bf0af1010aa24515d21bf80a0001381e28f6d90beb0a00a4eb0a014eaa46ab774602f07cfe002801f075874e98be468244a245e9d3ddf87c05002801f0f3803498cdf8c090f146002800f0b283319820eae0703190329820eae070219035984045a8bf404635902a9833998842a8bf08462a90a0e3c64501f04d870ef10100404501f048870ef10200404541f04387704601784078dde93b5441ea0021ddf880050df1d80c0990ddf87c059ce80c10089004a8dde93976ddf8f490ddf8f8e0ddf8fc8080e810422398cde900c7cde90265cdf81c8004f0b2f8074659e1ddf880050df1f00adde936c1dde93853dde93a629ae89004ddf8fc90c0694ff0000bc645cde946e8cdf820b14290cdf80cb1cde9323ccde93451cde92d47cde93062cdf8ac9000f022810ef1010046909ef800b0404500f01a810ef1020046909ef801004fea002815e10120b8464890002446ad42af2846394602f0a3f935902846394602f09ef9489907460029cdf8b4b0cde9324a00f0148144460025002031900120bb464890002046af0df5847a30903846514602f085f980463846514602f080f94899002940f0f2800346dde946014ff0ff37884240f0ec80ddf8d4e0bef1000f00f1e680bbf1000f00f1e280ddf880254398116a329f08431062349847ea09074e904ff6fe7087423398dc46a246b3464f945096519000f0e5834ff6ff70874240f0c1832398d0f888934ff420704f904ff4f07050904ff4a0705190d4e3012044904ff0000842ac40ad2046294602f037f906462046294602f032f94499002940f0a480dde94212914200f09f8011f8014b914240f09a80ddf8803541991a6a1143239a1962002a00f09080d2f870114ff0ff37002900f08b8048ea0b030022b2eb532f40f0848051f82320002a00f07f80a2eb010e5fea8e7279d16ff4403240f60f057244cff6fd75aa4270d301eb0e0c5cf8081c99426ad15cf80c1ca1f1011212f5803f63d3bcf1000f60d05cf8042c8a425cd1cef54032914258d82b90ddf880051d46806950b1eb080bf0070e10f80380012202fa0ef242ea0802c2546046002246ab01f061fe00284ff0000708bf4ff0ff373bd0ddf87c05c0b3a6f1011010f1021f4ff0000731d92b98a0f1011010f1021f2bd93198002300284e9301f07f822d98349920eae0722e9820eae07330988142a8bf0146359834914845a8bf4846359001f06dba012048904ff0000846af42ac3846214602f091f881463846214602f08cf8489951b34ff0ff37229a279b002f00f0478701f0bbbddde9460188423ff4e7ae024612f8015b8a42469200f0bf82821c469243788a4245ea032500f0b782c21c469283788a42319300f03486011d4691c078bb4644460002d1e6dde946218a42d0d0134613f8014b8b42cbd0951c56784a1bb2424ff0ff37c6d3aa198a42c3d1ddf8803543991a6a1143239a1962002abad0d2f87021002ab6d048ea0b0e0021b1eb5e2fb0d152f82e100029acd0891a8b07a9d16ff44033bc4640f60f070b44cff6fd77bb4267469ed3531853f8082c724597d153f80cccacf1011212f5803f90d328aa002b4ff0ff3782e8604026903ff48aaf53f8040c60457ff485afc1f540302a9984453ff67fafddf880051d468069664640b1ca080bf0070c835c012101fa0cf119438154c12efff46daf287801287ff469af2998002801f02380dde928b8a5f13f0700f0bcbf424501f01e850ef10202424501f019850ef10302424501f014850ef10402424501f00f859ef801209ef80260714693004fea460eca780e7905314fea820a1a917100baf1000f1b9101f0fb841b99002901f0f784ea1ac1f0f484924501f2f1843599b1eb0e02c1f0ec841b99914201f2e884349903eb0c06084301d000230be05feacc704ff0000306d1002e04d40aeb0600a842d8bf01231a9f1b9aa8eb07001890ddf87c0502fb0af9b0fa80f0400918430024c0074ff0000b19931f902e95cdf8709022e0dde9303002fb003c4a081cf80230339803f00f0803f0f0030344c907329808bf48ea0003ddf8a0800cf8023026988344dde9200181424ff0000088bf01200443e00708bf0f44e10704d0d94507d801f095bc00bf474518bfd94540f2a281b8eb070001f08b8439780b0901d0012211e0012801f083847b780bb102220ae00428c1f07c84ba78fb7852ea032301f07684042200bf2192a9eb0b02934201f26e8420901f9826930028c0d101f00f003390269809010128cde91d7432912dd14ff0000c2698ddf8a0801e9cdde91c97c007acd00ceb0b00b0fbfaf101fb1a0001eb0e02811952ea0100a0d4a9429ed2359882429bd2349800283ff482af2d98814294db2b98824291db2a988142bff68eaf29988242fff674af88e720f001014ff0000c16e0dde93030339f04fb00305308c45cd20704f00f0504f0f0043c44329a08bf45ea02042e9dc4540cf1020c6145b7d00beb0c02b2fbfaf404fb1a2704eb0e0907eb060859ea080427d4a84525d23598814522d2349858b12d9880451ddb2b9881451adb2a98804517da2998814514dadde930304fea580709fb00343398e35d03f00f0503f0f00303445feac870329808bf45ea00032e9de355501cb0fbfaf202fb1a0002eb0e04821954ea0200bbd4aa42b9d235988442b6d234980028a0d02d988242b0db2b988442addb2a988242aada2998844294dba6e70aeb0a1109fb02f2f5f71afb00f040bd00234ff0010ac646fff77bb9002021903190052e01f0ac832098002801f0a883fbf7f4f8002801f0a38395f800a00af10600864241f09c8347f65420c2f207000768002f01f09483387b797bba7bfb7b40ea012040ea024040ea0365a5f1810010f1800fc1f08483387c797cfa7c40ea0120b97c40ea014040ea02601490813810f5817f41f27483baf1000f4ff000001b97339077d04ff0000e00270ae000bf00f100404ea941f826000137574506f1010e17d21bf807007646411e1e29efd90beb0700aaeb070146aa42ab02f054fa00283ff489ad469942984eaa0f4442f82600e3e7bef1000f329500f0df80aef1010b4ff0000a4ead09e0be46d3450af1010aa6f1010605f1040500f0cd804ea850f82a100029f1d40020534686421dd005eb80077a68b2f1ff3f18dc5a1c934514d0ba68b2f1ff3f11dc9a1c93450dd0fa68b2f1ff3f0adcda1c934506d03a690433002a00f10400e0d400e000221b9846ab42ac7746009402f092fa00283ff43bad42980028c0d04af20d3146a8c0f24e018847b9e7329501204ff0000e90e04446fff720bc474508bfd94541f0e882ddf87c05002818bf012019990840012840f06684dde9300318990efb03004fea5a0700eb56021b98009701901a9801f09ffb002840f0548401f0caba2f4600f04abc239839464eaa1e46644601f0cefa00287ff4f9acddf88005ddf8d4e08069a446334660b10021b1eb572f08d1fa0809f00701875c012606fa01f139438154ddf838912a46b9f1000f3ff4ddac002a4ff0ff371cbfdde9301050ea01003ff4d5ac4f997145fff4d1aca1eb0e018a423ff6ccac50996145fff4c8aca1eb0c0188423ff6c3acddf87c15002700293ff4bdaca8f101111d4611f1021f7ff6b6ac2e99002900f02b85299921eae1732a9921eae1742b998a45a8bf8a462d998b45a8bf8b4600f01dbd002002e04ff0000e012099f804200f21950602f00f0601eae575754389214d43ed0a99f800c08df808510e2599f801a099f8023099f80370349212f0200f08bf012506fb05f501fb05f54fead5258df809514ff00d0508bf022506fb05f501fb05f54fead5258df80a514ff00c0508bf032506fb05f501fb05f54fead5258df80b514ff00b0508bf042506fb05f501fb05f54fead5258df80c514ff00a0508bf052506fb05f501fb05f54fead5258df80d514ff0090508bf062506fb05f501fb05f54fead5258df80e514ff0080508bf072506fb05f501fb05f54fead5258df80f514ff0070508bf082506fb05f501fb05f54fead5258df810514ff0060508bf092506fb05f501fb05f54fead5258df811514ff0050508bf0a2506fb05f501fb05f54fead5258df812514ff0040508bf0b2506fb05f501fb05f54fead5258df813514ff0030508bf0c2506fb05f501fb05f54fead5258df814514ff0020508bf0d2506fb05f501fb05f54fead5258df815514ff0010508bf0e2506fb05f501fb05f54fead5258df816514ff0000508bf0f256e434e43f60a00288df8176140f024824fea0a6242ea0c41309a380602eb214b329940ea0340ddf88480ddf86ca0aef1010501eb204000261390cdf85ce0159507e001f01f000b3801367645834400f0f8814ea850f82610b1f1ff3ff1dd33469d421cd04ea800eb83004268b2f1ff3f16dc0133ab4212d08268b2f1ff3f0fdc0133ab420bd0c268b2f1ff3f08dc0133ab4204d002690133002ae1d400e00022504646ab40af009702f0d5f8002800f0d081409900291d9100f0ba819df820019df82111189650ea0125cdf868b000f09f819df824719df825613f0447ea0667149e9df81f019df81e112e444fea002c41ea00229df8220106eb2747139e9df823310004f71b1a9e40ea03604ff0010e06eb204b28920eeb520203141c920ceb010201f003000bf1010119910bf1020116911d992d97571e1e97f718f31a01312990101a2e910eeb5201319a3390d8074ff000093290f8072b913090269509e000bf2e982b9909f10109a94508442e9000f04e812d9809eb00034345f1db2a988342eeda28980028ebd0dde91f104ff0000a03fb01071e98032880f09c802998ddf88480269d0028dbd0dde91c10012309fb010c34984fea5a011cf8011000f0100083ea1014c8b201f00f035feaca7e08bf03091846002b18bf01202043012815d10aeb0b06964211db359886420eda7008395c42adeb5c01f00f0501f0f0011943f60708bf45ea0311269d395429980128a6d00af1010040081cf80000bef1000fc1b24fea111808bf00f00f085ffa88f0002818bf01202043012817d119980aeb0003934212db359883420fda5808395c42ae16f8086001f00f0501f0f0013143db0708bf45ea0611269d39542998ddf8848002283ff474af0af1020040081cf80000bef1000f00f00f03c1b208bf0b091846002b18bf0120204301287ff460af16980aeb00069642fff65aaf35988642bff656af7008395c42adeb5c01f00f0501f0f0011943f60708bf45ea0311269d395445e7ddf8b8c008e000bf33980af1040a50450cf1020c3ff458af34981cf8016c00f010030120f6b2002580ea13130f2e88bf01251d43012d0beb0a0815d1904513db3598804510da4fea58053609795d42a8865d01f00f0401f0f00131435feacb7008bf44ea061179551cf8010c10f00f0e704618bf01201843012818d108f10106964214db3598864211da7008395c42aa12f80e6001f00f05329c319a45ea061501f0f001002c08bf41ea06053d549cf80000c6b200200f2e88bf01201843012816d108f10205954212db359885420fda690830097e5c42ad285c06f00f0506f0f006309c0643002c08bf45ea00167e549cf8000010f00f06304618bf0120184301287ff481af08f103039342fff67caf35988342bff678af5808395c42ab9b5d01f00f06329d46ea031601f0f001002d08bf41ea03063e5466e74af20d3146a8c0f24e0188479df81c019df81d11dde91aba159ddde917e605e09df81c019df81d11ddf85ce040ea012002e6002007e000274ff0010ac646fef73cbd4ff0ff303390339ffff7aab94446fff79eb80f4600e04f1cd90708d03199994205da3978339c01f00f0121433970b8f1010f05f1010700f0d8809b4580f2968007fb09045feacb7171465e4609d014f80e10349e01f0f00141ea0a0104f80e10329961452144319614da04eb0c060c4604f8012bb4426dd28f1cb7424a706ad2cf1cb7428a7066d20f1dca70b7423946edd360e00f465ee0102190427ff45ea92b9ab84652ea0b2c4ff0ff373ff458a958ea092226923ff453a9bcf5207f3ff64fa9269ab2f5f07f3ff64aa9baf10f0f2191cdf87ca03ff643a92e9910293ff63fa9ddf88005479a016a1143ddf87c250162002a00f08a8332992a9a614449428a42c0f283833499329a0027891a2a9a8a42bff625a926992d9a49428a42fff61fa92d9a31988242bff61aa9002b00f0858326eae671209134992eeaee7ea942a8bf2946dde9303034919842a8bf1846319077e34f1cd90708d03199994205da3978339c01f00f0121433970b8f1020f05f1020739d09b4536da07fb09045feacb717146d8460ad014f80e10ddf8d08001f0f00141ea0a0104f80e1032996145214414da04eb0c060c4604f8012bb4420fd28f1cb7424a700cd2cf1cb7428a7008d20f1dca70b7423946edd302e00f4600e04f1cd90707d0984505da3978339c01f00f0121433970ef1c3599691a11f1040f11d9229a279b2498013383422c982f9900eb01077ef432ab00f071be00bf359904378f42edd09b4539da07fb09045feacb7171465d4609d014f80e10349d01f0f00141ea0a0104f80e1032996145214418da04eb0c060c4604f8012bb44280f0cd8001f10208b0454a700cd201f10308b0458a7007d201f10408ca70b0454146e9d300e08846d90709d09d4207da98f80010339c01f00f01214388f800109b4536da791c01fb09015feacb7474465d4609d011f80e40349d04f0f00444ea0a0401f80e40329c644501eb040615da01eb0c04314601f8012ba14280f09580b11ca14272700ad2f11ca142b27006d2311df270a1420e46ecd300e03146dc0707d09d4205da0c78339d04f00f042c430c709b4536dab91c01fb09015feacb7474465d4609d011f80e40349d04f0f00444ea0a0401f80e40329c644501eb040615da01eb0c0400bf314601f8012ba14260d2b11ca14272700ad2f11ca142b27006d2311df270a1420e46edd300e03146dc0707d09d4205da0c78339d04f00f042c430c709b45bff64baff91c01fb09015feacb7474465d4609d011f80e40349d04f0f00444ea0a0401f80e40329c644501eb040615da01eb0c0400bf314601f8012ba1422ad2b11ca14272700ad2f11ca142b27006d2311df270a1420e46edd300e03146dc073ff41baf9d42bff618af0c78339d04f00f042c430c7010e701f10108d9077ff442af4ae7711cdc077ff478af7ee7711cdc07acd1b3e7711cdc07e3d1fde6b8f1010860d01bf8010b411e1f29f7d341b22029fef698af07eb400117f81000497840ea0122c12afef48eaf284631464eab00f0a9fd0028e2d1fef785bf002400235345b8bf5c45bef680af289908eb01065645bef67aaf5d45bef677af991a8e427ef773af211a8d427ef76faf9f1b1946b8bf3146b342e0464ff0000cd8bf6746be44d31b671bd8bf6746c61ba542aaeb0100c8bf2c46834238bf1846abeb04039e422e9328bf1e46349b2b96994507eb080329932d9442d1299b2d9f9f422fdd4ff0010c3be0ddf87c05002800f09381a9f1011010f1021f4ff000077ef635af2698a0f1011010f1021f7ef62eaf3198002300284e9300f0cf842d9820eae0722e9820eae07335985045a8bf5046359034982b998842a8bf0846349000f0bdbc299b2d9f7145a7eb0303b3fa83f34fea53134ff00007c8bf012703ea070c2b9b002b00f058814ff0040a2aea8e071a970eeb000743184fea5e06013f01f0010203f001041b967e0819962aea8706171918963294c61bdde930745018274435920eeb02048eea01024908179159082d9b169179192e9dc91a4fea560ba94238bf0d4601212e95bbf1010f88bf710801f0030321f00301129161082691410821913499159301eb5000411c03381490d00720904ff0ff3000eb56002a906ff0010009eb540300eb56002890981e13906ff00200ddf844e11c9600eb5600339e4ff00008109111931f90cde91dec08e02e9808f10108339e80454ff000073ef495ae6fea08014046bcf1000f2b9a18bf50182999359b421802fb0e910bb9002305e01b9b1a9ccb5ce34003f00f033193329b0bb9002304e0199b189ccb5ce3401b0130932d9b209f03443498002f03fb060a2198269f504439441cd15a46f4f7fffadde91dec359840b11799319a1af8010000f0f00010440af8010032980028b6d01699309a1af8010000f00f0010430af80100ace703fb06f4bcf1000f02fb0ef23ed01c980228ddd31398149910442144002200eb0b039c785f782a9dc4f3031444ea071701eb0b049542a770cad05f7810f80b50c7f3031747ea0517289d67709542bfd010f80b7013f8015cc7f3031747ea05171f9d01f80b709542b2d013f8017c13f8023cc7f30317043247ea031304389345a1f1040104f8013cc9d1a1e71c9b022b9ed31c9b082b01d200222be0119bddf848e003eb020c109a144400220ceb02077d781cf80260c5f3031545ea0616a51805f8016cbe787b78c6f3031646ea0313a354fb78be78c3f3031343ea06136b703b79ff780432c3f3031343ea07139645ab70dbd1159bdde91dec002b3ff468af531ccf5c8e5c159cc7f3031747ea0617012c87543ff45caf941c0f5dce5c159dc7f3031747ea0617022dc7543ff450af0a44d278095dc2f3031242ea0111015546e70027fef7a7bd00224ea8cde905402b9806eb0a0104903598cde902510190dde93210349f009701f089fb0746fef792bd00214ff0000e2091dde9280141ea0021b1eb5c0f28bf4fea5c01269ab1eb520f28bf51081c91013938bf394610912d99beeb0104d8bf3c463198411a9142a8bf11468c421e91bef66dad28984fea092a4fea002932982a994fea0b230f181c9920984a004943890028921b918742c8bf3846349d0ceb0702aa424ff000012a92b8bf1546bcf1030f38bf0121269e0022032e38bf012211431a91410819912b990aeb080219444b08b3eb520f219b1d9000f1010c4fea031015904fea520243ea031038bf4a08149029986910484429951891824228bf0246109b4ff0000a03fb03f080000d906ff0080000eb420016902d987045c8bf8646339835992b9701fb0e002e99309000203290701e1790b01e139058001290781c119008010f9041ea011026460e904fea5c00cdf830c00b9010e001780f9a01f00f0111430170359c319e30980136204430901e9800278642bef6e8ac2699f04308448642b8bf304628996fea400008440128319638db1b994ff0ff3200fb10101c99a1eb0a01012902eb41013bdb01fb01f2824237dd1699a1eb4a0202f10803032b02f1060126db01fb01f7874222dd052b02f1040121db01fb01f787421ddd072b02f102011cdb01fb01f7874218dd0af1040a092ba2f1080103db524382420a46dbdc08310ee02d983399359c219a4ff0000a39e00af1010a04e00af1020a01e00af1030abaf1010f29db08318a1f5243824224dcbaf1020f16db0a1f5243824215dcbaf1020f0fd08a1e5243824211dcbaf1040f08db01fb01f282420ddcbaf1040a01f10801e1d14ff0000a07e0aaf1010a04e0aaf1020a01e0aaf1030a2d983399359c219a319e30442b9b00fb04192a985344102aa0eb0a0800f08b8034988342b8bf18461d99814239da1d9f199af90739460ad0199f219a19f8071001f0f001114309f80710dde90b21b2eb600f09eb020715da149d09eb60063a4602f8015bb2420fd2ba1cb2427d700cd2fa1cb242bd7008d23a1dfd70b2421746edd302e03a4600e07a1c359c319ec70707d0814205da1078159900f00f0008431070ddf880c0e045c8bfc4462998844541da5feacc700bd04fea5c0019f80010219a01f0f00111430cf1010c09f800101898b0eb5c0f1add1898309e149d4fea5c0209eb0007b018044604f8015bbc4210d2811cb94225700fd2c41cbc420d700ad20436b118b9422570ecd305e009eb5c0102e0411c00e021462998359c319ec00708d02998844505da0878159a00f00f00104308702e9810280bd1012002901f982099349a01904846cdf8008002f0c7fbcae6b6fa86f01a99400908434ad11798864247d01399701e891b8842b8bf01466fea4100129908440128c0f29f800d99329a00fb101010998a1a4ff0ff31012a01eb42016ddb01fb01f7874269dd5100a1f1090202f10807032f02f1060157db01fb01f6864253dd052f02f1040152db01fb01f686424edd072f02f102014ddb01fb01f6864249dd3299092f01f104013291a2f1080103db524382420a46d9dc08313ee020988342d8bf034634988045a8bf80464345bff66daed80709d0580819f800102e9a01f0f0011143013309f800105908b1eb680f17da309f0e9d09eb68027c18264606f8015b96427ad2a01c904235707bd2e61c9642057076d20437781890423570ecd371e009eb53006ee0329a013204e0329a023201e0329a03323292329a012a23db08318a1f524382421edc329a022a19db0a1f5243824200f3ba80329a022a11d08a1e5243824200f3b580329a042a09db01fb01f2824200f3b080329a0831043a3292ded1002032901198329900eb010c20988342d8bf0346ddf8d0e0f445b8bfe646734543dad80709d0580819f800102e9a01f0f0011143013309f800105a08b2eb6e0f17da309e0e9d09eb6e07b018044604f8015bbc4212d2811cb94225701ad2c41cbc420d7015d20436b118b9422570ecd310e009eb53010de0601c02e0411c09e030465feac8713ff4cfad4345fff6c6adcae521465feace7007d0734505da08780f9a00f00f001043087032982a99c0430e18012002901f98209f349c01904846394622466346009602f0abfabe42d8bf3e46a045a8bfa0464645bff6a5adf00709d0700819f800102e9a01f0f0011143013609f800107108b1eb680f17da309b0e9d09eb68025c18274607f8015b974210d2a01c90423d700fd2e71c974205700ad20433581890423d70ecd305e009eb560002e0601c00e038465feac8713ff473ad4645fff66aad6ee53298013858e73298023855e73298033852e700223098359f09eb00014ea808902998009707902898cde905402698cde903102a98029034980190dde9321001f0c1fd0746fef73eba4ff0ff300df2345dbde8f08fb81a18bf4ff0ff300df2345dbde8f08fb0b586b008b3d0f87001f0b10023b3eb512f1ad150f82130bbb11b1a9d0714d16ff4403540f60f041d44cff6fd74a5420bd3184450f8085c8d4206d150f80c1ca1f1011515f5803f03d24ff0ff3006b0b0bd50f8045c8d42f7d1c3f540339942f3d80028f1d0037813f00b0fedd1144601ab0022002500f011f80028e5d00198dde903122060481c40086160a260e06028462561656106b0b0bd00bf91429cbf002070472de9f041855c4ff0050c6e0758bf4ff0030c15f0f30f02d1891a614502d20020bde8f0818418627894f802e0002e05d5e078267942ea0e2240ea062e002a4ff0000018bfbef1000fead0b2f5207fe7d8bef5f07f88bfbde8f081082d38bf0120072d18610ad8501c400800fb0ef0a1eb0c018842d3d804eb0c0828e004eb0c080efb02f5002000bf00eb0c04a142c6d008eb00073e78360903d00127b54213d2bde70c1b012cbad07e781eb10227b5420ad2b4e7042cb2d3bc78fe7854ea0626add00427b542aad3ad1b3844dcd158600120c3f800809a60c3f80ce0bde8f0812de9f04f89b0dde91257069005fb07f000294fea4007029100f0d48100200390089002984ff0010e00264ff0000b4ff000084ff0000c4ff000090497079205930be000bf4ff0000c4ff00308cdf80ca009f10109814500f0ba81bcf1000f40f0b4810699b8f1020f11f809a0ead0b8f1010f15d0ddf81cc0b8f1000f40f086805fea1a100af00f01089100f092800499814280f09a804ff0010c4ff0000882e1079abaf1000f00f07f800499514576d3a1eb0a010491089901eb01100901019114e000bfa15d089f01f0f0013943a1550136aaf1010a4ff0010eae4224bf00260bf1010bbaf1000f00f0598113998b45d1d20bfb0324bef1000fe3d0a91bb1eb5a0f88bf4fea5a0141b38d0804eb060817d0002208f10107a2eb850c6ff003057b1904350ceb05020432d870187158719871f5d1059b079a2f1d11f0030504d10ce0002711f0030508d0012d08f8070004d04744022d787018bfb870aaeb410abaf1000f0e440dd0129dae42b5d2a15d019f01f00f013943aaf1010a4ff0000ea155afe7129d4ff0000aa6e7039a52ea0a2213d004990392914280f08f804ff0010c4ff0000853e74ff0000c4ff002084ee74ff0000c4ff00108f4e000214ff0010c4ff00008039142e7089a091a049102eb02111201cdf80090019214e000bf1af80670089a07f0f00717440af80670013601384ff0010eae4224bf00260bf1010b002800f0d680139a934580f0cd800bfb03cabef1000fe2d0ad1bb5eb500ff14688bf45087db3ac080aeb06081ed0002308f10107a3eb840c6ff0030400bf07eb040e04340ceb040304338ef803108ef804108ef805108ef80610f0d1059bddf81cc0271d15f0030404d10ce0002715f0030408d0012c08f8071004d04744022c797018bfb970a0eb45002e4488b1129dae4210d21af80620019f02f00f023a430af8062001384ff0000e0028abd180e000bf129d0020ce469de7891a0491089901eb011009010191114613e000bf1af80620089c02f0f00222430af80620013601394ff0010eae4224bf00260bf1010b002953d0139a9345bff4ccae0bfb03cabef1000fe3d0ad1bb5eb510f88bf4d085db3ac080aeb060819d0002208f10107a2eb840c6ff0030400bf3a1904340ceb04030433d070107150719071f5d1059bddf81cc0271d15f0030404d10de0002715f0030409d0012c08f8070005d04744022c787018bfb87000bfa1eb45012e4489b1129dae42b6d21af80620019f02f00f023a4301394ff0000e0af806200029b0d103e000bf129d0021a4e74ff000084ff0000c029852e64ff0010c4ff0000803e04ff000084ff0000c0298ddf8009045e60120012107e04ff0010cb8fa88f0049f8cf001014009b7fa87f252091140084009b0bde8f08f00bf2de9f041826882b10121816007220020511e20fa01f1c90708bfbde8f0814ff0ff3191400843bde8f0818c46056841688d42e9d06b1c03602c78ff2c11d18b4200f0dc80ac1c046095f90120b2f1ff3fd6b200f3d080bf2e22d806f03f0602238fe062b2b2f1ff3f02dd07222046cfe7bf2c09d804f03f070e224ff0010e4ff000084ff0000c2ee0df2c0fd804f01f0715224ff0000c4ff001084ff0010e22e0df2e0fd806f01f0603236ae0ef2c0fd804f00f071c224ff0010c4ff000084ff0010e10e0ef2e58d806f00f06042358e0f02c40f093804ff0000820224ff0000c4ff0000e00278b424fea072603d0af1c07606d7803e00125856000251f46c02c45ea06046cd35b1a7d1ab3fa83f3b5fa85f55b096d092b434fea042403d001258560002503e07e1c06603d783746b8f1000f44ea050453d17d1ab5fa85f56d092b434fea042403d001258560002503e07e1c06603d783746bcf1000f44ea05043ed1791ab1fa81f1490919434fea042131d001238360002030e0f02e3ed1002605234ff0010e00250127ea074fea062617d18c4215d0621c0260247801379f4246ea040623d000bf8a424fea062609d0541c0460127801371643bb422246f3d116e02246013701254ff0000e9f4214468560dad112e07b1c0360387840ea0104bef1000f20467ff413afbde8f08114465feace7202d0091b8e4204d9012181600020bde8f081a11907462046002263463960bde8f041ffe78446081ab0f5806f01d90020704761454ff00000fad0002a18bf70472de9f04fabb09fed251a9fed250a9fed253a9e4600264ff0ff380df12c090df10c0ab7ee002ab0ee084ab6ee005ab1ee006ab9ee007a00206746019009e000bf49f826500af8064001368f42bc4600f0cb8217f8012b501e01280fd8012a23d18f4274d09cf901000cf10207b0f1ff3fc5b240f38f8000220724f5e1052a37d0042a30d0032a49d1002e00f0d982701e59f820501af8004093e200bf0000004f000000cf000000008f4254d00cf102079cf801008f4247d09cf802200cf103078f4240ea02203fd09cf803200cf104078f4240ea024037d09cf804200cf10507130600223ae0002e00f0aa82013eace7022ec0f0a582b21e59f82230701e59f8205049f820301af802301af800400af8003049f822500af8024096e702f0f80010281fd1002e00f08b82701e1af80030002b40f0858259f82050152a6fd16d420022002406463de20023012206e001220724002588e101220020002343ea000501242fe2a2f12000062827d8002e00f06782731e1af80300002800f0618259f82300242a40f0858080f00045012400221e4617e2bf2d5ad801220292002205f03f000e244ff0000b00928f4200f019819cf802300cf10308002215e1322a51d002f0fe0030284dd0402a40f0a380032ec0f03682701e1af80020002a00f03082b21e1af80230002b00f02a82033e1af80630002b00f0248209eb8202d2ed000a09eb860209eb8000d2ed001ad0ed002a70eee10a62eea00a71eea00acee1002800f00e82023e1af80600002840f0088259f82600122a58dc102a00f03081112a00f03381122a40f02c81454354e1df2d44d8002205f01f00152400924ff0010b0122bae0002e00f0eb81a2f13100013eb0fa80f01af806304009834240f0e08159f82600302a7bd100ee900af8eee00a94e1002b00f0d481023e1af80630002b00f0ce8159f82630212a40f3ed80222a00f02581232a00f02981252a40f03a8100ee903a01ee900af4ee610af1ee10fa48bff0ee601a11ee905a71e1ef2d72d805f00f001c24012274e0a2f11303022b80f0c480002d00f0a381b0f1004f08bf15f1010300f0eb80132a40f0f18090fbf5f5f1e0a2f1480010f1070f4ff00000c0f05f81002e00f05c81013e1af80600002800f0858109eb8600d0ed000af4ee420af1ee10faf5ee400ac8bff0ee420af1ee10fa48bff0ee430a432a72ee601a00f3b480412a00f0f380422a00f00f81432a40f0008161eea10a72ee600a1de1312a40f0948000ee900a20f00040b0f1ff4f4ff00002f4ee410aa8bf0122f1ee10fa4ff0000080f21c81f4ee400af1ee10fa00f11681002a40f01381fdeee00a10ee905a98e0f02d4ff0000040f00981002220244ff0000b009202928f427ff4e7ae00230122b8460002c02d43ea000535d3781aa8eb0103b0fa80f0b3fa83f340095b0918434fea05270ebf18f8013b00230122bbf1000f43ea07051fd1a8eb0103b3fa83f35b0918430ebf18f8013b002301222f02009d002d43ea07050ed1a8eb0103b3fa83f35b0918434fea05230ebf18f8010b0020012240ea0305474602984ff0ff3838b1601e25fa00f0c0071cbf08fa04f005430024a3e0162a10d1a842b8bf054637e0202a4cd0212a51d100ee903a01ee900a70eee10a8ee005442ae0a842c8bf054626e0451b24e0002800f1c680def800200546824238bf15469042019888bf0120019015e0442a48d0452a5fd0462a4ed161eea10a61e00025132a4ff0000208bf4ff00045002469e090fbf5f202fb15050022002462e000ee903a01ee900a61eea00a57e000ee900af5ee400af1ee10fa00f0928001ee903ac1eea00a4ae000ee903a01ee900a71eea00a43e000ee903a01ee900af4ee610af1ee10fac8bff0ee601a11ee905a37e060eea01a70eea00a74ee600a61eea00a2ce0f4ee450af1ee10fa18d570eea01a60eea10a22e0f4ee450af1ee10fa15d560ee861a60eea11a60eea10a16e060eea00a13e060eea01a60eea10a0ee071eea10a61eea00a72ee600a07e061ee870a61eea00a61eea00a70ee820a10ee905a012400224ff000005ab9202e09d0002c3ff436ad25f00040b0f1ff4ffff630ad00202bb0bde8f08f56b3701e1af8001059f82000d9b102ee100a20f00040b0f1ff4f4ff00001b4ee412aa8bf0121f1ee10fa4ff00000e4dab4ee402af1ee10fadfd40029ddd1bdeec20a10ee100a019adef804101143cef804102bb0bde8f08f00202bb0bde8f08f80b5002970d090f900c0bcf1200f5ffa8cfc07db012010604ff0010ec3f800c0704680bdacf1c20ebef11d0f0fd801295ad090f9011011f1410f55dc02211160407800f03f006cf38a108446e4e70cf0f00ebef1e00f23d1032945d390f901e01ef1410f40dc90f9021011f1410f3bdcbcf1e00f5ffa8ef101d1a02934d3bcf1ed0f01d19f292fd80321116042784fea0c3189b2807802f03f0241ea821136e004294ff0000ebbd3acf1f50111f1050fb6d390f901e01ef1410f15dc90f9021011f1410f10dc90f9031011f1410f0bdcbcf1f00f5ffa8ef101d1902904d3bcf1f40f03d18f2901d9002080bd042111604ff4e011427801ea8c4c817802f03f02c0784cea023201f03f0142ea811100f03f0001eb000c7fe72de9f04188b04af2bb261c46c0f24e0613460a46ddf83880002706f1ae05214627706770a770e77027716771a771e77127726772a772e77227736773a773e77327746774a774e77427756775a775e77527766776a776e77627776777a777e777a8470028c8f800705cd020786178a278e3780843104318434ff0010008d0e179a27911431ebf617a227a51ea020102d108b0bde8f081a07b14284ff00000f7d1217d8df8040041f0010121758df805008df806008df807008df808008df809008df80a008df80b008df80c008df80d008df80e008df80f008df810008df811008df812008df813008df814008df815008df816008df817008df818008df819008df81a008df81b008df81c008df81d008df81e008df81f0001a92046b047c8f8000018b1012008b0bde8f08106f1520120468847d8f80000002818bf012008b0bde8f081002804bf4ff0ff3070472de9f04f95b00df1200c8ce80f00f8f70efd002800f004824ef66c6a4ff29c5bccf2ff0ac2f2290b4ff6ff760024012547f67f797f2707e000bf48f2a351c0f24501bff32f8f8847dbf80080bff35f8fdbf80000bff35f8f01466ff39601b1f1005f07d10168514504d14168b1f57d7f00f093804ff47d70f9f731fc002800f0cf814ff60c41cff6ff7142182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d71c0f800a041608573a0f8c49180f8c371068446848684c684068546858685c685068646868686c686068746878687c6875be8001f41457ff45aafbff35f8f4be8000121b15be8001f4145f8d04fe7d0f87011209e4ff0ff3029b30022b2eb562f21d151f82600002800f03481431a98074ff0ff3017d16ff4403240f60f071a44cff6fd77ba420ed3ca1852f8080cb04240f0208152f80c1ca1f1011010f5803f04d24ff0ff3015b0bde8f08f002a4ff0ff30f8d052f8047c8f42f4d1c3f540339942f0d810ad104600222b460024fef716ff002800f0fe80239b0f22990603f00f0002eae17101fb00f289214a43d20a8df830200e2213f0200f08bf0f2408bf012200fb02f201fb02f24fead2228df831204ff00d0208bf022200fb02f201fb02f24fead2228df832204ff00c0208bf032200fb02f201fb02f24fead2228df833204ff00b0208bf042200fb02f201fb02f24fead2228df834204ff00a0208bf052200fb02f201fb02f24fead2228df835204ff0090208bf062200fb02f201fb02f24fead2228df836204ff0080208bf072200fb02f201fb02f24fead2228df837204ff0070208bf082200fb02f201fb02f24fead2228df838204ff0060208bf092200fb02f201fb02f24fead2228df839204ff0050208bf0a2200fb02f201fb02f24fead2228df83a204ff0040208bf0b2200fb02f201fb02f24fead2228df83b204ff0030208bf0c2200fb02f201fb02f24fead2228df83c204ff0020208bf0d2200fb02f201fb02f24fead2228df83d204ff0010208bf0e22424360434843c00a8df83f00c3f3001006900ca84a43cde9045008ac0b9dd20addf88890ddf884a0ddf87c8013cc1e9e8df83e2022462b46cdf80c90cdf808a0cdf80480009600f02df8dde91201a2455044c8bf5446a9454944c8bf4d46b042b8bf06464145b8bf8846a64211dd4146a8450edd249800680f280ad8249f491b321b07ebc0030130dc801d815a8199813860002015b0bde8f08f4ff0ff3015b0bde8f08f2de9f04f8fb0dde91c5a0e9129691e9eddf868c0002900f05c812f68002e40f05381874200f050819af80f100f2940f04b819af80e100e2940f046819af80d100d2940f041819af80c100c2940f03c819af80b100b2940f037819af80a100a2940f032819af80910092940f02d819af80810082940f028819af80710072940f023819af80610062940f01e819af80510052940f019819af80410042940f014819af80310032940f00f819af80210022940f00a819af80110012940f005819af80010002940f000811b9fb2eb0c044ff00001d8bf0c46db1bd8bf0b46d5f808e0ea681d46e919189fa444aeeb0403a7eb0c070694bb42b8bf1f46199b521b0b91591a8a42b8bf1146012f0c910797c0f2e5820c990129c0f2e1820ef101014c08069900eb6c000a9048100990042020ea81000590079801310138cde903014810029004fb05f000f102094ff0000acde9005c089407e000bf0c980af1010a8245a14400f0bb821c980e9b01680aeb050000fb04120b980a9f504400fb03705feacc7303d1099fdde9063810e0099b2e46d35c059d0778eb4007f0f00703f00f033b4400f8013b049bdde902783546d619da074fea580b0d9208d131465a466446f2f75efba446089c68e000bfb8f1020f64d3abf10102032a04d200211bf0030e35d15be06ff0030202ea58034f44b646c3f1000c3944471c8e18f578b478c5f3031545ea0415bc18e5703579f378c5f3031545ea0313237173793579c3f3031343ea05136371b3797679c3f30313043243ea06130ceb02060436a371dcd1dde9005c089c111d76461bf0030e26d04b1cf75c3246765cc7f30317ddf804c047ea06171646bef1010f475417d08f1cd65dd55cc6f3031646ea0516009dddf804c0bef1020fc654164608d03144c978f25dc1f3031141ea0211c15500bf5feac8713ff45aaf0d9a16f80b10002a4ff0000208bf042210f80b30d14003f00f0242ea011100f80b1047e7874200f095810026a1e16d68002d00f0018200244ff000090ae000bfdde90c14d8f804500c44ddf874a0ac4280f0f281ddf870800d94d8f800100f5d3e0903d001210c910ce000bf2e1b012e00f0e28121444d78002d00f0628102210c912e4617f00f011e9f1af801a0b7fa87f74fea571718bf012147ea010e1b9f4fea0a1b16f003014c4600f08980cde90a16d8f808100026b9fbf1f404fb119161449142a8bf012606ea0e06012e18d13c449c4215db189da94212da199dac420fda0e9d4e0804fb0504c907a75d6ff00f01554604bf0f215d4639401b9f2943a1550a990b9e012909f1010458d0d8f80810b4fbf1f606fb1141002461449142a8bf012404ea0e04012c18d1f4199c4215db189da94212da199dac420fda0e9d574604fb05044d08c907665d6ff00f0104bf0f215f46314039431b9f61550a990b9e022909f102042ad0d8f80810b4fbf1f505fb1141002461449142a8bf012404ea0e04012c19d1ec199c4216db189da94213da199dac4210da0e9d574604fb05044d08c907665d6ff00f0104bf0f215f4631400b9e39431b9f615509f10304711e0329b14405d23ae700bf0434a1453ff436afd8f808100026b4fbf1f505fb114161449142a8bf012606ea0e06012e1bd13d449d4218db189eb14215da199eb54212da0e9ed04605fb06054e08c907af5d6ff00f0104bf0f21d84639401b9f41ea0801ddf87080a955d8f80810661cb6fbf1f505fb1161002661449142a8bf012606ea0e06012e1cd13d449d4219db189eb14216da199eb54213da0e9e574605fb06054e08c90715f806806ff00f0104bf0f215f4601ea0801ddf8708039431b9fa955d8f80810a61cb6fbf1f505fb1161002661449142a8bf012606ea0e06012e1cd13d449d4219db189eb14216da199eb54213da0e9e574605fb06054e08c90715f806806ff00f0104bf0f215f4601ea0801ddf8708039431b9fa955d8f80810e61cb6fbf1f505fb1161002661449142a8bf012606ea0e06012e7ff466af3d449d42fff662af189eb142bff65eaf199eb542bff65aaf0e9e574605fb06054e08c90715f806806ff00f0104bf0f215f4601ea0801ddf8708039431b9fa95544e7042e78d38e78c97856ea012673d0042188e61b99002901dd012609e0b1fa81f149090027bcf1000fc8bf012707ea0106d5f808e0d5f80cb00bfb0ef9b9f1000f59d01e990024b1fa81f149094ff0ff380d91f1070c9107e000bf01340bfb0ef94c45a8f1010846d20c991c9e0029214618bf09eb0801b1fbfef536680ef1010705fb1e117f0805fb07664f08f65d042727ea8107fe4016f00f094f4618bf01270d9e3743012fd8d161449142d5db1b9f3d449d42d1db189fb942ceda199fbd42cbda0e9f1af8096005fb070e4d081ef80570c90707f00f0907f0f00747ea06071c9908bf49ea06170ef80570d1f808e0d1f80cb0b1e70fb0bde8f08f00bf002804bf4ff0ff3070472de9f04f99b01c461546cde90e01f7f782ff002800f0fb814ef66c6b4ff29c59cde90c54ccf2ff0bc2f229094ff6ff7a0024012547f67f787f2607e000bf48f2a351c0f24501bff32f8f8847d9f80070bff35f8fd9f80000bff35f8f01466ff39601b1f1005f07d10168594504d14168b1f57d7f00f0a3804ff47d70f8f7a3fe002800f0c4814ff60c41cff6ff7142182e3182f8f44382f8f54382f8f64382f8f74382f8f84382f8f94382f8fa4382f8fb4382f8fc4382f8fd4382f8fe4382f8ff4382f8004482f8014482f8024482f8034482f8044482f8054482f8064482f8074482f8084482f8094482f80a4482f80b4482f80c4482f80d4482f80e4482f80f4482f8104482f8114482f8124482f8134482f8144482f8154482f8164482f8174482f8184482f8194482f81a4482f81b4482f81c4482f81d4482f81e4482f81f4482f8204482f82144a0d14ff47d71c0f800b041608573a0f8c48180f8c361a0f820a0a0f822a0a0f824a0a0f826a0a0f828a0a0f82aa0a0f82ca0a0f82ea0a0f830a0a0f832a0a0f834a0a0f836a0a0f838a0a0f83aa0a0f83ca0a0f83ea059e8001fb9427ff44aafbff35f8f49e8000121b159e8001fb942f8d03fe7d0f87021279e249d4ff0ff302ab30021b1eb552f21d152f82500002800f01881811a88074ff0ff3017d16ff4403340f60f070b44cff6fd77bb420ed3571857f8080ca84240f0048157f80cacaaf1011010f5803f04d24ff0ff3019b0bde8f08f57f8040c50454ff0ff30f6d1c1f540318a45f2d8002ff0d0baf1c10fedd33878012840f0e580b0060f2206f00f0102eae070484389225043c00a8df854000e2016f0200f08bf012001fb00f002fb00f04fead0208df855004ff00d0008bf022001fb00f002fb00f04fead0208df856004ff00c0008bf032001fb00f002fb00f04fead0208df857004ff00b0008bf042001fb00f002fb00f04fead0208df858004ff00a0008bf052001fb00f002fb00f04fead0208df859004ff0090008bf062001fb00f002fb00f04fead0208df85a004ff0080008bf072001fb00f002fb00f04fead0208df85b004ff0070008bf082001fb00f002fb00f04fead0208df85c004ff0060008bf092001fb00f002fb00f04fead0208df85d004ff0050008bf0a2001fb00f002fb00f04fead0208df85e004ff0040008bf0b2001fb00f002fb00f04fead0208df85f004ff0030008bf0c2001fb00f002fb00f04fead0208df860004ff0020008bf0d2001fb00f002fb00f04fead0208df861004ff0010008bf0e2001fb00f002fb00f04fead0204ff000038df8620008bf0f235943299d51430020c90a002d8df863103ff427af289cc6f30010a7f13f0810ae0b9001e0013d1cd014f8010b411e1f29f8d341b220290fdb08eb400118f81000497840ea0122c12a06d3384651463346fef794f80028e5d14ff0ff3019b0bde8f08f0d9c2698ddf894b0a042c8bf04462a980894dde9289406300790cde909a704e058440b38013c834653d019f8010b1f28f6d908eb400118f81000497840ea0122c12ad8d3384651463346fef766f80028d1d00b980c9f069015a8cde90460ddf898a0229ddde90e010d9b239e3a46cde902ba00950196fff740fadde91201bb4558445144d8bfbb46a8422a46b8bf0246b142a8bf31465a4517dd089b994214dd2a9b1b680f2b10d8089ea2eb0b02a1eb060c079901ebc307ba802a9a21f833b0591c7e80a7f806c01160dde909a710aea8e7002019b0bde8f08f2de9f04fd3b0dde95ce5dde9648cdde9629a0d9075b1dde96050dde95e47a94224eae47b27eae774a8bf29468242a8bf024602e000244ff0000b09eb0e0008eb00055845c8bf83468d420ceb0a07b8bf2946a24588bf54469742b8bf3a468b45b8bf944202db53b0bde8f08f669804f0010701974fea5b07033809970bf101070090580008974e080c90002701200df14c0e0df10c0c02948ce80e00cde90a6b06e000bf0798012700284ff00000dad0c00707906698069708bf0830ddf800906ff007086ff004044ff0000b4ff0000a0f9018bf09f10809cdf838900f994fea5a00085c102300f0f002cc46a14610901194cdf8488000bf1cf8041f0eeb08001cf8014c9cf8015042ea141704f00f041443447242ea111401f00f01847211430eeb0904217242ea15119cf802600772617205f00f011143a17242ea1611817306f00f01114308f10808083b09f10809c173d1d11098ddf83890000110224b465d4600bf13f8041f0eeb050713f8014c5e7840ea141804f00f0404437c7440ea111401f00f010143f97440ea161193f802c0397506f00f010143797540ea1c11b9750cf00f010143083a05f1080587f81080bc74f975d5d1ddf84880119c0af1020a08f120082034baf1100f0bf1200b84d101980699049a48400299059b00eb01090399dde90a6b9145bff65baf0d9803fb090807e000bf0c9809f1020991458044bff64faf0d98dc4609fb03045feacb700bd0099dddf820c0605d1ef8007000f0f00007f00f0738446055b6eb5c0f28d94fea5c0a04eb060b464616f80a0006eb0a041ef80050204600f8015b58451dd205781ef80570a51c5d45077017d228781ef800002870e51c5d4510d2287804361ef80000287006eb0a055d45ddd306e000bf04eb5c05c80705d1b4e7651cdde90a6bc807afd08c45adda28781ef8007000f00f0007f0f00738442870a3e72de9f04f8bb01d9d6c68072c00f286802cb12f89b94200f08180012c7bd100287cd0d0f87061002e78d00027b7eb512f74d156f82170002f70d0a7eb060c5fea8c776bd16ff440370ceb070e40f60f07cff6fd77be4561d306eb0c0e5ef8086c8e425bd15ef80c6ca6f1011717f5803f54d35ef8047cb74250d1ccf54037be424cd8bef1000f49d0032e47d39ef80070022f43d19446aa69ddf86ca0dde91987dde917b9b2b14fead10801f00704da464ff0010b4f4612f808900bfa04f444ea090402f80840d346ddf86ca0b946dde919876c6805eb44021181721e1c9e01346c600996169e0ef101010396159e0a950296149ecde904b9cde900366346cde90687cdf820a0fbf795fa6968013969600bb0bde8f08f6f89b94204d14ff0ff300bb0bde8f08f022c3ff479afaf89b942f4d0032c3ff473afef89b942eed0042c3ff46daf2f8ab942e8d0052c3ff467af6f8ab942e2d0062c3ff461afaf8ab9427ff45dafdae700bf70b5049d8b42c8bf19469542b8bf2a46914205dadde905e3bef1000f01d103b170bdbef10f0c18bf9c46cb070ed04b10c45cbcf1000f03d004f00f05ae4504d904f0f00444ea0e04c45401314c1000eb61035510bcf1000f00eb620049d0ac425fda00bf1c78764604f00f05beeb141f38bf2609754598bf754645ea06141d4605f8014b854265d25c78764604f00f05beeb141f38bf2609754598bf75469c1c45ea061584425d7040d29c78764604f00f05beeb141f38bf2609754598bf7546dc1c45ea061584429d702fd2dc78764604f00f05beeb141f38bf2609754598bf754645ea06151c1ddd7084422346b9d31ce0ac4219da4eea0e1500bf1c4604f8015b844226d29c1c84425d700ed2dc1c84429d700ad21c1ddd7084422346edd304e01c46d00704d17ae71c46d0073ff477af9142bff674af2078bcf1000f03d0beeb101f98bf70bd00f00f0040ea0e10207070bd5c1cd007ebd161e72de9f04f81b04ef66c644ff29c55ccf2ff04c2f229054ff6ff7600274ff0010a47f67f7b4ff07f0807e000bf48f2a351c0f24501bff32f8f8847d5f80090bff35f8f2868bff35f8f01466ff39601b1f1005f07d10168a14204d14168b1f57d7f00f094804ff47d70f8f77af9002800f005814ff60c41cff6ff7100bf42182e3182f8f47382f8f57382f8f67382f8f77382f8f87382f8f97382f8fa7382f8fb7382f8fc7382f8fd7382f8fe7382f8ff7382f8007482f8017482f8027482f8037482f8047482f8057482f8067482f8077482f8087482f8097482f80a7482f80b7482f80c7482f80d7482f80e7482f80f7482f8107482f8117482f8127482f8137482f8147482f8157482f8167482f8177482f8187482f8197482f81a7482f81b7482f81c7482f81d7482f81e7482f81f7482f8207482f82174a0d14ff47d710460416080f80ea0a0f8c4b180f8c381068446848684c684068546858685c685068646868686c686068746878687c68755e8001f49457ff45aafbff35f8f45e8000121b155e8001f4945f8d04fe7d0f89812002974d104464ff41630f6f771f8014600284ff0000069d0002200bf8b1888544032b2f5163f58709870d870187158719871d871187258729872d872187358739873d873187458749874d874187558759875d875187658769876d876187758779877d87783f8200083f8210083f8220083f8230083f8240083f8250083f8260083f8270083f8280083f8290083f82a0083f82b0083f82c0083f82d0083f82e0083f82f0083f8300083f8310083f8320083f8330083f8340083f8350083f8360083f8370083f8380083f8390083f83a0083f83b0083f83c0083f83d0083f83e0083f83f009ad1c4f8981200e00021084601b0bde8f08f00bf70b5044690f8a00384f8a10350b3d4f8900347f64c6642f66535c2f20706c0f2440520b131682d31c4f8981310e040f22f00c0f200007844002122460023a847c4f89003316801f12d01c4f8981330b105f1e8022d219047002808bf70bd002084f8a10370bd00bf2de9f047a4b0d0f89442bff35f8fa4b142f691760546c0f2440620460021b04770b1d5f8900340b142f64d42c0f244022d2124b0bde8f047104724b0bde8f08747f64c69c2f20709d9f8007095f8a10300283fd0f7f7b4f8e0b3d5f89813781a17d495f8680110b995f82403e0b395f8a00385f8a10380b3d5f8900342f64d48c0f2440878b1d9f800102d31c5f898131de0d5f8900300b342f64d42c91bc0f24402904719e04ff64b70cff6ff70a8f1e807784400212a460023b847c5f89003d9f8001001f12d01c5f8981310b12d21c04710b1002085f8a10306f16601204624b0bde8f04708474af21f37c0f2470700200290adf80c00b84795f8680110b995f8240318b12846fff746ffe5e70df104084046f5f7dcfc02a9284600224ff0000afaf7ebfd81464046f5f7f7fdb9f1000f02d085f8a1a303e00146284600f009f89df80c000028c7d107f14c008047c3e700bf2de9f04f90f8d13300f5697c4cf82310591c41f69a134b4390f8d0b31b0c03eb8303a1eb4301bbf1090f80f8d1139cbf0bf1010b80f8d0b3bbf1040f0bf0030e05d200244ff000094ff0000a2ee00bf0fc0800244ff000094ff0000a00eb8406d6f8a473d6f8a853b7fbfbf3d6f8ac1303eb090203fb1b73b5fbfbf7d6f8b06307fb1b5553443a44b1fbfbf72b44b6fbfbf53a4407fb1b1105eb020905fb1b6219440434a04502eb010ad7d1bef1000f1dd05cf82450bef1010fb5fbfbf606fb1b55b144aa4412d00ceb84056e68bef1020fb6fbfbf404fb1b66a144b24406d0ae68b6fbfbf505fb1b66a944b244bafbfbf202eb0901c0f8cc13bde8f08f00bff0b500294ff6ff7e00f0af80012903d10022c90775d1a8e021f00102c2f1000c6ff0010241f221038418a578e7788eea05252cb26e0036b203ead43484ea450503ead6366c0086ea450624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead53585ea460686ea07273eb27d002db203ead63686ea470703ead5357e0085ea470736b27d002db203ead63686ea470703ead5357e0085ea470736b27d002db203ead63686ea470703ead5357e0085ea470736b27d002db203ead636023286ea470703ead5360ceb0205023586ea470e95d10232c90733d0805c41f221038eea002001b2420012b203ead13181ea400003ead232410082ea400009b2420012b203ead13181ea400003ead232410082ea400009b2420012b203ead13181ea400003ead232410082ea400009b2420012b203ead13181ea400003ead23181ea400e1ffa8ef0f0bd2de9f04fcbb00646c07c8b468df80600b08954998df80700000a8df808008df80a10080af1898df80b00080a17468df80d000020012b8df805308df809b08df80c108df80e008df80f008df810008df811008df812008df813008df814008df815008df816008df817008df818008df819008df81a008df81b008df81c008df81d008df81e008df81f008df820008df821008df822004cd1307e96f81780a0f1090144f62510c2f29240a1fb0002891a02eb510100970df10500b8eb910f88bf4fea9108c8ebc80706f11a0400f1010a00f10509093021463a46f0f7cdff06f1210506f1280029460722f0f7c5ff284621460722f0f7c0ff20465146032207f10905f0f7b9ff06f11d0049460422f0f7b3fff07d02289cbf0130f075009fbb450cd0b8f1240f13d94ff0ff304bb0bde8f08fbb454ff00905f07509d14ef60b67abb20df10502c0f247070120f02115e002200df12304aab28df82300a01c0df105018df82470f0f787ffa81c4af6610782b2c0f24607f02021460023b8474bb0bde8f08f2de9f04184b0044690f84d0000284ff0000000f09a8094f84f1042f28b0701f078018df8071094f85010c0f25b0701f007018df80610cde9020002a906200022b847054670b9002002adcde902000df1070128460122f0f74dff012029460122b847054694f84e00a8b1002602a906200022cde90266b84760b9cde9026602ae04f1540130460122f0f734ff572031460122b8470543002602a906200022cde90266b84768b90df108080df1060140460122cde90266f0f71dff312041460122b847054302a906200022cde90266b84768b9002002ae04f15301cde9020030460122f0f707ff462031460122b8470543002602a906200022cde90266b84768b90df1080804f1510140460222cde90266f0f7f0fe362041460222b847054302a9a3200022cde90266b847054302a997200022cde90266b84742f62b310543c0f2440102208847284615b104b0bde8f081002184f84e1084f84d10a16504b0bde8f08100bf2de9f04f8bb00190233002254ff000080df10c0a4ff001094ff0000b002402900be000bf09fa0bf0002f0bf1010b08bf0443bbf1070f354426d042f2d710c0f20000784410f80b0042f2d111c0f20001794411f80b6042f2fb0351463246c0f25b03cde90988cde90788cde90588cde90388984707460028d4d10298514628443246f0f785fecde742f2fb00c0f25b004ff60073002600f1340703a9c0f21f0381200c22cde90966cde90766cde90566cde90366b84730b9029803a928440c22f0f766fe8026ddf804c040f6b80146ea0400220ac2f200018cf823008cf824200a68002a00f0ad8045f2fd774ff6ff766ff0020241f22103c0f202070d681544ed7886ea052635b203ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea46060d6824b2154403ead4342d7984ea460686ea052635b203ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea460624b275002db203ead43484ea460603ead535740085ea46060d6824b2154403ead4346d7984ea460686ea052635b2740024b203ead53585ea460603ead434750084ea46062db2740024b203ead53585ea460603ead434750084ea46062db2740024b203ead53585ea460603ead434750084ea46062db2740024b203ead53585ea460603ead4350332ba4285ea46067ff460afb1b2090a01e0ff26ff218cf83e109cf84c109cf84d208cf83f1026218cf83d608cf84020ff288cf84b101cbf04208cf81c000bb0bde8f08f70b588b042f2fb0514460e46c0f25b05002181280791cde90511cde90311cde90111009107d11b023435694681202246a84720b905e069462246a84708b108b070bd6946054630462246f0f767fd284608b070bd2de9f0478cb08579972d17d00446fe2d0fd0fd2d2ad142f69570c0f25b008047002084f84e0084f84d00a0650cb0bde8f08720460cb0bde8f047cbe50020cde9040042f2fb00c0f25b00a0f1700304a9972000229847044642f62b31c0f244010220884720460cb0bde8f08742f2fb08002094f80c90677bc0f25b08cde90a00cde90800cde90600cde9040004a99f200422c047064620b901a804a90422f0f713fd002e6ff00100ddd19df80410bd29d9d19df805104029d5d19df806101029d1d194f84d00002852d047f64c60c2f20700006843f698210844a065002604a937200222cde90a66cde90866cde90666cde90466c047002840f0898002a804a90222f0f7e1fc04a947200122cde90a66cde90866cde90666cde90466c047002875d10df1030004a90122f0f7cdfc0020cde90a00cde90800cde90600cde9040004a905200122c047002860d10df1020004a9012249ea0726f0f7b6fc352d5bdc002d00f08180012d70d19df8020082e0002604a9052001228df80e60adf80c600296cde90a66cde90866cde90666cde90466c047d8bb0df1080a04a950460122f0f792fc04a935200122cde90a66cde90866cde90666cde90466c04738bb0af1010004a90122f0f77ffc002604a937200222cde90a66cde90866cde90666cde90466c04798b90af1020004a90222f0f76bfc04a947200122cde90a66cde90866cde90666cde904660126c04778b14ff0ff300cb0bde8f087362d6ed0572d15d194f84e00002800f08580572039e00af1040004a90122f0f747fc04f14f0051460722f0f741fc84f84d603ee700208df801006946284601228df8009000f04ef9312d044627d036e09df80200002e00f0380618bf4036704010f0380f10d09df808009df8091041f6ce430e22c0f2000302ea96027b449a5a41ea0020904239d8012000218df80110694601228df8006000f024f904460df103014620012200f01df9054602a93620022200f017f945ea040141ea00040025a8f1700604a9a3200022cde90455b047044304a997200022cde90455b0470443aee69df802000e2101ea900041f65641c0f200017944085a864204d96ff001000cb0bde8f0876946362002228df800708df8019000f0e6f80446d0e70020cde90a00cde90800cde90600cde9040004a9592001220125c04700287ff45caf04f1540004a90122f0f7b3fb84f84e5060e740f6b800c2f200000168002904bf4ff0ff30704780b584b000684ef2173102904ff41630039002a8c0f2470188474ff4f07042f29f7e01904ff4207cc0f25b0e0020002100220023cdf800c0f04704b080bd00bf2de9f04340f6b801c2f2000109684ff0000e01f1020c4cf6cd4340f2762808e00ef1010ebef5f07f0cf5a07c08bfbde8f083aef1a0096ff00906644607e000bf07eb0711a170053445452e46e8d290f84c1006f10a054f1e112905fb03f208bf570d122908d1a6f1e6019f294ff000079cbfb9f19f0f077b07eb071104f8021c90f84c1006f10c024f1e112903fb02f208bf570d122908d1a6f1e4019f294ff000079cbfb9f19f0f077b07eb071104f8011c90f84c1006f10e024f1e112903fb02f208bf570d122908d1a6f1e2019f294ff000079cbfb9f19f0f077b07eb0711217090f84c1006f110024f1e112903fb02f208bf570d122908d1a6f1e0019f294ff000079cbfb9f19f0f077b07eb0711617090f84c1006f112024f1e112903fb02f208bf570d12298ad1a6f1de019f294ff000079cbfb9f19f0f077b80e700bf2de9f04383b042f28b0914460e460546c0f25b090027694606200022cde90077c84710b103b0bde8f083e846404631462246cde90077f0f7c9fa284641462246c84703b0bde8f08370b50446d0f840010d4638b92046f6f7ddf90028c4f8400108bf70bd42f64d46c0f2440606f140018847d4f8400129463246bde8704010472de9f04f81b0934612788ab1022300bf0beb030717f8012c62b11bf8032062b17a784ab1ba780433002af1d1023b04e0002205e0013b00e0013303eb4302520042eae272931c02f1010c01eb810203f0030e23f0030a00eb8213a3f5a0784ff0ff3906e009f10109b9f10d0f08f5a0786bd009eb010202eb8202bcf1030f00eb821605d24ff0ff34bef1000f2ed1e9e70024474604e000bfa24507f1020721d0621cd209042a03d83a7802f0f0023a70a21cd209042a03d87a7802f00f027a70e21cd209042a03d87a7802f0f0027a700434e209042adfd86208b55c05f00f05b554d9e7013cbef1000fbbd0a21cd509042d08d85208b55ce7076ff00f0708bf0f273d40b554bef1010fabd0e21cd509042d09d85208b55ce7074ff00f0708bf6ff00f073d40b554bef1020f9ad0221dd509042d96d85208e407b55c6ff00f0408bf0f242c40b4548ce79bf80010cdf800b0002900f0ce80022041f2410a41f2420b41f2430808e0009a063012f8011f03330029009200f0bd80a1f17f0717f15f0ff1d341f2d132c0f2000201eb41017a4402eb81014ff20014a1f5c079cff6ff7402e014f52074ded0494619f9027bc509042d09d8b7f1ff3f06dc1a1992f8016f46f0f00682f8016f5ffa87fe5fea4e6208d5042d06d81a1992f8017f47f00f0782f8017f5fea8e620ad540f27d22904206d81a1992f8027f47f0f00782f8027f5feace6209d5b0f51f7f06d81a1992f8027f47f00f0782f8027f5fea0e724fea900c09d5bcf19e0f06d81a1992f8036f46f0f00682f8036f5fea4e720ad540f27a22904206d81a1992f8037f47f00f0782f8037f91f90110042d09d8b1f1ff3f06dc1a1912f80a7047f0f00702f80a70c9b24a0608d5042d06d81a1912f80a7047f00f0702f80a708a060ad540f27d22904206d81a1912f80b7047f0f00702f80b70ca0609d5b0f51f7f06d81a1912f80b7047f00f0702f80b700a0709d5bcf19e0f06d81a1912f8087047f0f00702f8087049077ff565af40f27a2188423ff660af191911f8082042f00f0201f8082057e701b0bde8f08f00bf2de9f04381b04ff29c51c2f229010f68044638466ff39600b0f1005fbff35f8f0cd138684ef66c61ccf2ff01884205d17868b0f57d7f18bf002700e0002745f64d50c0f24600804741f2a961c0f2000141f2ae62c0f2000279447a44022808bf0a4641f29061c0f2000179440128204618bf114600f074fe47b197f87b0180b141f28e61c0f20001794419e041f27b61c0f200017944204601b0bde8f04300f05fbe97f8740141f26862c0f2000241f26561c0f2000179447a44002808bf1146204600f04dfe97f8750141f24562c0f2000241f24f61c0f200017944012820467a4408bf114600f03bfe41f23d61c0f200017944204600f033fe97f9c311204600f022ff41f22961c0f200017944204600f026fef6f7b2fd41f20b68c0f2000841f21766c0f200067e44054600f003003146f844012808bf414641f2f559c0f2000902282046f94408bf494600f008fea808012808bf4646022808bf4e462046314600f0fdfd41f2d351c0f200017944204600f0f5fdd7f8840198b147f64c61c2f207010a68821a012a0bdb0968401a44f6d35100f2e730c1f26201a0fb0101890900e00021204600f0eafe41f29551c0f200017944204600f0d2fdd7f8bc11204600f0ddfe41f28251c0f200017944204600f0c5fdb7f8c011204600f0d0fe41f26a51c0f200017944204600f0b8fd97f8c211204600f0c3fe41f25351c0f200017944204600f0abfdb7f8c611204600f0b6fe41f24055c0f200057d442046294600f09dfdb7f8c811204600f0a8fe2046294600f094fdb7f8ca11204600f09ffe41f21451c0f200017944204600f087fdd7f88011204600f092fe41f2ff41c0f200017944204600f07afd97f9c511204600f069fe41f2eb41c0f200017944204600f06dfd97f9c411204601b0bde8f04300f059be00bf2de9f04f81b0134681464a1c00f08f808e0a4ff0000b19f80b20002a00f0888109eb0b077a78002a00f00a81ba78002a00f00981fa78002a00f008813a79002a00f007817a79002a00f00681ba79002a00f00581fa79002a00f004813a7a002a00f003817a7a002a00f00281ba7a002a00f00181fa7a002a00f000813a7b002a00f0ff807a7b002a00f0fe80ba7b002a00f0fd80fa7b002a00f0fc803a7c002a00f0fb807a7c002a00f0fa80ba7c002a00f0fb80fa7c002a00f0fc803a7d002a00f0fd807a7d002a00f0fe80ba7d002a00f0ff80fa7d002a00f000813a7e002a00f001817a7e002a00f00281ba7e002a00f00381fa7e002a00f004813a7f002a00f005817a7f002a00f00681ba7f002a00f00781fa7f002a00f008810bf1200bbbf1600f7ff477af4ff0600b00e1002119f80120002a00f0af8109eb01056a78002a00f0b080aa78002a00f0b180ea78002a00f0b2802a79002a00f0b3806a79002a00f0b480aa79002a00f0b580ea79002a00f0b6802a7a002a00f0b7806a7a002a00f0b880aa7a002a00f0b980ea7a002a00f0ba802a7b002a00f0bb806a7b002a00f0bc80aa7b002a00f0bd80ea7b002a00f050812a7c002a00f04e816a7c002a00f04c81aa7c002a00f04a81ea7c002a00f048812a7d002a00f046816a7d002a00f04481aa7d002a00f04281ea7d002a00f040812a7e002a00f03e816a7e002a00f03c81aa7e002a00f03a81ea7e002a00f038812a7f002a00f036816a7f002a00f03481aa7f002a00f03281ea7f002a00f03081203160297ff479af32e10bf1010b74e00bf1020b71e00bf1030b6ee00bf1040b6be00bf1050b68e00bf1060b65e00bf1070b62e00bf1080b5fe00bf1090b5ce00bf10a0b59e00bf10b0b56e00bf10c0b53e00bf10d0b50e00bf10e0b4de00bf10f0b4ae00bf1100b47e00bf1110b44e00131f6e00bf1120b3fe00231f1e00bf1130b3ae00331ece00bf1140b35e00431e7e00bf1150b30e00531e2e00bf1160b2be00631dde00bf1170b26e00731d8e00bf1180b21e00831d3e00bf1190b1ce00931cee00bf11a0b17e00a31c9e00bf11b0b12e00b31c4e00bf11c0b0de00c31bfe00bf11d0b08e00d31bae00bf11e0b03e00e31b5e00bf11f0bb1f5205f4ff0010100931fd364234ff47a7442f2107700bf01eb81025200b6fbf2f50a2d11d301fb03f2b6fbf2f50a2d0bd301fb04f2b6fbf2f50a2d05d37943b6fbf1f2092ae7d800e011465846bbf15f0f98bf5f20c0f1000c1ceb0b0a53d0b6fbf1f74cf6cd4207f13003ccf6cc4209f80b300a29a1fb023547d31af1010342d007fb11674fead508b7fbf8fe48f21f520ef1300309eb0b06c5f2eb1273706429a1fb023434d31af102032cd00efb18776409b7fbf4f544f6d35205f13003c1f26202b370b1f57a7fa1fb022323d31af1030218d005fb14729b0941f25975b2fbf3f7cdf2b715a1fb055407f13005f57007fb132642f210720bf1040b91424fea5431a9d209e0834607e00bf1010b04e00bf1020b01e00bf1030b0020009b09f80b002de00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2904d849444ff03f020a7003d1002189f85f1001e000204870002119f80100002800f0a18009eb0105687800285ed0a87800285dd0e87800285cd0287900285bd0687900285ad0a879002859d0e879002858d0287a002857d0687a002856d0a87a002855d0e87a002854d0287b002853d0687b002852d0a87b002851d0e87b002850d0287c00284fd0687c00284ed0a87c00284dd0e87c00284cd0287d00284bd0687d00284ad0a87d002849d0e87d002848d0287e002847d0687e002846d0a87e002845d0e87e002844d0287f002843d0687f002842d0a87f002841d0e87f002840d0203160297ff498af44e001313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2905d849444ff02f00087040f09580002089f85f00581c00f094809d0a4ff0000e19f80e00002800f08d8109eb0e067078002800f00f81b078002800f00e81f078002800f00d813079002800f00c817079002800f00b81b079002800f00a81f079002800f00981307a002800f00881707a002800f00781b07a002800f00681f07a002800f00581307b002800f00481707b002800f00381b07b002800f00281f07b002800f00181307c002800f00081707c002800f0ff80b07c002800f00081f07c002800f00181307d002800f00281707d002800f00381b07d002800f00481f07d002800f00581307e002800f00681707e002800f00781b07e002800f00881f07e002800f00981307f002800f00a81707f002800f00b81b07f002800f00c81f07f002800f00d810ef1200ebef1600f7ff477af4ff0600e05e100204870581c7ff46caf002119f80100002800f0aa8109eb01025078002800f0b0809078002800f0b180d078002800f0b2801079002800f0b3805079002800f0b4809079002800f0b580d079002800f0b680107a002800f0b780507a002800f0b880907a002800f0b980d07a002800f0ba80107b002800f0bb80507b002800f0bc80907b002800f0bd80d07b002800f04b81107c002800f04981507c002800f04781907c002800f04581d07c002800f04381107d002800f04181507d002800f03f81907d002800f03d81d07d002800f03b81107e002800f03981507e002800f03781907e002800f03581d07e002800f03381107f002800f03181507f002800f02f81907f002800f02d81d07f002800f02b81203160297ff479af2de10ef1010e74e00ef1020e71e00ef1030e6ee00ef1040e6be00ef1050e68e00ef1060e65e00ef1070e62e00ef1080e5fe00ef1090e5ce00ef10a0e59e00ef10b0e56e00ef10c0e53e00ef10d0e50e00ef10e0e4de00ef10f0e4ae00ef1100e47e00ef1110e44e00131f1e00ef1120e3fe00231ece00ef1130e3ae00331e7e00ef1140e35e00431e2e00ef1150e30e00531dde00ef1160e2be00631d8e00ef1170e26e00731d3e00ef1180e21e00831cee00ef1190e1ce00931c9e00ef11a0e17e00a31c4e00ef11b0e12e00b31bfe00ef11c0e0de00c31bae00ef11d0e08e00d31b5e00ef11e0e03e00e31b0e00ef11f0e0122b3f5205f1ed364234ff47a7442f2107602eb82004100b5fbf1f00a2811d302fb03f1b5fbf1f00a280bd302fb04f1b5fbf1f00a2805d37243b5fbf2f00928e7d800e00a46f046bef15f0f98bf4ff05f08c8f1000c42f2107a1ceb0e074dd0b5fbf2f30a2a03f1300009f80e004cf6cd40ccf6cc40a2fb000641d3781c3dd003fb1253f608b3fbf6f409eb0e0504f13000687048f21f50c5f2eb10642aa2fb000130d3b81c29d004fb16334e09b3fbf6f4b2f57a7f04f13000a87044f6d350c1f26200a2fb000120d3f81c16d004fb1630890941f25974b0fbf1f3cdf2b714a2fb044603f13004ec7003fb11050ef1040e52454fea5632afd209e0c64607e00ef1010e04e00ef1020e01e00ef1030e002009f80e0001b0bde8f08f0f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2904d849444ff03f00087005d1002089f85f0001b0bde8f08f0020487001b0bde8f08f2de9f0411f22831813f81f7c002f00f0808013f81e7c002f7dd013f81d7c002f7bd013f81c7c002f79d013f81b7c002f77d013f81a7c002f75d013f8197c002f73d013f8187c002f71d013f8177c002f6fd013f8167c002f6dd013f8157c002f6bd013f8147c002f69d013f8137c002f67d013f8127c002f65d013f8117c002f63d013f8107c002f61d013f80f7c002f5fd013f80e7c002f5dd013f80d7c002f5bd013f80c7c002f59d013f80b7c002f57d013f80a7c002f55d013f8097c002f53d013f8087c002f51d013f8077c002f4fd013f8067c002f4dd013f8057c002f4bd013f8047c002f49d013f8037c002f47d013f8027c002f45d013f8013c002b43d0835c002b41d020327f2a7ff47baf64e01f3a3ae01e3a38e01d3a36e01c3a34e01b3a32e01a3a30e0193a2ee0183a2ce0173a2ae0163a28e0153a26e0143a24e0133a22e0123a20e0113a1ee0103a1ce00f3a1ae00e3a18e00d3a16e00c3a14e00b3a12e00a3a10e0093a0ee0083a0ce0073a0ae0063a08e0053a06e0043a04e0033a02e0023a00e0013a5f2a25d8c2f15d0cc2f15e0ec2f15f03c2f160080244002509e000bffc78002cf47008bfbde8f0810435a84510d04e5d565586b1ab420bd04f197c78561974704cb1ae4504d0bc78b47024b1ac45e5d1002180f85f10bde8f08100bf7f2905d140f2eb71c0f20001794403e7b1f1ff3fc8bf0fe0b0b540f2d572c0f200027a440d4611460446fff7f5fe20466942bde8b040ffe72de9f04f4ff0000c10f80c20002a00f0c48000eb0c035a78002a62d09a78002a62d0da78002a62d01a79002a62d05a79002a62d09a79002a62d0da79002a62d01a7a002a62d05a7a002a62d09a7a002a62d0da7a002a62d01a7b002a62d05a7b002a62d09a7b002a62d0da7b002a62d01a7c002a62d05a7c002a62d09a7c002a62d0da7c002a62d01a7d002a62d05a7d002a62d09a7d002a62d0da7d002a62d01a7e002a62d05a7e002a62d09a7e002a62d0da7e002a62d01a7f002a62d05a7f002a62d09a7f002a62d0da7f002a62d00cf1200cbcf1600f7ff496af4ff0600c5be00cf1010c58e00cf1020c55e00cf1030c52e00cf1040c4fe00cf1050c4ce00cf1060c49e00cf1070c46e00cf1080c43e00cf1090c40e00cf10a0c3de00cf10b0c3ae00cf10c0c37e00cf10d0c34e00cf10e0c31e00cf10f0c2ee00cf1100c2be00cf1110c28e00cf1120c25e00cf1130c22e00cf1140c1fe00cf1150c1ce00cf1160c19e00cf1170c16e00cf1180c13e00cf1190c10e00cf11a0c0de00cf11b0c0ae00cf11c0c07e00cf11d0c04e00cf11e0c01e00cf11f0c01230a291fd364274ff47a7642f2107500bf03eb83025200b1fbf2f40a2c11d303fb07f2b1fbf2f40a2c0bd303fb06f2b1fbf2f40a2c05d36b43b1fbf3f2092ae7d800e01346e2464cf6cd49bcf15f0f98bf4ff05f0acaf1000eccf6cc491eeb0c0b4ed0b1fbf3f50a2b05f1300200f80c20a3fb092446d31bf1010241d005fb1316e508b6fbf5f800eb0c0108f130024a7048f21f52c5f2eb12642ba3fb022434d31bf102022cd008fb15656609b5fbf6f4b3f57a7f04f130028a7044f6d352c1f26202a3fb027223d31bf1030718d004fb1654920941f25976b4fbf2f5cdf2b716a3fb066705f13006ce7005fb124142f210720cf1040c93424fea5733aed209e0d44607e00cf1010c04e00cf1020c01e00cf1030c002100f80c10bde8f08f0000434d01ffff0000000000000052420100ff00000008031000000000000000000046616365636c61772f3336000000000000000000000000000000002020202020002020000000505050000000000000000000005050f85050f85050000000002070a8a07028a8702000000048a85010202854480000000020505020689090680000002020200000000000000000000010204040404020100000000040201010101020400000000000005020f82050000000000000002020f82020000000000000000000000020204000000000000000f800000000000000000000000000202000000000080810102020404000000000708898a8c88888700000000020602020202020700000000070888808102040f8000000007088083008088870000000000818284888f8080800000000f88080f00808887000000000708080f08888887000000000f808081010202020000000007088887088888870000000007088888878080870000000000000202000002020000000000000202000002020400000000008102040201008000000000000f80000f8000000000000004020100810204000000000708888102000202000000000708898a8a89880780000000070888888f888888800000000f08888f0888888f000000000708880808080887000000000e0908888888890e000000000f88080f0808080f800000000f88080f0808080800000000070888080b888887000000000888888f888888888000000007020202020202070000000003810101010909060000000008890a0c0c0a090880000000080808080808080f80000000088d8a8a888888888000000008888c8a89888888800000000708888888888887000000000f0888888f080808000000000708888888888a87008000000f0888888f0a0908800000000708880700808887000000000f8202020202020200000000088888888888888700000000088888850505020200000000088888888a8a8d88800000000888850202050888800000000888850502020202000000000f8081020408080f8000000007040404040404070000000004040202010100808000000007010101010101070000000205088000000000000000000000000000000000000f80040200000000000000000000000000000700878888878000000008080f088888888f00000000000007088808088700000000008087888888888780000000000007088f8808078000000001820702020202020000000000000788888888878087000008080f08888888888000000202000602020202070000000080800180808080808483000004040485060605048000000006020202020202070000000000000f0a8a8a8a8a8000000000000f08888888888000000000000708888888870000000000000f088888888f0808000000000788888888878080800000000b8c0808080800000000000007880700808f00000000020207020202020180000000000008888888888780000000000008888505020200000000000008888a8a8a870000000000000885020205088000000000000888888888878087000000000f810204080f800000000182020402020201800000000202020202020202000000000601010081010106000000048a89000000000000000009f0535593747c181040101010201020c005353a829c51bd314a810260d5b0bfe096d6963205220006d6963204c20006d6963203f20006e6f206374780061726d200063666720006f6666200070646d00636f646563002072656720002074626c2000540053002d00206c65617365200073207461702000200042400020736b697020002f002066722000206e7466200020756e7265672000000000", "desc": "append injected blobs to main-app payload" }, { "offset": 779123, "old": "805a3900", - "new": "186e3a00", + "new": "a86f3a00", "desc": "main-app subheader payload size (ps)" }, { "offset": 152, "old": "005b3900", - "new": "986e3a00", + "new": "28703a00", "desc": "main-app TOC entry size (ps + 128)" }, { "offset": 779243, "old": "805a3904", - "new": "186e3a04", + "new": "a86f3a04", "desc": "main-app preamble length (low 24 bits)" }, { "offset": 779247, "old": "effdbcea", - "new": "cbb2ae81", + "new": "a65bcd38", "desc": "[5] ota/s200_firmware_ota.bin preamble crc32" }, { "offset": 156, "old": "c0c6322a", - "new": "35dc5a11", + "new": "27573dd4", "desc": "[5] ota/s200_firmware_ota.bin component crc32c (TOC)" }, { "offset": 779127, "old": "c0c6322a", - "new": "35dc5a11", + "new": "27573dd4", "desc": "[5] ota/s200_firmware_ota.bin component crc32c (subheader)" } ] diff --git a/app/graphics/display-list.ts b/app/graphics/display-list.ts index 108f9b27..b93a82cf 100644 --- a/app/graphics/display-list.ts +++ b/app/graphics/display-list.ts @@ -11,11 +11,18 @@ export const DrawOp = { RECT_COPY: 2, IMAGE: 4, ROUNDED_RECT: 8, CLEAR: 9, DRAWS export const DISPLAY_LIST_RECORD = 7; /** Bridge opcode bit: a clip rect follows the call's depth. */ const CLIPPED = 128; +/** Bridge sentinel for a rounded rect without an outside color. */ +const NO_OUTSIDE = 16; export type ListImage = { readonly width: number; readonly height: number; readonly pixels: Uint8Array }; /** Revision 35: a call draws only inside its clip, in list coordinates (and moves with its depth). */ export type ListClip = { readonly x: number; readonly y: number; readonly width: number; readonly height: number }; export type ListCall = ( - | { op: typeof DrawOp.ROUNDED_RECT; x: DrawValue; y: DrawValue; width: number; height: number; radius: number; background: number; border: number } + /** + * The background max-blends (0 leaves the interior alone); border 16 draws no + * outline. `outside` (revision 36) colors the box's pixels outside the + * rounded shape, cutting what is underneath to the corners. + */ + | { op: typeof DrawOp.ROUNDED_RECT; x: DrawValue; y: DrawValue; width: number; height: number; radius: number; background: number; border: number; outside?: number } | { op: typeof DrawOp.IMAGE; resource: number; x: number; y: number; transparent: boolean } | { op: typeof DrawOp.RECT_COPY; resource: number; x: DrawValue; y: DrawValue; width: number; height: number; dx: DrawValue; dy: DrawValue } /** Fill with a 4-bit color: the clip rect when there is one, else the whole screen. */ @@ -88,6 +95,7 @@ export function encodeDisplayList(placed: PlacedDisplayList, now = Date.now()): out.raw(encodeValue(call.x)); out.raw(encodeValue(call.y)); out.u16(integer(call.width, 1, 640)); out.u16(integer(call.height, 1, 480)); out.u16(call.radius); out.u8(integer(call.background, 0, 15)); out.u8(integer(call.border, 0, 16)); + out.u8(call.outside === undefined ? NO_OUTSIDE : integer(call.outside, 0, 15)); } else if (call.op === DrawOp.CLEAR) { out.u8(integer(call.color, 0, 15)); } else if (call.op === DrawOp.DRAWS) { @@ -127,7 +135,11 @@ export function readDisplayList(bytes: Uint8Array, offset: number, now = Date.no const header = r.u8(), op = header & ~CLIPPED, callDepth = r.i16(); const clip = header & CLIPPED ? { x: r.i16(), y: r.i16(), width: r.u16(), height: r.u16() } : undefined; const common = clip ? { depth: callDepth, clip } : { depth: callDepth }; - if (op === DrawOp.ROUNDED_RECT) calls.push({ op, ...common, x: readValue(r), y: readValue(r), width: r.u16(), height: r.u16(), radius: r.u16(), background: r.u8(), border: r.u8() }); + if (op === DrawOp.ROUNDED_RECT) { + const call = { op, ...common, x: readValue(r), y: readValue(r), width: r.u16(), height: r.u16(), radius: r.u16(), background: r.u8(), border: r.u8() }; + const outside = r.u8(); + calls.push(outside === NO_OUTSIDE ? call : { ...call, outside }); + } else if (op === DrawOp.IMAGE) calls.push({ op, ...common, resource: r.u16(), x: r.i16(), y: r.i16(), transparent: (r.u8() & 16) !== 0 }); else if (op === DrawOp.RECT_COPY) calls.push({ op, ...common, resource: r.u16(), x: readValue(r), y: readValue(r), width: r.u16(), height: r.u16(), dx: readValue(r), dy: readValue(r) }); else if (op === DrawOp.CLEAR) calls.push({ op, ...common, color: r.u8() }); @@ -157,7 +169,8 @@ export function dimDisplayList(list: DisplayList, factor: number): DisplayList { if (list.calls.some(c => c.op === DrawOp.DRAWS)) return { ...list, calls: [] }; const dim = (v: number) => v === 0 ? 0 : Math.max(1, Math.round(v * factor)); return { ...list, resources: list.resources.map(r => ({ ...r, pixels: r.pixels.map(dim) })), - calls: list.calls.map(c => c.op === DrawOp.ROUNDED_RECT ? { ...c, background: Math.min(15, Math.round(c.background * factor)), border: c.border === 16 ? 16 : Math.min(15, Math.round(c.border * factor)) } + calls: list.calls.map(c => c.op === DrawOp.ROUNDED_RECT ? { ...c, background: Math.min(15, Math.round(c.background * factor)), border: c.border === 16 ? 16 : Math.min(15, Math.round(c.border * factor)), + ...(c.outside === undefined ? {} : { outside: Math.min(15, Math.round(c.outside * factor)) }) } : c.op === DrawOp.CLEAR ? { ...c, color: Math.min(15, Math.round(c.color * factor)) } : c) }; } @@ -191,8 +204,12 @@ export function paintDisplayList(output: Uint8Array, screen: Uint8Array, width: } else if (c.op === DrawOp.ROUNDED_RECT) { const x = placed.x + evaluate(c.x, elapsed, presentTime).value + shift, y = placed.y + evaluate(c.y, elapsed, presentTime).value; for (let yy = 0; yy < c.height; yy++) for (let xx = 0; xx < c.width; xx++) { - if (!writable(x + xx, y + yy) || !inside(xx, yy, c.width, c.height, c.radius)) continue; + if (!writable(x + xx, y + yy)) continue; const p = (y + yy) * width + x + xx; + if (!inside(xx, yy, c.width, c.height, c.radius)) { + if (c.outside !== undefined) output[p] = c.outside * 16; + continue; + } output[p] = c.border !== 16 && !inside(xx - 1, yy - 1, c.width - 2, c.height - 2, Math.max(0, c.radius - 1)) ? c.border * 16 : Math.max(output[p], c.background * 16); } } else { diff --git a/app/ui/dashboard-settings.ts b/app/ui/dashboard-settings.ts index 3545812d..07bc03a1 100644 --- a/app/ui/dashboard-settings.ts +++ b/app/ui/dashboard-settings.ts @@ -393,6 +393,25 @@ export const uiDepthSetting = new ConfigSettingEnum({ "Moves the whole display nearer (positive) or farther away (negative) by shifting it in opposite directions on the two lenses. Available with the app switcher at the bottom. Full-panel windows lose a sliver at the edges.", }); +/** + * Where the status bar (clock, notification icons, app widgets, batteries) + * goes: the top bar over each window, or the right end of a bottom app + * switcher's row (geometry.ts statusInSwitcherRow), where windows grow into + * the top bar's height. + */ +export type StatusBarPosition = "top" | "switcher"; + +export const statusBarPositionSetting = new ConfigSettingEnum({ + id: "status-bar-position", + label: "Status bar", + storageKey: "display.statusBarPosition", + defaultValue: "top", + values: ["top", "switcher"], + formatValue: (value) => value === "switcher" ? "With app switcher" : "Top", + description: + "Where the clock, notification icons, app widgets and battery indicators go. With app switcher puts them at the right end of the app switcher's row, and windows grow into the top bar's space. Available with the app switcher at the bottom; the full-panel display mode keeps the top bar. Changing it reopens open apps in the new size.", +}); + export const brightnessSetting = new ConfigSettingEnum({ id: "brightness", label: "Brightness", diff --git a/app/ui/dashboard/settings-menus.ts b/app/ui/dashboard/settings-menus.ts index 7aa6564c..eaf4a2ed 100644 --- a/app/ui/dashboard/settings-menus.ts +++ b/app/ui/dashboard/settings-menus.ts @@ -29,6 +29,7 @@ import { shell } from "../shell/shell"; import { anthropicApiKeySetting, appSwitcherPositionSetting, + statusBarPositionSetting, uiDepthSetting, assistantAllowProactiveSetting, assistantBackendSetting, @@ -243,6 +244,9 @@ function customizationRows(): () => MenuItem[] { const position = enumSettingMenuItem(appSwitcherPositionSetting); // The whole display's stereo depth; the shell sends it with its scene. const depth = enumSettingMenuItem(uiDepthSetting); + // Top bar, or the right end of the switcher row; the dashboard controller + // resizes windows on change. + const statusBar = enumSettingMenuItem(statusBarPositionSetting); const rest = [ // Submenu: top-bar battery indicator style plus per-device visibility. batteryIndicatorsMenuItem(), @@ -253,7 +257,7 @@ function customizationRows(): () => MenuItem[] { // Opens the modal font picker (face, weight, size) for UI text. uiFontPickerMenuItem(), ]; - const withDepth = [position, depth, ...rest], withoutDepth = [position, ...rest]; + const withDepth = [position, depth, statusBar, ...rest], withoutDepth = [position, ...rest]; return () => appSwitcherPositionSetting.get() === "bottom" ? withDepth : withoutDepth; } diff --git a/app/ui/shell/chrome-layer.ts b/app/ui/shell/chrome-layer.ts index b8eab88d..cd50d473 100644 --- a/app/ui/shell/chrome-layer.ts +++ b/app/ui/shell/chrome-layer.ts @@ -1,6 +1,7 @@ import { shellCrop } from "../../graphics/shell-scene"; import type { Plane } from "../../graphics/plane"; -import { G2_LENS_HEIGHT, G2_LENS_WIDTH, GrayImage } from "../../graphics/image"; +import { DrawOp } from "../../graphics/display-list"; +import { G2_LENS_HEIGHT, G2_LENS_WIDTH, GrayImage, grayToNibble } from "../../graphics/image"; import { getDefaultMediumFont, getDefaultSmallFont } from "../../graphics/ui-fonts"; import { truncateText } from "../../graphics/textwrap"; import { activeAmbientCards } from "./ambient-cards"; @@ -31,11 +32,13 @@ import { SHELL_OPAQUE_BLACK, SIDEBAR_WIDTH, sidebarStripVisible, + statusInSwitcherRow, SWITCHER_ROW_HEIGHT, switcherPosition, switcherRect, TOP_BAR_HEIGHT, windowFramed, + windowHeaderHeight, windowTop, type WindowHeightMode, } from "./geometry"; @@ -63,6 +66,21 @@ const LIST_HEIGHT = MIN_WINDOW_HEIGHT - TOP_BAR_HEIGHT - 2 * LIST_MARGIN; const ROW_ICON_SIZE = SWITCHER_ROW_HEIGHT - 4; const ROW_STEP = ROW_ICON_SIZE + ICON_SPACING; +// The status bar in the switcher row (geometry.ts statusInSwitcherRow) keeps +// the top bar's layout, so every element sits as it does there: its 28 rows +// (whose last is the divider, which the row has no use for) centred in the +// row below its separator line. +const ROW_STATUS_TOP = 1 + ((SWITCHER_ROW_HEIGHT - TOP_BAR_HEIGHT) >> 1); +// Its clock ends this far from the row's right end, as the top bar's starts +// from its left; batteries keep the top bar's clock-to-icons gap from it. +const ROW_STATUS_EDGE_MARGIN = 10; +const ROW_CLOCK_GAP = 16; +// Between the windows' end of the row (its scroll chevron) and the status. +const ROW_STATUS_GAP = 8; +// Notification icons stop short of room for this many windows' slots (or +// all of them, when there are fewer); the windows take whatever is left. +const ROW_MIN_WINDOW_SLOTS = 3; + /** Icon rows that fit in one sidebar column. */ function rowsPerColumn(variant: SidebarVariant): number { return Math.max(1, ((LIST_HEIGHT + ICON_SPACING) / (variant.iconSize + ICON_SPACING)) | 0); @@ -107,15 +125,20 @@ type SwitcherLayout = { cell: (slot: number) => SwitcherCell; }; -/** Switcher geometry for the foreground window (a bottom row sits under it). */ -function switcherLayout(windowCount: number, heightMode: WindowHeightMode, appId?: string): SwitcherLayout { +/** + * Switcher geometry for the foreground window (a bottom row sits under it). + * `windowsRight` is where a bottom row's window icons must end: short of + * the status bar when it shares the row. + */ +function switcherLayout(windowCount: number, heightMode: WindowHeightMode, appId?: string, windowsRight?: number): SwitcherLayout { const position = switcherPosition(); if (position === "bottom") { const row = switcherRect(heightMode, appId); + const width = (windowsRight ?? row.x + row.width) - row.x; return { position, iconSize: ROW_ICON_SIZE, - visibleCount: Math.max(1, ((row.width - 2 * LIST_MARGIN + ICON_SPACING) / ROW_STEP) | 0), + visibleCount: Math.max(1, ((width - 2 * LIST_MARGIN + ICON_SPACING) / ROW_STEP) | 0), cell: (slot) => ({ x: row.x + LIST_MARGIN - 2 + slot * ROW_STEP, y: row.y, width: ROW_ICON_SIZE + 4, height: SWITCHER_ROW_HEIGHT, atSeparator: true, @@ -280,18 +303,21 @@ export function makeImageWindowIcon( export class ShellChromeLayer implements Layer { // First switcher icon shown; adjusted each paint to keep the selection visible. private scrollRow = 0; + // Where the last paint ended a bottom row's window icons, for hit testing. + private rowWindowsRight: number | undefined; constructor(private readonly getState: () => ShellChromeState) {} paint(): GrayImage { const image = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); const state = this.getState(); + const statusInRow = statusInSwitcherRow(state.foregroundAppId); // Full-panel mode: the strip is an overlay, present only while the user // is in it (the window underneath keeps its full width the rest of the time). if (sidebarStripVisible(state.focus, state.foregroundAppId)) { - this.drawSidebar(image, state); + this.drawSidebar(image, state, statusInRow ? image : undefined); } - this.drawTopBar(image, state); + if (!statusInRow) this.drawTopBar(image, state); const frame = windowFrameRect(state); if (frame) drawWindowFrame(image, frame); drawAmbientCards(image, topBarSpan(state).right); @@ -300,29 +326,32 @@ export class ShellChromeLayer implements Layer { paintParts(): Plane[] { const state = this.getState(), parts: Plane[] = []; - if (sidebarStripVisible(state.focus, state.foregroundAppId)) { - const canvas = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); - this.drawSidebar(canvas, state); - const strip = switcherRect(state.foregroundHeightMode, state.foregroundAppId); - parts.push(shellCrop(canvas, strip.x, strip.y, strip.width, strip.height, 1)); - } + const statusInRow = statusInSwitcherRow(state.foregroundAppId); const canvas = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); - this.drawTopBar(canvas, state); const bar = topBarSpan(state); - parts.push({ ...shellCrop(canvas, bar.left, windowTop(state.foregroundHeightMode, state.foregroundAppId), bar.right - bar.left, TOP_BAR_HEIGHT, 2), depth: -2 }); - const frame = windowFrameRect(state); - if (frame) { - // Over the top bar, whose bottom row it shares, but at the screen's - // own depth rather than the bar's -2, which on top of a -62 screen - // depth would shift a side off the screen. Split into its two sides - // (corners included) and the top between them, as one surface would - // be almost all transparent. - const frameCanvas = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); - drawWindowFrame(frameCanvas, frame); - const [leftKey, rightKey, topKey] = windowFrameKeys(), sideHeight = frame.height - 1; - parts.push(shellCrop(frameCanvas, frame.x, frame.y, FRAME_RADIUS, sideHeight, leftKey)); - parts.push(shellCrop(frameCanvas, frame.x + frame.width - FRAME_RADIUS, frame.y, FRAME_RADIUS, sideHeight, rightKey)); - parts.push(shellCrop(frameCanvas, frame.x + FRAME_RADIUS, frame.y, frame.width - 2 * FRAME_RADIUS, 1, topKey)); + if (!statusInRow) { + this.drawTopBar(canvas, state); + parts.push({ ...shellCrop(canvas, bar.left, windowTop(state.foregroundHeightMode, state.foregroundAppId), bar.right - bar.left, TOP_BAR_HEIGHT, 2), depth: -2 }); + } + if (sidebarStripVisible(state.focus, state.foregroundAppId)) { + const stripCanvas = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); + const statusLeft = this.drawSidebar(stripCanvas, state, statusInRow ? canvas : undefined); + // The window frame rides on the switcher row, whose top edge is its + // bottom side, and so replays after any top bar, whose bottom row is + // its top. It plays at the screen's own depth rather than the bar's + // -2, which on top of a -62 screen depth would shift a side off the + // screen. (A framed window always has the row on screen.) + const frame = windowFrameRect(state); + if (frame) drawWindowFrame(stripCanvas, frame); + const strip = switcherRect(state.foregroundHeightMode, state.foregroundAppId); + parts.push(shellCrop(stripCanvas, strip.x, strip.y, strip.width, strip.height, 1)); + if (statusLeft !== null) { + // The status bar keeps the top bar's surface and its depth, -2, over + // the row's right end below its separator line, so the clock ticking + // doesn't resend the window icons. + const right = strip.x + strip.width; + parts.push({ ...shellCrop(canvas, statusLeft, strip.y + 1, right - statusLeft, strip.height - 1, 2), depth: -2 }); + } } drawAmbientCards(canvas, bar.right, parts); return parts; @@ -341,7 +370,7 @@ export class ShellChromeLayer implements Layer { windowIndexAt(x: number, y: number, windowCount: number): number | null { if (windowCount === 0) return null; const state = this.getState(); - const layout = switcherLayout(windowCount, state.foregroundHeightMode, state.foregroundAppId); + const layout = switcherLayout(windowCount, state.foregroundHeightMode, state.foregroundAppId, this.rowWindowsRight); const lastVisible = Math.min(windowCount, this.scrollRow + layout.visibleCount); for (let index = this.scrollRow; index < lastVisible; index++) { const cell = layout.cell(index - this.scrollRow); @@ -352,7 +381,13 @@ export class ShellChromeLayer implements Layer { return null; } - private drawSidebar(image: GrayImage, state: ShellChromeState): void { + /** + * Draw the switcher strip or row. Given `statusImage`, a bottom row shares + * its right end with the status bar, drawn there (into that image, which + * may be this one) first, and the window icons take what it leaves. + * Returns the status bar's left edge, or null without one. + */ + private drawSidebar(image: GrayImage, state: ShellChromeState, statusImage?: GrayImage): number | null { // A side strip aligns with the app's preferred band (legacy tall // terminal sessions keep it at the global band position); a bottom row // sits under the foreground window. @@ -365,7 +400,11 @@ export class ShellChromeLayer implements Layer { // visible slot's column is decided by its position within the scrolled // window. const count = state.windows.length; - const layout = switcherLayout(count, state.foregroundHeightMode, state.foregroundAppId); + const statusLeft = statusImage && switcherPosition() === "bottom" + ? this.drawRowStatus(statusImage, state, strip, count) : null; + const windowsRight = statusLeft === null ? strip.x + strip.width : statusLeft - ROW_STATUS_GAP; + this.rowWindowsRight = windowsRight; + const layout = switcherLayout(count, state.foregroundHeightMode, state.foregroundAppId, windowsRight); const { iconSize, position } = layout; this.scrollRow = scrollToKeepSelectionVisible(this.scrollRow, state.selectedIndex, layout.visibleCount, count); const lastVisible = Math.min(count, this.scrollRow + layout.visibleCount); @@ -410,15 +449,15 @@ export class ShellChromeLayer implements Layer { } if (position === "bottom") { - // Chevrons sit in the row's end margins, pointing off either end. + // Chevrons sit in the margins at either end of the icons, pointing off them. const chevronY = strip.y + ((strip.height / 2) | 0); if (this.scrollRow > 0) { drawChevron(image, strip.x + 6, chevronY, "left"); } if (lastVisible < count) { - drawChevron(image, strip.x + strip.width - 6, chevronY, "right"); + drawChevron(image, windowsRight - 6, chevronY, "right"); } - return; + return statusLeft; } // Chevrons center over the icon area, which in the one-column variant is // narrower than the sidebar strip. @@ -430,6 +469,45 @@ export class ShellChromeLayer implements Layer { if (lastVisible < count) { drawChevron(image, chevronX, strip.y + strip.height - 6, "down"); } + return null; + } + + /** + * The status bar at the right end of the switcher row, right to left: + * date and time, batteries, app widgets, then notification icons, each as + * it sits in the top bar (see ROW_STATUS_TOP). Notification icons stop + * short of room for a few window slots; the windows get the rest, and + * whatever they leave over is free space between the two. Returns the + * left edge of what it drew. + */ + private drawRowStatus(image: GrayImage, state: ShellChromeState, row: Rect, windowCount: number): number { + image.fillRect(row.x, row.y + 1, row.width, row.height - 1, SHELL_OPAQUE_BLACK); + const top = row.y + ROW_STATUS_TOP; + const font = getDefaultMediumFont(); + const clock = clockText(); + const clockX = row.x + row.width - ROW_STATUS_EDGE_MARGIN - font.measureText(clock); + image.drawText(font, clockX, top + Math.max(0, ((TOP_BAR_HEIGHT - font.lineHeight) / 2) | 0), clock, 210); + // The battery block keeps its usual right margin inside the edge it's given. + const batteryLeft = this.drawTopBarBatteries(image, state, top, clockX - ROW_CLOCK_GAP + BATTERY_BLOCK_RIGHT_MARGIN); + const trayLeft = drawTrayIcons(image, state.trayIcons, batteryLeft, top); + + // Right-aligned against the widgets, with the top bar's spacing. + const slots = Math.min(windowCount, ROW_MIN_WINDOW_SLOTS); + const windowsFloor = row.x + 2 * LIST_MARGIN + Math.max(0, slots * ROW_STEP - ICON_SPACING) + ROW_STATUS_GAP; + const iconsRight = trayLeft - 8, step = NOTIFICATION_ICON_SIZE + 4; + const maxIcons = Math.max(0, ((iconsRight - windowsFloor + 4) / step) | 0); + if (maxIcons === 0) return trayLeft; + const { icons, stale } = readActiveNotificationIcons(maxIcons, renderPassAllowsStaleData()); + if (stale) { + noteStaleDataUsed(); + } + if (!icons.length) return trayLeft; + const iconsLeft = iconsRight - icons.length * step + 4; + const iconY = top + (((TOP_BAR_HEIGHT - NOTIFICATION_ICON_SIZE) / 2) | 0); + for (let index = 0; index < icons.length; index++) { + image.drawImage(icons[index]!, iconsLeft + index * step, iconY); + } + return iconsLeft; } private drawTopBar(image: GrayImage, state: ShellChromeState): void { @@ -447,8 +525,7 @@ export class ShellChromeLayer implements Layer { image.drawLine(barLeft, barTop + TOP_BAR_HEIGHT - 1, barRight - 1, barTop + TOP_BAR_HEIGHT - 1, BORDER_VALUE); } - const now = new Date(); - const clock = `${formatClockDate(now)} ${formatClockTime(now)}`; + const clock = clockText(); const clockX = barLeft + 10; const textY = barTop + Math.max(0, ((TOP_BAR_HEIGHT - font.lineHeight) / 2) | 0); image.drawText(font, clockX, textY, clock, 210); @@ -545,6 +622,12 @@ export class ShellChromeLayer implements Layer { type BatteryItem = { label: string; device: BatteryDevice; percent: number; charging: boolean }; +/** The status bar's date and time. */ +function clockText(): string { + const now = new Date(); + return `${formatClockDate(now)} ${formatClockTime(now)}`; +} + const BATTERY_BLOCK_RIGHT_MARGIN = 8; const BATTERY_LABEL_VALUE = 150; @@ -629,7 +712,7 @@ const AMBIENT_MAX_LINES_PER_CARD = 3; /** * Paint the active ambient cards bottom-up: the oldest card sits at the very * bottom of the window band and newer ones stack above it. Cards that would - * cross into the top bar are dropped rather than clipped. `right` is the + * cross into the window header are dropped rather than clipped. `right` is the * top bar's right edge, which the cards align to. */ const ambientKeys = new Map(); @@ -647,7 +730,7 @@ function drawAmbientCards(image: GrayImage, right: number, parts?: Plane[]): voi const lines = [card.title, ...card.lines].slice(0, 1 + AMBIENT_MAX_LINES_PER_CARD); const height = 2 * AMBIENT_CARD_PADDING_Y + lines.length * lineStep(font); const y = bottom - height; - if (y < bandTop + TOP_BAR_HEIGHT) break; + if (y < bandTop + windowHeaderHeight()) break; const target = parts ? new GrayImage(image.width, image.height, 0) : image; target.fillRect(x, y, AMBIENT_CARD_WIDTH, height, SHELL_OPAQUE_BLACK); target.drawRect(x, y, AMBIENT_CARD_WIDTH, height, 90); @@ -701,12 +784,13 @@ type Rect = { x: number; y: number; width: number; height: number }; const FRAME_RADIUS = 8; /** - * The rounded frame around the foreground window's content (below its top - * bar), when it has one (geometry.ts windowFramed): one pixel all round. + * The rounded frame around the foreground window's content (below its + * header), when it has one (geometry.ts windowFramed): one pixel all round. * Its sides run down the pixel just outside each side of the window, and - * its top is the top bar's bottom row, in place of the bar's divider. Its - * bottom is the switcher row's top edge, where drawSeparator draws it so - * the selection tab can divert it. + * its top is the header's last row: the top bar's, in place of the bar's + * divider, or the whole one-row header with the status bar in the switcher + * row. Its bottom is the switcher row's top edge, where drawSeparator draws + * it so the selection tab can divert it. */ function windowFrameRect(state: ShellChromeState): Rect | null { if (!windowFramed(state.foregroundAppId)) return null; @@ -714,34 +798,31 @@ function windowFrameRect(state: ShellChromeState): Rect | null { return { x: viewport.x - 1, y: viewport.y - 1, width: viewport.width + 2, height: viewport.height + 2 }; } -/** Shell surface keys of the window frame's left side, right side and top. */ -let frameKeys: [number, number, number] | undefined; -function windowFrameKeys(): [number, number, number] { - if (!frameKeys) frameKeys = [LayerStack.allocateShellKey(), LayerStack.allocateShellKey(), LayerStack.allocateShellKey()]; - return frameKeys; +/** + * Draw the window frame (see windowFrameRect) as one retained firmware + * rounded rect over whatever lies beneath it: no fill, so the window's + * content shows through, and black outside the curve, cutting the content's + * square corners to it. It is clipped short of its bottom row, which + * drawSeparator draws with the selection tab's gap. + */ +function drawWindowFrame(image: GrayImage, frame: Rect): void { + image.drawDisplayList({ resources: [], calls: [{ + op: DrawOp.ROUNDED_RECT, x: 0, y: 0, width: frame.width, height: frame.height, radius: FRAME_RADIUS, + background: 0, border: grayToNibble(BORDER_VALUE), outside: 0, + clip: { x: 0, y: 0, width: frame.width, height: frame.height - 1 }, + }] }, frame.x, frame.y, frame.width, frame.height); } /** - * Draw the window frame (see windowFrameRect) but for its bottom row, - * stroked line by line like the selection tab's outline. Outside each - * rounded corner it paints opaque black, so the window's square corners - * don't show past the curve. Everything but the top's straight run lies - * within FRAME_RADIUS of the sides. + * How far in from the frame's sides its top and bottom rows start: the + * first pixel whose centre passes the firmware's rounded-rect test, which + * the separator must match to join the corners. */ -function drawWindowFrame(image: GrayImage, frame: Rect): void { - const { x, y, width, height } = frame; - for (let i = 0; i < height - 1; i++) { - const outer = tabInset(i, 0, height, FRAME_RADIUS); - image.fillRect(x, y + i, outer, 1, SHELL_OPAQUE_BLACK); - image.fillRect(x + width - outer, y + i, outer, 1, SHELL_OPAQUE_BLACK); - if (i === 0) { - image.fillRect(x + outer, y, width - 2 * outer, 1, BORDER_VALUE); - continue; - } - const stroke = Math.max(1, 1 + tabInset(i, 1, height - 1, FRAME_RADIUS - 1) - outer); - image.fillRect(x + outer, y + i, stroke, 1, BORDER_VALUE); - image.fillRect(x + width - outer - stroke, y + i, stroke, 1, BORDER_VALUE); - } +function frameEdgeInset(): number { + const r = FRAME_RADIUS, dy = 2 * r - 1; + let inset = 0; + while (inset < r && (2 * (r - inset) - 1) ** 2 + dy * dy > 4 * r * r) inset++; + return inset; } const TAB_RADIUS = 6; @@ -763,9 +844,8 @@ function drawSeparator( // Along the row's top edge: the full width of the row, or between the // corners of the window frame, whose bottom side this is. const frame = windowFrameRect(state); - const inset = frame ? tabInset(frame.height - 1, 0, frame.height, FRAME_RADIUS) : 0; - const left = frame ? frame.x + inset : strip.x; - const right = frame ? frame.x + frame.width - 1 - inset : strip.x + strip.width - 1; + const left = frame ? frame.x + frameEdgeInset() : strip.x; + const right = frame ? frame.x + frame.width - 1 - frameEdgeInset() : strip.x + strip.width - 1; const y = strip.y; if (gap) { image.drawLine(left, y, gap.x, y, BORDER_VALUE); diff --git a/app/ui/shell/geometry.ts b/app/ui/shell/geometry.ts index de41a0f2..03124c1a 100644 --- a/app/ui/shell/geometry.ts +++ b/app/ui/shell/geometry.ts @@ -9,6 +9,7 @@ import { navigateVerticalPositionSetting, terminalDisplayModeSetting, terminalVerticalPositionSetting, + statusBarPositionSetting, uiDepthSetting, } from "../dashboard-settings"; @@ -112,14 +113,32 @@ export function switcherRect(heightMode: WindowHeightMode, appId?: string): { x: /** * Whether the foreground window's content gets a rounded frame (drawn by * the chrome layer): with a reserved bottom switcher row, whose top edge is - * the frame's bottom side, as the top bar's divider is its top. Its left and right sides take the pixel just outside - * the 576-wide window; there's no room in the full-panel mode, nor need - * beside a side strip. + * the frame's bottom side, as the window header's last row is its top. Its + * left and right sides take the pixel just outside the 576-wide window; + * there's no room in the full-panel mode, nor need beside a side strip. */ export function windowFramed(appId?: string): boolean { return switcherRowHeight(appId) > 0; } +/** + * Whether the status bar shares the bottom switcher row instead of topping + * each window (Settings > Customization > Status bar): only beside a + * reserved row, as the full-panel mode's row shows just while it has focus. + */ +export function statusInSwitcherRow(appId?: string): boolean { + return windowFramed(appId) && statusBarPositionSetting.get() === "switcher"; +} + +/** + * Height of the header the shell draws over each window's content: the top + * bar, or, with the status bar in the switcher row, just the row the + * window frame's top runs along. + */ +export function windowHeaderHeight(appId?: string): number { + return statusInSwitcherRow(appId) ? 1 : TOP_BAR_HEIGHT; +} + /** * Whether a screen point lies on the switcher's side of the screen, for * touches on the phone's mirror: anywhere in a side strip's column, or from @@ -196,14 +215,14 @@ export const SHELL_OPAQUE_BLACK = 1; /** * Windows come in three heights. "min" covers the same 288px band the stock * firmware uses, leaving most of the field of view clear; "medium" is one - * top bar taller, so the content area below the bar is a full 288px (the + * header taller, so the content area below the header is a full 288px (the * EvenHub app surface height); "max" uses the whole 480px screen (terminal - * views), less a bottom switcher row. All include a top bar drawn by the - * shell at the window's top edge. + * views), less a bottom switcher row. All include a header drawn by the + * shell at the window's top edge (windowHeaderHeight). */ export type WindowHeightMode = "min" | "medium" | "max"; -/** Total height (top bar + content) of a min-height window. */ +/** Total height (header + content) of a min-height window. */ export const MIN_WINDOW_HEIGHT = 288; /** @@ -214,13 +233,13 @@ function windowAreaHeight(appId?: string): number { return G2_LENS_HEIGHT - switcherRowHeight(appId); } -/** Total height (top bar + content) of a window's band in the given mode. */ +/** Total height (header + content) of a window's band in the given mode. */ export function windowBandHeight(mode: WindowHeightMode, appId?: string): number { switch (effectiveHeightMode(mode, appId)) { case "max": return windowAreaHeight(appId); case "medium": - return MIN_WINDOW_HEIGHT + TOP_BAR_HEIGHT; + return MIN_WINDOW_HEIGHT + windowHeaderHeight(appId); default: return MIN_WINDOW_HEIGHT; } @@ -257,7 +276,7 @@ export function minWindowTop(appId?: string): number { } /** - * Top edge (y) of a window's top bar; max-height windows pin to the screen + * Top edge (y) of a window's header; max-height windows pin to the screen * top. A bottom switcher row hangs under the band, so the band and row * together distribute the screen's slack. */ @@ -269,11 +288,11 @@ export function windowTop(mode: WindowHeightMode, appId?: string): number { export function appViewportSize(mode: WindowHeightMode, appId?: string): { width: number; height: number } { return { width: appViewportWidth(appId), - height: windowBandHeight(mode, appId) - TOP_BAR_HEIGHT, + height: windowBandHeight(mode, appId) - windowHeaderHeight(appId), }; } -/** Screen rect of a window's app-content viewport (below its top bar). */ +/** Screen rect of a window's app-content viewport (below its header). */ export function appViewportRect(mode: WindowHeightMode, appId?: string): { x: number; y: number; @@ -282,7 +301,7 @@ export function appViewportRect(mode: WindowHeightMode, appId?: string): { } { return { x: appViewportLeft(appId), - y: windowTop(mode, appId) + TOP_BAR_HEIGHT, + y: windowTop(mode, appId) + windowHeaderHeight(appId), ...appViewportSize(mode, appId), }; } diff --git a/app/ui/shell/shell.ts b/app/ui/shell/shell.ts index 5df8d535..05daf584 100644 --- a/app/ui/shell/shell.ts +++ b/app/ui/shell/shell.ts @@ -41,6 +41,7 @@ import { brightnessSetting, onAnySettingChanged, openAiApiKeySetting, + statusBarPositionSetting, timeFormatSetting, wakeWordActionSetting, } from "../dashboard-settings"; @@ -337,7 +338,7 @@ const SWITCHER_SWIPES: Record< * string. */ function chromeSettingsKey(): string { - return `${batteryIndicatorSettingsKey()}|${timeFormatSetting.get()}|${uiDepth()}`; + return `${batteryIndicatorSettingsKey()}|${timeFormatSetting.get()}|${uiDepth()}|${statusBarPositionSetting.get()}`; } class Shell { diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/DrawFlags.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/DrawFlags.kt index 2403735d..ed307f3c 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/DrawFlags.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/DrawFlags.kt @@ -21,3 +21,5 @@ const val CFW_TEXTURE_OPT_INVERSE = 32 /** Rounded-rectangle border sentinel, not a color or flag bit. */ const val DRAW_ROUNDED_RECT_NO_BORDER = 16 +/** Revision 36: the rounded rectangle's optional outside color is absent (bridge sentinel). */ +const val DRAW_ROUNDED_RECT_NO_OUTSIDE = 16 diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/DrawProtocol.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/DrawProtocol.kt index 6567a056..0fab3a66 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/DrawProtocol.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/DrawProtocol.kt @@ -13,7 +13,7 @@ class DrawClip(val x: Int, val y: Int, val width: Int, val height: Int) { fun translated(dx: Int, dy: Int) = DrawClip(x + dx, y + dy, width, height) } -/** Revision 35 wire grammar, shared by scene planning and the local renderer. */ +/** Revision 36 wire grammar, shared by scene planning and the local renderer. */ object DrawProtocol { /** Mirrors g2flash/patches/zlib_glue.c. */ const val DRAW = CFW_MSG_DRAW_CALLS @@ -93,12 +93,17 @@ object DrawProtocol { border: Int = DRAW_ROUNDED_RECT_NO_BORDER, depth: Int? = null, ): ByteArray = roundedRect(DrawValue.Integer(x), DrawValue.Integer(y), width, height, radius, background, border, depth) + /** + * The background is max-blended, so 0 leaves the interior as it is. [outside] (revision 36), + * when given, is the color for the bounding box's pixels outside the rounded shape. + */ fun roundedRect( x: DrawValue, y: DrawValue, width: Int, height: Int, radius: Int, background: Int, border: Int = DRAW_ROUNDED_RECT_NO_BORDER, depth: Int? = null, clip: DrawClip? = null, + outside: Int? = null, ): ByteArray { require(width in 1..640 && height in 1..480 && radius in 0..65535) - require(background in 0..15 && border in 0..DRAW_ROUNDED_RECT_NO_BORDER) + require(background in 0..15 && border in 0..DRAW_ROUNDED_RECT_NO_BORDER && (outside == null || outside in 0..15)) return call(DRAW_OP_ROUNDED_RECT, depth = depth, clip = clip) { writeExtended(x) writeExtended(y) @@ -107,6 +112,7 @@ object DrawProtocol { writeU16(radius) writeU8(background) writeU8(border) + if (outside != null) writeU8(outside) } } diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/DisplayListRenderer.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/DisplayListRenderer.kt index 85f86753..441e8c06 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/DisplayListRenderer.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/DisplayListRenderer.kt @@ -487,16 +487,21 @@ class DisplayListRenderer( val radius = reader.readU16() val fill = reader.readU8() val border = reader.readU8() + // Revision 36: an optional trailing color for the corners outside the shape. + val outside = if (reader.remaining == 1) reader.readU8().also { require(it <= 15) } else DRAW_ROUNDED_RECT_NO_OUTSIDE reader.requireDone() require(width in 1..640 && height in 1..480 && fill <= 15 && border <= DRAW_ROUNDED_RECT_NO_BORDER) if (!walk.apply) return if (x < -width - target.shiftX || x >= target.width - target.shiftX || y < -height || y >= target.height) return for (yy in 0 until height) for (xx in 0 until width) { - if (!roundedContains(xx, yy, width, height, radius)) continue val tx = x + xx + target.shiftX val ty = y + yy if (tx !in 0 until target.width || ty !in 0 until target.height) continue + if (!roundedContains(xx, yy, width, height, radius)) { + if (outside != DRAW_ROUNDED_RECT_NO_OUTSIDE) target.put(x + xx, ty, outside) + continue + } val edge = !roundedContains(xx - 1, yy - 1, width - 2, height - 2, maxOf(0, radius - 1)) val value = if (edge && border < DRAW_ROUNDED_RECT_NO_BORDER) border else maxOf(fill, target.get(tx, ty)) target.put(x + xx, ty, value) diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/FrameDisplayList.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/FrameDisplayList.kt index dd87c58d..80a6b6f8 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/FrameDisplayList.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/FrameDisplayList.kt @@ -45,7 +45,7 @@ class FrameDisplayList private constructor( val clip = c.clip?.translated(x, y) when (c.op) { DRAW_OP_ROUNDED_RECT -> DrawProtocol.roundedRect(bind(c.x, elapsed, x), bind(c.y, elapsed, y), - v[0], v[1], v[2], v[3], v[4], depth + c.depth, clip) + v[0], v[1], v[2], v[3], v[4], depth + c.depth, clip, v[5].takeIf { it != DRAW_ROUNDED_RECT_NO_OUTSIDE }) DRAW_OP_IMAGE -> DrawProtocol.image(resource(v[0]), bind(c.x, elapsed, x + v[1]), bind(c.y, elapsed, y + v[2]), v[3], depth = depth + c.depth, clip = clip) DRAW_OP_TEXT -> DrawProtocol.text(resource(v[0]), bind(c.x, elapsed, x + v[1]), bind(c.y, elapsed, y + v[2]), @@ -185,9 +185,9 @@ class FrameDisplayList private constructor( DRAW_OP_ROUNDED_RECT -> { val xx = value(); val yy = value() val w = r.readU16(); val h = r.readU16(); val radius = r.readU16() - val background = r.readU8(); val border = r.readU8() - require(w in 1..640 && h in 1..480 && background in 0..15 && border in 0..16) - commands.add(Command(op, d, intArrayOf(w, h, radius, background, border), xx, yy, clip = clip)) + val background = r.readU8(); val border = r.readU8(); val outside = r.readU8() + require(w in 1..640 && h in 1..480 && background in 0..15 && border in 0..16 && outside in 0..16) + commands.add(Command(op, d, intArrayOf(w, h, radius, background, border, outside), xx, yy, clip = clip)) } DRAW_OP_IMAGE -> { val id = resource(); require(id != DrawProtocol.SCREEN) diff --git a/tests/app-layout.test.cjs b/tests/app-layout.test.cjs index 49a0972c..cfdeacec 100644 --- a/tests/app-layout.test.cjs +++ b/tests/app-layout.test.cjs @@ -14,7 +14,7 @@ function geometry() { displayModeSetting: '576x288', verticalPositionSetting: 'middle', navigateDisplayModeSetting: 'global', navigateVerticalPositionSetting: 'global', terminalDisplayModeSetting: 'default', terminalVerticalPositionSetting: 'global', - appSwitcherPositionSetting: 'left', uiDepthSetting: '0', + appSwitcherPositionSetting: 'left', uiDepthSetting: '0', statusBarPositionSetting: 'top', }).map(([name, value]) => [name, { value, get() { return this.value; } }])); const context = { exports: {}, require: (name) => { if (name === '../../graphics/image') return { G2_LENS_WIDTH: 640, G2_LENS_HEIGHT: 480 }; @@ -66,8 +66,9 @@ test('Terminal can disable its tall default, inherit position or override both d test('all explicit size/position combinations stay within the display and align content below the bar', () => { const g = geometry(); - for (const switcher of ['left', 'right', 'bottom']) { + for (const [switcher, statusBar] of [['left', 'top'], ['right', 'top'], ['bottom', 'top'], ['bottom', 'switcher'], ['left', 'switcher']]) { g.settings.appSwitcherPositionSetting.value = switcher; + g.settings.statusBarPositionSetting.value = statusBar; for (const globalMode of ['576x288', '576x480', '640x480']) { g.settings.displayModeSetting.value = globalMode; for (const appId of ['navigate', 'terminal']) { @@ -79,8 +80,11 @@ test('all explicit size/position combinations stay within the display and align const rect = g.rect(heightMode, appId); const fullPanel = g.displayMode(appId) === '640x480'; assert.equal(rect.x + rect.width, fullPanel ? 640 : { left: 640, right: 576, bottom: 608 }[switcher]); - assert.equal(rect.y, g.windowTop(heightMode, appId) + g.TOP_BAR_HEIGHT); - assert.ok(rect.y >= 28 && rect.y + rect.height <= 480 - g.switcherRowHeight(appId)); + const header = g.windowHeaderHeight(appId); + assert.equal(header, g.statusInSwitcherRow(appId) ? 1 : g.TOP_BAR_HEIGHT); + assert.equal(g.statusInSwitcherRow(appId), statusBar === 'switcher' && g.switcherRowHeight(appId) > 0); + assert.equal(rect.y, g.windowTop(heightMode, appId) + header); + assert.ok(rect.y >= header && rect.y + rect.height <= 480 - g.switcherRowHeight(appId)); const row = g.switcherRect(heightMode, appId); assert.ok(row.y + row.height <= 480); // A reserved bottom row hangs right under the window, as wide as it. @@ -140,23 +144,32 @@ test('a bottom app switcher centres 576-wide windows and hangs one tall tab unde assert.equal(g.windowFramed(), false); }); -test('a bottom app switcher frames the foreground window\'s content in a rounded border', () => { - const g = geometry(); - g.settings.appSwitcherPositionSetting.value = 'bottom'; - g.settings.uiDepthSetting.value = '62'; - const graphics = require('../.test-build/app/graphics/image.js'); - const shellScene = require('../.test-build/app/graphics/shell-scene.js'); - const font = { lineHeight: 12, ascent: 10, measureText: (text) => text.length * 4, drawText() {} }; +// The real chrome layer over the given geometry, with platform pieces stubbed: +// a 4px-per-character font that paints each character as a 2x6 block, up to +// `notifications` 24px notification icons, and a phone battery at 80%. +const graphics = require('../.test-build/app/graphics/image.js'); +const shellScene = require('../.test-build/app/graphics/shell-scene.js'); +const displayList = require('../.test-build/app/graphics/display-list.js'); +function chromeLayer(g, { notifications = 0, phoneBattery = null, windows = 1, trayIcons = [] } = {}) { + const font = { lineHeight: 12, ascent: 10, measureText: (text) => text.length * 4, + drawText: (image, x, y, text, value) => { for (let i = 0; i < text.length; i++) image.fillRect(x + i * 4, y + 2, 2, 6, value); } }; let nextKey = 100; + const requested = []; + const settings = { get: () => 'always' }; const modules = { '../../graphics/shell-scene': shellScene, '../../graphics/image': graphics, - '../../graphics/ui-fonts': { getDefaultSmallFont: () => font, getDefaultMediumFont: () => font }, + '../../graphics/display-list': displayList, '../../graphics/ui-fonts': { getDefaultSmallFont: () => font, getDefaultMediumFont: () => font }, + '../../graphics/battery': require('../.test-build/app/graphics/battery.js'), './ambient-cards': { activeAmbientCards: () => [] }, - '../../native/notification-icons': { readActiveNotificationIcons: () => ({ icons: [], stale: false }) }, - '../../native/phone-battery': { readPhoneBatteryState: () => ({ battery: null }) }, + '../../native/notification-icons': { readActiveNotificationIcons: (max) => { + requested.push(max); + return { icons: Array.from({ length: Math.min(max, notifications) }, () => new graphics.GrayImage(24, 24, 200)), stale: false }; + } }, + '../../native/phone-battery': { readPhoneBatteryState: () => ({ battery: phoneBattery, charging: false }) }, '../../util/render-freshness': { renderPassAllowsStaleData: () => false }, - '../dashboard-settings': { batteryDisplayModeSetting: { get: () => 'icon' } }, - '../clock-format': { formatClockDate: () => '', formatClockTime: () => '' }, + '../dashboard-settings': { batteryDisplayModeSetting: { get: () => 'icon' }, phoneBatteryVisibilitySetting: settings, + batteryIndicatorVisible: () => true }, + '../clock-format': { formatClockDate: () => 'Thu Oct 2', formatClockTime: () => '9:41' }, '../layers': { LayerStack: { allocateShellKey: () => nextKey++ } }, '../menu': { scrollToKeepSelectionVisible: () => 0 }, './geometry': g, @@ -164,51 +177,128 @@ test('a bottom app switcher frames the foreground window\'s content in a rounded const context = { exports: {}, require: (name) => modules[name] ?? {} }; vm.runInNewContext(js(read('app/ui/shell/chrome-layer.ts')), context); const state = { - windows: [{ attention: false, drawIcon() {} }], selectedIndex: 0, focus: 'window', foregroundHeightMode: 'min', - battery: { headset: null, ring: null, watch: null }, trayIcons: [], + windows: Array.from({ length: windows }, () => ({ attention: false, drawIcon: (image, x, y, size) => image.fillRect(x, y, size, size, 120) })), + selectedIndex: 0, focus: 'window', foregroundHeightMode: 'min', + battery: { headset: null, ring: null, watch: null }, trayIcons, }; - const chrome = new context.exports.ShellChromeLayer(() => state); + return { chrome: new context.exports.ShellChromeLayer(() => state), state, requested }; +} + +test('a bottom app switcher frames the foreground window\'s content in a rounded border', () => { + const g = geometry(); + g.settings.appSwitcherPositionSetting.value = 'bottom'; + g.settings.uiDepthSetting.value = '62'; + const { chrome } = chromeLayer(g); const parts = chrome.paintParts(); - // The min band's content spans y=106..365, between the bar's bottom row - // (the frame's top) at 105 and the row's top edge (its bottom) at 366. + // Just the top bar and then the row: the frame is no surface of its own. const part = (key) => parts.find((p) => p.shellKey === key); - const [left, right, top, strip] = [part(100), part(101), part(102), part(1)]; - assert.deepEqual([left.x, left.y, left.image.width, left.image.height], [31, 105, 8, 261]); - assert.deepEqual([right.x, right.image.width], [601, 8]); - assert.deepEqual([top.x, top.y, top.image.width, top.image.height], [39, 105, 562, 1]); - assert.ok(!left.depth && !right.depth && !top.depth); + const [bar, strip] = [part(2), part(1)]; + assert.deepEqual(Array.from(parts, (p) => p.shellKey), [2, 1]); + // The min band's content spans y=106..365, between the bar's bottom row + // (the frame's top) at 105 and the row's top edge (its bottom) at 366. The + // frame is one rounded rect riding on the row, replayed after the bar. + const frames = (image) => image.draws.filter((d) => d.presentation?.displayList); + const [frame] = frames(strip.image); + assert.deepEqual([strip.x + frame.x, strip.y + frame.y, frame.source.width, frame.source.height, frame.presentation.depth], [31, 105, 578, 262, 0]); + assert.deepEqual(JSON.parse(JSON.stringify(frame.presentation.displayList.calls)), [{ op: displayList.DrawOp.ROUNDED_RECT, x: 0, y: 0, width: 578, height: 262, + radius: 8, background: 0, border: 3, outside: 0, clip: { x: 0, y: 0, width: 578, height: 261 } }]); + // Over a lit screen: the sides just outside the window, the top along the + // bar's bottom row, the content's corners cut black, its interior left + // alone, and the bottom row left to the separator. + const lit = new Uint8Array(640 * 480).fill(255); + displayList.paintDisplayList(lit, lit.slice(), 640, 480, { displayList: frame.presentation.displayList, + x: strip.x + frame.x, y: strip.y + frame.y, width: 578, height: 262, depth: 0 }); + const px = (x, y) => lit[y * 640 + x]; + assert.deepEqual([px(31, 200), px(608, 200), px(300, 105)], [48, 48, 48]); + assert.deepEqual([px(31, 105), px(32, 106), px(32, 365), px(607, 365)], [0, 0, 0, 0]); + assert.deepEqual([px(36, 105), px(300, 200), px(300, 366), px(36, 366)], [48, 255, 255, 255]); const at = (p, x, y) => p.image.pixels[(y - p.y) * p.image.width + x - p.x]; - // Straight sides just outside the window; the top along the bar's bottom row. - assert.equal(at(left, 31, 200), 40); - assert.equal(at(right, 608, 200), 40); - assert.equal(at(top, 300, 105), 40); - // Rounded corners: black outside the curve, the window's own corner masked. - assert.equal(at(left, 31, 105), 1); - assert.equal(at(left, 36, 105), 40); - assert.equal(at(left, 32, 106), 1); - assert.equal(at(left, 32, 365), 1); - assert.equal(at(right, 607, 365), 1); // The separator is the bottom side, starting where the corner's curve ends. - assert.equal(at(strip, 35, 366), 1); - assert.equal(at(strip, 36, 366), 40); - assert.equal(at(strip, 603, 366), 40); - assert.equal(at(strip, 604, 366), 1); - // Parts after the -2 top bar, so the frame draws over it. - assert.ok(parts.indexOf(part(2)) < parts.indexOf(left)); + assert.deepEqual([at(strip, 35, 366), at(strip, 36, 366), at(strip, 603, 366), at(strip, 604, 366)], [1, 40, 40, 1]); + // The bar's own divider gives way to the frame's top. + assert.equal(at(bar, 300, 105), 1); shellScene.encodeShellScene(parts, g.uiDepth()); - // The flat paint matches. The bar's own divider gives way to the frame's - // top, and the frame stops short of the bar. + // The flat paint carries the same frame. const image = chrome.paint(); - assert.equal(image.pixels[200 * 640 + 31], 40); - assert.equal(image.pixels[200 * 640 + 608], 40); - assert.equal(image.pixels[105 * 640 + 33], 1); - assert.equal(image.pixels[105 * 640 + 300], 40); - assert.equal(image.pixels[90 * 640 + 31], 0); - const bar = part(2); - assert.equal(bar.image.pixels[(105 - bar.y) * bar.image.width + 300 - bar.x], 1); + assert.deepEqual(frames(image).map((d) => [d.x, d.y]), [[31, 105]]); // No frame in the full-panel mode. g.settings.displayModeSetting.value = '640x480'; - assert.equal(chrome.paintParts().filter((p) => p.shellKey >= 100).length, 0); + assert.equal(chrome.paintParts().flatMap((p) => frames(p.image)).length, 0); +}); + +test('the status bar can join a bottom app switcher, and windows grow into the top bar', () => { + const g = geometry(); + g.settings.statusBarPositionSetting.value = 'switcher'; + // Only beside a reserved bottom row. + assert.equal(g.statusInSwitcherRow(), false); + g.settings.appSwitcherPositionSetting.value = 'bottom'; + assert.equal(g.statusInSwitcherRow(), true); + // A one-row header (the frame's top) replaces the 28px top bar; medium + // windows keep a 288px (EvenHub) content area. + assert.equal(g.windowHeaderHeight(), 1); + assert.deepEqual(g.rect('min'), { x: 32, y: 79, width: 576, height: 287 }); + assert.deepEqual(g.rect('medium'), { x: 32, y: 79, width: 576, height: 288 }); + assert.deepEqual(g.rect('max', 'terminal'), { x: 32, y: 1, width: 576, height: 443 }); + assert.deepEqual({ ...g.switcherRect('min') }, { x: 32, y: 366, width: 576, height: 36 }); + // The full-panel mode keeps the top bar: its row shows only while focused. + g.settings.displayModeSetting.value = '640x480'; + assert.equal(g.statusInSwitcherRow(), false); + assert.deepEqual(g.rect('max'), { x: 0, y: 28, width: 640, height: 452 }); +}); + +test('the switcher row lays out windows, free space, notifications, widgets, batteries and the clock', () => { + const g = geometry(); + g.settings.appSwitcherPositionSetting.value = 'bottom'; + g.settings.statusBarPositionSetting.value = 'switcher'; + const tray = new graphics.GrayImage(30, 20, 180); + const { chrome, requested } = chromeLayer(g, { notifications: 2, phoneBattery: 80, trayIcons: [tray] }); + const parts = chrome.paintParts(); + // No top bar: the row, then the status bar on the top bar's surface and depth. + assert.deepEqual(Array.from(parts, (p) => [p.shellKey, p.depth ?? 0]), [[1, 0], [2, -2]]); + const [row, status] = parts; + // Right to left from the row's end (x=608), centred under its separator + // line (y=366): "Thu Oct 2 9:41" (56px) 10px in; the battery block (label + // 20 + gap 5 + gauge 21) 16px before it; the 30px widget 10px before that; + // then the two notification icons, 8px clear of the widget. + const clockX = 608 - 10 - 56, batteryLeft = clockX - 16 - 46, trayLeft = batteryLeft - 40, iconsLeft = trayLeft - 8 - 56 + 4; + assert.deepEqual([status.x, status.y, status.image.width, status.image.height], [iconsLeft, 367, 608 - iconsLeft, 35]); + const at = (p, x, y) => p.image.withDrawsBaked().pixels[(y - p.y) * p.image.width + x - p.x]; + // The clock's text runs 8 rows down the top bar's layout, which sits 5 rows into the row. + assert.deepEqual([at(status, clockX, 366 + 5 + 8 + 2), at(status, trayLeft, 366 + 5 + 4), at(status, iconsLeft, 366 + 5 + 2)], [210, 180, 200]); + assert.equal(at(status, batteryLeft, 366 + 5 + 8 + 2), 150, 'battery label'); + // Windows take what the status bar leaves; the rest is free space. + assert.equal(at(row, 40 + 2, 366 + 2), 120, 'first window icon'); + assert.equal(chrome.windowIndexAt(45, 380, 1), 0); + assert.equal(chrome.windowIndexAt(iconsLeft + 2, 380, 1), null); + // Notification icons stop short of the one window slot's room (with the + // row's margins and the gap to the status bar). + assert.equal(requested.at(-1), Math.floor((trayLeft - 8 - (32 + 20 + 40 - 8 + 8) + 4) / 28)); + // No top bar, but the frame is still there, its top one row above the content. + const [frame] = row.image.draws.filter((d) => d.presentation?.displayList); + assert.deepEqual([row.x + frame.x, row.y + frame.y, frame.source.height], [31, 78, 289]); + shellScene.encodeShellScene(parts, g.uiDepth()); +}); + +test('many windows scroll in what the notification icons leave them', () => { + const g = geometry(); + g.settings.appSwitcherPositionSetting.value = 'bottom'; + g.settings.statusBarPositionSetting.value = 'switcher'; + const { chrome, requested } = chromeLayer(g, { notifications: 40, windows: 12 }); + const [row, status] = chrome.paintParts(); + // Clock only (no batteries or widgets): notifications end 8px before its + // 8px lead-in, and stop where three window slots plus margins remain. + const trayLeft = 608 - 10 - 56 - 8, floor = 32 + 20 + 3 * 40 - 8 + 8; + const max = Math.floor((trayLeft - 8 - floor + 4) / 28); + assert.equal(requested.at(-1), max); + const iconsLeft = trayLeft - 8 - max * 28 + 4; + assert.equal(status.x, iconsLeft); + // Three windows fit before the status bar's gap; the rest scroll, with the + // chevron at the end of the windows rather than of the row. + assert.equal(chrome.windowIndexAt(32 + 10 + 2 * 40 + 4, 380, 12), 2); + assert.equal(chrome.windowIndexAt(32 + 10 + 3 * 40 + 4, 380, 12), null); + const windowsRight = iconsLeft - 8; + const chevron = row.image.pixels.findIndex((v, i) => v === 140); + assert.equal(chevron % row.image.width + row.x, windowsRight - 6); }); // Exercise the real worker message handler with platform work stubbed out. diff --git a/tests/display-list-authoring.test.cjs b/tests/display-list-authoring.test.cjs index 56c1ec8f..9f96f547 100644 --- a/tests/display-list-authoring.test.cjs +++ b/tests/display-list-authoring.test.cjs @@ -5,7 +5,7 @@ const { DrawOp, SCREEN, encodeDisplayList, readDisplayList, paintDisplayList } = const { GrayImage } = require('../.test-build/app/graphics/image.js'); const { encodePresentation } = require('../.test-build/app/graphics/presentation-wire.js'); // Also consumed by FrameDisplayListTest.kt: bridge bytes, not independently rebuilt native calls. -const MENU = '077e0000000300020002000200022a00000096000000010002000200ffffffff0200080000ff24017e30020000000001812c8001812c1611010017328001812c16103001812c3023414031ff24017c30020000000001812c8001812c1611010017328001812c16103001812c302341403102000200010001030400000000000000001f'; +const MENU = '077f0000000300020002000200022a00000096000000010002000200ffffffff0200080000ff24017e30020000000001812c8001812c1611010017328001812c16103001812c3023414031ff24017c30020000000001812c8001812c1611010017328001812c16103001812c30234140310200020001000103100400000000000000001f'; const MULTI = '0744000000030002000400010002000000000000000002000200010000ff010001006003000400000000000000001f0200000100000001000100020002feffffff7f00010001007f00'; test('extended integers agree with firmware widths and sign extension', () => { @@ -90,9 +90,33 @@ test('frame submission supports resource-free lists and plain PRESENT-relative t // the font and image ids it registers: a clipped clear, a clipped rounded rect, // and replayed glyph + icon draws clipped while sliding up. REPLAY_PIXELS is // what the list paints over a nibble-1 screen, 16x8 at 4 bits per pixel. -const REPLAY = '0780000000020003000800040000070000006400000000000300890000000000000600040002880000010001000200020000000400030000000510a00000000000000600040000ff2502000080c002000000000180c8800180c8161101001732800180c81610300180c830234031020000efbe4100000000000000ff01bebafeca04000100'; +const REPLAY = '078100000002000300080004000007000000640000000000030089000000000000060004000288000001000100020002000000040003000000051010a00000000000000600040000ff2502000080c002000000000180c8800180c8161101001732800180c81610300180c830234031020000efbe4100000000000000ff01bebafeca04000100'; const REPLAY_PIXELS = '11111111111111111111111111111111111111111111111111fff28f111111111125522211111111112552221111111111222222111111111111111111111111'; +// Also consumed by FrameDisplayListTest.kt: a window-frame rounded rect with no +// fill, a border of 3 and black outside the curve (revision 36), clipped short +// of its bottom row, and what it paints over a nibble-9 12x8 screen. +const FRAME = '072b00000002000100080006000000000000000000000000010088000000000000080005000000080006000300000300'; +const FRAME_PIXELS = '999999999999990333333099993399993399993999999399993999999399993399993399999999999999999999999999'; + +test('a rounded rect outside color encodes, decodes and paints over the corners', () => { + const placed = { x: 2, y: 1, width: 8, height: 6, depth: 0, displayList: { resources: [], calls: [ + { op: DrawOp.ROUNDED_RECT, x: 0, y: 0, width: 8, height: 6, radius: 3, background: 0, border: 3, outside: 0, clip: { x: 0, y: 0, width: 8, height: 5 } }, + ] } }; + assert.equal(Buffer.from(encodeDisplayList(placed, 0)).toString('hex'), FRAME); + const output = new Uint8Array(12 * 8).fill(9 * 16); + paintDisplayList(output, output.slice(), 12, 8, placed, false, 0); + assert.equal(Array.from(output, (v) => (v >> 4).toString(16)).join(''), FRAME_PIXELS); + const [rect] = readDisplayList(Buffer.from(FRAME, 'hex'), 0, 0).placed.displayList.calls; + assert.equal(rect.outside, 0); + // Without one, the call decodes without it and leaves the corners alone. + const plain = { ...placed, displayList: { resources: [], calls: [{ ...placed.displayList.calls[0], outside: undefined }] } }; + assert.equal('outside' in readDisplayList(encodeDisplayList(plain, 0), 0, 0).placed.displayList.calls[0], false); + const corners = new Uint8Array(12 * 8).fill(9 * 16); + paintDisplayList(corners, corners.slice(), 12, 8, plain, false, 0); + assert.deepEqual([corners[12 + 2] >> 4, corners[12 + 5] >> 4], [9, 3]); +}); + function replayList() { // 'A' is 3x2 ink one row below a 4px line top; the icon is 2x2. const font = { fingerprintId: 9001, atlasKey: 'stub-font', ascent: 3, lineHeight: 4 }; diff --git a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/DrawWireTest.kt b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/DrawWireTest.kt index 63c3e7ae..9f73bf59 100644 --- a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/DrawWireTest.kt +++ b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/DrawWireTest.kt @@ -96,7 +96,9 @@ class DrawWireTest { renderer.execute(DrawProtocol.sequence(listOf(call)), target) screen.fill(0x12) val savedResources = resources.mapValues { it.value.copyOf() } - val malformed = (0 until call.size).map { call.copyOf(it) } + listOf(call + byteArrayOf(0)) + // A rounded rect may end in one outside-color byte (revision 36), but not one past 15. + val overlong = if (call[0].toInt() == DRAW_OP_ROUNDED_RECT) byteArrayOf(16) else byteArrayOf(0) + val malformed = (0 until call.size).map { call.copyOf(it) } + listOf(call + overlong, call + byteArrayOf(0, 0)) for (bad in malformed) { assertFails { renderer.execute(DrawProtocol.sequence(listOf(valid, bad, valid)), target) } assertContentEquals(ByteArray(16) { 0x12 }, screen) diff --git a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/FrameDisplayListTest.kt b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/FrameDisplayListTest.kt index 3f23ecd5..84562dae 100644 --- a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/FrameDisplayListTest.kt +++ b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/FrameDisplayListTest.kt @@ -4,13 +4,13 @@ import kotlin.test.* class FrameDisplayListTest { // Golden records emitted by display-list-authoring.test.cjs. - private val menu = "077e0000000300020002000200022a00000096000000010002000200ffffffff0200080000ff24017e30020000000001812c8001812c1611010017328001812c16103001812c3023414031ff24017c30020000000001812c8001812c1611010017328001812c16103001812c302341403102000200010001030400000000000000001f" + private val menu = "077f0000000300020002000200022a00000096000000010002000200ffffffff0200080000ff24017e30020000000001812c8001812c1611010017328001812c16103001812c3023414031ff24017c30020000000001812c8001812c1611010017328001812c16103001812c30234140310200020001000103100400000000000000001f" private val multi = "0744000000030002000400010002000000000000000002000200010000ff010001006003000400000000000000001f0200000100000001000100020002feffffff7f00010001007f00" - private val scroll = "078a000000030002000400020000070000009600000001000200040011223344556677880200020000000000ff250100300102300180f0800180f0161101001732800180f01610300180f0302341403101001102000200010008000000ff280101300100300180f0800180f0161101001732800180f01610300180f030234140310100170100160400020000000103" + private val scroll = "078b000000030002000400020000070000009600000001000200040011223344556677880200020000000000ff250100300102300180f0800180f0161101001732800180f01610300180f0302341403101001102000200010008000000ff280101300100300180f0800180f0161101001732800180f01610300180f03023414031010017010016040002000000010310" // Clipped clear, clipped rounded rect, and replayed glyph + icon records with // placeholder atlas ids 0xbeef / 0xcafebabe, plus what they paint over a // nibble-1 16x8 screen (display-list-authoring.test.cjs). - private val replay = "0780000000020003000800040000070000006400000000000300890000000000000600040002880000010001000200020000000400030000000510a00000000000000600040000ff2502000080c002000000000180c8800180c8161101001732800180c81610300180c830234031020000efbe4100000000000000ff01bebafeca04000100" + private val replay = "078100000002000300080004000007000000640000000000030089000000000000060004000288000001000100020002000000040003000000051010a00000000000000600040000ff2502000080c002000000000180c8800180c8161101001732800180c81610300180c830234031020000efbe4100000000000000ff01bebafeca04000100" private val replayPixels = "11111111111111111111111111111111111111111111111111fff28f111111111125522211111111112552221111111111222222111111111111111111111111" private fun hex(s: String) = s.chunked(2).map { it.toInt(16).toByte() }.toByteArray() private fun read(bytes: ByteArray, now: Long = 1150): FrameDisplayList { @@ -141,6 +141,28 @@ class FrameDisplayListTest { assertEquals(replayPixels, nibbles) } + // A window-frame rounded rect (display-list-authoring.test.cjs): no fill, a + // border of 3, black outside the curve (revision 36), clipped short of its + // bottom row, over a nibble-9 12x8 screen. + private val frame = "072b00000002000100080006000000000000000000000000010088000000000000080005000000080006000300000300" + private val framePixels = "999999999999990333333099993399993399993999999399993999999399993399993399999999999999999999999999" + + @Test fun roundedRectOutsideColorBridgesToTheTrailingByteAndPaintsLikeTheSoftwareRenderer() { + val call = read(hex(frame)).calls(IntArray(0), 0).single() + val plain = DrawProtocol.roundedRect(DrawValue.Integer(2), DrawValue.Integer(1), 8, 6, 3, 0, 3, + depth = 0, clip = DrawClip(2, 1, 8, 5)) + assertContentEquals(plain + byteArrayOf(0), call) + val target = DisplayListRenderer.Target(ByteArray(48) { 0x99.toByte() }, 12, 8) + DisplayListRenderer(emptyMap()).execute(DrawProtocol.sequence(listOf(call)), target) + assertEquals(framePixels, (0 until 96).joinToString("") { target.get(it % 12, it / 12).toString(16) }) + // Without the trailing byte the corners keep what was there; a color past 15 is rejected. + val corners = DisplayListRenderer.Target(ByteArray(48) { 0x99.toByte() }, 12, 8) + DisplayListRenderer(emptyMap()).execute(DrawProtocol.sequence(listOf(plain)), corners) + assertEquals(9, corners.get(2, 1)); assertEquals(3, corners.get(5, 1)) + assertFails { DisplayListRenderer(emptyMap()).execute(DrawProtocol.sequence(listOf(plain + byteArrayOf(16))), corners) } + assertFails { DrawProtocol.roundedRect(DrawValue.Integer(0), DrawValue.Integer(0), 8, 6, 3, 0, 3, outside = 16) } + } + @Test fun replayWithAnUnknownRecordDrawsNothing() { val list = read(registeredReplay(imageKnown = false), 1100) assertTrue(list.resources.isEmpty()) diff --git a/tests/menu-display-list.test.cjs b/tests/menu-display-list.test.cjs index afb11032..21ed8fc2 100644 --- a/tests/menu-display-list.test.cjs +++ b/tests/menu-display-list.test.cjs @@ -73,7 +73,7 @@ test('system menu bridge shifts its surface and selected row together by +4',()= test('unselected sidebar icons retain -2 depth through shell cropping, including attention badges',()=>{ const shellScene=require('../.test-build/app/graphics/shell-scene.js'); const {ShellChromeLayer}=load('app/ui/shell/chrome-layer.ts',{ - '../../graphics/shell-scene':shellScene,'../../graphics/image':graphics, + '../../graphics/shell-scene':shellScene,'../../graphics/image':graphics,'../../graphics/display-list':require('../.test-build/app/graphics/display-list.js'), '../../graphics/ui-fonts':{getDefaultSmallFont:()=>font,getDefaultMediumFont:()=>font}, '../../graphics/textwrap':{},'./ambient-cards':{},'../../graphics/battery':{}, '../../native/notification-icons':{},'../../native/phone-battery':{},'../../util/render-freshness':{}, diff --git a/tests/menu-scroll-animation.test.cjs b/tests/menu-scroll-animation.test.cjs index 112a2a9c..2a06b4b2 100644 --- a/tests/menu-scroll-animation.test.cjs +++ b/tests/menu-scroll-animation.test.cjs @@ -11,7 +11,7 @@ const { MENU_BOUNCE_DURATION_MS, scrollOffsetExpression } = require('../.test-bu const { encodePresentation } = require('../.test-build/app/graphics/presentation-wire.js'); const { setMenuAnimationReader } = require('../.test-build/app/ui/menu-animation-pref.js'); // Also consumed by FrameDisplayListTest.kt. -const SCROLL = '078a000000030002000400020000070000009600000001000200040011223344556677880200020000000000ff250100300102300180f0800180f0161101001732800180f01610300180f0302341403101001102000200010008000000ff280101300100300180f0800180f0161101001732800180f01610300180f030234140310100170100160400020000000103'; +const SCROLL = '078b000000030002000400020000070000009600000001000200040011223344556677880200020000000000ff250100300102300180f0800180f0161101001732800180f01610300180f0302341403101001102000200010008000000ff280101300100300180f0800180f0161101001732800180f01610300180f03023414031010017010016040002000000010310'; const BOX = { x: 10, y: 5, width: 40, height: 60 }; const ITEMS = ['a', 'b', 'c', 'd', 'e', 'f', 'g']; From eff32d4a5a08e58fe88ce6a47718847b42e59a69 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Fri, 2 Oct 2026 10:56:49 -0700 Subject: [PATCH 34/60] Tweak padding/spacing in various apps --- app/apps/launcher/launcher-app.ts | 14 +++++-- app/ui/icon-grid.ts | 12 ++++-- app/ui/shell/chrome-layer.ts | 69 +++++++++++++++++++++---------- tests/app-layout.test.cjs | 49 +++++++++++++++++++++- tests/icon-grid.test.cjs | 14 +++++++ 5 files changed, 128 insertions(+), 30 deletions(-) diff --git a/app/apps/launcher/launcher-app.ts b/app/apps/launcher/launcher-app.ts index a50ea683..d7cf2ccf 100644 --- a/app/apps/launcher/launcher-app.ts +++ b/app/apps/launcher/launcher-app.ts @@ -4,7 +4,7 @@ import { GrayImage } from "../../graphics/image"; import { type Plane } from "../../graphics/plane"; import { renderIcon, type IconName } from "../../graphics/icons"; import { InputEvent } from "../../ui/gestures"; -import { IconGrid, ICON_GRID_ICON_SIZE } from "../../ui/icon-grid"; +import { IconGrid, ICON_GRID_BAND_INSET_X, ICON_GRID_HIGHLIGHT_INSET_Y, ICON_GRID_ICON_SIZE } from "../../ui/icon-grid"; import { Layer, LayerActions, LayerContext } from "../../ui/layers"; import { MenuLayer, type MenuItem } from "../../ui/menu"; import { WINDOW_MENU_LAYOUT } from "../../ui/window-menu"; @@ -44,6 +44,11 @@ export const LAUNCHER_WINDOW_ID = "launcher"; export const LAUNCHER_SURFACE_ID = "window:launcher"; const GRID_TOP = 6; +/** + * The root grid's top: its first row's highlight band then sits as far + * below the window's top edge as it is from the side edges. + */ +const ROOT_GRID_TOP = ICON_GRID_BAND_INSET_X - ICON_GRID_HIGHLIGHT_INSET_Y; /** One cell of the grid: an app, or a folder holding some of the apps. */ type LauncherGridEntry = @@ -258,12 +263,13 @@ class LauncherGridLayer implements Layer { const { width, height } = ctx.stack.getBaseSize(); const image = new GrayImage(width, height, 0); // The folder-name header band scales with the font. - const gridTop = this.currentFolder !== null ? GRID_TOP + font.lineHeight + 4 : GRID_TOP; + const gridTop = this.currentFolder !== null ? GRID_TOP + font.lineHeight + 4 : ROOT_GRID_TOP; if (this.currentFolder !== null) { image.drawText(font, 8, GRID_TOP - 2, truncateText(font, this.currentFolder, width - 16), 160); } - const gridBottom = height - 4; - this.grid.paint(image, { x: 0, y: gridTop, width, height: gridBottom - gridTop }, ctx.stack.isFocused()); + // The grid runs to the window's bottom edge, so a row cut off there for + // scrolling meets the window's border rather than a blank strip. + this.grid.paint(image, { x: 0, y: gridTop, width, height: height - gridTop }, ctx.stack.isFocused()); return image; } diff --git a/app/ui/icon-grid.ts b/app/ui/icon-grid.ts index 512153ec..ba50e892 100644 --- a/app/ui/icon-grid.ts +++ b/app/ui/icon-grid.ts @@ -24,6 +24,10 @@ const DEFAULT_LABEL_VALUE = 210; const WIDE_TEXT_X = 20; /** The scrollbar's columns at the right edge, which animations leave alone. */ const SCROLLBAR_GUTTER = 5; +/** How far a row-mode highlight band is inset from the box's left and right edges. */ +export const ICON_GRID_BAND_INSET_X = 4; +/** How far a grid row's highlight (band or cell) is inset from the row's top and bottom. */ +export const ICON_GRID_HIGHLIGHT_INSET_Y = 2; export type IconGridCell = { label: string; @@ -271,11 +275,13 @@ export class IconGrid { return { key: row.firstIndex, x: box.x + WIDE_TEXT_X - 6, y: textY - 2, width: box.width - 2 * WIDE_TEXT_X + 12, height: font.lineHeight + 4, radius: 4 }; } + const insetY = ICON_GRID_HIGHLIGHT_INSET_Y; if (this.mode === "item" || (!focused && shell.lastInputWasWatch())) { - return { key: row.firstIndex + this.selectedCol, x: Math.round(box.x + this.selectedCol * colW) + 6, y: y + 2, - width: Math.round(colW) - 12, height: rowH - 4, radius: 6 }; + return { key: row.firstIndex + this.selectedCol, x: Math.round(box.x + this.selectedCol * colW) + 6, y: y + insetY, + width: Math.round(colW) - 12, height: rowH - 2 * insetY, radius: 6 }; } - return { key: -1 - this.selectedRow, x: box.x + 4, y: y + 2, width: box.width - 8, height: rowH - 4, radius: 6 }; + return { key: -1 - this.selectedRow, x: box.x + ICON_GRID_BAND_INSET_X, y: y + insetY, + width: box.width - 2 * ICON_GRID_BAND_INSET_X, height: rowH - 2 * insetY, radius: 6 }; } /** diff --git a/app/ui/shell/chrome-layer.ts b/app/ui/shell/chrome-layer.ts index cd50d473..f9a0ce6b 100644 --- a/app/ui/shell/chrome-layer.ts +++ b/app/ui/shell/chrome-layer.ts @@ -1,6 +1,6 @@ import { shellCrop } from "../../graphics/shell-scene"; import type { Plane } from "../../graphics/plane"; -import { DrawOp } from "../../graphics/display-list"; +import { DrawOp, type ListCall, type ListClip } from "../../graphics/display-list"; import { G2_LENS_HEIGHT, G2_LENS_WIDTH, GrayImage, grayToNibble } from "../../graphics/image"; import { getDefaultMediumFont, getDefaultSmallFont } from "../../graphics/ui-fonts"; import { truncateText } from "../../graphics/textwrap"; @@ -128,19 +128,26 @@ type SwitcherLayout = { /** * Switcher geometry for the foreground window (a bottom row sits under it). * `windowsRight` is where a bottom row's window icons must end: short of - * the status bar when it shares the row. + * the status bar when it shares the row. `scrollRow` is the first visible + * window's index. */ -function switcherLayout(windowCount: number, heightMode: WindowHeightMode, appId?: string, windowsRight?: number): SwitcherLayout { +function switcherLayout(windowCount: number, heightMode: WindowHeightMode, appId?: string, windowsRight?: number, scrollRow = 0): SwitcherLayout { const position = switcherPosition(); if (position === "bottom") { const row = switcherRect(heightMode, appId); const width = (windowsRight ?? row.x + row.width) - row.x; + // Under a framed window the first window's cell (the launcher's) starts + // at the frame's left side, one pixel outside the window, so a selection + // tab there carries the side straight down (drawWindowFrame squares that + // corner for it). Scrolled past it, the cells keep the margin the left + // chevron needs. The count of slots stays the same either way. + const first = windowFramed(appId) && scrollRow === 0 ? row.x - 1 : row.x + LIST_MARGIN - 2; return { position, iconSize: ROW_ICON_SIZE, visibleCount: Math.max(1, ((width - 2 * LIST_MARGIN + ICON_SPACING) / ROW_STEP) | 0), cell: (slot) => ({ - x: row.x + LIST_MARGIN - 2 + slot * ROW_STEP, y: row.y, width: ROW_ICON_SIZE + 4, height: SWITCHER_ROW_HEIGHT, + x: first + slot * ROW_STEP, y: row.y, width: ROW_ICON_SIZE + 4, height: SWITCHER_ROW_HEIGHT, atSeparator: true, }), }; @@ -305,6 +312,9 @@ export class ShellChromeLayer implements Layer { private scrollRow = 0; // Where the last paint ended a bottom row's window icons, for hit testing. private rowWindowsRight: number | undefined; + // Whether the last paint's selection tab carries the window frame's left + // side down, so the frame's bottom-left corner is square. + private frameCornerSquare = false; constructor(private readonly getState: () => ShellChromeState) {} @@ -319,7 +329,7 @@ export class ShellChromeLayer implements Layer { } if (!statusInRow) this.drawTopBar(image, state); const frame = windowFrameRect(state); - if (frame) drawWindowFrame(image, frame); + if (frame) drawWindowFrame(image, frame, this.frameCornerSquare); drawAmbientCards(image, topBarSpan(state).right); return image; } @@ -342,9 +352,12 @@ export class ShellChromeLayer implements Layer { // -2, which on top of a -62 screen depth would shift a side off the // screen. (A framed window always has the row on screen.) const frame = windowFrameRect(state); - if (frame) drawWindowFrame(stripCanvas, frame); + if (frame) drawWindowFrame(stripCanvas, frame, this.frameCornerSquare); + // Under a framed window the row's surface spans the frame, whose left + // side the first selection tab continues. const strip = switcherRect(state.foregroundHeightMode, state.foregroundAppId); - parts.push(shellCrop(stripCanvas, strip.x, strip.y, strip.width, strip.height, 1)); + const span = frame ?? strip; + parts.push(shellCrop(stripCanvas, span.x, strip.y, span.width, strip.height, 1)); if (statusLeft !== null) { // The status bar keeps the top bar's surface and its depth, -2, over // the row's right end below its separator line, so the clock ticking @@ -370,7 +383,7 @@ export class ShellChromeLayer implements Layer { windowIndexAt(x: number, y: number, windowCount: number): number | null { if (windowCount === 0) return null; const state = this.getState(); - const layout = switcherLayout(windowCount, state.foregroundHeightMode, state.foregroundAppId, this.rowWindowsRight); + const layout = switcherLayout(windowCount, state.foregroundHeightMode, state.foregroundAppId, this.rowWindowsRight, this.scrollRow); const lastVisible = Math.min(windowCount, this.scrollRow + layout.visibleCount); for (let index = this.scrollRow; index < lastVisible; index++) { const cell = layout.cell(index - this.scrollRow); @@ -404,9 +417,10 @@ export class ShellChromeLayer implements Layer { ? this.drawRowStatus(statusImage, state, strip, count) : null; const windowsRight = statusLeft === null ? strip.x + strip.width : statusLeft - ROW_STATUS_GAP; this.rowWindowsRight = windowsRight; - const layout = switcherLayout(count, state.foregroundHeightMode, state.foregroundAppId, windowsRight); + const visibleCount = switcherLayout(count, state.foregroundHeightMode, state.foregroundAppId, windowsRight).visibleCount; + this.scrollRow = scrollToKeepSelectionVisible(this.scrollRow, state.selectedIndex, visibleCount, count); + const layout = switcherLayout(count, state.foregroundHeightMode, state.foregroundAppId, windowsRight, this.scrollRow); const { iconSize, position } = layout; - this.scrollRow = scrollToKeepSelectionVisible(this.scrollRow, state.selectedIndex, layout.visibleCount, count); const lastVisible = Math.min(count, this.scrollRow + layout.visibleCount); const cellOf = (index: number) => layout.cell(index - this.scrollRow); @@ -420,6 +434,8 @@ export class ShellChromeLayer implements Layer { const selVisible = state.selectedIndex >= this.scrollRow && state.selectedIndex < lastVisible; const selCell = selVisible ? cellOf(state.selectedIndex) : null; drawSeparator(image, state, strip, selCell?.atSeparator ? selCell : null); + const frame = position === "bottom" ? windowFrameRect(state) : null; + this.frameCornerSquare = !!frame && selCell?.x === frame.x; for (let index = this.scrollRow; index < lastVisible; index++) { const window = state.windows[index]!; @@ -799,18 +815,27 @@ function windowFrameRect(state: ShellChromeState): Rect | null { } /** - * Draw the window frame (see windowFrameRect) as one retained firmware - * rounded rect over whatever lies beneath it: no fill, so the window's - * content shows through, and black outside the curve, cutting the content's - * square corners to it. It is clipped short of its bottom row, which - * drawSeparator draws with the selection tab's gap. + * Draw the window frame (see windowFrameRect) as a retained firmware rounded + * rect over whatever lies beneath it: no fill, so the window's content shows + * through, and black outside the curve, cutting the content's square + * corners to it. It is clipped short of its bottom row, which drawSeparator + * draws with the selection tab's gap. With `squareBottomLeft` (a selection + * tab continuing its left side down), the rect is clipped away from that + * corner's box too, and the side runs straight through it as a one-pixel + * clipped clear, leaving the content's corner whole. */ -function drawWindowFrame(image: GrayImage, frame: Rect): void { - image.drawDisplayList({ resources: [], calls: [{ +function drawWindowFrame(image: GrayImage, frame: Rect, squareBottomLeft: boolean): void { + const border = grayToNibble(BORDER_VALUE), above = frame.height - 1; + const rounded = (clip: ListClip): ListCall => ({ op: DrawOp.ROUNDED_RECT, x: 0, y: 0, width: frame.width, height: frame.height, radius: FRAME_RADIUS, - background: 0, border: grayToNibble(BORDER_VALUE), outside: 0, - clip: { x: 0, y: 0, width: frame.width, height: frame.height - 1 }, - }] }, frame.x, frame.y, frame.width, frame.height); + background: 0, border, outside: 0, clip, + }); + const calls = squareBottomLeft ? [ + rounded({ x: FRAME_RADIUS, y: 0, width: frame.width - FRAME_RADIUS, height: above }), + rounded({ x: 0, y: 0, width: FRAME_RADIUS, height: above - FRAME_RADIUS }), + { op: DrawOp.CLEAR, color: border, clip: { x: 0, y: above - FRAME_RADIUS, width: 1, height: FRAME_RADIUS } }, + ] : [rounded({ x: 0, y: 0, width: frame.width, height: above })]; + image.drawDisplayList({ resources: [], calls }, frame.x, frame.y, frame.width, frame.height); } /** @@ -843,8 +868,10 @@ function drawSeparator( if (switcherPosition() === "bottom") { // Along the row's top edge: the full width of the row, or between the // corners of the window frame, whose bottom side this is. + // A selection tab at the frame's left side squares that corner (see + // drawWindowFrame), so the line starts right at the side. const frame = windowFrameRect(state); - const left = frame ? frame.x + frameEdgeInset() : strip.x; + const left = frame ? frame.x + (gap?.x === frame.x ? 0 : frameEdgeInset()) : strip.x; const right = frame ? frame.x + frame.width - 1 - frameEdgeInset() : strip.x + strip.width - 1; const y = strip.y; if (gap) { diff --git a/tests/app-layout.test.cjs b/tests/app-layout.test.cjs index cfdeacec..c43a8e51 100644 --- a/tests/app-layout.test.cjs +++ b/tests/app-layout.test.cjs @@ -171,7 +171,9 @@ function chromeLayer(g, { notifications = 0, phoneBattery = null, windows = 1, t batteryIndicatorVisible: () => true }, '../clock-format': { formatClockDate: () => 'Thu Oct 2', formatClockTime: () => '9:41' }, '../layers': { LayerStack: { allocateShellKey: () => nextKey++ } }, - '../menu': { scrollToKeepSelectionVisible: () => 0 }, + // As in menu.ts. + '../menu': { scrollToKeepSelectionVisible: (scroll, selected, visible, count) => Math.min(Math.max(0, count - visible), + Math.max(0, selected < scroll ? selected : selected >= scroll + visible ? selected - visible + 1 : scroll)) }, './geometry': g, }; const context = { exports: {}, require: (name) => modules[name] ?? {} }; @@ -188,7 +190,10 @@ test('a bottom app switcher frames the foreground window\'s content in a rounded const g = geometry(); g.settings.appSwitcherPositionSetting.value = 'bottom'; g.settings.uiDepthSetting.value = '62'; - const { chrome } = chromeLayer(g); + // The second window is selected: the first's (see the launcher test below) + // would square the bottom-left corner. + const { chrome, state } = chromeLayer(g, { windows: 2 }); + state.selectedIndex = 1; const parts = chrome.paintParts(); // Just the top bar and then the row: the frame is no surface of its own. const part = (key) => parts.find((p) => p.shellKey === key); @@ -226,6 +231,46 @@ test('a bottom app switcher frames the foreground window\'s content in a rounded assert.equal(chrome.paintParts().flatMap((p) => frames(p.image)).length, 0); }); +test('the launcher\'s tab lines up with the window frame, whose corner squares to meet it', () => { + const g = geometry(); + g.settings.appSwitcherPositionSetting.value = 'bottom'; + const paint = (chrome) => { + const [, strip] = chrome.paintParts(); + const [frame] = strip.image.draws.filter((d) => d.presentation?.displayList); + const lit = new Uint8Array(640 * 480).fill(255); + displayList.paintDisplayList(lit, lit.slice(), 640, 480, { displayList: frame.presentation.displayList, + x: strip.x + frame.x, y: strip.y + frame.y, width: frame.source.width, height: frame.source.height, depth: 0 }); + return { strip, px: (x, y) => lit[y * 640 + x], at: (x, y) => strip.image.pixels[(y - strip.y) * strip.image.width + x - strip.x] }; + }; + const { chrome, state } = chromeLayer(g, { windows: 3 }); + // The first cell starts at the frame's left side (x=31), one pixel outside + // the window, so the row's surface spans the frame. + let { strip, px, at } = paint(chrome); + assert.deepEqual([strip.x, strip.image.width], [31, 578]); + assert.deepEqual([chrome.windowIndexAt(31, 380, 3), chrome.windowIndexAt(30, 380, 3), chrome.windowIndexAt(71, 380, 3)], [0, null, 1]); + // Selected, its tab's outline continues the frame's left side straight + // down: the corner is square and the content's corner whole. + assert.deepEqual([px(31, 360), px(31, 365), px(32, 365)], [48, 48, 255]); + assert.deepEqual([at(31, 366), at(31, 370)], [150, 150]); + // Focused, the tab fills from the side. + state.focus = 'sidebar'; + ({ at } = paint(chrome)); + assert.equal(at(31, 370), 255); + // With another window selected the corner rounds again, and the separator + // starts where its curve ends; the launcher's cell stays at the side. + state.focus = 'window'; state.selectedIndex = 1; + ({ px, at } = paint(chrome)); + assert.deepEqual([px(31, 365), px(32, 365), at(35, 366), at(36, 366)], [0, 0, 1, 40]); + assert.equal(chrome.windowIndexAt(31, 380, 3), 0); + // Scrolled past the launcher, the cells keep the left chevron's margin. + const scrolled = chromeLayer(g, { windows: 20 }); + scrolled.state.selectedIndex = 19; + ({ px } = paint(scrolled.chrome)); + assert.equal(scrolled.chrome.windowIndexAt(35, 380, 20), null); + assert.notEqual(scrolled.chrome.windowIndexAt(41, 380, 20), null); + assert.equal(px(31, 365), 0); +}); + test('the status bar can join a bottom app switcher, and windows grow into the top bar', () => { const g = geometry(); g.settings.statusBarPositionSetting.value = 'switcher'; diff --git a/tests/icon-grid.test.cjs b/tests/icon-grid.test.cjs index 79e78324..1b7b00fb 100644 --- a/tests/icon-grid.test.cjs +++ b/tests/icon-grid.test.cjs @@ -122,6 +122,20 @@ function shown(image, at) { return withClock(at, () => Array.from(image.withDrawsBaked().pixels, (v) => Math.min(15, (v + 8) >> 4))); } +test('a box topped at the band inset less the highlight inset pads the first row band evenly', () => { + // The launcher's root grid (launcher-app.ts ROOT_GRID_TOP) relies on this. + const { grid } = makeGrid(); + const { ICON_GRID_BAND_INSET_X: insetX, ICON_GRID_HIGHLIGHT_INSET_Y: insetY } = loadIconGrid(); + const image = paint(grid, 1000, { x: 0, y: insetX - insetY, width: 500, height: 190 }); + const stroke = build('ui/menu-core').MENU_HIGHLIGHT_STROKE; + let left = 500, right = -1, top = 200; + image.pixels.forEach((v, i) => { + if (v !== stroke) return; + left = Math.min(left, i % 500); right = Math.max(right, i % 500); top = Math.min(top, (i / 500) | 0); + }); + assert.deepEqual([top, left, 500 - 1 - right], [insetX, insetX, insetX]); +}); + test('rows keep their content height instead of stretching, and the next row peeks clipped', () => { assert.equal(metrics.iconGridMinRowHeight({ lineHeight: LINE_HEIGHT }, 44, 2), ROW_H); const { grid } = makeGrid({ items: Array.from({ length: 15 }, (_, i) => `item${i}`) }); From 295922effddd9848cb115651c339a389b8a1b26f Mon Sep 17 00:00:00 2001 From: James Babcock Date: Fri, 2 Oct 2026 12:19:25 -0700 Subject: [PATCH 35/60] Various UI tweaks Fix missing submenu indicators and change their appearance. Clean up styling in the Terminal app and move Settings to the top-level menu. Remove right padding from the bottom bar. --- app/apps/developer/developer-app.ts | 18 +------ app/apps/evenhub/store-layer.ts | 2 +- app/apps/microphones/microphones-app.ts | 16 +------ app/apps/navigate/navigate-app.worker.ts | 14 ++---- app/apps/terminal/hub-header.ts | 9 ++-- app/apps/terminal/terminal-app.worker.ts | 60 +++++++++++++++--------- app/ui/dashboard/remote-input-menu.ts | 4 +- app/ui/dashboard/settings-menus.ts | 22 ++++----- app/ui/menu.ts | 23 ++++++++- app/ui/shell/chrome-layer.ts | 7 ++- tests/app-layout.test.cjs | 6 +-- tests/terminal-header.test.cjs | 10 ++-- 12 files changed, 95 insertions(+), 96 deletions(-) diff --git a/app/apps/developer/developer-app.ts b/app/apps/developer/developer-app.ts index 4412638a..7030c02e 100644 --- a/app/apps/developer/developer-app.ts +++ b/app/apps/developer/developer-app.ts @@ -1,4 +1,4 @@ -import { MenuLayer, drawSubmenuIndicator, type MenuItem } from "../../ui/menu"; +import { MenuLayer, submenuItem, type MenuItem } from "../../ui/menu"; import { ScreenTestLayer } from "./screen-test"; import { InputEventsLayer } from "./input-events"; import { shell } from "../../ui/shell/shell"; @@ -11,9 +11,7 @@ import { ResourceUsageLayer } from "./resource-usage"; import { LoadAppFromQrLayer, LoadAppFromUrlLayer } from "./load-app"; import { unicodeTestMenu } from "./unicode-test"; import { type AppContext } from "../app-definition"; -import { getDefaultSmallFont } from "../../graphics/ui-fonts"; import { appViewportSize } from "../../ui/shell/geometry"; -import { LIST_ROW_TEXT_INSET } from "../../ui/metrics"; import { createInProcessWindow, YieldAtRootLayer, @@ -36,20 +34,6 @@ const MENU_LAYOUT = { opaque: true, }; -/** A row that opens a nested page: the label plus a right-edge ">". */ -function submenuItem(label: string, onSelect: MenuItem["onSelect"]): MenuItem { - return { - label, - onSelect, - render: ({ image, x, y, width, height, selected, disabled, text }) => { - const font = getDefaultSmallFont(); - const value = disabled ? 70 : selected ? 255 : 200; - image.drawText(font, x, y + LIST_ROW_TEXT_INSET, text, value); - drawSubmenuIndicator(image, font, x, y, width, height, value); - }, - }; -} - type OpenPage = (ctx: Parameters[0]) => void; /** The diagnostic demos, one level down from the root menu. */ diff --git a/app/apps/evenhub/store-layer.ts b/app/apps/evenhub/store-layer.ts index 966fc279..bd974dc8 100644 --- a/app/apps/evenhub/store-layer.ts +++ b/app/apps/evenhub/store-layer.ts @@ -174,7 +174,7 @@ export class EvenHubStoreLayer implements Layer { for (const [index, line] of wrapText(font, message, width - LIST_X * 2).entries()) { image.drawText(font, LIST_X, headerH + 16 + index * lineStep(font), line, 190); } - image.drawText(font, LIST_X, height - font.lineHeight - 4, `${GESTURE_CLICK} edit credentials`, 105); + image.drawText(font, LIST_X, height - font.lineHeight - 4, `${GESTURE_CLICK} log in`, 105); return image; } diff --git a/app/apps/microphones/microphones-app.ts b/app/apps/microphones/microphones-app.ts index f567e651..c8f6a6ec 100644 --- a/app/apps/microphones/microphones-app.ts +++ b/app/apps/microphones/microphones-app.ts @@ -1,14 +1,13 @@ import { imageFromAsciiArt } from "../../graphics/image"; import { getDefaultSmallFont } from "../../graphics/ui-fonts"; import { appViewportSize } from "../../ui/shell/geometry"; -import { LIST_ROW_TEXT_INSET } from "../../ui/metrics"; import { MenuLayer, TextPageLayer, drawRightValueMenuItem, - drawSubmenuIndicator, drawToggleMenuItem, openModalMenu, + submenuItem, type MenuItem, } from "../../ui/menu"; import { enumSettingMenuItem, toggleSettingMenuItem } from "../../ui/dashboard-settings"; @@ -73,19 +72,6 @@ const MENU_LAYOUT = { opaque: true, }; -function submenuItem(label: string, onSelect: MenuItem["onSelect"]): MenuItem { - return { - label, - onSelect, - render: ({ image, x, y, width, height, selected, disabled, text }) => { - const font = getDefaultSmallFont(); - const value = disabled ? 70 : selected ? 255 : 200; - image.drawText(font, x, y + LIST_ROW_TEXT_INSET, text, value); - drawSubmenuIndicator(image, font, x, y, width, height, value); - }, - }; -} - /** Persist a config change and re-apply it live when the array is streaming. */ function updateMicConfig(mutate: (config: MicConfig) => MicConfig): void { const updated = mutate(loadMicConfig()); diff --git a/app/apps/navigate/navigate-app.worker.ts b/app/apps/navigate/navigate-app.worker.ts index 28fbf975..db34f057 100644 --- a/app/apps/navigate/navigate-app.worker.ts +++ b/app/apps/navigate/navigate-app.worker.ts @@ -19,6 +19,7 @@ import { drawRightValueMenuItem, drawSubmenuIndicator, drawToggleMenuItem, + submenuItem, type MenuItem, } from "../../ui/menu"; import { Menu, type MenuDrawArgs } from "../../ui/menu-core"; @@ -938,16 +939,9 @@ function windowMenuItems(): MenuItem[] { enumSettingMenuItem(navigateDisplayModeSetting), enumSettingMenuItem(navigateVerticalPositionSetting), ); - items.push({ - label: "Saved destinations", - onSelect: (ctx) => { - ctx.stack.push(new WindowMenuLayer("Saved destinations", savedDestinationMenuItems())); - }, - render: ({ image, x, y, width, height, text }) => { - image.drawText(smallFont, x, y + LIST_ROW_TEXT_INSET, text, 200); - drawSubmenuIndicator(image, smallFont, x - 10, y, width + 20, height, 150); - }, - }); + items.push(submenuItem("Saved destinations", (ctx) => { + ctx.stack.push(new WindowMenuLayer("Saved destinations", savedDestinationMenuItems())); + })); items.push({ label: navigateRememberRecentSetting.label, onSelect: () => { diff --git a/app/apps/terminal/hub-header.ts b/app/apps/terminal/hub-header.ts index fc7b5a91..c3fbbe7a 100644 --- a/app/apps/terminal/hub-header.ts +++ b/app/apps/terminal/hub-header.ts @@ -1,11 +1,14 @@ import { wrapText, type WrapFont } from '../../graphics/textwrap'; +/** Left edge of the hub's title line (and of a wrapped status block under it). */ +export const HUB_TITLE_X = 12; + /** Keep short status on the title row; give long errors their full width. */ export function layoutHubHeader(font: WrapFont, title: string, status: string, width: number, step: number) { - const inlineX = 18 + font.measureText(title) + 16; + const inlineX = HUB_TITLE_X + font.measureText(title) + 16; const inline = !/[\r\n]/.test(status) && font.measureText(status) <= Math.max(0, width - inlineX - 12); - const lines = inline ? [status] : wrapText(font, status, Math.max(1, width - 30)); - const x = inline ? inlineX : 18; + const lines = inline ? [status] : wrapText(font, status, Math.max(1, width - HUB_TITLE_X - 12)); + const x = inline ? inlineX : HUB_TITLE_X; const y = inline ? 10 : 10 + step; return { x, y, lines, listTop: inline ? 16 + step : 16 + step * (1 + lines.length) }; } diff --git a/app/apps/terminal/terminal-app.worker.ts b/app/apps/terminal/terminal-app.worker.ts index 066ce950..f1b05247 100644 --- a/app/apps/terminal/terminal-app.worker.ts +++ b/app/apps/terminal/terminal-app.worker.ts @@ -38,7 +38,7 @@ import { GrayImage, type UiFont } from "../../graphics/image"; import { flattenPlanesWithDraws, planesFingerprint, type Plane } from "../../graphics/plane"; import { prepareFrameDraws } from "../../graphics/glyph-wire"; import { getDefaultSmallFont, getTerminalFontConfig } from "../../graphics/ui-fonts"; -import { layoutHubHeader } from "./hub-header"; +import { HUB_TITLE_X, layoutHubHeader } from "./hub-header"; import { TERMINAL_ICON_GLYPHS, type IconActivity } from "../../graphics/icons"; import { drawSessionRow, @@ -65,9 +65,9 @@ import { import { terminalFontPickerMenuItem } from "../../ui/font-picker"; import { connectionDisplayName, loadConnections, parseConnectionString, saveConnections, TERMINAL_CONNECTIONS_KEY, updateConnection, type TerminalConnection } from "./connections"; import { TerminalEmulator } from "./terminal-emulator"; -import { drawSubmenuIndicator, type MenuItem } from "../../ui/menu"; +import { drawSubmenuIndicator, submenuItem, type MenuItem } from "../../ui/menu"; import { Menu, type MenuDrawArgs } from "../../ui/menu-core"; -import { LIST_ROW_TEXT_INSET, lineStep, listRowHeight } from "../../ui/metrics"; +import { lineStep, listRowHeight } from "../../ui/metrics"; import { WindowMenu, WindowMenuLayer } from "../../ui/window-menu"; import { appViewportSize } from "../../ui/shell/geometry"; import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window"; @@ -1052,17 +1052,9 @@ function connectedControls(): ControlConnection[] { function windowMenuItems(window: TerminalWindow): MenuItem[] { const items: MenuItem[] = [ - { - label: "Settings", - onSelect: (ctx) => { - ctx.stack.push(new WindowMenuLayer("Terminal settings", settingsMenuItems())); - }, - render: ({ image, x, y, width, height, text }) => { - const font = chromeFont(); - image.drawText(font, x, y + LIST_ROW_TEXT_INSET, text, 200); - drawSubmenuIndicator(image, font, x - 10, y, width + 20, height, 150); - }, - }, + submenuItem("Settings", (ctx) => { + ctx.stack.push(new WindowMenuLayer("Terminal settings", settingsMenuItems())); + }), ]; if (window.kind === "hub") { const connected = connectedControls(); @@ -1227,6 +1219,14 @@ type HubItem = { * when it has an onSelect (launch a shell on that host). */ heading?: boolean; + /** + * Top-level action (Manage Connections, Settings, Connect ): drawn + * unindented like a heading but at full brightness, rather than as an + * indented session row. + */ + topLevel?: boolean; + /** Opens a nested menu: a right-edge ">" marks the row. */ + submenu?: boolean; /** Session with recent output: an animated indicator marks the row. */ active?: boolean; /** Glyph of the view window showing this session (the number column). */ @@ -1236,8 +1236,12 @@ type HubItem = { /** Vertical offset of a row's text line from the top of its selection box. */ const HUB_ROW_TEXT_INSET = 4; -/** Horizontal inset of the list's selection boxes from the viewport edges. */ -const HUB_LIST_X = 20; +/** Left edge of the list's selection boxes. */ +const HUB_LIST_LEFT = 12; +/** Right inset of the selection boxes, clear of the scrollbar. */ +const HUB_LIST_RIGHT = 20; +/** Left padding of unindented (heading and top-level) row text inside its selection box. */ +const HUB_TOP_LEVEL_TEXT_X = 6; /** The hub window's list, created on first use so openWindow stays free of paint dependencies. */ function hubMenu(window: HubWindow): Menu { @@ -1252,10 +1256,12 @@ function hubMenu(window: HubWindow): Menu { return window.list; } -function drawHubRow({ image, item, x, y, width, selected }: MenuDrawArgs): void { +function drawHubRow({ image, item, x, y, width, height, selected }: MenuDrawArgs): void { const font = chromeFont(); - if (item.heading) { - image.drawText(font, x, y + HUB_ROW_TEXT_INSET, item.label, selected ? 255 : 140); + if (item.heading || item.topLevel) { + const value = selected ? 255 : item.heading ? 140 : 200; + image.drawText(font, x + HUB_TOP_LEVEL_TEXT_X, y + HUB_ROW_TEXT_INSET, item.label, value); + if (item.submenu) drawSubmenuIndicator(image, font, x, y, width, height, value); return; } // Activity gutter, open-window number column, then the label, truncated @@ -1322,8 +1328,15 @@ function hubSessionItems(window: HubWindow): HubItem[] { const items: HubItem[] = [ { label: "Manage Connections", + topLevel: true, onSelect: () => setHubMode(window, "connections"), }, + { + label: "Settings", + topLevel: true, + submenu: true, + onSelect: () => windowMenu(window).open(settingsMenuItems(), "Terminal settings"), + }, ]; const connected = connectedControls(); const multiHost = connected.length > 1; @@ -1366,6 +1379,7 @@ function hubSessionItems(window: HubWindow): HubItem[] { if (control.config.enabled && control.state?.phase === "connecting") continue; items.push({ label: `Connect ${connectionDisplayName(control.config)}`, + topLevel: true, onSelect: () => connectControl(control), }); } @@ -1675,14 +1689,14 @@ function paintHub(window: HubWindow): GrayImage { // No border box: the shell chrome (top bar + sidebar) already frames the app. // Long statuses get a wrapped block and move the list below it. const title = window.mode === "connections" ? "Terminal - Connections" : "Terminal"; - image.drawText(font, 18, 10, title, 220); + image.drawText(font, HUB_TITLE_X, 10, title, 220); const header = layoutHubHeader(font, title, hubStatusLine(window), window.viewportWidth, step); header.lines.forEach((line, index) => image.drawText(font, header.x, header.y + index * step, line, 170)); let listTop = header.listTop; if (window.mode === "sessions" && controls.size === 0) { - image.drawText(font, 24, listTop, "Add a g2mirror:// connection to get started, see:", 150); - image.drawText(font, 24, listTop + step, "https://github.com/jimrandomh/g2mirror", 190); + image.drawText(font, HUB_TITLE_X + 6, listTop, "Add a g2mirror:// connection to get started, see:", 150); + image.drawText(font, HUB_TITLE_X + 6, listTop + step, "https://github.com/jimrandomh/g2mirror", 190); listTop += 2 * step + 6; } @@ -1694,7 +1708,7 @@ function paintHub(window: HubWindow): GrayImage { const listHeight = window.viewportHeight - 6 - listTop; list.paint( image, - { x: HUB_LIST_X, y: listTop - 2, width: window.viewportWidth - 2 * HUB_LIST_X, height: listHeight }, + { x: HUB_LIST_LEFT, y: listTop - 2, width: window.viewportWidth - HUB_LIST_LEFT - HUB_LIST_RIGHT, height: listHeight }, window.focused, ); list.drawScrollbar(image, window.viewportWidth - 10, listTop, listHeight - 4); diff --git a/app/ui/dashboard/remote-input-menu.ts b/app/ui/dashboard/remote-input-menu.ts index eb046096..690310f5 100644 --- a/app/ui/dashboard/remote-input-menu.ts +++ b/app/ui/dashboard/remote-input-menu.ts @@ -5,7 +5,7 @@ import { copyRemoteToken, remoteInterfaces } from '../../native/remote-input'; import { TextViewerLayer } from '../../apps/files/text-viewer'; import { ConfigSettingString, textSettingMenuItem } from '../dashboard-settings'; import { getDefaultSmallFont } from '../../graphics/ui-fonts'; -import { drawRightValueMenuItem, type MenuItem } from '../menu'; +import { drawRightValueMenuItem, submenuItem, type MenuItem } from '../menu'; import { type LayerContext } from '../layers'; import { openSettingsSubMenu } from './settings-panel'; @@ -86,5 +86,5 @@ function openTokens(ctx: LayerContext): void { ]); } export function remoteInputMenuItem(): MenuItem { - return { label: 'Input tokens', description: 'Allow another app to provide ring/watch input, type into the foreground window, or send messages to the voice assistant. Create tokens with individual permissions and revoke them here.', onSelect: openTokens }; + return submenuItem('Input tokens', openTokens, { description: 'Allow another app to provide ring/watch input, type into the foreground window, or send messages to the voice assistant. Create tokens with individual permissions and revoke them here.' }); } diff --git a/app/ui/dashboard/settings-menus.ts b/app/ui/dashboard/settings-menus.ts index eaf4a2ed..bd62d6ba 100644 --- a/app/ui/dashboard/settings-menus.ts +++ b/app/ui/dashboard/settings-menus.ts @@ -24,7 +24,7 @@ import { } from "../../native/asr-model"; import { TextViewerLayer } from "../../apps/files/text-viewer"; import type { LayerContext } from "../layers"; -import { drawRightValueMenuItem, openModalMenu, type MenuItem } from "../menu"; +import { drawRightValueMenuItem, openModalMenu, submenuItem, type MenuItem } from "../menu"; import { shell } from "../shell/shell"; import { anthropicApiKeySetting, @@ -262,17 +262,17 @@ function customizationRows(): () => MenuItem[] { } function autoBrightnessMenuItem(): MenuItem { - return { - label: "Auto-brightness", - description: "Adjust the minimum, maximum, and ambient-light curve used by Auto brightness.", - onSelect: (ctx) => { + return submenuItem( + "Auto-brightness", + (ctx) => { openSettingsSubMenu(ctx, "Auto-brightness", [ enumSettingMenuItem(autoBrightnessMinSetting), enumSettingMenuItem(autoBrightnessMaxSetting), textSettingMenuItem(autoBrightnessCurveSetting), ]); }, - }; + { description: "Adjust the minimum, maximum, and ambient-light curve used by Auto brightness." }, + ); } /** @@ -310,16 +310,16 @@ function batteryIndicatorsMenuItem(): MenuItem { /** The Customization section's "Animations" row: opens a modal submenu of animation toggles. */ function animationsMenuItem(): MenuItem { - return { - label: "Animations", - description: "Turn off menu and icon-grid motion, or the fade when the screen turns on and off.", - onSelect: (ctx) => { + return submenuItem( + "Animations", + (ctx) => { openSettingsSubMenu(ctx, "Animations", [ toggleSettingMenuItem(menuAnimationSetting), toggleSettingMenuItem(screenFadeSetting), ]); }, - }; + { description: "Turn off menu and icon-grid motion, or the fade when the screen turns on and off." }, + ); } const LOCAL_MODEL_GB = `${(LOCAL_MODEL.sizeBytes / 1e9).toFixed(1)}GB`; diff --git a/app/ui/menu.ts b/app/ui/menu.ts index dc64c901..4d56cc20 100644 --- a/app/ui/menu.ts +++ b/app/ui/menu.ts @@ -140,7 +140,7 @@ export function drawListScrollbar( } /** - * Draw a ">" submenu indicator inset at the right edge of a row's selection + * Draw a "▶>" submenu indicator inset at the right edge of a row's selection * highlight box, vertically centered within it. Pass the same rect as the * row's drawSelectionHighlight call (the row need not actually be selected). */ @@ -153,12 +153,31 @@ export function drawSubmenuIndicator( highlightHeight: number, value: number, ): void { - const arrow = ">"; + const arrow = "▶"; const x = highlightX + highlightWidth - font.measureText(arrow) - 4; const y = centeredTextY(font, highlightY, highlightHeight); image.drawText(font, x, y, arrow, value); } +/** A row that opens a nested menu: the label plus a right-edge ">". */ +export function submenuItem( + label: string, + onSelect: MenuItem["onSelect"], + options: Pick = {}, +): MenuItem { + return { + ...options, + label, + onSelect, + render: ({ image, x, y, width, height, selected, disabled, text }) => { + const font = getDefaultSmallFont(); + const value = disabled ? 70 : selected ? 255 : 200; + image.drawText(font, x, y + LIST_ROW_TEXT_INSET, text, value); + drawSubmenuIndicator(image, font, x, y, width, height, value); + }, + }; +} + export function drawToggleMenuItem( image: GrayImage, font: UiFont, diff --git a/app/ui/shell/chrome-layer.ts b/app/ui/shell/chrome-layer.ts index f9a0ce6b..59252c34 100644 --- a/app/ui/shell/chrome-layer.ts +++ b/app/ui/shell/chrome-layer.ts @@ -71,9 +71,8 @@ const ROW_STEP = ROW_ICON_SIZE + ICON_SPACING; // (whose last is the divider, which the row has no use for) centred in the // row below its separator line. const ROW_STATUS_TOP = 1 + ((SWITCHER_ROW_HEIGHT - TOP_BAR_HEIGHT) >> 1); -// Its clock ends this far from the row's right end, as the top bar's starts -// from its left; batteries keep the top bar's clock-to-icons gap from it. -const ROW_STATUS_EDGE_MARGIN = 10; +// Its clock ends flush with the row's right end, which is the window's +// right edge; batteries keep the top bar's clock-to-icons gap from it. const ROW_CLOCK_GAP = 16; // Between the windows' end of the row (its scroll chevron) and the status. const ROW_STATUS_GAP = 8; @@ -501,7 +500,7 @@ export class ShellChromeLayer implements Layer { const top = row.y + ROW_STATUS_TOP; const font = getDefaultMediumFont(); const clock = clockText(); - const clockX = row.x + row.width - ROW_STATUS_EDGE_MARGIN - font.measureText(clock); + const clockX = row.x + row.width - font.measureText(clock); image.drawText(font, clockX, top + Math.max(0, ((TOP_BAR_HEIGHT - font.lineHeight) / 2) | 0), clock, 210); // The battery block keeps its usual right margin inside the edge it's given. const batteryLeft = this.drawTopBarBatteries(image, state, top, clockX - ROW_CLOCK_GAP + BATTERY_BLOCK_RIGHT_MARGIN); diff --git a/tests/app-layout.test.cjs b/tests/app-layout.test.cjs index c43a8e51..23b254f3 100644 --- a/tests/app-layout.test.cjs +++ b/tests/app-layout.test.cjs @@ -302,10 +302,10 @@ test('the switcher row lays out windows, free space, notifications, widgets, bat assert.deepEqual(Array.from(parts, (p) => [p.shellKey, p.depth ?? 0]), [[1, 0], [2, -2]]); const [row, status] = parts; // Right to left from the row's end (x=608), centred under its separator - // line (y=366): "Thu Oct 2 9:41" (56px) 10px in; the battery block (label + // line (y=366): "Thu Oct 2 9:41" (56px) flush with it; the battery block (label // 20 + gap 5 + gauge 21) 16px before it; the 30px widget 10px before that; // then the two notification icons, 8px clear of the widget. - const clockX = 608 - 10 - 56, batteryLeft = clockX - 16 - 46, trayLeft = batteryLeft - 40, iconsLeft = trayLeft - 8 - 56 + 4; + const clockX = 608 - 56, batteryLeft = clockX - 16 - 46, trayLeft = batteryLeft - 40, iconsLeft = trayLeft - 8 - 56 + 4; assert.deepEqual([status.x, status.y, status.image.width, status.image.height], [iconsLeft, 367, 608 - iconsLeft, 35]); const at = (p, x, y) => p.image.withDrawsBaked().pixels[(y - p.y) * p.image.width + x - p.x]; // The clock's text runs 8 rows down the top bar's layout, which sits 5 rows into the row. @@ -332,7 +332,7 @@ test('many windows scroll in what the notification icons leave them', () => { const [row, status] = chrome.paintParts(); // Clock only (no batteries or widgets): notifications end 8px before its // 8px lead-in, and stop where three window slots plus margins remain. - const trayLeft = 608 - 10 - 56 - 8, floor = 32 + 20 + 3 * 40 - 8 + 8; + const trayLeft = 608 - 56 - 8, floor = 32 + 20 + 3 * 40 - 8 + 8; const max = Math.floor((trayLeft - 8 - floor + 4) / 28); assert.equal(requested.at(-1), max); const iconsLeft = trayLeft - 8 - max * 28 + 4; diff --git a/tests/terminal-header.test.cjs b/tests/terminal-header.test.cjs index ff697abc..1ad62a4a 100644 --- a/tests/terminal-header.test.cjs +++ b/tests/terminal-header.test.cjs @@ -1,10 +1,10 @@ const test = require('node:test'); const assert = require('node:assert/strict'); -const { layoutHubHeader } = require('../.test-build/app/apps/terminal/hub-header.js'); +const { HUB_TITLE_X, layoutHubHeader } = require('../.test-build/app/apps/terminal/hub-header.js'); const font = size => ({ measureText: text => [...text].length * size, getGlyph: () => ({ dwidthX: size }) }); test('terminal short status stays inline; exact-fit status does not move the list', () => { const f = font(7), title = 'Terminal', status = 'Connected.'; - const width = 18 + f.measureText(title) + 16 + f.measureText(status) + 12; + const width = HUB_TITLE_X + f.measureText(title) + 16 + f.measureText(status) + 12; const header = layoutHubHeader(f, title, status, width, 18); assert.equal(header.y, 10); assert.equal(header.listTop, 34); assert.deepEqual(header.lines, [status]); assert.equal(layoutHubHeader(f, title, status, width - 1, 18).y, 28); @@ -14,16 +14,16 @@ test('terminal long error wraps in full-width block and moves menu below all lin for (const size of [5, 7, 12, 20]) for (const width of [320, 576, 640]) { const f = font(size), step = size * 2; const header = layoutHubHeader(f, 'Terminal - Connections', status, width, step); - assert.equal(header.x, 18); assert.equal(header.y, 10 + step); + assert.equal(header.x, HUB_TITLE_X); assert.equal(header.y, 10 + step); assert.equal(header.lines.join(' '), status); - assert.ok(header.lines.every(line => f.measureText(line) <= width - 30)); + assert.ok(header.lines.every(line => f.measureText(line) <= width - HUB_TITLE_X - 12)); assert.ok(header.listTop >= header.y + header.lines.length * step); assert.equal(header.listTop, 16 + step * (1 + header.lines.length)); } }); test('terminal explicit newlines and long unbroken messages remain complete', () => { const h = layoutHubHeader(font(7), 'Terminal', 'First\nSecond', 640, 18); - assert.equal(h.x, 18); assert.deepEqual(h.lines, ['First', 'Second']); + assert.equal(h.x, HUB_TITLE_X); assert.deepEqual(h.lines, ['First', 'Second']); const word = 'x'.repeat(200); const wrapped = layoutHubHeader(font(7), 'Terminal', word, 320, 18); assert.equal(wrapped.lines.join(''), word); From 96e155ebb096f264fc202bbc204c6f2204de339e Mon Sep 17 00:00:00 2001 From: James Babcock Date: Fri, 2 Oct 2026 23:36:51 -0700 Subject: [PATCH 36/60] Add centered/popup version of app switcher; plus various UI tweaks --- CHANGELOG | 5 +- app/apps/compass/compass-app.ts | 5 +- app/apps/music/music-app.ts | 106 ++++++--- app/apps/terminal/terminal-app.worker.ts | 63 ++--- app/g2/dashboard-controller.ts | 28 ++- app/ui/dashboard-settings.ts | 79 +++++-- app/ui/dashboard/settings-menus.ts | 30 ++- app/ui/shell/chrome-layer.ts | 279 +++++++++++++++++++---- app/ui/shell/geometry.ts | 155 ++++++++++--- app/ui/shell/shell.ts | 16 +- tests/app-layout.test.cjs | 163 ++++++++++++- tests/terminal-hub-hosts.test.cjs | 71 ++++++ 12 files changed, 810 insertions(+), 190 deletions(-) create mode 100644 tests/terminal-hub-hosts.test.cjs diff --git a/CHANGELOG b/CHANGELOG index cccf23ec..37428aa9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,7 +2,10 @@ ## 0.8.2 - Future -* Add an option to move the app switcher to the right or bottom, and adjust screen depth if bottom +* Customizable app switcher: put it on the left, right, bottom, or make it a popup +* Add Dense style for battery indicators +* Terminal app lists every configured host, including ones that are still connecting +* Music app shows its library-browsing app picker on the front page when nothing is playing ## 0.8.1 - 2026-09-30 diff --git a/app/apps/compass/compass-app.ts b/app/apps/compass/compass-app.ts index 15beac96..0f546d7f 100644 --- a/app/apps/compass/compass-app.ts +++ b/app/apps/compass/compass-app.ts @@ -38,6 +38,9 @@ const TOP_PAD = 2; const BOTTOM_PAD = 4; /** Clearance between the rose's widest point and the viewport edge. */ const EDGE_PAD = 8; +/** Inset of the top-right magnetometer calibration readout from the window edges. */ +const ACCURACY_TOP_PAD = TOP_PAD + 4; +const ACCURACY_RIGHT_PAD = EDGE_PAD + 4; /** Cap on the rose's radius, so a tall window doesn't get a comical one. */ const MAX_ROSE_RADIUS = 98; @@ -197,7 +200,7 @@ class CompassLayer implements Layer { y += smallStep; } const accuracyText = magneticAccuracyText(this.diagnostics); - image.drawText(small, width - EDGE_PAD - small.measureText(accuracyText), TOP_PAD, accuracyText, 175); + image.drawText(small, width - ACCURACY_RIGHT_PAD - small.measureText(accuracyText), ACCURACY_TOP_PAD, accuracyText, 175); return image; } diff --git a/app/apps/music/music-app.ts b/app/apps/music/music-app.ts index 7c08867a..5d7e24ff 100644 --- a/app/apps/music/music-app.ts +++ b/app/apps/music/music-app.ts @@ -1,5 +1,5 @@ import { getDefaultMediumFont, getDefaultSmallFont } from "../../graphics/ui-fonts"; -import { GrayImage } from "../../graphics/image"; +import { GrayImage, type UiFont } from "../../graphics/image"; import { wrapText, truncateText } from "../../graphics/textwrap"; import { clamp } from "../../util/numeric-util"; import { directionalFallback, GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL_DOWN, GESTURE_SCROLL_UP, type InputEvent, isDirectionalInput } from "../../ui/gestures"; @@ -20,8 +20,9 @@ const ART_SIZE = 112; const ART_X = 8; // left margin matches the top margin const ART_Y = 8; const META_X = ART_X + ART_SIZE + 14; -const PROGRESS_TIME_Y = ART_Y + 100; const PROGRESS_BAR_Y = ART_Y + 116; +/** Clear rows between the time labels' baseline (digits have no descenders) and the bar. */ +const PROGRESS_TIME_GAP = 3; const LIST_TOP = 136; /** Gap between the menus' last row band and the viewport bottom. */ const LIST_BOTTOM_MARGIN = 4; @@ -47,6 +48,8 @@ type FocusColumn = "actions" | "playlist"; * Music controller app: metadata + album art + transport controls for the * active Android media session (any player that publishes one), plus the * player's queue when it exposes one (scroll to a track, click to jump). + * With no session, the front page lists the apps whose library can be + * browsed (click one to open its MediaBrowseLayer). */ class MusicAppLayer implements Layer { // Watch swipes skip tracks: right = next, left = previous. @@ -66,6 +69,19 @@ class MusicAppLayer implements Layer { getHeight: () => tightRowHeight(getDefaultSmallFont()), draw: (args) => this.drawQueueItem(args), }); + /** The no-session front page's picker of apps whose library can be browsed. */ + private readonly libraryMenu = new Menu({ + wrap: false, + rowGap: 1, + highlight: { radius: 4 }, + getHeight: () => tightRowHeight(getDefaultSmallFont()), + draw: (args) => this.drawLibraryApp(args), + }); + /** + * Whether the browsable-app list has been re-queried since the no-session + * page last appeared (apps installed since the cached query then show up). + */ + private libraryAppsFresh = false; private art: GrayImage | null = null; private artKey = ""; @@ -93,16 +109,31 @@ class MusicAppLayer implements Layer { } if (!media.available) { + const apps = mediaBrowserBridge.listBrowsableApps(!this.libraryAppsFresh); + this.libraryAppsFresh = true; + this.libraryMenu.setItems(apps); image.drawText(font, 24, 16, "No active media session.", 180); - if (mediaBrowserBridge.listBrowsableApps().length) { - image.drawText(font, 24, 22 + lineStep(font), "Click to browse a music app's library,", 150); - image.drawText(font, 24, 22 + 2 * lineStep(font), "or start playback on the phone.", 150); - image.drawText(font, 20, height - 16, `${GESTURE_CLICK} browse`, 110); - } else { - image.drawText(font, 24, 22 + lineStep(font), "Start playback in another app on the phone.", 150); + const prompt = apps.length + ? "Browse a music app's library, or start playback on the phone." + : "Start playback in another app on the phone."; + let y = 22 + lineStep(font); + for (const line of wrapText(font, prompt, width - 48)) { + image.drawText(font, 24, y, line, 150); + y += lineStep(font); + } + if (apps.length) { + const listTop = y + 6; + const listHeight = height - listTop - LIST_BOTTOM_MARGIN; + this.libraryMenu.paint( + image, + { x: 24 - LIST_TEXT_INSET, y: listTop - 1, width: width - 48 + 2 * LIST_TEXT_INSET - 4, height: listHeight }, + ctx.stack.isFocused(), + ); + this.libraryMenu.drawScrollbar(image, width - 12, listTop, listHeight - 4); } return image; } + this.libraryAppsFresh = false; this.drawArt(image, media); @@ -113,7 +144,7 @@ class MusicAppLayer implements Layer { // (title, second title line, artist, album, player app); when the font is // too large for all five, the title gets one truncated line instead of // wrapping to two, and the rest shift up a slot. - const maxLines = Math.floor((PROGRESS_TIME_Y - metaTop - 4 - font.lineHeight) / metaStep) + 1; + const maxLines = Math.floor((progressTimeY(font) - metaTop - 4 - font.lineHeight) / metaStep) + 1; const titleSlots = maxLines >= 5 ? 2 : 1; const title = media.title || "Unknown title"; const titleLines = @@ -171,6 +202,13 @@ class MusicAppLayer implements Layer { } } + private drawLibraryApp({ image, item: app, x, y, width, height, selected }: MenuDrawArgs): void { + const font = getDefaultSmallFont(); + const value = selected ? 255 : 200; + image.drawText(font, x + LIST_TEXT_INSET, centeredTextY(font, y, height), truncateText(font, app.appName, width - 2 * LIST_TEXT_INSET - 16), value); + drawSubmenuIndicator(image, font, x, y, width, height, value); + } + private drawQueueItem({ image, item, x, y, width, height, selected }: MenuDrawArgs): void { const font = getDefaultSmallFont(); const label = `${item.active ? "> " : " "}${item.title || "(untitled)"}`; @@ -197,8 +235,12 @@ class MusicAppLayer implements Layer { return; } if (!media.available) { - if (event.type === "click") { - this.openBrowse(ctx); + this.libraryMenu.setItems(mediaBrowserBridge.listBrowsableApps()); + if (event.type === "scroll-up" || event.type === "scroll-down") { + await this.libraryMenu.handleInput(event); + } else if (event.type === "click") { + const app = this.libraryMenu.selectedItem; + if (app) this.pushLibraryBrowser(ctx, app); } return; } @@ -252,23 +294,15 @@ class MusicAppLayer implements Layer { /** * Open the media-library browser (the Android Auto MediaBrowserService - * path): with one browsable player installed go straight to its library, - * otherwise offer a picker first. + * path) from the now-playing page: with one browsable player installed go + * straight to its library, otherwise offer a picker first. (With no session + * the picker is the front page itself.) */ private openBrowse(ctx: LayerContext): void { const apps = mediaBrowserBridge.listBrowsableApps(true); if (!apps.length) return; - const pushBrowser = (target: LayerContext, app: MediaBrowserApp) => { - target.stack.push( - new MediaBrowseLayer({ - app, - onPlayed: (browseCtx) => browseCtx.stack.pop(), - onLeave: (browseCtx) => browseCtx.stack.pop(), - }), - ); - }; if (apps.length === 1) { - pushBrowser(ctx, apps[0]!); + this.pushLibraryBrowser(ctx, apps[0]!); return; } ctx.stack.push( @@ -278,13 +312,23 @@ class MusicAppLayer implements Layer { label: app.appName, onSelect: (menuCtx: LayerContext) => { menuCtx.stack.pop(); - pushBrowser(menuCtx, app); + this.pushLibraryBrowser(menuCtx, app); }, })), ), ); } + private pushLibraryBrowser(ctx: LayerContext, app: MediaBrowserApp): void { + ctx.stack.push( + new MediaBrowseLayer({ + app, + onPlayed: (browseCtx) => browseCtx.stack.pop(), + onLeave: (browseCtx) => browseCtx.stack.pop(), + }), + ); + } + private buildActions(media: MediaControllerState, queue: MediaQueueItem[]): MusicAction[] { const volume = mediaControllerBridge.getMediaVolumePercent(); return [ @@ -316,8 +360,9 @@ class MusicAppLayer implements Layer { const font = getDefaultSmallFont(); const elapsed = formatMediaTime(media.positionMs); const duration = formatMediaTime(media.durationMs); - image.drawText(font, META_X, PROGRESS_TIME_Y, elapsed, 140); - image.drawText(font, META_X + width - font.measureText(duration), PROGRESS_TIME_Y, duration, 140); + const timeY = progressTimeY(font); + image.drawText(font, META_X, timeY, elapsed, 140); + image.drawText(font, META_X + width - font.measureText(duration), timeY, duration, 140); const barY = PROGRESS_BAR_Y; image.drawRect(META_X, barY, width, 5, 55); @@ -481,6 +526,15 @@ export function createMusicAppWindow(options: InProcessAppOptions): InProcessWin return app; } +/** + * Line top of the elapsed/duration labels: their baseline sits a fixed gap + * above the progress bar, so the labels hug the bar whatever the font's + * height (a taller face grows upward into the metadata's line budget). + */ +function progressTimeY(font: UiFont): number { + return PROGRESS_BAR_Y - PROGRESS_TIME_GAP - font.ascent; +} + function formatMediaTime(milliseconds: number): string { const totalSeconds = Math.max(0, Math.floor(milliseconds / 1_000)); const seconds = totalSeconds % 60; diff --git a/app/apps/terminal/terminal-app.worker.ts b/app/apps/terminal/terminal-app.worker.ts index f1b05247..8ecf0a2c 100644 --- a/app/apps/terminal/terminal-app.worker.ts +++ b/app/apps/terminal/terminal-app.worker.ts @@ -1,9 +1,10 @@ /** * Terminal app, hosted in its own worker thread. Window model: * - "terminal:hub": the window opened from the launcher; shows the list of - * live g2mirror sessions across every connected host (grouped by host when - * more than one is connected; selecting a host's heading launches a shell - * there), and hosts the Manage Connections section + * live g2mirror sessions grouped under a heading per configured host + * (unconnected hosts show their state and a Connect row; selecting a + * connected host's heading launches a shell there), and hosts the Manage + * Connections section * where g2mirror:// connections are added, removed, and toggled. * - "terminal:view:N": opened by selecting a session in the hub; each has * its own websocket connection (the protocol allows one attached session @@ -1042,12 +1043,15 @@ function windowMenu(window: TerminalWindow): WindowMenu { return window.menu; } +/** Whether a control's handshake has been accepted (it can list and launch sessions). */ +function isControlConnected(control: ControlConnection): boolean { + const phase = control.state?.phase; + return phase === "connected" || phase === "attached"; +} + /** Controls currently connected (handshake accepted), in stored order. */ function connectedControls(): ControlConnection[] { - return [...controls.values()].filter((control) => { - const phase = control.state?.phase; - return phase === "connected" || phase === "attached"; - }); + return [...controls.values()].filter(isControlConnected); } function windowMenuItems(window: TerminalWindow): MenuItem[] { @@ -1220,7 +1224,7 @@ type HubItem = { */ heading?: boolean; /** - * Top-level action (Manage Connections, Settings, Connect ): drawn + * Top-level action (Manage Connections, Settings): drawn * unindented like a heading but at full brightness, rather than as an * indented session row. */ @@ -1338,17 +1342,31 @@ function hubSessionItems(window: HubWindow): HubItem[] { onSelect: () => windowMenu(window).open(settingsMenuItems(), "Terminal settings"), }, ]; - const connected = connectedControls(); - const multiHost = connected.length > 1; + const multiHost = controls.size > 1; const canLaunch = launchPresetNames().length > 0; - for (const control of connected) { - if (multiHost) { - items.push({ - label: connectionDisplayName(control.config), - heading: true, - onSelect: canLaunch ? () => launchOnHost(window, control) : undefined, - }); + // Every configured host is listed under its own heading, in stored order, + // whatever its connection state: a connected host lists its sessions, any + // other shows its state on the heading plus a Connect row (unless it is + // already connecting). Full management (remove, add) lives in Manage + // Connections. + for (const control of controls.values()) { + const name = connectionDisplayName(control.config); + if (!isControlConnected(control)) { + items.push({ label: `${name} (${controlStatusWord(control)})`, heading: true }); + const connecting = control.config.enabled && control.state?.phase === "connecting"; + if (!connecting && clientOptionsFor(control.config)) { + items.push({ + label: control.reconnectTimer ? "Connect now" : "Connect", + onSelect: () => connectControl(control), + }); + } + continue; } + items.push({ + label: name, + heading: true, + onSelect: canLaunch ? () => launchOnHost(window, control) : undefined, + }); const sessions = orderedSessions(window, control); for (const session of sessions) { items.push({ @@ -1372,17 +1390,6 @@ function hubSessionItems(window: HubWindow): HubItem[] { }); } } - // Disconnected/failed connections get a one-click Connect shortcut here; - // full management (remove, add) lives in Manage Connections. - for (const control of controls.values()) { - if (connected.includes(control)) continue; - if (control.config.enabled && control.state?.phase === "connecting") continue; - items.push({ - label: `Connect ${connectionDisplayName(control.config)}`, - topLevel: true, - onSelect: () => connectControl(control), - }); - } return items; } diff --git a/app/g2/dashboard-controller.ts b/app/g2/dashboard-controller.ts index 1c504cb0..b2f7ffc1 100644 --- a/app/g2/dashboard-controller.ts +++ b/app/g2/dashboard-controller.ts @@ -71,7 +71,7 @@ import { loadPersistedOpenApps, savePersistedOpenApps } from "../ui/shell/open-a import { appViewportRect, isOnSwitcherEdge, sidebarStripVisible, type WindowHeightMode } from "../ui/shell/geometry"; import { type LayerActions, type TextSettingsEditToggle } from "../ui/layers"; import { type KeyboardInputSession } from "../ui/shell/keyboard-input"; -import { appSwitcherPositionSetting, statusBarPositionSetting, assistantAllowProactiveSetting, assistantBackendSetting, assistantBridgeHostSetting, assistantBridgePortSetting, assistantBridgeTokenSetting, getBrightnessPreferences, displayModeSetting, navigateDisplayModeSetting, navigateVerticalPositionSetting, terminalDisplayModeSetting, terminalVerticalPositionSetting, elevenLabsApiKeySetting, getStringSettingById, openAiApiKeySetting, nightscoutApiTokenSetting, firmwareDebugFlagsSetting, lockScreenEnabledSetting, nightscoutSiteUrlSetting, onAnySettingChanged, previewColorSetting, ringConnectionModeSetting, saveVoiceRecordingsSetting, sonioxApiKeySetting, screenTimeoutSetting, screenTimeoutSettingToMs, suspendEvenHubWhenScreenOffSetting, verticalPositionSetting, voiceProviderSetting, wakeWordActionSetting, type ConfigSettingString } from "../ui/dashboard-settings"; +import { appSwitcherPositionSetting, statusBarPositionSetting, statusBarVisibilitySetting, windowBorderSetting, assistantAllowProactiveSetting, assistantBackendSetting, assistantBridgeHostSetting, assistantBridgePortSetting, assistantBridgeTokenSetting, getBrightnessPreferences, displayModeSetting, navigateDisplayModeSetting, navigateVerticalPositionSetting, terminalDisplayModeSetting, terminalVerticalPositionSetting, elevenLabsApiKeySetting, getStringSettingById, openAiApiKeySetting, nightscoutApiTokenSetting, firmwareDebugFlagsSetting, lockScreenEnabledSetting, nightscoutSiteUrlSetting, onAnySettingChanged, previewColorSetting, ringConnectionModeSetting, saveVoiceRecordingsSetting, sonioxApiKeySetting, screenTimeoutSetting, screenTimeoutSettingToMs, suspendEvenHubWhenScreenOffSetting, verticalPositionSetting, voiceProviderSetting, wakeWordActionSetting, type ConfigSettingString } from "../ui/dashboard-settings"; import { isIgnoringBatteryOptimizations, requestIgnoreBatteryOptimizations } from "../native/battery-optimization"; import { getInstalledEvenHubAppById, @@ -183,18 +183,23 @@ const LAUNCHABLE_APPS = ALL_APPS.filter((app) => app.showInLauncher !== false); /** * The global settings window viewport sizes depend on: the display mode, - * whether the app switcher takes width beside windows or height below them, - * and, below them, whether the status bar joins it (dropping the top bar). + * whether the app switcher takes width beside windows, height below them + * or neither (a popup), and the chrome rows each window loses to it: below + * them, whether the status bar joins the row (dropping the top bar); with a + * popup, whether the status bar keeps rows of its own and the window frame + * (where the status bar goes only moves windows). */ function viewportSizesKey(): string { - const switcher = appSwitcherPositionSetting.get() !== "bottom" ? "strip" - : statusBarPositionSetting.get() === "switcher" ? "row+status" : "row"; + const position = appSwitcherPositionSetting.get(); + const switcher = position === "bottom" ? `row|${statusBarPositionSetting.get()}` + : position === "popup" ? `popup|${statusBarVisibilitySetting.get()}|${windowBorderSetting.get()}` + : "strip"; return `${displayModeSetting.get()}|${switcher}`; } /** The global settings that move window surfaces without resizing them. */ function windowPlacementKey(): string { - return `${verticalPositionSetting.get()}|${appSwitcherPositionSetting.get()}`; + return `${verticalPositionSetting.get()}|${appSwitcherPositionSetting.get()}|${statusBarPositionSetting.get()}`; } function createInitialDisplayPreview(): ImageSource | null { @@ -525,17 +530,18 @@ class DashboardController { } // Vertical-position changes (and moving the app switcher between the left - // and right edges) move every window surface and the chrome that aligns - // with them; the values are tracked so unrelated setting changes don't - // trigger a full reposition. + // and right edges, or a popup switcher's status bar between the top and + // bottom) move every window surface and the chrome that aligns with them; + // the values are tracked so unrelated setting changes don't trigger a full + // reposition. private lastWindowPlacement = windowPlacementKey(); private lastViewportSizes = viewportSizesKey(); /** * Display mode changed (Settings > Display, or the phone page's picker), - * or the app switcher moved to or from the bottom edge: every window's - * viewport size changes. In-process windows re-measure in place; workers + * or the app switcher or its chrome changed what windows lose to them + * (see viewportSizesKey): every window's viewport size changes. In-process windows re-measure in place; workers * that support resizing receive the new viewport. Other worker windows are * closed and launched again at the new size. */ diff --git a/app/ui/dashboard-settings.ts b/app/ui/dashboard-settings.ts index 07bc03a1..8d6e3f46 100644 --- a/app/ui/dashboard-settings.ts +++ b/app/ui/dashboard-settings.ts @@ -347,13 +347,18 @@ export const displayModeSetting = new ConfigSettingEnum({ "Band: the stock 288px-tall window beside the app switcher. Tall: the app switcher plus full-height windows. Full panel: the whole 640×480 display; the app switcher overlays the app only while you are in it. Open apps reopen in the new size.", }); -/** Which edge of the display the app switcher (the strip of open-window icons) sits on. */ -export type AppSwitcherPosition = "left" | "right" | "bottom"; +/** + * Where the app switcher (the open-window icons) sits: a strip along the + * left or right edge of the display, a row under the window, or a popup box + * over the middle of the window that shows only while it has focus. + */ +export type AppSwitcherPosition = "left" | "right" | "bottom" | "popup"; const APP_SWITCHER_POSITION_LABELS: Record = { left: "Left", right: "Right", bottom: "Bottom", + popup: "Popup", }; export const appSwitcherPositionSetting = new ConfigSettingEnum({ @@ -361,10 +366,10 @@ export const appSwitcherPositionSetting = new ConfigSettingEnum APP_SWITCHER_POSITION_LABELS[value] ?? value, description: - "Which edge of the display the strip of open-app icons sits on. Left and right take a column beside windows; bottom puts a row beneath the window, which leaves room at the sides to set the display's depth, and makes full-height windows a little shorter. Moving it to or from the bottom reopens open apps in the new size.", + "Where the open-app icons go. Left and right take a column beside windows; bottom puts a row beneath the window, which makes full-height windows a little shorter; popup shows them only while you're in the app switcher, in a box over the dimmed window. Bottom and popup leave room at the sides to set the display's depth. Open apps reopen at their new size when a change resizes windows.", }); const UI_DEPTH_VALUES = ["-62", "-48", "-32", "-16", "0", "16", "32", "48", "62"] as const; @@ -373,11 +378,11 @@ export type UiDepth = (typeof UI_DEPTH_VALUES)[number]; /** * Stereo depth of the whole display, in the firmware's depth units: the * lenses shift everything by half this many pixels each, in opposite - * directions. Only applies with the app switcher at the bottom, where the - * windows' 576px width leaves 32px at each side: one for the side of the - * window's frame and 31 to shift into, hence ±62 (see geometry.ts uiDepth - * and windowFramed); values stay even so the per-lens halves of nested - * depths add exactly. + * directions. Only applies with the app switcher at the bottom or a popup, + * where the windows' 576px width leaves 32px at each side: one for the side + * of the window's frame and 31 to shift into, hence ±62 (see geometry.ts + * uiDepth and windowFramed); values stay even so the per-lens halves of + * nested depths add exactly. */ export const uiDepthSetting = new ConfigSettingEnum({ id: "ui-depth", @@ -390,26 +395,62 @@ export const uiDepthSetting = new ConfigSettingEnum({ return depth === 0 ? "0" : depth > 0 ? `+${depth} (nearer)` : `${depth} (farther)`; }, description: - "Moves the whole display nearer (positive) or farther away (negative) by shifting it in opposite directions on the two lenses. Available with the app switcher at the bottom. Full-panel windows lose a sliver at the edges.", + "Moves the whole display nearer (positive) or farther away (negative) by shifting it in opposite directions on the two lenses. Available with the app switcher at the bottom or as a popup. Full-panel windows lose a sliver at the edges.", }); /** * Where the status bar (clock, notification icons, app widgets, batteries) - * goes: the top bar over each window, or the right end of a bottom app - * switcher's row (geometry.ts statusInSwitcherRow), where windows grow into - * the top bar's height. + * goes: the top bar over each window, or its bottom. With a bottom app + * switcher, the bottom is the right end of the switcher's row (geometry.ts + * statusInSwitcherRow), where windows grow into the top bar's height; with a + * popup switcher, a bar under the window (geometry.ts statusBarEdge). */ -export type StatusBarPosition = "top" | "switcher"; +export type StatusBarPosition = "top" | "bottom"; export const statusBarPositionSetting = new ConfigSettingEnum({ id: "status-bar-position", - label: "Status bar", + label: "Status bar position", storageKey: "display.statusBarPosition", defaultValue: "top", - values: ["top", "switcher"], - formatValue: (value) => value === "switcher" ? "With app switcher" : "Top", + values: ["top", "bottom"], + // "switcher" was the bottom value's name while only a bottom row had one. + normalize: (value) => value === "bottom" || value === "switcher" ? "bottom" : "top", + formatValue: (value) => value === "top" ? "Top" + : appSwitcherPositionSetting.get() === "bottom" ? "With app switcher" : "Bottom", description: - "Where the clock, notification icons, app widgets and battery indicators go. With app switcher puts them at the right end of the app switcher's row, and windows grow into the top bar's space. Available with the app switcher at the bottom; the full-panel display mode keeps the top bar. Changing it reopens open apps in the new size.", + "Where the clock, notification icons, app widgets and battery indicators go. With the app switcher at the bottom, With app switcher puts them at the right end of its row, and windows grow into the top bar's space; with a popup app switcher, Bottom puts them under the window. Available with the app switcher at the bottom or as a popup; with a bottom app switcher, the full-panel display mode keeps the top bar. Changing it reopens open apps in the new size.", +}); + +/** + * Whether the status bar always takes its rows along the window's edge, or + * shows only while the popup app switcher is up, over the window's edge + * (geometry.ts statusBarOverlays); the windows then grow into its rows. + */ +export type StatusBarVisibility = "always" | "switcher"; + +export const statusBarVisibilitySetting = new ConfigSettingEnum({ + id: "status-bar-visibility", + label: "Status bar visibility", + storageKey: "display.statusBarVisibility", + defaultValue: "always", + values: ["always", "switcher"], + formatValue: (value) => value === "switcher" ? "In app switcher" : "Always", + description: + "Always keeps the clock, notification icons, app widgets and battery indicators beside the window. In app switcher shows them only while the app switcher is open, over the edge of the window, and windows grow into their space. Available with a popup app switcher. Changing it reopens open apps in the new size.", +}); + +/** + * Whether the foreground window gets a rounded border with a popup app + * switcher (geometry.ts windowFramed); without one, a line divides the + * window from the status bar. + */ +export const windowBorderSetting = new ConfigSettingBoolean({ + id: "window-border", + label: "Window border", + storageKey: "display.windowBorder", + defaultValue: true, + description: + "Draw a rounded border around the window. Without it, a line separates the window from the status bar. Available with a popup app switcher. Changing it reopens open apps in the new size.", }); export const brightnessSetting = new ConfigSettingEnum({ @@ -1002,7 +1043,7 @@ export const nightscoutMaxLoopAgeSetting = nightscoutThresholdSetting( ); export const nightscoutAlwaysShowInTopBarSetting = new ConfigSettingBoolean({ id: "nightscout-always-show-in-top-bar", - label: "Always show in top bar", + label: "Always show in status bar", storageKey: "integrations.nightscout.alwaysShowInTopBar", defaultValue: false, description: "Keep the Nightscout glucose graph and warnings in the top bar even when all Nightscout windows are closed.", diff --git a/app/ui/dashboard/settings-menus.ts b/app/ui/dashboard/settings-menus.ts index bd62d6ba..f261bd58 100644 --- a/app/ui/dashboard/settings-menus.ts +++ b/app/ui/dashboard/settings-menus.ts @@ -30,6 +30,8 @@ import { anthropicApiKeySetting, appSwitcherPositionSetting, statusBarPositionSetting, + statusBarVisibilitySetting, + windowBorderSetting, uiDepthSetting, assistantAllowProactiveSetting, assistantBackendSetting, @@ -239,14 +241,19 @@ function settingsSections(): SettingsSection[] { * stable list between paints. */ function customizationRows(): () => MenuItem[] { - // Left / right / bottom edge; the dashboard controller moves (or, to and - // from the bottom, resizes) windows on change. + // Left / right / bottom edge, or popup; the dashboard controller moves or + // resizes windows on change. const position = enumSettingMenuItem(appSwitcherPositionSetting); // The whole display's stereo depth; the shell sends it with its scene. const depth = enumSettingMenuItem(uiDepthSetting); - // Top bar, or the right end of the switcher row; the dashboard controller - // resizes windows on change. + // Top bar, or the bottom: the right end of a bottom switcher's row, or a + // bar under the window with a popup switcher; the dashboard controller + // resizes or moves windows on change. const statusBar = enumSettingMenuItem(statusBarPositionSetting); + // Popup switcher only: whether the status bar shows only in the switcher + // (windows then grow into its rows), and the foreground window's border. + const statusBarVisibility = enumSettingMenuItem(statusBarVisibilitySetting); + const windowBorder = toggleSettingMenuItem(windowBorderSetting); const rest = [ // Submenu: top-bar battery indicator style plus per-device visibility. batteryIndicatorsMenuItem(), @@ -257,8 +264,19 @@ function customizationRows(): () => MenuItem[] { // Opens the modal font picker (face, weight, size) for UI text. uiFontPickerMenuItem(), ]; - const withDepth = [position, depth, statusBar, ...rest], withoutDepth = [position, ...rest]; - return () => appSwitcherPositionSetting.get() === "bottom" ? withDepth : withoutDepth; + const bottomRows = [position, depth, statusBar, ...rest]; + const popupRows = [position, depth, statusBar, statusBarVisibility, windowBorder, ...rest]; + const sideRows = [position, ...rest]; + return () => { + switch (appSwitcherPositionSetting.get()) { + case "bottom": + return bottomRows; + case "popup": + return popupRows; + default: + return sideRows; + } + }; } function autoBrightnessMenuItem(): MenuItem { diff --git a/app/ui/shell/chrome-layer.ts b/app/ui/shell/chrome-layer.ts index 59252c34..4a4b1155 100644 --- a/app/ui/shell/chrome-layer.ts +++ b/app/ui/shell/chrome-layer.ts @@ -32,11 +32,15 @@ import { SHELL_OPAQUE_BLACK, SIDEBAR_WIDTH, sidebarStripVisible, + statusBarEdge, + statusBarOverlays, + statusBarTop, statusInSwitcherRow, SWITCHER_ROW_HEIGHT, switcherPosition, switcherRect, TOP_BAR_HEIGHT, + windowFooterHeight, windowFramed, windowHeaderHeight, windowTop, @@ -80,6 +84,30 @@ const ROW_STATUS_GAP = 8; // all of them, when there are fewer); the windows take whatever is left. const ROW_MIN_WINDOW_SLOTS = 3; +// The popup switcher (geometry.ts "popup"): a box centred over the +// foreground window's content, holding a row of window icons above the +// selected window's title. Each icon sits in a square cell, which the +// selection fills white (the popup only shows while it has focus). +const POPUP_ICON_SIZE = ROW_ICON_SIZE; +const POPUP_CELL = POPUP_ICON_SIZE + 12; +const POPUP_STEP = POPUP_CELL + 4; +const POPUP_PADDING = 12; +// Room at each end of the icons for a scroll chevron, once they scroll. +const POPUP_CHEVRON_ROOM = 12; +const POPUP_TITLE_GAP = 6; +// The box keeps this far from the window's sides, and is at least this +// wide, leaving a few windows' titles room. +const POPUP_MARGIN = 16; +const POPUP_MIN_WIDTH = 272; +// The system menu's border. +const POPUP_BORDER_VALUE = 72; +// Nearer than the window, as the system menu is. +const POPUP_DEPTH = 4; +// Brightness of everything under the chrome (the windows) while the popup +// shows: lighter than a context menu's dim, since the dimmed window is the +// selected one, which the wearer may be looking for. +const POPUP_DIM = 0.5; + /** Icon rows that fit in one sidebar column. */ function rowsPerColumn(variant: SidebarVariant): number { return Math.max(1, ((LIST_HEIGHT + ICON_SPACING) / (variant.iconSize + ICON_SPACING)) | 0); @@ -173,6 +201,40 @@ function switcherLayout(windowCount: number, heightMode: WindowHeightMode, appId }; } +/** + * Popup switcher geometry for the foreground window: its box, centred over + * the window's content (geometry.ts switcherRect), as wide as the icons + * need up to the window's width less margins (at least POPUP_MIN_WIDTH), + * the cells of the visible icons by slot (as switcherLayout's), and the + * title's top. Past what fits, the icons scroll, with room for a chevron at + * either end. + */ +function popupLayout(windowCount: number, state: ShellChromeState): SwitcherLayout & { box: Rect; titleTop: number } { + const area = switcherRect(state.foregroundHeightMode, state.foregroundAppId); + const room = area.width - 2 * (POPUP_MARGIN + POPUP_PADDING); + const fits = (width: number) => Math.max(1, ((width + POPUP_STEP - POPUP_CELL) / POPUP_STEP) | 0); + const scrolls = windowCount > fits(room); + const visibleCount = scrolls ? fits(room - 2 * POPUP_CHEVRON_ROOM) : Math.max(1, windowCount); + const iconsWidth = visibleCount * POPUP_STEP - (POPUP_STEP - POPUP_CELL); + const width = 2 * POPUP_PADDING + Math.max(iconsWidth + (scrolls ? 2 * POPUP_CHEVRON_ROOM : 0), POPUP_MIN_WIDTH - 2 * POPUP_PADDING); + const height = 2 * POPUP_PADDING + POPUP_CELL + POPUP_TITLE_GAP + getDefaultMediumFont().lineHeight; + const box = { + x: area.x + ((area.width - width) >> 1), + y: area.y + Math.max(0, (area.height - height) >> 1), + width, + height, + }; + const iconsLeft = box.x + ((width - iconsWidth) >> 1), cellTop = box.y + POPUP_PADDING; + return { + position: "popup", + iconSize: POPUP_ICON_SIZE, + visibleCount, + cell: (slot) => ({ x: iconsLeft + slot * POPUP_STEP, y: cellTop, width: POPUP_CELL, height: POPUP_CELL, atSeparator: false }), + box, + titleTop: cellTop + POPUP_CELL + POPUP_TITLE_GAP, + }; +} + /** * Horizontal extent of the sidebar region that actually holds icons: the * one-column variant leaves a dead strip on the outer side of its single @@ -200,6 +262,36 @@ function topBarSpan(state: ShellChromeState): { left: number; right: number } { } return { left, right }; } + +/** + * Where the status bar is drawn for the foreground window: TOP_BAR_HEIGHT + * rows from `top`, across `left`..`right`. `contentTop` is where the top + * bar's layout starts in them: a row lower at the window's bottom, where + * the bar's first row is the one next to the window. `divider` is the row + * of the line between bar and window, or null where the window frame's side + * runs along it instead. + */ +type StatusBarPlacement = { left: number; right: number; top: number; contentTop: number; divider: number | null }; + +/** + * The status bar's placement for the foreground window, or null when it + * isn't drawn as a bar: when it shares a bottom switcher row, or when it + * overlays the window (geometry.ts statusBarOverlays) and the popup + * switcher isn't up. An overlaying bar sits inside a window frame, whose + * side runs along its outer row, so it keeps its divider. + */ +function statusBarPlacement(state: ShellChromeState): StatusBarPlacement | null { + const appId = state.foregroundAppId; + if (statusInSwitcherRow(appId)) return null; + const overlays = statusBarOverlays(); + if (overlays && !sidebarStripVisible(state.focus, appId)) return null; + const { left, right } = topBarSpan(state); + const top = statusBarTop(state.foregroundHeightMode, appId); + const atBottom = statusBarEdge() === "bottom"; + const divider = windowFramed(appId) && !overlays ? null : atBottom ? top : top + TOP_BAR_HEIGHT - 1; + return { left, right, top, contentTop: atBottom ? top + 1 : top, divider }; +} + const NOTIFICATION_ICON_SIZE = 24; const BORDER_VALUE = 40; @@ -309,6 +401,8 @@ export function makeImageWindowIcon( export class ShellChromeLayer implements Layer { // First switcher icon shown; adjusted each paint to keep the selection visible. private scrollRow = 0; + // The popup switcher's shell surface. + private popupKey: number | undefined; // Where the last paint ended a bottom row's window icons, for hit testing. private rowWindowsRight: number | undefined; // Whether the last paint's selection tab carries the window frame's left @@ -321,15 +415,20 @@ export class ShellChromeLayer implements Layer { const image = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); const state = this.getState(); const statusInRow = statusInSwitcherRow(state.foregroundAppId); + const popup = switcherPosition() === "popup"; // Full-panel mode: the strip is an overlay, present only while the user - // is in it (the window underneath keeps its full width the rest of the time). - if (sidebarStripVisible(state.focus, state.foregroundAppId)) { + // is in it (the window underneath keeps its full width the rest of the + // time); a popup only ever shows then. + const switcherShown = sidebarStripVisible(state.focus, state.foregroundAppId); + if (switcherShown && !popup) { this.drawSidebar(image, state, statusInRow ? image : undefined); } - if (!statusInRow) this.drawTopBar(image, state); + const bar = statusBarPlacement(state); + if (bar) this.drawTopBar(image, state, bar); const frame = windowFrameRect(state); - if (frame) drawWindowFrame(image, frame, this.frameCornerSquare); + if (frame) drawWindowFrame(image, frame, this.frameCornerSquare, popup); drawAmbientCards(image, topBarSpan(state).right); + if (switcherShown && popup) this.drawPopup(image, state); return image; } @@ -337,12 +436,18 @@ export class ShellChromeLayer implements Layer { const state = this.getState(), parts: Plane[] = []; const statusInRow = statusInSwitcherRow(state.foregroundAppId); const canvas = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); - const bar = topBarSpan(state); - if (!statusInRow) { - this.drawTopBar(canvas, state); - parts.push({ ...shellCrop(canvas, bar.left, windowTop(state.foregroundHeightMode, state.foregroundAppId), bar.right - bar.left, TOP_BAR_HEIGHT, 2), depth: -2 }); + const span = topBarSpan(state); + const bar = statusBarPlacement(state); + if (bar) { + this.drawTopBar(canvas, state, bar); + parts.push({ ...shellCrop(canvas, bar.left, bar.top, bar.right - bar.left, TOP_BAR_HEIGHT, 2), depth: -2 }); } - if (sidebarStripVisible(state.focus, state.foregroundAppId)) { + const switcherShown = sidebarStripVisible(state.focus, state.foregroundAppId); + if (switcherPosition() === "popup") { + this.paintPopupParts(state, parts, canvas, switcherShown); + return parts; + } + if (switcherShown) { const stripCanvas = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); const statusLeft = this.drawSidebar(stripCanvas, state, statusInRow ? canvas : undefined); // The window frame rides on the switcher row, whose top edge is its @@ -355,8 +460,8 @@ export class ShellChromeLayer implements Layer { // Under a framed window the row's surface spans the frame, whose left // side the first selection tab continues. const strip = switcherRect(state.foregroundHeightMode, state.foregroundAppId); - const span = frame ?? strip; - parts.push(shellCrop(stripCanvas, span.x, strip.y, span.width, strip.height, 1)); + const rowSpan = frame ?? strip; + parts.push(shellCrop(stripCanvas, rowSpan.x, strip.y, rowSpan.width, strip.height, 1)); if (statusLeft !== null) { // The status bar keeps the top bar's surface and its depth, -2, over // the row's right end below its separator line, so the clock ticking @@ -365,10 +470,37 @@ export class ShellChromeLayer implements Layer { parts.push({ ...shellCrop(canvas, statusLeft, strip.y + 1, right - statusLeft, strip.height - 1, 2), depth: -2 }); } } - drawAmbientCards(canvas, bar.right, parts); + drawAmbientCards(canvas, span.right, parts); return parts; } + /** + * The popup switcher mode's parts after the status bar's: the window + * frame, ambient cards, then, while the switcher has focus, the popup. Its + * dim rides on the first part, so it dims the windows beneath the chrome + * and none of the chrome. + */ + private paintPopupParts(state: ShellChromeState, parts: Plane[], canvas: GrayImage, switcherShown: boolean): void { + const frame = windowFrameRect(state); + if (frame) { + // A shell surface is an opaque rectangle and needs a pixel of its own + // to be sent at all, so the frame rides on one at its top-left corner, + // outside its curve, which it paints black anyway. As in the bottom + // row's case, it plays at the screen's own depth. + const frameCanvas = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); + frameCanvas.fillRect(frame.x, frame.y, 1, 1, SHELL_OPAQUE_BLACK); + drawWindowFrame(frameCanvas, frame, false, true); + parts.push(shellCrop(frameCanvas, frame.x, frame.y, 1, 1, 1)); + } + drawAmbientCards(canvas, topBarSpan(state).right, parts); + if (!switcherShown) return; + const popupCanvas = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); + const box = this.drawPopup(popupCanvas, state); + this.popupKey ??= LayerStack.allocateShellKey(); + parts.push({ ...shellCrop(popupCanvas, box.x, box.y, box.width, box.height, this.popupKey), depth: POPUP_DEPTH }); + parts[0] = { ...parts[0]!, dimUnderneath: POPUP_DIM }; + } + handleInput(): void { // Shell input is handled by the shell state machine before it reaches the // layer stack; the chrome itself never consumes events. @@ -382,7 +514,8 @@ export class ShellChromeLayer implements Layer { windowIndexAt(x: number, y: number, windowCount: number): number | null { if (windowCount === 0) return null; const state = this.getState(); - const layout = switcherLayout(windowCount, state.foregroundHeightMode, state.foregroundAppId, this.rowWindowsRight, this.scrollRow); + const layout = switcherPosition() === "popup" ? popupLayout(windowCount, state) + : switcherLayout(windowCount, state.foregroundHeightMode, state.foregroundAppId, this.rowWindowsRight, this.scrollRow); const lastVisible = Math.min(windowCount, this.scrollRow + layout.visibleCount); for (let index = this.scrollRow; index < lastVisible; index++) { const cell = layout.cell(index - this.scrollRow); @@ -525,20 +658,70 @@ export class ShellChromeLayer implements Layer { return iconsLeft; } - private drawTopBar(image: GrayImage, state: ShellChromeState): void { - const font = getDefaultMediumFont(); - // The bar sits at the top edge of the foreground window's band, wherever - // its height mode puts that (screen top for max height). It moves when - // the foreground switches to a window of a different height. - const barTop = windowTop(state.foregroundHeightMode, state.foregroundAppId); - // The bar spans the app viewport; with a side strip overlaid (full-panel - // mode, sidebar focused) it still stops at the strip. - const { left: barLeft, right: barRight } = topBarSpan(state); - image.fillRect(barLeft, barTop, barRight - barLeft, TOP_BAR_HEIGHT, SHELL_OPAQUE_BLACK); - // A framed window's frame draws this line as its top (drawWindowFrame). - if (!windowFramed(state.foregroundAppId)) { - image.drawLine(barLeft, barTop + TOP_BAR_HEIGHT - 1, barRight - 1, barTop + TOP_BAR_HEIGHT - 1, BORDER_VALUE); + /** + * The popup switcher: its box centred over the foreground window's + * content, the visible window icons in a row with the selected one's cell + * filled white (and its icon inverted), chevrons where more scroll, and + * the selected window's title underneath. Returns the box. + */ + private drawPopup(image: GrayImage, state: ShellChromeState): Rect { + const count = state.windows.length; + const layout = popupLayout(count, state); + this.scrollRow = scrollToKeepSelectionVisible(this.scrollRow, state.selectedIndex, layout.visibleCount, count); + const { box } = layout; + image.fillRect(box.x, box.y, box.width, box.height, SHELL_OPAQUE_BLACK); + image.drawRect(box.x, box.y, box.width, box.height, POPUP_BORDER_VALUE); + const lastVisible = Math.min(count, this.scrollRow + layout.visibleCount); + for (let index = this.scrollRow; index < lastVisible; index++) { + const window = state.windows[index]!; + const cell = layout.cell(index - this.scrollRow); + const x = cell.x + ((cell.width - POPUP_ICON_SIZE) >> 1); + const y = cell.y + ((cell.height - POPUP_ICON_SIZE) >> 1); + const selected = index === state.selectedIndex; + if (selected) image.fillRoundedRect(cell.x, cell.y, cell.width, cell.height, 255, TAB_RADIUS); + // As in the sidebar: unselected icons are resources of their own, so + // moving the selection resends only the box. + const icon = selected ? image : new GrayImage(POPUP_ICON_SIZE, POPUP_ICON_SIZE + 1); + const iconX = selected ? x : 0, iconY = selected ? y : 1; + window.drawIcon(icon, iconX, iconY, POPUP_ICON_SIZE, selected); + if (window.attention) { + icon.drawImage(attentionDot(selected ? SHELL_OPAQUE_BLACK : 255), iconX + POPUP_ICON_SIZE - 7, iconY - 1); + } + if (!selected) image.drawDepthImage(icon, x, y - 1, -2); } + // Chevrons sit in the room either side of the icons, pointing off them. + const first = layout.cell(0), chevronY = first.y + (first.height >> 1); + if (this.scrollRow > 0) { + drawChevron(image, first.x - 5, chevronY, "left"); + } + if (lastVisible < count) { + const last = layout.cell(lastVisible - 1 - this.scrollRow); + drawChevron(image, last.x + last.width + 4, chevronY, "right"); + } + const selectedWindow = state.windows[state.selectedIndex]; + if (selectedWindow) { + const font = getDefaultMediumFont(); + const title = truncateText(font, selectedWindow.title, box.width - 2 * POPUP_PADDING); + image.drawText(font, box.x + ((box.width - font.measureText(title)) >> 1), layout.titleTop, title, 210); + } + return box; + } + + private drawTopBar(image: GrayImage, state: ShellChromeState, bar: StatusBarPlacement): void { + const font = getDefaultMediumFont(); + // The bar sits at the top (or, with a popup switcher, maybe the bottom) + // edge of the foreground window's band, wherever its height mode puts + // that (screen top for max height). It moves when the foreground + // switches to a window of a different height. It spans the app viewport; + // with a side strip overlaid (full-panel mode, sidebar focused) it still + // stops at the strip. + const { left: barLeft, right: barRight } = bar; + image.fillRect(barLeft, bar.top, barRight - barLeft, TOP_BAR_HEIGHT, SHELL_OPAQUE_BLACK); + // A framed window's frame draws this line as its side (drawWindowFrame). + if (bar.divider !== null) { + image.drawLine(barLeft, bar.divider, barRight - 1, bar.divider, BORDER_VALUE); + } + const barTop = bar.contentTop; const clock = clockText(); const clockX = barLeft + 10; @@ -726,9 +909,9 @@ const AMBIENT_MAX_LINES_PER_CARD = 3; /** * Paint the active ambient cards bottom-up: the oldest card sits at the very - * bottom of the window band and newer ones stack above it. Cards that would - * cross into the window header are dropped rather than clipped. `right` is the - * top bar's right edge, which the cards align to. + * bottom of the window band (above any footer) and newer ones stack above + * it. Cards that would cross into the window header are dropped rather than + * clipped. `right` is the top bar's right edge, which the cards align to. */ const ambientKeys = new Map(); function drawAmbientCards(image: GrayImage, right: number, parts?: Plane[]): void { @@ -736,7 +919,7 @@ function drawAmbientCards(image: GrayImage, right: number, parts?: Plane[]): voi if (!cards.length) return; const font = getDefaultSmallFont(); const bandTop = minWindowTop(); - const bandBottom = bandTop + MIN_WINDOW_HEIGHT; + const bandBottom = bandTop + MIN_WINDOW_HEIGHT - windowFooterHeight(); // Right-aligned with the top bar: clear of a right-hand sidebar. const x = right - AMBIENT_CARD_WIDTH - AMBIENT_CARD_MARGIN; const textWidth = AMBIENT_CARD_WIDTH - 2 * AMBIENT_CARD_PADDING_X; @@ -799,13 +982,15 @@ type Rect = { x: number; y: number; width: number; height: number }; const FRAME_RADIUS = 8; /** - * The rounded frame around the foreground window's content (below its - * header), when it has one (geometry.ts windowFramed): one pixel all round. - * Its sides run down the pixel just outside each side of the window, and - * its top is the header's last row: the top bar's, in place of the bar's - * divider, or the whole one-row header with the status bar in the switcher - * row. Its bottom is the switcher row's top edge, where drawSeparator draws - * it so the selection tab can divert it. + * The rounded frame around the foreground window's content (between its + * header and footer), when it has one (geometry.ts windowFramed): one pixel + * all round. Its sides run down the pixel just outside each side of the + * window, and its top is the header's last row: the top bar's, in place of + * the bar's divider, or the whole one-row header with the status bar + * elsewhere. Its bottom is a bottom switcher row's top edge, where + * drawSeparator draws it so the selection tab can divert it; with a popup + * switcher, the footer's first row, likewise a bottom status bar's or the + * whole one-row footer. */ function windowFrameRect(state: ShellChromeState): Rect | null { if (!windowFramed(state.foregroundAppId)) return null; @@ -817,19 +1002,21 @@ function windowFrameRect(state: ShellChromeState): Rect | null { * Draw the window frame (see windowFrameRect) as a retained firmware rounded * rect over whatever lies beneath it: no fill, so the window's content shows * through, and black outside the curve, cutting the content's square - * corners to it. It is clipped short of its bottom row, which drawSeparator - * draws with the selection tab's gap. With `squareBottomLeft` (a selection - * tab continuing its left side down), the rect is clipped away from that - * corner's box too, and the side runs straight through it as a one-pixel - * clipped clear, leaving the content's corner whole. + * corners to it. Over a bottom switcher row it is clipped short of its + * bottom row, which drawSeparator draws with the selection tab's gap; with + * `withBottom` (a popup switcher's frame) it is drawn whole. With + * `squareBottomLeft` (a selection tab continuing its left side down), the + * rect is clipped away from that corner's box too, and the side runs + * straight through it as a one-pixel clipped clear, leaving the content's + * corner whole. */ -function drawWindowFrame(image: GrayImage, frame: Rect, squareBottomLeft: boolean): void { +function drawWindowFrame(image: GrayImage, frame: Rect, squareBottomLeft: boolean, withBottom = false): void { const border = grayToNibble(BORDER_VALUE), above = frame.height - 1; - const rounded = (clip: ListClip): ListCall => ({ + const rounded = (clip?: ListClip): ListCall => ({ op: DrawOp.ROUNDED_RECT, x: 0, y: 0, width: frame.width, height: frame.height, radius: FRAME_RADIUS, - background: 0, border, outside: 0, clip, + background: 0, border, outside: 0, ...(clip ? { clip } : {}), }); - const calls = squareBottomLeft ? [ + const calls = withBottom ? [rounded()] : squareBottomLeft ? [ rounded({ x: FRAME_RADIUS, y: 0, width: frame.width - FRAME_RADIUS, height: above }), rounded({ x: 0, y: 0, width: FRAME_RADIUS, height: above - FRAME_RADIUS }), { op: DrawOp.CLEAR, color: border, clip: { x: 0, y: above - FRAME_RADIUS, width: 1, height: FRAME_RADIUS } }, diff --git a/app/ui/shell/geometry.ts b/app/ui/shell/geometry.ts index 03124c1a..01302c35 100644 --- a/app/ui/shell/geometry.ts +++ b/app/ui/shell/geometry.ts @@ -10,7 +10,9 @@ import { terminalDisplayModeSetting, terminalVerticalPositionSetting, statusBarPositionSetting, + statusBarVisibilitySetting, uiDepthSetting, + windowBorderSetting, } from "../dashboard-settings"; /** Top bar: 24px notification icons plus a little padding. */ @@ -18,10 +20,10 @@ export const TOP_BAR_HEIGHT = 28; /** * Width of the sidebar strip as painted (the app switcher on the left or * right edge). App windows get the other 576px — the surface width EvenHub - * apps expect — and keep that width with the switcher at the bottom too, - * except in the full-panel display mode, where the switcher overlays the - * app (see sidebarWidth). Icon column layout within the strip (one wide - * column vs. two narrow ones) is the chrome layer's business. + * apps expect — and keep that width with the switcher at the bottom or a + * popup too, except in the full-panel display mode, where the switcher + * overlays the app (see sidebarWidth). Icon column layout within the strip + * (one wide column vs. two narrow ones) is the chrome layer's business. */ export const SIDEBAR_WIDTH = 64; @@ -36,11 +38,17 @@ export const SIDEBAR_WIDTH = 64; */ export const SWITCHER_ROW_HEIGHT = 36; -/** Which edge the app switcher is on (Settings > Customization). */ +/** Which edge the app switcher is on, or a popup (Settings > Customization). */ export function switcherPosition(): AppSwitcherPosition { return appSwitcherPositionSetting.get(); } +/** Whether the app switcher is a strip down the left or right edge. */ +function sideStrip(): boolean { + const position = switcherPosition(); + return position === "left" || position === "right"; +} + /** The Display > Display mode setting (see dashboard-settings.ts). */ function appDisplayMode(appId?: string) { return appId === "navigate" ? navigateDisplayModeSetting.get() @@ -59,12 +67,12 @@ function fullPanel(appId?: string): boolean { /** * How much of the screen's width the sidebar takes away from app windows: - * the strip, or nothing when the switcher is a bottom row or in the - * full-panel mode (where the chrome paints the strip over the window while - * the sidebar has focus). + * the strip, or nothing when the switcher is a bottom row or a popup or in + * the full-panel mode (where the chrome paints the strip over the window + * while the sidebar has focus). */ export function sidebarWidth(appId?: string): number { - return fullPanel(appId) || switcherPosition() === "bottom" ? 0 : SIDEBAR_WIDTH; + return !fullPanel(appId) && sideStrip() ? SIDEBAR_WIDTH : 0; } /** @@ -77,11 +85,12 @@ export function switcherRowHeight(appId?: string): number { } /** - * Whether the switcher strip is on screen: always when it reserves room; in - * the full-panel mode (where it overlays the window) only while it has focus. + * Whether the switcher is on screen: always when it reserves room; as a + * popup, or in the full-panel mode (where it overlays the window), only + * while it has focus. */ export function sidebarStripVisible(focus: "sidebar" | "window", appId?: string): boolean { - return !fullPanel(appId) || focus === "sidebar"; + return (!fullPanel(appId) && switcherPosition() !== "popup") || focus === "sidebar"; } /** @@ -90,10 +99,14 @@ export function sidebarStripVisible(focus: "sidebar" | "window", appId?: string) * (foreground) window and spans its width, so a band shorter than the * screen has no gap below it; it moves when the foreground switches to a * window of another height, as the top bar does. In the full-panel mode the - * row overlays the bottom edge of the screen. + * row overlays the bottom edge of the screen. A popup's is the area it + * centres in, the foreground window's content (the chrome layer sizes the + * box itself). */ export function switcherRect(heightMode: WindowHeightMode, appId?: string): { x: number; y: number; width: number; height: number } { switch (switcherPosition()) { + case "popup": + return appViewportRect(heightMode, appId); case "bottom": return { x: appViewportLeft(appId), @@ -112,40 +125,105 @@ export function switcherRect(heightMode: WindowHeightMode, appId?: string): { x: /** * Whether the foreground window's content gets a rounded frame (drawn by - * the chrome layer): with a reserved bottom switcher row, whose top edge is - * the frame's bottom side, as the window header's last row is its top. Its - * left and right sides take the pixel just outside the 576-wide window; - * there's no room in the full-panel mode, nor need beside a side strip. + * the chrome layer). Its left and right sides take the pixel just outside + * the 576-wide window; there's no room in the full-panel mode, nor need + * beside a side strip. With a reserved bottom switcher row it always has + * one: the row's top edge is the frame's bottom side, as the window + * header's last row is its top. With a popup switcher it's the Window + * border setting's choice, and its top and bottom take a header or footer + * row of their own, except where the status bar's row next to the window + * serves. */ export function windowFramed(appId?: string): boolean { - return switcherRowHeight(appId) > 0; + switch (switcherPosition()) { + case "bottom": + return switcherRowHeight(appId) > 0; + case "popup": + return !fullPanel(appId) && windowBorderSetting.get(); + default: + return false; + } } /** * Whether the status bar shares the bottom switcher row instead of topping - * each window (Settings > Customization > Status bar): only beside a - * reserved row, as the full-panel mode's row shows just while it has focus. + * each window (Settings > Customization > Status bar position): only beside + * a reserved row, as the full-panel mode's row shows just while it has focus. */ export function statusInSwitcherRow(appId?: string): boolean { - return windowFramed(appId) && statusBarPositionSetting.get() === "switcher"; + return switcherRowHeight(appId) > 0 && statusBarPositionSetting.get() === "bottom"; +} + +/** + * Which edge of the foreground window's band the status bar runs along + * (outside the switcher row): the top, or, with a popup switcher, the + * bottom too (Settings > Customization > Status bar position). + */ +export function statusBarEdge(): "top" | "bottom" { + return switcherPosition() === "popup" && statusBarPositionSetting.get() === "bottom" ? "bottom" : "top"; +} + +/** + * Whether the status bar shows only while a popup switcher is up, over the + * edge of the window's content, rather than always in rows of the band's + * own (Settings > Customization > Status bar visibility). + */ +export function statusBarOverlays(): boolean { + return switcherPosition() === "popup" && statusBarVisibilitySetting.get() === "switcher"; +} + +/** + * Rows the shell draws along one edge of each window's content: the status + * bar's (the top bar, as a header), the frame's side, or none. A bottom + * switcher row's band has no footer: the frame's bottom side is the row's + * top edge. + */ +function windowEdgeHeight(edge: "top" | "bottom", appId?: string): number { + if (switcherPosition() !== "popup") { + return edge === "bottom" ? 0 : statusInSwitcherRow(appId) ? 1 : TOP_BAR_HEIGHT; + } + if (!statusBarOverlays() && statusBarEdge() === edge) return TOP_BAR_HEIGHT; + return windowFramed(appId) ? 1 : 0; } /** * Height of the header the shell draws over each window's content: the top - * bar, or, with the status bar in the switcher row, just the row the - * window frame's top runs along. + * bar; with the status bar elsewhere, just the row the window frame's top + * runs along, or nothing without a frame. */ export function windowHeaderHeight(appId?: string): number { - return statusInSwitcherRow(appId) ? 1 : TOP_BAR_HEIGHT; + return windowEdgeHeight("top", appId); +} + +/** + * Height of the footer the shell draws under each window's content, within + * its band: with a popup switcher, the status bar at the bottom, or the row + * the window frame's bottom runs along; else nothing. + */ +export function windowFooterHeight(appId?: string): number { + return windowEdgeHeight("bottom", appId); +} + +/** + * Top edge (y) of the status bar's TOP_BAR_HEIGHT rows for a window: the + * band's first rows, or its last with the status bar at the bottom. Over + * the content when the status bar overlays (statusBarOverlays). + */ +export function statusBarTop(heightMode: WindowHeightMode, appId?: string): number { + const top = windowTop(heightMode, appId); + return statusBarEdge() === "bottom" ? top + windowBandHeight(heightMode, appId) - TOP_BAR_HEIGHT : top; } /** * Whether a screen point lies on the switcher's side of the screen, for * touches on the phone's mirror: anywhere in a side strip's column, or from - * the top of a bottom row (under the given foreground window) down. + * the top of a bottom row (under the given foreground window) down. A popup + * is modal: while it shows, the whole screen is the switcher's. */ export function isOnSwitcherEdge(x: number, y: number, heightMode: WindowHeightMode, appId?: string): boolean { switch (switcherPosition()) { + case "popup": + return true; case "bottom": return y >= switcherRect(heightMode, appId).y; case "right": @@ -162,7 +240,8 @@ function appViewportWidth(appId?: string): number { /** * Left edge (x) of app windows: past a left strip, centred above a bottom - * row (see SWITCHER_ROW_HEIGHT), else the screen edge. + * row (see SWITCHER_ROW_HEIGHT) or under a popup switcher, else the screen + * edge. */ export function appViewportLeft(appId?: string): number { if (fullPanel(appId)) return 0; @@ -170,6 +249,7 @@ export function appViewportLeft(appId?: string): number { case "left": return SIDEBAR_WIDTH; case "bottom": + case "popup": return SIDEBAR_WIDTH / 2; default: return 0; @@ -180,11 +260,11 @@ export function appViewportLeft(appId?: string): number { * Stereo depth of the whole display (Settings > Customization > Depth), in * the firmware's depth units; the shell scene carries it to the compositor, * which shifts the screen and everything drawn over it per lens. Only with - * the switcher at the bottom, where the windows' side margins, less the - * window frame's pixel, leave room for the shift. + * the switcher at the bottom or a popup, where the windows' side margins, + * less the window frame's pixel, leave room for the shift. */ export function uiDepth(): number { - return switcherPosition() === "bottom" ? Number(uiDepthSetting.get()) : 0; + return sideStrip() ? 0 : Number(uiDepthSetting.get()); } /** @@ -215,10 +295,11 @@ export const SHELL_OPAQUE_BLACK = 1; /** * Windows come in three heights. "min" covers the same 288px band the stock * firmware uses, leaving most of the field of view clear; "medium" is one - * header taller, so the content area below the header is a full 288px (the - * EvenHub app surface height); "max" uses the whole 480px screen (terminal - * views), less a bottom switcher row. All include a header drawn by the - * shell at the window's top edge (windowHeaderHeight). + * header (and footer) taller, so the content area between them is a full + * 288px (the EvenHub app surface height); "max" uses the whole 480px screen + * (terminal views), less a bottom switcher row. All include the header the + * shell draws at the window's top edge (windowHeaderHeight) and any footer + * at its bottom (windowFooterHeight). */ export type WindowHeightMode = "min" | "medium" | "max"; @@ -233,13 +314,13 @@ function windowAreaHeight(appId?: string): number { return G2_LENS_HEIGHT - switcherRowHeight(appId); } -/** Total height (header + content) of a window's band in the given mode. */ +/** Total height (header + content + footer) of a window's band in the given mode. */ export function windowBandHeight(mode: WindowHeightMode, appId?: string): number { switch (effectiveHeightMode(mode, appId)) { case "max": return windowAreaHeight(appId); case "medium": - return MIN_WINDOW_HEIGHT + windowHeaderHeight(appId); + return MIN_WINDOW_HEIGHT + windowHeaderHeight(appId) + windowFooterHeight(appId); default: return MIN_WINDOW_HEIGHT; } @@ -288,11 +369,11 @@ export function windowTop(mode: WindowHeightMode, appId?: string): number { export function appViewportSize(mode: WindowHeightMode, appId?: string): { width: number; height: number } { return { width: appViewportWidth(appId), - height: windowBandHeight(mode, appId) - windowHeaderHeight(appId), + height: windowBandHeight(mode, appId) - windowHeaderHeight(appId) - windowFooterHeight(appId), }; } -/** Screen rect of a window's app-content viewport (below its header). */ +/** Screen rect of a window's app-content viewport (between its header and footer). */ export function appViewportRect(mode: WindowHeightMode, appId?: string): { x: number; y: number; diff --git a/app/ui/shell/shell.ts b/app/ui/shell/shell.ts index 05daf584..b296758a 100644 --- a/app/ui/shell/shell.ts +++ b/app/ui/shell/shell.ts @@ -42,8 +42,10 @@ import { onAnySettingChanged, openAiApiKeySetting, statusBarPositionSetting, + statusBarVisibilitySetting, timeFormatSetting, wakeWordActionSetting, + windowBorderSetting, } from "../dashboard-settings"; import { onAmbientCardsChanged } from "./ambient-cards"; import { ShellChromeLayer, sidebarContentSpan, type ShellChromeState, type ShellChromeWindow } from "./chrome-layer"; @@ -321,7 +323,8 @@ class ShellAlertLayer implements Layer { * What a watch swipe means while the app switcher has focus, as the ring * gesture it stands for. Swipes are spatial: along the strip they move the * selection, toward the app area they enter the selected window, and away - * from it there is nowhere further to go (ignored). + * from it there is nowhere further to go (ignored). A popup's row of icons + * lies over the window, so either way across it enters the window. */ const SWITCHER_SWIPES: Record< AppSwitcherPosition, @@ -330,15 +333,17 @@ const SWITCHER_SWIPES: Record< left: { "swipe-up": "scroll-up", "swipe-down": "scroll-down", "swipe-right": "click" }, right: { "swipe-up": "scroll-up", "swipe-down": "scroll-down", "swipe-left": "click" }, bottom: { "swipe-left": "scroll-up", "swipe-right": "scroll-down", "swipe-up": "click" }, + popup: { "swipe-left": "scroll-up", "swipe-right": "scroll-down", "swipe-up": "click", "swipe-down": "click" }, }; /** * Every setting the shell's paint depends on that nothing else repaints it - * for (the top bar's contents, the scene's stereo depth), as one comparable - * string. + * for (the top bar's contents and placement, the window frame, the scene's + * stereo depth), as one comparable string. */ function chromeSettingsKey(): string { - return `${batteryIndicatorSettingsKey()}|${timeFormatSetting.get()}|${uiDepth()}|${statusBarPositionSetting.get()}`; + return `${batteryIndicatorSettingsKey()}|${timeFormatSetting.get()}|${uiDepth()}|${statusBarPositionSetting.get()}` + + `|${statusBarVisibilitySetting.get()}|${windowBorderSetting.get()}`; } class Shell { @@ -940,7 +945,8 @@ class Shell { * foreground window's band (full height for a max-height window, the * vertical-position-dependent 288px band otherwise) plus the switcher: a * side strip's icon columns (minus the outer dead strip the one-column - * variant leaves), or the row under it and the window frame's sides. + * variant leaves), or the row under it, and the window frame's sides. A + * popup switcher lies within the band. */ screenshotCropRect(): { x: number; y: number; width: number; height: number } { const appId = this.foregroundWindow()?.appId; diff --git a/tests/app-layout.test.cjs b/tests/app-layout.test.cjs index 23b254f3..64ed7369 100644 --- a/tests/app-layout.test.cjs +++ b/tests/app-layout.test.cjs @@ -15,6 +15,7 @@ function geometry() { navigateDisplayModeSetting: 'global', navigateVerticalPositionSetting: 'global', terminalDisplayModeSetting: 'default', terminalVerticalPositionSetting: 'global', appSwitcherPositionSetting: 'left', uiDepthSetting: '0', statusBarPositionSetting: 'top', + statusBarVisibilitySetting: 'always', windowBorderSetting: true, }).map(([name, value]) => [name, { value, get() { return this.value; } }])); const context = { exports: {}, require: (name) => { if (name === '../../graphics/image') return { G2_LENS_WIDTH: 640, G2_LENS_HEIGHT: 480 }; @@ -66,9 +67,17 @@ test('Terminal can disable its tall default, inherit position or override both d test('all explicit size/position combinations stay within the display and align content below the bar', () => { const g = geometry(); - for (const [switcher, statusBar] of [['left', 'top'], ['right', 'top'], ['bottom', 'top'], ['bottom', 'switcher'], ['left', 'switcher']]) { + const combos = [['left', 'top'], ['right', 'top'], ['bottom', 'top'], ['bottom', 'bottom'], ['left', 'bottom']]; + for (const statusBar of ['top', 'bottom']) { + for (const visibility of ['always', 'switcher']) { + for (const border of [true, false]) combos.push(['popup', statusBar, visibility, border]); + } + } + for (const [switcher, statusBar, visibility = 'always', border = true] of combos) { g.settings.appSwitcherPositionSetting.value = switcher; g.settings.statusBarPositionSetting.value = statusBar; + g.settings.statusBarVisibilitySetting.value = visibility; + g.settings.windowBorderSetting.value = border; for (const globalMode of ['576x288', '576x480', '640x480']) { g.settings.displayModeSetting.value = globalMode; for (const appId of ['navigate', 'terminal']) { @@ -79,12 +88,24 @@ test('all explicit size/position combinations stay within the display and align for (const heightMode of ['min', 'medium', 'max']) { const rect = g.rect(heightMode, appId); const fullPanel = g.displayMode(appId) === '640x480'; - assert.equal(rect.x + rect.width, fullPanel ? 640 : { left: 640, right: 576, bottom: 608 }[switcher]); - const header = g.windowHeaderHeight(appId); - assert.equal(header, g.statusInSwitcherRow(appId) ? 1 : g.TOP_BAR_HEIGHT); - assert.equal(g.statusInSwitcherRow(appId), statusBar === 'switcher' && g.switcherRowHeight(appId) > 0); + assert.equal(rect.x + rect.width, fullPanel ? 640 : { left: 640, right: 576, bottom: 608, popup: 608 }[switcher]); + const header = g.windowHeaderHeight(appId), footer = g.windowFooterHeight(appId); + assert.equal(g.statusInSwitcherRow(appId), statusBar === 'bottom' && g.switcherRowHeight(appId) > 0); + if (switcher === 'popup') { + // Each edge has the status bar's rows (unless it only + // overlays), else the frame's side, else nothing. + assert.equal(g.windowFramed(appId), border && !fullPanel); + const edge = (side) => visibility === 'always' && statusBar === side ? g.TOP_BAR_HEIGHT : g.windowFramed(appId) ? 1 : 0; + assert.deepEqual([header, footer], [edge('top'), edge('bottom')]); + // The status bar's rows lie within the band, at its edge. + const top = g.windowTop(heightMode, appId), band = g.windowBandHeight(heightMode, appId); + assert.equal(g.statusBarTop(heightMode, appId), statusBar === 'top' ? top : top + band - g.TOP_BAR_HEIGHT); + } else { + assert.deepEqual([header, footer], [g.statusInSwitcherRow(appId) ? 1 : g.TOP_BAR_HEIGHT, 0]); + } assert.equal(rect.y, g.windowTop(heightMode, appId) + header); - assert.ok(rect.y >= header && rect.y + rect.height <= 480 - g.switcherRowHeight(appId)); + assert.equal(rect.height + header + footer, g.windowBandHeight(heightMode, appId)); + assert.ok(rect.y >= header && rect.y + rect.height + footer <= 480 - g.switcherRowHeight(appId)); const row = g.switcherRect(heightMode, appId); assert.ok(row.y + row.height <= 480); // A reserved bottom row hangs right under the window, as wide as it. @@ -116,6 +137,45 @@ test('the app switcher can sit on the right edge', () => { assert.deepEqual(g.rect('max'), { x: 0, y: 28, width: 640, height: 452 }); }); +test('a popup app switcher centres 576-wide windows, whose edges the status bar and frame decide', () => { + const g = geometry(); + g.settings.appSwitcherPositionSetting.value = 'popup'; + // Nothing is reserved for the switcher: it shows only while focused, and + // is modal while it does. + assert.equal(g.sidebarStripVisible('window'), false); + assert.equal(g.sidebarStripVisible('sidebar'), true); + assert.equal(g.isOnSwitcherEdge(5, 5, 'min'), true); + assert.equal(g.screenCenterInViewportX(), 288); + g.settings.uiDepthSetting.value = '-48'; + assert.equal(g.uiDepth(), -48); + // The top bar above the content and the frame's bottom side below it. + assert.equal(g.windowFramed(), true); + assert.deepEqual(g.rect('min'), { x: 32, y: 124, width: 576, height: 259 }); + assert.deepEqual(g.rect('medium'), { x: 32, y: 110, width: 576, height: 288 }); + assert.deepEqual(g.rect('max', 'terminal'), { x: 32, y: 28, width: 576, height: 451 }); + // At the bottom, the bar takes the band's last rows, and the frame's top a row of its own. + g.settings.statusBarPositionSetting.value = 'bottom'; + assert.deepEqual(g.rect('min'), { x: 32, y: 97, width: 576, height: 259 }); + assert.equal(g.statusBarTop('min'), 356); + // Shown only in the switcher, the bar overlays the content, which grows into its rows. + g.settings.statusBarVisibilitySetting.value = 'switcher'; + assert.deepEqual(g.rect('min'), { x: 32, y: 97, width: 576, height: 286 }); + assert.deepEqual(g.rect('max', 'terminal'), { x: 32, y: 1, width: 576, height: 478 }); + assert.equal(g.statusBarTop('min'), 356); + // Without the frame too, windows have no chrome rows at all. + g.settings.windowBorderSetting.value = false; + assert.equal(g.windowFramed(), false); + assert.deepEqual(g.rect('max', 'terminal'), { x: 32, y: 0, width: 576, height: 480 }); + assert.deepEqual(g.rect('medium'), { x: 32, y: 96, width: 576, height: 288 }); + // Full panel: the status bar keeps its edge, but there's no room for a frame. + g.settings.windowBorderSetting.value = true; + g.settings.statusBarVisibilitySetting.value = 'always'; + g.settings.displayModeSetting.value = '640x480'; + assert.equal(g.windowFramed(), false); + assert.deepEqual(g.rect('max'), { x: 0, y: 0, width: 640, height: 452 }); + assert.equal(g.statusBarTop('max'), 452); +}); + test('a bottom app switcher centres 576-wide windows and hangs one tall tab under them', () => { const g = geometry(); g.settings.appSwitcherPositionSetting.value = 'bottom'; @@ -159,6 +219,7 @@ function chromeLayer(g, { notifications = 0, phoneBattery = null, windows = 1, t const modules = { '../../graphics/shell-scene': shellScene, '../../graphics/image': graphics, '../../graphics/display-list': displayList, '../../graphics/ui-fonts': { getDefaultSmallFont: () => font, getDefaultMediumFont: () => font }, + '../../graphics/textwrap': require('../.test-build/app/graphics/textwrap.js'), '../../graphics/battery': require('../.test-build/app/graphics/battery.js'), './ambient-cards': { activeAmbientCards: () => [] }, '../../native/notification-icons': { readActiveNotificationIcons: (max) => { @@ -179,7 +240,8 @@ function chromeLayer(g, { notifications = 0, phoneBattery = null, windows = 1, t const context = { exports: {}, require: (name) => modules[name] ?? {} }; vm.runInNewContext(js(read('app/ui/shell/chrome-layer.ts')), context); const state = { - windows: Array.from({ length: windows }, () => ({ attention: false, drawIcon: (image, x, y, size) => image.fillRect(x, y, size, size, 120) })), + windows: Array.from({ length: windows }, (_, i) => ({ title: `Window ${i}`, attention: false, + drawIcon: (image, x, y, size) => image.fillRect(x, y, size, size, 120) })), selectedIndex: 0, focus: 'window', foregroundHeightMode: 'min', battery: { headset: null, ring: null, watch: null }, trayIcons, }; @@ -273,7 +335,7 @@ test('the launcher\'s tab lines up with the window frame, whose corner squares t test('the status bar can join a bottom app switcher, and windows grow into the top bar', () => { const g = geometry(); - g.settings.statusBarPositionSetting.value = 'switcher'; + g.settings.statusBarPositionSetting.value = 'bottom'; // Only beside a reserved bottom row. assert.equal(g.statusInSwitcherRow(), false); g.settings.appSwitcherPositionSetting.value = 'bottom'; @@ -294,7 +356,7 @@ test('the status bar can join a bottom app switcher, and windows grow into the t test('the switcher row lays out windows, free space, notifications, widgets, batteries and the clock', () => { const g = geometry(); g.settings.appSwitcherPositionSetting.value = 'bottom'; - g.settings.statusBarPositionSetting.value = 'switcher'; + g.settings.statusBarPositionSetting.value = 'bottom'; const tray = new graphics.GrayImage(30, 20, 180); const { chrome, requested } = chromeLayer(g, { notifications: 2, phoneBattery: 80, trayIcons: [tray] }); const parts = chrome.paintParts(); @@ -327,7 +389,7 @@ test('the switcher row lays out windows, free space, notifications, widgets, bat test('many windows scroll in what the notification icons leave them', () => { const g = geometry(); g.settings.appSwitcherPositionSetting.value = 'bottom'; - g.settings.statusBarPositionSetting.value = 'switcher'; + g.settings.statusBarPositionSetting.value = 'bottom'; const { chrome, requested } = chromeLayer(g, { notifications: 40, windows: 12 }); const [row, status] = chrome.paintParts(); // Clock only (no batteries or widgets): notifications end 8px before its @@ -346,6 +408,87 @@ test('many windows scroll in what the notification icons leave them', () => { assert.equal(chevron % row.image.width + row.x, windowsRight - 6); }); +test('a popup app switcher shows a box of window icons over the dimmed window while focused', () => { + const g = geometry(); + g.settings.appSwitcherPositionSetting.value = 'popup'; + const { chrome, state } = chromeLayer(g, { windows: 3 }); + const summary = (parts) => Array.from(parts, (p) => [p.shellKey, p.depth ?? 0, p.dimUnderneath ?? 1]); + const at = (p, x, y) => p.image.pixels[(y - p.y) * p.image.width + x - p.x]; + // In the window: the top bar, then the frame, which rides on a pixel of + // its own at its top-left corner (outside its curve). + let parts = chrome.paintParts(); + assert.deepEqual(summary(parts), [[2, -2, 1], [1, 0, 1]]); + const [bar, carrier] = parts; + assert.deepEqual([carrier.x, carrier.y, carrier.image.width, carrier.image.height], [31, 123, 1, 1]); + // The whole rounded rect, from the bar's last row (in place of its + // divider) round the content (32,124 576×259) to the footer row under it. + const [frame] = carrier.image.draws.filter((d) => d.presentation?.displayList); + assert.deepEqual([carrier.x + frame.x, carrier.y + frame.y, frame.presentation.depth], [31, 123, 0]); + assert.deepEqual(JSON.parse(JSON.stringify(frame.presentation.displayList.calls)), [{ op: displayList.DrawOp.ROUNDED_RECT, + x: 0, y: 0, width: 578, height: 261, radius: 8, background: 0, border: 3, outside: 0 }]); + assert.equal(at(bar, 300, 123), 1); + // Focused: the box, nearer than the window, last. Its dim rides on the + // first part, so it dims the windows and none of the chrome. + state.focus = 'sidebar'; + parts = chrome.paintParts(); + assert.deepEqual(summary(parts), [[2, -2, 0.5], [1, 0, 1], [100, 4, 1]]); + const encoded = shellScene.encodeShellScene(parts, g.uiDepth()); + assert.equal(new DataView(encoded.buffer).getUint16(12, true), 128, 'first layer dims to half'); + // Three 44px cells 4px apart, in the minimum 272px width, centred over the + // content; 12px padding round the cells and the 12px title line under them. + let popup = parts[2]; + assert.deepEqual([popup.x, popup.y, popup.image.width, popup.image.height], [184, 210, 272, 86]); + assert.equal(at(popup, 184, 210), 72, 'border'); + // The selected (first) cell is filled white around its icon; the others' + // icons are depth images of their own over the black box. + assert.deepEqual([at(popup, 252, 240), at(popup, 260, 240), at(popup, 310, 240)], [255, 120, 1]); + assert.deepEqual(popup.image.draws.filter((d) => d.presentation).map((d) => [popup.x + d.x, popup.y + d.y]), [[304, 227], [352, 227]]); + // The selected window's title, centred under the icons. + assert.equal(at(popup, 184 + (272 - 32) / 2, 222 + 44 + 6 + 2), 210); + assert.deepEqual([chrome.windowIndexAt(260, 240, 3), chrome.windowIndexAt(300, 240, 3), chrome.windowIndexAt(296, 240, 3), + chrome.windowIndexAt(10, 10, 3)], [0, 1, null, null]); + // The flat paint shows it too. + assert.equal(chrome.paint().pixels[210 * 640 + 184], 72); + // Many windows scroll, with a chevron at either end of the icons. + const many = chromeLayer(g, { windows: 20 }); + many.state.focus = 'sidebar'; + many.state.selectedIndex = 15; + popup = many.chrome.paintParts()[2]; + assert.deepEqual([popup.x, popup.image.width], [58, 524]); + assert.equal(many.chrome.windowIndexAt(90, 240, 20), 6); + assert.deepEqual([at(popup, 74, 244), at(popup, 565, 244)], [140, 140]); +}); + +test('a popup switcher\'s status bar can sit at the bottom, show only in the switcher, or go without the frame', () => { + const g = geometry(); + g.settings.appSwitcherPositionSetting.value = 'popup'; + g.settings.statusBarVisibilitySetting.value = 'switcher'; + const { chrome, state } = chromeLayer(g); + const at = (p, x, y) => p.image.pixels[(y - p.y) * p.image.width + x - p.x]; + // Outside the switcher there's only the frame. + assert.deepEqual(Array.from(chrome.paintParts(), (p) => p.shellKey), [1]); + // In it, the bar overlays the content's top inside the frame, whose top + // runs along the bar's first row, so it keeps its divider on its last. + state.focus = 'sidebar'; + let [bar, carrier] = chrome.paintParts(); + assert.deepEqual([bar.x, bar.y, bar.image.width, bar.image.height, carrier.y], [32, 96, 576, 28, 96]); + assert.equal(at(bar, 300, 123), 40); + // At the bottom, its divider is its first row, and the frame's bottom its last. + g.settings.statusBarPositionSetting.value = 'bottom'; + [bar] = chrome.paintParts(); + assert.deepEqual([bar.y, at(bar, 300, 356), at(bar, 300, 383)], [356, 40, 1]); + // Always shown without a frame, a divider still separates bar and window. + g.settings.statusBarVisibilitySetting.value = 'always'; + g.settings.windowBorderSetting.value = false; + state.focus = 'window'; + const parts = chrome.paintParts(); + assert.deepEqual(Array.from(parts, (p) => p.shellKey), [2]); + assert.deepEqual([parts[0].y, at(parts[0], 300, 356)], [356, 40]); + g.settings.statusBarPositionSetting.value = 'top'; + [bar] = chrome.paintParts(); + assert.deepEqual([bar.y, at(bar, 300, 123)], [96, 40]); +}); + // Exercise the real worker message handler with platform work stubbed out. function resizeHandler(file, globals) { const source = ts.createSourceFile(file, read(file), ts.ScriptTarget.Latest, true); diff --git a/tests/terminal-hub-hosts.test.cjs b/tests/terminal-hub-hosts.test.cjs new file mode 100644 index 00000000..9e85efb8 --- /dev/null +++ b/tests/terminal-hub-hosts.test.cjs @@ -0,0 +1,71 @@ +const test = require('node:test'); +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); +const vm = require('node:vm'); +const ts = require('typescript'); + +// Run the worker's actual hub session-list builder with its collaborators stubbed. +function hub({ presets = [] } = {}) { + const file = 'app/apps/terminal/terminal-app.worker.ts'; + const source = ts.createSourceFile(file, fs.readFileSync(path.join(__dirname, '..', file), 'utf8'), ts.ScriptTarget.Latest, true); + const functions = new Set(['hubSessionItems', 'isControlConnected', 'controlStatusWord', 'orderedSessions', 'recencyKey', 'sessionLabel']); + const selected = source.statements.filter((s) => ts.isFunctionDeclaration(s) && functions.has(s.name?.text)); + const connected = []; + const context = { + controls: new Map(), sessionRecency: new Map(), + launchPresetNames: () => presets, + connectionDisplayName: (config) => config.name, + clientOptionsFor: (config) => (config.url === 'bad' ? null : {}), + isSessionActive: () => false, viewGlyphForSocket: () => null, viewWindowIdForSocket: () => null, + connectControl: (control) => connected.push(control.config.name), + }; + vm.runInNewContext(ts.transpileModule(selected.map((s) => s.getText(source)).join('\n'), { + compilerOptions: { module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2020 }, + }).outputText, context); + const window = { sessionOrder: [] }; + return { + connected, + add(name, { enabled = true, phase = null, sessions = [], retrying = false, url = 'ok' } = {}) { + context.controls.set(name, { + config: { id: name, name, url, enabled }, + state: phase && { phase, sessions: sessions.map((title) => ({ socket: title, title, command: title })) }, + reconnectTimer: retrying ? 1 : null, + }); + }, + items: () => context.hubSessionItems(window).slice(2), // past Manage Connections + Settings + }; +} + +// Array.from: the items are arrays from the vm realm. +const rows = (items) => Array.from(items, (item) => `${item.heading ? '# ' : ''}${item.label}${item.onSelect ? '' : ' [x]'}`); + +test('every configured host gets a heading in stored order, whatever its state', () => { + const h = hub(); + h.add('alpha', { phase: 'connecting' }); + h.add('beta', { phase: 'connected', sessions: ['vim'] }); + h.add('gamma', { phase: 'failed', retrying: true }); + h.add('delta', { enabled: false }); + h.add('epsilon', { url: 'bad' }); + assert.deepEqual(rows(h.items()), [ + '# alpha (connecting) [x]', + '# beta [x]', + 'vim', + '# gamma (retrying) [x]', + 'Connect now', + '# delta (off) [x]', + 'Connect', + '# epsilon (bad connection string) [x]', + ]); + h.items().find((item) => item.label === 'Connect').onSelect(); + assert.deepEqual(h.connected, ['delta']); +}); + +test('a lone host still shows its heading; connected headings launch when presets exist', () => { + const h = hub({ presets: ['shell'] }); + h.add('solo', { phase: 'connected' }); + assert.deepEqual(rows(h.items()), ['# solo', '(no live sessions; run g2mirror )']); + const lone = hub(); + lone.add('solo', { phase: 'connecting' }); + assert.deepEqual(rows(lone.items()), ['# solo (connecting) [x]']); +}); From 71fade31f93e316ff50b245a220c56828030f97f Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 01:15:42 -0700 Subject: [PATCH 37/60] Notifications in the bottom bar are focusable --- ...aceclawMediaNotificationListenerService.kt | 9 +- app/g2/dashboard-controller.ts | 49 +++- app/native/notification-icons.ios.ts | 7 +- app/native/notification-icons.ts | 22 +- app/ui/notifications.ts | 30 ++- app/ui/shell/chrome-layer.ts | 83 +++++-- app/ui/shell/shell.ts | 227 +++++++++++++++++- tests/app-layout.test.cjs | 67 +++++- tests/notification-filter.test.cjs | 34 ++- 9 files changed, 476 insertions(+), 52 deletions(-) diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawMediaNotificationListenerService.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawMediaNotificationListenerService.kt index 7c40de56..c0f6f229 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawMediaNotificationListenerService.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawMediaNotificationListenerService.kt @@ -87,8 +87,14 @@ class FaceclawMediaNotificationListenerService : NotificationListenerService() { return false } + /** + * The tray's notification icons, iconSize*iconSize gray bytes each: one + * per notification group. When keysOut is given, each icon's + * notification key (the group member it was taken from) is appended + * to it in step, so the tray can tell which notification an icon is. + */ @JvmStatic - fun getActiveNotificationIconGrays(iconSize: Int, maxIcons: Int): ByteArray { + fun getActiveNotificationIconGrays(iconSize: Int, maxIcons: Int, keysOut: MutableList?): ByteArray { val service = activeService val size = Math.max(1, Math.min(96, iconSize)) val limit = Math.max(0, maxIcons) @@ -130,6 +136,7 @@ class FaceclawMediaNotificationListenerService : NotificationListenerService() { + " drawable=" + drawable.javaClass.simpleName + " intrinsic=" + drawable.intrinsicWidth + "x" + drawable.intrinsicHeight) appendIconGrayBytes(drawable, size, out, service, emitted, statusBarNotification.packageName) + keysOut?.add(statusBarNotification.key ?: "") if (dedupeGroupKey != null) { emittedGroupKeys.add(dedupeGroupKey) } diff --git a/app/g2/dashboard-controller.ts b/app/g2/dashboard-controller.ts index b2f7ffc1..f6f33b17 100644 --- a/app/g2/dashboard-controller.ts +++ b/app/g2/dashboard-controller.ts @@ -87,6 +87,7 @@ import { type PhoneUiButton, } from "../apps/evenhub/manager"; import { openEvenHubStoreForPackage } from "../apps/evenhub"; +import { createNotificationsAppWindow, NOTIFICATIONS_SURFACE_ID, NOTIFICATIONS_WINDOW_ID } from "../apps/notifications/notifications-app"; import { isInstalledPackagePresent } from "../apps/evenhub/updates"; import { wearerVerificationOptions } from "../apps/microphones/speakers"; import { micSession } from "../apps/microphones/mic-session"; @@ -420,6 +421,8 @@ class DashboardController { // The foreground title is mirrored on both remote-control faces. this.emit(); }, + openNotificationsWindow: () => + this.openInProcessAppInBackground(NOTIFICATIONS_WINDOW_ID, NOTIFICATIONS_SURFACE_ID, createNotificationsAppWindow), onScreenStateChanged: (on) => { // Any wake of the regular UI replaces a showing Glanceboard. if (on) this.glance.dismiss(); @@ -1956,6 +1959,11 @@ class DashboardController { const foreground = shell.foregroundWindow(); const stripShown = sidebarStripVisible(shell.getFocus(), foreground?.appId); this.appendLog(`mirror tap at ${x},${y}`); + if (!shell.hasOverlay() && shell.focusNotificationAt(x, y)) { + this.appendLog("mirror tap: notification icon"); + this.requestShellRender(); + return; + } if (!shell.hasOverlay() && stripShown && isOnSwitcherEdge(x, y, foreground?.heightMode ?? "min", foreground?.appId)) { const target = shell.windowAtSidebarPoint(x, y); if (target) { @@ -2364,6 +2372,42 @@ class DashboardController { this.requestShellRender(); return; } + const app = this.createInProcessApp(windowId, surfaceId, create); + await this.configureWindowSurface(surfaceId, false, app.window.heightMode); + shell.focusWindow(windowId); + this.requestShellRender(); + this.appendLog(`launched ${windowId}`); + } + + /** + * An in-process singleton app's window, opened in the background (neither + * foregrounded nor focused) unless it is open already: for the shell to + * bring forward itself (the Notifications window under a notification + * selected in the switcher). The bridge runs calls in order, so the + * shell may foreground it at once: its surface's visibility is settled + * when the configure call is queued, ahead of any frame. + */ + private openInProcessAppInBackground( + windowId: string, + surfaceId: string, + create: (options: InProcessAppOptions) => InProcessWindow, + ): { window: InProcessWindow; opened: boolean } { + const existing = this.inProcessApps.get(windowId); + if (existing) return { window: existing, opened: false }; + const app = this.createInProcessApp(windowId, surfaceId, create); + void this.configureWindowSurface(surfaceId, this.isForegroundWindow(windowId), app.window.heightMode).catch((error) => { + this.appendLog(`${windowId} surface configure failed: ${this.formatError(error)}`); + }); + this.appendLog(`opened ${windowId} in the background`); + return { window: app, opened: true }; + } + + /** Create an in-process singleton app's window and register it with the shell. */ + private createInProcessApp( + windowId: string, + surfaceId: string, + create: (options: InProcessAppOptions) => InProcessWindow, + ): InProcessWindow { const app = create({ actions: { ...this.sharedActions, @@ -2384,10 +2428,7 @@ class DashboardController { }); this.inProcessApps.set(windowId, app); shell.registerWindow(app.window); - await this.configureWindowSurface(surfaceId, false, app.window.heightMode); - shell.focusWindow(windowId); - this.requestShellRender(); - this.appendLog(`launched ${windowId}`); + return app; } /** Get or spawn the worker host for an app. */ diff --git a/app/native/notification-icons.ios.ts b/app/native/notification-icons.ios.ts index d94b9857..95a387ed 100644 --- a/app/native/notification-icons.ios.ts +++ b/app/native/notification-icons.ios.ts @@ -36,8 +36,11 @@ function bell(): GrayImage { return image } export function readActiveNotificationIcons(maxIcons: number, _allowStale: boolean) { - const sources = new Set(readActiveNotifications(ALL_NOTIFICATIONS).map(n => n.packageName)) - return {icons: Array.from(sources).slice(0,Math.max(0,maxIcons)).map(() => bell()),stale:false} + // One icon per source, standing for its first notification. + const sources = new Map() + for (const n of readActiveNotifications(ALL_NOTIFICATIONS)) if (!sources.has(n.packageName)) sources.set(n.packageName, n.key) + const keys = Array.from(sources.values()).slice(0,Math.max(0,maxIcons)) + return {icons: keys.map(() => bell()),keys,stale:false} } export function readNotificationIconByKey(key: string, _allowStale: boolean) { return {icon: readActiveNotifications(ALL_NOTIFICATIONS).some(n => n.key === key) ? bell() : null,stale:false} diff --git a/app/native/notification-icons.ts b/app/native/notification-icons.ts index 4ea179dc..7620ab24 100644 --- a/app/native/notification-icons.ts +++ b/app/native/notification-icons.ts @@ -4,6 +4,7 @@ import { toUint8Array } from "../util/array-util"; import { rememberNotificationSources } from "./notification-sources"; declare const com: any; +declare const java: any; const ICON_SIZE = 24; /** Ask the native listener for every active source, including those below the list's display limit. */ @@ -17,6 +18,7 @@ export const ALL_NOTIFICATIONS = 0x7fffffff; const ICON_CACHE_MS = 60_000; let cachedIcons: GrayImage[] = []; +let cachedKeys: string[] = []; let cachedAtMs = 0; const keyedIconCache = new Map(); const KEYED_ICON_CACHE_MAX = 128; @@ -33,6 +35,11 @@ export type { AndroidNotification, AndroidNotificationAction } from "./notificat export type NotificationIconsResult = { icons: GrayImage[]; + /** + * The notification each icon stands for, by key, in step with icons: the + * member of its group (which gets one icon) the icon was taken from. + */ + keys: string[]; /** True when the icons came from an expired (or empty) cache under allowStale. */ stale: boolean; }; @@ -46,23 +53,25 @@ export type NotificationIconsResult = { * on what is in the tray. */ export function readActiveNotificationIcons(maxIcons: number, allowStale: boolean): NotificationIconsResult { - if (!global.isAndroid || maxIcons <= 0) return { icons: [], stale: false }; + if (!global.isAndroid || maxIcons <= 0) return { icons: [], keys: [], stale: false }; const now = Date.now(); if (cachedAtMs > 0 && now - cachedAtMs < ICON_CACHE_MS) { logCurrent("notification icons served from cache"); - return { icons: cachedIcons.map(icon => icon.clone()), stale: false }; + return { icons: cachedIcons.map(icon => icon.clone()), keys: cachedKeys.slice(), stale: false }; } if (allowStale) { logCurrent("notification icons served stale"); - return { icons: cachedIcons.map(icon => icon.clone()), stale: true }; + return { icons: cachedIcons.map(icon => icon.clone()), keys: cachedKeys.slice(), stale: true }; } + const keyList = new java.util.ArrayList(); const bytes = spanCurrent("fetch-notification-icons", () => toUint8Array( com.faceclaw.app.FaceclawMediaNotificationListenerService.getActiveNotificationIconGrays( ICON_SIZE, maxIcons, + keyList, ), ), ); @@ -74,10 +83,15 @@ export function readActiveNotificationIcons(maxIcons: number, allowStale: boolea icon.pixels.set(bytes.subarray(index * iconByteLength, (index + 1) * iconByteLength)); icons.push(icon); } + const keys: string[] = []; + for (let index = 0; index < iconCount; index++) { + keys.push(index < keyList.size() ? String(keyList.get(index)) : ""); + } cachedIcons = icons; + cachedKeys = keys; cachedAtMs = now; - return { icons: icons.map(icon => icon.clone()), stale: false }; + return { icons: icons.map(icon => icon.clone()), keys: keys.slice(), stale: false }; } export type NotificationIconResult = { diff --git a/app/ui/notifications.ts b/app/ui/notifications.ts index 57766945..37bae622 100644 --- a/app/ui/notifications.ts +++ b/app/ui/notifications.ts @@ -71,12 +71,18 @@ type DetailMenuItem = type ConfirmationItem = { label: string; run: (ctx: LayerContext) => void }; -export type SingleNotificationLayerOrigin = "notifications-list" | "new-notification-modal"; +export type SingleNotificationLayerOrigin = "notifications-list" | "new-notification-modal" | "notification-tray"; type SingleNotificationLayerOptions = { origin: SingleNotificationLayerOrigin; - /** Close hook for the modal origin (the layer is the modal stack's base, so pop() cannot close it). */ - closeModal?: (ctx: LayerContext) => void; + /** + * Close hook for hosts that take the layer down themselves instead of + * popping it: the modal (the layer is the modal stack's base, so pop() + * cannot close it), and the app switcher's tray selection, which keeps + * the layer up until the selection moves on. `gone` says the notification + * itself went away (dismissed, or removed by one of its actions). + */ + onClose?: (ctx: LayerContext, gone: boolean) => void; }; /** @@ -199,6 +205,9 @@ export class SingleNotificationLayer implements Layer { }, }); private confirmation: { source: AndroidNotification; menu: Menu } | null = null; + // The last paint, which a tray-hosted layer repeats once its notification + // is gone, until the tray swaps in a neighbour's (see closeUnavailableNotification). + private lastImage: GrayImage | null = null; constructor( private readonly notificationKey: string, @@ -219,6 +228,7 @@ export class SingleNotificationLayer implements Layer { this.detailMenu.setItems(buildDetailMenu(notification, this.options.origin)); drawDetailContent(image, font, notification, iconForNotification(notification.key), width, height); this.detailMenu.paint(image, detailMenuBox(width, height), ctx.stack.isFocused()); + this.lastImage = image; return image; } @@ -310,17 +320,23 @@ export class SingleNotificationLayer implements Layer { } /** Leave the detail view, whatever hosts it. */ - private close(ctx: LayerContext): void { - if (this.options.origin === "new-notification-modal") { - this.options.closeModal?.(ctx); + private close(ctx: LayerContext, gone = false): void { + if (this.options.onClose) { + this.options.onClose(ctx, gone); } else { ctx.stack.pop(); } } private closeUnavailableNotification(ctx: LayerContext, paintBelow?: PaintBelow): GrayImage { - this.close(ctx); + this.close(ctx, true); const { width, height } = ctx.stack.getBaseSize(); + // The tray replaces this layer only after the paint (swapping layers + // mid-paint would render re-entrantly); meanwhile the screen keeps what + // it showed rather than flashing the list beneath. + if (this.options.origin === "notification-tray" && this.lastImage) { + return this.lastImage.clone(); + } return paintBelow ? paintBelow() : new GrayImage(width, height, 0); } } diff --git a/app/ui/shell/chrome-layer.ts b/app/ui/shell/chrome-layer.ts index 4a4b1155..8e7efbcb 100644 --- a/app/ui/shell/chrome-layer.ts +++ b/app/ui/shell/chrome-layer.ts @@ -293,6 +293,11 @@ function statusBarPlacement(state: ShellChromeState): StatusBarPlacement | null } const NOTIFICATION_ICON_SIZE = 24; +const NOTIFICATION_ICON_STEP = NOTIFICATION_ICON_SIZE + 4; +// The box round a selected notification icon: clear of it by 2px either +// side, and by 1px above and below, all a top bar leaves above its divider. +const NOTIFICATION_BOX_MARGIN_X = 2; +const NOTIFICATION_BOX_MARGIN_Y = 1; const BORDER_VALUE = 40; export type ShellChromeWindow = { @@ -305,7 +310,13 @@ export type ShellChromeWindow = { export type ShellChromeState = { windows: ShellChromeWindow[]; + /** The selected window's index, or -1 while the selection is on a notification. */ selectedIndex: number; + /** + * The notification (by key) whose icon the switcher's selection is on + * instead of a window, if any (see Shell.moveSelection). + */ + selectedNotificationKey?: string | null; focus: "sidebar" | "window"; /** Height mode of the foreground window; decides where its top bar sits. */ foregroundHeightMode: WindowHeightMode; @@ -408,12 +419,16 @@ export class ShellChromeLayer implements Layer { // Whether the last paint's selection tab carries the window frame's left // side down, so the frame's bottom-left corner is square. private frameCornerSquare = false; + // The notification icons the last paint drew, left to right: what the + // switcher's selection can move onto, and mirror touches hit. + private notificationEntries: NotificationEntry[] = []; constructor(private readonly getState: () => ShellChromeState) {} paint(): GrayImage { const image = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); const state = this.getState(); + this.notificationEntries = []; const statusInRow = statusInSwitcherRow(state.foregroundAppId); const popup = switcherPosition() === "popup"; // Full-panel mode: the strip is an overlay, present only while the user @@ -434,6 +449,7 @@ export class ShellChromeLayer implements Layer { paintParts(): Plane[] { const state = this.getState(), parts: Plane[] = []; + this.notificationEntries = []; const statusInRow = statusInSwitcherRow(state.foregroundAppId); const canvas = new GrayImage(G2_LENS_WIDTH, G2_LENS_HEIGHT, 0); const span = topBarSpan(state); @@ -465,9 +481,10 @@ export class ShellChromeLayer implements Layer { if (statusLeft !== null) { // The status bar keeps the top bar's surface and its depth, -2, over // the row's right end below its separator line, so the clock ticking - // doesn't resend the window icons. - const right = strip.x + strip.width; - parts.push({ ...shellCrop(canvas, statusLeft, strip.y + 1, right - statusLeft, strip.height - 1, 2), depth: -2 }); + // doesn't resend the window icons. It reaches into the gap before it + // by a selection box's margin, for one round its first icon. + const right = strip.x + strip.width, left = statusLeft - NOTIFICATION_BOX_MARGIN_X; + parts.push({ ...shellCrop(canvas, left, strip.y + 1, right - left, strip.height - 1, 2), depth: -2 }); } } drawAmbientCards(canvas, span.right, parts); @@ -526,6 +543,17 @@ export class ShellChromeLayer implements Layer { return null; } + /** Keys of the notifications whose icons the last paint drew, left to right. */ + notificationKeys(): string[] { + return this.notificationEntries.map((entry) => entry.key); + } + + /** Which notification's icon is under (x, y) on screen, if any (mirror touches). */ + notificationKeyAt(x: number, y: number): string | null { + const entry = this.notificationEntries.find((e) => x >= e.x && x < e.x + e.width && y >= e.y && y < e.y + e.height); + return entry?.key ?? null; + } + /** * Draw the switcher strip or row. Given `statusImage`, a bottom row shares * its right end with the status bar, drawn there (into that image, which @@ -550,7 +578,10 @@ export class ShellChromeLayer implements Layer { const windowsRight = statusLeft === null ? strip.x + strip.width : statusLeft - ROW_STATUS_GAP; this.rowWindowsRight = windowsRight; const visibleCount = switcherLayout(count, state.foregroundHeightMode, state.foregroundAppId, windowsRight).visibleCount; - this.scrollRow = scrollToKeepSelectionVisible(this.scrollRow, state.selectedIndex, visibleCount, count); + // With the selection out on a notification, the windows stay scrolled as they were. + this.scrollRow = state.selectedIndex >= 0 + ? scrollToKeepSelectionVisible(this.scrollRow, state.selectedIndex, visibleCount, count) + : Math.min(this.scrollRow, Math.max(0, count - visibleCount)); const layout = switcherLayout(count, state.foregroundHeightMode, state.foregroundAppId, windowsRight, this.scrollRow); const { iconSize, position } = layout; const lastVisible = Math.min(count, this.scrollRow + layout.visibleCount); @@ -642,19 +673,16 @@ export class ShellChromeLayer implements Layer { // Right-aligned against the widgets, with the top bar's spacing. const slots = Math.min(windowCount, ROW_MIN_WINDOW_SLOTS); const windowsFloor = row.x + 2 * LIST_MARGIN + Math.max(0, slots * ROW_STEP - ICON_SPACING) + ROW_STATUS_GAP; - const iconsRight = trayLeft - 8, step = NOTIFICATION_ICON_SIZE + 4; + const iconsRight = trayLeft - 8, step = NOTIFICATION_ICON_STEP; const maxIcons = Math.max(0, ((iconsRight - windowsFloor + 4) / step) | 0); if (maxIcons === 0) return trayLeft; - const { icons, stale } = readActiveNotificationIcons(maxIcons, renderPassAllowsStaleData()); + const { icons, keys, stale } = readActiveNotificationIcons(maxIcons, renderPassAllowsStaleData()); if (stale) { noteStaleDataUsed(); } if (!icons.length) return trayLeft; const iconsLeft = iconsRight - icons.length * step + 4; - const iconY = top + (((TOP_BAR_HEIGHT - NOTIFICATION_ICON_SIZE) / 2) | 0); - for (let index = 0; index < icons.length; index++) { - image.drawImage(icons[index]!, iconsLeft + index * step, iconY); - } + this.drawNotificationIcons(image, state, icons, keys, iconsLeft, top + (((TOP_BAR_HEIGHT - NOTIFICATION_ICON_SIZE) / 2) | 0)); return iconsLeft; } @@ -732,16 +760,36 @@ export class ShellChromeLayer implements Layer { const trayLeft = drawTrayIcons(image, state.trayIcons, batteryLeft, barTop); const iconsX = clockX + font.measureText(clock) + 16; - const maxIcons = Math.max(0, ((trayLeft - 8 - iconsX) / (NOTIFICATION_ICON_SIZE + 4)) | 0); + const maxIcons = Math.max(0, ((trayLeft - 8 - iconsX) / NOTIFICATION_ICON_STEP) | 0); if (maxIcons > 0) { - const { icons, stale } = readActiveNotificationIcons(maxIcons, renderPassAllowsStaleData()); + const { icons, keys, stale } = readActiveNotificationIcons(maxIcons, renderPassAllowsStaleData()); if (stale) { noteStaleDataUsed(); } - const iconY = barTop + (((TOP_BAR_HEIGHT - NOTIFICATION_ICON_SIZE) / 2) | 0); - for (let index = 0; index < icons.length; index++) { - image.drawImage(icons[index]!, iconsX + index * (NOTIFICATION_ICON_SIZE + 4), iconY); - } + this.drawNotificationIcons(image, state, icons, keys, iconsX, barTop + (((TOP_BAR_HEIGHT - NOTIFICATION_ICON_SIZE) / 2) | 0)); + } + } + + /** + * Draw the notification icons left to right from `left`, noting each as a + * notification entry. The one the switcher's selection is on + * (state.selectedNotificationKey) sits in a rounded box like a sidebar + * overflow icon's: filled, with the icon inverted, while the switcher has + * focus, and outlined while its detail view in the foreground window has. + */ + private drawNotificationIcons(image: GrayImage, state: ShellChromeState, icons: GrayImage[], keys: string[], left: number, iconY: number): void { + for (let index = 0; index < icons.length; index++) { + const x = left + index * NOTIFICATION_ICON_STEP; + const key = keys[index]; + const box = { + x: x - NOTIFICATION_BOX_MARGIN_X, y: iconY - NOTIFICATION_BOX_MARGIN_Y, + width: NOTIFICATION_ICON_SIZE + 2 * NOTIFICATION_BOX_MARGIN_X, height: NOTIFICATION_ICON_SIZE + 2 * NOTIFICATION_BOX_MARGIN_Y, + }; + if (key) this.notificationEntries.push({ key, ...box }); + const selected = !!key && key === state.selectedNotificationKey; + const focused = selected && state.focus === "sidebar"; + if (selected) drawSelectionBox(image, box.x, box.y, box.width, box.height, focused); + image.drawImage(focused ? invertedIcon(icons[index]!) : icons[index]!, x, iconY); } } @@ -978,6 +1026,9 @@ function attentionDot(value: number): GrayImage { type Rect = { x: number; y: number; width: number; height: number }; +/** A notification icon as drawn: its notification's key, and its selection box. */ +type NotificationEntry = Rect & { key: string }; + /** Corner radius of the foreground window's frame. */ const FRAME_RADIUS = 8; diff --git a/app/ui/shell/shell.ts b/app/ui/shell/shell.ts index b296758a..87a6c72a 100644 --- a/app/ui/shell/shell.ts +++ b/app/ui/shell/shell.ts @@ -51,6 +51,7 @@ import { onAmbientCardsChanged } from "./ambient-cards"; import { ShellChromeLayer, sidebarContentSpan, type ShellChromeState, type ShellChromeWindow } from "./chrome-layer"; import { ShellModalLayer } from "./modal-layer"; import { ToolDebugMenuLayer } from "./tool-debug-layer"; +import type { InProcessWindow } from "./in-process-window"; import { BrightnessPickerLayer } from "./brightness-picker-layer"; import { toolRegistry } from "../../assistant/tool-registry"; import { @@ -197,6 +198,35 @@ export type ShellConfig = { onScreenStateChanged: (on: boolean) => void; /** Window registered/removed or foreground changed (persists the open-app list). */ onWindowsChanged?: () => void; + /** + * The Notifications app's window, opened in the background (neither + * foregrounded nor focused) unless it is open already, for the switcher + * to show a notification's detail view in; `opened` says this call opened + * it. Hosts that leave it out offer no notifications to select. + */ + openNotificationsWindow?: () => { window: InProcessWindow; opened: boolean } | null; +}; + +/** + * The app switcher's selection while it is on a notification's icon rather + * than a window's (bottom switcher only; see Shell.moveSelection). The + * Notifications app's window is the foreground window meanwhile, with the + * notification's detail view on top of its stack. + */ +type NotificationSelection = { + key: string; + /** Where the notification's icon sat among them, for once it has gone. */ + index: number; + host: InProcessWindow; + layer: SingleNotificationLayer; + /** + * The Notifications window was opened for the selection: it has no + * switcher icon of its own, and closes once the selection moves off the + * notifications. + */ + transient: boolean; + /** The window selected before, to go back to when the screen sleeps. */ + returnWindowId: string | null; }; /** Which surfaces need re-rendering after an input event. */ @@ -362,6 +392,8 @@ class Shell { headset: null, headsetCharging: null, ring: null, ringCharging: null, watch: null, watchCharging: null, }; private attention = new Map(); + /** Set while the switcher's selection is on a notification (see NotificationSelection). */ + private selectedNotification: NotificationSelection | null = null; // App-provided top-bar tray icons, keyed by owner id; drawn between the // notification icons and the battery indicators. private readonly trayIcons = new Map(); @@ -481,6 +513,9 @@ class Shell { removeWindow(windowId: string): void { const index = this.windows.findIndex((w) => w.windowId === windowId); if (index < 0) return; + // Closing the Notifications window under a selected notification (from + // the system menu) takes the selection with it. + if (this.selectedNotification?.host.window.windowId === windowId) this.selectedNotification = null; const wasSelected = index === this.selectedIndex; this.windows.splice(index, 1); this.attention.delete(windowId); @@ -590,8 +625,29 @@ class Shell { /** The window whose sidebar icon is at screen (x, y), for mirror touches. */ windowAtSidebarPoint(x: number, y: number): ShellWindow | null { - const index = this.chrome.windowIndexAt(x, y, this.windows.length); - return index === null ? null : this.windows[index] ?? null; + const windows = this.switcherWindows(); + const index = this.chrome.windowIndexAt(x, y, windows.length); + return index === null ? null : windows[index] ?? null; + } + + /** + * A touch from the phone's mirror on a selectable notification's icon: + * select it and go into its detail view, as a touch on a window's icon + * focuses that window. False when there is no such icon at (x, y). + */ + focusNotificationAt(x: number, y: number): boolean { + const keys = this.selectableNotificationKeys(); + const key = this.chrome.notificationKeyAt(x, y); + if (!key || !keys.includes(key)) return false; + this.selectNotification(key, keys.indexOf(key)); + const host = this.selectedNotification?.key === key ? this.selectedNotification.host.window : null; + if (!host) return false; + const alreadyFocused = this.isFocusTarget(host); + this.focus = "window"; + if (!alreadyFocused) host.onFocus?.(this.lastInput); + host.requestRender(); + this.syncInputFocus(); + return true; } /** Whether input focus currently targets this window (regardless of screen state). */ @@ -650,9 +706,13 @@ class Shell { return true; } - /** Turn the screen off, closing any shell overlays. Sidebar selection is kept. */ + /** + * Turn the screen off, closing any shell overlays. Sidebar selection is + * kept, except that one on a notification goes back to its window. + */ sleep(): void { if (!this.screenOn) return; + this.returnFromNotification(); this.cancelEscapeMenuTimer(); this.screenOn = false; this.stack.clearToBase(); @@ -670,6 +730,9 @@ class Shell { const target = this.windows[index]; const alreadyFocused = this.isFocusTarget(target); this.setSelectedIndex(index); + // Asked for by id, the Notifications window stays, whether or not it + // was opened for a selected notification. + this.endNotificationSelection(target === this.selectedNotification?.host.window); this.focus = "window"; if (!alreadyFocused) target?.onFocus?.(this.lastInput); this.syncInputFocus(); @@ -708,7 +771,7 @@ class Shell { const modal: ShellModalLayer = new ShellModalLayer( new SingleNotificationLayer(notificationKey, { origin: "new-notification-modal", - closeModal: () => this.closeNotificationModal(modal, wokeScreen), + onClose: () => this.closeNotificationModal(modal, wokeScreen), }), this.config.actions, ); @@ -1041,10 +1104,155 @@ class Shell { } } + /** + * Step the switcher's selection through the windows and then, with a + * bottom switcher, on through the notifications whose icons are showing, + * wrapping round at either end. + */ private moveSelection(delta: number): void { - if (!this.windows.length) return; - const count = this.windows.length; - this.setSelectedIndex((this.selectedIndex + delta + count) % count); + const windows = this.switcherWindows(); + const keys = this.selectableNotificationKeys(); + const count = windows.length + keys.length; + if (!count) return; + let current = this.selectedIndex; + const selected = this.selectedNotification; + if (selected) { + // Once its notification has gone, the selection stands between the + // neighbours it left. + const at = keys.indexOf(selected.key); + current = windows.length + (at >= 0 ? at : Math.min(selected.index, keys.length) - (delta > 0 ? 1 : 0)); + } + const next = (((current + delta) % count) + count) % count; + if (next < windows.length) { + this.selectSwitcherWindow(windows[next]!); + } else { + this.selectNotification(keys[next - windows.length]!, next - windows.length); + } + } + + /** + * Windows with an icon in the switcher: all of them, except a + * Notifications window opened just to show a selected notification. + */ + private switcherWindows(): ShellWindow[] { + const hidden = this.selectedNotification?.transient ? this.selectedNotification.host.window : null; + return hidden ? this.windows.filter((window) => window !== hidden) : this.windows; + } + + /** + * Keys of the notifications the switcher's selection can move onto, left + * to right: those whose icons are showing, with a bottom switcher (the + * selection reaches them past the last window). + */ + private selectableNotificationKeys(): string[] { + return this.config.openNotificationsWindow && switcherPosition() === "bottom" ? this.chrome.notificationKeys() : []; + } + + /** Move the switcher's selection onto a window, off a notification if it was on one. */ + private selectSwitcherWindow(window: ShellWindow): void { + // Foreground first, so a Notifications window closing with the + // notification selection can't hand the foreground elsewhere first. + this.setSelectedIndex(this.windows.indexOf(window)); + this.endNotificationSelection(window === this.selectedNotification?.host.window); + } + + /** + * Move the switcher's selection onto a notification: the Notifications + * window (opened in the background first, if need be) comes to the + * foreground showing its detail view. + */ + private selectNotification(key: string, index: number): void { + const selected = this.selectedNotification; + if (selected) { + selected.index = index; + if (selected.key === key) return; + selected.host.stack.popThrough(selected.layer); + selected.key = key; + selected.layer = this.notificationDetailLayer(key); + selected.host.stack.push(selected.layer); + selected.host.requestRender(); + return; + } + const returnWindowId = this.foregroundWindow()?.windowId ?? null; + const opened = this.config.openNotificationsWindow?.(); + const hostIndex = opened ? this.windows.indexOf(opened.window.window) : -1; + if (!opened || hostIndex < 0) return; + const host = opened.window; + const layer = this.notificationDetailLayer(key); + host.stack.push(layer); + this.selectedNotification = { key, index, host, layer, transient: opened.opened, returnWindowId }; + if (hostIndex === this.selectedIndex) { + host.requestRender(); + } else { + this.setSelectedIndex(hostIndex); + } + } + + /** + * Take the switcher's selection off its notification: the Notifications + * window drops the detail view (and anything opened over it), and closes + * if it was opened for the selection, unless `keepWindow` (it is the + * window being selected instead). + */ + private endNotificationSelection(keepWindow = false): void { + const selected = this.selectedNotification; + if (!selected) return; + this.selectedNotification = null; + selected.host.stack.popThrough(selected.layer); + if (selected.transient && !keepWindow) { + this.closeWindow(selected.host.window.windowId); + return; + } + selected.host.requestRender(); + // A window opened for the selection is now one with an icon of its own. + if (selected.transient) this.config.onWindowsChanged?.(); + } + + /** End a notification selection by going back to the window selected before it. */ + private returnFromNotification(): void { + const selected = this.selectedNotification; + if (!selected) return; + const back = this.windows.find((window) => window.windowId === selected.returnWindowId); + if (back) this.setSelectedIndex(this.windows.indexOf(back)); + this.endNotificationSelection(back === selected.host.window); + } + + private notificationDetailLayer(key: string): SingleNotificationLayer { + const layer: SingleNotificationLayer = new SingleNotificationLayer(key, { + origin: "notification-tray", + onClose: (_ctx, gone) => this.notificationDetailClosed(layer, gone), + }); + return layer; + } + + /** + * A selected notification's detail view asked to close. Back (or a + * double-tap) hands focus back to the switcher, its selection still on + * the notification. Once the notification is gone (dismissed, or removed + * by an action), the selection also moves on to the one that took its + * place, or back to the windows when there are none left; that waits for + * the current paint to finish, since a vanished notification closes its + * view from inside its paint. + */ + private notificationDetailClosed(layer: SingleNotificationLayer, gone: boolean): void { + if (!gone) { + if (this.selectedNotification?.layer === layer) this.yieldFocusToSidebar(); + return; + } + setTimeout(() => { + const selected = this.selectedNotification; + if (selected?.layer !== layer) return; + this.focus = "sidebar"; + const keys = this.selectableNotificationKeys().filter((key) => key !== selected.key); + const windows = this.switcherWindows(); + if (keys.length) { + const index = Math.min(selected.index, keys.length - 1); + this.selectNotification(keys[index]!, index); + } else if (windows.length) { + this.selectSwitcherWindow(windows[windows.length - 1]!); + } + this.config.requestShellRender(); + }, 0); } /** Change selection; the selected window is the foreground window. */ @@ -1573,13 +1781,14 @@ class Shell { private chromeState(): ShellChromeState { return { - windows: this.windows.map((window) => ({ + windows: this.switcherWindows().map((window) => ({ windowId: window.windowId, title: window.title, attention: Boolean(this.attention.get(window.windowId)), drawIcon: window.drawIcon, })), - selectedIndex: this.selectedIndex, + selectedIndex: this.selectedNotification ? -1 : this.selectedIndex, + selectedNotificationKey: this.selectedNotification?.key ?? null, focus: this.focus, foregroundHeightMode: this.foregroundWindow()?.heightMode ?? "min", foregroundAppId: this.foregroundWindow()?.appId, diff --git a/tests/app-layout.test.cjs b/tests/app-layout.test.cjs index 64ed7369..cc0cb72a 100644 --- a/tests/app-layout.test.cjs +++ b/tests/app-layout.test.cjs @@ -206,7 +206,8 @@ test('a bottom app switcher centres 576-wide windows and hangs one tall tab unde // The real chrome layer over the given geometry, with platform pieces stubbed: // a 4px-per-character font that paints each character as a 2x6 block, up to -// `notifications` 24px notification icons, and a phone battery at 80%. +// `notifications` 24px notification icons (keyed n0, n1, ...), and a phone +// battery at 80%. const graphics = require('../.test-build/app/graphics/image.js'); const shellScene = require('../.test-build/app/graphics/shell-scene.js'); const displayList = require('../.test-build/app/graphics/display-list.js'); @@ -224,7 +225,9 @@ function chromeLayer(g, { notifications = 0, phoneBattery = null, windows = 1, t './ambient-cards': { activeAmbientCards: () => [] }, '../../native/notification-icons': { readActiveNotificationIcons: (max) => { requested.push(max); - return { icons: Array.from({ length: Math.min(max, notifications) }, () => new graphics.GrayImage(24, 24, 200)), stale: false }; + const count = Math.min(max, notifications); + return { icons: Array.from({ length: count }, () => new graphics.GrayImage(24, 24, 200)), + keys: Array.from({ length: count }, (_, index) => `n${index}`), stale: false }; } }, '../../native/phone-battery': { readPhoneBatteryState: () => ({ battery: phoneBattery, charging: false }) }, '../../util/render-freshness': { renderPassAllowsStaleData: () => false }, @@ -366,9 +369,10 @@ test('the switcher row lays out windows, free space, notifications, widgets, bat // Right to left from the row's end (x=608), centred under its separator // line (y=366): "Thu Oct 2 9:41" (56px) flush with it; the battery block (label // 20 + gap 5 + gauge 21) 16px before it; the 30px widget 10px before that; - // then the two notification icons, 8px clear of the widget. + // then the two notification icons, 8px clear of the widget. The surface + // starts 2px before them, room for a selection box round the first. const clockX = 608 - 56, batteryLeft = clockX - 16 - 46, trayLeft = batteryLeft - 40, iconsLeft = trayLeft - 8 - 56 + 4; - assert.deepEqual([status.x, status.y, status.image.width, status.image.height], [iconsLeft, 367, 608 - iconsLeft, 35]); + assert.deepEqual([status.x, status.y, status.image.width, status.image.height], [iconsLeft - 2, 367, 608 - iconsLeft + 2, 35]); const at = (p, x, y) => p.image.withDrawsBaked().pixels[(y - p.y) * p.image.width + x - p.x]; // The clock's text runs 8 rows down the top bar's layout, which sits 5 rows into the row. assert.deepEqual([at(status, clockX, 366 + 5 + 8 + 2), at(status, trayLeft, 366 + 5 + 4), at(status, iconsLeft, 366 + 5 + 2)], [210, 180, 200]); @@ -398,7 +402,7 @@ test('many windows scroll in what the notification icons leave them', () => { const max = Math.floor((trayLeft - 8 - floor + 4) / 28); assert.equal(requested.at(-1), max); const iconsLeft = trayLeft - 8 - max * 28 + 4; - assert.equal(status.x, iconsLeft); + assert.equal(status.x, iconsLeft - 2); // Three windows fit before the status bar's gap; the rest scroll, with the // chevron at the end of the windows rather than of the row. assert.equal(chrome.windowIndexAt(32 + 10 + 2 * 40 + 4, 380, 12), 2); @@ -489,6 +493,59 @@ test('a popup switcher\'s status bar can sit at the bottom, show only in the swi assert.deepEqual([bar.y, at(bar, 300, 123)], [96, 40]); }); +test('a notification the switcher selects sits in a box, filled with its icon inverted while the switcher has focus', () => { + const g = geometry(); + g.settings.appSwitcherPositionSetting.value = 'bottom'; + g.settings.statusBarPositionSetting.value = 'bottom'; + const { chrome, state } = chromeLayer(g, { notifications: 3, windows: 2 }); + Object.assign(state, { selectedIndex: -1, selectedNotificationKey: 'n1', focus: 'sidebar' }); + let [row, status] = chrome.paintParts(); + assert.deepEqual(Array.from(chrome.notificationKeys()), ['n0', 'n1', 'n2']); + // Clock only: the icons end 8px before its 8px lead-in, 28px apart, each + // 7 rows into the row (the top bar's layout, 5 rows down). + const iconsLeft = 608 - 56 - 8 - 8 - 3 * 28 + 4, iconY = 366 + 7, n1 = iconsLeft + 28; + const at = (p, x, y) => p.image.withDrawsBaked().pixels[(y - p.y) * p.image.width + x - p.x]; + // The box: 2px either side of the icon, 1px above and below, white; the + // icon inside it inverted; its neighbours as ever. + assert.deepEqual([at(status, n1 - 2, iconY + 12), at(status, n1 + 25, iconY + 12), at(status, n1 + 12, iconY - 1)], [255, 255, 255]); + assert.equal(at(status, n1 + 12, iconY - 2), 1); + assert.deepEqual([at(status, n1 + 5, iconY + 5), at(status, iconsLeft + 5, iconY + 5)], [55, 200]); + // No window is selected: the separator runs unbroken over the windows. + assert.equal(at(row, 50, 366), 40); + // Mirror touches find the icons by their boxes, which tile the icons' run. + assert.deepEqual([chrome.notificationKeyAt(n1 + 5, 380), chrome.notificationKeyAt(n1 - 3, 380), + chrome.notificationKeyAt(iconsLeft - 3, 380), chrome.notificationKeyAt(n1 + 5, 400)], ['n1', 'n0', null, null]); + // With its detail view focused instead, the box is an outline round the plain icon. + state.focus = 'window'; + [, status] = chrome.paintParts(); + assert.deepEqual([at(status, n1 - 2, iconY + 12), at(status, n1 - 1, iconY + 12), at(status, n1 + 5, iconY + 5)], [150, 1, 200]); + // The first icon's box fits the status bar's surface. + state.selectedNotificationKey = 'n0'; + [, status] = chrome.paintParts(); + assert.equal(at(status, iconsLeft - 2, iconY + 12), 150); + // In the top bar (the status bar's default place) likewise; barTop=78. + g.settings.statusBarPositionSetting.value = 'top'; + const [bar] = chrome.paintParts(); + const barIconsLeft = 32 + 10 + 56 + 16; + assert.deepEqual(Array.from(chrome.notificationKeys()), ['n0', 'n1', 'n2']); + assert.deepEqual([at(bar, barIconsLeft - 2, 78 + 14), at(bar, barIconsLeft + 5, 78 + 7)], [150, 200]); + assert.equal(chrome.notificationKeyAt(barIconsLeft + 30, 78 + 10), 'n1'); +}); + +test('with the selection out on a notification, the windows stay scrolled as they were', () => { + const g = geometry(); + g.settings.appSwitcherPositionSetting.value = 'bottom'; + const { chrome, state } = chromeLayer(g, { notifications: 2, windows: 20 }); + state.selectedIndex = 19; + chrome.paintParts(); + const last = 32 + 10 + 2 * 40 + 4; + const before = chrome.windowIndexAt(last, 380, 20); + assert.ok(before > 2); + Object.assign(state, { selectedIndex: -1, selectedNotificationKey: 'n0' }); + chrome.paintParts(); + assert.equal(chrome.windowIndexAt(last, 380, 20), before); +}); + // Exercise the real worker message handler with platform work stubbed out. function resizeHandler(file, globals) { const source = ts.createSourceFile(file, read(file), ts.ScriptTarget.Latest, true); diff --git a/tests/notification-filter.test.cjs b/tests/notification-filter.test.cjs index ea1be2bd..4fafbe1b 100644 --- a/tests/notification-filter.test.cjs +++ b/tests/notification-filter.test.cjs @@ -98,14 +98,40 @@ function ui(fontSize = 12) { const { SingleNotificationLayer } = load('app/ui/notifications.ts', requireModule); const { NotificationFilterLayer } = load('app/ui/notification-filter.ts', requireModule); const ctx = { stack: { getBaseSize: () => ({ width: 540, height: 224 }), isFocused: () => true, pop: () => closes++ } }; - const popup = new SingleNotificationLayer('key', { origin: 'new-notification-modal', closeModal: () => closes++ }); + const popup = new SingleNotificationLayer('key', { origin: 'new-notification-modal', onClose: () => closes++ }); + const trayCloses = []; + const tray = new SingleNotificationLayer('key', { origin: 'notification-tray', onClose: (_ctx, gone) => trayCloses.push(gone) }); const filter = new NotificationFilterLayer(); - const paint = (layer) => layer.paint(ctx, () => new RecordingImage(540, 224)); + let paintedBelow = 0; + const paint = (layer) => layer.paint(ctx, () => { paintedBelow++; return new RecordingImage(540, 224); }); const input = (layer, type) => layer.handleInput({ type }, ctx); - return { prefs, popup, filter, paint, input, active: (value) => { active = value; }, - dismissals: () => dismissals, closes: () => closes }; + return { prefs, popup, tray, filter, paint, input, active: (value) => { active = value; }, + dismissals: () => dismissals, closes: () => closes, trayCloses, paintedBelow: () => paintedBelow }; } +test('a notification the switcher selected reports back and dismissal to it, and repeats its last frame once gone', async () => { + const app = ui(); + const labels = (image) => image.texts.map(({ text }) => text); + assert.ok(labels(app.paint(app.tray)).includes('Back')); + assert.ok(!labels(app.paint(app.tray)).some((text) => text.includes("Don't show"))); + await app.input(app.tray, 'double-click'); + await app.input(app.tray, 'click'); + assert.deepEqual(app.trayCloses, [false, false]); + await app.input(app.tray, 'scroll-down'); + const last = app.paint(app.tray); + await app.input(app.tray, 'click'); + assert.equal(app.dismissals(), 1); + assert.deepEqual(app.trayCloses, [false, false, true]); + // The switcher swaps in a neighbour after the paint; until then the paint + // holds what was showing rather than the list below. + const again = app.paint(app.tray); + assert.deepEqual(app.trayCloses, [false, false, true, true]); + assert.equal(app.paintedBelow(), 0); + // (Compared unbaked: the menu highlight's draws animate with the clock.) + assert.deepEqual(Buffer.from(again.pixels), Buffer.from(last.pixels)); + assert.deepEqual(again.drawList, last.drawList); +}); + test('popup dismisses before confirmation; confirming disables the source even after the notification disappears', async () => { const app = ui(); await app.input(app.popup, 'scroll-down'); From 16fc0bcfb6ad07a3843f8e283795d492eefa50cc Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 01:29:59 -0700 Subject: [PATCH 38/60] Fix padding in notifications; reorder settings in Customization section
Prompts Used User: On the single notification view (focusing a notification on the bottom bar, or in the notifications app), the page title "Notification" and the notification itself can overlap, depending on configured font size. Opus 5.5: > I fixed the overlap in the single-notification view, but I haven't checked it on the glasses. The build and typecheck pass. > > **Cause:** In `drawDetailContent` (`app/ui/notifications.ts`), the "Notification" title was drawn at y=21, but the icon and the app-name/time line under it were at fixed spots (y=36 and y=42). Only the body text below them moved with the font. Small-font line heights go up to 21px, and once the line height passes about 15px, the title runs into the app-name line. > > **Fix:** The header now sits below the title's text line: 3px below it, then a row as tall as the icon or the text line, whichever is bigger. The app name is centred vertically against the icon, and the body starts 4px below that row. At the 12px default everything lands exactly where it did before, so only larger fonts look different. The menu on the right was never affected. > > This covers both places you hit it: the bottom-bar tray and the Notifications app's detail view. The pop-up for a new notification uses the same view, so it gets the fix too. > > One thing I left alone: this title sits at (24, 21), but list screens like the Notifications list put their title at (18, 10). So the title jumps a little when you open a notification from the list. Moving it to (18, 10) would make the two match and give large fonts about 11px more room. Say if you want that.
User: Thanks. Next up, in the Customization section of the Settings app, reorder the settings so that Font is first. Opus 5.5: > Font is now the first row in Settings > Customization, whichever app-switcher position is set (left/right, bottom or popup). The other rows keep their order: app switcher position, then the bottom/popup-only rows, then Battery indicators, Animations and Time format. > > The change is in `customizationRows()` in `app/ui/dashboard/settings-menus.ts`. Nothing else relies on the row order, and the build passes. I haven't installed it on a device.
--- app/ui/dashboard/settings-menus.ts | 10 +++++----- app/ui/notifications.ts | 20 +++++++++++++------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/app/ui/dashboard/settings-menus.ts b/app/ui/dashboard/settings-menus.ts index f261bd58..56142f2e 100644 --- a/app/ui/dashboard/settings-menus.ts +++ b/app/ui/dashboard/settings-menus.ts @@ -241,6 +241,8 @@ function settingsSections(): SettingsSection[] { * stable list between paints. */ function customizationRows(): () => MenuItem[] { + // Opens the modal font picker (face, weight, size) for UI text. + const font = uiFontPickerMenuItem(); // Left / right / bottom edge, or popup; the dashboard controller moves or // resizes windows on change. const position = enumSettingMenuItem(appSwitcherPositionSetting); @@ -261,12 +263,10 @@ function customizationRows(): () => MenuItem[] { animationsMenuItem(), // Controls the top-bar clock (24-hour vs 12-hour). enumSettingMenuItem(timeFormatSetting), - // Opens the modal font picker (face, weight, size) for UI text. - uiFontPickerMenuItem(), ]; - const bottomRows = [position, depth, statusBar, ...rest]; - const popupRows = [position, depth, statusBar, statusBarVisibility, windowBorder, ...rest]; - const sideRows = [position, ...rest]; + const bottomRows = [font, position, depth, statusBar, ...rest]; + const popupRows = [font, position, depth, statusBar, statusBarVisibility, windowBorder, ...rest]; + const sideRows = [font, position, ...rest]; return () => { switch (appSwitcherPositionSetting.get()) { case "bottom": diff --git a/app/ui/notifications.ts b/app/ui/notifications.ts index 37bae622..3a3da2ba 100644 --- a/app/ui/notifications.ts +++ b/app/ui/notifications.ts @@ -3,7 +3,7 @@ import { formatRelativeTime } from "~/util/date-util"; import { getDefaultSmallFont } from "../graphics/ui-fonts"; import { truncateText, wrapText } from "../graphics/textwrap"; import { GrayImage, type UiFont } from "../graphics/image"; -import { LIST_ROW_TEXT_INSET, lineStep, listRowHeight } from "./metrics"; +import { LIST_ROW_TEXT_INSET, centeredTextY, lineStep, listRowHeight } from "./metrics"; import { ALL_NOTIFICATIONS, dismissNotification, @@ -20,8 +20,6 @@ import { type InputEvent } from "./gestures"; import { type Layer, type LayerContext, type PaintBelow } from "./layers"; import { Menu, type MenuBox } from "./menu-core"; -const PAGE_X = 12; -const PAGE_Y = 12; // Title position, shared with the other list apps (terminal, calendar). const TITLE_X = 18; const TITLE_Y = 10; @@ -42,6 +40,10 @@ const DETAIL_MENU_ROW_GAP = 3; const DETAIL_MENU_TEXT_X = 8; const DETAIL_MENU_TEXT_Y = 4; const DETAIL_CONTENT_X = 24; +const DETAIL_TITLE_Y = 21; +/** Gaps below the title's line box and below the icon/app-name header row. */ +const DETAIL_HEADER_GAP = 3; +const DETAIL_BODY_GAP = 4; // Disable-source confirmation: actions on top, the explanation below them. const CONFIRM_X = 24; const CONFIRM_Y = 8; @@ -428,13 +430,17 @@ function drawDetailContent( const contentX = DETAIL_CONTENT_X; const menuX = width - DETAIL_MENU_WIDTH - 24; const contentWidth = menuX - contentX - 20; - image.drawText(font, PAGE_X + 12, PAGE_Y + 9, "Notification", 220); + image.drawText(font, contentX, DETAIL_TITLE_Y, "Notification", 220); + // The header row (icon + app name) and the body stack below the title's + // line box, so a large UI font pushes them down instead of overlapping. + const headerTop = DETAIL_TITLE_Y + font.lineHeight + DETAIL_HEADER_GAP; + const headerHeight = Math.max(ICON_SIZE, font.lineHeight); let appLineX = contentX; if (icon) { - image.bitBlt(icon, contentX, 36, { transparentZero: true }); + image.bitBlt(icon, contentX, headerTop + ((headerHeight - ICON_SIZE) >> 1), { transparentZero: true }); appLineX = contentX + ICON_SIZE + ICON_TEXT_GAP; } - image.drawText(font, appLineX, 42, `${notification.appName || notification.packageName} ${formatRelativeTime(notification.postTime)}`, 150); + image.drawText(font, appLineX, centeredTextY(font, headerTop, headerHeight), `${notification.appName || notification.packageName} ${formatRelativeTime(notification.postTime)}`, 150); const lines: string[] = []; lines.push(...wrapText(font, notification.title || "(untitled)", contentWidth)); @@ -450,7 +456,7 @@ function drawDetailContent( } const step = lineStep(font); - const bodyTop = 48 + font.lineHeight + 4; + const bodyTop = headerTop + headerHeight + DETAIL_BODY_GAP; const maxLines = Math.max(1, ((height - bodyTop - step) / step) | 0); for (let index = 0; index < Math.min(lines.length, maxLines); index++) { const line = lines[index]!; From ed375aa9c05059d32421e28c11b4cc50f7fdcb3b Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 12:50:00 -0700 Subject: [PATCH 39/60] Mark 2.3.2.14 as validated for firmware install --- app/g2/firmware-compat.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/g2/firmware-compat.ts b/app/g2/firmware-compat.ts index e5c0c17f..97f32ff3 100644 --- a/app/g2/firmware-compat.ts +++ b/app/g2/firmware-compat.ts @@ -36,7 +36,7 @@ const LEGACY_PREFIX = "EVENCFW"; // unrecognized (its layout may differ from what our patch set targets). export const BASE_STOCK_VERSION = [2, 3, 0, 24]; export const BASE_STOCK_VERSION_TEXT = BASE_STOCK_VERSION.join("."); -export const VALIDATED_STOCK_VERSION = [2, 3, 0, 24]; +export const VALIDATED_STOCK_VERSION = [2, 3, 2, 14]; export const VALIDATED_STOCK_VERSION_TEXT = VALIDATED_STOCK_VERSION.join("."); export type FirmwareExtension = @@ -139,7 +139,7 @@ export function firmwareIncompatibilityMessage(info: FirmwareInfo): string | nul default: return ( `The glasses report stock firmware ${versionsText}. Faceclaw requires ${required}. ` + - "Displaying images will not work until the custom firmware is installed." + "Faceclaw will not work until the custom firmware is installed." ); } } From 68625fad1e60378cc360ebd0da07d4661c84721d Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 13:02:47 -0700 Subject: [PATCH 40/60] Fix styling on the pairing page --- app/app.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/app.css b/app/app.css index f493f6d4..d1f86d93 100644 --- a/app/app.css +++ b/app/app.css @@ -303,6 +303,10 @@ Button.pairing-link { color: #2a5bc4; font-size: 14; border-width: 0; + /* Buttons keep their Material elevation shadow even with a transparent + * background, which shows up as a stray, downward-offset outline. */ + android-elevation: 0; + android-dynamic-elevation-offset: 0; } /* From ed20f633224adbf17e42b4c2af9b9cb1b09fde99 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 13:08:58 -0700 Subject: [PATCH 41/60] Add "all files access" permission to the Android permissions dialog --- app/phone-ui/permissions-view-model.ts | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/app/phone-ui/permissions-view-model.ts b/app/phone-ui/permissions-view-model.ts index af04e294..fbc05c1d 100644 --- a/app/phone-ui/permissions-view-model.ts +++ b/app/phone-ui/permissions-view-model.ts @@ -13,6 +13,7 @@ import { } from "../g2/android-permissions"; import { ensureCalendarPermission, hasCalendarPermission } from "../native/calendar-permissions"; import { isIgnoringBatteryOptimizations, requestIgnoreBatteryOptimizations } from "../native/battery-optimization"; +import { hasAllFilesAccess, requestAllFilesAccess } from "../native/file-access"; import { isNotificationListenerEnabled, requestNotificationListenerAccess } from "../native/notification-access"; type PermissionDefinition = { @@ -26,9 +27,10 @@ type PermissionDefinition = { }; /** - * Battery Optimization and Read Notifications are not runtime permissions: - * their request() opens a system screen, so the granted state can only be - * re-checked when the app resumes (the page refreshes on Application.resume). + * Battery Optimization, Read Notifications and All Files Access are not + * runtime permissions: their request() opens a system screen, so the granted + * state can only be re-checked when the app resumes (the page refreshes on + * Application.resume). */ const ANDROID_PERMISSIONS: PermissionDefinition[] = [ { @@ -89,6 +91,14 @@ const ANDROID_PERMISSIONS: PermissionDefinition[] = [ isGranted: hasCalendarPermission, request: ensureCalendarPermission, }, + { + id: "all-files-access", + title: "All Files Access", + description: "Needed to browse and view files in the Files app on the glasses.", + optional: true, + isGranted: hasAllFilesAccess, + request: requestAllFilesAccess, + }, ]; const PERMISSIONS: PermissionDefinition[] = global.isIOS ? [{ @@ -132,8 +142,9 @@ export class PermissionsViewModel extends Observable { } /** - * Battery Optimization and Read Notifications grant flows leave the app for - * a system screen; re-check everything whenever the app comes back. + * Battery Optimization, Read Notifications and All Files Access grant flows + * leave the app for a system screen; re-check everything whenever the app + * comes back. */ private readonly onAppResume = (): void => this.refresh(); From 76e3a9810bbf656a31ccf7b818729861da880113 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 13:11:54 -0700 Subject: [PATCH 42/60] Change default config values to put the app switcher on bottom --- app/graphics/ui-fonts.ts | 2 +- app/ui/dashboard-settings.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/graphics/ui-fonts.ts b/app/graphics/ui-fonts.ts index 93d0324f..bcf5e786 100644 --- a/app/graphics/ui-fonts.ts +++ b/app/graphics/ui-fonts.ts @@ -73,7 +73,7 @@ export function parseFontSelection(raw: string): UiFontSelection | null { } /** Default UI font when the user has never picked one. */ -const DEFAULT_UI_FONT: UiFontSelection = { kind: "ttf", file: "Roboto-Light.ttf", size: 14 }; +const DEFAULT_UI_FONT: UiFontSelection = { kind: "ttf", file: "Roboto-Light.ttf", size: 16 }; export function getUiFontSelection(): UiFontSelection { const parsed = parseFontSelection(getStringSetting(UI_FONT_SELECTION_KEY, "")); diff --git a/app/ui/dashboard-settings.ts b/app/ui/dashboard-settings.ts index 8d6e3f46..2e84026b 100644 --- a/app/ui/dashboard-settings.ts +++ b/app/ui/dashboard-settings.ts @@ -234,7 +234,7 @@ export const batteryDisplayModeSetting = new ConfigSettingEnum APP_SWITCHER_POSITION_LABELS[value] ?? value, description: @@ -388,7 +388,7 @@ export const uiDepthSetting = new ConfigSettingEnum({ id: "ui-depth", label: "Depth", storageKey: "display.uiDepth", - defaultValue: "0", + defaultValue: "48", values: UI_DEPTH_VALUES, formatValue: (value) => { const depth = Number(value); @@ -411,7 +411,7 @@ export const statusBarPositionSetting = new ConfigSettingEnum id: "status-bar-position", label: "Status bar position", storageKey: "display.statusBarPosition", - defaultValue: "top", + defaultValue: "bottom", values: ["top", "bottom"], // "switcher" was the bottom value's name while only a bottom row had one. normalize: (value) => value === "bottom" || value === "switcher" ? "bottom" : "top", From 682a8e964d178bda5a44601c3af6cdc538e1f622 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 14:40:09 -0700 Subject: [PATCH 43/60] Fix a crash on iOS --- app/graphics/shell-scene.ts | 8 +++++++- app/ui/shell/chrome-layer.ts | 9 +++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/graphics/shell-scene.ts b/app/graphics/shell-scene.ts index 06207366..2ee21c44 100644 --- a/app/graphics/shell-scene.ts +++ b/app/graphics/shell-scene.ts @@ -2,8 +2,14 @@ import { encodePresentation } from "./presentation-wire" import { GrayImage, type PlacedImage } from './image' import type { Plane } from './plane' -/** Crop one independently owned, opaque shell surface; never split it into tiles. */ +/** + * Crop one independently owned, opaque shell surface; never split it into + * tiles. A fractional rect (TTF-measured layout) widens to the whole pixels it + * touches, since a fractional row stride overruns the crop's buffer. + */ export function shellCrop(image: GrayImage, x: number, y: number, width: number, height: number, key: number): Plane { + const right = Math.ceil(x + width), bottom = Math.ceil(y + height) + x = Math.floor(x); y = Math.floor(y); width = right - x; height = bottom - y const baked = image.withDrawsBaked(false), crop = new GrayImage(width, height, 0) for (let row = 0; row < height; row++) crop.pixels.set(baked.pixels.subarray((y + row) * image.width + x, (y + row) * image.width + x + width), row * width) image.copyPresentationsInto(crop, -x, -y) diff --git a/app/ui/shell/chrome-layer.ts b/app/ui/shell/chrome-layer.ts index 8e7efbcb..4fe7f0a3 100644 --- a/app/ui/shell/chrome-layer.ts +++ b/app/ui/shell/chrome-layer.ts @@ -664,7 +664,8 @@ export class ShellChromeLayer implements Layer { const top = row.y + ROW_STATUS_TOP; const font = getDefaultMediumFont(); const clock = clockText(); - const clockX = row.x + row.width - font.measureText(clock); + // A TTF face measures fractionally; the status surface's crop edges need whole pixels. + const clockX = row.x + row.width - Math.ceil(font.measureText(clock)); image.drawText(font, clockX, top + Math.max(0, ((TOP_BAR_HEIGHT - font.lineHeight) / 2) | 0), clock, 210); // The battery block keeps its usual right margin inside the edge it's given. const batteryLeft = this.drawTopBarBatteries(image, state, top, clockX - ROW_CLOCK_GAP + BATTERY_BLOCK_RIGHT_MARGIN); @@ -759,7 +760,7 @@ export class ShellChromeLayer implements Layer { const batteryLeft = this.drawTopBarBatteries(image, state, barTop, barRight); const trayLeft = drawTrayIcons(image, state.trayIcons, batteryLeft, barTop); - const iconsX = clockX + font.measureText(clock) + 16; + const iconsX = clockX + Math.ceil(font.measureText(clock)) + 16; const maxIcons = Math.max(0, ((trayLeft - 8 - iconsX) / NOTIFICATION_ICON_STEP) | 0); if (maxIcons > 0) { const { icons, keys, stale } = readActiveNotificationIcons(maxIcons, renderPassAllowsStaleData()); @@ -841,8 +842,8 @@ export class ShellChromeLayer implements Layer { for (let index = items.length - 1; index >= 0; index--) { const item = items[index]!; const percentText = `${item.percent}%`; - const valueWidth = percentageMode ? font.measureText(percentText) : BATTERY_ICON_WIDTH; - const labelWidth = font.measureText(item.label); + const valueWidth = percentageMode ? Math.ceil(font.measureText(percentText)) : BATTERY_ICON_WIDTH; + const labelWidth = Math.ceil(font.measureText(item.label)); x -= labelWidth + labelGap + valueWidth; image.drawText(font, x, textY, item.label, BATTERY_LABEL_VALUE); const valueX = x + labelWidth + labelGap; From 9b0bf77d798ca424ea7ab00bd4d42dc7b0540cb5 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 14:40:52 -0700 Subject: [PATCH 44/60] Animations have a speed setting rather than an on/off toggle --- app/ui/animation-speed.ts | 26 ++++++++++++++++++++++++++ app/ui/dashboard-settings.ts | 22 ++++++++++++++-------- app/ui/dashboard/settings-menus.ts | 8 ++++---- app/ui/menu-animation-pref.ts | 19 +++++++++++-------- app/ui/menu-highlight-motion.ts | 8 +++++--- app/ui/menu-scroll-motion.ts | 14 ++++++++------ app/ui/menu.ts | 5 +++-- tests/brightness-curve.test.cjs | 7 ++++--- tests/brightness-picker.test.cjs | 2 +- tests/icon-grid.test.cjs | 3 ++- tests/menu-display-list.test.cjs | 8 +++++++- tests/menu-scroll-animation.test.cjs | 27 ++++++++++++++++++++++----- tests/music-settings.test.cjs | 2 +- tests/notification-filter.test.cjs | 2 +- tests/settings-panel.test.cjs | 2 +- 15 files changed, 110 insertions(+), 45 deletions(-) create mode 100644 app/ui/animation-speed.ts diff --git a/app/ui/animation-speed.ts b/app/ui/animation-speed.ts new file mode 100644 index 00000000..1f5d7651 --- /dev/null +++ b/app/ui/animation-speed.ts @@ -0,0 +1,26 @@ +/** + * Speeds offered by the Settings > Customization > Animations settings. + * Animation durations are tuned at Normal; the other speeds play them faster + * or slower, and Disabled makes them instant. + */ +export const ANIMATION_SPEEDS = ["disabled", "very-fast", "fast", "normal", "slow"] as const; +export type AnimationSpeed = typeof ANIMATION_SPEEDS[number]; + +const SPEED_FACTORS: Record = { disabled: 0, "very-fast": 5, fast: 2, normal: 1, slow: 0.5 }; +const SPEED_LABELS: Record = { + disabled: "Disabled", "very-fast": "Very Fast", fast: "Fast", normal: "Normal", slow: "Slow", +}; + +export function animationSpeedLabel(speed: AnimationSpeed): string { + return SPEED_LABELS[speed]; +} + +export function normalizeAnimationSpeed(value: string | null | undefined): AnimationSpeed { + return ANIMATION_SPEEDS.includes(value as AnimationSpeed) ? value as AnimationSpeed : "normal"; +} + +/** A duration tuned for Normal speed, played at `speed`: whole milliseconds, or 0 when disabled. */ +export function scaleAnimationDuration(normalMs: number, speed: AnimationSpeed): number { + const factor = SPEED_FACTORS[speed]; + return factor ? Math.max(1, Math.round(normalMs / factor)) : 0; +} diff --git a/app/ui/dashboard-settings.ts b/app/ui/dashboard-settings.ts index 2e84026b..17941c6a 100644 --- a/app/ui/dashboard-settings.ts +++ b/app/ui/dashboard-settings.ts @@ -18,6 +18,7 @@ import { } from "~/assistant/models"; import { isLocalModelReady } from "../native/llama"; import { drawRightValueMenuItem, drawToggleMenuItem, MenuItem, openModalMenu } from "./menu"; +import { ANIMATION_SPEEDS, animationSpeedLabel, scaleAnimationDuration, type AnimationSpeed } from "./animation-speed"; import { MENU_ANIMATION_KEY } from "./menu-animation-pref"; import { LIST_ROW_TEXT_INSET, lineStep } from "./metrics"; import { Layer, type LayerContext } from "./layers"; @@ -480,29 +481,34 @@ export const autoBrightnessCurveSetting = new ConfigSettingString({ defaultValue: DEFAULT_BRIGHTNESS_CURVE, normalize: normalizeBrightnessCurve, validate: brightnessCurveError, description: "2–16 lux:percent pairs, separated by commas. Percent is within your minimum–maximum range. Start at 0:0, end at 100%, and increase lux without decreasing percent. Incomplete edits stay in the preview; brightness keeps using the last valid curve.", }); +/** The screen on/off fade at Normal speed. */ const SCREEN_FADE_MS = 280; -export const menuAnimationSetting = new ConfigSettingBoolean({ +export const menuAnimationSetting = new ConfigSettingEnum({ id: "menu-animation", label: "Menu animation", storageKey: MENU_ANIMATION_KEY, - defaultValue: true, - description: "Slide the highlight, scroll, and bounce at the ends in menus, lists, and the launcher and Files icon grids. When off, they move instantly.", + defaultValue: "normal", + values: ANIMATION_SPEEDS, + formatValue: animationSpeedLabel, + description: "How fast the highlight slides, lists scroll, and the ends bounce in menus, lists, and the launcher and Files icon grids. Disabled moves them instantly.", }); -export const screenFadeSetting = new ConfigSettingBoolean({ +export const screenFadeSetting = new ConfigSettingEnum({ id: "screen-fade", label: "Screen fade", - storageKey: "display.screenFade", - defaultValue: true, - description: "Fade the display in and out when the screen turns on or off. When off, it switches instantly.", + storageKey: "display.screenFadeSpeed", + defaultValue: "normal", + values: ANIMATION_SPEEDS, + formatValue: animationSpeedLabel, + description: "How fast the display fades in and out when the screen turns on or off. Disabled switches it instantly.", }); export function getBrightnessPreferences() { const level = brightnessSettingToLevel(brightnessSetting.get()); return { auto: level === null, level: level ?? 50, minimum: Number(autoBrightnessMinSetting.get()), maximum: Number(autoBrightnessMaxSetting.get()), - curve: autoBrightnessCurveSetting.getValidValue(), fadeMs: screenFadeSetting.get() ? SCREEN_FADE_MS : 0 }; + curve: autoBrightnessCurveSetting.getValidValue(), fadeMs: scaleAnimationDuration(SCREEN_FADE_MS, screenFadeSetting.get()) }; } export const screenTimeoutSetting = new ConfigSettingEnum({ diff --git a/app/ui/dashboard/settings-menus.ts b/app/ui/dashboard/settings-menus.ts index 56142f2e..99dc6a6d 100644 --- a/app/ui/dashboard/settings-menus.ts +++ b/app/ui/dashboard/settings-menus.ts @@ -326,17 +326,17 @@ function batteryIndicatorsMenuItem(): MenuItem { }; } -/** The Customization section's "Animations" row: opens a modal submenu of animation toggles. */ +/** The Customization section's "Animations" row: opens a modal submenu of animation speeds. */ function animationsMenuItem(): MenuItem { return submenuItem( "Animations", (ctx) => { openSettingsSubMenu(ctx, "Animations", [ - toggleSettingMenuItem(menuAnimationSetting), - toggleSettingMenuItem(screenFadeSetting), + enumSettingMenuItem(menuAnimationSetting), + enumSettingMenuItem(screenFadeSetting), ]); }, - { description: "Turn off menu and icon-grid motion, or the fade when the screen turns on and off." }, + { description: "Speed up, slow down, or turn off menu and icon-grid motion and the fade when the screen turns on and off." }, ); } diff --git a/app/ui/menu-animation-pref.ts b/app/ui/menu-animation-pref.ts index 9592211e..10103589 100644 --- a/app/ui/menu-animation-pref.ts +++ b/app/ui/menu-animation-pref.ts @@ -1,18 +1,21 @@ +import { scaleAnimationDuration, type AnimationSpeed } from "./animation-speed"; + /** - * Whether menus and icon grids animate on the glasses (Settings > Customization > + * How fast menus and icon grids animate on the glasses (Settings > Customization > * Animations > Menu animation). The motion classes can't read the settings * store themselves (it is native, and they load under Node in unit tests), * so ui/menu.ts installs a reader in each isolate that paints menus. Without - * one, menus animate. + * one, menus animate at Normal speed. */ -export const MENU_ANIMATION_KEY = "display.menuAnimation"; +export const MENU_ANIMATION_KEY = "display.menuAnimationSpeed"; -let readMenuAnimation: () => boolean = () => true; +let readMenuAnimationSpeed: () => AnimationSpeed = () => "normal"; -export function menuAnimationEnabled(): boolean { - return readMenuAnimation(); +/** A menu animation's Normal-speed duration at the configured speed; 0 when menu animation is disabled. */ +export function menuAnimationDurationMs(normalMs: number): number { + return scaleAnimationDuration(normalMs, readMenuAnimationSpeed()); } -export function setMenuAnimationReader(read: () => boolean): void { - readMenuAnimation = read; +export function setMenuAnimationReader(read: () => AnimationSpeed): void { + readMenuAnimationSpeed = read; } diff --git a/app/ui/menu-highlight-motion.ts b/app/ui/menu-highlight-motion.ts index 71a2dd53..1f4f99b0 100644 --- a/app/ui/menu-highlight-motion.ts +++ b/app/ui/menu-highlight-motion.ts @@ -1,5 +1,6 @@ -import { menuAnimationEnabled } from "./menu-animation-pref"; +import { menuAnimationDurationMs } from "./menu-animation-pref"; +/** At Normal menu animation speed; menuAnimationDurationMs scales it to the setting. */ export const MENU_HIGHLIGHT_DURATION_MS = 240; export type MenuHighlightAnimation = { dx: number; dy: number; startedAt: number; token: number; durationMs: number }; @@ -32,9 +33,10 @@ export class MenuHighlightMotion { fromX += this.animation.dx * remaining; fromY += this.animation.dy * remaining; } - const eligible = menuAnimationEnabled() && previous && previous.index !== index && this.fromIndex === previous.index && + const durationMs = menuAnimationDurationMs(MENU_HIGHLIGHT_DURATION_MS); + const eligible = durationMs > 0 && previous && previous.index !== index && this.fromIndex === previous.index && (previous.scroll === scroll || scrolling) && previous.width === width && previous.height === height; - this.animation = eligible ? { dx: Math.round(fromX - x), dy: Math.round(fromY - y), startedAt: now, token: nextAnimationToken(), durationMs: MENU_HIGHLIGHT_DURATION_MS } : undefined; + this.animation = eligible ? { dx: Math.round(fromX - x), dy: Math.round(fromY - y), startedAt: now, token: nextAnimationToken(), durationMs } : undefined; this.fromIndex = null; this.previous = { index, scroll, x, y, width, height }; } diff --git a/app/ui/menu-scroll-motion.ts b/app/ui/menu-scroll-motion.ts index ec098007..e4c251a1 100644 --- a/app/ui/menu-scroll-motion.ts +++ b/app/ui/menu-scroll-motion.ts @@ -1,9 +1,10 @@ import { DrawExpression as E, ExprOp } from "../graphics/draw-expression"; -import { menuAnimationEnabled } from "./menu-animation-pref"; +import { menuAnimationDurationMs } from "./menu-animation-pref"; import { MENU_HIGHLIGHT_DURATION_MS, nextAnimationToken } from "./menu-highlight-motion"; /** Longest scroll, in pixels, that animates; longer jumps snap. */ export const MAX_ANIMATED_SCROLL = 96; +/** At Normal menu animation speed, like MENU_HIGHLIGHT_DURATION_MS. */ export const MENU_BOUNCE_DURATION_MS = 320; /** Fraction of a bounce spent moving out to the peak; the rest settles back. */ const BOUNCE_PEAK = 0.35; @@ -73,20 +74,21 @@ export class MenuScrollMotion { /** Record this paint's settled offset; returns the animation in flight, if any. */ paint(scroll: number, box: Box, now: number): MenuScrollAnimation | undefined { const previous = this.previous; - const enabled = menuAnimationEnabled(); + const scrollMs = menuAnimationDurationMs(MENU_HIGHLIGHT_DURATION_MS); const sameBox = !!previous && previous.box.x === box.x && previous.box.y === box.y && previous.box.width === box.width && previous.box.height === box.height; if (!previous || !sameBox || previous.scroll !== scroll) { const from = previous ? this.offsetAt(previous.scroll, now) : scroll; - const eligible = enabled && sameBox && this.navigated && from !== scroll && Math.abs(scroll - from) <= MAX_ANIMATED_SCROLL; + const eligible = scrollMs > 0 && sameBox && this.navigated && from !== scroll && Math.abs(scroll - from) <= MAX_ANIMATED_SCROLL; this.animation = eligible - ? { from, to: scroll, startedAt: now, token: nextAnimationToken(), durationMs: MENU_HIGHLIGHT_DURATION_MS } + ? { from, to: scroll, startedAt: now, token: nextAnimationToken(), durationMs: scrollMs } : undefined; this.previous = { scroll, box: { ...box } }; - } else if (this.bounceBy && enabled) { + } else if (this.bounceBy && scrollMs > 0) { const from = this.offsetAt(scroll, now); this.animation = Math.abs(scroll - from) <= MAX_ANIMATED_SCROLL - ? { from, peak: scroll + this.bounceBy, to: scroll, startedAt: now, token: nextAnimationToken(), durationMs: MENU_BOUNCE_DURATION_MS } + ? { from, peak: scroll + this.bounceBy, to: scroll, startedAt: now, token: nextAnimationToken(), + durationMs: menuAnimationDurationMs(MENU_BOUNCE_DURATION_MS) } : undefined; } this.navigated = false; diff --git a/app/ui/menu.ts b/app/ui/menu.ts index 4d56cc20..6414a270 100644 --- a/app/ui/menu.ts +++ b/app/ui/menu.ts @@ -1,8 +1,9 @@ import { G2_LENS_HEIGHT, G2_LENS_WIDTH, GrayImage, type UiFont } from "../graphics/image"; import { wrapText } from "../graphics/textwrap"; import { getDefaultSmallFont } from "../graphics/ui-fonts"; -import { getBooleanSetting } from "../native/settings-store"; +import { getStringSetting } from "../native/settings-store"; import { clamp } from "../util/numeric-util"; +import { normalizeAnimationSpeed } from "./animation-speed"; import { Layer, LayerContext, PaintBelow } from "./layers"; import { MENU_ANIMATION_KEY, setMenuAnimationReader } from "./menu-animation-pref"; import { Menu, MENU_HIGHLIGHT_FILL, MENU_HIGHLIGHT_STROKE } from "./menu-core"; @@ -12,7 +13,7 @@ import { LIST_ROW_TEXT_INSET, centeredTextY, lineStep, listRowHeight, menuTitleH // Menu and IconGrid consult this (through their motion classes) at each // paint; a SharedPreferences read, so changes apply to the next navigation. -setMenuAnimationReader(() => getBooleanSetting(MENU_ANIMATION_KEY, true)); +setMenuAnimationReader(() => normalizeAnimationSpeed(getStringSetting(MENU_ANIMATION_KEY, "normal"))); const DEFAULT_MENU_X = 8; const DEFAULT_MENU_Y = 8; diff --git a/tests/brightness-curve.test.cjs b/tests/brightness-curve.test.cjs index 1f81e744..0d4c2aa9 100644 --- a/tests/brightness-curve.test.cjs +++ b/tests/brightness-curve.test.cjs @@ -25,6 +25,7 @@ function settingsFixture(store = new Map()) { getBooleanSetting: (k, d) => store.get(k) ?? d, setBooleanSetting: (k, v) => store.set(k, v), }; if (id.includes('brightness-curve')) return require('../.test-build/app/g2/brightness-curve.js'); + if (id.includes('animation-speed')) return require('../.test-build/app/ui/animation-speed.js'); return { Layer: class {}, ASSISTANT_MODEL_CHOICES: [] }; }}; vm.runInNewContext(ts.transpileModule(fs.readFileSync('app/ui/dashboard-settings.ts', 'utf8'), { @@ -36,11 +37,11 @@ test('auto minimum defaults to 20 and preserves a saved preference', () => { assert.equal(settingsFixture().getBrightnessPreferences().minimum, 20); assert.equal(settingsFixture(new Map([['display.autoBrightnessMin', '25']])).getBrightnessPreferences().minimum, 25); }); -test('the screen fade setting switches the on/off fade between 280 ms and instant', () => { +test('the screen fade speed scales the 280 ms on/off fade, or makes it instant', () => { const api = settingsFixture(); assert.equal(api.getBrightnessPreferences().fadeMs, 280); - api.screenFadeSetting.set(false); - assert.equal(api.getBrightnessPreferences().fadeMs, 0); + const fadeAt = (speed) => { api.screenFadeSetting.set(speed); return api.getBrightnessPreferences().fadeMs; }; + assert.deepEqual(['very-fast', 'fast', 'normal', 'slow', 'disabled'].map(fadeAt), [56, 140, 280, 560, 0]); }); test('curve drafts preview exactly while brightness keeps the previous valid saved curve', () => { const store = new Map([['display.autoBrightnessCurve', '0:0,2:50,8:100']]); diff --git a/tests/brightness-picker.test.cjs b/tests/brightness-picker.test.cjs index a8a07672..c7df4740 100644 --- a/tests/brightness-picker.test.cjs +++ b/tests/brightness-picker.test.cjs @@ -27,7 +27,7 @@ const layers = load('app/ui/layers.ts', { '../native/frame-timings': { spanCurrent: (_name, paint) => paint() }, }); const menu = load('app/ui/menu.ts', { - './menu-animation-pref': require('../.test-build/app/ui/menu-animation-pref.js'), '../native/settings-store': { getBooleanSetting: (_key, fallback) => fallback }, + './menu-animation-pref': require('../.test-build/app/ui/menu-animation-pref.js'), './animation-speed': require('../.test-build/app/ui/animation-speed.js'), '../native/settings-store': { getStringSetting: (_key, fallback) => fallback }, './menu-highlight-motion': require('../.test-build/app/ui/menu-highlight-motion.js'), '../graphics/menu-scroll-list': require('../.test-build/app/graphics/menu-scroll-list.js'), './menu-scroll-motion': require('../.test-build/app/ui/menu-scroll-motion.js'), '../graphics/draw-expression': require('../.test-build/app/graphics/draw-expression.js'), '../graphics/image': graphics, '../graphics/ui-fonts': fonts, '../graphics/textwrap': textwrap, '../util/numeric-util': numeric, './gestures': gestures, './metrics': load('app/ui/metrics.ts'), diff --git a/tests/icon-grid.test.cjs b/tests/icon-grid.test.cjs index 1b7b00fb..634b9570 100644 --- a/tests/icon-grid.test.cjs +++ b/tests/icon-grid.test.cjs @@ -63,7 +63,8 @@ function loadIconGrid({ lastInputWasWatch = false } = {}) { const menu = load('app/ui/menu.ts', { ...common, './layers': {}, './menu-animation-pref': build('ui/menu-animation-pref'), - '../native/settings-store': { getBooleanSetting: (_key, fallback) => fallback }, + './animation-speed': build('ui/animation-speed'), + '../native/settings-store': { getStringSetting: (_key, fallback) => fallback }, }); const grid = load('app/ui/icon-grid.ts', { ...common, diff --git a/tests/menu-display-list.test.cjs b/tests/menu-display-list.test.cjs index 21ed8fc2..d3cbb6ac 100644 --- a/tests/menu-display-list.test.cjs +++ b/tests/menu-display-list.test.cjs @@ -18,7 +18,7 @@ const menuCore=load('app/ui/menu-core.ts',{ '../graphics/image':graphics,'./menu-highlight-motion': require('../.test-build/app/ui/menu-highlight-motion.js'), '../graphics/menu-scroll-list': require('../.test-build/app/graphics/menu-scroll-list.js'), './menu-scroll-motion': require('../.test-build/app/ui/menu-scroll-motion.js'), '../graphics/draw-expression': require('../.test-build/app/graphics/draw-expression.js'), }); const {MenuLayer}=load('app/ui/menu.ts',{ - './menu-animation-pref': require('../.test-build/app/ui/menu-animation-pref.js'), '../native/settings-store': { getBooleanSetting: (_key, fallback) => fallback }, + './menu-animation-pref': require('../.test-build/app/ui/menu-animation-pref.js'), './animation-speed': require('../.test-build/app/ui/animation-speed.js'), '../native/settings-store': { getStringSetting: (_key, fallback) => fallback }, '../graphics/image':graphics,'../graphics/textwrap':{},'../graphics/ui-fonts':{getDefaultSmallFont:()=>font}, '../util/numeric-util':{clamp:(n,a,b)=>Math.max(a,Math.min(b,n))},'./gestures':{}, './menu-highlight-motion': require('../.test-build/app/ui/menu-highlight-motion.js'), '../graphics/menu-scroll-list': require('../.test-build/app/graphics/menu-scroll-list.js'), './menu-scroll-motion': require('../.test-build/app/ui/menu-scroll-motion.js'), '../graphics/draw-expression': require('../.test-build/app/graphics/draw-expression.js'), @@ -110,3 +110,9 @@ test('shell modal carries its inner menu highlight animation instead of baking i assert.ok(row.y>before.y);assert.ok(row.presentation.displayList.timeline,'the slide stays a timed display list'); assert.ok(!image.withDrawsBaked(false).pixels.some(v=>v===255),'selected text is not baked into the modal surface'); }); +test('shell crop widens a fractional rect (TTF-measured status bar) to whole pixels',()=>{ + const {shellCrop}=require('../.test-build/app/graphics/shell-scene.js'),image=new graphics.GrayImage(576,288,7); + const crop=shellCrop(image,400.5,250,175.5,15,2); + assert.deepEqual([crop.x,crop.y,crop.image.width,crop.image.height],[400,250,176,15]); + assert.ok(crop.image.pixels.every(v=>v===7)); +}); diff --git a/tests/menu-scroll-animation.test.cjs b/tests/menu-scroll-animation.test.cjs index 2a06b4b2..f892bbd4 100644 --- a/tests/menu-scroll-animation.test.cjs +++ b/tests/menu-scroll-animation.test.cjs @@ -1,13 +1,13 @@ const test = require('node:test'); const assert = require('node:assert/strict'); const { Menu } = require('../.test-build/app/ui/menu-core.js'); -const { MENU_HIGHLIGHT_DURATION_MS } = require('../.test-build/app/ui/menu-highlight-motion.js'); +const { MenuHighlightMotion, MENU_HIGHLIGHT_DURATION_MS } = require('../.test-build/app/ui/menu-highlight-motion.js'); const { GrayImage } = require('../.test-build/app/graphics/image.js'); const { DrawOp, encodeDisplayList, readDisplayList } = require('../.test-build/app/graphics/display-list.js'); const { evaluate } = require('../.test-build/app/graphics/draw-expression.js'); const { DrawExpression: E } = require('../.test-build/app/graphics/draw-expression.js'); const { menuScrollList, slidingHighlightY } = require('../.test-build/app/graphics/menu-scroll-list.js'); -const { MENU_BOUNCE_DURATION_MS, scrollOffsetExpression } = require('../.test-build/app/ui/menu-scroll-motion.js'); +const { MenuScrollMotion, MENU_BOUNCE_DURATION_MS, scrollOffsetExpression } = require('../.test-build/app/ui/menu-scroll-motion.js'); const { encodePresentation } = require('../.test-build/app/graphics/presentation-wire.js'); const { setMenuAnimationReader } = require('../.test-build/app/ui/menu-animation-pref.js'); // Also consumed by FrameDisplayListTest.kt. @@ -197,9 +197,9 @@ test('a bounce during a scroll starts from the offset on screen', () => { assert.ok(offsets[0] < offsets[1], 'it starts where the scroll had got to, above its settled offset'); }); -test('with menu animation off, scrolls, slides and bounces snap', (t) => { - setMenuAnimationReader(() => false); - t.after(() => setMenuAnimationReader(() => true)); +test('with menu animation disabled, scrolls, slides and bounces snap', (t) => { + setMenuAnimationReader(() => 'disabled'); + t.after(() => setMenuAnimationReader(() => 'normal')); const timed = (image) => image.draws.filter((draw) => draw.presentation?.displayList?.timeline); const menu = inkMenu(); paint(menu, 1000); @@ -217,6 +217,23 @@ test('with menu animation off, scrolls, slides and bounces snap', (t) => { assert.equal(timed(paint(menu, 5000)).length, 0, 'no bounce'); }); +test('menu animation speed scales slide, scroll and bounce durations', (t) => { + t.after(() => setMenuAnimationReader(() => 'normal')); + for (const [speed, factor] of [['very-fast', 5], ['fast', 2], ['normal', 1], ['slow', 0.5]]) { + setMenuAnimationReader(() => speed); + const highlight = new MenuHighlightMotion(); + highlight.paint(0, 0, 10, 20, 100, 20, 0); + highlight.navigate(0, false); + assert.equal(highlight.paint(1, 0, 10, 40, 100, 20, 100).durationMs, MENU_HIGHLIGHT_DURATION_MS / factor, speed); + const scroll = new MenuScrollMotion(); + scroll.paint(0, BOX, 0); + scroll.navigate(false); + assert.equal(scroll.paint(20, BOX, 100).durationMs, MENU_HIGHLIGHT_DURATION_MS / factor, speed); + scroll.bounce(8); + assert.equal(scroll.paint(20, BOX, 1000).durationMs, MENU_BOUNCE_DURATION_MS / factor, speed); + } +}); + test('scroll lists survive the bridge with animated copy coordinates', () => { const strip = { width: 2, height: 4, pixels: Uint8Array.of(17, 34, 51, 68, 85, 102, 119, 136) }; const timeline = { from: 0, to: 2, startedAt: 1000, token: 7, durationMs: MENU_HIGHLIGHT_DURATION_MS }; diff --git a/tests/music-settings.test.cjs b/tests/music-settings.test.cjs index d40b3f9d..3b6223d8 100644 --- a/tests/music-settings.test.cjs +++ b/tests/music-settings.test.cjs @@ -155,7 +155,7 @@ test('Music settings keeps toggles and selection when a new app arrives and supp '../util/numeric-util': { clamp: (n, lo, hi) => Math.max(lo, Math.min(hi, n)) }, './menu-highlight-motion': require('../.test-build/app/ui/menu-highlight-motion.js'), '../graphics/menu-scroll-list': require('../.test-build/app/graphics/menu-scroll-list.js'), './menu-scroll-motion': require('../.test-build/app/ui/menu-scroll-motion.js'), '../graphics/draw-expression': require('../.test-build/app/graphics/draw-expression.js'), './metrics': load('app/ui/metrics.ts'), './gestures': {}, - './menu-animation-pref': require('../.test-build/app/ui/menu-animation-pref.js'), '../native/settings-store': { getBooleanSetting: (_key, fallback) => fallback }, + './menu-animation-pref': require('../.test-build/app/ui/menu-animation-pref.js'), './animation-speed': require('../.test-build/app/ui/animation-speed.js'), '../native/settings-store': { getStringSetting: (_key, fallback) => fallback }, }; deps['./menu-core'] = load('app/ui/menu-core.ts', (name) => deps[name]); const menu = load('app/ui/menu.ts', (name) => deps[name]); diff --git a/tests/notification-filter.test.cjs b/tests/notification-filter.test.cjs index 4fafbe1b..2c266f19 100644 --- a/tests/notification-filter.test.cjs +++ b/tests/notification-filter.test.cjs @@ -86,7 +86,7 @@ function ui(fontSize = 12) { '../util/render-freshness': { renderPassAllowsStaleData: () => false }, './menu-highlight-motion': require('../.test-build/app/ui/menu-highlight-motion.js'), '../graphics/menu-scroll-list': require('../.test-build/app/graphics/menu-scroll-list.js'), './menu-scroll-motion': require('../.test-build/app/ui/menu-scroll-motion.js'), '../graphics/draw-expression': require('../.test-build/app/graphics/draw-expression.js'), './metrics': load('app/ui/metrics.ts'), - './menu-animation-pref': require('../.test-build/app/ui/menu-animation-pref.js'), '../native/settings-store': { getBooleanSetting: (_key, fallback) => fallback }, + './menu-animation-pref': require('../.test-build/app/ui/menu-animation-pref.js'), './animation-speed': require('../.test-build/app/ui/animation-speed.js'), '../native/settings-store': { getStringSetting: (_key, fallback) => fallback }, './gestures': {}, }; const requireModule = (name) => { diff --git a/tests/settings-panel.test.cjs b/tests/settings-panel.test.cjs index 0a6b2448..e846488a 100644 --- a/tests/settings-panel.test.cjs +++ b/tests/settings-panel.test.cjs @@ -22,7 +22,7 @@ const font = BdfFont.parse(fs.readFileSync(path.join(__dirname, '../app/fonts/te const textwrap = load('app/graphics/textwrap.ts', {}); const fonts = { getDefaultSmallFont: () => font }; const menu = load('app/ui/menu.ts', { - './menu-animation-pref': require('../.test-build/app/ui/menu-animation-pref.js'), '../native/settings-store': { getBooleanSetting: (_key, fallback) => fallback }, + './menu-animation-pref': require('../.test-build/app/ui/menu-animation-pref.js'), './animation-speed': require('../.test-build/app/ui/animation-speed.js'), '../native/settings-store': { getStringSetting: (_key, fallback) => fallback }, '../graphics/image': graphics, '../graphics/textwrap': textwrap, '../graphics/ui-fonts': fonts, '../util/numeric-util': { clamp: (n, lo, hi) => Math.max(lo, Math.min(hi, n)) }, './gestures': {}, './metrics': metrics, './menu-core': menuCore, From 66ca06f584ab20c800e3c3ac97d268f658322813 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 15:07:56 -0700 Subject: [PATCH 45/60] Refactor iOS glasses connection handling to shared code, fixing incompatible-version-detection and other error cases --- .../faceclaw/app/FaceclawBleCommunicator.kt | 2 + app/app.ios.css | 1 + app/g2/dashboard-controller.ts | 85 +++++--------- app/g2/ios-preview-controller.ts | 58 +++++++--- app/g2/reconnect-policy.ts | 13 +++ app/native/faceclaw-communicator.ios.ts | 5 +- app/native/faceclaw-communicator.ts | 5 +- app/phone-ui/main-page.ios.ts | 19 +++- .../faceclaw/app/g2protocol/BleProtocol.kt | 31 +++++- .../session/GlassesSessionControls.kt | 72 +++++++++--- .../g2protocol/session/GlassesSessionCore.kt | 49 +++++--- .../g2protocol/session/GlassesSessionSend.kt | 11 ++ .../com/faceclaw/app/ble/IosGlassesSession.kt | 2 + tests/ios-app-host.test.cjs | 1 + tests/ios-glanceboard.test.cjs | 1 + .../faceclaw/app/GlassesSessionCoreTest.kt | 105 +++++++++++++++++- 16 files changed, 341 insertions(+), 119 deletions(-) diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt index 9b6c9848..d7c24320 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt @@ -126,6 +126,8 @@ class FaceclawBleCommunicator(context: Context, rightAddress: String?, leftAddre fun setListener(listener: FaceclawBleCommunicatorListener?) = core.setListener(listener) + fun setRequiredFirmwareRevision(revision: Int) = core.setRequiredFirmwareRevision(revision) + fun start() { if (core.start()) { activeInstance = this diff --git a/app/app.ios.css b/app/app.ios.css index 121a6bf7..17bcf99b 100644 --- a/app/app.ios.css +++ b/app/app.ios.css @@ -174,6 +174,7 @@ Page.main-page { } .main-page .action-bar-title { font-size: 18; font-weight: bold; color: #ffffff; } .main-page .action-bar-status { font-size: 14; color: #ffffff; margin-right: 12; } +.main-page .action-bar-warning { font-size: 18; padding: 4 6; } .main-page .overflow-button { background-color: transparent; color: #ffffff; diff --git a/app/g2/dashboard-controller.ts b/app/g2/dashboard-controller.ts index f6f33b17..63548a57 100644 --- a/app/g2/dashboard-controller.ts +++ b/app/g2/dashboard-controller.ts @@ -20,7 +20,7 @@ import { openEvenAppSettings, readEvenAppNotificationState } from "../native/eve import { grayImageToPreviewSource } from "../native/gray-image-preview"; import { firmwareIncompatibilityMessage, hasCompatibleFirmware } from "./firmware-compat"; import { hasExtractedEvenHubFonts } from "./firmware-builder"; -import { resumeAutoReconnect, suppressAutoReconnect } from "./reconnect-policy"; +import { isHaltedSessionPhase, resumeAutoReconnect, suppressAutoReconnect } from "./reconnect-policy"; import { WearRemote, type WearRemoteInputKind } from "./wear-remote"; /** Who a synthetic (non-firmware) input stands for. */ @@ -361,11 +361,10 @@ class DashboardController { private openAppsRestored = false; private suppressOpenAppsPersist = false; // connect() is a long sequence of awaits against this.communicator; the - // incompatible-firmware disconnect must not tear that communicator down + // halted-session disconnect must not tear that communicator down // underneath it, so it waits for this to clear. private connectRunning = false; - private incompatibleDisconnectPending = false; - private unpairedDisconnectPending = false; + private haltedDisconnectPending = false; constructor() { const sharedActions = { @@ -1456,12 +1455,12 @@ class DashboardController { await communicator.configureBrightness(getBrightnessPreferences()); this.offState = communicator.onStateChange((state) => { if (state.phase !== "connected") resetRingInputFilter(); - if (state.phase === "unpaired") { - // Java parked its retry loop: an arm's Android bond is gone, so - // every redial would fail the same way until the user re-pairs. - // Tear down into the manual-disconnected state and keep the - // re-pair instruction as the visible status. - this.scheduleUnpairedDisconnect(state.status); + if (isHaltedSessionPhase(state.phase)) { + // The shared session parked its retry loop (an arm's Android bond + // is gone, or the firmware can't run Faceclaw), so every redial + // would fail the same way. Tear down into the manual-disconnected + // state and keep the session's explanation as the visible status. + this.scheduleHaltedSessionDisconnect(state.status); return; } const mappedPhase = @@ -1604,6 +1603,8 @@ class DashboardController { }); this.ensureWearStateTracking(); } + // The shared session halts on incompatible firmware by itself + // ("incompatible-firmware" phase); this only explains why. if (warning !== this.firmwareWarningMessage) { this.firmwareWarningMessage = warning; if (warning) { @@ -1611,9 +1612,6 @@ class DashboardController { } this.emit(); } - if (warning) { - this.scheduleIncompatibleFirmwareDisconnect(); - } }); // The Music and Nightscout apps subscribe to their bridges directly and // repaint their own windows, so bridge updates need no controller action. @@ -1711,61 +1709,28 @@ class DashboardController { } /** - * Incompatible firmware means every message Faceclaw sends is one the - * glasses may misinterpret, and a live session fights the flash flow's own - * connection. Drop the connection (without the CFW-directed cleanup - * messages) and hold in the manual-disconnected state until the user - * connects explicitly or installs the custom firmware. + * The shared session parked its retry loop (an arm's Android bond is gone, + * or the glasses run firmware Faceclaw can't use; see isHaltedSessionPhase) + * and dropped both arms. Finish the teardown (without the CFW-directed + * cleanup messages, which incompatible firmware would misread) and hold in + * the manual-disconnected state until the user connects explicitly, + * re-pairs or installs the custom firmware, keeping [message] from the + * session as the status the user sees. */ - private scheduleIncompatibleFirmwareDisconnect(): void { - if (this.incompatibleDisconnectPending) return; - this.incompatibleDisconnectPending = true; + private scheduleHaltedSessionDisconnect(message: string): void { + if (this.haltedDisconnectPending) return; + this.haltedDisconnectPending = true; const attempt = () => { - // Firmware info can arrive while connect() is still mid-flight; let it + // The halt can be reported while connect() is still mid-flight; let it // finish so the teardown doesn't race its surface setup. if (this.connectRunning) { setTimeout(attempt, 200); return; } - this.incompatibleDisconnectPending = false; + this.haltedDisconnectPending = false; if (this.phase === "disconnected" || this.phase === "disconnecting") { // The session ended some other way; still stop auto-reconnect from - // re-dialing glasses we know can't run Faceclaw. - suppressAutoReconnect(); - return; - } - this.appendLog( - "Disconnecting: the glasses firmware is incompatible. Auto-reconnect is disabled until you connect manually or install the custom firmware.", - ); - void this.disconnect({ skipFirmwareCleanup: true }) - .then(() => this.setStatus("Disconnected (incompatible firmware).")) - .catch((error) => { - this.appendLog(`incompatible-firmware disconnect failed: ${this.formatError(error)}`); - }); - }; - setTimeout(attempt, 0); - } - - /** - * A connect attempt found an arm whose Android bond is missing, so the Java - * worker stopped retrying. Drop into the manual-disconnected state (no - * auto-reconnect: it would just fail again) and leave the re-pair - * instruction from Java as the status the user sees. - */ - private scheduleUnpairedDisconnect(message: string): void { - if (this.unpairedDisconnectPending) return; - this.unpairedDisconnectPending = true; - const attempt = () => { - // The unpaired report can arrive while connect() is still mid-flight; - // let it finish so the teardown doesn't race its surface setup. - if (this.connectRunning) { - setTimeout(attempt, 200); - return; - } - this.unpairedDisconnectPending = false; - if (this.phase === "disconnected" || this.phase === "disconnecting") { - // The session ended some other way; still stop auto-reconnect from - // re-dialing glasses that are no longer paired. + // re-dialing glasses that would fail the same way. suppressAutoReconnect(); this.setStatus(message); return; @@ -1774,7 +1739,7 @@ class DashboardController { void this.disconnect({ skipFirmwareCleanup: true }) .then(() => this.setStatus(message)) .catch((error) => { - this.appendLog(`unpaired disconnect failed: ${this.formatError(error)}`); + this.appendLog(`halted-session disconnect failed: ${this.formatError(error)}`); }); }; setTimeout(attempt, 0); diff --git a/app/g2/ios-preview-controller.ts b/app/g2/ios-preview-controller.ts index 1d4bf056..b8a73e53 100644 --- a/app/g2/ios-preview-controller.ts +++ b/app/g2/ios-preview-controller.ts @@ -24,6 +24,8 @@ import { GlanceHost, type GlanceDisplay } from './glance-host' import { createLockScreenImage, LOCK_SCREEN_SURFACE_ID } from './lock-screen' import { OsEventTypeList } from './events' import { loadDeviceAddresses } from './device-addresses' +import { firmwareIncompatibilityMessage, hasCompatibleFirmware } from './firmware-compat' +import { isHaltedSessionPhase, suppressAutoReconnect } from './reconnect-policy' import { deviceAddressError } from './ios-peripheral-identity' import { createLauncherWindow, LAUNCHER_SURFACE_ID } from '../apps/launcher/launcher-app' import { ALL_APPS } from '../apps/all-apps' @@ -55,7 +57,9 @@ const FRAME_TRANSMIT_BACKPRESSURE_TIMEOUT_MS = 2000 export type SessionPhase = 'disconnected' | 'connecting' | 'connected' | 'retrying' | 'disconnecting' | 'error' export type SessionState = { phase: SessionPhase; status: string; battery: number | null; charging: boolean | null; - ring: boolean; frames: number; capabilities: string; leftVersion: string; rightVersion: string } + ring: boolean; frames: number; capabilities: string; leftVersion: string; rightVersion: string; + /** Why the connected firmware can't run Faceclaw (firmware-compat.ts), or '' when it can or is unknown. */ + firmwareWarning: string } function ancsCapable(capabilities: string): boolean { return /^Faceclaw\/(\d+)/.test(capabilities) && Number(capabilities.split('/')[1]) >= ANCS_FIRMWARE_VERSION @@ -72,7 +76,7 @@ export class IosPreviewController { private communicator: FaceclawCommunicatorBridge | null = null private readonly startedCommunicators = new WeakSet() state: SessionState = { phase: 'disconnected', status: 'Preview only', battery: null, charging: null, ring: false, - frames: 0, capabilities: '', leftVersion: '', rightVersion: '' } + frames: 0, capabilities: '', leftVersion: '', rightVersion: '', firmwareWarning: '' } private notifications: AncsClient | null = null private readonly sessionOffs: (() => void)[] = [] private stopping: Promise | null = null @@ -81,6 +85,8 @@ export class IosPreviewController { private connecting = false private sessionCreated = false private wearDetectionRequested = false + /** The last firmware report was Faceclaw's firmware at the required revision. */ + private firmwareCompatible = false private readonly glanceDisplay: GlanceDisplay = { configureSurface: async (id, options) => { await this.display?.configureSurface(id, options) }, setSurfaceVisible: async (id, visible) => { await this.display?.setSurfaceVisible(id, visible); this.schedulePreviewUpdate() }, @@ -346,7 +352,7 @@ export class IosPreviewController { if (!enabled) this.setGlassesLocked(false) else { if (this.phoneLocked && this.glassesWorn === false) this.setGlassesLocked(true) - if (this.communicator && this.state.phase === 'connected') + if (this.communicator && this.state.phase === 'connected' && this.firmwareCompatible) void this.communicator.enableWearDetectionAndRequestState().catch(error => this.fail(error)) } } @@ -682,7 +688,8 @@ export class IosPreviewController { this.connecting = true this.sessionCreated = true try { - this.state = { ...this.state, capabilities: '', leftVersion: '', rightVersion: '', battery: null, charging: null, ring: false } + this.state = { ...this.state, capabilities: '', leftVersion: '', rightVersion: '', firmwareWarning: '', battery: null, charging: null, ring: false } + this.firmwareCompatible = false this.update('connecting', 'Finding configured devices…') let identifiers try { identifiers = await resolveIosPeripherals(addresses) } @@ -735,10 +742,19 @@ export class IosPreviewController { }), communicator.onFirmwareInfo(info => { if (this.communicator !== communicator) return + this.logBluetooth(`Firmware: L=${info.leftVersion || '?'} R=${info.rightVersion || '?'}` + + (info.extension ? ` ext="${info.extension}"` : ' (no firmware extension string)')) + // The shared session halts on incompatible firmware by itself ("incompatible-firmware" + // phase, handled in handleSessionState); this only records why, for the warning. + const firmwareWarning = firmwareIncompatibilityMessage(info) ?? '' + if (firmwareWarning && firmwareWarning !== this.state.firmwareWarning) this.logBluetooth(`Firmware compatibility warning: ${firmwareWarning}`) + this.firmwareCompatible = !firmwareWarning && hasCompatibleFirmware(info) this.state = { ...this.state, leftVersion: info.leftVersion || this.state.leftVersion, - rightVersion: info.rightVersion || this.state.rightVersion, capabilities: info.extension || this.state.capabilities } + rightVersion: info.rightVersion || this.state.rightVersion, capabilities: info.extension || this.state.capabilities, + firmwareWarning } if (this.active) this.onConnectionState({ ...this.state }) this.syncNotifications(communicator) + this.ensureWearDetection(communicator) }), communicator.onFrameMetrics(() => { if (this.communicator !== communicator) return @@ -766,21 +782,31 @@ export class IosPreviewController { // Registering the listener makes the Kotlin session report its current state, which is // "disconnected" before start(); that must not be mistaken for the session ending. if (!this.startedCommunicators.has(communicator)) return - const phase: SessionPhase = state.phase === 'charging' ? 'connected' : state.phase === 'unpaired' ? 'error' : state.phase - if (phase === 'connected' && this.state.phase !== 'connected') { - this.state = { ...this.state, frames: this.state.frames } - if (!this.wearDetectionRequested) { - this.wearDetectionRequested = true - void communicator.enableWearDetectionAndRequestState().catch(error => this.logBluetooth(`Wear detection: ${String(error)}`)) - } - } + // The shared session parked its retry loop (an arm unpaired, or firmware Faceclaw can't + // run): a redial would fail the same way, so stay down until the user connects explicitly + // (or re-pairs / installs the custom firmware, which lift the suppression). + if (isHaltedSessionPhase(state.phase)) suppressAutoReconnect() + const phase: SessionPhase = state.phase === 'charging' ? 'connected' : isHaltedSessionPhase(state.phase) ? 'error' : state.phase + // Wear state is a per-transport snapshot: ask again on every new session. + if (phase !== 'connected') this.wearDetectionRequested = false this.update(phase, state.status) - if (phase === 'connected') this.syncNotifications(communicator) - else if ((phase === 'disconnected' || phase === 'error') && !this.stopping) { - // The session ended on its own (retries exhausted, an arm unpaired): release it and go headless. + if (phase === 'connected') { + this.syncNotifications(communicator) + this.ensureWearDetection(communicator) + } else if ((phase === 'disconnected' || phase === 'error') && !this.stopping) { + // The session ended on its own (an arm unpaired, incompatible firmware): release it and go headless. void this.disconnect(state.status) } } + /** + * Wear reports come from the custom firmware, so like Android only ask once the session + * is up and the firmware is confirmed compatible (stock firmware never hears the query). + */ + private ensureWearDetection(communicator: FaceclawCommunicatorBridge): void { + if (this.wearDetectionRequested || !this.firmwareCompatible || this.state.phase !== 'connected') return + this.wearDetectionRequested = true + void communicator.enableWearDetectionAndRequestState().catch(error => this.logBluetooth(`Wear detection: ${String(error)}`)) + } private handleRingEvent(input: RawInputEvent): void { this.inputQueue = this.inputQueue.then(async () => { if (this.state.phase !== 'connected') return diff --git a/app/g2/reconnect-policy.ts b/app/g2/reconnect-policy.ts index a7390f89..4e5f2605 100644 --- a/app/g2/reconnect-policy.ts +++ b/app/g2/reconnect-policy.ts @@ -24,3 +24,16 @@ export function resumeAutoReconnect(): void { export function isAutoReconnectSuppressed(): boolean { return suppressed; } + +/** + * Communicator phases in which the shared session core has parked its retry + * loop for good: "unpaired" (an arm's OS bond is gone) and + * "incompatible-firmware" (the glasses run firmware this app can't use). + * Redialing would fail the same way, so both platform controllers tear the + * session down into the manual-disconnected state on these. + */ +export type HaltedSessionPhase = "unpaired" | "incompatible-firmware"; + +export function isHaltedSessionPhase(phase: string): phase is HaltedSessionPhase { + return phase === "unpaired" || phase === "incompatible-firmware"; +} diff --git a/app/native/faceclaw-communicator.ios.ts b/app/native/faceclaw-communicator.ios.ts index eef18120..a6b99e7f 100644 --- a/app/native/faceclaw-communicator.ios.ts +++ b/app/native/faceclaw-communicator.ios.ts @@ -1,6 +1,6 @@ import type { RingInput } from "../g2/ring-input"; import { File, knownFolders, path, type ImageSource } from "@nativescript/core"; -import { type FirmwareInfo } from "../g2/firmware-compat"; +import { REQUIRED_FACECLAW_FIRMWARE_VERSION, type FirmwareInfo } from "../g2/firmware-compat"; import { type CompassEvent } from "./compass-types"; import { fromData, toData } from "./kotlin-data"; import { previewPixels } from "./ios-graphics"; @@ -23,6 +23,7 @@ export type CommunicatorPhase = | "charging" | "retrying" | "unpaired" + | "incompatible-firmware" | "disconnecting"; export type CommunicatorState = { @@ -203,6 +204,8 @@ export class FaceclawCommunicatorBridge { String(addresses.left ?? "").toUpperCase(), String(addresses.ring ?? "").toUpperCase(), ); + // The shared session halts on any other firmware ("incompatible-firmware"). + this.communicator.setRequiredFirmwareRevisionRevision(REQUIRED_FACECLAW_FIRMWARE_VERSION); this.listenerProxy = SessionListener.new() as SessionListener; this.listenerProxy.bridge = this; this.communicator.setListenerListener(this.listenerProxy); diff --git a/app/native/faceclaw-communicator.ts b/app/native/faceclaw-communicator.ts index 0f8c2771..f6bc84f1 100644 --- a/app/native/faceclaw-communicator.ts +++ b/app/native/faceclaw-communicator.ts @@ -14,6 +14,7 @@ export type CommunicatorPhase = | "charging" | "retrying" | "unpaired" + | "incompatible-firmware" | "disconnecting"; export type CommunicatorState = { @@ -34,7 +35,7 @@ export type FrameMetrics = { tileCount: number; }; -import { type FirmwareInfo } from "../g2/firmware-compat"; +import { REQUIRED_FACECLAW_FIRMWARE_VERSION, type FirmwareInfo } from "../g2/firmware-compat"; export type { FirmwareInfo }; @@ -169,6 +170,8 @@ export class FaceclawCommunicatorBridge { addresses.left, addresses.ring ?? "", ); + // The shared session halts on any other firmware ("incompatible-firmware"). + this.communicator.setRequiredFirmwareRevision(REQUIRED_FACECLAW_FIRMWARE_VERSION); this.listenerProxy = new com.faceclaw.app.FaceclawBleCommunicatorListener({ onStateChange: (phase: string, status: string) => { const state = { diff --git a/app/phone-ui/main-page.ios.ts b/app/phone-ui/main-page.ios.ts index 3419dfc0..00c15893 100644 --- a/app/phone-ui/main-page.ios.ts +++ b/app/phone-ui/main-page.ios.ts @@ -20,7 +20,7 @@ export function createMainPage(): Page { root.rows = 'auto,*' page.content = root const header = new GridLayout() - header.columns = '*,auto,auto'; header.className = 'main-header' + header.columns = '*,auto,auto,auto'; header.className = 'main-header' const title = new Label() title.text = 'Faceclaw'; title.className = 'action-bar-title' header.addChild(title) @@ -29,10 +29,17 @@ export function createMainPage(): Page { state.verticalAlignment = 'middle' state.on('tap', () => { void openDevices() }) GridLayout.setColumn(state, 1); header.addChild(state) + // Android's warning triangle: shown while the glasses report firmware Faceclaw can't run. + const warning = new Label() + warning.text = '\u26A0\uFE0F'; warning.className = 'action-bar-warning' + warning.accessibilityLabel = 'Attention needed'; warning.verticalAlignment = 'middle' + warning.visibility = 'collapse' + warning.on('tap', () => { void showFirmwareWarning() }) + GridLayout.setColumn(warning, 2); header.addChild(warning) const overflow = new Button() overflow.text = '⋮'; overflow.accessibilityLabel = 'More options'; overflow.className = 'overflow-button' overflow.on('tap', () => openMenu()) - GridLayout.setColumn(overflow, 2); header.addChild(overflow); root.addChild(header) + GridLayout.setColumn(overflow, 3); header.addChild(overflow); root.addChild(header) const body = new GridLayout() GridLayout.setRow(body, 1); root.addChild(body) const mirror = new Image() @@ -60,6 +67,7 @@ export function createMainPage(): Page { }, connection => { state.text = ({ connected: 'Connected', disconnected: 'Preview', connecting: 'Connecting', retrying: 'Reconnecting', disconnecting: 'Disconnecting', error: 'Failed' })[connection.phase] + warning.visibility = connection.firmwareWarning ? 'visible' : 'collapse' }, session => { keyboardModel.setSession(session) controls.visibility = session ? 'collapse' : 'visible' @@ -114,6 +122,13 @@ export function createMainPage(): Page { } page.ios.presentViewControllerAnimatedCompletion(menu, true, null) } + async function showFirmwareWarning(): Promise { + const message = controller.connectionState?.firmwareWarning + if (!message) return + const install = await Dialogs.confirm({ title: 'Attention needed', message, + okButtonText: 'Install custom firmware', cancelButtonText: 'Close' }) + if (install) await navigateDevicePage('phone-ui/onboarding-flash-page', { mode: 'install', fromOnboarding: false }) + } async function openDevices(): Promise { const connected = ['connected', 'connecting', 'retrying'].includes(controller.connectionState?.phase ?? '') const choice = await Dialogs.action({ title: 'Connection status', message: controller.connectionState?.status ?? 'Preview only', cancelButtonText: 'Cancel', diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/BleProtocol.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/BleProtocol.kt index cf3c2b3b..2f7a6d1b 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/BleProtocol.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/BleProtocol.kt @@ -791,8 +791,8 @@ class BleProtocol { * are fields 5/6 of the deviceReceiveRequestFromApp submessage (field 4); Faceclaw's custom * firmware additionally appends top-level field 100 with its revision ("Faceclaw/"; * older builds sent "EVENCFW/ "), which stock firmware never sends. Returns - * null when the ack carries none of it. Compatibility is judged on the TS side - * (app/g2/firmware-compat.ts); Java only needs to know whether the firmware is ours at all. + * null when the ack carries none of it. The session halts when [FirmwareInfo.isCompatible] + * fails; the user-facing classification and messages live in app/g2/firmware-compat.ts. */ @JvmStatic fun parseSettingsFirmwareInfo(pb: ByteArray): FirmwareInfo? { @@ -1471,11 +1471,34 @@ class BleProtocol { /** * True when the glasses run Faceclaw's custom firmware (any revision). Whether the revision - * is the one this app needs is decided on the TS side, which disconnects on a mismatch; - * this only guards the private modes against stock or third-party firmware in the meantime. + * is one this app can run is [isCompatible]; this only guards the private modes against + * stock or third-party firmware. */ fun isFaceclawFirmware(): Boolean { return extension.trim().startsWith(FACECLAW_EXTENSION_PREFIX) } + + /** + * The revision from a "Faceclaw/" extension, or -1 for stock, pre-revision + * ("EVENCFW/...") and third-party firmware. Mirrors parseFirmwareExtension in + * app/g2/firmware-compat.ts. + */ + fun faceclawRevision(): Int { + val text = extension.trim() + if (!text.startsWith(FACECLAW_EXTENSION_PREFIX)) { + return -1 + } + val digits = text.substring(FACECLAW_EXTENSION_PREFIX.length).trimStart().takeWhile { it in '0'..'9' } + return digits.toIntOrNull() ?: -1 + } + + /** + * True when this is Faceclaw's firmware at [requiredRevision] or newer (revisions only add + * to the contract). Mirrors hasCompatibleFirmware in app/g2/firmware-compat.ts. + */ + fun isCompatible(requiredRevision: Int): Boolean { + val revision = faceclawRevision() + return revision >= 0 && revision >= requiredRevision + } } } diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionControls.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionControls.kt index 4d837263..882dfff8 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionControls.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionControls.kt @@ -359,23 +359,7 @@ internal fun GlassesSessionCore.firstUnpairedArm(): String? { */ internal fun GlassesSessionCore.handleUnpairedFailure(address: String) { logError("Connect failed and $address is not paired; suspending reconnect") - monitor.withLock { - reconnectHalted = true - sessionReady = false - fixedLayoutCreated = false - startupProbePending = false - shutdownRequested = false - chargingMode = false - imageRetryAfterMs = 0 - displayedFingerprint = "" - faceclawWakePendingNonce = -1 - lastFaceclawWakeLeaseQueuedAtMs = 0 - faceclawWakeControlSentCount = 0 - clearAllMessagesLocked("arm not paired: $address") - reconnectAfterMs = Long.MAX_VALUE - link.disconnect(rightAddress) - link.disconnect(leftAddress) - } + monitor.withLock { haltReconnectLocked("arm not paired: $address") } if (!userDisconnectRequested) { setStateDisplay( "unpaired", @@ -386,6 +370,59 @@ internal fun GlassesSessionCore.handleUnpairedFailure(address: String) { interruptibleSleep.interrupt() } +/** + * The settings ack reported firmware this app can't run: stock, another + * project's, or an older Faceclaw revision (see + * [BleProtocol.FirmwareInfo.isCompatible]). Everything else this session + * would send is a private-mode message the glasses may misread (stock leaves + * them unacked until the CFW retry limit drops the link), and a redial would + * only find the same firmware, so park the worker loop like + * [handleUnpairedFailure], without any cleanup messages. The firmware info + * was emitted just before this, so the TS side can explain the mismatch and + * offer the custom-firmware install. + */ +internal fun GlassesSessionCore.handleIncompatibleFirmware() { + val info = monitor.withLock { + val pending = incompatibleFirmware + incompatibleFirmware = null + pending + } ?: return + logError("Glasses report incompatible firmware L=" + info.leftVersion + " R=" + info.rightVersion + + " ext=\"" + info.extension + "\" (need Faceclaw/" + requiredFirmwareRevision + "); suspending reconnect") + monitor.withLock { haltReconnectLocked("incompatible firmware") } + if (!userDisconnectRequested) { + setStateDisplay( + "incompatible-firmware", + "The glasses firmware is not compatible with this version of Faceclaw." + + " Install the custom firmware, then connect." + ) + } + interruptibleSleep.interrupt() +} + +/** + * Park the worker loop for good: drop both arms, discard queued traffic and + * stop redialing. Only an explicit connect (start() on a fresh communicator) + * tries again. + */ +internal fun GlassesSessionCore.haltReconnectLocked(reason: String) { + reconnectHalted = true + sessionReady = false + fixedLayoutCreated = false + startupProbePending = false + shutdownRequested = false + chargingMode = false + imageRetryAfterMs = 0 + displayedFingerprint = "" + faceclawWakePendingNonce = -1 + lastFaceclawWakeLeaseQueuedAtMs = 0 + faceclawWakeControlSentCount = 0 + clearAllMessagesLocked(reason) + reconnectAfterMs = Long.MAX_VALUE + link.disconnect(rightAddress) + link.disconnect(leftAddress) +} + /** * Tear the session down and schedule a reconnect. [displayStatus], when given, replaces the * generic "Reconnecting after " status line. @@ -454,6 +491,7 @@ internal fun GlassesSessionCore.resetSessionStateLocked() { reconnectAfterMs = 0 consecutiveReconnects = 0 reconnectHalted = false + incompatibleFirmware = null ringReconnectAfterMs = 0 lastAckAtMs = 0 lastIncomingAtMs = 0 diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt index a65cca61..3e37a8a0 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt @@ -127,10 +127,16 @@ class GlassesSessionCore( internal val audioMonitorListeners = CopyOnWriteList(platform) @Volatile internal var running = false @Volatile internal var userDisconnectRequested = false - // Set when a connect attempt failed while an arm's OS bond is gone: - // retrying is pointless until the user re-pairs, so the worker loop parks + // Set when a connect attempt failed while an arm's OS bond is gone, or the + // glasses reported firmware this app can't run: retrying is pointless until + // the user re-pairs or installs the custom firmware, so the worker loop parks // instead of redialing. Cleared by start() (a fresh explicit connect). @Volatile internal var reconnectHalted = false + // The Faceclaw firmware revision this app needs; see setRequiredFirmwareRevision. + @Volatile internal var requiredFirmwareRevision = 0 + // Firmware info from a settings ack that failed requiredFirmwareRevision. While + // set, driveSession sends nothing; the worker loop halts on it (handleIncompatibleFirmware). + internal var incompatibleFirmware: BleProtocol.FirmwareInfo? = null internal var phase = "disconnected" internal var status = "Disconnected." @@ -179,9 +185,9 @@ class GlassesSessionCore( /** * The last firmware-info read said the glasses run Faceclaw's custom * firmware. Gates the private modes (cleanup, resource cache, ...) so stock - * or third-party firmware never sees them; the TS side checks the actual - * revision and disconnects on a mismatch, so no per-feature gating is - * needed here. + * or third-party firmware never sees them; a revision mismatch halts the + * session (handleIncompatibleFirmware), so no per-feature gating is needed + * here. */ internal var customFirmwareDetected = false internal val brightnessPolicy = BrightnessPolicy() @@ -230,7 +236,6 @@ class GlassesSessionCore( internal var phoneLockState = -1 internal var lastPhoneLockCheckAtMs = 0L internal var audioCaptureActive = false - internal var firmwareInfoQueried = false // Glasses are in the charging case: nobody is wearing them, so display // communication pauses and only battery polls flow (see driveSession). internal var chargingMode = false @@ -371,6 +376,15 @@ class GlassesSessionCore( emitPhoneLockStateIfChanged(true) } + /** + * The Faceclaw firmware revision this app needs (REQUIRED_FACECLAW_FIRMWARE_VERSION in + * app/g2/firmware-compat.ts; the TS bridges pass it in before start()). A settings ack + * reporting anything else halts the session. 0 accepts any Faceclaw revision. + */ + fun setRequiredFirmwareRevision(revision: Int) { + requiredFirmwareRevision = revision + } + /** Start the worker (through the host); false when it was already running. */ fun start(): Boolean { monitor.withLock { @@ -380,6 +394,7 @@ class GlassesSessionCore( running = true userDisconnectRequested = false reconnectHalted = false + incompatibleFirmware = null shutdownRequested = false host.startWorker { run() } return true @@ -1297,6 +1312,10 @@ class GlassesSessionCore( break } emitPhoneLockStateIfChanged(false) + if (monitor.withLock { incompatibleFirmware != null }) { + handleIncompatibleFirmware() + continue + } if (!sessionReady) { if (reconnectHalted) { interruptibleSleep.sleep(ConnectionOptions.IDLE_SLEEP_MS.toLong()) @@ -1760,16 +1779,16 @@ class GlassesSessionCore( setStateDisplay("connected", "Connected.") logLine("session ready") monitor.withLock { - // Query settings promptly on the first session so firmware + // Query settings at the start of every session so firmware // version/extension (and battery) arrive without waiting for - // the input-quiet battery poll. The settings response doubles as - // the firmware-compatibility check surfaced during onboarding. - if (!firmwareInfoQueried) { - firmwareInfoQueried = true - lastBatteryRefreshAtMs = now() - pendingMessages.addLast(createBatteryQueryMessageLocked()) - logLine("queue settings query for firmware info") - } + // the input-quiet battery poll. The reply is the firmware- + // compatibility check, and the drive loop only creates the + // layout once the queue is empty, so it lands before any + // custom-firmware traffic -- including after a reconnect to + // glasses that were reflashed in the meantime. + lastBatteryRefreshAtMs = now() + pendingMessages.addLast(createBatteryQueryMessageLocked()) + logLine("queue settings query for firmware info") } tryConnectRing("initial") } catch (t: Throwable) { diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt index a7548611..6930eb5d 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionSend.kt @@ -52,6 +52,10 @@ internal fun GlassesSessionCore.driveSession(): Long { maybeFinishNoChangeDesiredFrame() monitor.withLock { + if (incompatibleFirmware != null) { + // Incompatible firmware: hand back to the worker loop to halt. + return 0 + } drainCfwAcknowledgementsLocked() if (cfwCleanupDelivered) { /* Successful mode 11 must be the last Faceclaw write. Drop @@ -1007,6 +1011,13 @@ internal fun GlassesSessionCore.createBatteryQueryMessageLocked(): OutboundMessa if (firmwareInfo != null) { customFirmwareDetected = firmwareInfo.isFaceclawFirmware() emitFirmwareInfo(firmwareInfo) + if (sessionReady && !firmwareInfo.isCompatible(requiredFirmwareRevision)) { + // Halting tears down the link, which belongs on the worker thread + // (this runs on the notification path); until it does, driveSession + // sends nothing more. + incompatibleFirmware = firmwareInfo + interruptibleSleep.interrupt() + } } } message.onTimeout = MessageCallback { diff --git a/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/ble/IosGlassesSession.kt b/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/ble/IosGlassesSession.kt index cc84dac9..761b8185 100644 --- a/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/ble/IosGlassesSession.kt +++ b/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/ble/IosGlassesSession.kt @@ -70,6 +70,8 @@ class IosGlassesSession internal constructor( fun setListener(listener: FaceclawBleCommunicatorListener?) = core.setListener(listener) + fun setRequiredFirmwareRevision(revision: Int) = core.setRequiredFirmwareRevision(revision) + fun start(): Boolean = core.start() fun disconnect() = core.disconnect() diff --git a/tests/ios-app-host.test.cjs b/tests/ios-app-host.test.cjs index 2d18d328..177881f9 100644 --- a/tests/ios-app-host.test.cjs +++ b/tests/ios-app-host.test.cjs @@ -265,6 +265,7 @@ test('background glasses input still composites frames; phone resume preserves t '../native/nightscout-bridge': { nightscoutBridge: { async start() { pollStarts++; }, async stop() { pollStops++; } } }, './glance-host': { GlanceHost: class { dismiss() {} reset() {} isVisible() { return false; } } }, './device-addresses': { loadDeviceAddresses: () => ({ right: 'AA', left: 'BB', ring: '' }) }, './ios-peripheral-identity': { deviceAddressError: () => null }, + './firmware-compat': load('app/g2/firmware-compat.ts', {}), './reconnect-policy': load('app/g2/reconnect-policy.ts', {}), '../apps/launcher/launcher-app': { createLauncherWindow: () => window, LAUNCHER_SURFACE_ID: 'launcher' }, '../apps/launcher': { launcherEntries: () => [] }, '../apps/all-apps': { ALL_APPS: [] }, '../ui/dashboard-settings': settings, diff --git a/tests/ios-glanceboard.test.cjs b/tests/ios-glanceboard.test.cjs index cea8077b..25ef6b94 100644 --- a/tests/ios-glanceboard.test.cjs +++ b/tests/ios-glanceboard.test.cjs @@ -146,6 +146,7 @@ function fixture() { './glance-host': { GlanceHost }, './events': events, './lock-screen': { LOCK_SCREEN_SURFACE_ID: 'lock-screen', createLockScreenImage: () => new images.GrayImage(640, 480, 123) }, './device-addresses': { loadDeviceAddresses: () => ({ right: 'AA', left: 'BB', ring: '' }) }, './ios-peripheral-identity': { deviceAddressError: () => null }, + './firmware-compat': load('app/g2/firmware-compat.ts', {}), './reconnect-policy': load('app/g2/reconnect-policy.ts', {}), '../apps/launcher': { launcherEntries: () => [] }, '../apps/evenhub/installed-apps': {}, '../apps/evenhub/manager': {}, '../apps/evenhub/updates': {}, '../apps/evenhub': {}, '../apps/launcher/launcher-app': { createLauncherWindow: () => window, LAUNCHER_SURFACE_ID: 'launcher' }, diff --git a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/GlassesSessionCoreTest.kt b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/GlassesSessionCoreTest.kt index 3a41526e..e89e1723 100644 --- a/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/GlassesSessionCoreTest.kt +++ b/tests/kotlin/src/commonTest/kotlin/com/faceclaw/app/GlassesSessionCoreTest.kt @@ -10,6 +10,7 @@ import kotlin.test.assertTrue private const val RIGHT = "AA:00:00:00:00:01" private const val LEFT = "AA:00:00:00:00:02" +private const val STOCK_VERSION = "2.3.0.24" /** The test platform with a clock the tests can jump forward (the real waits keep real time). */ private class ClockPlatform(private val base: ProtocolPlatform) : ProtocolPlatform by base { @@ -64,6 +65,12 @@ private class FakeLink(private val platform: ProtocolPlatform) : SessionLink { @Volatile var closed = false /** An address whose connection attempts fail, like an arm that isn't advertising. */ @Volatile var unreachable: String? = null + /** + * The firmware-extension string settings READ acks report alongside [STOCK_VERSION] on both + * arms ("" is stock firmware, which omits the field), or null for an ack without firmware info. + */ + @Volatile var firmwareExtension: String? = null + @Volatile var connects = 0 var seq = 0 val writes: List @@ -73,6 +80,7 @@ private class FakeLink(private val platform: ProtocolPlatform) : SessionLink { fun cfwMessages(): List = writes.filter { it.sid == CfwTransport.SID && it.kind == "image" }.mapNotNull { it.message } override fun connect(address: String, timeoutMs: Int): Boolean { + connects++ if (address == unreachable) return false lock.withLock { connected.add(address) } return true @@ -105,15 +113,22 @@ private class FakeLink(private val platform: ProtocolPlatform) : SessionLink { if (sid == CfwTransport.SID) { for (lens in 1..2) core.onNotification(address, BleProtocol.NOTIFY_CHAR_UUID, cfwAck(magic, lens, inFlight.message.size, inFlight.cfwChecksum)) } else { - core.onNotification(address, BleProtocol.NOTIFY_CHAR_UUID, ackFrame(sid, magic, pb)) + core.onNotification(address, BleProtocol.NOTIFY_CHAR_UUID, ackFrame(sid, magic, inFlight.kind)) } } return true } - private fun ackFrame(sid: Int, magic: Int, request: ByteArray): ByteArray { + private fun ackFrame(sid: Int, magic: Int, kind: String?): ByteArray { + val extension = firmwareExtension val body = if (sid == BleProtocol.SID_SECURITY_AUTH) BleProtocol.encodeVarintField(1, 4) + BleProtocol.encodeVarintField(2, magic) + byteArrayOf(0x1a, 0x00) + else if (kind == "battery" && extension != null) + BleProtocol.encodeVarintField(1, 1) + BleProtocol.encodeVarintField(2, magic) + + BleProtocol.encodeBytesField(4, + BleProtocol.encodeBytesField(5, STOCK_VERSION.encodeToByteArray()) + + BleProtocol.encodeBytesField(6, STOCK_VERSION.encodeToByteArray())) + + (if (extension.isEmpty()) ByteArray(0) else BleProtocol.encodeBytesField(100, extension.encodeToByteArray())) else BleProtocol.encodeVarintField(1, 1) + BleProtocol.encodeVarintField(2, magic) return BleProtocol.framePb(body, sid, 0x00, seq++)[0] @@ -207,6 +222,7 @@ private class FakeListener : FaceclawBleCommunicatorListener { val events = ArrayList() val finished = ArrayList() val batteries = ArrayList() + val firmware = ArrayList() override fun onStateChange(phase: String?, status: String?) { phases.add(phase ?: "") @@ -235,7 +251,9 @@ private class FakeListener : FaceclawBleCommunicatorListener { finished.add("$frameId:$outcome") } - override fun onFirmwareInfo(leftVersion: String?, rightVersion: String?, extension: String?) {} + override fun onFirmwareInfo(leftVersion: String?, rightVersion: String?, extension: String?) { + firmware.add("$leftVersion|$rightVersion|$extension") + } } private class Session { @@ -565,4 +583,85 @@ class GlassesSessionCoreTest { s.core.close() } } + + @Test + fun stockFirmwareHaltsTheSessionBeforeAnyCustomFirmwareTraffic() { + val s = Session() + s.core.setRequiredFirmwareRevision(36) + s.link.firmwareExtension = "" + try { + assertTrue(s.core.start()) + assertTrue(waitUntil(5_000) { s.listener.phases.contains("incompatible-firmware") }, s.host.logs().takeLast(10).toString()) + assertEquals(listOf("$STOCK_VERSION|$STOCK_VERSION|"), s.listener.firmware) + assertTrue(s.host.hasLog("incompatible firmware"), s.host.logs().takeLast(10).toString()) + // The settings reply precedes the layout, so stock never sees a private-stream message. + assertEquals(0, s.link.writes.count { it.kind == "create-layout" }) + assertEquals(0, s.link.writes.count { it.sid == CfwTransport.SID }) + assertTrue(s.link.disconnected.containsAll(listOf(RIGHT, LEFT))) + assertFalse(s.core.isSessionReady()) + // Parked rather than retrying: no redial even well past the backoff schedule. + val connects = s.link.connects + s.platform.offsetMs += 60_000 + s.core.interruptibleSleep.interrupt() + sleepMs(300) + assertEquals(connects, s.link.connects) + assertEquals("incompatible-firmware", s.listener.phases.last()) + assertFalse(s.listener.phases.contains("retrying")) + } finally { + s.core.close() + } + } + + @Test + fun anOlderFaceclawRevisionAlsoHalts() { + val s = Session() + s.core.setRequiredFirmwareRevision(36) + s.link.firmwareExtension = "Faceclaw/35" + try { + assertTrue(s.core.start()) + assertTrue(waitUntil(5_000) { s.listener.phases.contains("incompatible-firmware") }, s.host.logs().takeLast(10).toString()) + assertEquals(0, s.link.writes.count { it.kind == "create-layout" }) + } finally { + s.core.close() + } + } + + @Test + fun compatibleFirmwareIsCheckedAgainOnEverySession() { + val s = Session() + s.core.setRequiredFirmwareRevision(36) + s.link.firmwareExtension = "Faceclaw/36" + try { + s.startAndAwaitLayout() + assertTrue(s.core.monitor.withLock { s.core.customFirmwareDetected }) + assertFalse(s.listener.phases.contains("incompatible-firmware")) + // The glasses come back on stock firmware (reflashed while the link was down): + // the new session's own settings query catches it before the layout. + s.link.firmwareExtension = "" + s.core.handleTransportFailure("test drop") + s.platform.offsetMs += 10_000 + s.core.interruptibleSleep.interrupt() + assertTrue(waitUntil(5_000) { s.listener.phases.contains("incompatible-firmware") }, s.host.logs().takeLast(10).toString()) + assertEquals(2, s.link.writes.count { it.kind == "battery" }) + assertEquals(1, s.link.writes.count { it.kind == "create-layout" }) + } finally { + s.core.close() + } + } + + @Test + fun firmwareCompatibilityFollowsTheRevisionString() { + fun info(extension: String) = BleProtocol.FirmwareInfo(STOCK_VERSION, STOCK_VERSION, extension) + assertEquals(-1, info("").faceclawRevision()) + assertEquals(-1, info("EVENCFW/22 img640").faceclawRevision()) + assertEquals(-1, info("Faceclaw/abc").faceclawRevision()) + assertEquals(-1, info("OtherCFW/36").faceclawRevision()) + assertEquals(36, info(" Faceclaw/36 ").faceclawRevision()) + assertFalse(info("").isCompatible(36)) + assertFalse(info("Faceclaw/35").isCompatible(36)) + assertTrue(info("Faceclaw/36").isCompatible(36)) + assertTrue(info("Faceclaw/40").isCompatible(36)) + assertTrue(info("Faceclaw/1").isCompatible(0)) + assertFalse(info("EVENCFW/22").isCompatible(0)) + } } From eb7f3856441ed03883e6676cc9b62b7a9e069b3a Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 15:32:56 -0700 Subject: [PATCH 46/60] Fix the appearance of the submenu-indicator triangle --- App_Resources/iOS/src/FaceclawFontRenderer.m | 58 ++++++++++++++++++-- tests/native/ios-font-test.m | 7 +++ 2 files changed, 60 insertions(+), 5 deletions(-) diff --git a/App_Resources/iOS/src/FaceclawFontRenderer.m b/App_Resources/iOS/src/FaceclawFontRenderer.m index 012f36d4..d7598ca6 100644 --- a/App_Resources/iOS/src/FaceclawFontRenderer.m +++ b/App_Resources/iOS/src/FaceclawFontRenderer.m @@ -29,6 +29,51 @@ static NSAttributedString *Attributed(CTFontRef font, NSString *text, BOOL glyph if (glyphLayout) attrs[(__bridge id)kCTLigatureAttributeName] = @0; return [[NSAttributedString alloc] initWithString:text attributes:attrs]; } +static CTLineRef CreateRawLine(CTFontRef font, NSString *text, BOOL glyphLayout) CF_RETURNS_RETAINED { + return CTLineCreateWithAttributedString((__bridge CFAttributedStringRef)Attributed(font, text, glyphLayout)); +} +static BOOL IsColorRun(CTRunRef run) { + CTFontRef font = CFDictionaryGetValue(CTRunGetAttributes(run), kCTFontAttributeName); + return font && (CTFontGetSymbolicTraits(font) & kCTFontTraitColorGlyphs); +} +static BOOL HasColorRun(CTLineRef line) { + for (id run in (__bridge NSArray *)CTLineGetGlyphRuns(line)) if (IsColorRun((__bridge CTRunRef)run)) return YES; + return NO; +} +// iOS falls back to Apple Color Emoji for default-text symbols the face lacks +// (▶ U+25B6 in Roboto), where Android's minikin picks a text font; the +// alpha-only raster keeps just the emoji's silhouette (▶ becomes a solid +// rounded square). Request text presentation (U+FE0E) for each lone codepoint +// that fell back to a color font, wherever a text font can supply it. Returns +// `text` itself when nothing changes. +static NSString *PreferTextPresentation(CTFontRef font, NSString *text, CTLineRef line, BOOL glyphLayout) { + NSMutableIndexSet *color = [NSMutableIndexSet new]; + for (id run in (__bridge NSArray *)CTLineGetGlyphRuns(line)) if (IsColorRun((__bridge CTRunRef)run)) { + CFRange range = CTRunGetStringRange((__bridge CTRunRef)run); + [color addIndexesInRange:NSMakeRange(range.location, range.length)]; + } + if (!color.count) return text; + NSMutableString *out = [NSMutableString new]; + __block BOOL changed = NO; + [text enumerateSubstringsInRange:NSMakeRange(0, text.length) options:NSStringEnumerationByComposedCharacterSequences + usingBlock:^(NSString *ch, NSRange range, __unused NSRange enclosing, __unused BOOL *stop) { + [out appendString:ch]; + // Multi-scalar sequences (ZWJ, flags, keycaps, explicit selectors) stay emoji. + if (![color containsIndex:range.location] || [ch lengthOfBytesUsingEncoding:NSUTF32StringEncoding] != 4) return; + NSString *variant = [ch stringByAppendingString:@"\uFE0E"]; + CTLineRef retry = CreateRawLine(font, variant, glyphLayout); + if (!HasColorRun(retry)) { [out appendString:@"\uFE0E"]; changed = YES; } + CFRelease(retry); + }]; + return changed ? out : text; +} +static CTLineRef CreateLine(CTFontRef font, NSString *text, BOOL glyphLayout) CF_RETURNS_RETAINED { + CTLineRef line = CreateRawLine(font, text, glyphLayout); + NSString *preferred = PreferTextPresentation(font, text, line, glyphLayout); + if (preferred == text) return line; + CFRelease(line); + return CreateRawLine(font, preferred, glyphLayout); +} static BOOL ValidText(NSString *text) { return text != nil && text.length <= 100000; } static BOOL ValidRaster(NSInteger width, NSInteger height) { return width > 0 && height > 0 && width <= 65535 && height <= 65535 && width * height <= 4000000; @@ -85,7 +130,7 @@ static NSData *ImagePacket(NSData *pixels, NSInteger width, NSInteger height, do if (!ValidText(text)) return 0; CTFontRef font = CreateFont(path, size); if (!font) return 0; - CTLineRef line = CTLineCreateWithAttributedString((__bridge CFAttributedStringRef)Attributed(font, text, YES)); + CTLineRef line = CreateLine(font, text, YES); double width = CTLineGetTypographicBounds(line, NULL, NULL, NULL); CFRelease(line); CFRelease(font); return width; } @@ -95,7 +140,7 @@ static NSData *ImagePacket(NSData *pixels, NSInteger width, NSInteger height, do if (!font) return [NSData data]; uint32_t scalar = (uint32_t)cp; NSString *text = [[NSString alloc] initWithBytes:&scalar length:4 encoding:NSUTF32LittleEndianStringEncoding]; - CTLineRef line = CTLineCreateWithAttributedString((__bridge CFAttributedStringRef)Attributed(font, text, YES)); + CTLineRef line = CreateLine(font, text, YES); double advance = CTLineGetTypographicBounds(line, NULL, NULL, NULL); NSMutableData *out = [NSMutableData dataWithLength:10]; U16(out.mutableBytes, MAX(0, MIN(65535, lround(advance * 64)))); @@ -128,7 +173,7 @@ static NSData *ImagePacket(NSData *pixels, NSInteger width, NSInteger height, do if (!ValidText(text)) return [NSData data]; CTFontRef font = CreateFont(path, size); if (!font) return [NSData data]; - CTLineRef line = CTLineCreateWithAttributedString((__bridge CFAttributedStringRef)Attributed(font, text, NO)); + CTLineRef line = CreateLine(font, text, NO); CGRect bounds = CTLineGetImageBounds(line, NULL); BOOL ink = !CGRectIsNull(bounds) && !CGRectIsEmpty(bounds); NSInteger left = ink ? MIN(0, floor(CGRectGetMinX(bounds))) : 0; @@ -155,6 +200,9 @@ static NSData *ImagePacket(NSData *pixels, NSInteger width, NSInteger height, do NSInteger step = MAX(1, ascent + descent + (NSInteger)ceil(MAX(0, CTFontGetLeading(font)))); maxLines = MIN(maxLines, MIN(65535 / step, 4000000 / width / step)); if (maxLines <= 0) { CFRelease(font); return [NSData data]; } + CTLineRef probe = CreateRawLine(font, text, NO); + text = PreferTextPresentation(font, text, probe, NO); // Before any index math below. + CFRelease(probe); NSAttributedString *attributed = Attributed(font, text, NO); CTTypesetterRef typesetter = CTTypesetterCreateWithAttributedString((__bridge CFAttributedStringRef)attributed); NSMutableArray *lines = [NSMutableArray new]; @@ -165,8 +213,8 @@ static NSData *ImagePacket(NSData *pixels, NSInteger width, NSInteger height, do CTLineRef line; if (lines.count == (NSUInteger)maxLines - 1 && start + count < (CFIndex)text.length) { NSString *rest = [[text substringFromIndex:start] stringByReplacingOccurrencesOfString:@"\n" withString:@" "]; - CTLineRef full = CTLineCreateWithAttributedString((__bridge CFAttributedStringRef)Attributed(font, rest, NO)); - CTLineRef token = CTLineCreateWithAttributedString((__bridge CFAttributedStringRef)Attributed(font, @"…", NO)); + CTLineRef full = CreateRawLine(font, rest, NO); + CTLineRef token = CreateRawLine(font, @"…", NO); line = CTLineCreateTruncatedLine(full, width, kCTLineTruncationEnd, token); if (!line) line = CFRetain(token); CFRelease(full); CFRelease(token); diff --git a/tests/native/ios-font-test.m b/tests/native/ios-font-test.m index a97ebcc9..16713688 100644 --- a/tests/native/ios-font-test.m +++ b/tests/native/ios-font-test.m @@ -66,6 +66,13 @@ int main(int argc, char **argv) { @autoreleasepool { for (NSUInteger i=10; i= d[i], @"gamma monotonic"); if (l[i] > 0 && l[i] < 255) antialiased = YES; } Check(antialiased, @"antialias coverage"); Check([FaceclawFontRenderer renderGlyphCell:font size:32 codePoint:0x1f642 gamma:1].length > 10, @"non-BMP fallback glyph"); + // macOS falls back to Apple Color Emoji for ⌚ (as iOS does for ▶), whose + // alpha-only raster is a bare silhouette 1.3125em wide; a text font has it. + NSData *watch = [FaceclawFontRenderer renderGlyphCell:font size:32 codePoint:0x231a gamma:1]; + double watchAdvance = U16(watch.bytes) / 64.0; + Check(watch.length > 10 && watchAdvance < 32, @"text presentation preferred over color emoji fallback"); + Check(fabs(watchAdvance - [FaceclawFontRenderer measureTextExact:font text:@"⌚" size:32]) <= 1.0/128, @"text-presentation advance agrees"); + Check(fabs([FaceclawFontRenderer measureTextExact:font text:@"A⌚" size:32] - a - watchAdvance) < 0.01, @"text-presentation pair measure agrees"); NSString *sample = @"AgjÉ 0123456789 — AV fi ffi"; SavePGM([FaceclawFontRenderer renderText:font text:sample size:32 gamma:1], [outDir stringByAppendingPathComponent:@"line.pgm"]); NSString *paragraph = @"The quick brown fox jumps over the lazy dog.\nCafé déjà vu — 23°C. ALongWordWithoutSpacesToExerciseWrapping. More text for truncation."; From 4234d3e9e950de837331279ee42c879ebb2aa1a6 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 15:54:57 -0700 Subject: [PATCH 47/60] Fix an issue where animations on the phone preview stopped prematurely --- .../faceclaw/app/FaceclawBleCommunicator.kt | 8 ++++ .../faceclaw/app/FaceclawPreviewCompositor.kt | 4 +- CHANGELOG | 11 +++++ app/g2/dashboard-controller.ts | 14 +++++- app/g2/ios-preview-controller.ts | 1 + app/graphics/surface-compositor.ios.ts | 2 + app/native/faceclaw-communicator.ios.ts | 20 ++++++++- app/native/faceclaw-communicator.ts | 24 +++++++++- app/native/preview-display.ios.ts | 10 ++++- .../g2protocol/session/GlassesSessionCore.kt | 3 ++ .../app/graphics/SurfaceCompositor.kt | 19 +++++++- .../kotlin/com/faceclaw/app/IosNativeApi.kt | 3 ++ .../com/faceclaw/app/ble/IosGlassesSession.kt | 3 ++ .../app/PreviewAnimationListenerTest.kt | 44 +++++++++++++++++++ 14 files changed, 160 insertions(+), 6 deletions(-) create mode 100644 tests/kotlin/src/androidHostTest/kotlin/com/faceclaw/app/PreviewAnimationListenerTest.kt diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt index d7c24320..24ce8c53 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawBleCommunicator.kt @@ -242,6 +242,14 @@ class FaceclawBleCommunicator(context: Context, rightAddress: String?, leftAddre java.nio.ByteBuffer.wrap(composite.gray), composite.width, composite.height, brightenGamma, green) } + /** + * Posted to the main looper after each step of an animation the preview is replaying (menu + * highlight slides, scrolls), so the mirror can pull the new frame; frame metrics only cover + * frames sent to the glasses, which carry the whole animation in one display list. + */ + fun setPreviewAnimationListener(listener: Runnable?) = + core.setPreviewAnimationListener(listener?.let { { mainHandler.post(it); Unit } }) + /** Save the current composite as a 4-bit grayscale PNG; returns the path or "". */ @Throws(java.io.IOException::class) fun saveCompositePngScreenshot(): String { diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawPreviewCompositor.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawPreviewCompositor.kt index 4f4c65fa..6ae3b8ab 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawPreviewCompositor.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawPreviewCompositor.kt @@ -51,11 +51,13 @@ class FaceclawPreviewCompositor(context: Context) { if (activeInstance === this) { activeInstance = null } - frameListener = null + setFrameListener(null) } + /** Also notified after each step of an animation the preview is replaying (see SurfaceCompositor). */ fun setFrameListener(listener: Runnable?) { this.frameListener = listener + compositor.setPreviewAnimationListener(listener?.let { { mainHandler.post(it); Unit } }) } /** Set the compositor's output frame size. Call before configuring surfaces. */ diff --git a/CHANGELOG b/CHANGELOG index 37428aa9..37132519 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,10 +2,21 @@ ## 0.8.2 - Future +### User Interface Customization + * Customizable app switcher: put it on the left, right, bottom, or make it a popup +* The status bar can be combined with the app switcher when it's on the bottom +* The display depth is configurable when the app switcher is on the bottom * Add Dense style for battery indicators + +### Other Features and Fixes + +* Animations have configurable speed +* Fix an issue where animations on the phone preview display stopped before finishing * Terminal app lists every configured host, including ones that are still connecting * Music app shows its library-browsing app picker on the front page when nothing is playing +* Fix iOS failing to connect when an incompatible firmware version is installed +* Mark stock firmware 2.3.2 as validated for installing custom firmware over ## 0.8.1 - 2026-09-30 diff --git a/app/g2/dashboard-controller.ts b/app/g2/dashboard-controller.ts index 63548a57..7f6ab9e6 100644 --- a/app/g2/dashboard-controller.ts +++ b/app/g2/dashboard-controller.ts @@ -331,6 +331,7 @@ class DashboardController { private offPhoneLockState: (() => void) | null = null; private offEvenAppConflict: (() => void) | null = null; private offFrameMetrics: (() => void) | null = null; + private offPreviewAnimation: (() => void) | null = null; private offFirmwareInfo: (() => void) | null = null; private offVoiceStatus: (() => void) | null = null; private offAndroidNotification: (() => void) | null = null; @@ -1586,6 +1587,10 @@ class DashboardController { } } }); + // A menu slide reaches the glasses as one frame whose display list + // animates on-device; the mirror replays it in the compositor and needs + // a pull per step, or it keeps whichever mid-motion frame it last got. + this.offPreviewAnimation = communicator.onPreviewAnimationFrame(() => this.schedulePreviewUpdate()); this.offFirmwareInfo = communicator.onFirmwareInfo((info) => { this.appendLog( `firmware: L=${info.leftVersion || "?"} R=${info.rightVersion || "?"}` + @@ -1680,6 +1685,8 @@ class DashboardController { this.offEvenAppConflict = null; this.offFrameMetrics?.(); this.offFrameMetrics = null; + this.offPreviewAnimation?.(); + this.offPreviewAnimation = null; this.offFirmwareInfo?.(); this.offFirmwareInfo = null; this.offVoiceStatus?.(); @@ -1785,6 +1792,8 @@ class DashboardController { this.offEvenAppConflict = null; this.offFrameMetrics?.(); this.offFrameMetrics = null; + this.offPreviewAnimation?.(); + this.offPreviewAnimation = null; this.offFirmwareInfo?.(); this.offFirmwareInfo = null; this.offVoiceStatus?.(); @@ -2847,7 +2856,10 @@ class DashboardController { } this.previewTrailingTimer = setTimeout(() => { this.previewTrailingTimer = null; - this.updateCompositePreview(); + // Re-check rather than pull directly: a timer that fires a millisecond + // early would fail the floor in updateCompositePreview and drop the + // burst's last frame (an animation's settled frame) until the 1s poll. + this.schedulePreviewUpdate(); }, wait); } diff --git a/app/g2/ios-preview-controller.ts b/app/g2/ios-preview-controller.ts index b8a73e53..1c09eda8 100644 --- a/app/g2/ios-preview-controller.ts +++ b/app/g2/ios-preview-controller.ts @@ -764,6 +764,7 @@ export class IosPreviewController { if (this.active) this.onConnectionState({ ...this.state }) this.schedulePreviewUpdate() }), + communicator.onPreviewAnimationFrame(() => { if (this.communicator === communicator) this.schedulePreviewUpdate() }), communicator.onWearState(wearing => { if (this.communicator === communicator) this.handleWearState(wearing) }), communicator.addCompassListener(receiveCompassEvent), communicator.onAncsRelayFrame(frame => { if (this.communicator === communicator) notifications.receive(frame) }), diff --git a/app/graphics/surface-compositor.ios.ts b/app/graphics/surface-compositor.ios.ts index 065be122..17adfa02 100644 --- a/app/graphics/surface-compositor.ios.ts +++ b/app/graphics/surface-compositor.ios.ts @@ -38,4 +38,6 @@ export class SurfaceCompositor { } setShellScene(bytes: Uint8Array): void { this.native.shellData(toData(bytes)) } composite(): Uint8Array { return fromData(this.native.composite()) } + /** Called on the main queue after each step of an animation the preview is replaying. */ + setPreviewAnimationListener(listener: (() => void) | null): void { this.native.setPreviewAnimationListenerListener(listener) } } diff --git a/app/native/faceclaw-communicator.ios.ts b/app/native/faceclaw-communicator.ios.ts index a6b99e7f..9bb7ed63 100644 --- a/app/native/faceclaw-communicator.ios.ts +++ b/app/native/faceclaw-communicator.ios.ts @@ -191,6 +191,7 @@ export class FaceclawCommunicatorBridge { private latestPhoneLockState: boolean | null = null; private readonly evenAppConflictListeners = new Set<(message: string) => void>(); private readonly frameMetricsListeners = new Set<(metrics: FrameMetrics) => void>(); + private readonly previewAnimationListeners = new Set<() => void>(); private readonly firmwareInfoListeners = new Set<(info: FirmwareInfo) => void>(); private readonly ancsAuthorizationListeners = new Set<(authorized: boolean) => void>(); private readonly ancsRelayListeners = new Set<(frame: Uint8Array) => void>(); @@ -209,6 +210,10 @@ export class FaceclawCommunicatorBridge { this.listenerProxy = SessionListener.new() as SessionListener; this.listenerProxy.bridge = this; this.communicator.setListenerListener(this.listenerProxy); + // Kotlin calls this on the main queue. + this.communicator.setPreviewAnimationListenerListener(() => { + for (const listener of Array.from(this.previewAnimationListeners)) listener(); + }); } // ----- Kotlin listener entry points (main queue) ----------------------------------- @@ -357,6 +362,15 @@ export class FaceclawCommunicatorBridge { return () => this.frameMetricsListeners.delete(listener); } + /** + * Each step of an animation the phone preview is replaying (a menu slide + * reaches the glasses as one frame, so frame metrics fire only at its start). + */ + onPreviewAnimationFrame(listener: () => void): () => void { + this.previewAnimationListeners.add(listener); + return () => this.previewAnimationListeners.delete(listener); + } + onFirmwareInfo(listener: (info: FirmwareInfo) => void): () => void { this.firmwareInfoListeners.add(listener); return () => this.firmwareInfoListeners.delete(listener); @@ -603,7 +617,11 @@ export class FaceclawCommunicatorBridge { async close(): Promise { this.setAncsListeners(false); - await this.enqueueNativeCall(() => this.communicator.close()); + this.previewAnimationListeners.clear(); + await this.enqueueNativeCall(() => { + this.communicator.setPreviewAnimationListenerListener(null); + this.communicator.close(); + }); } // ----- iOS extras: compass, microphone, iPhone notifications (ANCS) ---------------------- diff --git a/app/native/faceclaw-communicator.ts b/app/native/faceclaw-communicator.ts index f6bc84f1..c469d2c2 100644 --- a/app/native/faceclaw-communicator.ts +++ b/app/native/faceclaw-communicator.ts @@ -159,6 +159,7 @@ export class FaceclawCommunicatorBridge { private readonly evenAppConflictListeners = new Set<(message: string) => void>(); private readonly frameMetricsListeners = new Set<(metrics: FrameMetrics) => void>(); private readonly firmwareInfoListeners = new Set<(info: FirmwareInfo) => void>(); + private readonly previewAnimationListeners = new Set<() => void>(); constructor(addresses: { right: string; left: string; ring?: string }) { const context = Utils.android.getApplicationContext(); @@ -251,6 +252,14 @@ export class FaceclawCommunicatorBridge { }, }); this.communicator.setListener(this.listenerProxy); + // Already posted to the main looper by the Java side. + this.communicator.setPreviewAnimationListener( + new java.lang.Runnable({ + run: () => { + for (const listener of Array.from(this.previewAnimationListeners)) listener(); + }, + }), + ); } private emitAsync(listeners: Set<(value: T) => void>, value: T): void { @@ -364,6 +373,15 @@ export class FaceclawCommunicatorBridge { return () => this.frameMetricsListeners.delete(listener); } + /** + * Each step of an animation the phone preview is replaying (a menu slide + * reaches the glasses as one frame, so frame metrics fire only at its start). + */ + onPreviewAnimationFrame(listener: () => void): () => void { + this.previewAnimationListeners.add(listener); + return () => this.previewAnimationListeners.delete(listener); + } + onFirmwareInfo(listener: (info: FirmwareInfo) => void): () => void { this.firmwareInfoListeners.add(listener); return () => this.firmwareInfoListeners.delete(listener); @@ -720,6 +738,10 @@ export class FaceclawCommunicatorBridge { } async close(): Promise { - await this.enqueueJavaCall(() => this.communicator.close()); + this.previewAnimationListeners.clear(); + await this.enqueueJavaCall(() => { + this.communicator.setPreviewAnimationListener(null); + this.communicator.close(); + }); } } diff --git a/app/native/preview-display.ios.ts b/app/native/preview-display.ios.ts index 10edad53..c25628a6 100644 --- a/app/native/preview-display.ios.ts +++ b/app/native/preview-display.ios.ts @@ -45,14 +45,20 @@ export class PreviewDisplayTarget implements DisplayTarget { private onFrameComposited: (() => void) | null = null; private released = false; - /** Receive a callback per applied frame, the stand-in for the connected path's frame-finished callback. */ + /** + * Receive a callback per applied frame, the stand-in for the connected + * path's frame-finished callback, and per step of an animation the + * preview is replaying. + */ activate(onFrameComposited: () => void): void { this.onFrameComposited = onFrameComposited; + this.compositor.setPreviewAnimationListener(() => this.composited()); } release(): void { this.released = true; this.onFrameComposited = null; + this.compositor.setPreviewAnimationListener(null); } private composited(): void { @@ -61,7 +67,9 @@ export class PreviewDisplayTarget implements DisplayTarget { async configureCompositorScreen(width: number, height: number): Promise { if (Math.round(width) !== this.compositor.width || Math.round(height) !== this.compositor.height) { + this.compositor.setPreviewAnimationListener(null); this.compositor = new SurfaceCompositor(Math.round(width), Math.round(height)); + if (this.onFrameComposited) this.compositor.setPreviewAnimationListener(() => this.composited()); } } diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt index 3e37a8a0..2381369b 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/g2protocol/session/GlassesSessionCore.kt @@ -971,6 +971,9 @@ class GlassesSessionCore( /** The current composite for previews/screenshots, or null before any surface exists. */ fun previewComposite(): SurfaceCompositor.Composite? = compositor.previewComposite() + /** See SurfaceCompositor.setPreviewAnimationListener; runs on the redraw scheduler's thread. */ + fun setPreviewAnimationListener(listener: (() -> Unit)?) = compositor.setPreviewAnimationListener(listener) + /** * Show or hide a compositor surface, immediately submitting the resulting * frame. Recompositing here (rather than waiting for the next surface diff --git a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt index 19f60f16..475153d1 100644 --- a/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt +++ b/native/kotlin/shared/src/commonMain/kotlin/com/faceclaw/app/graphics/SurfaceCompositor.kt @@ -1,5 +1,6 @@ package com.faceclaw.app +import kotlin.concurrent.Volatile import kotlin.jvm.JvmField import kotlin.jvm.JvmStatic import kotlin.jvm.JvmOverloads @@ -315,6 +316,17 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr /** The last composite's scene; reused while its inputs are unchanged (see compositeLocked). */ private var lastScene: ShellScene? = null private var previewKey: String? = null + @Volatile private var previewAnimationListener: (() -> Unit)? = null + + /** + * Called after each timer redraw of an animated preview (including the one where it settles), + * outside the lock and on the redraw scheduler's thread. The mirror pulls previews on new + * frames only, and the animation advances between them, so without this the mirror keeps + * whichever mid-motion frame it last pulled. + */ + fun setPreviewAnimationListener(listener: (() -> Unit)?) { + previewAnimationListener = listener + } /** * The phone mirror's view of [scene]: without the whole-screen stereo shift, which would move @@ -324,7 +336,12 @@ class SurfaceCompositor @JvmOverloads constructor(private val includePreviewInFr if (previewKey != key) { animatedPreview?.player?.stop() animatedPreview = scene.unshifted().animatedPreview(gray, screenWidth, screenHeight, - schedule = { delay, action -> scheduleDrawRedraw(delay) { lock.withLock(action) } }) + schedule = { delay, action -> + scheduleDrawRedraw(delay) { + lock.withLock(action) + previewAnimationListener?.invoke() + } + }) previewKey = key } return animatedPreview!!.pixels diff --git a/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/IosNativeApi.kt b/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/IosNativeApi.kt index 5c56d330..ffe38e36 100644 --- a/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/IosNativeApi.kt +++ b/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/IosNativeApi.kt @@ -277,4 +277,7 @@ class IosSurfaceCompositor(width: Int, height: Int) { fun composite(): NSData = compositor.composite().gray.data() fun compositeFrame(): IosTextureFrame = IosTextureFrame(compositor.composite()) + + /** Called on the main queue after each step of an animation the preview is replaying (see SurfaceCompositor). */ + fun setPreviewAnimationListener(listener: (() -> Unit)?) = compositor.setPreviewAnimationListener(listener) } diff --git a/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/ble/IosGlassesSession.kt b/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/ble/IosGlassesSession.kt index 761b8185..548c483f 100644 --- a/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/ble/IosGlassesSession.kt +++ b/native/kotlin/shared/src/iosMain/kotlin/com/faceclaw/app/ble/IosGlassesSession.kt @@ -243,6 +243,9 @@ class IosGlassesSession internal constructor( /** The current composited screen (gray, 8bpp) or null before any surface was configured. */ fun previewComposite(): IosTextureFrame? = core.previewComposite()?.let { IosTextureFrame(it) } + /** Called on the main queue after each step of an animation the preview is replaying (see SurfaceCompositor). */ + fun setPreviewAnimationListener(listener: (() -> Unit)?) = core.setPreviewAnimationListener(listener) + fun compositeWidth(): Int = core.previewComposite()?.width ?: 0 fun compositeHeight(): Int = core.previewComposite()?.height ?: 0 diff --git a/tests/kotlin/src/androidHostTest/kotlin/com/faceclaw/app/PreviewAnimationListenerTest.kt b/tests/kotlin/src/androidHostTest/kotlin/com/faceclaw/app/PreviewAnimationListenerTest.kt new file mode 100644 index 00000000..9a573d88 --- /dev/null +++ b/tests/kotlin/src/androidHostTest/kotlin/com/faceclaw/app/PreviewAnimationListenerTest.kt @@ -0,0 +1,44 @@ +package com.faceclaw.app + +import java.util.Collections +import kotlin.test.* + +/** + * The phone mirror pulls previews only when told to, while the compositor's player advances an + * animated display list on its own timer. It needs a notification after every redraw, the + * settled one included, or it keeps a mid-slide frame. Host-only: it runs the real redraw thread. + */ +class PreviewAnimationListenerTest { + // FrameDisplayListTest's menu golden (a 2x2 highlight sliding in to rest at (3, 2)), + // restarted at 0 of its 240 ms so the slide is still in flight at the first pull. + private val menu = "077f0000000300020002000200022a00000096000000010002000200ffffffff0200080000ff24017e30020000000001812c8001812c1611010017328001812c16103001812c3023414031ff24017c30020000000001812c8001812c1611010017328001812c16103001812c30234140310200020001000103100400000000000000001f" + .chunked(2).map { it.toInt(16).toByte() }.toByteArray().also { it.fill(0, 18, 22) } + + private fun settledPreview(): ByteArray { + val reader = ArrayByteReader(menu) + assertEquals(DrawRecordKind.DISPLAY_LIST, reader.get().toInt()) + val list = FrameDisplayList.read(reader, drawAnimationTimeMs() - 10_000) + return ShellScene(emptyList(), listOf(list)).preview(ByteArray(64), 8, 8) + } + + @Test fun mirrorIsNotifiedOfEachRedrawThroughTheSettledFrame() { + val c = SurfaceCompositor() + c.configureScreen(8, 8) + c.configureSurface("app", 0, 0, 8, 8, 0, 0) + val pulled = Collections.synchronizedList(ArrayList()) + c.setPreviewAnimationListener { pulled.add(assertNotNull(c.previewComposite()).gray) } + c.submitSurface("app", ArrayByteReader(ByteArray(64)), 0, 0, 8, 8, "menu", ArrayByteReader(menu)) + val settled = settledPreview() + assertFalse(assertNotNull(c.previewComposite()).gray.contentEquals(settled), "the first pull is mid-slide") + // Redraws are 45 ms apart; 150 ms without one means the player has stopped. + val deadline = System.nanoTime() + 2_000_000_000L + var count = -1 + while (System.nanoTime() < deadline && pulled.size != count) { + count = pulled.size + Thread.sleep(150) + } + assertEquals(count, pulled.size, "the player stops once the slide's timeline ends") + assertTrue(pulled.size >= 2, "one notification per redraw") + assertContentEquals(settled, pulled.last(), "the last notification's pull is the settled frame") + } +} From 023d5bf55c793404009709df28ff51c295e88bd3 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 16:01:48 -0700 Subject: [PATCH 48/60] Speed up the menu animations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
Prompts Used User: Let's speed up the default speed of the menu animation (ie, what the Normal speed setting corresponds to) by 2x. Opus 5.5: > Menu animations now run twice as fast at Normal speed. The build and typecheck passed; I haven't tried it on the glasses yet. > > I halved the two base durations that every menu animation speed is calculated from: > - **Highlight slide and list scroll:** 240ms → 120ms (`app/ui/menu-highlight-motion.ts:4`) > - **End-of-list bounce:** 320ms → 160ms (`app/ui/menu-scroll-motion.ts:8`) > > This covers menus, lists, and the launcher and Files icon grids. The other speed settings are calculated from these values, so they get twice as fast too: Slow now matches the old Normal, and Very Fast is now 24ms for the slide. The screen fade setting uses the same speed scale but its own duration, so it isn't affected.
--- app/ui/menu-highlight-motion.ts | 2 +- app/ui/menu-scroll-motion.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ui/menu-highlight-motion.ts b/app/ui/menu-highlight-motion.ts index 1f4f99b0..8ff7ef6a 100644 --- a/app/ui/menu-highlight-motion.ts +++ b/app/ui/menu-highlight-motion.ts @@ -1,7 +1,7 @@ import { menuAnimationDurationMs } from "./menu-animation-pref"; /** At Normal menu animation speed; menuAnimationDurationMs scales it to the setting. */ -export const MENU_HIGHLIGHT_DURATION_MS = 240; +export const MENU_HIGHLIGHT_DURATION_MS = 120; export type MenuHighlightAnimation = { dx: number; dy: number; startedAt: number; token: number; durationMs: number }; let nextToken = 1; diff --git a/app/ui/menu-scroll-motion.ts b/app/ui/menu-scroll-motion.ts index e4c251a1..2f61d8fc 100644 --- a/app/ui/menu-scroll-motion.ts +++ b/app/ui/menu-scroll-motion.ts @@ -5,7 +5,7 @@ import { MENU_HIGHLIGHT_DURATION_MS, nextAnimationToken } from "./menu-highlight /** Longest scroll, in pixels, that animates; longer jumps snap. */ export const MAX_ANIMATED_SCROLL = 96; /** At Normal menu animation speed, like MENU_HIGHLIGHT_DURATION_MS. */ -export const MENU_BOUNCE_DURATION_MS = 320; +export const MENU_BOUNCE_DURATION_MS = 160; /** Fraction of a bounce spent moving out to the peak; the rest settles back. */ const BOUNCE_PEAK = 0.35; From ad60494c98bbaff776006bd9c1bc20ef9ce6a439 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 16:24:13 -0700 Subject: [PATCH 49/60] Fix positioning of the disconnect notice in Terminal --- app/apps/terminal/terminal-app.worker.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/app/apps/terminal/terminal-app.worker.ts b/app/apps/terminal/terminal-app.worker.ts index 8ecf0a2c..6cf44429 100644 --- a/app/apps/terminal/terminal-app.worker.ts +++ b/app/apps/terminal/terminal-app.worker.ts @@ -68,7 +68,7 @@ import { connectionDisplayName, loadConnections, parseConnectionString, saveConn import { TerminalEmulator } from "./terminal-emulator"; import { drawSubmenuIndicator, submenuItem, type MenuItem } from "../../ui/menu"; import { Menu, type MenuDrawArgs } from "../../ui/menu-core"; -import { lineStep, listRowHeight } from "../../ui/metrics"; +import { centeredTextY, lineStep, listRowHeight, textInkHeight } from "../../ui/metrics"; import { WindowMenu, WindowMenuLayer } from "../../ui/window-menu"; import { appViewportSize } from "../../ui/shell/geometry"; import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window"; @@ -1815,11 +1815,14 @@ function paintView(window: ViewWindow): GrayImage { } // Stale content stays visible across a disconnect, so flag it: a status - // line over the bottom row whenever the session isn't actually attached. - // Text is deferred glyphs (always on top of raster), so the covered rows - // must be suppressed rather than painted over. + // line over the bottom row(s) whenever the session isn't actually attached. + // It's in the UI font, which can be taller than a terminal cell, so it's + // sized to that font's ink. Text is deferred glyphs (always on top of + // raster), so the covered rows must be suppressed rather than painted over. + const statusFont = chromeFont(); + const statusBannerHeight = Math.max(window.cellHeight, textInkHeight(statusFont)); const statusBannerY = window.client.state().phase !== "attached" - ? window.viewportHeight - window.cellHeight + ? window.viewportHeight - statusBannerHeight : null; for (let row = 0; row < rows; row++) { @@ -1840,8 +1843,8 @@ function paintView(window: ViewWindow): GrayImage { drawScrollIndicator(image, top, window.archiveStart, bottomTop); } if (statusBannerY !== null) { - image.fillRect(0, statusBannerY, window.viewportWidth, window.cellHeight, 0); - image.drawText(chromeFont(), 0, statusBannerY, window.status, 170); + image.fillRect(0, statusBannerY, window.viewportWidth, statusBannerHeight, 0); + image.drawText(statusFont, 0, centeredTextY(statusFont, statusBannerY, statusBannerHeight), window.status, 170); } return image; } From 42555bf2137f707a583be53474787a96350f9258 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Sat, 3 Oct 2026 16:51:17 -0700 Subject: [PATCH 50/60] Update screenshots, and visual styling in games --- README.md | 3 +- app/apps/blocks/blocks-app.worker.ts | 54 +++++++++++++++++- app/apps/pinball/pinball-app.worker.ts | 18 +++++- website/index.html | 12 ++-- website/screenshots/blocks.png | Bin 0 -> 4564 bytes website/screenshots/compass.png | Bin 6318 -> 6691 bytes website/screenshots/launcher.png | Bin 5107 -> 7801 bytes website/screenshots/music-player.png | Bin 9124 -> 14805 bytes website/screenshots/screenshot-launcher.png | Bin 7464 -> 0 bytes website/screenshots/settings-assistant.png | Bin 4966 -> 8286 bytes .../screenshots/settings-customization.png | Bin 0 -> 7843 bytes website/screenshots/settings-display.png | Bin 7123 -> 0 bytes 12 files changed, 77 insertions(+), 10 deletions(-) create mode 100644 website/screenshots/blocks.png delete mode 100644 website/screenshots/screenshot-launcher.png create mode 100644 website/screenshots/settings-customization.png delete mode 100644 website/screenshots/settings-display.png diff --git a/README.md b/README.md index a8f40e87..659287f5 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,10 @@ User-facing documentation lives at https://faceclaw.org/. ![App launcher](website/screenshots/launcher.png) ![Music player](website/screenshots/music-player.png) +![Customization settings](website/screenshots/settings-customization.png) ![Assistant settings](website/screenshots/settings-assistant.png) -![Display settings](website/screenshots/settings-display.png) ![Compass](website/screenshots/compass.png) +![Blocks](website/screenshots/blocks.png) ## Installation diff --git a/app/apps/blocks/blocks-app.worker.ts b/app/apps/blocks/blocks-app.worker.ts index fb4ffd3b..2b570197 100644 --- a/app/apps/blocks/blocks-app.worker.ts +++ b/app/apps/blocks/blocks-app.worker.ts @@ -46,6 +46,12 @@ const CELL = 12; const BOARD_X = 60; const BOARD_Y = 10; const PANEL_X = 230; +/** + * Height the layout above is drawn for: a min-height window's viewport under + * the standard top bar. A taller viewport (the status bar folded into the + * switcher row, a full-panel display) centers it vertically. + */ +const LAYOUT_HEIGHT = 260; /** * Gravity starts here and speeds up with score (see dropIntervalMs). Slow @@ -601,7 +607,7 @@ function paint(window: BlocksWindow): Plane[] { } function paintContent(window: BlocksWindow): GrayImage { - const image = new GrayImage(window.viewportWidth, window.viewportHeight, 0); + const image = new GrayImage(window.viewportWidth, LAYOUT_HEIGHT, 0); image.drawRect(BOARD_X - 2, BOARD_Y - 2, COLS * CELL + 4, ROWS * CELL + 4, 120); if (window.phase === "paused") { // Hide the board so pausing can't be used to study the stack. @@ -613,6 +619,14 @@ function paintContent(window: BlocksWindow): GrayImage { if (window.phase === "game-over") paintGameOver(image); } paintPanel(image, window); + return centeredInViewport(window, image); +} + +/** Place the fixed-height layout vertically centered in the window's viewport. */ +function centeredInViewport(window: BlocksWindow, layout: GrayImage): GrayImage { + if (layout.height === window.viewportHeight) return layout; + const image = new GrayImage(window.viewportWidth, window.viewportHeight, 0); + layout.composeInto(image, 0, Math.max(0, Math.floor((window.viewportHeight - layout.height) / 2))); return image; } @@ -639,7 +653,41 @@ function paintBoard(image: GrayImage, window: BlocksWindow): void { } function drawCell(image: GrayImage, x: number, y: number, shade: number): void { - image.fillRect(BOARD_X + x * CELL, BOARD_Y + y * CELL, CELL - 1, CELL - 1, shade); + drawTile(image, BOARD_X + x * CELL, BOARD_Y + y * CELL, shade); +} + +/** + * One beveled tile (CELL - 1 square, leaving a 1px gap): lit top and left + * edges, shadowed bottom and right, stepping in over two rings to a raised + * face. The face keeps the piece's shade, so pieces stay distinguishable by + * brightness after 4bpp quantization. + */ +function drawTile(image: GrayImage, x: number, y: number, shade: number): void { + const size = CELL - 1; + const lit = (amount: number): number => Math.round(shade + (255 - shade) * amount); + const dim = (factor: number): number => Math.round(shade * factor); + image.fillRect(x, y, size, size, dim(0.8)); + drawBevelRing(image, x, y, size, lit(0.6), dim(0.4), shade); + drawBevelRing(image, x + 1, y + 1, size - 2, lit(0.3), dim(0.6), shade); + image.fillRect(x + 3, y + 3, size - 6, size - 6, shade); +} + +/** A square's 1px edge: light along the top and left, dark along the bottom and right, mid at the two mixed corners. */ +function drawBevelRing( + image: GrayImage, + x: number, + y: number, + size: number, + light: number, + dark: number, + mid: number, +): void { + image.fillRect(x, y, size, 1, light); + image.fillRect(x, y, 1, size, light); + image.fillRect(x, y + size - 1, size, 1, dark); + image.fillRect(x + size - 1, y, 1, size, dark); + image.setPixel(x + size - 1, y, mid); + image.setPixel(x, y + size - 1, mid); } function paintGameOver(image: GrayImage): void { @@ -665,7 +713,7 @@ function paintPanel(image: GrayImage, window: BlocksWindow): void { const offsetX = PANEL_X + Math.round((previewBoxSize - (maxX - minX + 1) * CELL) / 2); const offsetY = previewY + Math.round((previewBoxSize - (maxY - minY + 1) * CELL) / 2); for (const [cx, cy] of cells) { - image.fillRect(offsetX + (cx - minX) * CELL, offsetY + (cy - minY) * CELL, CELL - 1, CELL - 1, def.shade); + drawTile(image, offsetX + (cx - minX) * CELL, offsetY + (cy - minY) * CELL, def.shade); } const statX = PANEL_X + previewBoxSize + 40; diff --git a/app/apps/pinball/pinball-app.worker.ts b/app/apps/pinball/pinball-app.worker.ts index 57c6a5ea..9881d602 100644 --- a/app/apps/pinball/pinball-app.worker.ts +++ b/app/apps/pinball/pinball-app.worker.ts @@ -63,6 +63,12 @@ const TOP = 4; const BOTTOM = 256; const LANE_X = 232; const PANEL_X = 310; +/** + * Height the table and panel are drawn for: a min-height window's viewport + * under the standard top bar. A taller viewport (the status bar folded into + * the switcher row, a full-panel display) centers the layout vertically. + */ +const LAYOUT_HEIGHT = 260; const BALL_R = 6; /** Ball resting spot on the plunger, and where launches start. */ @@ -894,8 +900,8 @@ let staticBackground: GrayImage | null = null; /** Everything that never changes: walls, guides, slings, outlines, labels. */ function getStaticBackground(window: PinballWindow): GrayImage { - if (staticBackground) return staticBackground; - const image = new GrayImage(window.viewportWidth, window.viewportHeight, 0); + if (staticBackground?.width === window.viewportWidth) return staticBackground; + const image = new GrayImage(window.viewportWidth, LAYOUT_HEIGHT, 0); for (const segment of SEGMENTS) { image.drawLine(segment.x0, segment.y0, segment.x1, segment.y1, segment.shade); } @@ -995,6 +1001,14 @@ function paintContent(window: PinballWindow): GrayImage { `${GESTURE_CLICK} new game`, ]); } + return centeredInViewport(window, image); +} + +/** Place the fixed-height layout vertically centered in the window's viewport. */ +function centeredInViewport(window: PinballWindow, layout: GrayImage): GrayImage { + if (layout.height === window.viewportHeight) return layout; + const image = new GrayImage(window.viewportWidth, window.viewportHeight, 0); + layout.composeInto(image, 0, Math.max(0, Math.floor((window.viewportHeight - layout.height) / 2))); return image; } diff --git a/website/index.html b/website/index.html index baa2a341..0e943e3d 100644 --- a/website/index.html +++ b/website/index.html @@ -63,18 +63,22 @@ The music player on the glasses display
Media controls, working with most Android media players.
+
+ +
Customization settings
+
Assistant settings on the glasses display
Assistant settings, edited on the glasses themselves.
-
- Display settings on the glasses display -
Display settings, including screen size and font.
-
The compass app
Compass app.
+
+ Blocks +
On-glasses games.
+
diff --git a/website/screenshots/blocks.png b/website/screenshots/blocks.png new file mode 100644 index 0000000000000000000000000000000000000000..53c7656244b00d60341a3a1deca55ab5f536df3f GIT binary patch literal 4564 zcmZ{ocT|(hw!pzIBp@AvbQGi$AV@DCRZ;1^L+FCiLJ?Gigib(u5kpe}>AgxvLa)*h zLvK<-M_-QX-goYL@7%w>`F5LGGkbn}uL;w9tO_Q9kPs0Ofz{QNw26o=DH0J8D_tQ7 zh z2}^rF-Y+6bxeAeMKt;8}niv%`gE9O#q-L%7B3P3nG|#etxWW${YK?pTx?Mh$(~t#i z{d)K8>|(jHUgRhvV>V;5Hc$@!QbcNCKJd7)Nu=I`2yH%atVPVpuhU6&&pu$LmfmUH zgMwXNX02vl2&elhVsI~K@)j{;mL)*#5*h^7Dq$mmDYYQEzumg}|AjYz5IezDih$79 ziVW*(3w}@h$#4G4E8GWUhAIwuN5;goOFw1g#qdDfPx9;gurAFDeHiD^g}%m98e~yJ z?h8jpTi2DXv3LDYOKYg^$5ur7} z+3o+;#4^r?Ti_p0CeG%g!;QzGMs23H-*_K;X4byv9MT*rN$d_YWxng*qK0OxPdAhu z)%Al|vORc@$+D{X;O-j>t_5cZ&FH{vzsC&@YnQW;!f=ZF#y+W#IJ4t49=Qa_Lh=NgHR{%3f`&?(-v+f4< zed%2}ipZ=<)R|Dm7iQ!zq<+TnF2=H)IN4z~&V$(s~=~*vqU!vEHz>Iw&EuFy&l48CO4tSOr$saa$wb7x1N52iBE6)r zEmAQmnA)%VLVEZ3sySx~TR4tBj=+>RVE!09t~`(hArUu{bQAepg9*y6v&wd~-v-ej zPr#rlQWVK+Gg-#T0|_%exjx}PRsY5syR(_iu8!QCk1S_%OGm#0`~Hyjeg*bjtmA1% zN|$D)OD%jbtY|}W|JQr*f6o0s*rpbZIkbl<;cXoM@GcI{J(Au(#%j@Wk8xd|9wKO# z>iR`e7!EMq06fqI{Vg=^J;*5qz%URxWtW_&0~;lS^vn#ozy#FR{?cf{Z?OK}PE9Yv zcq>V9GTX+^8pjcgqSvwR38Pz11Ph9Ri*8Z3EB9GDmBrl|Adr7t8l^4wqFbs7XZPT% z-#njKz6y)3HoI)727x4=aE4ODlwxlKl>g@Q5ggn4gMe#lq9Qo;jJD2S=&k_W_R=H_ znobp34F)lrir=ovZSw7>C-QZ& zH^0q2MLk^4P3-en*`eL2+Wu_2G2Ou#WumI+f;{XIjX{bE>j*C0wYqG2skY|?Jv>}V z(Kqw6aFQpl_GT>^=>XSvnJm!LSNmb*M`1M}xE-$(RLX=_LN z9=!H3Ox}p^!Lb0-BO7W13z)2w&11Mou(Begl|10l11UyW*2_vO{e&`8^`bUh;i;Dc zcVo3Vi#s6o?8f99wt`JVxMS-*KuCDm$)*2IH3wDOFp3bf zz{JJQ%Hm8>fq7P@8Upv=Ju+|s?szsmKizz5VT7?~zz6#+Z1+Qc|Ba?DnjfrVw^GtrLr_f7Zn zQBSzqp~ZH^ap&;xFmdJDl+CKk6YSh6tNU%SSq4fQR)q13Hleu^Fq7;#FRUFoWd*o| z27|Q-3>ivbV~D67S#);jfO^VBUwWbn6bV;`cg#4J3TUPkZJ(2lp1yZyy7PQqFk&y< z<9<*AM$5%D@ttRfwOieAVol*4$&t1FVj_UOFOpfs)uY2&u;yRD7(rp1u}Qt-K$;Wg-+juPs=xV9{GKf0aS>52L%tJV2f#1w(-% zTlD0Wk>Q@}n@L}$otMobXOw#CLei${x-{Bl(B-_7>uLa`M}IiVGdPLv&MqYNRiWKn zN4LS|!{U?4$OywuXpUL4`R}LblhN+*xG4 z5sK1si$g*ui0&g4*xARS@xy~?U%EE9LqQFBz20mj4N}`=T_m4rN=VP05J{<_vJeAu z#3o@(l@l=_*Tix5x{>u;ZWhQbO+xHa4Jps6WEWJrcOI01pBT*a#oGqO5YZS~b(rR; zYC2Atu{Jshx6m&;E!$ciu4*bw7qquq;IJO)QET&}4>ecRbC;i{9hFTU8CW;FHVz` zg2f9!<4g&ag_JTW>erQ8qYn78dt*c-=LCAQBj^C0jj(!Kp^hgAWrE0so;d*4oYc0` zqJDJVu4$t_-KIsVKZ&oA{oPUiyY`@KTn-9W-QI>{dzbvKuvji=BK5CEV@cdU|E~n} z$P`vVKw6JxIo(01Y`Z)gNcd0g{l&Zg+N%CdH}}NIiB7W)e`s zzQ^TEpx~H`R|SeJPHJnF2cD4i-B-M1j@mI&2?XOXEo5xIwW~c$&&vO}}@u|KDN1>Stm)Uegg*vdF zYnXzxy_c*Ca49NKbE0Oz7ZX9P48fJDJq& zANaE{RLj!$NBVuQ3>b$FYd(-RH{h1=*o3M@MJ3=s+PA5Yn+;zNf*)-1Z464yGDuE( z@<+4}=E~7D)11ikn@M|1;qXs02{y=jBrYVMANA8STi*ZR$wg zcj*LrPI{@(I*c^Noxu957BIdsv2h1A&;vBF&wmy>7(L45qp1_}Z0#B>ayku^c-z_W z6Yu{0*5g3!uPOMGH^)5}-!~kVDZKKmpwYnoV0_SCi#f}ez2a2+_hVCvf@5-2QPRGq>0RN5ZXWr4v4WC zR`3_ucA$z`r2=5@V5py8;;bcSvzBa#M0zjcBCpv-&v6}`f8|P>Jva=2d7jARv1#>b zt1`<0y@Cw}^mS7{dIwJ-F6Duy)8P92o57>a-GYqTK=w(5hVW2&W{A(WKbF~96|d*u*CLczH=8SnCm8|K%^J#&42 z&63O=6_5Gx#0na&$}c*uYdI?H*^o%bD5^kj%uiZ?;J<7EgtTR6eSpk#ow-S5 ziSHDb374pDjZT2m&fJ`Axr|)#IM!L+eNw)2bVm&QbpT`Rl{KL(}DW{?{kAPKPBo*(h<;+=8b)acw z@80lYmBFTSqao{(8 z{7``l@a!^mWes?;Emnac$lrAL5T$hWSA9AST|X{#s3B;1a=Ks_oe{9&5zO^7;l+?P zc1o}0R~M*9vn4=zafJMQ7beD4B-}&sBY9eLu%__3v`XYV#GCXfxG*>HIj69sDLYX) zq{4De%X7M9@H2QN;~_kpxN~`BxC>y2`Pr+Uw}j; ze)S#+3CFe;M%5%ZcQ-Gr#vI5;VT!&FI@skL=8c(QAzKEbnB|(2 zsL0|%cpovuKo2V z>-~E2(W_T?D2N}#t?ZR7MRAzN$uUh1Jp^I5fXu5%U2D7{hb2`53nV@K;_{kp8P(zF zBgvNX&#K3tsloNIVwQG8hD~kBC7;HD&(@LSWAM7y1FTn(&wn_7_Mf=Ocd%g{w$;1$ z+?H0)RY1?*t9}OKZl9H&KS>6uJ0#Y!MZN;q$?RHEmj@3DwoQb zFjREdzK_mz9ijRyg--t&Ds|r3$O6f8;8FBaJ+upp{v&lNk%juUnmc~PA0iTxW|Co9 z5@(Qq%~9!H6D@MxE!QyBQ-GoN(7*@qE>*2Kgq71{*U4oVO+axKlv8rwXWXQ zzt0eYPEb?Ub^xrU>1#ReZz1=&@*G9w^>27hUn67|)Z*a|g%@VrL)t-;LgQgSTHdgY zMBh%+T)PZQNI7FGIEA64s^v)MsX=Ti3LJoUeS_Hhfj9rJ`Rm=(VySjjWnmYs`$tT70FW5evXr0Y zwc{K)9{B|EZKPE5R9W*u+rhGEu{bRNc--;g%z^^NKNU2IgovcY94LV*-ybv{`76Tb zFMm%ChPFA{($f%}Zh4VK*O*B+p*fQC(ITvB4Z^p8NE>I!yB`HQ!h-aEv@dEYY3pRmL%jAl72@MQauml|w#{+B2b z@365UElxiFUZD*qLWK(yobf09_E(x50Qy-R;F78V1u2bH7^swt$@~z*`5@55W ztnN|IT((w5@A&efe!q$4CSVxqkhTqkvl3JqZlpX6%%xqS&|kN`O2DLzAN_4!E6mX% z6Q~!^c z;gT8t_m!e&b8;^Caw_PwE;1l`CEQm35Gm2$EU|5^(h5&`f3@)8YCs2;__=UoGC(7z zXrUu3bp8{=p}hZI$>#>nTLD1Fc$GMy+~~uh_pb5QY{jFpRt2`SpRcsM?LjZJZ0+kd zH)+3ZP)T2oV9PfhaRFkB?^q*d&B`7mcNe`^n5_ufoavqrOVCxjBXE$DYuKzYU&B)U zyBp+1Ix2I(yj7sm1B|x0W~fsAO{_lg+_7W%zKD&BLC2GZgG=kg^o(1CTiQ4={mSHe z)y<2ks7x=~2e>J#7`l;LTn_nfQ{;omP$sqr5W9O{^rQ!**XWRwpc^3}XjlJ%-nKHe zMiK_2iI;KN)A#o*`XIHv|Ei^gB=02DosN&7(U=Xj$k~olE8|`|UOL^lU)?TsXTbS^e0VGsf_4fH=k}=GhH{ z&f8rDr;(y%E8t*8Q8f0WhM_py>QeTEQsA`Xg6aF3vSKzq^wkqTrcuh>%&oHW-{@0V zD$@?5yUb_tN&p<(@00@2mXXqgccF!&gYlv(l~*9?o$CbLhjn{-p?VH~)?vFbVm53z z+IxJrL~c8_4qvxLr!{}o8v6oFdlbA>@nDlQ;5`hE3tQAF^(j9hGB{1W`!$y}6p`}egBI^fg{FscKqMj9;NHWJ z#=GopE#-WUPAaF6SHQP{$Fv7))H#u44r^s|;*$p^YQ)iqp1?3enohY2SzbGltMSFu zuN|7+*J}fP4@YaHNf?B*#78Zd$aKi?tO}ai z%soj?TGL`*U!MvWj`Z{JlyNt&=sBG-ZSX}k%9}HJq78^==wZheGNYzNpM>vGxeV*E z_B`w;d4r+*M0lMPVz_%nO#oE^F*7nvOVX)UNm_9*lmwb+29t=efAXj96h2ZT_3d&v zvc2?+*Ou@CXG5kQ&%3o|bP|TcD5PUpzTOkfBB=i- z@d0Wei)ql}6^=6w`vO;>^8-#04`Z*%;_;sE;4S_!_47Dm&4f@U1E($XsrRQQfMAta zgZo?I@6B{)Z04_dc8G#!bczkO%M9YO%p z7HO%w7o2z8{?VCY)*Pb<<)1PhPAexJXsgf)Oc7vqPDUEh7;~W4-4bw&ECqrJq4o)TBX1 ztpp=;LDO;9&a&1r`JFG5iZ^km;;pwHHZWl-ND2{YPE&f5%+4mvMjX^KgC2MU|A7Lz z?g*VclJ`)s*odMrM~{n*7p9-d5hB-L;&27g$tGA}1y|Db?DtZF9!be#3huA{b_il- z`xs{OoP;#t)xH?hzL>+$V}t8h_se&+(Ga7D7zA)-6fbF zo#p~5t0CpPZ|6%>Bb#zH1(fI) zRz{yPxc8crv?0>sg2`Xq-nPWtBBBgL69n&LEdh1}FxkSphmg*?fp_x%KBYA@9ivcly+H;s6zy>Z)&BbJAFwTZ|C(CCfuh?d^3Kn@{uUB2DA7+ zBXEt1g5iF-dzyjQFPc|(pZ`HDl`V490l&5~Gb3_G^S`|8yBE*24ZEY_H_`h?*TpFm z*wiJFMHbM1jL}Cs_do->V``v?X3tu`07*JYS12LF@Qcnh2eNQ=K|spUQ4l%CKK>4` zxhi@apiC9gjI2q>hJD4oD{Uh}Pdzz7bvM&3hr_#@wPwerYLNV-XB1<@Q_PO5t{dt$O=%G6c8nlJ%E^4Y}= zerFs#RO#0hL+h-uN%5`)1(>v~jQ6_%o-?x-Bx(mMjN}yId3OlD9Lc=Vu}PiJndCGO z{C42`TX}NL4I7ysT!cOq34g#Feyvmx2KdciAm-&Pr5Q@O_UG!SSf-6KNT*3!vO3vf zJM~2%EZ6mw!i9lrC%c=9BA1uxJ?@5bgg$4CU9~-cWfM@n;y`vS%GgXwrCz12Ye{#@ zG^I$GnhX9YpXRB(&o1XE@7s|RR*%QeN%vdMS2Z65_m9nuP#;mF9aR>mK;8Z`_Ho7> zu{U$bl%1sPPSYxD7&0{s9V;4{X{Rel(Zid>GZw82&ten~w5H;9^k;&aA^0;HV>2-> zP9l316YYN7)UuKx%287x5#tcC)?{mEO+kKRI%uzwOO$IBSfoHgfO~bZ@}*_#VgwJ~ z-*?90p)A|ky2MS>>#KZeP3!7QcS zfw6i7%5v+B5m^ZIX$!iDSOT>i_Wx3_zLExaSpp?E?c;N+2K8lpfx}iwCur|MlFW3$ z`?Tv?rmuo{k@aj?d$3|ah(){XMlfSb&)nbxn@-qt0k`DFUt!>i0tW3!VQI?X&DJuT z{nFb31XQv>_m?nP6xzmRdo$|TMgx@={UxT7-RnjY+}SVHn70 zCIn%kwSXpm*4hV$Asg-kN@31gW%Sut7DUhRW+t`Kt^`6n$-3Xko4gQ~l3a7Ly1?O3s)?wp?Ydzpf>E$$npxFlDO6E-3=R&F3qLEQlF+|{4s?aw}Yk+PsndU<@!)$1)OM| zFYxj94=_(9jL={v<6z$7P2MbNB!T7-uArNy5$Bx{2}{+~LZ`*qEhx>w9jH$0JbC({ zxPzch6zO=9#lm(ZTnO278BAGd2M6L>J|5mSYmIkT;&b$czku%A?)MmHO7eco(uMyL ze)U3J_BRuXQv~4$!s}?JqDsxSQt#PFJ(iGte2>m>C=-6#5=mF+Asdz#QJk9f@{vR% zpo`4egOTL~X0{#MH_XC5RB+pauY}~M@D?&)*PrV{OAVGRUf4wNhqje?2y;>g4d=i? z^4ay8SsQW@16~Y3Vj+@X21pVd<8x8su0MWwu2CR z)P8@WAO!_I>Dlby;*m7kQ8Gr&9TL&deK`j|R8!HJ;dfNWHH?xYzmS+!|L%`3<4Lz5 ze@UetPErIzR_0Yf1LVIEGvU1vRzsNZm%+JU>u(j!I^V!F4`_k!aGbk1LTRWX7S}@w zsoNGU?uO3i>F_r9QmLHeXXpF7J4$N%oHu&1_*~R^%FBlX&G$3g@7`3Eswh2VQhEKZ z=xTw=XFh?J(a_wayd{FEBfUc(c|s8myVo$){m0BopAzm2q#{6PhLz{vb@cBnvv+(PA3!;&A7UB!qJbSbq+{jEy=TvCdSSKSbTN zhbz$%6CRln`eS!_#!G~x7bm6s7(VbKX+vD|MOO^vmpF7iZsEaNoV}{)8Qwr!GrR;e zXMc5N-iBPs02KZuLX^Z=cpr0eF^+Ityh^%}(#YZ+Gcs@{+-x9vLoD08pyr6#Xv&^R zEp|jeO;dG-WV{OIP8Hk7|14l~t!;#_MuL>*pc$(84(QL+U50eJYUB)KUz%w~ z9dT47y}fyRV;Sd+QP;x>+6eHu3l6xxoo)6k8w9DZru?1#cVAMsm>ZI7x<&{+Ntg)z zVOl6sTW~0v{u=8VK(wV_vU?&^*nsWJp;X|j*W9+okKe@9XYV#$^#SnU`#Eh2pU~?s zYqmw3s*Hgg(H`2ap0Ca;PL)Cg;%AxFMrh?XG1&fN?>N>I-%#Wuqy;Da;MWec@6D*t z9lZ84#!#dc|JL%bge+lvRIs3r0-Ao~m4jw`$Ay=%`&+gXGSk8l2;c6vd@+zm>o=97 ze-=~h3PYksDym__K&I^S#f^LO?XkhTfpKCx2L(gjoPUEN;qH=vD&Q(-3dH+=S)r+thQB1G(~F0~E9j%g!likc zLo6lt>b4jw`cY2+SJ-V1p24~OO;fJT@n3s7H(Hg@Cht?!w}UijZW6xwTnzh2fSOWK z#b9voXGf9BPcO06oEfr@o_ER(Kx3Xl9tZiJEU70M9*T?|PCoYFvUTB`c^S+f=4W*w zdU29W*A#rw7vULpdHRHZ??8-R!anjQVOmb1dh&ZJ@*wK#tAps}yJgm}P*v4UyDy4^ zY^?!jzUKAev6syq(#QVqPV)|yKP@k*YpzvWnx>cP94GIpzN5<&2WLQ|#=v5$8D%=PpmFQ9fH2RI&GOeqkI{_Xysw_*516%s&2nrpc-9 zp}mHraA>-`!GVA-8E*gv*Hoc&3#b%Jzx0rM^uV46WpXh_kCc5RZx!K!PmbU~@inyF zSv=v||M1X5A(C-n2IZ)sLhnV}r1&@B1r~b2cv1f##3jz_Q@Izr)Pi?ZYM-EkL6qTE zZE2JEkj=R-)^+)pDA!`>HFgoHuYj2UaJsfP*U?9 zBthUMfk)o0{BVu?IyD-3fGKUd#%LApVR%ld^SllJ0p#@Ud6`7l3y!LToD;2h@0Yfy zl#CJI^QWUjt%*t)3$8*zzvjb#afbAJuuxSpm4H(nO36wyUg& zb2l|xvhXo`P61BQ@0gAmyZyDR-5esx5Ng7Z=R~8}p3dY@s7UzRH4&aLy6u|a+OTY4 zfG?}lM+N+xn2I8nu4?AJMN%icXejKJ#e$U1E^nr~IFRe{OgZ9{6PHoQ#?1b9st0ST z5sX&L$uM{DuOsk{M~IN~65S}kLD)|P6&MqbB z_zvBq>u#JRUnWTQd8=BFbc{c`ddM+NvFR;W6t2s-h>y!>{}K`{b^J~J?m<1 z3+39C`%=w`e=NKc)ZOm`Q(iJV6I&NWqj%fJYt5rc8>IQu_9UbUgXCjNs-Mq4Eg7UN zE2b;%yyD~eWWj&vV#%*v_UD5v+vcOaXIvis87}j#-ny>B=F0SRJni4Qj-!&ZY^@Z2 z8T-Y<_a&UJa;nxpzVg6J?$2=t`#cx+nyy?26sQk5j z!rS80=YpSLk@9I^*ih5@o%$RuwPU`o{42eqL;kMAEc+?GHjmFS)JEoM1jnlG5}j~w z>0wHSo_2T5?|4x{R%;=V{Gd8l4|UkXoaOr2_-o4~d6NZ?e)KqAq^?4bHIujU;h@k? nPy$RadAwm!^4UT`#3cjOcL}G$x6HEt{r+gF>to&kc2EBULwGrN literal 6318 zcma)>cQ71|)BhzQdJ;}MLUd6RcRCR*>Jjy{s8IYksHmuz4fJ))si>~P zsi>~-Q~z~PomMW!Q&DmG8|Y|S2EE!Ua6${~g$;QA@%r>-i?>y>Pecdwo9QFij4fDy zAP}pSZqf##zuHEvAPfS91y09O1D+AOesm`q=#wOL^Fk7@>KH1~El1JK(ZTrct4K!n zey^{U4d(AizA3(w{bjXl)N%8JMa1c|i%b8bO|rv!NXu5?`g+CsefuTjFyFIE zA@!GYO||Yg+QcFvYgrl&K_*{*-ySS$9}8nh+JYDxJ(_DrXyJGFR;QV)dP0F|L{Hg zGikASUU{KY$`Fra8@5O9h!T79I?X z5xruaCug&;OK{(vvQLfGeY-}Lfl^Ea_0zpw4wY#9R=Xe1@;B)(40Zw}R*Q9JEGM5{ z0saS<*<%+Z4kkEx3Ewc99Gbs8?R&_-oO}F9HU1%w^d)0UQ7GRbpD=b?I3k-5V(~#J z{D%LEQi&?vgPpBwZ&1%y-_d9tDz162wa?Cz0(dTAHm;dMs$B|;baR5*N9TLD4y?yp zfrQ7UH>=WB!t*~kAC33AjTPUD=Gg34@8ZM{6cx(+|@4IY*@*!|+IPYXvYZT_uJNPEcwf7W>p zNg}IiD{cq(_cL-95=p0k*p8$zH+_E1>4*7m|Is^FvlC1`F=@+CUY*N#bf*kSCeM!u zYZ9AuSO+$J`0dW@1w(}XT<%byJ_s(`BeTu$zzne~^#p~b3&0CBe@I|qbb?25NYUc} z%KD|9?~H@CIA}fB%Sfkov*b38lNH|VHb5rbfYpQ^=dheoJ(|vceNE|SnJi&V^~c@H z;T?}|SRmS((s!<(>Oc^;FNh~Ej;UT5Ar!^mMnj-(93an?|K|$-}`*z6Qbs41lPlc z`Ip+~F}g|3i4|$+{gW{<;8Uo`yR>K?ivujS@X@@CQ7czOoE)gor{tgH_sEwB zBhuJ2b;_~Rj7h-rDM*dixa_ka`ANx;nVVl;zsfM*ipqep!p|adsssPtjQw`$Mr4#wMpq`}!>$ytWx!^F7_3WSIY{V_%%$u4*rK z5-~WW7^qWKX48tE`XZNNkg(Z?DQHDsMyzgG$FF7Ie4wT6O6a(&d$=q*?J9Fyhjw-B z6-K%}2pIfHXupDXJZw!&{B^FBKME^N6f8C$VV|p14*^O)M2$r)GR<9{)4m|dot_na zfHb#P;$V)gfyQo|AT~ul3yGs&YR2>|Zlg!GEW}siaP+Qb{Ea`>9EoOO_gijYjDPK>&b2gj{2|`CP?_6OD~fZq zOsJMoC;WNhIGkhitZR65`J!Elt#rMuwu^Mi#%?D7c(+PPMe*+4^0^2!g2uo5-2aF} zjC8nqV3&#wR@(cyjS!%o`X1zh#R7|Dd*vU(*P;@>{=wg66ew?z^~~`;J#!L_Vcl?D z_~-`*z?Yhr6DYTyIuz-j4wqcq!)l5X)N%JVrqAolTpg-Re1#wiLl`_}uK(|RxF0+e z2=Tc9*~=zCeqwCP?|_A1FGyYglRQZRemNmv(w_XAtL>0|ZfpB=r~DYF-Bk4Geep#j z!6aBTQya;lI~@}CAuhGp8m$%Eq{lMnk@l}HetgmFW&!bvp6XNhfl_$d^af3M{CkDUANr@&62dMksI>zatar)=?^W0T()b7b(m1j567R^m6LMxJS`S?= zfcR)VlC;Vy}Iuo~Z^?o@}nJ}hp&eVF!WZ!@H zTllM!8hn5h(yc`gOFE)l^lLW-2|}}P$ST93J-MgwT(!AC68S&PO{LGS{L^iBtV>)* zDIm`FFD3-)GqkTmDI=^Z7Xt$I6Fr?UnZp0R;{VTHReACv>}hq(i<$SU%KIVhPg4O* zK6L-NXT)cCV6WZUKpn(0I!$z>-N0Djs`itUHnv z^h8Ix)k0(({(h^5(g;GvREabvuahzj{>@)r%sM4y=Db#*SG6$fH!oYr`^YR>X~;5F z2Lgh_`e6uUp1$h=Dca50%T0@u{ma&j<6c4xth#JNurz_j3oJ&2oq8=xmxmP%rv2(DjA^95Ymd9SR%vBKd8 zD{q%(-1Tc3aOzH#3ihkX@(4sKy%!>b(d!IqwvZV=zBO;4)4FL(&tI{_J)U+n(N9yR zb#Swde(-@0&olpprS0=g>SW7|6!DRC39fm+dk#J3?(nXEHNNNhSr44#)g+1WDLN11 zdFYtE+&}Q<3rf};)Au@ca8JEOaeD7S{?z8#y;qOajN#5>04BD7OP&xkx))e(Z1ckM zM#`tLC#q~TV7ZU5=u>+5k!2_yH6@u!s5j`UtUjxeRHof6?F{IpMp0&V3XCH$XK->{ z1g}CW6K&_Yzuln7YAaM)_!vp+Sg>{7(3u^Zm9cp@`95HqEuU~7@VT+)>N=E{`CbY6 zC>pXX>p?N-(*Q8`ktsuQoTARdJu|#pOtSaG5OJoQ{xfwxl99~eQL$Ak+Sgg!PkBHw zhu4Fpi!cT1A=0!8j?4qbU3YN@_s^aVugqw_WAt)LJ=|>je{{&$6)ojCC__2mSOpblp=r z1E5aYFB3z8N+|cHH_A9 z%#fUCo%lx94ekX^xoiAlyZ781uLQsT%Gvn?4d@=dmay-jj!Vl*ims4sgH-&50t=>F z)lc1>41QGn1rTzJMT9bsETWcFTUKT(w~U zA`CKR4ptJY)haE>BZ?*ffnUT?wJv_z0+uj?xVx_3TK2_Dh96@6;&mZ(@4Z|rKL1r-u2@bzSO=K%);`oL ziV~@tgq%*FRG5=Q5bw5cTs288E_+i| zr!tUgQQo^QtjM_AdlR|DxNh=1m+iyLw_n3|^&-G0@j47gvIE4gzRI!_E#E6*4#$mU z4EaSwK}HqeQGjthPiXIRGdEL}hRGrm3>j>E6xErg8R_KWg_1?~KcT%%xDj9|E-PMt zun_dvD<~Gg0v}9&*6_okuE6D$p8)*^13+Bx=Sf(qEfA;x6p>Y*@;^yz36SBa=-One zulkc|Lb73z0K+<)Hbq%E#a%wPCt4tFJG{|SHRRf~l&L;U&X&jrEnBG!Pp!_!F<4{M ziSwdFywQp@23q4nFs=(G=;OHR{UEiGRWSbSFGX5<|xPe1BSvU{xY9`W^83!y^F~V$#HW-pZKMztm!qxc+;(9%s z5|229`@BqkSXj4va{pNP(eD@EbiA?{4m$BozXM9oSqLG~>Og6Vhv$jA&b1#;psShC zKB*D%W?qMtk4^)2{Ba0Zatc#@!~zhP;>0S8w5FXTRiRLW!(xuW5psu0sj+Re*RyET zI&n|pQaQGG#F*$6nX(!CK-S6WbBaz6BpPlY&WIK~vV@V6a9S{r7c1Zl zc2;wyfIv=90mG!XEdbi(J9a)una*cTr1>`!>F&SQ?E#MG)?_P!4pITUunrkNfqkE& zEO1b+U}cyG19zIg=5(FmUwlwu5uhz*%A;@~YzxF&xWZOY*}6!xtVUm%mEA+U;xpQ2 zL-OOWa2OK#JCBm;m0V#eE17h&Hq5c4d*sdN&FGQtAfAVykvDR-u@gZY$W?o|*d3X= zTGRdqj3-o{@RitEQDpOoe-aNH&`1;Ef`nF!^Jeai{Icc7c>`itd*9R=nIBQh0w|_r zlwv+E%X26`T>6Xo^8pDVn5gc>a}5W!9tcT0icBPj`rcOPcD55n!U~djpzOAWo6y78 zw|jF@!LgJ?4kYsV?x0+@`dJvY#MjVli9J&~loYG>N*{ZI5tHprB803hMVmzfO0MJ- zGn(VV4fSaY2!q6?dEBx%wO8GcZoVm0aE?L`-;l&n>S1|{<7Vqd+NmOLvza`}w<7{n5 ztPp-0G81Ke)_XMY-xl3uDb~(Xx_k)jmw#wbAY5}6xoPDCEMxb!G+c6 zKr*AVB=m3$n_yu7@{_*}591VD|O7MW2r6m@0Wu%Ig5IKrT z{}}V)s?p4IE{Y%$y9vE5nVUJ(9`(Ut8>Bj)!dn4v> zJ-ESsCes^Ixp76(3jUGnYtzhzHeaoGd7M5eRn7RSSJ|N+wefS}l5m|#1GjIucv4I7 zcXN0;<3ui+0ksNe#LV-Z&GRR&C%R6YivZ*p%8Rq4EQU1ioF>HqFe zh`yVMGg!&~m-*HlzeEDMG0wsK&bq-TH5xr4yjIaEEHNh%@A?C-XU184F^8x}qUn`iANHcRLvJpE*=8%{lWQ1u}yS zF1GQ^49Mw9A6J8`p;!|GtOv9`lcN)G-ZmE7qzLA=P^7<_Dg_1)>taoA@54U4P9I0y z1qp_uLa9KXtxsJ@V+OCDq=+!;u>bn>a+Y*FkX*r!YG}sCj#v+@jDjAOM?wOurmUQG z6Hn6nv=8Q1#b5uXmi7c!#z3H!X_*@C`SL=D`ScfX!Um$Dh}CA-$mqS6!R&kDh?JFm zRztuD>`V+3ep0HXWkvsL76$S*Xl7qoxbU9wDY@3Ua6Ib`E1cW3$SCifNa+(gZ6sYG8A?qWqh9`vpHr$I)%R$x*VGkx3%!XWlJgML zKpF|5&u1dkIK<~FQBVqwh8eV{d*x9;D}sd~n!nyNZ%RkBwSR+5j$X|TF8lpd?%Jh~ zK|uQJlIm;l#e+U_G%?rA^-9YecO#Uox~ZhtpFxy^Y50o;viKj4 zvVI++4ZUP38;&n0zB@^vIxwb|47a8swgWA z$i2v_e*RaMi((QF-!Jx?ntkAH%*-?UdjdBxU&|u_CCi8)a$quypS-AXLz+s+fOkY7 zm$G!aZUcW)EvaRrV#0S?%h)&}pnu@-OCFkic zCFZPtC?Z*^BI0M<~ur9QtwdooX%T=>GziI2vF8 diff --git a/website/screenshots/launcher.png b/website/screenshots/launcher.png index 58c940ac4b443d6c0d6d160eb367e75739947487..82213cf6009496b0e3afa058cad09506494bb3c8 100644 GIT binary patch literal 7801 zcmZvBWmwej)-}z53Nv)Wz|bj(AR^$88bV4^y1OK$L>#0Wq+<{ekQ}MocBG~dp+;Reee5P_rBKpu=c)pgoc{p17bR2EG(=CN^m(XEG!%V3kzEg@9zN? zZ_I`<78a9?lH7A`->k#zw@wWGUj58(Hr?MSZdcgfh11hF;&DZ?XmxgB&-bZz=3Q|n z7@n?ZCgX$jd(9-&MnQgWM^l$Z7_N@j7_^Ad)qD_*xD`+-=-bo$gEu~YS&{8 z6Q89UmO-)>!i*!IIXC>!fm_~JH=nhh-KfWUL#bR3sKG6tK(n_Ho*&644DN_TGe@L; zh#T#TLHlJLFGa^X)27Z^v(r{65q!Gj8Quh9ObvWWBFzU;P^R7l9q{_K{m}pfA*`KW zCg9&tWa@wmQ0A~yOt5GEFn?iZGdnpf5a?)gKNvfQ4>9Z*0$)!%wzo-L^yS3}3!SVz zG6;vOfBWG;-?Aaa)2XS%Xdv7YUGSLGiAb{6PVL)lZZ1&T#QpLD+{wz{`>2imr_5uZ zFX+#M!uwkF4Z{NOW^fnPiJQEyJSCl<+GwJZ5ffJr0>q2_Gv?SeVp3vN_pGb}*^*Hl zp4V{0^k`#pGQdZkd4EF_tE5#{qYQy8L(ZhZ3 zz|Ncy;d_4}!Wq6HCYoWV)%t2JPf!S_owgJM8D*Q%^JpVSrzJQ%c1N5C9Lcm-ik{=F9#Zfq&TwNLrz z`yGDyuyErKKM%;DA7wq6E`xp5xINqRa8{Se?S_ws=m8kON4OBFp6RQoi5i|MnIs!L zK(SS8@)$~_o>ELzt{{FH+Yd}kU*&+TTRw4-mvTMpBS$qyI=<4{=u4clhBY}Sa*zcu z=qTx^_sjXzWlwwfynq{1qMFY}ZUzW;RYNEGU8jyY%bJPKMXzsP`4%Ob{o%0k>Vvja z&Rx!gh@`;ik2#;EbSk1S9LasJ0f`}^T|Ul&nymQI{|3g;M{{?4gl2WWa-SgkjW4w} zf4EjJEfy70_XxTuOY?mhD)h6TEA#y5-@5~UwtY+9^NY*J7L`A2N#*1AmhIQA>Wxj- zc!R{-Bi2Xmbr~9~cFHzIh@5gNu?LR@|L`+Zo-2QA9+hf0nE9=&Qv8c_zAPl!OtrWX z+wAr3I?aM~i!GpziksP&Fohz+u+_RT<)J6kMw#RphQVxZ+nd&l6`p3egS;;9+tnqT z>Iw$IH9Y(^6E$Ut^-=l}gKwhz>9*T_>oBXjFOo9oL8Er4<`oxEB+Pv@CWSaqehefqMawXFtMZKFgBHpltGOC00 zvH1~tlYO@I@Js4muXBoNF4!ie*0^UI)GOVctNTOkh0|1&V+NY~2~x{)?}e{@NvmXy zZey_0_G3`w<*jBic!#mQsYm(O*33@}KFwCqI46 z(8pZy8kjN95XJTlo~r&W!H|FKq4O(pP|zk6A@rr-FdyOYYtHQHNI(F&nPHM&5_tx8 zz2O~+ynj1!SjmBYm!pQ=_Y9xl!_Jouz}w}JKq}5NVu~;OKRJe!pMywmR6n)4fmgrX zkf}hXkq!E9u<2J>hXub%1~#-;E*o@^nCmJn$VW3Wrq)rWm5VT!8Ml@wwGs6jGli*r zUC=OU!>xKyg{mP_bN(su!EyWD)Pod*bK6zy=Q|1PA8M;04F>Sy@p;0_=A)Do;64(F zVvGw0GX%C3o$Ql${UZ=fJ?hiXlGM@DldjARbhM0nd9CE{O_dn~JuRbNw`ip*#H6E> zZEr@e6~J5dWat@{x)k<)8fu}S{UG!jBQAp&{}dAM)!o)iM;2nCvZYrl8~;}Zn|=5W z+3*$OQHi=6;New&2Iz;e6w6w~6p@Vl8Krv@kR155qEgoFjytV#05Lf9GcjD2FLOW_ z92P`vnB5fsr0Gm}Lo!_+0%bX)*MDJ-w-Nf3YhIuYFb8I1yk5Wiwg0PKbm^ERO46{u zEz3#fjS_vB*&P9edglrPp-+mb*ctkXm7Ttj6_66R(jUvX&;97%a$PJrteJ8yf9MYc zGSD?E@1N>3G&>KhBZ>vPVL_(bl}ZOgdr4yY<%MmnJ{=UoqrUh?EzO9E8&z>ZRAB{&@wGCevCksPE~rp2TKVr%JH)-NIHv@RJEA-QRXeN zY~sIEj7cJSHL4kOyAZnqd#7>Z`Q?$x!fnVv4{lD^0r$Dd17_-N!om`{0uHNC!pUe# zmtoF&+7|(z3-Zfsb~6k@3Er_{M-jpbY#%#9g|U}}Bb&u@GE zeZda&UN$s-voy;n`>v0gEU!bdAMHxEd_J1{OD0gg>2=GJ>A+ESNG)Q{;aB$L>HYXn zd#5iCQp~~1{50!&+BlYVZL>DhKEN=MiU#&g?J!XHC}1x_V{dM*{`kSo+ypMv%1}RW zN4koi9GIw}^;~|4IM62Q#$CrIRjzJn;zj76VWcmGkZ!q>twxi&jZ2gO6X#|+8F4mE zR;3lY)c}Iw&Z@<~#Tcq>UR@lb>E}vLY?%I*mQ`R^09BK` zxVj#$a$cOqI!`PZLVzWC9gZPYuH={1)#I4Y!z~Y)EEIbdN>)FA_k|xh^5Q}%T4_VF zS?hL>gF$O`ag2O23wEl;5n$!O`S0XN0eUQ`t|N%V955+)Q6Wa4_t8ZPFyV4G_uk%< z1JMq)S+gNNXFdJM=_hO}gs8eCURkkl>tcN7s`|Ec85i31{r-lBH46e1Dfq-?v*uUnM+~WMhd;9tqI9|4QIn5noY9MzF#|u_zFa0|rgM-%h&atk^ zB2B7GLz#FeNEflJZP}WTC5xW)uMv{WW{o7FWCQLBLZF^J^5IDtfjfQ-PD1yXpQ-}7 z&B$f+W8#!&0Ao@wLBmat=&cdwJMddySw6a$n1>24*+iNqzt0U%OpK_0J2~HYPweQ+ zzOvTdli%6SO0%Ib{oadQIeXlue}YVjg4%ov(F3jP%~wjuu7AU}-ziL9`cwFXII6l+ zpZaltVqpncL3yi3)xGJddvwu#J_Vd*5{gz`WZLS7<4w-GHn*y>MG7|GN8lok3fP5j zH8{HJ%RzyA*B9PtVfG1_iMiN;XM)_jU+FkK3Ew<*Ve747?j(v#!Ui+z(HL3`f8LTG$4cJV zp-{Kp?773oqL@QELl8t_|FkA5h`m?go1k`^UkaUd^*q3Eb9>?q_ z2b6O|Y5W!;lgzl=88P9M{OTDaFe4q5q8(V3u}+K+!=!wsD`?Xvu5xz%ez1CUyVo* z1zx|R0$%gr0_rnXKtrLoV#L1CS_{R|dMgJFo3`Dq*gov+=geGt{_>~Z&`Q3`bkQ4$ z>rR7Yg!U#-qC6CglTgg^`|R2a9V~|rN2>sH?8AB8W!Ez_(8XZq4wKd^%a7gf4TriI zBPE->1_jhw5+Nb?wq#u+HgCq(2!{C+`fP~XR4GgsIG9n|MLFX}*@upndm|+eW(oJ* z%9@nKKQp*Rw1 ziKt07&hlm_^Q#HyR3E*olBkAfWZ0hxmyjfoD)ETmBTMwmGS8UA)`YHGv1*KN-SMs2 z)r&#qr4zzLa`_=JUSS8B{1du8MINFhgKW-s1HoYBb|N3x;|BO#uf3iy&`>ricC)!Y zChwc(=uk91R3I)V1uGe*K&&p*&Ji`{$|rl(8*Q5E!O67bK`$Q)avg;cCzh4P@nM%< zx*tkYLLF10a0w7ctBz`50y_5)F>Mfum#sg>2Tk$&NS3$}GNY9k?RqOoF0 zN&hfjuCh>Y*(g32;-%{xb+b>b1n>}5YZu)52y!=6qyF{^ol@9$<-9~Mj5cwSu%V0a z#!rHU)?^`3-z$1_3AXSP7RR<8duzvQ(6tTEUBT*Ywq+9sRb}n2Qk*CJ`R<;}qM=vH zUU2JVWi<48IKD~~$ul|?&{2DN3ki`=J_!WMRZoGC*wff`TdI`Jn;fz#KX7a%QPN7c z2X&G*E^iErIY^RVDtTeHC9obXO$NVLVAcn4NLb^UH6Lfm;f7U2c-X??YCIZL0AwzLfOH@!P-EWCbu63tlhM1scPisE8u}vNxrbQgj>O5)Lp;L%RaVFp$+<}Udz8E`#I9^->s`*W8MhS*8C zc~;=Y*(Zx9sn9aP2}_KUF2hMEvY~5JWgu-+ma-~Q)anAggx>-!ld&*v`h}Zw0p+iKi*v;R?y?&LP zXY-tE8GIiyh+R@9q>LzA@*Qem(bjMgS|#lAtBxExYqL} zv~#J?6z@wOatF|x?KrlgH@A0Z;FoQ)p4z2R zFQbiY)24is4jxq%(H1z&uuPD!-u`XfmhmakhIJBxdeK8ZZr7|zqk7-FCgcQ>Nc+Nm zzqdzHws+nN81U3N+MFXM5TTY3V?+<<4aHR?A0L#F_^cw0 z+LnE$lGT_&me@zB5F%xc;jzJ9{s`(Fl~D^vv*b>u?{3;2AJ$AE!*vrheYR`af$B*$ za=&XvDF=#m9tASabRz3$S@Smgc^e!CCoV>^NUt;@3#WUu_s2v&{`scLWob%<2dVgM z&bpqM4Sq*7svj)@qT|-U6N#0j?U(ITqD(cU14B81Z?G#J)TK4b?^6VYbMd-MCgW&k zEI312=rNRn_I~|Rg_LvHiHN6B&kR?^>l{0!Ai30c zjoa?P8$^J8xcmU}Hpp!(TYDB$&+oTkHrt zQ~SU=pt(J_sS8YmPh03kBsmz_799r*?6|@X(ct1uxtMn+)ieKeZG*;q2#jA()|(tm zUP$H=QIHWdd1uNa0Ov;9$O72Pr~6Jck!0n*4sM8t+M8 za_m$1?$VzYbUqQN95#OA{Z>%D-^v&DPSWBqiOB_?T9(R5&-dFHtKR%gQf}@3_2ff4 z6SVL>_k~?!iM6N<5lO3*+PJ{CUBn{;^`DFpssR(T=o{y*MHKnqNivh?G(i#*wGd`J z+!w^$hmNAxL5xXWd}oO%B1cp70xvWS$Mnkxmq-^$n!p3)9D2%SkOuViX}Pwb&v0E7 zR9g~13btI0GwE0&`4KU#xZV!i< zmn2DTt=SE0O!221G<9?S*(*Ahb$1|4_3=XXg&lz&Q~C11{vAL%gp35ANU5 z-h?b9b?eu~m@?nA%aqHrdy1iki503!;VooMTv0rbW*Lc;tw}cy@Qh@`SK;}rM!9Pw z2i|2)c^Aj>gIZvCc3vd5SNy6C(t`#nWk`6h#9HG>D$c3@*4Tp!>}MntClMNEhXCsM3ChJYjC-hG`_Jr;-feDq{M z1I#!bmEx|)`Y$e>c+n+%mJ-mvaIb+{<_JWQ8k=SWcnV6Tnu4er{3;Rn8qf~QM`*}t zy?~d+fLV8y*?@PX@|tW2jn9c7BKMJC@L^aL4G^XgcKRwA%%iE6k5?E8He&1e72ysC zDP19a832fqD75-95MIC=1Hu@g+;gf2!WjWp(xZd?OM7zGY-QGe z!8~RvoeYA3BOB1l$xE-^67z|L6~e6Y<(?!WWLoYKC?|iCw<|zd^&>pvL^()=u!n!mMdPC$IxcT(Y;*sAu`U28 z!ei_;ueNM-3wPdoK`fkdDiW&58~#4le>1%J&s3pnkK)3+$rmrl^(vvhfhJ| z8CGc3AYo2RZGSGxe@@L^J>Q#J#Upza!UkLabsX*=_u#1gIDGq1;pgvNICn*%QK*U zQ!tQ}vXV!t)iKYQ_3q)eKP4wxGq&6PEpidXwo;$EJpVL{aFWBN66a?7I0|1PCZkM@#%~zVYRvaZFgT-k+^U>ZkEjl3Gp-A@1YmF{R|3) zWO}*YGeysi|D1-z+gaD;r94Q{NUNqKLls=1Yc@Q+b1(NerToM=A7N;t(Ye(3FbK)Y z^ABP|KtO4}9Oz${v~_<5y%V}k0C~M)K;{NcT+eY@61~W6(IlN5ZLGA6713Ks5_D00 zn;IA}*xTE(%S7X{sc7-Nny{RY=AlG4>^k`1R<4d;wI5Ynfuxm`mJ zz^$0djl#Otb4&=nZ;E{2AOd9k=`N~#m0uNZSLzK~oo27E(s1}1aL%gg^wKr-XJ%)v zjC`D*{~OdCn6>WoG~y1^YN~e(0F!rZ_kV8XMuz@^e5y)=u(4^I)|aFxcK)R9rypI^q08!v~= zHcYKC)tfo>r_T1XO~r{7lVArprF884?Gs#3RK3hT=7^j(du?=vxM!@byAMQwuY}6D zu(LkiQ~iS6#Ylv{v&B0imF++Cl9l<_dRU~--QSZpUonk)FqnyM|9s$xjr=ks!mn2R zu5Pp}rSmIM+X4Ai3XAp{;+J`*acG6EZow6$kBP1?_*h=`9`IAqQ40Czmne%TTvp&NW#MRpI`t3mb;^f?5czj2Rej}-vMpo*Q;h$NRAAx||cUSAP?UCSd zQNKwlSL29 z@D}EBSh>84n9a`_$81IP>&G`Wh`wu>%`G3rV^f$;{S%D&8sjFZojaHID$S2RC$wc( z>^z-!i~fnngUH8UYeh_lscYOZ(h94Wq zJl{aBA2}U~cZD8?D{CsgF$oIMgjRt4*pTqTatHmRwcKf+I#g$xI{ctk?%Q6Yhxpmk zNQ%6>lWrj`(!Q#ieD96Bfn#MK{oehmD)TM%$MNjo!5G7XE##ur5H|b#9d6jE-|`Y8 SMe#p7WhHqvxeCB6|~jYVa&*$oheI1mMqzqED;eiWc%9nwNEtG z5E=?uX2`z8UAE}y_gw$wx}NvXoAcsx&UtaJb3SK_Gc(a+W8r6^qoZRp(AP%N(J^4@ z=;%cm{{nOoDI$h+bX+Y4+FBNm^EUG}Di?KydY9ApZ9`NN??1nC**Zg%pp7=8pG?2f zTx4ZBpn22qynI9w?tV9=NuJJjwFLbw16%_4MROKE$y=5dpla zpv97hvmXJbCTfWK)QGy9IZBv*_gX{k)NFIHQ@MRNo%Hi<^U+Yr zQQcH^r%Bz^lbm0(Kb|=bd>=Lp@$GOl)u4jHe9Tz;pKS>zN9z(F%eSMCrr-I5uI9fK z3?&7szmi6G>@SZ?^Te$yO0FvrSg_oU)B$%;ZgbOdtvT8DX-Y`Klj`a)W81#Hu=FQ; zv=&fwnS!>>95L-%u7GZg?C9bo5dlZ`)`u(-f`cwE%CheqiYAZxwm)2#+}$iym!wi( zs)M`cufu|aUo5B`sp=ev!vlK%bVL+vndQIOQ$b9Tg7&7qwVJk-2;mWP;IR~$f^0LK zLlrKtP#i5oalPCSp~)ZJ#il0e$|o{nfmT0)Y1h!!^3>mMG3zd;;etzt@jk`~Luw?n zAfbrE{K_JboS+F_uzKn0=FtIUDhN$JusxxwjpU(@9v_x| z&RMeA<^1*%TeNX0Eb87HV_+5RL*3598$584!4V!N#(4NIJ(>&I{aJ82FWtLAW}H^GLxC61V(Q|&FueM_arfdg8phE%1TxPy#4T%2!pV%j2TNVK6mV0MxgU-4&)ZTGZZL%LIy$_8{%{-kW>nIRW5 zV;?%Yqwr;8{+r%I6s|}xSp4MDG#fEY28bWH|6|j5e(e4Om1fgZ-#_PqzDILU7qi7p z2c6Of(KLz+)MX;p*P=rtdSap~iH%BYbz6+iC$TdfIzZbgtSaZIyEFgXp@!$Zmu6>P zmGRV({BN_4wJ(+�W$43l+k8ZbXNsN&>obqi?roL^V{8vZwmPLW7r@^Y+1@ks~rw ziZS$wpwOH&UOD{5^7e^36v$7S-hma1kVgHNd(6L@9q@bT|IYNOGuN8k+UNo-HXunSLb?jl ze_bAjhs6iDLYgx?c(MtPAj~F_Q%xuO__+kaj$7*j#wF;M^lI|=#DyYLH@(rEOXvak zeB`aHNPnY#dvJxTTc-enKbzq?jN^D>SlH0ae3IgXhV(!nWo*A*B%-DRonwuhH3C)G zEJbV6(+B)^sN6pfGlZ*9V|RR){I#q}cy38PLp`gD&6R|yt1Yy0D5B=E@;ve>1R=H6 zXjMO3wR*Lc7Qez&`86y+vF~fxib5V#1Ki@ z`Jr6Ubbt*pfpAC?KXgK3j+0BeQ5_CwfmdK^0)ZQN3a86lc+E~G&r^pgH@$p=9Yl4)ZAkRRpkn>P9Nq6{b@4 z!}wm%H#|yqb0`n5xc$y%YE_Y=Rsf1tM0qS{PR43hZvRP%fH45nVrsdN>t@Q#l@Nf)h5fqs+8A6bbqgJzYxGl|yc$T< zwUp>~c`2h30$31a6VJ-JGgZ(F_4wg~X4m zF=2W_hJkIj$KqYR^_|4$cCAmW33u0s30F#8(0p+N%1A?}T>Iyk^1K)|&{Y7nFqMmU zwkFD976yznN6(^H5?Sjj=htf1yCw4;^{L&ej=PbGzjt#c$qy7bWN2rww$!z(B5;c0 zwV3aGMjiz{m0Yh|uSo1(dhB+e5R5yqYrY`}Et`#r$_8d#%Kr+J)NI5A+2o7vr!n%c zF`{?P*+Bu4HR1P;sFcRRg*6TzFT3}(wD`@1Z#U(&nYPCqYdg>;95*?zJ8qU2g1wK} z?~ytZoqmr971@KqB^ejS`18^KL{rmbb$iL)eYIEZFSgAjIB$Pk;yu-`C$E6J4io`* zJ`g%Mdl-Y?BfhqlKgT*2!J63k#-dUu(h~Zpd8B@$pjB}4{!0D}O3l1`H+RNf{k(sd z$5*eKcMcBAZAST0qr{Ij@-Ofw(LId)wyXdTb}Dk3u1u6u#DB5G?(;QdfU}sq{ghIi z2C%t5B3)&3J_qk+KKVJ1MU|-P-0GF`>T8x$k;dhHTr3_HCjQB1_z8qIz1GVJdSD9 zsebnJyAI=qA8}P&5Q(s{p?uQ+waRw3p|f#e>@Zm zgMtq)p^I*$ZG~SEUE2MJAh!l@JM`809H#Se$TY&Jp(lYHSM|?tY7DOK`51RCZHdMR zivKft2Ob*D57|2g`~*C|UM}Fw6lIIE=#5Sc-`UGzt(aD2tQBiMtWFFWvl`fvAJu#N zjd<+J2ragdo%ZR}|B$qp^=YdJJb2D6(i(~R89bY2Yi35yY!Kv`lpnzS zm#A4#%g@#`>rIDvUD>AlG0N!dIa)rB`6ALzpv;R%szcn69{p!BtLYMNA z9N*D|H-e()Q&}CWEVL)c9%j<|_%YI5K5PQW@X30AWdw0Y5(u#daxIrj)KcyKZ(2Lg$7eyu<%IjG$O*=UPS3Ef z@p^SPQzb2a=<^6eofhy~JVM~7FS2(WnmD)H0sz~SA#QI@>*OktHg&) zmO&$qtz5<6YU|S&9Q;xGBqpa=Yvd`p3dIZhG&Im{LU@Ist$gL>%IzE)M{_(GLLI;I;co`9!(A$+_A(#>>)Z*37T;|l|7Vi zsl6jCN^-lFQe9vCt@Zf~p$QWx?OQM290qsd-HGCa{woeL|5`s-9f+bgEi?AolFsz$x;s(IalO zk$rMS>+g))NUDRmjVhdgdA1r&Kw^#v+FOvny=QnnFaWMLq^`M9iZ{v4 zw3SApNOyr#)5-^DZqWeJ5623%lL&jI8I1=TOL%+!OLF>8LVb0AY2RT$W~%UFX@Bp` z|GyL?^o5}kDXd5+V&~mCb}b<=^>CA0>rq%m*0`~&KUx(aIj`B-uh{9;IFsvFAim0{ zF>>Qee@J_p{ua6iu}Ik)V%}ABUIc+G(^v*_p)M5#!E`g znE=veZ|;JQ`>iT>LFQPeQgc<{66R{@wB$`hXi)9R7cutgm{5wLN zo9uhnlVSc_pG~FY5&4{p?Gq}91|~8(58nDX2fqrH77b^&NwcDMO-e}(dh4X#z&f|B zDMCoGO2e#J@1(u6@5~K6=mJoMU)F>RTW>J{XZOSPVL;VX-y1I8aF2E_Ah~zJa4-7e z69GK8`NTmwPSg;P2MSj-pI`AY`e_FTA*ZtZIMPa_vjnMR;NqGv6*()D8Sxz8Gl5*evKs(U$L# zIM4#F?Yp#;FDfxlwJdpMRjQDp5}NHRYIXqJGT-M*dmb&Dde(S&~qT}M9+J`iO#y}0si zH;FLE_f?Oh)CHo&O|lbtuWZJ@bykxR&y1FFSwObivLl4wjOa!V=zh33=!8|`tgGxS zbmB`91Jl6DzwV*L!HFE#1zFUh7OLeaGtM{ zm!exM=B{G|rklbo`H1gas#rf!>T8}c>iY#BTB`kJ=Ks86{|{mR_hAciW3DvUaj^=J zxms91r4wC!=B&-ErQ#KbTO$W8mMxj0jpCGpx9ZnH%c2&fgiA^Xq-n^5R4g@D9{Ybg cnb462viZ7=7sKbW|9tZdbWF5?+jf!v1!%Sa_y7O^ diff --git a/website/screenshots/music-player.png b/website/screenshots/music-player.png index d9933ac8cafc220ce16496d9e5596f3538be7ec3..a687e75e156e41d6bd04de71e0c5464e7d234bfa 100644 GIT binary patch literal 14805 zcmZvDWmFqsv~2|m7J?Rs1a~iP!J#Qn=kkS@J}$*uIokx;Lkl(q}*xlLM zS&iR)&(rrzV%=s-n7OHWCAP&xwt)NIxbeor_wCQ_DBu()xe=WLNvgveXN4{FQ1gr< zgViZBxiZyPFNF^^a>9iSJQ#|geCap%aHJ$iiX0MjZ<0wP=SdzEoPg|JvC)&!C%pHN zx;ax5R%Y6tK8F{2I)DFf*V^gBxRzD*$79FdWFvai)owm-_Su+Ntk*D%`x}v%Yfb z)vD(!xp{@$it9cnUYg?^`SC`E?K>Hiu*KN8nAb+PMZ!L?zu%4$`_|msy+62Z+2v;r z>)5Zl4f}1!RAJB+&mB~NCgx%Su)8sR>&!Z@8TCan4kdiW$@;WtfHZI2X(fQhBUq?o zuVd_P_D+$tqbf-9vOvMFWX0NW?3&^Y94`*(cM~q0vWNaONE&YfY?~Y7E%3lgKYA2_ zMnrMkWIvST<1UXgqJFKz(L>e^?qCC02?FLBaMAM));2tLI)*A4SGK-6eGYOAFukqk zAUYhD=1|w-Ozn1qq&(bDNx2U?n6H^j^`T)UpDavqKghRL(L|L>ngpzw6!ic%5oNcV zsuvfDE(adxWkw$f(B3#Szt?>Hz4+c}tAd>+kY;-SYfMYK56j%0A1Y{61f=BQ05ulp zqn>?*`ZdYjcmz)^d|AYuH)HnReI+f_^*onKt#F?mm7Ves3w1+BPwg0$HbkYQxz6Eq zP;mv4@A~VqBG!y)O&g@Q6f5eDmC)(Z#I!$RZ+L(t__t35^!WXKPUU?$4kTb-uj0zN z4+35cJ|`mv!ud;geKv|5Yo+K|SmpZ^cK?(0?AyrqJbABDKW3d2r`hQUjWKN8=4 zZh)XDBKPtXXDdvr7N)?+gsYenh%Y`GY*=~l#Yt4%_b)-{vZ6G$yZ#`h@N8jT9W$v} zxQw!hal;pXr%t_V-=_xVt_4Ei=@MQP5}Vn$dz0+C>kn2h?-J@C+a0`NC6aG`uD@nw z8<$2CiJC_Fs)jmR-7XtCzcv#(-_!Zm`OC@Zge=oIN#+k`JNJ^EDwNIs{s#1yK2K^#}jvc!0nh2AR>dt}( zaXk+{${iGf$+LVDJ%;rGA|EI`iXDC(cBOe^yL-JUds-`^>zbOy3?1LL5jAmQV2lvf zCS%}VQnh6p@IQCuOm%9!MG{O9jW~0~{e>e5zy#_=Abjk6yGZQAyP~-ACf}F`lS5*^ zJEOx24il0~45Xloj+qiD-_%w$ znIX^fTS-Ywl(N%s7ZyX+lk6z@Xnejw1bf@Of?-(eRWtN)?Mqdx$cNZa_E1s%5&yyb zh5GA&5~w7sUMN4t|N5vMXfs4)4vvAoZ`wMAp4(r-| zAL+@^bJpe2^`)gtQs2L+T-ovEN)jgb#cC(=E|v2d#$X+2Cm`bXl=gA-aa4Speb>Gk z_m~sAT5iICk1q2A?+gXXrmqoM%!#`+)7bHAJCi%fc*IXfiF77x&4sht{^+W1ME4IBQXdHj&g)pLE_o<_-pqCWCFatLF%6w-3 z*|4Ts7~g2=jZOK7-X;UC>CKDH*Y=R}R^dhaIXy?k*TMTdm_mMJ+N0e{-Y#FIsctL^ zC#+}-C5630s*K#H>yAE7o^7>aO_iT~vGU^gC%aa1(hr`~IzB(Mn0ptT5V3WUI1_$t z97R_y9PqQ&eJ8cK|7`f4g3D?*KCy%o`(0#&phd`*N22CUqgvy}rq6OX>6%ps3;rrK zKIb$GdQSLYQiYDbx-O}Uh8l1@;NS zTNDqvTz`7oJ><~jGA8MGg0qzgyiM$?2p|n_+WYhg`E6eJd=Yv5EDUkqOfG(KDER;Z zKWqln`n94znXJeUY^Ecuz`c(lO%b?I-DqG7dYxRx)kPW*SA@GYnIfa*-cLi);)_(L z1nFG*I&ZkKn;&_`y(r8uyJYppR$6FZ;|KC(6cT&^udCU67IvXrA^q~L4C}X z^^BhsRHf{!Ch0ukR4V*RtOalG6_~_Sc3FadF&i7!6>damF0rUl&hCjgPz-&oA2D>G z3<^eEDN}GeSDQfMC)Cp0eBzay?=E+JLRZadr%(fewQVdZg(ccsc3JxDM)^x;bi8yJ zk0r0>bszd6Aw{AQ>rh*frH2E>10;1a=_PTwm|Co@F_kLurK({G^QqeN!gt_D_04a` za@AQ}Omz^Dp4VvbxxJtJcU{ju2a0VJyo!78qf9RLj1mq`Nt|Udp~GP4V!o+vtVE%e zZW?j17ezM-cSs z^)TP)S5vY9F`$(*Z!RH*l-0_9b8FT7LlnBgAGURT=KWNuz$NPHY z1fa-zuH!@07>+x7AZ~N5?zZy_7mT~92mz-wV_>?m#!B~2`+fw)DzkdBCOP{#UD@{I zO{x2-c-m(m?!`)){UiJQg&I9NjKUZCO@m<+)KptXAX+4?z<)q>BK-o;03GA{JvWXI)3KyFO>1)_^|WO7=;R+optk^r z*4H5@5|R;?O(-E@)F+E$eP}p^2C4^vrqF)3?bm>O$a8(Ex>?HXEPjs zXRt0P5~<+J48d%9<@(6gq!KKiMI(uiw92O`-oBBqXcHj5A$=i@j zPMz8zJev5t5aQ*LHr8xM){4xUxq7=&gbtmvCS%B5g1d#E4H3A}myb~*sx!PC$z9Sc zkz)W17lCoz&%DOK-cUP*TW*g1Y7XDFDLMXlYC+ z=xhtCZ&@+jguA@Azhxn_9?cYRj``(_ZoPcJ9o9CLewFMZHj>T&M+~Y`?ytA9Vm?I& zoRV#*_8*-yH=C2r8ndBhCGfbRP>GS?e8q7Yf^4& znxKd0Ho$|w}}X%AL%Ff>zeE%{T6Vm;uhBp^GLaiv^-wfRzhUa1tl zi&_5?k(x2;#==6J>vlUHYfr}m;mKX;9I~fRXusO&0EO%?J&aP^NxxU&cW2d%XeR>x zE@Ps??lM=b`P35zwDA>fSjX(zdXBtg##%? z{Q>BCEmWqDGsXphesO(XF`a~e-fK@lH`Lk3!de!`T=0PWL|6F~cSoHR9VE?n)yD>% z_gIv7n~vO(pgWWJwfAWAD0!te_mcZ_XMv-~w�>83Ra0A;pU?WzmR#Yn~DsnD*Gy z8i(V-e_flaJ4(sDbxXpweTyB+=!Lp0Yf0A-63B}@55!;#!IsieR#MR-3*Bv%sfpfR z;IAd9Svl+j-gSlFpSAGYb%p{RzO9mt`{kFE?|v{&UK`RT>z@b{X_aV{tWO6uMw-)5 zz^w|UB3A2qBM5in$HzO!cWUZ^tmN~yop^xvCbEUd<+ry1{l?8WjfJHioXtNh1J`@5 zX)`tkOpW@u9?gK-EH}>Y#bC#aK3*Z3qhxZ;)NkiLz*dE1KeFM$N(oPDNYPR!+6V8^3Vh%q&OBW^eB2v+w3J3Nv6^*2WL^w( z;-ju5w%jXJputVzeUPtJPnS@P9g_gCVi6Je3FE?x{`g<1rJ-cgWP0_!LW^aIkkgP- z3dF!g8{zMc8)WyhosC_!f~wq{#~@*MYyn;Neb!?FBx**0bd1A^PQ>#LkQrhQ@(=Hi zdq9^JpDzRh`Vb5bGRM%Lr|;ck>tHGG4~3@nr-b=yBS51(1=TTcGwJn4HHjS$$#)7J z=#dgCsgqNxm3X9a6Tf6krOmVAsFQHF+x#9O%O~(7mwo*7l^Rjijg&L%8;%;`VWxfY z;yed+AnKGFTirZXFm{gPU1ofSeZ{06KDY83Q0zA_Wgd)c2SjT28W{-?!T2?aOEH}K zhvjHg9Ul4$F5+h-^WsaQe|`21OItEwhqe4Co`MXsWGTQF8~l>~ddjRWCDcfFKo-)I zKVn`G&!gpWHE+Tfl-GjGK2^?~U)9KRQa< zZ;FTE0fITtnW$;ir@{4V@}jzezG>>|^Ac#RSp4!*ujM&0cnlz4Y)WLx+|-AxX`K;Y zNt>Nkj_i$(JlFOIo!;D?ieQp+s?RRpjFa)X4%FL$whj>-(wG=e+E#MmDKZMB0U6|5 z7h^W?N@{a&Due=HVg?7Q5UJ{Wj2HYd&p)MCS5;m9a!E>oHBt`H#2y2NvE(pu{;|N* zBRK&Yo?wKZ23kpY)`@(G*e739{(6nzGTYNkmuNEwK!_`>uV;N1Ve6T6g34HJ=^hcu zfZ#P-snLh`hrNq%j3P0ici|Qm@q_}FjSgqH%Ed65W6&jMyTq5?ek^u=Dj@L{B0h_|-&6jWi4tE2oaMHvzH} zh0u?VOE-}E9Ju-%d6}Mg2S1q3kyN!ORJgj3gw2&|+Not^g~`Zz_(y;syzw2pj_Fbd zfjL{2G{p%rg5ZDnw&6WFDcQ)5M@NOZE*=F0&Um#KIuN+P2lBM|ibu(TKOTihne z!C}7rMi#xH%H=*7 zo`(7>AZHWtu)m5Woby-1+I^1SU{|%DD3-LbB&NYES|(=*Bt}eJ7?9ttVb7W?usu7b z?0TlWaA>~!HadLUhq+H&Vj6@z&Ef82RG2F{Z&$8SA?G-`N5FYBrkR{+{v$UHtW*k@^ zYTu$;o5{G)zAC(5&BDH_skt{W7c>8j&~|J!gYD>Jr;tck+oWz|==@RU_Hn5W@se%e zR&T{qlT#pC;S~F~?3LriPo0G0empTfCOZ9l??HG~_rIRrIxtmolP+dhBhJilRwUP5 zBDh5YHosukgnmcHYrbZa)i8G@Hae!Y95-QDF+fs!5i6siFnG0KH-~Vr2$K<$8P2(M z&~%f^LhE2^tuVDsMs;@5wy$LMJ6%!PR5*$@Dqss$w_+Idlbt)bLK6ibo%CYZkfxF_@V>Nef zzxBN7jY8HeV+nF0wc-eQRvHx*?id8d6iL*c*~T>M_$SsE@9Jm80gQWJV^vp45<(W< zm$HUf&8X}7+4TG-MlhOn#F@Ff7lWVo?U8f27m(}SCNGiU6h zd%rmP&>6<@Ni++k+{=?f4Z^WV7*t{{n`=}UKYw@F5r>JxD(?7En&!*!B!}{5EUl6h zl=W*mFI!N@(*s`z%bn<)O%>Kpl8*^#raJKO8gO5=Lv9u)KIy2xQrA9@w9kpEAH#&H zW_beF1e&xWO^RAkD>G9-opX0ZN5B71^*(C)#%1+$L4Dn1XT=#D*ra5+LW5s18Dd2RHl3Cn{uK8_o6UV6#)^unA5QhVUMrf7^hsjlW zGk{hF392}bLA@W9$2~Wne%8W!a+moA`CY#<_lZv*u9jl>MdVPb<@)qTAnO(CtKDlp z!q3llM_6E~rq9i^W0rF$$Q@?){!++|fbFH<5C*B5dcUtF=$L3}Y>y0w7Qb96v`*Wx z?XJWrP7Wr%vdhn4y+VFq7pWSyQl*h1E*sJqp0LIMY8QGWhk#?@OD1f7^2X|h zKN!|+tRm{eBLiMD=K6aO_YrYLy%)%1K~N3xXvS5ckGcu2=|L@E{zTe9#8rLn#j}9Q+?DG_-{-&4HRHb#U7z5S{r;WN zx+&1TuE%lSZiqzU>*wb$pX6%sRUhFG@usp$BJDS}kq?Yi=2jNbte1Lkcyt_ubG64b zg(`E8q@(j|56^Km+%*zecsD!GA=o~2hY_1${~Q<1#cO|s0W${L<#-Q;t^rO}pFNAPvD^4i{K z{+x?=bmDE7DasPuEo`LXORlfg-6t;hb`SY4;+Z6*N zT~+fMPTq<9_DX}okqR9N6x=zVE!Ky*!imtNZR8*ckbqI z7bgbnGc(Q0#^m|B^lWIkP#R3TLituYtV&1h7Js2P?)nfYcCy*u_WFLs@TJCJRyZk& zLoRwG)*KyAa|^>vDw{)o7u=R_73i5MsjsV{Wl+sE{+5`eO8+OxF(jm{_td4XvM8ZJ zx0Bb`aR3uy!Nf^K#9-%;Yb2!aoMmXXwN{ks^feGz$nLZwki0PQD|&f9y-|M!!>-ec zw0}YWmU|djH;>x@H^5+}VlCv8^e!k)V!!l!o5Ehpm(r}yf1RS5U+vnZaVk3H>CxuemlRB_)wZsByM56P)#GaFJTw@tha`c>i;yG|J%DPsm1Z zzYgt|v+@#T9Vt49=J}Xf+M2hak}gloDIP1uVxTKE>|={8sTS*H#3R&!f)$D-`=tq_ z6TFa=(BW~`rCP=x>V|v!wHuDSHi|dC-oaYVKkO&8!YAjxYYDeFt!#$8br{fhSS6*y zPT}j+5?j#M?6)hVwmH4w+<-_EB#8)(w4~7-7I=#TdP=zNBBU5Fb->8vpEIvcb++6 zQ*I!fw$jMn*+ihFZPwM~c72GsV$2bEel$}e2q!n;fI;)s`OiCfh_lkiw38|m9Qa-_CWEO+zb?sV25 zsZav*fWCQ{pI~f$Rk6FVdnE2(=Oxo9r;jralCe@i1uApaO(VtoP@vzin=FQ=dk%yB zB!>pmoMk?UFi1Xg#Hk_67u$Qq0TEyrb=lrovSG9APD94VOTdEo{O<0Kmc{2N8y-S? z2`D>gjJ0KmW_aVqeE8X{j~4ndg10v3k+oy+tp2Si1v+xeqWzN}_W4q~^)cI@-M#vy zWixkM0Y&|^W!h!P!JbSWYGzxPd)vKi` zf7+=jPt*e`O1rkEyT|lOf^Y6yy&hK`%cQD9MwJyhQPV61B#lH3npu9RAeX(W1X!aa zr8sSye*bk=DlzILpZuD&C#R&jdc*H=IC4N%c|JqOQJ{j4NKRYJo*`e6XFzy}VfGG| z(96%NNc{WT4xbZ#@c`D>kWye`(*}{?$4NULi`8)hTOE&fzm|PBed*Y;uwd$)Pz4{7 z=F-+I{_@~b8AzjClPdk}o$cr1lA=3kG^bJ%gYl-O)_^@{mRLnZSwf@<)G>ZEtYxVr zdK~S;58!k_j@fHG5io(HA6~OX|vt1Ew zAl0t|;R5ZW*=N0Z)3Wp!FE960(vpfulz^Qb#-GJ09jHuA00K~fcm8)@y9tOtBi^J5 z`#)JfcylX5|W{WDLJn{rwF2ieV>WjFyt~5zwQJqxb6;2f))pWi{rj5uYto(j&3hUU zMCeLlk-*$=fHgOI`j-_)}Loh%)JR_*+3=r zt`_Djpn#7XK*I1&&_AFn7Wc>y-gO>u+rgI%1&nN*y?_c->5A-l7A;j7OU_a_fAstN zTAkvF4!UC9DQR`tGcWS~St4Jw$$8XU2i}G-|8Y(N$fuESZXE3La8^j)Sy!yT^YXzr<4GkL8^aSPycW?{3TC0)X#bo zC90i{Pma4o_2}FUeXSy@C7k|+R{YM}eil`q#1iq36$XR8C7v`K*o(9c z+6eCKj8K31b9df+s`_`QWo2%xCixCQFFyrmfM>HYP`gC3*$in8fIiVFX%8CD+#!s` z<3n&?QI|sgLpA+#baYLVb8hrkfU!XR9~L-8vrQ@BSLet(2ZzjRSbaNJU~*%>6Vps; z!ig+mAOrt-kxpd`q!6nyq|o7dlu|>j<#7pE>!LKzQur6y{}ubsLA{C#Z$vZRW23%- z(o9F)NqbwrpKw#Y;o^jG!Mz_$PId)1>50g2@?r>pp_WFm*+i)p-(NiWie817_Nesj zBaPg^u1Kjb0iKYh9#a_1*=N$a`yD2D2^D~B7C%6J^Xd8Bp7GB_rp2pYp{|!?t_15{ znTOCvf_ziLn6-;9Lq@aUo_*Oai{|G2(vMAvx4t z8oYTa1!$5Il#}9?=X?XVPI$)FjS&MA7p5c{-@t#YC@=lkmNKnC94S6rF30}P3lNo4>@$sRUBxM;y^OQH2+dLz%a zjZ9+BfQgr=1%vAgEwAyUj1i>=#ATAdBBBymqA%%b%<*2)e)lYxvu1!pVR2)AgUJ^w zbsuGLAX?@eU(t~huKsZnGhNa!~J|0)Q~Mk)!y z5rp+B0AZl^->69ea?6fwvW##t>%m`*s~hzl#jvMC;D zML>H~s+!I!lY;0|9?-YJcmTj6s$ZI>+zR@3m|Ga$Mc`$1(2SY=MjKI5SSokXU{<4s zGIYKndDFRFM&O0DLMk26Y-H3))+Bi~ET4bn?v{_O21Q?{fHttb3ag;;Qp{+K)I)|M zz7)`rZ)L~WVmk^eElb*V)~YnH^yeke9JTGeWATwctIxHs{F&sQ`86GJwUGSps9I0+ z|I+!t-_-qg!hfa(?kLqi)@|dbbUd!{>lwH~F`UB1B_@>1@o}+#pGhGl@xEFnjE&xd z1&)UOK{^z(CMVYSW=CXua&>|>a6{C5e9D=NUx*XhC(Nr74g07x zPXKRV8&>m~j3|YA9L19D{e1~F=9amK%_K3J#{~WyiV7No4c?^>P{Y<`1#)bLTbPd% z?_(mEq)-QrB;w1>dbx5A&oNKYN@z6(X*{+Z4Hf&*y6r%g0_WJ|vY)8!DSr!1`QcdB z{QmfJ=EoR&yM@f~;vX*G75a6fO34Y`1?8x-nx})25>;hU;vF0)(s?%M{Q~YhPB@8Y zZqHnMC=T3R^N=eCJAsqMSIf#GNM#xk!6m~e6b%*Ra!Y^v5t4BEbU-|nC=HOlqI9v! zEBwRrQ!i!nRlUf4oDJ>}|;0QWrYO7f$MKvB^{K|YhJnp<}eAaA*(4X;6b98(nR z=uuACcb;TU+cyb`j>(nvw#i=krtU|m;O9W8dw^gFK2y&#egJGo)?L3$467?bkyW{u z?=n4co}*2J%sPH|yUREjY^nKPkz9u1i5lQRJV&1yXnucz6n8 z;F9P0*f^fN9!zcXR*e%8QnG|#B;FCKTd1YLW_0W97L7k%5OLcnb|DPuUc1^se5yUV zUHlpMKdgpYn55$-$tEQ5B_ink7{G4xRAo5HEar>wRFk-}uSaDLcL!`=4g%yoEaYL| zzTpOu_~WGOk+ns3$E@CQMkXAzXIP#qi1}(MS5v_flo**@{nWxqXkp3_urma_CI3ks z#X50|PZvf3^Pk#a+`m4U;0Db@1nbQJI6)+3k$2vMia+=Ma0Mgoz|heuWe=~9M+h5e z|EV;&ol3M%f(OGjL)Dll2u-ON$Qtgi#;)0n?Mb0TjcsXw<4(T_cObtl!GTsx_ABxS zcb^aytk*NZV~hxv*Qi^ko{7MT{YW($x4=gzxSkO_Tky;-E8l8%IibDtXZzwqbe32HgRVvIy3acz>GU zJdo8IS$|$NLyJ`Lt{#p5+)86{K=17VgO^!Vgkezt){K{912oYg=Ct+u)Z0Fyym9^D z6izDPRCIdV(}K~SzUZV zyauM`Z74r5xq4WSPfcu*3SY8IIv?O+-cC@1S*Xgybw9EZKTh!`*Yz6CO4A|tbZ$|! z;$DvI3O^Vf54v;_u_*D{KQx8|>8gH<4{JB@;9&t08~V$vh9ZYPKTgAJM!=03t>Pm# zd2$Tdf4|97QS*;`!BHb0$NcDI4z8>E4>Js<4NT(`1S+h{fbtS9HC1nZaP`xtU#GF0 zXx>EhOlvkYzBCoT%Fd|KA%|E;#_xBlRHED#p-m-8GRT(XQxCp|z@IY>$c>qQJPrd! z6@mxe2_j82m6i_Yus<0alJgapLx;f9D%_CsvXd*F1sPBjH70%_9U0gYT+`yVlSCTe zSq-9TOrVSyh#V>670`w!)SIUz`;tpRDXFN^g!El9a_|7~9!}g2UMTy?A*5Mr>e=K> zWs2l4!3p?M081|%p_JY6x!_lY_X8%j<+{rs4-D|gefmy8*|hKQZ~??>4MeO0Fe-V1 z9l}#QG_`KcGqN7jJJFu&A22jHhDStKbZhU9p|i-lKw}>jo(ND<&Sa6OfGNrHFSA;n zITpu{R-F3uf>&l}|FN}D#t{7e=Z%HM)yPN+HX73K=)2fv`fDPMUun@v(LbH+h)(pVqi=*RVgOCCkteFUub^GdeBofyD>|~}%c!c|DREAwj zf(K!yT{Fda`47}Ku4+u|XFzNqq>imnnKd!t2gge2j`hrB@>k;cep?OaLjDM5%z&Yc zOU?qedK(Zp#Vhu4M+*AS&3ENv9$PVuRP4dDZ|pS^#2rW))3qs;p5C*m~W zxflOm!TztGf6nYNN(_JRj6Q7P#v?8UK(c7M%hnxS4&;rhCpS$v&axjIf7@^yo;iM4z5Za{onzVu zSpNX1uYI@thT9_dO(qK6IK3ok-}@z*hows+Ddkfa>LkY{8nsZP~dAhCAYpkF2t^r|ogq@>KY441GC zLo`l->xs7XZN@6+b*nu7?Vn7iD%7y}g!tUj%(K)uHIOUdBOPkwd32^mSTWA?#b&Kd z$VCC-`#w{)CZFCgIlu_FM=p)%(h|7vy`behZR_&^b?&3juB}j&bp`y-&hG!854`!{ z7L}eK(s2sT*-4X-oY{o}nbRX_kw%7qudwtF^Tq{1CC#+wr)qe~A7BT+#+)Emxr?2y zcqGmFGc(ixfq__|98hK&NAs|s*}WA5oGhmny?_!Ru2nRLeJIouk$&92B3;v4%;ok9 zFpv{3U?77-qG!q}_<&LUEI8*j3gxO+E9fA*5-X5qyeBYxO6b6gIZ~CAU63`1Cp?ae z@02=9h@ru6=r!}W(w3t?0$qMtJA_&I^}h$XUlEWulowP`CV78SgHlqri*EgrdoH=! zI4><_bdIVs2nY+4yNCOcYiH9-=}*7YNo^R@RemaUn3$g^kE#xoTSue&{`&P&s`B1S zb_c=akQ{lG?myF_zfdp3S@v_3B1q6p3Hon>WntbCkrkBHT`BC}H^Il$y(rN00Dp{h zVtEFu(1C*;b}p<`+-GNOB_e#s<4p1Az+A{ioK(1wV`_Es$DeBETVwrGVB3F})-b>^ zW~9RpU~In$3%ulXo@x`c&fK68)$wwt3BqT-F@2Ua@c*=&20EMkmK89CW*DDzpDwK} zMstpYw;w!pi(_jjW7S5Rq~^JVK#!gpF~$WS$$ut6bQ>Hc-5u zwr2|e?&HoMb8XhS~3NdJVk_?*3m(S1%fc*h%6!hkk2F0Y+zcEL%RG2OPlrWwTWvG!`&5!!y zXGUr^A(3?viQ+}G*`5g-?G!(_-+D{(7`H?Sz>)q%y|X(YPeY>-0-|Y{P)rzi(3-+Z z@SA|C^5or|pNEQ(tJ|PvwZK!FNB?EHR;(K`|l}v@~JL6mZ#4^`|^0=pS{5y5Y&wPZ4+$T z`8R3s@tLp18u%ZPY7@6fscUxKM=yRa^Jo9<6Tx=V5G5M+C@-4C z)V?nhe$u3(nYm4M^NSPEL^Ko18+OR^aQd)Q$LXO{0?Om1QRHW4bCzY; ze$}Qq7+x<~DxEIBHE7Sd&RKLq`ZumCaC>kAo)@Piw>*a5H~jZQ)02?Ntt})4LGWn& z^7B@&EKF7Aj{=N>qc_Y+i+S{Y4roIq56$7vA~*m|`>O`aZS?aTY$lfUZ_y(Pn5Nq( z6p{Co(~8qQz@U&#xGl6pKtDPxebZOb+i8HaXSqY9rufBtzDbeBq3D9@sB+$boGb+} zkSJ8toc?q(%2Kdo7z70bY!7xPwNFHLA(L*W5mNtNDt_#!B|?T?|A-szM+_J(#usd{n#BSDRET34blkl_s)e8`sudJ`b|Oh{8L{Tk4Ua*87`{F0UT zNwM;l0h*b-=>AlvI_gXDH@@a1Tu7l_kC}k~{B(J{3_^OYR?%7U%CwlvCobV+I_HXuC#WZ7Ewh z{4HxGPdzl>9-egQ*qD}bF5h!u|KNzQKdjNmhbW4(mL=3lzw1kw;ycVl!^Ehkt}0&#Rxg$&8I4!5>nD7Eg&ICBP9$a3@u$VLrHf^*HDrYLrM>zGz{HH=Md5%ouBWz z_s6~Ket-Ac>zuReIs5GAM1Ry&Cd8w~LqS0yR8>*XK|w(SqM)EMVf+)I1Sc?lKtW+~ zR8@Gd`z7b-n?Go2=iBbayneADdE4AV$FW4uL0)scUaxrJ6fAGq>Lc zJ0G9QJoc9I-?K2tj&{P3hy*L_1jayM?z~w!PjyYzQ>oS3P2ZYB{rD}>b8EvPaZFu+ z??`{~(ZOQiQ#!uyF}}yu1a^Y?ny=}%w-4Tek`oE9 zpA@pWRwX?1)w&v=O&<5lTMV=L`4OvP{K9-P0w<01iE;u@ z=I5?(_>2If__}GJ%m%jV>*lV@Q8O!<`&|U_!)C{jTV%nm#6>sW75aj&|FzisbxhxL z+^r*B7p-jwl^_GCL-BPx2M z4mWSq1yOooLl4_@^$Ch-l3+qYc>T0sJ@d(mt>5rf{tgPd8%4p=sSpc{h)1u(qoij4 zaT;!hjo*exjnG8y)S0yO(8xDZ#Jw^!sa@rqB-H4LsH!zyyapAzjSmtsNU+ccN|)SmiQJd%=Y23x z95ox9KB+J@$L+OU>3)HyS3=G9fDyn*8um*M!5dL8EyGJ0l@JiA^d4G?^{I6 z3p*9p1gTOIsWOoeJ_^Q~x|Mf2ad7U%_*u`(TWHBGG_Sjw;ZFBo`b&A{*K;<*x6?1{ z%?^?5p3*b=4{7#Kr`Q<)t#yj8JZ_48jYU7>{H&e!F~%5Q3}?~uOM9pgQ?!SoMR!0s zwDmv6w`EC4-;^#0A!g3|)Uei`N1Uz*t%v%<-SfLif1PSJULFqFY1Bmqo~5vRU5@4} zw_7`^>2)>UcT5DN{{sjoVESid9qUUd+X9?-u-{r03y7UyJo9ecy!)SQyY!{YP|EAcJt?VJIvAXzs%#&bj?Z6QB+p4 zVZ-%r?M;kaA;3+#aTeOdMAoGjIpLUYvLpbg0e%qD8%&L357LkuHprr*LQFb|^qJCI zu9}cS0Dl>ymzU8v*lnnE+%P+%!1@&Tud3PlE_%7)3`8>2hr9lSpF4JpA?7W6E4HA)Mel z1|>8sk*P}WEgg4-4aD)jcPgGchr%IyXDA9t`Modn0k0uX@kXp8Nm-MZleMUYjzr$c z2ehe&yY)VveD}?Pk#T4fnhe=Pey~(C7F5Ntj#Rot-7-PCDPo9C7mKP!b>Gu>VT#WW z*YQ<1rZQDKFFvb;7U-1whQr`|crN{KoecDNIpup>t=K2h2of}oTr!(<{qNQ&$H8q9 zd?JZ52^Nm~tPujzC7-A)!*^zCW7Tv-(`DLlIm5?}5tab0Hk%WGA|Q$}^livllOl(}rcQO(yJqr{anve$cn>E#8~~4H|PU zsn&5FYdD9hZPfrcSdTd@|Xy@_4mc zj+It{*%Q}LwIxeuS2O2sQ2&9n)la!ByhX+!%;d!E zVSk0AGY!T|dwK-)-{>hBKK@SSZYufWPjKsnN!5x~`O2Kkl8ryb0KqW*^D%eU6W$xp zLdx2o&iVr!X=_D?I13Hk6K^%I^NWv8FnfYiT@=sj%AiQP2nQ(gwv{%RSce&O00go~ z6kYUqS+^49P(nzs1(?*jKm-CwE}N83mWk)ryy{03a}1t`X|3k5Z9{0dNmLPiU)L>B zMn;RUSPD~Z|iOHsZNz z{bO#jJ|-bY1>?+|CZyOk6XK*6e>FmedEHnB{u*pWr!1!!jCr=mt*G(vQnh7`f8F z@Cu<3?07IV5L#dyL=G?|HNkX+M9pzU@c)6MM1jwiV28RcqGzjlV(8V*KxyKoIVq=$ zeAFQAzGU5utPOoO6I{56RM*Zr1T4Bp0B^!)MF}KhmGsuec+jApq{3UCVEZkrW~9lF z4|Btxi2Ox%pelk{UDc!8xgv$j2ce4v^npz&Sl<7jTI?9gd}OPc!eM3t`K;Q{;iV zkbQR=rlpT%PIl%fky6U&MqAUc3cNK;bARV$jfd1Um+6xeJyx+>u|Oe8XbnbX2-uYy zQy~XuS|k2IbZ)lq+shXbwqz-f6+AUHD96ghk_}UG*TX;Pd%uDM!v^tAT2u{Ekd{;i zCn&d1Scp+DOp!@ww^6boxuKR-l_!W2xhjyNflm=FhF$&I)foiEo01s%GB|0FY@t(B zgFe5m%C(agS;a){+P8!xP|=8=RuEoaWLL*5bpM5t9ZDCg{T}ibb2AAC4g@{RdYW(+ zs;polL%%dYvCTtV@YXzLz8E(VP)P<_?ybl?i%Xy@JV^zKy6^j`dt839GoCWB^B&B- zT4itz^9gmp0~+#FhO-nWks7?hd!j&?jeE8R;ZQ?>B%DORh+Ic&ZNj#EJvP;AM(@5a zpOf)KF!}0Z;pfcPP6+-y5C1P@qP0B~Y$eg}nP|KDW&)$x(OI{B&^R76Hrj?hLoN>r zE6glcZ0{79$oTNok-zG5G|?(^ajHxxo46x770*R# z4Ci19rVB;|$+Ng&p!f$$RI}vgtdQQg$_&Ng zFHX{n;wrl>d=~9)b2dSO$qBNKB@oOZzxGKOK@;}YRk;T5I?xbYU1Rk9B z2tjvch5{F#z7K1`Icol{GdrE<^G(t{6bEC;XQ=^FcB5@w_ zQQ5PX2-QuHQFR!cj^;|n%Zx&pWOLus;(j)?H?-EZ-@))rQ6F=sT_Hc-g!!n+_MvE@ zNXTl7kDCpl6?v>AY7o?R#^)2$m8E1D(YR8}lsyc*6A@skraZnoryy81*qxJEz==>m z<7kx}ug6Ijh>hTSCD?~G$kcJ6ig0hNu%R_0;cxQt%93LNcTy2IVM&85 z7=^&}5iYat5_7Sx-Gh(Dp8Xu$3f$O z1)umn2A9BJ^B^5w4^j0C0qbAtSim~*Sl@<*)Hn*X+nV#HvxBeoL|^4Pp9I|9fW`Jo zai%l?PH-;JtB)Ttj7(`xs#T^Of;EWU>jYZKo_0h@YEWNY$ct?plVSB4AEoX_BN?bt z5sxlH#U7C_r`NF7N`BfIO=mnE+eZlc<`owNRvX;)OIg@NkZoJm*p!RE) z$=?xN{5blWnKXb15H3rHh+(eoDr4nOVN*o$lNg3`Y}0F_wyHST!*61B0i{`xb9ym0 zRMEv0?^^H=O~1hGy9@%U;Jj0$HfWL%L;vR_Rj{_c(NQx8oYKW^(I>JYwh;t)RM z#tWP5VI&iy0?F+*=bSOwVO6#%Sgs{z1l`$9bKcGpXE)=zN^HUf)KK0K(U63hk1GH^vo_gdL|1sfsuiNzN&eEdYn>ii z;NMCWHRu`g-CjVp+nj+>4ofK^1)ZVrEvSqA3Mb31%Fc4!gdgVwJRIFsaT7gVv3c3X zsgAjRZ)#`a?i8^faED7w#Gh@>eCjIcx}h;?0n<}mwzFcXra*vFdL}Ufi}@k;Z)?ev zG@RZkcqXGRO6HV21fKwG!G`JV*d+t(dp{aHd_a$*lFK6pw}y9k%_EfQxAUANeI$Dl zf(%UHoX(Y*Ygi|7fp;-y79yKvtx@B=<#ecV`(Oc$m>qzN!~24<D0-YEETb0Qm%`bhSy)T zz**mTTDzF7`pSK=v3Dt^ajMd4*Rm)<3bdx^r9G%M+4)jhEJ)^j?Hc$<|mPZNQ@og}SEJXoUS@C}4ULr7}DK zO+qlnul8GsFX{khu8C2Lad)^jMV;W#+-4}tT2HikI;jEnx91;XG%W{tF*#HmWc4ES zooB0o`M9mw5(n%!KY!gTySUCXqIX}wB+1|Z5|WcUoh~#qs$W0X37=eoMe7EU-r%HV zoK5d8f*+KvEI(&%%ezc<7AY=Cp-H=T|7Dkg71e=2d)Ri+iW3<3SvmTSrwx&ZbLE5aE zI{ft=%-t93yuu%_)o5_dQZ|{v`|jKmi_dB&Kxv4#}rxanQq5qJC#m9%_-?+ja&r=ai;0Pf>uB+>Ex(x?#g(?*gwuYa$}XkBK4 zn#`^(n2Nac-EY``cDSA66B$vh9uq2sXpr^4ce+SpqC>4`mR8%$%Vwf$wQH4AT2?23nR;)JA?{jB2?_feihfkIp&P4qN-oUI zxYPOtY&pP45bwh{cNLChsL;~Yz|WS4CKdcUss-3p{Il>o8r9g1{G@r%1rn8;;ty`^ zB#w-GwV4X;YR`v;*P zBvc4F`b3}%rf_O0Dx!%E;*=t^Yp=5cM*i2J_uy1(tCZRs60ceg6!z}aX62q)i7C9Q zVZZ#x64FZyCG}!jzT(Z)4d!SN#V-roAHrRe%~6wmeM^%Q3n;1=v5+LSx#Bpj_km@3 zmw9K(*jN{30iPB6DY=BV{EMS}(DZnUB47km?=ct77z773tqo+1R3eyz#%uT{0$e|H z1#)g$^FMVBO-3T7E!e4FUYohMfnD>_Ibz!@aKYLX8(QHZnlzIs1FHy$G<<2a0$wGMfHRpz$wQsIAy$lweroiS!$(p9ZwEmXqF8$Pm?c@F6#3Q`GS znpaBvw!3u|B)@MZuQzwm$W3EP28k9K4;5Xz&ek=^XI;bbJ?LIVdrC~mZys|z22T#& zD2d+R*_N`Xqg-DpnDa!l53G^|%L83pQ;>DflEV<^$YK5PSU8`bJ@O8Z24uqND!f>p z7+=v?82t%cpGj+sSY9TZe72#8q4pfL@+Ss6J_o6rz(@Q>q^AVA-tq#;9J;0 zU0u;?yfoxg z8cR&R`KQ`90vCOQm#qh)e?z$sk3aU|b?(-)&g3oKaNqa%SQ)0a3O*}~uaJXm0UQ0A zUyq{k-53w`jNU(KkHSBbWM|topQ4W%G7PvuLe<}{YFm>@`cU{|_APE~juy7A92;h_ z9V{*@zOMV8b_vrC{N+X5F0D9P53!IuItCkn5@TUX1|DC~fwsP3KwcNv^d~FR2 z+SIq>V#4ngQBnQ7_=c}aiRM2o6G)eGj-etpX0k`CmdLbmD6Q6=bV0W~LuYR?xe#rW zvlYvU*<7*rgDHDWwO@_&&i+Bb$HR9;cQsMgFTZDjj=DsV=pW1^YH2|WG`Jdu8gN<` z+tBMZrvDx%i}I<}#SUxdAtes#vsZr4CFt>sZ4Pb!$PtCDFTN7)vC)(VV?FUySu8fz z^%ex+7D3KKa{kkZzbrHYb@5mElSbNq{**bDI{h=y8R7_xNc(U=GbH3oK=r`3E!a>4 zRC;puVtVw;>DO^S8RFU%8X}SJ&k0uB8jO{S-hpJq;{%51-Z~pMH1$|C^-2tdcvw?7 z4ShQLNaNgX&*`4;Z$kmZ!RjtOANVXXJ+?iQCe+Gi{i9AOQfS0HPA9G%|M7{IPuT?l zFE@rd8A@Pbu(P;@B6v1JkU%1T_sSovfCzy|Q77|nm7}c!N7n{{vv+rV!h8!svn+Pl zv+R1lLO0cruK}qMnsfAtZc6 zGa%4kW-R8>wF|R}g_p4eTuy3$^+q67R8=WjU-(1YKmmJ(gK)?`4esj-HnF-b&)DUC z?QBIN>=Js!BJ7P^BS&6if29M#2VY~&*98`F9_&RL;&I`bIxZ>;uqh^8eNS;ZA|7SC zN{2>1>x`t){FysF+Gj|}UO=VVutORWQsxa{3*Ro=k@GUv2M?<1HGb4G`yImr$bzJw zbl~xgWU#E@H#N!wX`F1~P3=MfnAMAciC7g%YiX0oY9AJHDdn!Kzo(}<)%2Bbil{q& zdfl=Lqv22e#l6z|F(IYaJuIRuK>JtY+Uh5S|54$7#PFu;NhPw~Q`<9p^8Yd*jU1p6 z3r>fDm2vuyr4~kQjE>8{-Z^SAa*3G>Mz)NkqUyNLiz+lCg;EB^Ka8f*587vlZZTdI zR)H)Ws8FV%uui=WTp~b*zj=SE=v5SVW-n$Zl(LzLh^F z6uuzrA^4`@d2`v6>;Zh+H*0QWmicYaepyDp8#DWWh#vYIfq(g$hu)A+|Nijb^6Cfi zmc3~ezK#wYzr)|4LFI=rXh4H%dh%TK^98r;Y!%fZqTBE{$x z20^j3(q+~V^8%Y8h(l7AVnxlN!0i8Z@;_WyT!K3g90*B1(dt{ndXkGo1V&EOHGAA) z_N9$50&MpT{fT&coVm-AK9}X3WqkOD-F8a8qFdd~A!?|I;hU8U#LSq;aPq9A1#e%xs7{a7N#}eGCn)hu zgniQNX)vOphgi>KjY$T^0a*0zS#&v9wm82f^vquq2;}B=QJshU8b2tw(fw8uMym9a?dR?N;oB%O%G?rydtx zZ||oWxEEA67xTmbo$MpqSR~7v{|5{C-&X$@LD@hB(({KXAAig*jpxqgoCr0He3E!{ zkSwpbLaQz(42cyQD66Lw8=;SQqbA8|T>7*~4kys!Eq9Hb%(dh4jo0=a6D;+R_}GeL zPUNJlDt55Q0{;;MHL-1AD=wU3(I=`h`-(ajzj*t*Q5p1hMr_<_QT{6y@a-ch&t+EPuK6hY+xMZ>M)#fNa=Fn?~3eIV7TIt&rfpI}_Wqv#%%2 zv)!_tlX19T;O=VXlT#ZFeDt?#21MPzoXho|oO|kQwEh1E`M=Dau>%rk{vTfUKLzua z&+M_i_h~X6ZsfNgR*qeitgpA{6$>9;5ofu`F3-#CnL;gnlj9}Ny(hhYx4Z1^ zdbG};X}L_Xpuex}yua39%B4V|HHC+ApVl2=hD~|aowFfhD;&l|%)y`mD}PMut-pgL zpMmF)ymrm6t?9rp{foV98G`ZF%fE?YNt-G z8VTSZHFU?S75l&EwvPV{R#)wrEi^I+_lvQALs;#Qrk!4+OS8>wtWPuQC_R&=4Ztt{ z;@vlUK&oiZ1v#QP--=PIfzz6oS6oZaRImOv82(2_|Iaj7`tytq7P(K+wx;6w&-WWu MMNNfjIrEVJ2jXm@-2eap diff --git a/website/screenshots/screenshot-launcher.png b/website/screenshots/screenshot-launcher.png deleted file mode 100644 index 79e060f58689bf7b9e9092082e72bbcedfe11d29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7464 zcmZX3WmME()HTvbcXu;@GL(RXQX(Zibj^Ttw-V9}F#`w;rBW)*&?N{0Ke{`l1!?)y zF|WSQdcM5x*K^m}XWx6yI%lta<6r5hlRjj6h=qkks_{Za9}5c`iiP!n1NUzL>$+?? z1`CVjNJHhBVPNh-o?9YMPf*{7`MkV?MU-~cGtM@dY#wXuxj$z7&wN**w1PT^04j+^ z*iDqvz6aYo;78i(K2=|wj_Xhy{TWqsEfn;JY8ATt4w7NN=H5wyPqrbK+GE3FCCaD2 zpVFuH@La87XUf3n4*bZ{Qul1%^~egd<{#{Ey<2+kXXNMScNT^vD>-$hQHi?+054O@ zt9`Inmr@3!Yn679d99}#iFDo3#QN-Z3k|mu+>6aV{3J(9GX3;Tl@M33JSupQaT=fF z=1boh{J?DJ+FDF~DaTi8{j-{r1^QJ z9G!`*s#O#xu3`Rf=430!^!fIGelFOiyLe6Lk<7|2MfI!o?_bv%_-L<1fTH+v# zU@ai;AwrDHTGohN?hYK%I-m#z1}2LQ_&?reR^5UKq4usJB#bHuT1*;V*zdmmT5*H@ zikr|i`OzDj_3R;z+EtK`-;l)HChE>RokHz!(@X@D{gU`h=1xPd%t1@Do<8o3w}*sVs{q){25`Hct!3= zIL~=$e~Arpy9^e;(X~0@P-#$ZqjC8NCn5VLK{SKQLIJQvne$gSJ2HnoNT@go`l3~H z@%iT(jV$60xCxiESz&7Hqx*QgZ@&@eTA#}Z?I1t(yn2=QiMlEir|*yO_I#fmo{I~2 zBuGaGd!p%OThBwnZtLJTS<~YteJ<67y$_fE<0Zzj1R#<$z*7}`M&*W$fH1*oPgUC7FvC0?toAlPtdUE+AgntGlc9R}J8h72&E?ckD_58dJs z0x)IQ6S~_<9MkymccU0X(Wqez=FF>ac#C_3)}XC`Vvs2ccxe!~pY}bVALuo$u(-nQ ztYDe{f+IJVVQmjMS8X&Fh}gFys@4Wr0ofn2jI%*2DQn}HgKo0VnJJ0Vn04B!C^I0tE}$hrI9{$V-CH!~wOF4o;tLWfkpLOhw*yJV8Z~ zw4yP8wxhP%a~yPUO0edG+BD%+AENUu=R2Z_w;^H1jUeI>ov?s{%b~%L@4-18A-Q)V z3V%ivtIJ9<`3G*So7oK%&)WOh?$BhUaALmMoc%sFM?Klhtu3eN##`rGgCl~>t*|ZD zJc0d_(22}_nBFdOEsI>y{yI`I|KePnO_A1Bw^%)f8{THUO)hpX{c!thDrdOzT3m>^B5Tp=Ez|qobd&XG&6+g>}>Kxw%2=YR1Wl zKh12rpm^Z*8u%Xp*J5)KiV#< ztR_9+?7lNN%1KFtJwyiCHS?pZix4S6)w1r96#P)zI@k(@e$hDY4)>mH)o&9WIoy3F z2@NSbe*yzw^V?VBarJF~uF0R#J1wH^S+-YH(dBEeV*|%#RA=RNy#0)1uYqbYZ+WX} z=DCdBqhRyA0+Yue0qFH-Rs(2;n%9_`!Ti2J@xG~a`)$J*GSqDE&?vdh{`ZjJEyq!OpwO`ylvMc-GH%i=5 zf##)82J-`ygGt72&OM(NBA$T>4bWzUri|=a^LOuB#3t^~dxSh1xD9YC|ICAa(XFdY zXT?id$qbI(|Ji=g=2Qc+WZn}rw=*LM`;r?~UV(55*!g>Qcs-V~LMt~`Uz3mSPUUTU z_M9*F@g=1C9wlV}WGS3~o1<@Mr2t%&q4yN{^sp#Vb3o{p@|hXGvW39)9qC&r8bRcw zz7|?Nxrusp^t(q7!Mh?F&%w;iS<8bywj%ljVitk!E$A`s4S?Ur11jC@Gs0bXY1RPC z$K?qo8Zat`%5;|=t0Q4lfm(D>UJ;aZjB_CGnRuA)`V@TRSgy80*Cv3VoqOL^c(hLS z0L9Hm_{7b8LJtDOExd-dm(&=xO7m5TDPBsObqukykqBknQxtk}4$`658{6qGvE4Z2 zyydhp=)NX|TOfboYR5MKH{`DSo!V6W z%h9g^%3~(blE%=WR0nF}23hb15&m|qNg~ouyKsk$g%B*a zp9ev4p_Z0(v8g&OyFI8>1+)aU;N|%6g=**h z;;sxH)QN^O|^M z-6F^MOA#Kud!;Xyw$|TdO@?EsG2<>hHr~>_)P+}&s`YQOi_&4ufJFEax9+g;$?m9JhXjd8zv-N13wvV0&CAm z$m3P4w+#t47tL^fWs%m z%0Bri{!NUzsK_?>H(g9haoSxmR!eII@QAPnsC5^;X(^j`LFOYFT`8qC&uLz$PDN%yOVxwzU< zw(Vi4j!Xo|)Zb)XmT>^fxV)T+FA+ngBF8w<(tUoJS47&)exlA`2Px3Q=sl$(6Nf%a5|-7X!mhc0AuN0pU?w44kWBe#Y69 zRt2%9Z7Md+8?gS;I6P5TWCZCHCygN!J!xK-0h88`$`2x)zP#Nw{~w{?C=br{QO@!9 zY2bDlbBxT}0$g<&QuMNVI5fe6OQL^ntvk83+z#T0miJBLNDIERO`8KI$HD|#dW%-T zZTvGbd2(a+l4D5==iihUR!mRtf%p7ulVfDRqlJ5*CX_EyPGQkLC#-iLA2-qoj?ty~ z5}z_0*v$~5a=YED_Zq$%?#C^ZNXktKg!$$lOWd@ux6v*6X&UQ7@0CaR*giX%Jqx=J z>HZ`ywI%LCVem^aQUnxJVW~s|bP?SyRHRuK`^_HFihlmK>mJ!?Pj~+)kdjH91-vPr z=r?n3wtzC`fGf}!HP@#b+%F%mQsig9S1`=@Dd5B}N}NG5R%svvMb2Zgb2QH&FPZrl zB72Q@s9px;T0SjsB^t#wvUgDZby|iP*Pd=gFlKG~i8%it)IqAYk4dVLg#B3YF85P7 zXDU1ge^jB1A0JYo2e12R>7=M8F^EHjeS|xE*>~|Z$L|*pPI$E%&_!@w?yod;AuDzD)$RO4ibh8*(^6C24msq4uH%9i_p{ zIGfhI=xS;&e{P>y;X0J{Mx%e;r4D`uSW)h85tSYtO6JIUgOGSQtTN!Clth@H5T7+qNd#coOxObYLc?`kw@j0cZDNWYby!)77W~*mrO;VCXc= zu#bq2$o^Nk>zWPYjHc>T4A&mayzKJ}x1zg+sy$sQ&s)`r6mXn1ox#t`>1Q*xsh<^R zKRyC}s3tnFc&EY^k?C8_( zUAyrn%Lz;4I%4>AvUwO)=?)a&wx`@SpQlP&Tf!HMP?hIY-YCgU)^O{9-JTvlL-LHi z#G#Dt#t_wiX>U1Gaqw$^O(ik_(^dC*5jstHu}s5d&~*=M9-YT?G~;}eXEZ0$80eVn z7iNqo41eCCU&r~j)pv#)$J-!}yY?%!kq`8m8%zIxr93czL>4OAZ9?CQI*RLxaA;(R{*ruvYp?nPfYG)LkoNHt)ftWnq0vNw+ zsPosS1fCoEcnQP|6GFnje^dyIL51agPs%%syRxTbN} zCSJO(Tut5j(@eVb=S`M!Vt6?u|dMk-fmM|+CD zOO^mU#`_DU*WB`kQW4N(D1eh3&h<<#TE_e@t?3q1E*CGTa1SB6miUF+8DSq?`gZO z@90^D#v}7C*RoV>muKb4fT(#F&7-G>HvBl^kEiwttL4>w2bf4fhh&q+(}zi>^0MvA z%f`Sxe(MBtO^b-5m~8bj;=sAI;xNhN*TueyiT|R}5NT?lcU}&0%gJz9<(DPDpI!Rn z{Q&Lz13bXHPgnl0Q8obLGYUG@HD2lGaJlh^Noy@$ymRV~%G@Fog=l1M`Swl!Hxc&S zJsiE6sIMt=iSvEm+0jNu88tMRq+=kNVyNvt&14s~!~G*NO&fJ5G9~7*!Ws1&Gu1Sr zB&EV`$S+X5@fof$!N(Y&Q1p>~Ued(6{&Rn$W+11}53#9H73V(Pd&tvqy^QLg2L)G? zyesL%3$|t_`(dl=p0vJ=88z;PA@Y5NHGKus!rMZ6| zldSIxZtxbY?Ez#JF){~kS_S$Xd-mqrYDmiR>_p_rAgTF(_p`4vSp*Shr-{2vTU?}I z9vFND!?c^uEhmu0&@8g&*inAaxyycHnBn0DupCGP;ggPLxy=MRAyqv}U9F)4KVNh6 zg3DM@D%IrC@y^v|97a{1tbO+GUyRyT1bl*_Zkdx&w;s(p_&`WX6XKz% zdhCXtZTNG7hogAgvS$aF%z=r|}72j8tk1I(DvAi!fjKAmFD@6q_zMStr z)^gAM*tOE3PIz#^%BPH4G|65`r~WifDYX2(v?68bc;=C_CbxLNZTi|K5x&4IA?ifK zEV`VsS+_*czE79)T7oVezU3pI+g|`rlt|)DcV2gVQtbSyKsV#LpAJa_wd_`C9JUCuNPs*afK)+nVz2WL zB&K*exrlLB7@aTsewI~GpjF>RZ4X8D^kGoi=jh#!te*#*(>ayRb=@@*;^XQ-Hz^-F zAdim1Og9URWf)rVVzkORhBVB#?)p9jZfbCWCAw4=#r>nq%G14OwbwqHMs#};H})mg zU^anJLNJp_ezc-3d;5cc@R*}t)ZzGL>Oq2K$G&691~AD1#HR}WMxGuOm4yw-J-@*4 zyNX)v8q(xGX3pVoi)UGB4ZWtlpy@v}q>N0q1ByYu|BORir=N?`Z{mlRc&TEfU zC9D}Q-p0K3J*obip%`Rjq0ME#`(m~uuuLx|u@$+_o)M=N!lGtu>(BC#i(Y)=L}Mh} zA|fYk2J+e~G)sg6X(`_pPM53zmWZGs%cec|ccnTIv)@ zI1@-f4i;t>ZFbnB+ z5_{kO!g9}B9}YtwIj#xpf2o~@?Bpu-F3TAi7yes;CF7~SOw^Q4n$Wphd(lcGt~8Je z!V)i}9}r&YXK;Q9-TBvCs{A+sy#Gk0jW_*)X&&o^XVTTAA$M+qG^pi)BiN@bx{^r$ zT%j_(mHsDE-$gXUD3J|H##ifNNO;IJ@Z%vRv^Xu6g$n&`k6hn!Y^OEApRb^1_G?`P z!1f{{aeZYT1mRhmNuhH4)e;@q_s#H8>PVZ zYu#it%Bf#Q^r5+QSMdZj-(2r&NkqkgO&Tr33G)RekF`v6{L@C(NKm`eu#ahNT6aM49>jHeaWE=r4WHlNf3N}0&NHc zQ?Sz&v3dP9TsLwQAX8%zLM!c0j)4+3Zv!Y|8|@#SAW4_Vpg?`Wi3iTSFFIbOb-AK* zf(TTgwp0*E5JMQQ#9oi^NXJlJ+GeFXVqD!jxBTKU2bn1Z%|v#PKFXeSfkat4I<&A8 zpJaF>L#mrFOtzyp;lh(9niMI*5J(~EO|jApgg(=8iEs2wt8yB@;7R7w6K9P<*}DTq z?%H?mwU6zG+~IVQ=ii|B}sp=&x2tWzqBG1J{KO+ zc{9)0c$+US1cJZ$>rM3=VPs*S_G2Yt|HQHB-ItzshFPVG@`42?9)GKw;`P_zYR?|} zd24hr7~HP;Dlka3IiK8^wQZEb)C>^llW!|6A<@9qD9XxtEWm4FUl14I)qc*F;P46& z_3doILC~GYUSwMv{e$9(7w*!SaG1f=(Fr&X(w1u11zYE2YO+&@v4$a++UvSp*xgh$ z>9+WTq?BtEFH+Y_3cf?XzUKP7yek9$>7;-Cra6Ye$vtF!^<}O-{@)jEpTq6kalQcHJt>XOnWB}m62jRHyvi-6L#u#|{|igYiabi>l!NOw!V z>-YQq@q4f5d7tOH=8yY2_sr+a%$fU~nK^f)j+P1$;UhvUEG(j@s)~A8SU6BDENn$Q z%m5a5^olta79;CZ#U}>78M~Q5abSlxoeY^;Kl3USaahVSbuS7O%DxI&<=-2Ka=amE zUst5DmkM1Wv6E7;xq9$a_j7CAW7^tPe{Z(3NdM|V53Psg zUWc)h*3N)Dbhl_CrwDoBrQG1v-X8ay+J3PXyLr<2OZA%RIlqOu!N#k-*pjUEdszFt zrqM|_Z2XNcr#>vs4)6Xj9QiQ;TbYVVbq&Y*wUs-m95pdxj2u@DZ%KY{c zV^{)cI`ss>=Ex~?G;EJ}CQY$7A|`P=s&wtX+;uM^uwDq~UC$ev7Ad3?@Lq*YQN<*o zaQCw*ceade`4!%lPcvI~(13Qwgb!_0{QkI>%?JKc35OJuTzRV>c>1UCL%-tQbXt1( zN2FY4pEZqh;e_EYV{PXo#Vo(`l&q5i%MMJBh8|K#B7GT~UQC12bQs0)Rhk*(37QVw z*|40mV_I8XzaxP6j*2L(<1d!O+_1PVa4wFUaGu}e&XshS%)nKErH1HGBFa5~Ip}eZ@yTdp$OyajsK!Hd1XtCzgV;}`F7D?huWDlzKlozh z6$G+0)W9PgpYMW0cQ}ss?^K=??jNoXHmgm$8zlhC6i%oqFrXLspF-Gep%US88FIw8 zy?J`rh=+Vk5UHNY6st_th^mQxx$1&MiKU=iJ;C$0f!fgyB3c|syP&NDS(BQvUbuI% z8r8dOmhg8}P1uEtk1#;DpH#nVB3i^j>%uvQu*K?Frxtf){#& zrVxbeYwl94P;0ba`f}EBkqs1S5Da3Qd73vW0%jCgLY0<3Qpo`f1cWRD$mJ13v{Hz& zbKY)Cd<5Te-2<(5H)?UfvxM)$c<%@7MB*Q$8HJMOnEOr$;xlm51&3;DRcu2nHWynj zYF=|k>O^FcUNalBH2E$qC1MbRZzLP&k@!e5%lpKSS+@DjUCWBYFU-RkMFK8l zNT`E;(`Ew