@camstack/addon-agent-ui 1.2.287 → 1.2.288
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/addon.js +1 -1
- package/dist/assets/{MotionZonesSettings-BYIe4Hj8.js → MotionZonesSettings-6yXs0YUy.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-cMbNvPuy.js → PrivacyMaskSettings-D94_J9cQ.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-d3ZcvlVV.js → SceneMonitorEditor-DCNzhy47.js} +1 -1
- package/dist/assets/{index-CcQrJsa6.js → index-C2HpUYT-.js} +3 -3
- package/dist/assets/index-So27-K6L.css +2 -0
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/index-B_zCxgXp.css +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MotionZonesSettings-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MotionZonesSettings-6yXs0YUy.js","assets/scheduler-0XZJE03d.js","assets/MaskShapeCanvas-BTvl6Rin.js","assets/PrivacyMaskSettings-D94_J9cQ.js","assets/SceneMonitorEditor-DCNzhy47.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{a as e,i as t,l as n,o as r,r as i,s as a,t as o}from"./scheduler-0XZJE03d.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var s=n(r()),c=function(e){return e.SystemBoot=`system.boot`,e.SystemAddonsReady=`system.addons-ready`,e.SystemRestarting=`system.restarting`,e.SystemRestartCompleted=`system.restart-completed`,e.SystemTlsCertChanged=`system.tls-cert-changed`,e.UpdateAvailable=`update.available`,e.SystemReadyState=`system.ready-state`,e.AddonStarted=`addon.started`,e.AddonStopped=`addon.stopped`,e.AddonRestarted=`addon.restarted`,e.AddonUpdated=`addon.updated`,e.AddonInstalled=`addon.installed`,e.AddonUninstalled=`addon.uninstalled`,e.AddonCrashed=`addon.crashed`,e.AddonRunnerFailed=`addon.runner-failed`,e.AddonRunnerRefused=`addon.runner-refused`,e.ProcessStateChanged=`process.state-changed`,e.SystemRunnerCheck=`system.runner-check`,e.AlertEpisode=`alert.episode`,e.AddonError=`addon.error`,e.AddonPageReady=`addon.page-ready`,e.AddonWidgetReady=`addon.widget-ready`,e.AddonLoadFailed=`addon.load-failed`,e.KeychainChanged=`keychain.changed`,e.AddonLoadRecovered=`addon.load-recovered`,e.AddonRetryScheduled=`addon.retry-scheduled`,e.SystemLivenessFailed=`system.liveness-failed`,e.SystemLivenessRecovered=`system.liveness-recovered`,e.AddonRetryAttempting=`addon.retry-attempting`,e.DeviceRegistered=`device.registered`,e.DeviceUnregistered=`device.unregistered`,e.DeviceEnabled=`device.enabled`,e.DeviceDisabled=`device.disabled`,e.DeviceSettingsUpdated=`device.settings-updated`,e.DeviceBindingsChanged=`device.bindings-changed`,e.DeviceMetaChanged=`device.meta-changed`,e.DeviceSourceInfoChanged=`device.source-info-changed`,e.DeviceStreamsRegistered=`device.streams-registered`,e.DeviceProvisioned=`device.provisioned`,e.DeviceReady=`device.ready`,e.IntegrationEnabled=`integration.enabled`,e.IntegrationDisabled=`integration.disabled`,e.IntegrationDeleted=`integration.deleted`,e.BrokerStatusChanged=`broker.status-changed`,e.BrokerMessage=`broker.message`,e.ProviderStarted=`provider.started`,e.ProviderStopped=`provider.stopped`,e.ProcessCrashed=`process.crashed`,e.ProcessRestartScheduled=`process.restart_scheduled`,e.ProcessRestarted=`process.restarted`,e.StorageLocationsChanged=`storage.locations-changed`,e.RecordingStarted=`recording.started`,e.RecordingStopped=`recording.stopped`,e.RecordingError=`recording.error`,e.RecordingHealthDegraded=`recording.health.degraded`,e.RecordingHealthStalled=`recording.health.stalled`,e.RecordingHealthOk=`recording.health.ok`,e.RecordingStorageCritical=`recording.storage.critical`,e.StorageLocationLow=`storage.location.low`,e.StorageLocationCritical=`storage.location.critical`,e.StorageLocationOk=`storage.location.ok`,e.RecordingSegmentWritten=`recording.segment.written`,e.RecordingPolicyFallback=`recording.policy.fallback`,e.RecordingRetentionCompleted=`recording.retention.completed`,e.RecordingExportProgress=`recording.export.progress`,e.RecordingExportCompleted=`recording.export.completed`,e.RecordingExportFailed=`recording.export.failed`,e.DetectionEvent=`detection.event`,e.SessionTrackNew=`session.track.new`,e.SessionTrackExpired=`session.track.expired`,e.BenchmarkProgress=`benchmark.progress`,e.PlatformProbePhase=`platform-probe.phase`,e.PipelineProgress=`pipeline.progress`,e.PipelineTrace=`pipeline.trace`,e.PipelineInferenceResult=`pipeline.inference-result`,e.PipelineCameraAssigned=`pipeline.camera-assigned`,e.PipelineCameraUnassigned=`pipeline.camera-unassigned`,e.PipelineNodeInferenceUnavailable=`pipeline.node-inference-unavailable`,e.PipelineDetectionBlind=`pipeline.detection-blind`,e.PipelineMotionNoisy=`pipeline.motion-noisy`,e.PipelineMotionCalm=`pipeline.motion-calm`,e.PipelinePackageLlmSilent=`pipeline.package-llm-silent`,e.PipelinePackageLlmAnswered=`pipeline.package-llm-answered`,e.PipelineCameraUpdated=`pipeline.camera-updated`,e.PipelineIngestOwnerChanged=`pipeline.ingest-owner-changed`,e.PipelineRunnerLoadSnapshot=`pipeline.runner-load-snapshot`,e.PipelineCameraMetricsSnapshot=`pipeline.camera-metrics-snapshot`,e.StreamBrokerMetricsSnapshot=`stream-broker.metrics-snapshot`,e.StreamBrokerOnCamStreamDemand=`stream-broker.onCamStreamDemand`,e.StreamBrokerOnCamStreamIdle=`stream-broker.onCamStreamIdle`,e.StreamBrokerOnRequestStreamSourceRefresh=`stream-broker.onRequestStreamSourceRefresh`,e.StreamParamsChanged=`stream-params.changed`,e.DeviceStateChanged=`device.state-changed`,e.DeviceNativeShadowChanged=`device.native-shadow-changed`,e.ZoneAnalyticsOccupancyChanged=`zone-analytics.occupancy-changed`,e.BatteryOnStatusChanged=`battery.onStatusChanged`,e.NetworkLinkOnStatusChanged=`network-link.onStatusChanged`,e.BatteryOnWakeStarted=`battery.onWakeStarted`,e.DoorbellOnPressed=`doorbell.onPressed`,e.RunningStarted=`running.started`,e.RunningFinished=`running.finished`,e.EventEmitted=`event-emitter.event`,e.PipelineEngineMetricsSnapshot=`pipeline.engine-metrics-snapshot`,e.PipelineEngineProvisioning=`pipeline.engine-provisioning`,e.ClusterTopologySnapshot=`cluster.topology-snapshot`,e.MetricsNodeResourcesSnapshot=`metrics.node-resources-snapshot`,e.MetricsNodeProcessesSnapshot=`metrics.node-processes-snapshot`,e.CapabilityBindingChanged=`capability.binding-changed`,e.ModelDownloadProgress=`model.download.progress`,e.AgentRegistered=`agent.registered`,e.AgentUnregistered=`agent.unregistered`,e.AgentOnline=`agent.online`,e.AgentOffline=`agent.offline`,e.WorkerOnline=`worker.online`,e.WorkerOffline=`worker.offline`,e.AgentTaskDispatched=`agent.task.dispatched`,e.AgentTaskAssigned=`agent.task.assigned`,e.AgentTrpcConnected=`agent.trpc.connected`,e.AgentWsConnected=`agent.ws.connected`,e.AgentWsDisconnected=`agent.ws.disconnected`,e.AgentBackupActivated=`agent.backup.activated`,e.OrchestrationSettingsUpdated=`orchestration.settings-updated`,e.MotionAnalysis=`detection.motion-analysis`,e.MotionZonesRaw=`detection.motion-zones-raw`,e.MotionOnMotionChanged=`motion.on-motion-changed`,e.DetectionResult=`detection.result`,e.DetectionRaw=`detection.raw`,e.DetectionCameraNative=`detection.camera-native`,e.PipelineAudioInferenceResult=`pipeline.audio-inference-result`,e.DetectionPhaseTransition=`detection.phase-transition`,e.ProviderMotion=`provider.motion`,e.ProviderDetection=`provider.detection`,e.EnrichmentEmbeddingStored=`enrichment.embedding.stored`,e.EnrichmentSceneStateChanged=`enrichment.scene.state-changed`,e.EnrichmentActivitySummary=`enrichment.activity.summary`,e.PipelineAnalyticsTrackLifecycle=`pipeline-analytics.track-lifecycle`,e.PipelineAnalyticsTrackStarted=`pipeline-analytics.track-started`,e.PipelineAnalyticsTrackEnded=`pipeline-analytics.track-ended`,e.PipelineAnalyticsDetectionEvent=`pipeline-analytics.detection-event`,e.PipelineAnalyticsFrameTracked=`pipeline-analytics.frame-tracked`,e.PipelineAnalyticsStationaryChanged=`pipeline-analytics.stationary-changed`,e.PipelineAnalyticsPackageDelivered=`pipeline-analytics.package-delivered`,e.PipelineAnalyticsPackagePickedUp=`pipeline-analytics.package-picked-up`,e.PipelineAnalyticsFaceGalleryChanged=`pipeline-analytics.face-gallery-changed`,e.PipelineAnalyticsPlateGalleryChanged=`pipeline-analytics.plate-gallery-changed`,e.CameraStreamsProfileSlotsChanged=`camera-streams.onProfileSlotsChanged`,e.StreamOnline=`stream.online`,e.StreamOffline=`stream.offline`,e.NetworkTunnelStarted=`network.tunnel.started`,e.NetworkTunnelStopped=`network.tunnel.stopped`,e.LocalNetworkChanged=`network.local.changed`,e.MeshNetworkChanged=`network.mesh.changed`,e.BackupCompleted=`backup.completed`,e.BackupRunCompleted=`backup.run-completed`,e.BackupRestored=`backup.restored`,e.NotificationDispatched=`notification.dispatched`,e.NotificationFailed=`notification.failed`,e.NotificationRuleBroken=`notification.rule-broken`,e.NotificationRuleRepaired=`notification.rule-repaired`,e.DeviceUpdated=`device.updated`,e.DeviceOnline=`device.online`,e.DeviceOffline=`device.offline`,e.DeviceAwake=`device.awake`,e.DeviceSleeping=`device.sleeping`,e.RetentionCleanup=`retention.cleanup`,e.AddonsBulkUpdateProgress=`addons.bulk-update-progress`,e.AddonsJobProgress=`addons.job-progress`,e.AddonsJobLog=`addons.job-log`,e.AccessoriesChildVisibilityChanged=`accessories.onChildVisibilityChanged`,e.AccessoriesChanged=`accessories.onAccessoriesChanged`,e.ActionsRunChanged=`actions.onRunChanged`,e.ModelConvertProgress=`model-convert.progress`,e}({}),l=new Set([`device.native-shadow-changed`]);function u(e){return l.has(e)}function d(){let e=Object.values(c).filter(e=>typeof e==`string`);return[...new Set(e)].filter(e=>!u(e)).toSorted()}var f;function p(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var m=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},h=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(f=globalThis).__zod_globalConfig??(f.__zod_globalConfig={});var g=globalThis.__zod_globalConfig;function _(e){return e&&Object.assign(g,e),g}function v(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function y(e,t){return typeof t==`bigint`?t.toString():t}function b(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function ee(e){return e==null}function te(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ne(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var x=Symbol(`evaluating`);function S(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==x)return r===void 0&&(r=x,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function re(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ie(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function ae(e){return JSON.stringify(e)}function oe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var se=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function ce(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var le=b(()=>{if(g.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function ue(e){if(ce(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(ce(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function de(e){return ue(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var fe=new Set([`string`,`number`,`symbol`]);function C(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function pe(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function w(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function me(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var he={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ge(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return pe(e,ie(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return re(this,`shape`,e),e},checks:[]}))}function _e(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return pe(e,ie(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return re(this,`shape`,r),r},checks:[]}))}function ve(e,t){if(!ue(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return pe(e,ie(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return re(this,`shape`,n),n}}))}function ye(e,t){if(!ue(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return pe(e,ie(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return re(this,`shape`,n),n}}))}function be(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return pe(e,ie(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return re(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function xe(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return pe(t,ie(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return re(this,`shape`,i),i},checks:[]}))}function Se(e,t,n){return pe(t,ie(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return re(this,`shape`,i),i}}))}function Ce(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function we(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Te(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ee(e){return typeof e==`string`?e:e?.message}function De(e,t,n){let r=e.message?e.message:Ee(e.inst?._zod.def?.error?.(e))??Ee(t?.error?.(e))??Ee(n.customError?.(e))??Ee(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function Oe(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ke(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Ae=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,y,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},je=p(`$ZodError`,Ae),Me=p(`$ZodError`,Ae,{Parent:Error});function Ne(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Pe(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var Fe=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new m;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>De(e,a,_())));throw se(t,i?.callee),t}return o.value},Ie=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>De(e,a,_())));throw se(t,i?.callee),t}return o.value},Le=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new m;return a.issues.length?{success:!1,error:new(e??je)(a.issues.map(e=>De(e,i,_())))}:{success:!0,data:a.value}},Re=Le(Me),ze=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>De(e,i,_())))}:{success:!0,data:a.value}},Be=ze(Me),Ve=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Fe(e)(t,n,i)},He=e=>(t,n,r)=>Fe(e)(t,n,r),Ue=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ie(e)(t,n,i)},We=e=>async(t,n,r)=>Ie(e)(t,n,r),Ge=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Le(e)(t,n,i)},Ke=e=>(t,n,r)=>Le(e)(t,n,r),qe=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ze(e)(t,n,i)},Je=e=>async(t,n,r)=>ze(e)(t,n,r),Ye=/^[cC][0-9a-z]{6,}$/,Xe=/^[0-9a-z]+$/,Ze=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Qe=/^[0-9a-vA-V]{20}$/,$e=/^[A-Za-z0-9]{27}$/,et=/^[a-zA-Z0-9_-]{21}$/,tt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,nt=/^([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})$/,rt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,it=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,at=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function ot(){return new RegExp(at,`u`)}var st=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ct=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,lt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ut=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ft=/^[A-Za-z0-9_-]*$/,pt=/^https?$/,mt=/^\+[1-9]\d{6,14}$/,ht=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,gt=RegExp(`^${ht}$`);function _t(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function vt(e){return RegExp(`^${_t(e)}$`)}function yt(e){let t=_t({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${ht}T(?:${r})$`)}var bt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},xt=/^-?\d+$/,St=/^-?\d+(?:\.\d+)?$/,Ct=/^(?:true|false)$/i,wt=/^null$/i,Tt=/^[^A-Z]*$/,Et=/^[^a-z]*$/,Dt=p(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ot={number:`number`,bigint:`bigint`,object:`date`},kt=p(`$ZodCheckLessThan`,(e,t)=>{Dt.init(e,t);let n=Ot[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),At=p(`$ZodCheckGreaterThan`,(e,t)=>{Dt.init(e,t);let n=Ot[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),jt=p(`$ZodCheckMultipleOf`,(e,t)=>{Dt.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ne(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Mt=p(`$ZodCheckNumberFormat`,(e,t)=>{Dt.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=he[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=xt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Nt=p(`$ZodCheckMaxLength`,(e,t)=>{var n;Dt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ee(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Oe(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Pt=p(`$ZodCheckMinLength`,(e,t)=>{var n;Dt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ee(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Oe(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ft=p(`$ZodCheckLengthEquals`,(e,t)=>{var n;Dt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ee(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Oe(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),It=p(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Dt.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Lt=p(`$ZodCheckRegex`,(e,t)=>{It.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Rt=p(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Tt,It.init(e,t)}),zt=p(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Et,It.init(e,t)}),Bt=p(`$ZodCheckIncludes`,(e,t)=>{Dt.init(e,t);let n=C(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Vt=p(`$ZodCheckStartsWith`,(e,t)=>{Dt.init(e,t);let n=RegExp(`^${C(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Ht=p(`$ZodCheckEndsWith`,(e,t)=>{Dt.init(e,t);let n=RegExp(`.*${C(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Ut=p(`$ZodCheckOverwrite`,(e,t)=>{Dt.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Wt=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
3
3
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
4
4
|
`))}},Gt={major:4,minor:4,patch:3},Kt=p(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Gt;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=Ce(e),i;for(let a of t){if(a._zod.def.when){if(we(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new m;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Ce(e,t))});else{if(e.issues.length===t)continue;r||=Ce(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(Ce(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new m;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new m;return o.then(e=>t(e,r,a))}return t(o,r,a)}}S(e,`~standard`,()=>({validate:t=>{try{let n=Re(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Be(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),qt=p(`$ZodString`,(e,t)=>{Kt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??bt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Jt=p(`$ZodStringFormat`,(e,t)=>{It.init(e,t),qt.init(e,t)}),Yt=p(`$ZodGUID`,(e,t)=>{t.pattern??=nt,Jt.init(e,t)}),Xt=p(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=rt(e)}else t.pattern??=rt();Jt.init(e,t)}),Zt=p(`$ZodEmail`,(e,t)=>{t.pattern??=it,Jt.init(e,t)}),Qt=p(`$ZodURL`,(e,t)=>{Jt.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===pt.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),$t=p(`$ZodEmoji`,(e,t)=>{t.pattern??=ot(),Jt.init(e,t)}),en=p(`$ZodNanoID`,(e,t)=>{t.pattern??=et,Jt.init(e,t)}),tn=p(`$ZodCUID`,(e,t)=>{t.pattern??=Ye,Jt.init(e,t)}),nn=p(`$ZodCUID2`,(e,t)=>{t.pattern??=Xe,Jt.init(e,t)}),rn=p(`$ZodULID`,(e,t)=>{t.pattern??=Ze,Jt.init(e,t)}),an=p(`$ZodXID`,(e,t)=>{t.pattern??=Qe,Jt.init(e,t)}),on=p(`$ZodKSUID`,(e,t)=>{t.pattern??=$e,Jt.init(e,t)}),sn=p(`$ZodISODateTime`,(e,t)=>{t.pattern??=yt(t),Jt.init(e,t)}),cn=p(`$ZodISODate`,(e,t)=>{t.pattern??=gt,Jt.init(e,t)}),ln=p(`$ZodISOTime`,(e,t)=>{t.pattern??=vt(t),Jt.init(e,t)}),un=p(`$ZodISODuration`,(e,t)=>{t.pattern??=tt,Jt.init(e,t)}),dn=p(`$ZodIPv4`,(e,t)=>{t.pattern??=st,Jt.init(e,t),e._zod.bag.format=`ipv4`}),fn=p(`$ZodIPv6`,(e,t)=>{t.pattern??=ct,Jt.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),pn=p(`$ZodCIDRv4`,(e,t)=>{t.pattern??=lt,Jt.init(e,t)}),mn=p(`$ZodCIDRv6`,(e,t)=>{t.pattern??=ut,Jt.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function hn(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var gn=p(`$ZodBase64`,(e,t)=>{t.pattern??=dt,Jt.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{hn(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function _n(e){if(!ft.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return hn(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var vn=p(`$ZodBase64URL`,(e,t)=>{t.pattern??=ft,Jt.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{_n(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),yn=p(`$ZodE164`,(e,t)=>{t.pattern??=mt,Jt.init(e,t)});function bn(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var xn=p(`$ZodJWT`,(e,t)=>{Jt.init(e,t),e._zod.check=n=>{bn(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Sn=p(`$ZodNumber`,(e,t)=>{Kt.init(e,t),e._zod.pattern=e._zod.bag.pattern??St,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Cn=p(`$ZodNumberFormat`,(e,t)=>{Mt.init(e,t),Sn.init(e,t)}),wn=p(`$ZodBoolean`,(e,t)=>{Kt.init(e,t),e._zod.pattern=Ct,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Tn=p(`$ZodNull`,(e,t)=>{Kt.init(e,t),e._zod.pattern=wt,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),En=p(`$ZodAny`,(e,t)=>{Kt.init(e,t),e._zod.parse=e=>e}),Dn=p(`$ZodUnknown`,(e,t)=>{Kt.init(e,t),e._zod.parse=e=>e}),On=p(`$ZodNever`,(e,t)=>{Kt.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),kn=p(`$ZodVoid`,(e,t)=>{Kt.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),An=p(`$ZodDate`,(e,t)=>{Kt.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}});function jn(e,t,n){e.issues.length&&t.issues.push(...Te(n,e.issues)),t.value[n]=e.value}var Mn=p(`$ZodArray`,(e,t)=>{Kt.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>jn(t,n,e))):jn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Nn(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Te(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function Pn(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=me(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Fn(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Nn(e,n,i,t,u,d))):Nn(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var In=p(`$ZodObject`,(e,t)=>{if(Kt.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=b(()=>Pn(t));S(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=ce,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>Nn(n,t,e,s,r,i))):Nn(a,t,e,s,r,i)}return i?Fn(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Ln=p(`$ZodObjectJIT`,(e,t)=>{In.init(e,t);let n=e._zod.parse,r=b(()=>Pn(t)),i=e=>{let t=new Wt([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=ae(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=ae(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
@@ -76,7 +76,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
76
76
|
Error generating stack: `+e.message+`
|
|
77
77
|
`+e.stack}}var Ne=Object.prototype.hasOwnProperty,Pe=t.unstable_scheduleCallback,Fe=t.unstable_cancelCallback,Ie=t.unstable_shouldYield,Le=t.unstable_requestPaint,Re=t.unstable_now,ze=t.unstable_getCurrentPriorityLevel,Be=t.unstable_ImmediatePriority,Ve=t.unstable_UserBlockingPriority,He=t.unstable_NormalPriority,Ue=t.unstable_LowPriority,We=t.unstable_IdlePriority,Ge=t.log,Ke=t.unstable_setDisableYieldValue,qe=null,Je=null;function Ye(e){if(typeof Ge==`function`&&Ke(e),Je&&typeof Je.setStrictMode==`function`)try{Je.setStrictMode(qe,e)}catch{}}var Xe=Math.clz32?Math.clz32:$e,Ze=Math.log,Qe=Math.LN2;function $e(e){return e>>>=0,e===0?32:31-(Ze(e)/Qe|0)|0}var et=256,tt=262144,nt=4194304;function rt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function it(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=rt(n))):i=rt(o):i=rt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=rt(n))):i=rt(o)):i=rt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function at(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ot(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function st(){var e=nt;return nt<<=1,!(nt&62914560)&&(nt=4194304),e}function ct(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function lt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ut(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Xe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&dt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function dt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Xe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ft(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Xe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function pt(e,t){var n=t&-t;return n=n&42?1:mt(n),(n&(e.suspendedLanes|t))===0?n:0}function mt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ht(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function gt(){var e=C.p;return e===0?(e=window.event,e===void 0?32:Tp(e.type)):e}function _t(e,t){var n=C.p;try{return C.p=e,t()}finally{C.p=n}}var vt=Math.random().toString(36).slice(2),yt=`__reactFiber$`+vt,bt=`__reactProps$`+vt,xt=`__reactContainer$`+vt,St=`__reactEvents$`+vt,Ct=`__reactListeners$`+vt,wt=`__reactHandles$`+vt,Tt=`__reactResources$`+vt,Et=`__reactMarker$`+vt;function Dt(e){delete e[yt],delete e[bt],delete e[St],delete e[Ct],delete e[wt]}function Ot(e){var t=e[yt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[xt]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sf(e);e!==null;){if(n=e[yt])return n;e=Sf(e)}return t}e=n,n=e.parentNode}return null}function kt(e){if(e=e[yt]||e[xt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function At(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function jt(e){var t=e[Tt];return t||=e[Tt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Mt(e){e[Et]=!0}var Nt=new Set,Pt={};function Ft(e,t){It(e,t),It(e+`Capture`,t)}function It(e,t){for(Pt[e]=t,e=0;e<t.length;e++)Nt.add(t[e])}var Lt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Rt={},zt={};function Bt(e){return Ne.call(zt,e)?!0:Ne.call(Rt,e)?!1:Lt.test(e)?zt[e]=!0:(Rt[e]=!0,!1)}function Vt(e,t,n){if(Bt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ht(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ut(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Gt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Kt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qt(e){if(!e._valueTracker){var t=Gt(e)?`checked`:`value`;e._valueTracker=Kt(e,t,``+e[t])}}function Jt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Gt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Yt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Xt=/[\n"\\]/g;function Zt(e){return e.replace(Xt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Qt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Wt(t)):e.value!==``+Wt(t)&&(e.value=``+Wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):en(e,o,Wt(n)):en(e,o,Wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Wt(s):e.removeAttribute(`name`)}function $t(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){qt(e);return}n=n==null?``:``+Wt(n),t=t==null?n:``+Wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),qt(e)}function en(e,t,n){t===`number`&&Yt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function tn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function nn(e,t,n){if(t!=null&&(t=``+Wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Wt(n)}function rn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(de(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=Wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),qt(e)}function an(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var on=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function sn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||on.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function cn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&sn(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&sn(e,o,t[o])}function ln(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var un=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),dn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function fn(e){return dn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function pn(){}var mn=null;function hn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gn=null,_n=null;function vn(e){var t=kt(e);if(t&&(e=t.stateNode)){var n=e[bt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Qt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[bt]||null;if(!i)throw Error(a(90));Qt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Jt(r)}break a;case`textarea`:nn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&tn(e,!!n.multiple,t,!1)}}}var yn=!1;function bn(e,t,n){if(yn)return e(t,n);yn=!0;try{return e(t)}finally{if(yn=!1,(gn!==null||_n!==null)&&(Ou(),gn&&(t=gn,e=_n,_n=gn=null,vn(t),e)))for(t=0;t<e.length;t++)vn(e[t])}}function xn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[bt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var Sn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Cn=!1;if(Sn)try{var wn={};Object.defineProperty(wn,"passive",{get:function(){Cn=!0}}),window.addEventListener(`test`,wn,wn),window.removeEventListener(`test`,wn,wn)}catch{Cn=!1}var Tn=null,En=null,Dn=null;function On(){if(Dn)return Dn;var e,t=En,n=t.length,r,i=`value`in Tn?Tn.value:Tn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Dn=i.slice(e,1<r?1-r:void 0)}function kn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function An(){return!0}function jn(){return!1}function Mn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?An:jn,this.isPropagationStopped=jn,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=An)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=An)},persist:function(){},isPersistent:An}),t}var Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pn=Mn(Nn),Fn=m({},Nn,{view:0,detail:0}),In=Mn(Fn),Ln,Rn,zn,Bn=m({},Fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==zn&&(zn&&e.type===`mousemove`?(Ln=e.screenX-zn.screenX,Rn=e.screenY-zn.screenY):Rn=Ln=0,zn=e),Ln)},movementY:function(e){return`movementY`in e?e.movementY:Rn}}),Vn=Mn(Bn),Hn=Mn(m({},Bn,{dataTransfer:0})),Un=Mn(m({},Fn,{relatedTarget:0})),Wn=Mn(m({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0})),Gn=Mn(m({},Nn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Kn=Mn(m({},Nn,{data:0})),qn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Jn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Yn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yn[e])?!!t[e]:!1}function Zn(){return Xn}var Qn=Mn(m({},Fn,{key:function(e){if(e.key){var t=qn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=kn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Jn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zn,charCode:function(e){return e.type===`keypress`?kn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?kn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),$n=Mn(m({},Bn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),er=Mn(m({},Fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zn})),tr=Mn(m({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0})),nr=Mn(m({},Bn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),rr=Mn(m({},Nn,{newState:0,oldState:0})),ir=[9,13,27,32],ar=Sn&&`CompositionEvent`in window,or=null;Sn&&`documentMode`in document&&(or=document.documentMode);var sr=Sn&&`TextEvent`in window&&!or,cr=Sn&&(!ar||or&&8<or&&11>=or),lr=` `,ur=!1;function dr(e,t){switch(e){case`keyup`:return ir.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function fr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var pr=!1;function mr(e,t){switch(e){case`compositionend`:return fr(t);case`keypress`:return t.which===32?(ur=!0,lr):null;case`textInput`:return e=t.data,e===lr&&ur?null:e;default:return null}}function hr(e,t){if(pr)return e===`compositionend`||!ar&&dr(e,t)?(e=On(),Dn=En=Tn=null,pr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return cr&&t.locale!==`ko`?null:t.data;default:return null}}var gr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!gr[e.type]:t===`textarea`}function vr(e,t,n,r){gn?_n?_n.push(r):_n=[r]:gn=r,t=Id(t,`onChange`),0<t.length&&(n=new Pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var yr=null,br=null;function xr(e){Od(e,0)}function Sr(e){if(Jt(At(e)))return e}function Cr(e,t){if(e===`change`)return t}var wr=!1;if(Sn){var Tr;if(Sn){var Er=`oninput`in document;if(!Er){var Dr=document.createElement(`div`);Dr.setAttribute(`oninput`,`return;`),Er=typeof Dr.oninput==`function`}Tr=Er}else Tr=!1;wr=Tr&&(!document.documentMode||9<document.documentMode)}function Or(){yr&&(yr.detachEvent(`onpropertychange`,kr),br=yr=null)}function kr(e){if(e.propertyName===`value`&&Sr(br)){var t=[];vr(t,br,e,hn(e)),bn(xr,t)}}function Ar(e,t,n){e===`focusin`?(Or(),yr=t,br=n,yr.attachEvent(`onpropertychange`,kr)):e===`focusout`&&Or()}function jr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Sr(br)}function Mr(e,t){if(e===`click`)return Sr(t)}function Nr(e,t){if(e===`input`||e===`change`)return Sr(t)}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Fr=typeof Object.is==`function`?Object.is:Pr;function Ir(e,t){if(Fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ne.call(t,i)||!Fr(e[i],t[i]))return!1}return!0}function Lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rr(e,t){var n=Lr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Lr(n)}}function zr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Br(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yt(e.document)}return t}function Vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Hr=Sn&&`documentMode`in document&&11>=document.documentMode,Ur=null,Wr=null,Gr=null,Kr=!1;function qr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kr||Ur==null||Ur!==Yt(r)||(r=Ur,`selectionStart`in r&&Vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Gr&&Ir(Gr,r)||(Gr=r,r=Id(Wr,`onSelect`),0<r.length&&(t=new Pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ur)))}function Jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Yr={animationend:Jr(`Animation`,`AnimationEnd`),animationiteration:Jr(`Animation`,`AnimationIteration`),animationstart:Jr(`Animation`,`AnimationStart`),transitionrun:Jr(`Transition`,`TransitionRun`),transitionstart:Jr(`Transition`,`TransitionStart`),transitioncancel:Jr(`Transition`,`TransitionCancel`),transitionend:Jr(`Transition`,`TransitionEnd`)},Xr={},Zr={};Sn&&(Zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Yr.animationend.animation,delete Yr.animationiteration.animation,delete Yr.animationstart.animation),`TransitionEvent`in window||delete Yr.transitionend.transition);function Qr(e){if(Xr[e])return Xr[e];if(!Yr[e])return e;var t=Yr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zr)return Xr[e]=t[n];return e}var $r=Qr(`animationend`),ei=Qr(`animationiteration`),ti=Qr(`animationstart`),ni=Qr(`transitionrun`),ri=Qr(`transitionstart`),ii=Qr(`transitioncancel`),ai=Qr(`transitionend`),oi=new Map,si=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);si.push(`scrollEnd`);function ci(e,t){oi.set(e,t),Ft(t,[e])}var li=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ui=[],di=0,fi=0;function pi(){for(var e=di,t=fi=di=0;t<e;){var n=ui[t];ui[t++]=null;var r=ui[t];ui[t++]=null;var i=ui[t];ui[t++]=null;var a=ui[t];if(ui[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&_i(n,i,a)}}function mi(e,t,n,r){ui[di++]=e,ui[di++]=t,ui[di++]=n,ui[di++]=r,fi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function hi(e,t,n,r){return mi(e,t,n,r),vi(e)}function gi(e,t){return mi(e,null,null,t),vi(e)}function _i(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Xe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function vi(e){if(50<yu)throw yu=0,bu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yi={};function bi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xi(e,t,n,r){return new bi(e,t,n,r)}function Si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ci(e,t){var n=e.alternate;return n===null?(n=xi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function wi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ti(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)Si(e)&&(s=1);else if(typeof e==`string`)s=ep(e,n,ve.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ae:return e=xi(31,n,t,i),e.elementType=ae,e.lanes=o,e;case v:return Ei(n.children,i,o,t);case y:s=8,i|=24;break;case b:return e=xi(12,n,t,i|2),e.elementType=b,e.lanes=o,e;case x:return e=xi(13,n,t,i),e.elementType=x,e.lanes=o,e;case S:return e=xi(19,n,t,i),e.elementType=S,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case te:s=10;break a;case ee:s=9;break a;case ne:s=11;break a;case re:s=14;break a;case ie:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=xi(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ei(e,t,n,r){return e=xi(7,e,r,t),e.lanes=n,e}function Di(e,t,n){return e=xi(6,e,null,t),e.lanes=n,e}function Oi(e){var t=xi(18,null,null,0);return t.stateNode=e,t}function ki(e,t,n){return t=xi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ai=new WeakMap;function ji(e,t){if(typeof e==`object`&&e){var n=Ai.get(e);return n===void 0?(t={value:e,source:t,stack:Me(t)},Ai.set(e,t),t):n}return{value:e,source:t,stack:Me(t)}}var Mi=[],Ni=0,Pi=null,Fi=0,Ii=[],Li=0,Ri=null,zi=1,Bi=``;function Vi(e,t){Mi[Ni++]=Fi,Mi[Ni++]=Pi,Pi=e,Fi=t}function Hi(e,t,n){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,Ri=e;var r=zi;e=Bi;var i=32-Xe(r)-1;r&=~(1<<i),n+=1;var a=32-Xe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,zi=1<<32-Xe(t)+i|n<<i|r,Bi=a+e}else zi=1<<a|n<<i|r,Bi=e}function Ui(e){e.return!==null&&(Vi(e,1),Hi(e,1,0))}function Wi(e){for(;e===Pi;)Pi=Mi[--Ni],Mi[Ni]=null,Fi=Mi[--Ni],Mi[Ni]=null;for(;e===Ri;)Ri=Ii[--Li],Ii[Li]=null,Bi=Ii[--Li],Ii[Li]=null,zi=Ii[--Li],Ii[Li]=null}function Gi(e,t){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,zi=t.id,Bi=t.overflow,Ri=e}var Ki=null,qi=null,Ji=!1,Yi=null,Xi=!1,Zi=Error(a(519));function Qi(e){throw ia(ji(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Zi}function $i(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[yt]=e,t[bt]=r,n){case`dialog`:kd(`cancel`,t),kd(`close`,t);break;case`iframe`:case`object`:case`embed`:kd(`load`,t);break;case`video`:case`audio`:for(n=0;n<Ed.length;n++)kd(Ed[n],t);break;case`source`:kd(`error`,t);break;case`img`:case`image`:case`link`:kd(`error`,t),kd(`load`,t);break;case`details`:kd(`toggle`,t);break;case`input`:kd(`invalid`,t),$t(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:kd(`invalid`,t);break;case`textarea`:kd(`invalid`,t),rn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Hd(t.textContent,n)?(r.popover!=null&&(kd(`beforetoggle`,t),kd(`toggle`,t)),r.onScroll!=null&&kd(`scroll`,t),r.onScrollEnd!=null&&kd(`scrollend`,t),r.onClick!=null&&(t.onclick=pn),t=!0):t=!1,t||Qi(e,!0)}function ea(e){for(Ki=e.return;Ki;)switch(Ki.tag){case 5:case 31:case 13:Xi=!1;return;case 27:case 3:Xi=!0;return;default:Ki=Ki.return}}function ta(e){if(e!==Ki)return!1;if(!Ji)return ea(e),Ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||ef(e.type,e.memoizedProps)),n=!n),n&&qi&&Qi(e),ea(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));qi=xf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));qi=xf(e)}else t===27?(t=qi,lf(e.type)?(e=bf,bf=null,qi=e):qi=t):qi=Ki?yf(e.stateNode.nextSibling):null;return!0}function na(){qi=Ki=null,Ji=!1}function ra(){var e=Yi;return e!==null&&(au===null?au=e:au.push.apply(au,e),Yi=null),e}function ia(e){Yi===null?Yi=[e]:Yi.push(e)}var aa=he(null),oa=null,sa=null;function ca(e,t,n){_e(aa,t._currentValue),t._currentValue=n}function la(e){e._currentValue=aa.current,ge(aa)}function ua(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function da(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ua(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ua(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function fa(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;Fr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===xe.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[lp]:e.push(lp))}i=i.return}e!==null&&da(t,e,n,r),t.flags|=262144}function pa(e){for(e=e.firstContext;e!==null;){if(!Fr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ma(e){oa=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ha(e){return _a(oa,e)}function ga(e,t){return oa===null&&ma(e),_a(e,t)}function _a(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},sa===null){if(e===null)throw Error(a(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return n}var va=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ya=t.unstable_scheduleCallback,ba=t.unstable_NormalPriority,xa={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sa(){return{controller:new va,data:new Map,refCount:0}}function Ca(e){e.refCount--,e.refCount===0&&ya(ba,function(){e.controller.abort()})}var wa=null,Ta=0,Ea=0,Da=null;function Oa(e,t){if(wa===null){var n=wa=[];Ta=0,Ea=bd(),Da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ta++,t.then(ka,ka),t}function ka(){if(--Ta===0&&wa!==null){Da!==null&&(Da.status=`fulfilled`);var e=wa;wa=null,Ea=0,Da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Aa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ja=fe.S;fe.S=function(e,t){cu=Re(),typeof t==`object`&&t&&typeof t.then==`function`&&Oa(e,t),ja!==null&&ja(e,t)};var Ma=he(null);function T(){var e=Ma.current;return e===null?Ul.pooledCache:e}function Na(e,t){t===null?_e(Ma,Ma.current):_e(Ma,t.pool)}function Pa(){var e=T();return e===null?null:{parent:xa._currentValue,pool:e}}var Fa=Error(a(460)),Ia=Error(a(474)),La=Error(a(542)),Ra={then:function(){}};function za(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ba(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(pn,pn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Wa(e),e;default:if(typeof t.status==`string`)t.then(pn,pn);else{if(e=Ul,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Wa(e),e}throw Ha=t,Fa}}function Va(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ha=e,Fa):e}}var Ha=null;function Ua(){if(Ha===null)throw Error(a(459));var e=Ha;return Ha=null,e}function Wa(e){if(e===Fa||e===La)throw Error(a(483))}var Ga=null,Ka=0;function qa(e){var t=Ka;return Ka+=1,Ga===null&&(Ga=[]),Ba(Ga,e,t)}function Ja(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ya(e,t){throw t.$$typeof===h?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Xa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=Ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Di(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===v?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===ie&&Va(a)===t.type)?(t=i(t,n.props),Ja(t,n),t.return=e,t):(t=Ti(n.type,n.key,n.props,null,e.mode,r),Ja(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ki(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=Ei(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=Ti(t.type,t.key,t.props,null,e.mode,n),Ja(n,t),n.return=e,n;case _:return t=ki(t,e.mode,n),t.return=e,t;case ie:return t=Va(t),f(e,t,n)}if(de(t)||ce(t))return t=Ei(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,qa(t),n);if(t.$$typeof===te)return f(e,ga(e,t),n);Ya(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case _:return n.key===i?u(e,t,n,r):null;case ie:return n=Va(n),p(e,t,n,r)}if(de(n)||ce(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,qa(n),r);if(n.$$typeof===te)return p(e,t,ga(e,n),r);Ya(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case _:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ie:return r=Va(r),m(e,t,n,r,i)}if(de(r)||ce(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,qa(r),i);if(r.$$typeof===te)return m(e,t,n,ga(t,r),i);Ya(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ji&&Vi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ji&&Vi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ji&&Vi(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),Ji&&Vi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ji&&Vi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),Ji&&Vi(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===v&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===v){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ie&&Va(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ja(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===v?(c=Ei(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Ti(o.type,o.key,o.props,null,e.mode,c),Ja(c,o),c.return=e,e=c)}return s(e);case _:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ki(o,e.mode,c),c.return=e,e=c}return s(e);case ie:return o=Va(o),b(e,r,o,c)}if(de(o))return h(e,r,o,c);if(ce(o)){if(l=ce(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,qa(o),c);if(o.$$typeof===te)return b(e,r,ga(e,o),c);Ya(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=Di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ka=0;var i=b(e,t,n,r);return Ga=null,i}catch(t){if(t===Fa||t===La)throw t;var a=xi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Za=Xa(!0),Qa=Xa(!1),$a=!1;function eo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function to(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function E(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function no(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Hl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=vi(e),_i(e,null,n),t}return mi(e,r,t,n),vi(e)}function ro(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ft(e,n)}}function io(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var D=!1;function ao(){if(D){var e=Da;if(e!==null)throw e}}function oo(e,t,n,r){D=!1;var i=e.updateQueue;$a=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Gl&f)===f:(r&f)===f){f!==0&&f===Ea&&(D=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:$a=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),$l|=o,e.lanes=o,e.memoizedState=d}}function so(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function co(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)so(n[e],t)}var lo=he(null),O=he(0);function uo(e,t){e=Zl,_e(O,e),_e(lo,t),Zl=e|t.baseLanes}function fo(){_e(O,Zl),_e(lo,lo.current)}function po(){Zl=O.current,ge(lo),ge(O)}var k=he(null),mo=null;function ho(e){var t=e.alternate;_e(vo,vo.current&1),_e(k,e),mo===null&&(t===null||lo.current!==null||t.memoizedState!==null)&&(mo=e)}function go(e){_e(vo,vo.current),_e(k,e),mo===null&&(mo=e)}function A(e){e.tag===22?(_e(vo,vo.current),_e(k,e),mo===null&&(mo=e)):_o(e)}function _o(){_e(vo,vo.current),_e(k,k.current)}function j(e){ge(k),mo===e&&(mo=null),ge(vo)}var vo=he(0);function yo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||gf(n)||_f(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var M=0,bo=null,N=null,xo=null,So=!1,Co=!1,wo=!1,To=0,P=0,Eo=null,Do=0;function F(){throw Error(a(321))}function Oo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function I(e,t,n,r,i,a){return M=a,bo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fe.H=e===null||e.memoizedState===null?Ws:Gs,wo=!1,a=n(r,i),wo=!1,Co&&(a=Ao(t,n,r,i)),ko(e),a}function ko(e){fe.H=Us;var t=N!==null&&N.next!==null;if(M=0,xo=N=bo=null,So=!1,P=0,Eo=null,t)throw Error(a(300));e===null||sc||(e=e.dependencies,e!==null&&pa(e)&&(sc=!0))}function Ao(e,t,n,r){bo=e;var i=0;do{if(Co&&(Eo=null),P=0,Co=!1,25<=i)throw Error(a(301));if(i+=1,xo=N=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}fe.H=Ks,o=t(n,r)}while(Co);return o}function jo(){var e=fe.H,t=e.useState()[0];return t=typeof t.then==`function`?Ro(t):t,e=e.useState()[0],(N===null?null:N.memoizedState)!==e&&(bo.flags|=1024),t}function Mo(){var e=To!==0;return To=0,e}function No(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Po(e){if(So){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}So=!1}M=0,xo=N=bo=null,Co=!1,P=To=0,Eo=null}function Fo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xo===null?bo.memoizedState=xo=e:xo=xo.next=e,xo}function Io(){if(N===null){var e=bo.alternate;e=e===null?null:e.memoizedState}else e=N.next;var t=xo===null?bo.memoizedState:xo.next;if(t!==null)xo=t,N=e;else{if(e===null)throw bo.alternate===null?Error(a(467)):Error(a(310));N=e,e={memoizedState:N.memoizedState,baseState:N.baseState,baseQueue:N.baseQueue,queue:N.queue,next:null},xo===null?bo.memoizedState=xo=e:xo=xo.next=e}return xo}function Lo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ro(e){var t=P;return P+=1,Eo===null&&(Eo=[]),e=Ba(Eo,e,t),t=bo,(xo===null?t.memoizedState:xo.next)===null&&(t=t.alternate,fe.H=t===null||t.memoizedState===null?Ws:Gs),e}function zo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ro(e);if(e.$$typeof===te)return ha(e)}throw Error(a(438,String(e)))}function Bo(e){var t=null,n=bo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=bo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Lo(),bo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=oe;return t.index++,n}function Vo(e,t){return typeof t==`function`?t(e):t}function Ho(e){return Uo(Io(),N,e)}function Uo(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(M&f)===f:(Gl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ea&&(d=!0);else if((M&p)===p){u=u.next,p===Ea&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,bo.lanes|=p,$l|=p;f=u.action,wo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,bo.lanes|=f,$l|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Fr(o,e.memoizedState)&&(sc=!0,d&&(n=Da,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Wo(e){var t=Io(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Fr(o,t.memoizedState)||(sc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Go(e,t,n){var r=bo,i=Io(),o=Ji;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!Fr((N||i).memoizedState,n);if(s&&(i.memoizedState=n,sc=!0),i=i.queue,gs(Jo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||xo!==null&&xo.memoizedState.tag&1){if(r.flags|=2048,ds(9,{destroy:void 0},qo.bind(null,r,i,n,t),null),Ul===null)throw Error(a(349));o||M&127||Ko(r,t,n)}return n}function Ko(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=bo.updateQueue,t===null?(t=Lo(),bo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function qo(e,t,n,r){t.value=n,t.getSnapshot=r,Yo(t)&&Xo(e)}function Jo(e,t,n){return n(function(){Yo(t)&&Xo(e)})}function Yo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fr(e,n)}catch{return!0}}function Xo(e){var t=gi(e,2);t!==null&&Cu(t,e,2)}function Zo(e){var t=Fo();if(typeof e==`function`){var n=e;if(e=n(),wo){Ye(!0);try{n()}finally{Ye(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:e},t}function Qo(e,t,n,r){return e.baseState=n,Uo(e,N,typeof r==`function`?r:Vo)}function $o(e,t,n,r,i){if(Bs(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};fe.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,es(t,o)):(o.next=n.next,t.pending=n.next=o)}}function es(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=fe.T,o={};fe.T=o;try{var s=n(i,r),c=fe.S;c!==null&&c(o,s),ts(e,t,s)}catch(n){rs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),fe.T=a}}else try{a=n(i,r),ts(e,t,a)}catch(n){rs(e,t,n)}}function ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ns(e,t,n)},function(n){return rs(e,t,n)}):ns(e,t,n)}function ns(e,t,n){t.status=`fulfilled`,t.value=n,is(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,es(e,n)))}function rs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,is(t),t=t.next;while(t!==r)}e.action=null}function is(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function as(e,t){return t}function os(e,t){if(Ji){var n=Ul.formState;if(n!==null){a:{var r=bo;if(Ji){if(qi){b:{for(var i=qi,a=Xi;i.nodeType!==8;){if(!a){i=null;break b}if(i=yf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){qi=yf(i.nextSibling),r=i.data===`F!`;break a}}Qi(r)}r=!1}r&&(t=n[0])}}return n=Fo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:t},n.queue=r,n=Ls.bind(null,bo,r),r.dispatch=n,r=Zo(!1),a=zs.bind(null,bo,!1,r.queue),r=Fo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=$o.bind(null,bo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ss(e){return cs(Io(),N,e)}function cs(e,t,n){if(t=Uo(e,t,as)[0],e=Ho(Vo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ro(t)}catch(e){throw e===Fa?La:e}else r=t;t=Io();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(bo.flags|=2048,ds(9,{destroy:void 0},ls.bind(null,i,n),null)),[r,a,e]}function ls(e,t){e.action=t}function us(e){var t=Io(),n=N;if(n!==null)return cs(t,n,e);Io(),t=t.memoizedState,n=Io();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ds(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=bo.updateQueue,t===null&&(t=Lo(),bo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function fs(){return Io().memoizedState}function ps(e,t,n,r){var i=Fo();bo.flags|=e,i.memoizedState=ds(1|t,{destroy:void 0},n,r===void 0?null:r)}function ms(e,t,n,r){var i=Io();r=r===void 0?null:r;var a=i.memoizedState.inst;N!==null&&r!==null&&Oo(r,N.memoizedState.deps)?i.memoizedState=ds(t,a,n,r):(bo.flags|=e,i.memoizedState=ds(1|t,a,n,r))}function hs(e,t){ps(8390656,8,e,t)}function gs(e,t){ms(2048,8,e,t)}function _s(e){bo.flags|=4;var t=bo.updateQueue;if(t===null)t=Lo(),bo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function vs(e){var t=Io().memoizedState;return _s({ref:t,nextImpl:e}),function(){if(Hl&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function ys(e,t){return ms(4,2,e,t)}function bs(e,t){return ms(4,4,e,t)}function xs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ss(e,t,n){n=n==null?null:n.concat([e]),ms(4,4,xs.bind(null,t,e),n)}function Cs(){}function ws(e,t){var n=Io();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Oo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ts(e,t){var n=Io();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Oo(t,r[1]))return r[0];if(r=e(),wo){Ye(!0);try{e()}finally{Ye(!1)}}return n.memoizedState=[r,t],r}function Es(e,t,n){return n===void 0||M&1073741824&&!(Gl&261930)?e.memoizedState=t:(e.memoizedState=n,e=Su(),bo.lanes|=e,$l|=e,n)}function Ds(e,t,n,r){return Fr(n,t)?n:lo.current===null?!(M&42)||M&1073741824&&!(Gl&261930)?(sc=!0,e.memoizedState=n):(e=Su(),bo.lanes|=e,$l|=e,t):(e=Es(e,n,r),Fr(e,t)||(sc=!0),e)}function Os(e,t,n,r,i){var a=C.p;C.p=a!==0&&8>a?a:8;var o=fe.T,s={};fe.T=s,zs(e,!1,t,n);try{var c=i(),l=fe.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Rs(e,t,Aa(c,r),xu(e)):Rs(e,t,r,xu(e))}catch(n){Rs(e,t,{then:function(){},status:`rejected`,reason:n},xu())}finally{C.p=a,o!==null&&s.types!==null&&(o.types=s.types),fe.T=o}}function ks(){}function As(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=js(e).queue;Os(e,i,t,pe,n===null?ks:function(){return Ms(e),n(r)})}function js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:pe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ms(e){var t=js(e);t.next===null&&(t=e.alternate.memoizedState),Rs(e,t.next.queue,{},xu())}function L(){return ha(lp)}function Ns(){return Io().memoizedState}function Ps(){return Io().memoizedState}function Fs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=xu();e=E(n);var r=no(t,e,n);r!==null&&(Cu(r,t,n),ro(r,t,n)),t={cache:Sa()},e.payload=t;return}t=t.return}}function Is(e,t,n){var r=xu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Bs(e)?Vs(t,n):(n=hi(e,t,n,r),n!==null&&(Cu(n,e,r),Hs(n,t,r)))}function Ls(e,t,n){Rs(e,t,n,xu())}function Rs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bs(e))Vs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Fr(s,o))return mi(e,t,i,0),Ul===null&&pi(),!1}catch{}if(n=hi(e,t,i,r),n!==null)return Cu(n,e,r),Hs(n,t,r),!0}return!1}function zs(e,t,n,r){if(r={lane:2,revertLane:bd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Bs(e)){if(t)throw Error(a(479))}else t=hi(e,n,r,2),t!==null&&Cu(t,e,2)}function Bs(e){var t=e.alternate;return e===bo||t!==null&&t===bo}function Vs(e,t){Co=So=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ft(e,n)}}var Us={readContext:ha,use:zo,useCallback:F,useContext:F,useEffect:F,useImperativeHandle:F,useLayoutEffect:F,useInsertionEffect:F,useMemo:F,useReducer:F,useRef:F,useState:F,useDebugValue:F,useDeferredValue:F,useTransition:F,useSyncExternalStore:F,useId:F,useHostTransitionStatus:F,useFormState:F,useActionState:F,useOptimistic:F,useMemoCache:F,useCacheRefresh:F};Us.useEffectEvent=F;var Ws={readContext:ha,use:zo,useCallback:function(e,t){return Fo().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ps(4194308,4,xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){ps(4,2,e,t)},useMemo:function(e,t){var n=Fo();t=t===void 0?null:t;var r=e();if(wo){Ye(!0);try{e()}finally{Ye(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Fo();if(n!==void 0){var i=n(t);if(wo){Ye(!0);try{n(t)}finally{Ye(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Is.bind(null,bo,e),[r.memoizedState,e]},useRef:function(e){var t=Fo();return e={current:e},t.memoizedState=e},useState:function(e){e=Zo(e);var t=e.queue,n=Ls.bind(null,bo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Cs,useDeferredValue:function(e,t){return Es(Fo(),e,t)},useTransition:function(){var e=Zo(!1);return e=Os.bind(null,bo,e.queue,!0,!1),Fo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=bo,i=Fo();if(Ji){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Ul===null)throw Error(a(349));Gl&127||Ko(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,hs(Jo.bind(null,r,o,e),[e]),r.flags|=2048,ds(9,{destroy:void 0},qo.bind(null,r,o,n,t),null),n},useId:function(){var e=Fo(),t=Ul.identifierPrefix;if(Ji){var n=Bi,r=zi;n=(r&~(1<<32-Xe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=To++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Do++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:L,useFormState:os,useActionState:os,useOptimistic:function(e){var t=Fo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=zs.bind(null,bo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Bo,useCacheRefresh:function(){return Fo().memoizedState=Fs.bind(null,bo)},useEffectEvent:function(e){var t=Fo(),n={impl:e};return t.memoizedState=n,function(){if(Hl&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Gs={readContext:ha,use:zo,useCallback:ws,useContext:ha,useEffect:gs,useImperativeHandle:Ss,useInsertionEffect:ys,useLayoutEffect:bs,useMemo:Ts,useReducer:Ho,useRef:fs,useState:function(){return Ho(Vo)},useDebugValue:Cs,useDeferredValue:function(e,t){return Ds(Io(),N.memoizedState,e,t)},useTransition:function(){var e=Ho(Vo)[0],t=Io().memoizedState;return[typeof e==`boolean`?e:Ro(e),t]},useSyncExternalStore:Go,useId:Ns,useHostTransitionStatus:L,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){return Qo(Io(),N,e,t)},useMemoCache:Bo,useCacheRefresh:Ps};Gs.useEffectEvent=vs;var Ks={readContext:ha,use:zo,useCallback:ws,useContext:ha,useEffect:gs,useImperativeHandle:Ss,useInsertionEffect:ys,useLayoutEffect:bs,useMemo:Ts,useReducer:Wo,useRef:fs,useState:function(){return Wo(Vo)},useDebugValue:Cs,useDeferredValue:function(e,t){var n=Io();return N===null?Es(n,e,t):Ds(n,N.memoizedState,e,t)},useTransition:function(){var e=Wo(Vo)[0],t=Io().memoizedState;return[typeof e==`boolean`?e:Ro(e),t]},useSyncExternalStore:Go,useId:Ns,useHostTransitionStatus:L,useFormState:us,useActionState:us,useOptimistic:function(e,t){var n=Io();return N===null?(n.baseState=e,[e,n.queue.dispatch]):Qo(n,N,e,t)},useMemoCache:Bo,useCacheRefresh:Ps};Ks.useEffectEvent=vs;function qs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Js={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xu(),i=E(r);i.payload=t,n!=null&&(i.callback=n),t=no(e,i,r),t!==null&&(Cu(t,e,r),ro(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xu(),i=E(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=no(e,i,r),t!==null&&(Cu(t,e,r),ro(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xu(),r=E(n);r.tag=2,t!=null&&(r.callback=t),t=no(e,r,n),t!==null&&(Cu(t,e,n),ro(t,e,n))}};function Ys(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,a):!0}function Xs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Js.enqueueReplaceState(t,t.state,null)}function Zs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function R(e){li(e)}function Qs(e){console.error(e)}function $s(e){li(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){return n=E(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function rc(e){return e=E(e),e.tag=3,e}function ic(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){tc(t,n,r),typeof i!=`function`&&(du===null?du=new Set([this]):du.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ac(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&fa(t,n,i,!0),n=k.current,n!==null){switch(n.tag){case 31:case 13:return mo===null?Fu():n.alternate===null&&Ql===0&&(Ql=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Ra?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),ed(e,r,i)),!1;case 22:return n.flags|=65536,r===Ra?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),ed(e,r,i)),!1}throw Error(a(435,n.tag))}return ed(e,r,i),Fu(),!1}if(Ji)return t=k.current,t===null?(r!==Zi&&(t=Error(a(423),{cause:r}),ia(ji(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=ji(r,n),i=nc(e.stateNode,r,i),io(e,i),Ql!==4&&(Ql=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Zi&&(e=Error(a(422),{cause:r}),ia(ji(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=ji(o,n),iu===null?iu=[o]:iu.push(o),Ql!==4&&(Ql=2),t===null)return!0;r=ji(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=nc(n.stateNode,r,e),io(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(du===null||!du.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=rc(i),ic(i,e,n,r),io(n,i),!1}n=n.return}while(n!==null);return!1}var oc=Error(a(461)),sc=!1;function cc(e,t,n,r){t.child=e===null?Qa(t,null,n,r):Za(t,e.child,n,r)}function lc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ma(t),r=I(e,t,n,o,a,i),s=Mo(),e!==null&&!sc?(No(e,t,i),Ac(e,t,i)):(Ji&&s&&Ui(t),t.flags|=1,cc(e,t,r,i),t.child)}function uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dc(e,t,a,r,i)):(e=Ti(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!jc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ir:n,n(o,r)&&e.ref===t.ref)return Ac(e,t,i)}return t.flags|=1,e=Ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function dc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ir(a,r)&&e.ref===t.ref)if(sc=!1,t.pendingProps=r=a,jc(e,i))e.flags&131072&&(sc=!0);else return t.lanes=e.lanes,Ac(e,t,i)}return vc(e,t,n,r,i)}function fc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return z(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Na(t,a===null?null:a.cachePool),a===null?fo():uo(t,a),A(t);else return r=t.lanes=536870912,z(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Na(t,null),fo(),_o(t)):(Na(t,a.cachePool),uo(t,a),_o(t),t.memoizedState=null);return cc(e,t,i,n),t.child}function pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function z(e,t,n,r,i){var a=T();return a=a===null?null:{parent:xa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Na(t,null),fo(),A(t),e!==null&&fa(e,t,r,!0),t.childLanes=i,null}function mc(e,t){return t=Tc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function hc(e,t,n){return Za(t,e.child,null,n),e=mc(t,t.pendingProps),e.flags|=2,j(t),t.memoizedState=null,e}function gc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ji){if(r.mode===`hidden`)return e=mc(t,r),t.lanes=536870912,pc(null,e);if(go(t),(e=qi)?(e=hf(e,Xi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return t.lanes=536870912,null}return mc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(go(t),i)if(t.flags&256)t.flags&=-257,t=hc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(sc||fa(e,t,n,!1),i=(n&e.childLanes)!==0,sc||i){if(r=Ul,r!==null&&(s=pt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,gi(e,s),Cu(r,e,s),oc;Fu(),t=hc(e,t,n)}else e=o.treeContext,qi=yf(s.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=mc(t,r),t.flags|=4096;return t}return e=Ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function _c(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function vc(e,t,n,r,i){return ma(t),n=I(e,t,n,r,void 0,i),r=Mo(),e!==null&&!sc?(No(e,t,i),Ac(e,t,i)):(Ji&&r&&Ui(t),t.flags|=1,cc(e,t,n,i),t.child)}function yc(e,t,n,r,i,a){return ma(t),t.updateQueue=null,n=Ao(t,r,n,i),ko(e),r=Mo(),e!==null&&!sc?(No(e,t,a),Ac(e,t,a)):(Ji&&r&&Ui(t),t.flags|=1,cc(e,t,n,a),t.child)}function bc(e,t,n,r,i){if(ma(t),t.stateNode===null){var a=yi,o=n.contextType;typeof o==`object`&&o&&(a=ha(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Js,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},eo(t),o=n.contextType,a.context=typeof o==`object`&&o?ha(o):yi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(qs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Js.enqueueReplaceState(a,a.state,null),oo(t,r,a,i),ao(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Zs(n,s);a.props=c;var l=a.context,u=n.contextType;o=yi,typeof u==`object`&&u&&(o=ha(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Xs(t,a,r,o),$a=!1;var f=t.memoizedState;a.state=f,oo(t,r,a,i),ao(),l=t.memoizedState,s||f!==l||$a?(typeof d==`function`&&(qs(t,n,d,r),l=t.memoizedState),(c=$a||Ys(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,to(e,t),o=t.memoizedProps,u=Zs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=yi,typeof l==`object`&&l&&(c=ha(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Xs(t,a,r,c),$a=!1,f=t.memoizedState,a.state=f,oo(t,r,a,i),ao();var p=t.memoizedState;o!==d||f!==p||$a||e!==null&&e.dependencies!==null&&pa(e.dependencies)?(typeof s==`function`&&(qs(t,n,s,r),p=t.memoizedState),(u=$a||Ys(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&pa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,_c(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Za(t,e.child,null,i),t.child=Za(t,null,n,i)):cc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ac(e,t,i),e}function xc(e,t,n,r){return na(),t.flags|=256,cc(e,t,n,r),t.child}var B={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(e){return{baseLanes:e,cachePool:Pa()}}function V(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=nu),e}function Cc(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(vo.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ji){if(i?ho(t):_o(t),(e=qi)?(e=hf(e,Xi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return _f(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(_o(t),i=t.mode,c=Tc({mode:`hidden`,children:c},i),r=Ei(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Sc(n),r.childLanes=V(e,s,n),t.memoizedState=B,pc(null,r)):(ho(t),wc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ho(t),t.flags&=-257,t=Ec(e,t,n)):t.memoizedState===null?(_o(t),c=r.fallback,i=t.mode,r=Tc({mode:`visible`,children:r.children},i),c=Ei(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Za(t,e.child,null,n),r=t.child,r.memoizedState=Sc(n),r.childLanes=V(e,s,n),t.memoizedState=B,t=pc(null,r)):(_o(t),t.child=e.child,t.flags|=128,t=null);else if(ho(t),_f(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,ia({value:r,source:null,stack:null}),t=Ec(e,t,n)}else if(sc||fa(e,t,n,!1),s=(n&e.childLanes)!==0,sc||s){if(s=Ul,s!==null&&(r=pt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,gi(e,r),Cu(s,e,r),oc;gf(c)||Fu(),t=Ec(e,t,n)}else gf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,qi=yf(c.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=wc(t,r.children),t.flags|=4096);return t}return i?(_o(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=Ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=Ei(c,i,n,null),c.flags|=2):c=Ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,pc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Sc(n):(i=c.cachePool,i===null?i=Pa():(l=xa._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=V(e,s,n),t.memoizedState=B,pc(e.child,r)):(ho(t),n=e.child,e=n.sibling,n=Ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function wc(e,t){return t=Tc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Tc(e,t){return e=xi(22,e,null,t),e.lanes=0,e}function Ec(e,t,n){return Za(t,e.child,null,n),e=wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ua(e.return,t,n)}function Oc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function kc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=vo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,_e(vo,o),cc(e,t,r,n),r=Ji?Fi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dc(e,n,t);else if(e.tag===19)Dc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&yo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Oc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&yo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Oc(t,!0,n,null,a,r);break;case`together`:Oc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ac(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$l|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(fa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=Ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&pa(e))):!0}function Mc(e,t,n){switch(t.tag){case 3:Se(t,t.stateNode.containerInfo),ca(t,xa,e.memoizedState.cache),na();break;case 27:case 5:we(t);break;case 4:Se(t,t.stateNode.containerInfo);break;case 10:ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,go(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ho(t),e=Ac(e,t,n),e===null?null:e.sibling):Cc(e,t,n):(ho(t),t.flags|=128,null);ho(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(fa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return kc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),_e(vo,vo.current),r)break;return null;case 22:return t.lanes=0,fc(e,t,n,t.pendingProps);case 24:ca(t,xa,e.memoizedState.cache)}return Ac(e,t,n)}function Nc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)sc=!0;else{if(!jc(e,n)&&!(t.flags&128))return sc=!1,Mc(e,t,n);sc=!!(e.flags&131072)}else sc=!1,Ji&&t.flags&1048576&&Hi(t,Fi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Va(t.elementType),t.type=e,typeof e==`function`)Si(e)?(r=Zs(e,r),t.tag=1,t=bc(null,t,e,r,n)):(t.tag=0,t=vc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===ne){t.tag=11,t=lc(null,t,e,r,n);break a}else if(i===re){t.tag=14,t=uc(null,t,e,r,n);break a}}throw t=ue(e)||e,Error(a(306,t,``))}}return t;case 0:return vc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Zs(r,t.pendingProps),bc(e,t,r,i,n);case 3:a:{if(Se(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,to(e,t),oo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ca(t,xa,r),r!==o.cache&&da(t,[xa],n,!0),ao(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=xc(e,t,r,n);break a}else if(r!==i){i=ji(Error(a(424)),t),ia(i),t=xc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(qi=yf(e.firstChild),Ki=t,Ji=!0,Yi=null,Xi=!0,n=Qa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(na(),r===i){t=Ac(e,t,n);break a}cc(e,t,r,n)}t=t.child}return t;case 26:return _c(e,t),e===null?(n=Bf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ji||(n=t.type,e=t.pendingProps,r=Zd(be.current).createElement(n),r[yt]=t,r[bt]=e,Gd(r,n,e),Mt(r),t.stateNode=r):t.memoizedState=Bf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return we(t),e===null&&Ji&&(r=t.stateNode=Cf(t.type,t.pendingProps,be.current),Ki=t,Xi=!0,i=qi,lf(t.type)?(bf=i,qi=yf(r.firstChild)):qi=i),cc(e,t,t.pendingProps.children,n),_c(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ji&&((i=r=qi)&&(r=pf(r,t.type,t.pendingProps,Xi),r===null?i=!1:(t.stateNode=r,Ki=t,qi=yf(r.firstChild),Xi=!1,i=!0)),i||Qi(t)),we(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,ef(i,o)?r=null:s!==null&&ef(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=I(e,t,jo,null,null,n),lp._currentValue=i),_c(e,t),cc(e,t,r,n),t.child;case 6:return e===null&&Ji&&((e=n=qi)&&(n=mf(n,t.pendingProps,Xi),n===null?e=!1:(t.stateNode=n,Ki=t,qi=null,e=!0)),e||Qi(t)),null;case 13:return Cc(e,t,n);case 4:return Se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Za(t,null,r,n):cc(e,t,r,n),t.child;case 11:return lc(e,t,t.type,t.pendingProps,n);case 7:return cc(e,t,t.pendingProps,n),t.child;case 8:return cc(e,t,t.pendingProps.children,n),t.child;case 12:return cc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ca(t,t.type,r.value),cc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,ma(t),i=ha(i),r=r(i),t.flags|=1,cc(e,t,r,n),t.child;case 14:return uc(e,t,t.type,t.pendingProps,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 19:return kc(e,t,n);case 31:return gc(e,t,n);case 22:return fc(e,t,n,t.pendingProps);case 24:return ma(t),r=ha(xa),e===null?(i=T(),i===null&&(i=Ul,o=Sa(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},eo(t),ca(t,xa,i)):((e.lanes&n)!==0&&(to(e,t),oo(t,null,null,n),ao()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,ca(t,xa,r),r!==i.cache&&da(t,[xa],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),ca(t,xa,r))),cc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Pc(e){e.flags|=4}function Fc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Mu())e.flags|=8192;else throw Ha=Ra,Ia}else e.flags&=-16777217}function Ic(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!tp(t))if(Mu())e.flags|=8192;else throw Ha=Ra,Ia}function Lc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:st(),e.lanes|=t,ru|=t)}function Rc(e,t){if(!Ji)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function zc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Bc(e,t,n){var r=t.pendingProps;switch(Wi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zc(t),null;case 1:return zc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),la(xa),Ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ta(t)?Pc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ra())),zc(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Pc(t),o===null?(zc(t),Fc(t,i,null,r,n)):(zc(t),Ic(t,o))):o?o===e.memoizedState?(zc(t),t.flags&=-16777217):(Pc(t),zc(t),Ic(t,o)):(e=e.memoizedProps,e!==r&&Pc(t),zc(t),Fc(t,i,e,r,n)),null;case 27:if(Te(t),n=be.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return zc(t),null}e=ve.current,ta(t)?$i(t,e):(e=Cf(i,r,n),t.stateNode=e,Pc(t))}return zc(t),null;case 5:if(Te(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return zc(t),null}if(o=ve.current,ta(t))$i(t,o);else{var s=Zd(be.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[yt]=t,o[bt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Gd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Pc(t)}}return zc(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=be.current,ta(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Ki,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[yt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Hd(e.nodeValue,n)),e||Qi(t,!0)}else e=Zd(e).createTextNode(r),e[yt]=t,t.stateNode=e}return zc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ta(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[yt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zc(t),e=!1}else n=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(j(t),t):(j(t),null);if(t.flags&128)throw Error(a(558))}return zc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=ta(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[yt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zc(t),i=!1}else i=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(j(t),t):(j(t),null)}return j(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Lc(t,t.updateQueue),zc(t),null);case 4:return Ce(),e===null&&Md(t.stateNode.containerInfo),zc(t),null;case 10:return la(t.type),zc(t),null;case 19:if(ge(vo),r=t.memoizedState,r===null)return zc(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Rc(r,!1);else{if(Ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=yo(e),o!==null){for(t.flags|=128,Rc(r,!1),e=o.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)wi(n,e),n=n.sibling;return _e(vo,vo.current&1|2),Ji&&Vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Re()>lu&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304)}else{if(!i)if(e=yo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ji)return zc(t),null}else 2*Re()-r.renderingStartTime>lu&&n!==536870912&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(zc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Re(),e.sibling=null,n=vo.current,_e(vo,i?n&1|2:n&1),Ji&&Vi(t,r.treeForkCount),e);case 22:case 23:return j(t),po(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(zc(t),t.subtreeFlags&6&&(t.flags|=8192)):zc(t),n=t.updateQueue,n!==null&&Lc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ge(Ma),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(xa),zc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Vc(e,t){switch(Wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(xa),Ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Te(t),null;case 31:if(t.memoizedState!==null){if(j(t),t.alternate===null)throw Error(a(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(j(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(vo),null;case 4:return Ce(),null;case 10:return la(t.type),null;case 22:case 23:return j(t),po(),e!==null&&ge(Ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(xa),null;case 25:return null;default:return null}}function Hc(e,t){switch(Wi(t),t.tag){case 3:la(xa),Ce();break;case 26:case 27:case 5:Te(t);break;case 4:Ce();break;case 31:t.memoizedState!==null&&j(t);break;case 13:j(t);break;case 19:ge(vo);break;case 10:la(t.type);break;case 22:case 23:j(t),po(),e!==null&&ge(Ma);break;case 24:la(xa)}}function Uc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){$u(t,t.return,e)}}function Wc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){$u(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){$u(t,t.return,e)}}function Gc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{co(t,n)}catch(t){$u(e,e.return,t)}}}function Kc(e,t,n){n.props=Zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){$u(e,t,n)}}function qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){$u(e,t,n)}}function Jc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){$u(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){$u(e,t,n)}else n.current=null}function Yc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){$u(e,e.return,t)}}function Xc(e,t,n){try{var r=e.stateNode;Kd(r,e.type,n,t),r[bt]=t}catch(t){$u(e,e.return,t)}}function Zc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&lf(e.type)||e.tag===4}function Qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Zc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&lf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=pn));else if(r!==4&&(r===27&&lf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&lf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Gd(t,r,n),t[yt]=e,t[bt]=n}catch(t){$u(e,e.return,t)}}var nl=!1,rl=!1,il=!1,al=typeof WeakSet==`function`?WeakSet:Set,ol=null;function sl(e,t){if(e=e.containerInfo,Yd=vp,e=Br(e),Vr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Xd={focusedElem:e,selectionRange:n},vp=!1,ol=t;ol!==null;)if(t=ol,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ol=e;else for(;ol!==null;){switch(t=ol,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Zs(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){$u(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ff(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ff(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,ol=e;break}ol=t.return}}function cl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Cl(e,n),r&4&&Uc(5,n);break;case 1:if(Cl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){$u(n,n.return,e)}else{var i=Zs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){$u(n,n.return,e)}}r&64&&Gc(n),r&512&&qc(n,n.return);break;case 3:if(Cl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{co(e,t)}catch(e){$u(n,n.return,e)}}break;case 27:t===null&&r&4&&tl(n);case 26:case 5:Cl(e,n),t===null&&r&4&&Yc(n),r&512&&qc(n,n.return);break;case 12:Cl(e,n);break;case 31:Cl(e,n),r&4&&ml(e,n);break;case 13:Cl(e,n),r&4&&hl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=rd.bind(null,n),vf(e,n))));break;case 22:if(r=n.memoizedState!==null||nl,!r){t=t!==null&&t.memoizedState!==null||rl,i=nl;var a=rl;nl=r,(rl=t)&&!a?Tl(e,n,(n.subtreeFlags&8772)!=0):Cl(e,n),nl=i,rl=a}break;case 30:break;default:Cl(e,n)}}function ll(e){var t=e.alternate;t!==null&&(e.alternate=null,ll(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Dt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ul=null,dl=!1;function fl(e,t,n){for(n=n.child;n!==null;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(Je&&typeof Je.onCommitFiberUnmount==`function`)try{Je.onCommitFiberUnmount(qe,n)}catch{}switch(n.tag){case 26:rl||Jc(n,t),fl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:rl||Jc(n,t);var r=ul,i=dl;lf(n.type)&&(ul=n.stateNode,dl=!1),fl(e,t,n),wf(n.stateNode),ul=r,dl=i;break;case 5:rl||Jc(n,t);case 6:if(r=ul,i=dl,ul=null,fl(e,t,n),ul=r,dl=i,ul!==null)if(dl)try{(ul.nodeType===9?ul.body:ul.nodeName===`HTML`?ul.ownerDocument.body:ul).removeChild(n.stateNode)}catch(e){$u(n,t,e)}else try{ul.removeChild(n.stateNode)}catch(e){$u(n,t,e)}break;case 18:ul!==null&&(dl?(e=ul,uf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Wp(e)):uf(ul,n.stateNode));break;case 4:r=ul,i=dl,ul=n.stateNode.containerInfo,dl=!0,fl(e,t,n),ul=r,dl=i;break;case 0:case 11:case 14:case 15:Wc(2,n,t),rl||Wc(4,n,t),fl(e,t,n);break;case 1:rl||(Jc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Kc(n,t,r)),fl(e,t,n);break;case 21:fl(e,t,n);break;case 22:rl=(r=rl)||n.memoizedState!==null,fl(e,t,n),rl=r;break;default:fl(e,t,n)}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wp(e)}catch(e){$u(t,t.return,e)}}}function hl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wp(e)}catch(e){$u(t,t.return,e)}}function gl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new al),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new al),t;default:throw Error(a(435,e.tag))}}function _l(e,t){var n=gl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=id.bind(null,e,t);t.then(r,r)}})}function vl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(lf(c.type)){ul=c.stateNode,dl=!1;break a}break;case 5:ul=c.stateNode,dl=!1;break a;case 3:case 4:ul=c.stateNode.containerInfo,dl=!0;break a}c=c.return}if(ul===null)throw Error(a(160));pl(o,s,i),ul=null,dl=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bl(t,e),t=t.sibling}var yl=null;function bl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:vl(t,e),xl(e),r&4&&(Wc(3,e,e.return),Uc(3,e),Wc(5,e,e.return));break;case 1:vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),r&64&&nl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=yl;if(vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[Et]||o[yt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Gd(o,r,n),o[yt]=e,Mt(o),r=o;break a;case`link`:var s=Qf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Gd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Qf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Gd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[yt]=e,Mt(o),r=o}e.stateNode=r}else $f(i,e.type,e.stateNode);else e.stateNode=qf(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Xc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?$f(i,e.type,e.stateNode):qf(i,r,e.memoizedProps))}break;case 27:vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),n!==null&&r&4&&Xc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),e.flags&32){i=e.stateNode;try{an(i,``)}catch(t){$u(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Xc(e,i,n===null?i:n.memoizedProps)),r&1024&&(il=!0);break;case 6:if(vl(t,e),xl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){$u(e,e.return,t)}}break;case 3:if(Zf=null,i=yl,yl=Df(t.containerInfo),vl(t,e),yl=i,xl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Wp(t.containerInfo)}catch(t){$u(e,e.return,t)}il&&(il=!1,Sl(e));break;case 4:r=yl,yl=Df(e.stateNode.containerInfo),vl(t,e),xl(e),yl=r;break;case 12:vl(t,e),xl(e);break;case 31:vl(t,e),xl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 13:vl(t,e),xl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(su=Re()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=nl,d=rl;if(nl=u||i,rl=d||l,vl(t,e),rl=d,nl=u,xl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||nl||rl||wl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){$u(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){$u(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?df(m,!0):df(l.stateNode,!1)}catch(e){$u(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,_l(e,n))));break;case 19:vl(t,e),xl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 30:break;case 21:break;default:vl(t,e),xl(e)}}function xl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Zc(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;el(e,Qc(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(an(o,``),n.flags&=-33),el(e,Qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;$c(e,Qc(e),s);break;default:throw Error(a(161))}}catch(t){$u(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Sl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Cl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)cl(e,t.alternate,t),t=t.sibling}function wl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wc(4,t,t.return),wl(t);break;case 1:Jc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Kc(t,t.return,n),wl(t);break;case 27:wf(t.stateNode);case 26:case 5:Jc(t,t.return),wl(t);break;case 22:t.memoizedState===null&&wl(t);break;case 30:wl(t);break;default:wl(t)}e=e.sibling}}function Tl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Tl(i,a,n),Uc(4,a);break;case 1:if(Tl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){$u(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)so(c[i],s)}catch(e){$u(r,r.return,e)}}n&&o&64&&Gc(a),qc(a,a.return);break;case 27:tl(a);case 26:case 5:Tl(i,a,n),n&&r===null&&o&4&&Yc(a),qc(a,a.return);break;case 12:Tl(i,a,n);break;case 31:Tl(i,a,n),n&&o&4&&ml(i,a);break;case 13:Tl(i,a,n),n&&o&4&&hl(i,a);break;case 22:a.memoizedState===null&&Tl(i,a,n),qc(a,a.return);break;case 30:break;default:Tl(i,a,n)}t=t.sibling}}function El(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ca(n))}function Dl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e))}function Ol(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)kl(e,t,n,r),t=t.sibling}function kl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ol(e,t,n,r),i&2048&&Uc(9,t);break;case 1:Ol(e,t,n,r);break;case 3:Ol(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e)));break;case 12:if(i&2048){Ol(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){$u(t,t.return,e)}}else Ol(e,t,n,r);break;case 31:Ol(e,t,n,r);break;case 13:Ol(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Ol(e,t,n,r):(a._visibility|=2,Al(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Ol(e,t,n,r):jl(e,t),i&2048&&El(o,t);break;case 24:Ol(e,t,n,r),i&2048&&Dl(t.alternate,t);break;default:Ol(e,t,n,r)}}function Al(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Al(a,o,s,c,i),Uc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Al(a,o,s,c,i)):u._visibility&2?Al(a,o,s,c,i):jl(a,o),i&&l&2048&&El(o.alternate,o);break;case 24:Al(a,o,s,c,i),i&&l&2048&&Dl(o.alternate,o);break;default:Al(a,o,s,c,i)}t=t.sibling}}function jl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:jl(n,r),i&2048&&El(r.alternate,r);break;case 24:jl(n,r),i&2048&&Dl(r.alternate,r);break;default:jl(n,r)}t=t.sibling}}var Ml=8192;function Nl(e,t,n){if(e.subtreeFlags&Ml)for(e=e.child;e!==null;)Pl(e,t,n),e=e.sibling}function Pl(e,t,n){switch(e.tag){case 26:Nl(e,t,n),e.flags&Ml&&e.memoizedState!==null&&np(n,yl,e.memoizedState,e.memoizedProps);break;case 5:Nl(e,t,n);break;case 3:case 4:var r=yl;yl=Df(e.stateNode.containerInfo),Nl(e,t,n),yl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ml,Ml=16777216,Nl(e,t,n),Ml=r):Nl(e,t,n));break;default:Nl(e,t,n)}}function Fl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ol=r,zl(r,e)}Fl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ll(e),e=e.sibling}function Ll(e){switch(e.tag){case 0:case 11:case 15:Il(e),e.flags&2048&&Wc(9,e,e.return);break;case 3:Il(e);break;case 12:Il(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Rl(e)):Il(e);break;default:Il(e)}}function Rl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ol=r,zl(r,e)}Fl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wc(8,t,t.return),Rl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Rl(t));break;default:Rl(t)}e=e.sibling}}function zl(e,t){for(;ol!==null;){var n=ol;switch(n.tag){case 0:case 11:case 15:Wc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ol=r;else a:for(n=e;ol!==null;){r=ol;var i=r.sibling,a=r.return;if(ll(r),r===n){ol=null;break a}if(i!==null){i.return=a,ol=i;break a}ol=a}}}var Bl={getCacheForType:function(e){var t=ha(xa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ha(xa).controller.signal}},Vl=typeof WeakMap==`function`?WeakMap:Map,Hl=0,Ul=null,Wl=null,Gl=0,Kl=0,ql=null,Jl=!1,Yl=!1,Xl=!1,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=0,iu=null,au=null,ou=!1,su=0,cu=0,lu=1/0,uu=null,du=null,fu=0,pu=null,mu=null,hu=0,gu=0,_u=null,vu=null,yu=0,bu=null;function xu(){return Hl&2&&Gl!==0?Gl&-Gl:fe.T===null?gt():bd()}function Su(){if(nu===0)if(!(Gl&536870912)||Ji){var e=tt;tt<<=1,!(tt&3932160)&&(tt=262144),nu=e}else nu=536870912;return e=k.current,e!==null&&(e.flags|=32),nu}function Cu(e,t,n){(e===Ul&&(Kl===2||Kl===9)||e.cancelPendingCommit!==null)&&(Au(e,0),Du(e,Gl,nu,!1)),lt(e,n),(!(Hl&2)||e!==Ul)&&(e===Ul&&(!(Hl&2)&&(eu|=n),Ql===4&&Du(e,Gl,nu,!1)),fd(e))}function wu(e,t,n){if(Hl&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||at(e,t),i=r?Ru(e,t):Iu(e,t,!0),o=r;do{if(i===0){Yl&&!r&&Du(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Eu(n)){i=Iu(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=iu;var l=c.current.memoizedState.isDehydrated;if(l&&(Au(c,s).flags|=256),s=Iu(c,s,!1),s!==2){if(Xl&&!l){c.errorRecoveryDisabledLanes|=o,eu|=o,i=4;break a}o=au,au=i,o!==null&&(au===null?au=o:au.push.apply(au,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Au(e,0),Du(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:Du(r,t,nu,!Jl);break a;case 2:au=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=su+300-Re(),10<i)){if(Du(r,t,nu,!Jl),it(r,0,!0)!==0)break a;hu=t,r.timeoutHandle=rf(Tu.bind(null,r,n,au,uu,ou,t,nu,eu,ru,Jl,o,`Throttled`,-0,0),i);break a}Tu(r,n,au,uu,ou,t,nu,eu,ru,Jl,o,null,-0,0)}}break}while(1);fd(e)}function Tu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pn},Pl(t,a,d);var m=(a&62914560)===a?su-Re():(a&4194048)===a?cu-Re():0;if(m=ip(d,m),m!==null){hu=a,e.cancelPendingCommit=m(Gu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Du(e,a,o,!l);return}}Gu(e,t,a,n,r,i,o,s,c)}function Eu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Fr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Du(e,t,n,r){t&=~tu,t&=~eu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Xe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&dt(e,n,t)}function Ou(){return Hl&6?!0:(pd(0,!1),!1)}function ku(){if(Wl!==null){if(Kl===0)var e=Wl.return;else e=Wl,sa=oa=null,Po(e),Ga=null,Ka=0,e=Wl;for(;e!==null;)Hc(e.alternate,e),e=e.return;Wl=null}}function Au(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,af(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),hu=0,ku(),Ul=e,Wl=n=Ci(e.current,null),Gl=t,Kl=0,ql=null,Jl=!1,Yl=at(e,t),Xl=!1,ru=nu=tu=eu=$l=Ql=0,au=iu=null,ou=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Xe(r),a=1<<i;t|=e[i],r&=~a}return Zl=t,pi(),n}function ju(e,t){bo=null,fe.H=Us,t===Fa||t===La?(t=Ua(),Kl=3):t===Ia?(t=Ua(),Kl=4):Kl=t===oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ql=t,Wl===null&&(Ql=1,ec(e,ji(t,e.current)))}function Mu(){var e=k.current;return e===null?!0:(Gl&4194048)===Gl?mo===null:(Gl&62914560)===Gl||Gl&536870912?e===mo:!1}function Nu(){var e=fe.H;return fe.H=Us,e===null?Us:e}function Pu(){var e=fe.A;return fe.A=Bl,e}function Fu(){Ql=4,Jl||(Gl&4194048)!==Gl&&k.current!==null||(Yl=!0),!($l&134217727)&&!(eu&134217727)||Ul===null||Du(Ul,Gl,nu,!1)}function Iu(e,t,n){var r=Hl;Hl|=2;var i=Nu(),a=Pu();(Ul!==e||Gl!==t)&&(uu=null,Au(e,t)),t=!1;var o=Ql;a:do try{if(Kl!==0&&Wl!==null){var s=Wl,c=ql;switch(Kl){case 8:ku(),o=6;break a;case 3:case 2:case 9:case 6:k.current===null&&(t=!0);var l=Kl;if(Kl=0,ql=null,Hu(e,s,c,l),n&&Yl){o=0;break a}break;default:l=Kl,Kl=0,ql=null,Hu(e,s,c,l)}}Lu(),o=Ql;break}catch(t){ju(e,t)}while(1);return t&&e.shellSuspendCounter++,sa=oa=null,Hl=r,fe.H=i,fe.A=a,Wl===null&&(Ul=null,Gl=0,pi()),o}function Lu(){for(;Wl!==null;)Bu(Wl)}function Ru(e,t){var n=Hl;Hl|=2;var r=Nu(),i=Pu();Ul!==e||Gl!==t?(uu=null,lu=Re()+500,Au(e,t)):Yl=at(e,t);a:do try{if(Kl!==0&&Wl!==null){t=Wl;var o=ql;b:switch(Kl){case 1:Kl=0,ql=null,Hu(e,t,o,1);break;case 2:case 9:if(za(o)){Kl=0,ql=null,Vu(t);break}t=function(){Kl!==2&&Kl!==9||Ul!==e||(Kl=7),fd(e)},o.then(t,t);break a;case 3:Kl=7;break a;case 4:Kl=5;break a;case 7:za(o)?(Kl=0,ql=null,Vu(t)):(Kl=0,ql=null,Hu(e,t,o,7));break;case 5:var s=null;switch(Wl.tag){case 26:s=Wl.memoizedState;case 5:case 27:var c=Wl;if(s?tp(s):c.stateNode.complete){Kl=0,ql=null;var l=c.sibling;if(l!==null)Wl=l;else{var u=c.return;u===null?Wl=null:(Wl=u,Uu(u))}break b}}Kl=0,ql=null,Hu(e,t,o,5);break;case 6:Kl=0,ql=null,Hu(e,t,o,6);break;case 8:ku(),Ql=6;break a;default:throw Error(a(462))}}zu();break}catch(t){ju(e,t)}while(1);return sa=oa=null,fe.H=r,fe.A=i,Hl=n,Wl===null?(Ul=null,Gl=0,pi(),Ql):0}function zu(){for(;Wl!==null&&!Ie();)Bu(Wl)}function Bu(e){var t=Nc(e.alternate,e,Zl);e.memoizedProps=e.pendingProps,t===null?Uu(e):Wl=t}function Vu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=yc(n,t,t.pendingProps,t.type,void 0,Gl);break;case 11:t=yc(n,t,t.pendingProps,t.type.render,t.ref,Gl);break;case 5:Po(t);default:Hc(n,t),t=Wl=wi(t,Zl),t=Nc(n,t,Zl)}e.memoizedProps=e.pendingProps,t===null?Uu(e):Wl=t}function Hu(e,t,n,r){sa=oa=null,Po(t),Ga=null,Ka=0;var i=t.return;try{if(ac(e,i,t,n,Gl)){Ql=1,ec(e,ji(n,e.current)),Wl=null;return}}catch(t){if(i!==null)throw Wl=i,t;Ql=1,ec(e,ji(n,e.current)),Wl=null;return}t.flags&32768?(Ji||r===1?e=!0:Yl||Gl&536870912?e=!1:(Jl=e=!0,(r===2||r===9||r===3||r===6)&&(r=k.current,r!==null&&r.tag===13&&(r.flags|=16384))),Wu(t,e)):Uu(t)}function Uu(e){var t=e;do{if(t.flags&32768){Wu(t,Jl);return}e=t.return;var n=Bc(t.alternate,t,Zl);if(n!==null){Wl=n;return}if(t=t.sibling,t!==null){Wl=t;return}Wl=t=e}while(t!==null);Ql===0&&(Ql=5)}function Wu(e,t){do{var n=Vc(e.alternate,e);if(n!==null){n.flags&=32767,Wl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Wl=e;return}Wl=e=n}while(e!==null);Ql=6,Wl=null}function Gu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Xu();while(fu!==0);if(Hl&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=fi,ut(e,n,o,s,c,l),e===Ul&&(Wl=Ul=null,Gl=0),mu=t,pu=e,hu=n,gu=o,_u=i,vu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,ad(He,function(){return Zu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=fe.T,fe.T=null,i=C.p,C.p=2,s=Hl,Hl|=4;try{sl(e,t,n)}finally{Hl=s,C.p=i,fe.T=r}}fu=1,Ku(),qu(),Ju()}}function Ku(){if(fu===1){fu=0;var e=pu,t=mu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=fe.T,fe.T=null;var r=C.p;C.p=2;var i=Hl;Hl|=4;try{bl(t,e);var a=Xd,o=Br(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&zr(s.ownerDocument.documentElement,s)){if(c!==null&&Vr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Rr(s,h),v=Rr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}vp=!!Yd,Xd=Yd=null}finally{Hl=i,C.p=r,fe.T=n}}e.current=t,fu=2}}function qu(){if(fu===2){fu=0;var e=pu,t=mu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=fe.T,fe.T=null;var r=C.p;C.p=2;var i=Hl;Hl|=4;try{cl(e,t.alternate,t)}finally{Hl=i,C.p=r,fe.T=n}}fu=3}}function Ju(){if(fu===4||fu===3){fu=0,Le();var e=pu,t=mu,n=hu,r=vu;t.subtreeFlags&10256||t.flags&10256?fu=5:(fu=0,mu=pu=null,Yu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(du=null),ht(n),t=t.stateNode,Je&&typeof Je.onCommitFiberRoot==`function`)try{Je.onCommitFiberRoot(qe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=fe.T,i=C.p,C.p=2,fe.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{fe.T=t,C.p=i}}hu&3&&Xu(),fd(e),i=e.pendingLanes,n&261930&&i&42?e===bu?yu++:(yu=0,bu=e):yu=0,pd(0,!1)}}function Yu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ca(t)))}function Xu(){return Ku(),qu(),Ju(),Zu()}function Zu(){if(fu!==5)return!1;var e=pu,t=gu;gu=0;var n=ht(hu),r=fe.T,i=C.p;try{C.p=32>n?32:n,fe.T=null,n=_u,_u=null;var o=pu,s=hu;if(fu=0,mu=pu=null,hu=0,Hl&6)throw Error(a(331));var c=Hl;if(Hl|=4,Ll(o.current),kl(o,o.current,s,n),Hl=c,pd(0,!1),Je&&typeof Je.onPostCommitFiberRoot==`function`)try{Je.onPostCommitFiberRoot(qe,o)}catch{}return!0}finally{C.p=i,fe.T=r,Yu(e,t)}}function Qu(e,t,n){t=ji(n,t),t=nc(e.stateNode,t,2),e=no(e,t,2),e!==null&&(lt(e,2),fd(e))}function $u(e,t,n){if(e.tag===3)Qu(e,e,n);else for(;t!==null;){if(t.tag===3){Qu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(du===null||!du.has(r))){e=ji(n,e),n=rc(2),r=no(t,n,2),r!==null&&(ic(n,r,t,e),lt(r,2),fd(r));break}}t=t.return}}function ed(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Vl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Xl=!0,i.add(n),e=td.bind(null,e,t,n),t.then(e,e))}function td(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ul===e&&(Gl&n)===n&&(Ql===4||Ql===3&&(Gl&62914560)===Gl&&300>Re()-su?!(Hl&2)&&Au(e,0):tu|=n,ru===Gl&&(ru=0)),fd(e)}function nd(e,t){t===0&&(t=st()),e=gi(e,t),e!==null&&(lt(e,t),fd(e))}function rd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),nd(e,n)}function id(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),nd(e,n)}function ad(e,t){return Pe(e,t)}var od=null,sd=null,cd=!1,ld=!1,ud=!1,dd=0;function fd(e){e!==sd&&e.next===null&&(sd===null?od=sd=e:sd=sd.next=e),ld=!0,cd||(cd=!0,yd())}function pd(e,t){if(!ud&&ld){ud=!0;do for(var n=!1,r=od;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Xe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,vd(r,a))}else a=Gl,a=it(r,r===Ul?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||at(r,a)||(n=!0,vd(r,a));r=r.next}while(n);ud=!1}}function md(){hd()}function hd(){ld=cd=!1;var e=0;dd!==0&&nf()&&(e=dd);for(var t=Re(),n=null,r=od;r!==null;){var i=r.next,a=gd(r,t);a===0?(r.next=null,n===null?od=i:n.next=i,i===null&&(sd=n)):(n=r,(e!==0||a&3)&&(ld=!0)),r=i}fu!==0&&fu!==5||pd(e,!1),dd!==0&&(dd=0)}function gd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Xe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ot(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ul,n=Gl,n=it(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Kl===2||Kl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Fe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||at(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Fe(r),ht(n)){case 2:case 8:n=Ve;break;case 32:n=He;break;case 268435456:n=We;break;default:n=He}return r=_d.bind(null,e),n=Pe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Fe(r),e.callbackPriority=2,e.callbackNode=null,2}function _d(e,t){if(fu!==0&&fu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Xu()&&e.callbackNode!==n)return null;var r=Gl;return r=it(e,e===Ul?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(wu(e,r,t),gd(e,Re()),e.callbackNode!=null&&e.callbackNode===n?_d.bind(null,e):null)}function vd(e,t){if(Xu())return null;wu(e,t,!0)}function yd(){sf(function(){Hl&6?Pe(Be,md):hd()})}function bd(){if(dd===0){var e=Ea;e===0&&(e=et,et<<=1,!(et&261888)&&(et=256)),dd=e}return dd}function xd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:fn(``+e)}function Sd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Cd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=xd((i[bt]||null).action),o=r.submitter;o&&(t=(t=o[bt]||null)?xd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(dd!==0){var e=o?Sd(i,o):new FormData(i);As(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Sd(i,o):new FormData(i),As(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var wd=0;wd<si.length;wd++){var Td=si[wd];ci(Td.toLowerCase(),`on`+(Td[0].toUpperCase()+Td.slice(1)))}ci($r,`onAnimationEnd`),ci(ei,`onAnimationIteration`),ci(ti,`onAnimationStart`),ci(`dblclick`,`onDoubleClick`),ci(`focusin`,`onFocus`),ci(`focusout`,`onBlur`),ci(ni,`onTransitionRun`),ci(ri,`onTransitionStart`),ci(ii,`onTransitionCancel`),ci(ai,`onTransitionEnd`),It(`onMouseEnter`,[`mouseout`,`mouseover`]),It(`onMouseLeave`,[`mouseout`,`mouseover`]),It(`onPointerEnter`,[`pointerout`,`pointerover`]),It(`onPointerLeave`,[`pointerout`,`pointerover`]),Ft(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ft(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ft(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ft(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Ed=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Dd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Ed));function Od(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}}}}function kd(e,t){var n=t[St];n===void 0&&(n=t[St]=new Set);var r=e+`__bubble`;n.has(r)||(Nd(t,e,2,!1),n.add(r))}function Ad(e,t,n){var r=0;t&&(r|=4),Nd(n,e,r,t)}var jd=`_reactListening`+Math.random().toString(36).slice(2);function Md(e){if(!e[jd]){e[jd]=!0,Nt.forEach(function(t){t!==`selectionchange`&&(Dd.has(t)||Ad(t,!1,e),Ad(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jd]||(t[jd]=!0,Ad(`selectionchange`,!1,t))}}function Nd(e,t,n,r){switch(Tp(t)){case 2:var i=yp;break;case 8:i=bp;break;default:i=xp}n=i.bind(null,t,n,e),i=void 0,!Cn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Pd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=Ot(s),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}s=s.parentNode}}r=r.return}bn(function(){var r=a,i=hn(n),o=[];a:{var s=oi.get(e);if(s!==void 0){var l=Pn,u=e;switch(e){case`keypress`:if(kn(n)===0)break a;case`keydown`:case`keyup`:l=Qn;break;case`focusin`:u=`focus`,l=Un;break;case`focusout`:u=`blur`,l=Un;break;case`beforeblur`:case`afterblur`:l=Un;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Vn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Hn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=er;break;case $r:case ei:case ti:l=Wn;break;case ai:l=tr;break;case`scroll`:case`scrollend`:l=In;break;case`wheel`:l=nr;break;case`copy`:case`cut`:case`paste`:l=Gn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=$n;break;case`toggle`:case`beforetoggle`:l=rr}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=xn(m,p),g!=null&&d.push(Fd(m,g,h))),f)break;m=m.return}0<d.length&&(s=new l(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,s&&n!==mn&&(u=n.relatedTarget||n.fromElement)&&(Ot(u)||u[xt]))break a;if((l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Ot(u):null,u!==null&&(f=c(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Vn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=$n,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?s:At(l),h=u==null?s:At(u),s=new d(g,m+`leave`,l,n,i),s.target=f,s.relatedTarget=h,g=null,Ot(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ld,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Rd(o,s,l,d,!1),u!==null&&f!==null&&Rd(o,f,u,d,!0)}}a:{if(s=r?At(r):window,l=s.nodeName&&s.nodeName.toLowerCase(),l===`select`||l===`input`&&s.type===`file`)var v=Cr;else if(_r(s))if(wr)v=Nr;else{v=jr;var y=Ar}else l=s.nodeName,!l||l.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&ln(r.elementType)&&(v=Cr):v=Mr;if(v&&=v(e,r)){vr(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&en(s,`number`,s.value)}switch(y=r?At(r):window,e){case`focusin`:(_r(y)||y.contentEditable===`true`)&&(Ur=y,Wr=r,Gr=null);break;case`focusout`:Gr=Wr=Ur=null;break;case`mousedown`:Kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Kr=!1,qr(o,n,i);break;case`selectionchange`:if(Hr)break;case`keydown`:case`keyup`:qr(o,n,i)}var b;if(ar)b:{switch(e){case`compositionstart`:var ee=`onCompositionStart`;break b;case`compositionend`:ee=`onCompositionEnd`;break b;case`compositionupdate`:ee=`onCompositionUpdate`;break b}ee=void 0}else pr?dr(e,n)&&(ee=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(ee=`onCompositionStart`);ee&&(cr&&n.locale!==`ko`&&(pr||ee!==`onCompositionStart`?ee===`onCompositionEnd`&&pr&&(b=On()):(Tn=i,En=`value`in Tn?Tn.value:Tn.textContent,pr=!0)),y=Id(r,ee),0<y.length&&(ee=new Kn(ee,e,null,n,i),o.push({event:ee,listeners:y}),b?ee.data=b:(b=fr(n),b!==null&&(ee.data=b)))),(b=sr?mr(e,n):hr(e,n))&&(ee=Id(r,`onBeforeInput`),0<ee.length&&(y=new Kn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:ee}),y.data=b)),Cd(o,e,r,n,i)}Od(o,t)})}function Fd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Id(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=xn(e,n),i!=null&&r.unshift(Fd(e,i,a)),i=xn(e,t),i!=null&&r.push(Fd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ld(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=xn(n,a),l!=null&&o.unshift(Fd(n,l,c))):i||(l=xn(n,a),l!=null&&o.push(Fd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var zd=/\r\n?/g,Bd=/\u0000|\uFFFD/g;function Vd(e){return(typeof e==`string`?e:``+e).replace(zd,`
|
|
78
78
|
`).replace(Bd,``)}function Hd(e,t){return t=Vd(t),Vd(e)===t}function Ud(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||an(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&an(e,``+r);break;case`className`:Ht(e,`class`,r);break;case`tabIndex`:Ht(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ht(e,n,r);break;case`style`:cn(e,r,o);break;case`data`:if(t!==`object`){Ht(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Ud(e,t,`name`,i.name,i,null),Ud(e,t,`formEncType`,i.formEncType,i,null),Ud(e,t,`formMethod`,i.formMethod,i,null),Ud(e,t,`formTarget`,i.formTarget,i,null)):(Ud(e,t,`encType`,i.encType,i,null),Ud(e,t,`method`,i.method,i,null),Ud(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=pn);break;case`onScroll`:r!=null&&kd(`scroll`,e);break;case`onScrollEnd`:r!=null&&kd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=fn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:kd(`beforetoggle`,e),kd(`toggle`,e),Vt(e,`popover`,r);break;case`xlinkActuate`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Vt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=un.get(n)||n,Vt(e,n,r))}}function Wd(e,t,n,r,i,o){switch(n){case`style`:cn(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?an(e,r):(typeof r==`number`||typeof r==`bigint`)&&an(e,``+r);break;case`onScroll`:r!=null&&kd(`scroll`,e);break;case`onScrollEnd`:r!=null&&kd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=pn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Pt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[bt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Vt(e,n,r)}}}function Gd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:kd(`error`,e),kd(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Ud(e,t,o,s,n,null)}}i&&Ud(e,t,`srcSet`,n.srcSet,n,null),r&&Ud(e,t,`src`,n.src,n,null);return;case`input`:kd(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:Ud(e,t,r,d,n,null)}}$t(e,o,c,l,u,s,i,!1);return;case`select`:for(i in kd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Ud(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&tn(e,!!r,n,!0):tn(e,!!r,t,!1);return;case`textarea`:for(s in kd(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Ud(e,t,s,c,n,null)}rn(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Ud(e,t,l,r,n,null)}return;case`dialog`:kd(`beforetoggle`,e),kd(`toggle`,e),kd(`cancel`,e),kd(`close`,e);break;case`iframe`:case`object`:kd(`load`,e);break;case`video`:case`audio`:for(r=0;r<Ed.length;r++)kd(Ed[r],e);break;case`image`:kd(`error`,e),kd(`load`,e);break;case`details`:kd(`toggle`,e);break;case`embed`:case`source`:case`link`:kd(`error`,e),kd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Ud(e,t,u,r,n,null)}return;default:if(ln(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Wd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Ud(e,t,c,r,n,null))}function Kd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Ud(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Ud(e,t,p,m,r,f)}}Qt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Ud(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Ud(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?tn(e,!!n,n?[]:``,!1):tn(e,!!n,t,!0)):tn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Ud(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Ud(e,t,s,i,r,o)}nn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Ud(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Ud(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Ud(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:Ud(e,t,u,p,r,m)}return;default:if(ln(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Wd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Wd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Ud(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Ud(e,t,f,p,r,m)}function qd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Jd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&qd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&qd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Yd=null,Xd=null;function Zd(e){return e.nodeType===9?e:e.ownerDocument}function Qd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function $d(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function ef(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var tf=null;function nf(){var e=window.event;return e&&e.type===`popstate`?e===tf?!1:(tf=e,!0):(tf=null,!1)}var rf=typeof setTimeout==`function`?setTimeout:void 0,af=typeof clearTimeout==`function`?clearTimeout:void 0,of=typeof Promise==`function`?Promise:void 0,sf=typeof queueMicrotask==`function`?queueMicrotask:of===void 0?rf:function(e){return of.resolve(null).then(e).catch(cf)};function cf(e){setTimeout(function(){throw e})}function lf(e){return e===`head`}function uf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Wp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)wf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,wf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Et]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&wf(e.ownerDocument.body);n=i}while(n);Wp(t)}function df(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ff(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ff(n),Dt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function pf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[Et])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=yf(e.nextSibling),e===null)break}return null}function mf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=yf(e.nextSibling),e===null))return null;return e}function hf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=yf(e.nextSibling),e===null))return null;return e}function gf(e){return e.data===`$?`||e.data===`$~`}function _f(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function vf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function yf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var bf=null;function xf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return yf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Sf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Cf(e,t,n){switch(t=Zd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function wf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Dt(e)}var Tf=new Map,Ef=new Set;function Df(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Of=C.d;C.d={f:kf,r:Af,D:Nf,C:Pf,L:Ff,m:If,X:Rf,S:Lf,M:zf};function kf(){var e=Of.f(),t=Ou();return e||t}function Af(e){var t=kt(e);t!==null&&t.tag===5&&t.type===`form`?Ms(t):Of.r(e)}var jf=typeof document>`u`?null:document;function Mf(e,t,n){var r=jf;if(r&&typeof t==`string`&&t){var i=Zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Ef.has(i)||(Ef.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Gd(t,`link`,e),Mt(t),r.head.appendChild(t)))}}function Nf(e){Of.D(e),Mf(`dns-prefetch`,e,null)}function Pf(e,t){Of.C(e,t),Mf(`preconnect`,e,t)}function Ff(e,t,n){Of.L(e,t,n);var r=jf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Zt(n.imageSizes)+`"]`)):i+=`[href="`+Zt(e)+`"]`;var a=i;switch(t){case`style`:a=Vf(e);break;case`script`:a=Gf(e)}Tf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Tf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Hf(a))||t===`script`&&r.querySelector(Kf(a))||(t=r.createElement(`link`),Gd(t,`link`,e),Mt(t),r.head.appendChild(t)))}}function If(e,t){Of.m(e,t);var n=jf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Zt(r)+`"][href="`+Zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Gf(e)}if(!Tf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),Tf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Kf(a)))return}r=n.createElement(`link`),Gd(r,`link`,e),Mt(r),n.head.appendChild(r)}}}function Lf(e,t,n){Of.S(e,t,n);var r=jf;if(r&&e){var i=jt(r).hoistableStyles,a=Vf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Hf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Tf.get(a))&&Yf(e,n);var c=o=r.createElement(`link`);Mt(c),Gd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Jf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Rf(e,t){Of.X(e,t);var n=jf;if(n&&e){var r=jt(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=m({src:e,async:!0},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),Mt(a),Gd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t){Of.M(e,t);var n=jf;if(n&&e){var r=jt(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),Mt(a),Gd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t,n,r){var i=(i=be.current)?Df(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Vf(n.href),n=jt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Vf(n.href);var o=jt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Hf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Tf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Tf.set(e,n),o||Wf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Gf(n),n=jt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Vf(e){return`href="`+Zt(e)+`"`}function Hf(e){return`link[rel="stylesheet"][`+e+`]`}function Uf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Wf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Gd(t,`link`,n),Mt(t),e.head.appendChild(t))}function Gf(e){return`[src="`+Zt(e)+`"]`}function Kf(e){return`script[async]`+e}function qf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Zt(n.href)+`"]`);if(r)return t.instance=r,Mt(r),r;var i=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Mt(r),Gd(r,`style`,i),Jf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Vf(n.href);var o=e.querySelector(Hf(i));if(o)return t.state.loading|=4,t.instance=o,Mt(o),o;r=Uf(n),(i=Tf.get(i))&&Yf(r,i),o=(e.ownerDocument||e).createElement(`link`),Mt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Gd(o,`link`,r),t.state.loading|=4,Jf(o,n.precedence,e),t.instance=o;case`script`:return o=Gf(n.src),(i=e.querySelector(Kf(o)))?(t.instance=i,Mt(i),i):(r=n,(i=Tf.get(o))&&(r=m({},n),Xf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Mt(i),Gd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Jf(r,n.precedence,e));return t.instance}function Jf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Yf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Xf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Zf=null;function Qf(e,t,n){if(Zf===null){var r=new Map,i=Zf=new Map;i.set(n,r)}else i=Zf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Et]||a[yt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function $f(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function ep(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function tp(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function np(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Vf(r.href),a=t.querySelector(Hf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ap.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Mt(a);return}a=t.ownerDocument||t,r=Uf(r),(i=Tf.get(i))&&Yf(r,i),a=a.createElement(`link`),Mt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Gd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ap.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var rp=0;function ip(e,t){return e.stylesheets&&e.count===0&&sp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&rp===0&&(rp=62500*Jd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>rp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ap(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var op=null;function sp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,op=new Map,t.forEach(cp,e),op=null,ap.call(e))}function cp(e,t){if(!(t.state.loading&4)){var n=op.get(e);if(n)var r=n.get(null);else{n=new Map,op.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ap.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var lp={$$typeof:te,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function up(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ct(0),this.hiddenUpdates=ct(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function dp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new up(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=xi(3,null,null,t),e.current=a,a.stateNode=e,t=Sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},eo(a),e}function fp(e){return e?(e=yi,e):yi}function pp(e,t,n,r,i,a){i=fp(i),r.context===null?r.context=i:r.pendingContext=i,r=E(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=no(e,r,t),n!==null&&(Cu(n,e,t),ro(n,e,t))}function mp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hp(e,t){mp(e,t),(e=e.alternate)&&mp(e,t)}function gp(e){if(e.tag===13||e.tag===31){var t=gi(e,67108864);t!==null&&Cu(t,e,67108864),hp(e,67108864)}}function _p(e){if(e.tag===13||e.tag===31){var t=xu();t=mt(t);var n=gi(e,t);n!==null&&Cu(n,e,t),hp(e,t)}}var vp=!0;function yp(e,t,n,r){var i=fe.T;fe.T=null;var a=C.p;try{C.p=2,xp(e,t,n,r)}finally{C.p=a,fe.T=i}}function bp(e,t,n,r){var i=fe.T;fe.T=null;var a=C.p;try{C.p=8,xp(e,t,n,r)}finally{C.p=a,fe.T=i}}function xp(e,t,n,r){if(vp){var i=Sp(r);if(i===null)Pd(e,t,r,Cp,n),Pp(e,r);else if(Ip(i,e,t,n,r))r.stopPropagation();else if(Pp(e,r),t&4&&-1<Np.indexOf(e)){for(;i!==null;){var a=kt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=rt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Xe(o);s.entanglements[1]|=c,o&=~c}fd(a),!(Hl&6)&&(lu=Re()+500,pd(0,!1))}}break;case 31:case 13:s=gi(a,2),s!==null&&Cu(s,a,2),Ou(),hp(a,2)}if(a=Sp(r),a===null&&Pd(e,t,r,Cp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Pd(e,t,r,null,n)}}function Sp(e){return e=hn(e),wp(e)}var Cp=null;function wp(e){if(Cp=null,e=Ot(e),e!==null){var t=c(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=l(t),e!==null)return e;e=null}else if(n===31){if(e=u(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Cp=e,null}function Tp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(ze()){case Be:return 2;case Ve:return 8;case He:case Ue:return 32;case We:return 268435456;default:return 32}default:return 32}}var Ep=!1,Dp=null,Op=null,kp=null,Ap=new Map,jp=new Map,Mp=[],Np=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Pp(e,t){switch(e){case`focusin`:case`focusout`:Dp=null;break;case`dragenter`:case`dragleave`:Op=null;break;case`mouseover`:case`mouseout`:kp=null;break;case`pointerover`:case`pointerout`:Ap.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:jp.delete(t.pointerId)}}function Fp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=kt(t),t!==null&&gp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ip(e,t,n,r,i){switch(t){case`focusin`:return Dp=Fp(Dp,e,t,n,r,i),!0;case`dragenter`:return Op=Fp(Op,e,t,n,r,i),!0;case`mouseover`:return kp=Fp(kp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ap.set(a,Fp(Ap.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,jp.set(a,Fp(jp.get(a)||null,e,t,n,r,i)),!0}return!1}function Lp(e){var t=Ot(e.target);if(t!==null){var n=c(t);if(n!==null){if(t=n.tag,t===13){if(t=l(n),t!==null){e.blockedOn=t,_t(e.priority,function(){_p(n)});return}}else if(t===31){if(t=u(n),t!==null){e.blockedOn=t,_t(e.priority,function(){_p(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);mn=r,n.target.dispatchEvent(r),mn=null}else return t=kt(n),t!==null&&gp(t),e.blockedOn=n,!1;t.shift()}return!0}function zp(e,t,n){Rp(e)&&n.delete(t)}function Bp(){Ep=!1,Dp!==null&&Rp(Dp)&&(Dp=null),Op!==null&&Rp(Op)&&(Op=null),kp!==null&&Rp(kp)&&(kp=null),Ap.forEach(zp),jp.forEach(zp)}function Vp(e,n){e.blockedOn===n&&(e.blockedOn=null,Ep||(Ep=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bp)))}var Hp=null;function Up(e){Hp!==e&&(Hp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hp===e&&(Hp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(wp(r||n)===null)continue;break}var a=kt(n);a!==null&&(e.splice(t,3),t-=3,As(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wp(e){function t(t){return Vp(t,e)}Dp!==null&&Vp(Dp,e),Op!==null&&Vp(Op,e),kp!==null&&Vp(kp,e),Ap.forEach(t),jp.forEach(t);for(var n=0;n<Mp.length;n++){var r=Mp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mp.length&&(n=Mp[0],n.blockedOn===null);)Lp(n),n.blockedOn===null&&Mp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[bt]||null;if(typeof a==`function`)o||Up(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[bt]||null)s=o.formAction;else if(wp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Up(n)}}}function Gp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Kp(e){this._internalRoot=e}qp.prototype.render=Kp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;pp(n,xu(),e,t,null,null)},qp.prototype.unmount=Kp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pp(e.current,2,null,e,null,null),Ou(),t[xt]=null}};function qp(e){this._internalRoot=e}qp.prototype.unstable_scheduleHydration=function(e){if(e){var t=gt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mp.length&&t!==0&&t<Mp[n].priority;n++);Mp.splice(n,0,e),n===0&&Lp(e)}};var Jp=n.version;if(Jp!==`19.2.7`)throw Error(a(527,Jp,`19.2.7`));C.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=f(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Yp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:fe,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xp.isDisabled&&Xp.supportsFiber)try{qe=Xp.inject(Yp),Je=Xp}catch{}}e.createRoot=function(e,t){if(!s(e))throw Error(a(299));var n=!1,r=``,i=R,o=Qs,c=$s;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=dp(e,1,!1,null,null,n,r,null,i,o,c,Gp),e[xt]=t.current,Md(e),new Kp(t)}})),UQ=n(a(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=HQ()}))(),1),WQ=`camstack-mount`,GQ=/^\/(?:[A-Za-z0-9_\-.]+\/)*$/,KQ=null;function qQ(e){if(e==null||e===``)return null;let t=e.endsWith(`/`)?e:`${e}/`;return!GQ.test(t)||t.includes(`/../`)||t.includes(`/./`)?null:t}function JQ(){if(typeof document>`u`)return`/`;let e=qQ(document.querySelector(`meta[name="${WQ}"]`)?.getAttribute(`content`));if(e!==null)return e;if(document.querySelector(`base[href]`)!==null)try{let e=new URL(document.baseURI);if(e.origin===window.location.origin){let t=qQ(e.pathname);if(t!==null)return t}}catch{}return`/`}function YQ(){return KQ===null&&(KQ=JQ()),KQ}function XQ(){return YQ().replace(/\/$/,``)}function ZQ(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`//`)}function QQ(e){if(ZQ(e))return e;let t=YQ(),n=e.replace(/^\/+/,``);return t!==`/`&&(e===XQ()||e.startsWith(t))?e:`${t}${n}`}EK(`camstack:widget-registry`,null);function $Q({title:e,icon:t,headerRight:n,collapsible:r=!1,defaultOpen:i=!0,open:a,onOpenChange:o,bodyClassName:c=`p-3`,children:l}){let[u,d]=(0,s.useState)(i),f=a??u,p=()=>{let e=!f;a===void 0&&d(e),o?.(e)},m=!r||f,h=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`span`,{className:`flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-foreground`,children:[t,e]}),r?(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[n,f?(0,K.jsx)($B,{className:`h-3.5 w-3.5 shrink-0 text-foreground-subtle`}):(0,K.jsx)(tV,{className:`h-3.5 w-3.5 shrink-0 text-foreground-subtle`})]}):n]}),g=`px-4 py-2 flex items-center justify-between ${m?`border-b border-border`:``}`;return(0,K.jsxs)(`div`,{className:`rounded-lg border border-border bg-surface overflow-hidden`,children:[r?(0,K.jsx)(`button`,{type:`button`,"aria-expanded":f,onClick:p,className:`w-full gap-2 text-left ${g}`,children:h}):(0,K.jsx)(`div`,{className:g,children:h}),m?(0,K.jsx)(`div`,{className:c,children:l}):null]})}var e$=(0,s.createContext)(null);function t$(){return(0,s.useContext)(e$)}var n$=[`f32le`,`pcmu`,`pcma`];function r$(){let e=new Float32Array(256);for(let t=0;t<256;t++){let n=~t&255,r=n&128?-1:1,i=n>>4&7;e[t]=r*((8*(n&15)+132<<i)-132)/32768}return e}function i$(){let e=new Float32Array(256);for(let t=0;t<256;t++){let n=t^85,r=n&128?1:-1,i=n>>4&7,a=n&15;e[t]=r*(i===0?16*a+8:16*a+264<<i-1)/32768}return e}r$(),i$();var a$=j({url:T().min(1),hostNodeId:T().min(1),expiresAtMs:E().int().nonnegative(),declaredBytes:E().int().nonnegative().nullable()}),o$=`temperature.pressure.speed.precipitation.precipitation-rate.length.area.illuminance.irradiance.power.energy.voltage.current.apparent-power.humidity.percentage.concentration-volume.concentration-mass.concentration-ppb.volume.duration.duration-ms.information.sound-level.signal-level.colour-temperature.angle.bitrate.rate.mass.index.ratio.count.none.device`.split(`.`);F(o$),new Set(o$);function s$(e,t){return{quantity:e,...t?.precision===void 0?{}:{precision:t.precision},...t?.label===void 0?{}:{label:t.label}}}var c$=F([`high`,`mid`,`low`]);M([c$,I(`auto`)]);var l$=F([`pull-rtsp`,`pull-rtmp`,`pull-http`,`pull-flv`,`pull-rfc4571`,`push-annexb`,`derived`]),u$=j({width:E().int().positive().meta(s$(`none`)),height:E().int().positive().meta(s$(`none`))});j({camStreamId:T().min(1),deviceId:E().int().nonnegative(),kind:l$,url:T().optional(),codec:T().optional(),resolution:u$.optional(),fps:E().positive().optional(),label:T().optional(),deviceFeatures:A(T()).optional(),autoEligible:D().optional(),profileHint:c$.optional(),metadata:P(T(),O()).optional()});var d$=F([`unassigned`,`idle`,`connecting`,`streaming`,`error`]);j({deviceId:E().int().nonnegative(),profile:c$,brokerId:T(),sourceCamStreamId:T().nullable(),status:d$,resolution:u$.optional(),codec:T().optional(),preBufferSec:E().nonnegative().optional(),errorMessage:T().optional()}),j({id:T(),label:T(),protocol:F([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:T().optional(),resolution:j({width:E(),height:E()}).readonly().optional(),fps:E().optional(),bitrate:E().optional(),codec:T().optional(),profileHint:c$.optional()}),j({type:T(),url:T(),videoCodec:T().optional(),audioCodec:T().optional(),metadata:P(T(),O()).readonly().optional()}),j({shmId:T(),slot:E().int().nonnegative(),seq:E().int().nonnegative(),width:E().int().positive(),height:E().int().positive(),format:F([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),pts:E(),byteLength:E().int().nonnegative(),nodeId:T(),slotCount:E().int().positive()});var f$=F(n$);j({data:ns(Uint8Array),sampleRate:E().int().positive(),channels:E().int().positive(),timestamp:E(),format:f$.optional()}),j({brokerId:T(),tag:T().optional(),accept:A(f$).readonly().optional()}),j({subscriptionId:T()}),j({status:F([`idle`,`connecting`,`streaming`,`error`,`stopped`]),inputFps:E(),encodedSubscribers:E(),uptimeMs:E(),bitrateKbps:E(),idrIntervalMs:E(),codec:T().optional(),totalBytes:E(),packetCount:E(),rtspClients:E(),pipeClients:E(),preBufferSec:E(),preBufferMs:E(),preBufferPackets:E(),audio:j({codec:T(),sampleRate:E(),channels:E(),supported:D()}).nullable().optional(),audioMuted:D().optional(),audioMutedDropped:E().optional()}),j({profile:c$,brokerId:T(),url:T(),mutedUrl:T(),enabled:D(),codec:T().optional(),resolution:u$.optional()});var p$=function(e){return e.Camera=`camera`,e.Hub=`hub`,e.Light=`light`,e.Siren=`siren`,e.Switch=`switch`,e.Sensor=`sensor`,e.Thermostat=`thermostat`,e.Climate=`climate`,e.Button=`button`,e.EventEmitter=`event-emitter`,e.Update=`update`,e.Generic=`generic`,e.Notifier=`notifier`,e.Script=`script`,e.Automation=`automation`,e.Lock=`lock`,e.Cover=`cover`,e.Valve=`valve`,e.Humidifier=`humidifier`,e.WaterHeater=`water-heater`,e.Fan=`fan`,e.MediaPlayer=`media-player`,e.AlarmPanel=`alarm-panel`,e.Control=`control`,e.Presence=`presence`,e.Weather=`weather`,e.Vacuum=`vacuum`,e.LawnMower=`lawn-mower`,e.Container=`container`,e.Image=`image`,e.PetFeeder=`pet-feeder`,e.Dishwasher=`dishwasher`,e.Washer=`washer`,e.Dryer=`dryer`,e}({});F([`new-session`,`step-up`]),F([`en`,`it`]);var m$=N(`kind`,[j({kind:I(`native`)}),j({kind:I(`browser`),startPath:T().startsWith(`/`)})]),h$=`ecdsa-p256-sha256`,g$=`camstack-device-cert-v1`;F([`login`,`renew`,`revoke`]);var _$=F([`ios`,`android`,`web`,`other`]),v$=T().min(1).max(4096).regex(/^[A-Za-z0-9_-]+$/),y$=T().min(1).max(16384),b$=F([`revoked`,`unknown-credential`,`expired`,`bad-signature`,`nonce-invalid`,`rate-limited`,`invalid-certificate`,`superseded`,`user-gone`,`unavailable`,`code-invalid`,`self-enrollment-disabled`,`step-up-required`,`bad-public-key`]),x$=j({ok:I(!1),reason:b$,definitive:D(),retryAfterSeconds:E().optional()});j({code:T().min(1).max(256),publicKeySpki:v$,deviceName:T().min(1).max(80).optional(),platform:_$}),N(`ok`,[j({credentialId:T(),certPem:y$,chainPem:y$,notAfter:E(),user:j({id:T(),username:T()})}).extend({ok:I(!0)}),x$]),j({proof:T().min(1).max(512),publicKeySpki:v$,deviceName:T().min(1).max(80),platform:_$}),j({proof:T(),expiresAt:E()}),N(`ok`,[j({nonce:T(),origin:T(),expiresAt:E(),signature:I(h$)}).extend({ok:I(!0)}),x$]),j({certPem:y$,nonce:T().min(1).max(256),signature:v$}),N(`ok`,[j({credentialId:T(),certPem:y$,chainPem:y$,notAfter:E()}).extend({ok:I(!0)}),x$]),N(`ok`,[j({ok:I(!0),credentialId:T(),sessionsEnded:E().int()}),x$]);var S$=F([`active`,`expired`,`revoked`]);j({id:T(),userId:T(),username:T().nullable(),deviceName:T(),platform:_$,enrolledVia:F([`qr`,`self`]),fingerprint:T(),issuedAt:E(),expiresAt:E(),lastUsedAt:E().nullable(),lastUsedFrom:T().nullable(),revokedAt:E().nullable(),revokedBy:T().nullable(),status:S$}),j({code:T(),expiresAt:E(),enrollUrl:T(),hubOrigin:T().nullable(),hubOrigins:A(T())}),j({kind:I(`device-certificate`),id:I(`device-certificate`),label:T(),stage:I(`primary`),challengePath:I(`auth.getDeviceChallenge`),revokePath:I(`auth.revokeOwnDeviceCertificate`),enrollSelfPath:I(`auth.enrollSelf`),loginPath:I(`auth.loginWithDeviceCertificate`),renewPath:I(`auth.renewDeviceCertificate`),signature:I(h$),messageVersion:I(g$),clients:A(F([`native`,`web`])),app:m$.nullable()});var C$={contact:`entryOpen`,binary:`on`,switch:`on`,motion:`detected`,flood:`flooded`,gas:`detected`,smoke:`detected`,"carbon-monoxide":`detected`,vibration:`detected`,tamper:`tampered`};new Set([{id:`person`,name:`Person`},{id:`vehicle`,name:`Vehicle`},{id:`animal`,name:`Animal`},{id:`package`,name:`Package`}].map(e=>e.id));var w$={mapping:{person:`person`,bicycle:`vehicle`,car:`vehicle`,motorcycle:`vehicle`,airplane:`vehicle`,bus:`vehicle`,train:`vehicle`,truck:`vehicle`,boat:`vehicle`,bird:`animal`,cat:`animal`,dog:`animal`,horse:`animal`,sheep:`animal`,cow:`animal`,elephant:`animal`,bear:`animal`,zebra:`animal`,giraffe:`animal`,suitcase:`package`,backpack:`package`,handbag:`package`},preserveOriginal:!1};j({field:T().min(1),on:I(`advance`)});var T$=j({id:T(),title:T(),description:T().optional(),style:F([`card`,`accordion`]).optional(),defaultCollapsed:D().optional(),columns:M([I(1),I(2),I(3),I(4)]).optional(),tab:T().optional(),location:F([`settings`,`top-tab`,`hero`]).optional(),order:E().optional(),fields:A(co())});j({tabs:A(j({id:T(),label:T(),icon:T(),order:E().optional()})).optional(),sections:A(T$)}).nullable(),j({deviceId:E()}),j({deviceId:E()}),j({deviceId:E(),patch:P(T(),O())}),j({success:I(!0)}),j({deviceId:E()}),O().nullable();function Q(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,...n?.auth===void 0?{}:{auth:n.auth},...n?.access===void 0?{}:{access:n.access},...n?.role===void 0?{}:{role:n.role},...n?.caller===void 0?{}:{caller:n.caller},timeoutMs:n?.timeoutMs}}function E$(e,t,n){return{...Q(e,t,n),providerOptional:!0}}var D$=`accessibility.account.animals.arrows.brands.buildings.charts.communication.connectivity.cursors.design.development.devices.emoji.files.finance.food-beverage.gaming.home.layout.mail.math.medical.multimedia.nature.navigation.notifications.people.photography.science.seasons.security.shapes.shopping.social.sports.sustainability.text.time.tools.transportation.travel.weather`.split(`.`),O$=`a-arrow-down.a-arrow-up.a-large-small.accessibility.activity.air-vent.airplay.alarm-clock.alarm-clock-check.alarm-clock-minus.alarm-clock-off.alarm-clock-plus.alarm-smoke.album.align-center-horizontal.align-center-vertical.align-end-horizontal.align-end-vertical.align-horizontal-distribute-center.align-horizontal-distribute-end.align-horizontal-distribute-start.align-horizontal-justify-center.align-horizontal-justify-end.align-horizontal-justify-start.align-horizontal-space-around.align-horizontal-space-between.align-start-horizontal.align-start-vertical.align-vertical-distribute-center.align-vertical-distribute-end.align-vertical-distribute-start.align-vertical-justify-center.align-vertical-justify-end.align-vertical-justify-start.align-vertical-space-around.align-vertical-space-between.ambulance.ampersand.ampersands.amphora.anchor.angry.annoyed.antenna.anvil.aperture.app-window.app-window-mac.apple.archive.archive-restore.archive-x.armchair.arrow-big-down.arrow-big-down-dash.arrow-big-left.arrow-big-left-dash.arrow-big-right.arrow-big-right-dash.arrow-big-up.arrow-big-up-dash.arrow-down.arrow-down-0-1.arrow-down-1-0.arrow-down-a-z.arrow-down-from-line.arrow-down-left.arrow-down-narrow-wide.arrow-down-right.arrow-down-to-dot.arrow-down-to-line.arrow-down-up.arrow-down-wide-narrow.arrow-down-z-a.arrow-left.arrow-left-from-line.arrow-left-right.arrow-left-to-line.arrow-right.arrow-right-from-line.arrow-right-left.arrow-right-to-line.arrow-up.arrow-up-0-1.arrow-up-1-0.arrow-up-a-z.arrow-up-down.arrow-up-from-dot.arrow-up-from-line.arrow-up-left.arrow-up-narrow-wide.arrow-up-right.arrow-up-to-line.arrow-up-wide-narrow.arrow-up-z-a.arrows-up-from-line.asterisk.at-sign.atom.audio-lines.audio-waveform.award.axe.axis-3d.baby.backpack.badge.badge-alert.badge-cent.badge-check.badge-dollar-sign.badge-euro.badge-indian-rupee.badge-info.badge-japanese-yen.badge-minus.badge-percent.badge-plus.badge-pound-sterling.badge-question-mark.badge-russian-ruble.badge-swiss-franc.badge-turkish-lira.badge-x.baggage-claim.balloon.ban.banana.bandage.banknote.banknote-arrow-down.banknote-arrow-up.banknote-x.barcode.barrel.baseline.bath.battery.battery-charging.battery-full.battery-low.battery-medium.battery-plus.battery-warning.beaker.bean.bean-off.bed.bed-double.bed-single.beef.beer.beer-off.bell.bell-dot.bell-electric.bell-minus.bell-off.bell-plus.bell-ring.between-horizontal-end.between-horizontal-start.between-vertical-end.between-vertical-start.biceps-flexed.bike.binary.binoculars.biohazard.bird.birdhouse.bitcoin.blend.blinds.blocks.bluetooth.bluetooth-connected.bluetooth-off.bluetooth-searching.bold.bolt.bomb.bone.book.book-a.book-alert.book-audio.book-check.book-copy.book-dashed.book-down.book-headphones.book-heart.book-image.book-key.book-lock.book-marked.book-minus.book-open.book-open-check.book-open-text.book-plus.book-search.book-text.book-type.book-up.book-up-2.book-user.book-x.bookmark.bookmark-check.bookmark-minus.bookmark-plus.bookmark-x.boom-box.bot.bot-message-square.bot-off.bottle-wine.bow-arrow.box.boxes.braces.brackets.brain.brain-circuit.brain-cog.brick-wall.brick-wall-fire.brick-wall-shield.briefcase.briefcase-business.briefcase-conveyor-belt.briefcase-medical.bring-to-front.brush.brush-cleaning.bubbles.bug.bug-off.bug-play.building.building-2.bus.bus-front.cable.cable-car.cake.cake-slice.calculator.calendar.calendar-1.calendar-arrow-down.calendar-arrow-up.calendar-check.calendar-check-2.calendar-clock.calendar-cog.calendar-days.calendar-fold.calendar-heart.calendar-minus.calendar-minus-2.calendar-off.calendar-plus.calendar-plus-2.calendar-range.calendar-search.calendar-sync.calendar-x.calendar-x-2.calendars.camera.camera-off.candy.candy-cane.candy-off.cannabis.cannabis-off.captions.captions-off.car.car-front.car-taxi-front.caravan.card-sim.carrot.case-lower.case-sensitive.case-upper.cassette-tape.cast.castle.cat.cctv.chart-area.chart-bar.chart-bar-big.chart-bar-decreasing.chart-bar-increasing.chart-bar-stacked.chart-candlestick.chart-column.chart-column-big.chart-column-decreasing.chart-column-increasing.chart-column-stacked.chart-gantt.chart-line.chart-network.chart-no-axes-column.chart-no-axes-column-decreasing.chart-no-axes-column-increasing.chart-no-axes-combined.chart-no-axes-gantt.chart-pie.chart-scatter.chart-spline.check.check-check.check-line.chef-hat.cherry.chess-bishop.chess-king.chess-knight.chess-pawn.chess-queen.chess-rook.chevron-down.chevron-first.chevron-last.chevron-left.chevron-right.chevron-up.chevrons-down.chevrons-down-up.chevrons-left.chevrons-left-right.chevrons-left-right-ellipsis.chevrons-right.chevrons-right-left.chevrons-up.chevrons-up-down.church.cigarette.cigarette-off.circle.circle-alert.circle-arrow-down.circle-arrow-left.circle-arrow-out-down-left.circle-arrow-out-down-right.circle-arrow-out-up-left.circle-arrow-out-up-right.circle-arrow-right.circle-arrow-up.circle-check.circle-check-big.circle-chevron-down.circle-chevron-left.circle-chevron-right.circle-chevron-up.circle-dashed.circle-divide.circle-dollar-sign.circle-dot.circle-dot-dashed.circle-ellipsis.circle-equal.circle-fading-arrow-up.circle-fading-plus.circle-gauge.circle-minus.circle-off.circle-parking.circle-parking-off.circle-pause.circle-percent.circle-pile.circle-play.circle-plus.circle-pound-sterling.circle-power.circle-question-mark.circle-slash.circle-slash-2.circle-small.circle-star.circle-stop.circle-user.circle-user-round.circle-x.circuit-board.citrus.clapperboard.clipboard.clipboard-check.clipboard-clock.clipboard-copy.clipboard-list.clipboard-minus.clipboard-paste.clipboard-pen.clipboard-pen-line.clipboard-plus.clipboard-type.clipboard-x.clock.clock-1.clock-10.clock-11.clock-12.clock-2.clock-3.clock-4.clock-5.clock-6.clock-7.clock-8.clock-9.clock-alert.clock-arrow-down.clock-arrow-up.clock-check.clock-fading.clock-plus.closed-caption.cloud.cloud-alert.cloud-backup.cloud-check.cloud-cog.cloud-download.cloud-drizzle.cloud-fog.cloud-hail.cloud-lightning.cloud-moon.cloud-moon-rain.cloud-off.cloud-rain.cloud-rain-wind.cloud-snow.cloud-sun.cloud-sun-rain.cloud-sync.cloud-upload.cloudy.clover.club.code.code-xml.coffee.cog.coins.columns-2.columns-3.columns-3-cog.columns-4.combine.command.compass.component.computer.concierge-bell.cone.construction.contact.contact-round.container.contrast.cookie.cooking-pot.copy.copy-check.copy-minus.copy-plus.copy-slash.copy-x.copyleft.copyright.corner-down-left.corner-down-right.corner-left-down.corner-left-up.corner-right-down.corner-right-up.corner-up-left.corner-up-right.cpu.creative-commons.credit-card.croissant.crop.cross.crosshair.crown.cuboid.cup-soda.currency.cylinder.dam.database.database-backup.database-search.database-zap.decimals-arrow-left.decimals-arrow-right.delete.dessert.diameter.diamond.diamond-minus.diamond-percent.diamond-plus.dice-1.dice-2.dice-3.dice-4.dice-5.dice-6.dices.diff.disc.disc-2.disc-3.disc-album.divide.dna.dna-off.dock.dog.dollar-sign.donut.door-closed.door-closed-locked.door-open.dot.download.drafting-compass.drama.drill.drone.droplet.droplet-off.droplets.drum.drumstick.dumbbell.ear.ear-off.earth.earth-lock.eclipse.egg.egg-fried.egg-off.ellipsis.ellipsis-vertical.equal.equal-approximately.equal-not.eraser.ethernet-port.euro.ev-charger.expand.external-link.eye.eye-closed.eye-off.factory.fan.fast-forward.feather.fence.ferris-wheel.file.file-archive.file-axis-3d.file-badge.file-box.file-braces.file-braces-corner.file-chart-column.file-chart-column-increasing.file-chart-line.file-chart-pie.file-check.file-check-corner.file-clock.file-code.file-code-corner.file-cog.file-diff.file-digit.file-down.file-exclamation-point.file-headphone.file-heart.file-image.file-input.file-key.file-lock.file-minus.file-minus-corner.file-music.file-output.file-pen.file-pen-line.file-play.file-plus.file-plus-corner.file-question-mark.file-scan.file-search.file-search-corner.file-signal.file-sliders.file-spreadsheet.file-stack.file-symlink.file-terminal.file-text.file-type.file-type-corner.file-up.file-user.file-video-camera.file-volume.file-x.file-x-corner.files.film.fingerprint-pattern.fire-extinguisher.fish.fish-off.fish-symbol.fishing-hook.fishing-rod.flag.flag-off.flag-triangle-left.flag-triangle-right.flame.flame-kindling.flashlight.flashlight-off.flask-conical.flask-conical-off.flask-round.flip-horizontal-2.flip-vertical-2.flower.flower-2.focus.fold-horizontal.fold-vertical.folder.folder-archive.folder-check.folder-clock.folder-closed.folder-code.folder-cog.folder-dot.folder-down.folder-git.folder-git-2.folder-heart.folder-input.folder-kanban.folder-key.folder-lock.folder-minus.folder-open.folder-open-dot.folder-output.folder-pen.folder-plus.folder-root.folder-search.folder-search-2.folder-symlink.folder-sync.folder-tree.folder-up.folder-x.folders.footprints.forklift.form.forward.frame.frown.fuel.fullscreen.funnel.funnel-plus.funnel-x.gallery-horizontal.gallery-horizontal-end.gallery-thumbnails.gallery-vertical.gallery-vertical-end.gamepad.gamepad-2.gamepad-directional.gauge.gavel.gem.georgian-lari.ghost.gift.git-branch.git-branch-minus.git-branch-plus.git-commit-horizontal.git-commit-vertical.git-compare.git-compare-arrows.git-fork.git-graph.git-merge.git-merge-conflict.git-pull-request.git-pull-request-arrow.git-pull-request-closed.git-pull-request-create.git-pull-request-create-arrow.git-pull-request-draft.glass-water.glasses.globe.globe-lock.globe-off.globe-x.goal.gpu.graduation-cap.grape.grid-2x2.grid-2x2-check.grid-2x2-plus.grid-2x2-x.grid-3x2.grid-3x3.grip.grip-horizontal.grip-vertical.group.guitar.ham.hamburger.hammer.hand.hand-coins.hand-fist.hand-grab.hand-heart.hand-helping.hand-metal.hand-platter.handbag.handshake.hard-drive.hard-drive-download.hard-drive-upload.hard-hat.hash.hat-glasses.haze.hd.hdmi-port.heading.heading-1.heading-2.heading-3.heading-4.heading-5.heading-6.headphone-off.headphones.headset.heart.heart-crack.heart-handshake.heart-minus.heart-off.heart-plus.heart-pulse.heater.helicopter.hexagon.highlighter.history.hop.hop-off.hospital.hotel.hourglass.house.house-heart.house-plug.house-plus.house-wifi.ice-cream-bowl.ice-cream-cone.id-card.id-card-lanyard.image.image-down.image-minus.image-off.image-play.image-plus.image-up.image-upscale.images.import.inbox.indian-rupee.infinity.info.inspection-panel.italic.iteration-ccw.iteration-cw.japanese-yen.joystick.kanban.kayak.key.key-round.key-square.keyboard.keyboard-music.keyboard-off.lamp.lamp-ceiling.lamp-desk.lamp-floor.lamp-wall-down.lamp-wall-up.land-plot.landmark.languages.laptop.laptop-minimal.laptop-minimal-check.lasso.lasso-select.laugh.layers.layers-2.layers-plus.layout-dashboard.layout-grid.layout-list.layout-panel-left.layout-panel-top.layout-template.leaf.leafy-green.lectern.lens-concave.lens-convex.library.library-big.life-buoy.ligature.lightbulb.lightbulb-off.line-dot-right-horizontal.line-squiggle.link.link-2.link-2-off.list.list-check.list-checks.list-chevrons-down-up.list-chevrons-up-down.list-collapse.list-end.list-filter.list-filter-plus.list-indent-decrease.list-indent-increase.list-minus.list-music.list-ordered.list-plus.list-restart.list-start.list-todo.list-tree.list-video.list-x.loader.loader-circle.loader-pinwheel.locate.locate-fixed.locate-off.lock.lock-keyhole.lock-keyhole-open.lock-open.log-in.log-out.logs.lollipop.luggage.magnet.mail.mail-check.mail-minus.mail-open.mail-plus.mail-question-mark.mail-search.mail-warning.mail-x.mailbox.mails.map.map-minus.map-pin.map-pin-check.map-pin-check-inside.map-pin-house.map-pin-minus.map-pin-minus-inside.map-pin-off.map-pin-pen.map-pin-plus.map-pin-plus-inside.map-pin-x.map-pin-x-inside.map-pinned.map-plus.mars.mars-stroke.martini.maximize.maximize-2.medal.megaphone.megaphone-off.meh.memory-stick.menu.merge.message-circle.message-circle-check.message-circle-code.message-circle-dashed.message-circle-heart.message-circle-more.message-circle-off.message-circle-plus.message-circle-question-mark.message-circle-reply.message-circle-warning.message-circle-x.message-square.message-square-check.message-square-code.message-square-dashed.message-square-diff.message-square-dot.message-square-heart.message-square-lock.message-square-more.message-square-off.message-square-plus.message-square-quote.message-square-reply.message-square-share.message-square-text.message-square-warning.message-square-x.messages-square.metronome.mic.mic-off.mic-vocal.microchip.microscope.microwave.milestone.milk.milk-off.minimize.minimize-2.minus.mirror-rectangular.mirror-round.monitor.monitor-check.monitor-cloud.monitor-cog.monitor-dot.monitor-down.monitor-off.monitor-pause.monitor-play.monitor-smartphone.monitor-speaker.monitor-stop.monitor-up.monitor-x.moon.moon-star.motorbike.mountain.mountain-snow.mouse.mouse-left.mouse-off.mouse-pointer.mouse-pointer-2.mouse-pointer-2-off.mouse-pointer-ban.mouse-pointer-click.mouse-right.move.move-3d.move-diagonal.move-diagonal-2.move-down.move-down-left.move-down-right.move-horizontal.move-left.move-right.move-up.move-up-left.move-up-right.move-vertical.music.music-2.music-3.music-4.navigation.navigation-2.navigation-2-off.navigation-off.network.newspaper.nfc.non-binary.notebook.notebook-pen.notebook-tabs.notebook-text.notepad-text.notepad-text-dashed.nut.nut-off.octagon.octagon-alert.octagon-minus.octagon-pause.octagon-x.omega.option.orbit.origami.package.package-2.package-check.package-minus.package-open.package-plus.package-search.package-x.paint-bucket.paint-roller.paintbrush.paintbrush-vertical.palette.panda.panel-bottom.panel-bottom-close.panel-bottom-dashed.panel-bottom-open.panel-left.panel-left-close.panel-left-dashed.panel-left-open.panel-left-right-dashed.panel-right.panel-right-close.panel-right-dashed.panel-right-open.panel-top.panel-top-bottom-dashed.panel-top-close.panel-top-dashed.panel-top-open.panels-left-bottom.panels-right-bottom.panels-top-left.paperclip.parentheses.parking-meter.party-popper.pause.paw-print.pc-case.pen.pen-line.pen-off.pen-tool.pencil.pencil-line.pencil-off.pencil-ruler.pentagon.percent.person-standing.philippine-peso.phone.phone-call.phone-forwarded.phone-incoming.phone-missed.phone-off.phone-outgoing.pi.piano.pickaxe.picture-in-picture.picture-in-picture-2.piggy-bank.pilcrow.pilcrow-left.pilcrow-right.pill.pill-bottle.pin.pin-off.pipette.pizza.plane.plane-landing.plane-takeoff.play.plug.plug-2.plug-zap.plus.pocket-knife.podcast.pointer.pointer-off.popcorn.popsicle.pound-sterling.power.power-off.presentation.printer.printer-check.printer-x.projector.proportions.puzzle.pyramid.qr-code.quote.rabbit.radar.radiation.radical.radio.radio-receiver.radio-tower.radius.rainbow.rat.ratio.receipt.receipt-cent.receipt-euro.receipt-indian-rupee.receipt-japanese-yen.receipt-pound-sterling.receipt-russian-ruble.receipt-swiss-franc.receipt-text.receipt-turkish-lira.rectangle-circle.rectangle-ellipsis.rectangle-goggles.rectangle-horizontal.rectangle-vertical.recycle.redo.redo-2.redo-dot.refresh-ccw.refresh-ccw-dot.refresh-cw.refresh-cw-off.refrigerator.regex.remove-formatting.repeat.repeat-1.repeat-2.replace.replace-all.reply.reply-all.rewind.ribbon.rocket.rocking-chair.roller-coaster.rose.rotate-3d.rotate-ccw.rotate-ccw-key.rotate-ccw-square.rotate-cw.rotate-cw-square.route.route-off.router.rows-2.rows-3.rows-4.rss.ruler.ruler-dimension-line.russian-ruble.sailboat.salad.sandwich.satellite.satellite-dish.saudi-riyal.save.save-all.save-off.scale.scale-3d.scaling.scan.scan-barcode.scan-eye.scan-face.scan-heart.scan-line.scan-qr-code.scan-search.scan-text.school.scissors.scissors-line-dashed.scooter.screen-share.screen-share-off.scroll.scroll-text.search.search-alert.search-check.search-code.search-slash.search-x.section.send.send-horizontal.send-to-back.separator-horizontal.separator-vertical.server.server-cog.server-crash.server-off.settings.settings-2.shapes.share.share-2.sheet.shell.shelving-unit.shield.shield-alert.shield-ban.shield-check.shield-ellipsis.shield-half.shield-minus.shield-off.shield-plus.shield-question-mark.shield-user.shield-x.ship.ship-wheel.shirt.shopping-bag.shopping-basket.shopping-cart.shovel.shower-head.shredder.shrimp.shrink.shrub.shuffle.sigma.signal.signal-high.signal-low.signal-medium.signal-zero.signature.signpost.signpost-big.siren.skip-back.skip-forward.skull.slash.slice.sliders-horizontal.sliders-vertical.smartphone.smartphone-charging.smartphone-nfc.smile.smile-plus.snail.snowflake.soap-dispenser-droplet.sofa.solar-panel.soup.space.spade.sparkle.sparkles.speaker.speech.spell-check.spell-check-2.spline.spline-pointer.split.spool.spotlight.spray-can.sprout.square.square-activity.square-arrow-down.square-arrow-down-left.square-arrow-down-right.square-arrow-left.square-arrow-out-down-left.square-arrow-out-down-right.square-arrow-out-up-left.square-arrow-out-up-right.square-arrow-right.square-arrow-right-enter.square-arrow-right-exit.square-arrow-up.square-arrow-up-left.square-arrow-up-right.square-asterisk.square-bottom-dashed-scissors.square-centerline-dashed-horizontal.square-centerline-dashed-vertical.square-chart-gantt.square-check.square-check-big.square-chevron-down.square-chevron-left.square-chevron-right.square-chevron-up.square-code.square-dashed.square-dashed-bottom.square-dashed-bottom-code.square-dashed-kanban.square-dashed-mouse-pointer.square-dashed-top-solid.square-divide.square-dot.square-equal.square-function.square-kanban.square-library.square-m.square-menu.square-minus.square-mouse-pointer.square-parking.square-parking-off.square-pause.square-pen.square-percent.square-pi.square-pilcrow.square-play.square-plus.square-power.square-radical.square-round-corner.square-scissors.square-sigma.square-slash.square-split-horizontal.square-split-vertical.square-square.square-stack.square-star.square-stop.square-terminal.square-user.square-user-round.square-x.squares-exclude.squares-intersect.squares-subtract.squares-unite.squircle.squircle-dashed.squirrel.stamp.star.star-half.star-off.step-back.step-forward.stethoscope.sticker.sticky-note.stone.store.stretch-horizontal.stretch-vertical.strikethrough.subscript.sun.sun-dim.sun-medium.sun-moon.sun-snow.sunrise.sunset.superscript.swatch-book.swiss-franc.switch-camera.sword.swords.syringe.table.table-2.table-cells-merge.table-cells-split.table-columns-split.table-of-contents.table-properties.table-rows-split.tablet.tablet-smartphone.tablets.tag.tags.tally-1.tally-2.tally-3.tally-4.tally-5.tangent.target.telescope.tent.tent-tree.terminal.test-tube.test-tube-diagonal.test-tubes.text-align-center.text-align-end.text-align-justify.text-align-start.text-cursor.text-cursor-input.text-initial.text-quote.text-search.text-select.text-wrap.theater.thermometer.thermometer-snowflake.thermometer-sun.thumbs-down.thumbs-up.ticket.ticket-check.ticket-minus.ticket-percent.ticket-plus.ticket-slash.ticket-x.tickets.tickets-plane.timer.timer-off.timer-reset.toggle-left.toggle-right.toilet.tool-case.toolbox.tornado.torus.touchpad.touchpad-off.towel-rack.tower-control.toy-brick.tractor.traffic-cone.train-front.train-front-tunnel.train-track.tram-front.transgender.trash.trash-2.tree-deciduous.tree-palm.tree-pine.trees.trending-down.trending-up.trending-up-down.triangle.triangle-alert.triangle-dashed.triangle-right.trophy.truck.truck-electric.turkish-lira.turntable.turtle.tv.tv-minimal.tv-minimal-play.type.type-outline.umbrella.umbrella-off.underline.undo.undo-2.undo-dot.unfold-horizontal.unfold-vertical.ungroup.university.unlink.unlink-2.unplug.upload.usb.user.user-check.user-cog.user-key.user-lock.user-minus.user-pen.user-plus.user-round.user-round-check.user-round-cog.user-round-key.user-round-minus.user-round-pen.user-round-plus.user-round-search.user-round-x.user-search.user-star.user-x.users.users-round.utensils.utensils-crossed.utility-pole.van.variable.vault.vector-square.vegan.venetian-mask.venus.venus-and-mars.vibrate.vibrate-off.video.video-off.videotape.view.voicemail.volleyball.volume.volume-1.volume-2.volume-off.volume-x.vote.wallet.wallet-cards.wallet-minimal.wallpaper.wand.wand-sparkles.warehouse.washing-machine.watch.waves.waves-arrow-down.waves-arrow-up.waves-ladder.waypoints.webcam.webhook.webhook-off.weight.weight-tilde.wheat.wheat-off.whole-word.wifi.wifi-cog.wifi-high.wifi-low.wifi-off.wifi-pen.wifi-sync.wifi-zero.wind.wind-arrow-down.wine.wine-off.workflow.worm.wrench.x.x-line-top.zap.zap-off.zodiac-aquarius.zodiac-aries.zodiac-cancer.zodiac-capricorn.zodiac-gemini.zodiac-leo.zodiac-libra.zodiac-ophiuchus.zodiac-pisces.zodiac-sagittarius.zodiac-scorpio.zodiac-taurus.zodiac-virgo.zoom-in.zoom-out`.split(`.`),k$=[[[37,10],[`letter`,`font size`,`text`,`formatting`,`smaller`]],[[37,10],[`letter`,`font size`,`text`,`formatting`,`larger`,`bigger`]],[[37,10],[`letter`,`font size`,`text`,`formatting`]],[[0,22],[`disability`,`disabled`,`dda`,`wheelchair`]],[[22,1,34,29,23],`pulse.action.motion.movement.exercise.fitness.healthcare.heart rate monitor.vital signs.vitals.emergency room.er.intensive care.hospital.defibrillator.earthquake.siesmic.magnitude.richter scale.aftershock.tremor.shockwave.audio.waveform.synthesizer.synthesiser.music`.split(`.`)],[[18],[`air conditioner`,`ac`,`central air`,`cooling`,`climate-control`]],[[23,8,12,4],[`stream`,`cast`,`mirroring`,`screen`,`monitor`,`macos`,`osx`]],[[12,26,38],[`morning`]],[[12,26,38],[`done`,`todo`,`tick`,`complete`,`task`]],[[12,26,38],[`remove`]],[[12,26,38],[`morning`,`turn-off`]],[[12,26,38],[`add`]],[[18,12,41],[`fire`,`alert`,`warning`,`detector`,`carbon monoxide`,`safety`,`equipment`,`amenities`]],[[28,23],[`photo`,`book`]],[[19],[`items`,`flex`,`justify`]],[[19],[`items`,`flex`,`justify`]],[[19],[`items`,`bottom`,`flex`,`justify`]],[[19],[`items`,`right`,`flex`,`justify`]],[[19],[`items`,`flex`,`justify`,`space`,`evenly`,`around`]],[[19],[`right`,`items`,`flex`,`justify`]],[[19],[`left`,`items`,`flex`,`justify`]],[[19],[`center`,`items`,`flex`,`justify`]],[[19],[`right`,`items`,`flex`,`justify`]],[[19],[`left`,`items`,`flex`,`justify`]],[[19],[`center`,`items`,`flex`,`justify`,`distribute`,`between`]],[[19],[`around`,`items`,`bottom`,`flex`,`justify`]],[[19],[`top`,`items`,`flex`,`justify`]],[[19],[`left`,`items`,`flex`,`justify`]],[[19],[`items`,`flex`,`justify`,`space`,`evenly`,`around`]],[[19],[`bottom`,`items`,`flex`,`justify`]],[[19],[`top`,`items`,`flex`,`justify`]],[[19],[`center`,`items`,`flex`,`justify`,`distribute`,`between`]],[[19],[`bottom`,`items`,`flex`,`justify`,`distribute`,`between`]],[[19],[`top`,`items`,`flex`,`justify`,`distribute`,`between`]],[[19],[`center`,`items`,`flex`,`justify`,`distribute`,`between`]],[[19],[`center`,`items`,`flex`,`justify`,`distribute`,`between`]],[[22,40],[`ambulance`,`emergency`,`medical`,`vehicle`,`siren`,`healthcare`,`transportation`,`rescue`,`urgent`,`first aid`]],[[37,11],[`and`,`typography`,`operator`,`join`,`concatenate`,`code`,`&`]],[[37,11],[`and`,`operator`,`then`,`code`,`&&`]],[[16,17],[`pottery`,`artifact`,`artefact`,`vase`,`ceramics`,`clay`,`archaeology`,`museum`,`wine`,`oil`]],[[40,37],[`ship`]],[[13],[`emoji`,`anger`,`face`,`emotion`]],[[13],[`emoji`,`nuisance`,`face`,`emotion`]],[[12,23,7],[`signal`,`connection`,`connectivity`,`tv`,`television`,`broadcast`,`live`,`frequency`,`tune`,`scan`,`channels`,`aerial`,`receiver`,`transmission`,`transducer`,`terrestrial`,`satellite`,`cable`]],[[5,39,17],[`metal`,`iron`,`alloy`,`materials`,`heavy`,`weight`,`blacksmith`,`forge`,`acme`]],[[28],[`camera`,`photo`,`pictures`,`shutter`,`exposure`]],[[19,10,11,14],[`application`,`menu bar`,`pane`,`executable`]],[[19,10,11,14],[`application`,`menu bar`,`pane`,`preferences`,`macos`,`osx`,`executable`]],[[16],[`fruit`,`food`,`healthy`,`snack`,`nutrition`,`fresh`,`produce`,`grocery`,`organic`,`harvest`,`vitamin`,`red`,`green`,`juicy`,`sweet`,`tart`,`bite`,`orchard`,`plant`,`core`,`raw`,`diet`]],[[14,20],[`index`,`backup`,`box`,`storage`,`records`]],[[14,20],[`unarchive`,`index`,`backup`,`box`,`storage`,`records`]],[[14,20],[`index`,`backup`,`box`,`storage`,`records`,`junk`]],[[18],[`sofa`,`furniture`,`leisure`,`lounge`,`loveseat`,`couch`]],[[3,17],[`backwards`,`reverse`,`direction`,`south`]],[[3,17,14],[`backwards`,`reverse`,`slow`,`direction`,`south`,`download`]],[[3,17],[`previous`,`back`,`direction`,`west`,`indicate turn`]],[[3,17],[`previous`,`back`,`direction`,`west`,`turn`,`corner`]],[[3,17],[`next`,`forward`,`direction`,`east`,`indicate turn`]],[[3,17],[`next`,`forward`,`direction`,`east`,`turn`,`corner`]],[[3,37,11,17],[`shift`,`keyboard`,`button`,`mac`,`capitalize`,`capitalise`,`forward`,`direction`,`north`]],[[3,37,11,17],[`caps lock`,`capitals`,`keyboard`,`button`,`mac`,`forward`,`direction`,`north`,`faster`,`speed`,`boost`]],[[3],[`backwards`,`reverse`,`direction`,`south`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`numerical`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`numerical`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`alphabetical`]],[[3,14],[`backwards`,`reverse`,`direction`,`south`,`download`,`expand`,`fold`,`vertical`]],[[3],[`direction`,`south-west`,`diagonal`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[3],[`direction`,`south-east`,`diagonal`]],[[3],[`direction`,`south`,`waypoint`,`location`,`step`,`into`]],[[3,14,11],[`behind`,`direction`,`south`,`download`,`save`,`git`,`version control`,`pull`,`collapse`,`fold`,`vertical`]],[[3],[`bidirectional`,`two-way`,`2-way`,`swap`,`switch`,`network`,`traffic`,`flow`,`mobile data`,`internet`,`sort`,`reorder`,`move`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`alphabetical`,`reverse`]],[[3],[`previous`,`back`,`direction`,`west`,`<-`]],[[3],[`previous`,`back`,`direction`,`west`,`expand`,`fold`,`horizontal`,`<-|`]],[[3],[`bidirectional`,`two-way`,`2-way`,`swap`,`switch`,`transaction`,`reorder`,`move`,`<-`,`->`]],[[3],[`previous`,`back`,`direction`,`west`,`collapse`,`fold`,`horizontal`,`|<-`]],[[3],[`forward`,`next`,`direction`,`east`,`->`]],[[3],[`next`,`forward`,`direction`,`east`,`export`,`expand`,`fold`,`horizontal`,`|->`]],[[3],[`bidirectional`,`two-way`,`2-way`,`swap`,`switch`,`transaction`,`reorder`,`move`,`<-`,`->`]],[[3,11],[`next`,`forward`,`direction`,`east`,`tab`,`keyboard`,`mac`,`indent`,`collapse`,`fold`,`horizontal`,`->|`]],[[3],[`forward`,`direction`,`north`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`numerical`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`numerical`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`alphabetical`]],[[3],[`bidirectional`,`two-way`,`2-way`,`swap`,`switch`,`network`,`mobile data`,`internet`,`sort`,`reorder`,`move`]],[[3],[`direction`,`north`,`step`,`out`]],[[3,14,11],[`forward`,`direction`,`north`,`upload`,`git`,`version control`,`push`,`expand`,`fold`,`vertical`]],[[3],[`direction`,`north-west`,`diagonal`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[3],[`direction`,`north-east`,`diagonal`]],[[3,14],[`forward`,`direction`,`north`,`upload`,`collapse`,`fold`,`vertical`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[37,19,3],[`filter`,`sort`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`,`alphabetical`,`reverse`]],[[3,40,20],[`direction`,`orientation`,`this way up`,`vertical`,`package`,`box`,`fragile`,`postage`,`shipping`]],[[37,21,11],[`reference`,`times`,`multiply`,`multiplication`,`operator`,`code`,`glob pattern`,`wildcard`,`*`]],[[37,1],[`mention`,`at`,`email`,`message`,`@`]],[[29],[`atomic`,`nuclear`,`physics`,`particle`,`element`,`molecule`,`electricity`,`energy`,`chemistry`]],[[23,7],[`graphic equaliser`,`sound`,`noise`,`listen`,`hearing`,`hertz`,`frequency`,`wavelength`,`vibrate`,`sine`,`synthesizer`,`synthesiser`,`levels`,`track`,`music`,`playback`,`radio`,`broadcast`,`airwaves`,`voice`,`vocals`,`singer`,`song`]],[[23,7],[`sound`,`noise`,`listen`,`hearing`,`hertz`,`frequency`,`wavelength`,`vibrate`,`sine`,`synthesizer`,`synthesiser`,`levels`,`track`,`music`,`playback`,`radio`,`broadcast`,`airwaves`,`voice`,`vocals`,`singer`,`song`]],[[1,35,17],[`achievement`,`badge`,`rosette`,`prize`,`winner`]],[[39,17],[`hatchet`,`weapon`,`chop`,`sharp`,`equipment`,`fireman`,`firefighter`,`brigade`,`lumberjack`,`woodcutter`,`logger`,`forestry`]],[[10],[`gizmo`,`coordinates`]],[[0,27],[`child`,`childproof`,`children`]],[[17,28,41],[`bag`,`hiking`,`travel`,`camping`,`school`,`childhood`]],[[1,34,32],[`check`,`verified`,`unverified`]],[[1,34],[`check`,`verified`,`unverified`,`security`,`safety`,`issue`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`cents`,`dollar`,`usd`,`$`,`¢`]],[[34],[`verified`,`check`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`usd`,`$`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`€`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`inr`,`₹`]],[[1,0,34],[`verified`,`unverified`,`help`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`jpy`,`¥`]],[[34],[`verified`,`unverified`,`delete`,`remove`,`erase`]],[[34,15,33,21],[`verified`,`unverified`,`sale`,`discount`,`offer`,`marketing`,`sticker`,`price tag`]],[[34],[`verified`,`unverified`,`add`,`create`,`new`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`british`,`gbp`,`£`]],[[0,34,32],[`verified`,`unverified`,`help`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`rub`,`₽`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`chf`,`₣`]],[[33,15],[`discount`,`offer`,`sale`,`voucher`,`tag`,`monetization`,`marketing`,`finance`,`financial`,`exchange`,`transaction`,`payment`,`try`,`₺`]],[[34],[`verified`,`unverified`,`lost`,`delete`,`remove`]],[[40,41],[`baggage`,`luggage`,`travel`,`cart`,`trolley`,`suitcase`]],[[13],[`party`,`festival`,`congratulations`,`celebration`,`decoration`,`colorful`,`floating`,`fun`,`birthday`,`event`,`entertainment`]],[[1],[`cancel`,`no`,`stop`,`forbidden`,`prohibited`,`error`,`incorrect`,`mistake`,`wrong`,`failure`,`circle`,`slash`,`null`,`void`]],[[16],[`fruit`,`food`]],[[22],[`plaster`,`band-aid`,`first aid`,`medical`,`health`,`wound`,`injury`,`care`,`treatment`,`healing`,`protection`,`emergency`,`aid`,`safety`,`patch`]],[[15],[`currency`,`money`,`payment`]],[[15],[`bill`,`currency`,`money`,`payment`,`funds`,`transaction`,`cash`,`finance`,`withdraw`,`expense`,`out`,`payout`,`refund`,`debit`,`spending`,`decrease`]],[[15],[`bill`,`currency`,`money`,`payment`,`funds`,`transaction`,`cash`,`finance`,`deposit`,`earnings`,`income`,`in`,`credit`,`prepaid`,`growth`,`increase`]],[[15],[`bill`,`currency`,`money`,`payment`,`funds`,`transaction`,`cash`,`finance`,`error`,`failed`,`rejected`,`canceled`,`declined`,`lost`,`delete`,`remove`]],[[33],[`scan`,`checkout`,`till`,`cart`,`transaction`,`purchase`,`buy`,`product`,`packaging`,`retail`,`consumer`]],[[16,25],[`keg`,`drum`,`tank`,`wine`,`beer`,`oak`,`wood`,`firkin`,`hogshead`,`kilderkin`,`barrique`,`solera`,`aging`,`whiskey`,`brewery`,`distillery`,`winery`,`vineyard`]],[[37],[`text`,`format`,`color`]],[[41],[`amenities`,`services`,`bathroom`,`shower`]],[[8,12],[`power`,`electricity`,`energy`,`accumulator`,`charge`]],[[8,12],[`power`,`electricity`,`energy`,`accumulator`,`charge`]],[[8,12],[`power`,`electricity`,`energy`,`accumulator`,`charge`]],[[8,12],[`power`,`electricity`,`energy`,`accumulator`,`charge`]],[[8,12],[`power`,`electricity`,`energy`,`accumulator`,`charge`]],[[12],[`power`,`electricity`,`energy`,`accumulator`,`charge`,`plus`,`economy`,`health`,`add`,`new`,`maximum`,`upgrade`,`extra`,`+`]],[[8,12],[`power`,`electricity`,`energy`,`accumulator`,`charge`,`exclamation mark`]],[[29,17],[`cup`,`lab`,`chemistry`,`experiment`,`test`]],[[16],[`legume`,`soy`,`food`,`seed`]],[[16],[`soy free`,`legume`,`soy`,`food`,`seed`,`allergy`,`intolerance`,`diet`]],[[18],[`sleep`,`hotel`,`furniture`]],[[18],[`sleep`,`hotel`,`furniture`]],[[18],[`sleep`,`hotel`,`furniture`]],[[16],[`food`,`dish`,`restaurant`,`course`,`meal`,`meat`,`bbq`,`steak`]],[[16],[`alcohol`,`bar`,`beverage`,`brewery`,`drink`]],[[16],[`alcohol`,`bar`,`beverage`,`brewery`,`drink`]],[[1,26],[`alarm`,`notification`,`sound`,`reminder`]],[[1,26],[`alarm`,`notification`,`sound`,`reminder`,`unread`]],[[12,26,18],[`fire alarm`,`flames`,`smoke`,`firefighter`,`fireman`,`department`,`brigade`,`station`,`emergency`,`alert`,`safety`,`school bell`,`period break`,`recess`,`doorbell`,`entrance`,`entry`,`ring`,`reception`]],[[26],[`alarm`,`notification`,`silent`,`reminder`,`delete`,`remove`,`erase`]],[[26],[`alarm`,`notification`,`silent`,`reminder`]],[[26],[`notification`,`silent`,`reminder`,`add`,`create`,`new`]],[[26],[`alarm`,`notification`,`sound`,`reminder`]],[[19,10,39],[`insert`,`add`,`left`,`slot`,`squeeze`,`space`,`vertical`,`grid`,`table`,`rows`,`cells`,`excel`,`spreadsheet`,`accountancy`,`data`,`enter`,`entry`,`entries`,`blocks`,`rectangles`,`chevron`]],[[19,10,39],[`insert`,`add`,`right`,`slot`,`squeeze`,`space`,`vertical`,`grid`,`table`,`rows`,`cells`,`excel`,`spreadsheet`,`accountancy`,`data`,`enter`,`entry`,`entries`,`blocks`,`rectangles`,`chevron`]],[[19,10,39],[`insert`,`add`,`top`,`slot`,`squeeze`,`space`,`vertical`,`grid`,`table`,`columns`,`cells`,`data`,`enter`,`entry`,`entries`,`blocks`,`rectangles`,`chevron`]],[[19,10,39],[`insert`,`add`,`bottom`,`slot`,`squeeze`,`space`,`vertical`,`grid`,`table`,`columns`,`cells`,`data`,`enter`,`entry`,`entries`,`blocks`,`rectangles`,`chevron`]],[[13],[`arm`,`muscle`,`strong`,`working out`,`athletic`,`toned`,`muscular`,`forelimb`,`curled`]],[[40],[`bicycle`,`transport`,`trip`]],[[37,11],[`code`,`digits`,`computer`,`zero`,`one`,`boolean`]],[[25,24,28,29,41,11],[`field glasses`,`lorgnette`,`pince-nez`,`observation`,`sightseeing`,`nature`,`wildlife`,`birdwatching`,`scouting`,`surveillance`,`search`,`discovery`,`monitoring`,`lookout`,`viewpoint`,`travel`,`tourism`,`research`]],[[29],[`fallout`,`waste`,`biology`,`chemistry`,`chemical`,`element`]],[[2],[`peace`,`freedom`,`wing`,`avian`,`tweet`]],[[24,2,25,18],[`birdhouse`,`bird`,`garden`,`home`,`house`,`woodwork`]],[[4,11,15],[`currency`,`money`,`payment`]],[[10,28,39,11],[`mode`,`overlay`,`multiply`,`screen`,`opacity`,`transparency`,`alpha`,`filters`,`lenses`,`mixed`,`shades`,`tints`,`hues`,`saturation`,`brightness`,`overlap`,`colors`,`colours`]],[[18],[`shades`,`screen`,`curtain`,`shutter`,`roller blind`,`window`,`lighting`,`household`,`home`]],[[11,19,32],[`addon`,`plugin`,`integration`,`extension`,`package`,`build`,`stack`,`toys`,`kids`,`children`,`learning`,`squares`,`corner`]],[[8,12],[`wireless`]],[[8,12],[`paired`]],[[8,12],[`lost`]],[[8,12],[`pairing`]],[[37],[`text`,`strong`,`format`]],[[39,18],[`nut`,`screw`,`settings`,`preferences`,`configuration`,`controls`,`edit`,`diy`,`fixed`,`build`,`construction`,`parts`]],[[31,39],[`fatal`,`error`,`crash`,`blockbuster`,`mine`,`explosion`,`explode`,`explosive`]],[[2,22,17],[`health`,`skeleton`,`skull`,`death`,`pets`,`dog`]],[[37,11,17],`reading.paperback.booklet.magazine.leaflet.pamphlet.tome.library.writing.written.writer.author.story.script.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.documentation`.split(`.`)],[[37,17],`dictionary.define.definition.thesaurus.encyclopedia.encyclopaedia.reading.booklet.magazine.leaflet.pamphlet.tome.library.writing.written.writer.author.story.script.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.language.translate.alphabetical.a-z.ordered`.split(`.`)],[[37,11,17],`reading.paperback.booklet.magazine.leaflet.pamphlet.tome.library.writing.written.writer.author.story.script.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.documentation.warning.alert.danger.exclamation mark`.split(`.`)],[[23,37],[`audiobook`,`reading`,`listening`,`sound`,`story`,`fiction`,`novel`,`information`,`knowledge`,`education`,`student`,`study`,`learning`,`research`]],[[37,11,17],`read.booklet.magazine.leaflet.pamphlet.library.written.authored.published.informed.knowledgeable.educated.schooled.homework.examined.tested.marked.passed.graduated.studied.learned.lesson.researched.documented.revealed.blank.plain language.true.truth.verified.corrected.task.todo.done.completed.finished.ticked`.split(`.`)],[[11,37,17],`code.coding.version control.git.repository.clone.fork.duplicate.multiple.books.library.copies.copied.plagiarism.plagiarised.plagiarized.reading list.information.informed.knowledge.knowledgeable.knowledgable.education.high school.university.college.academy.student.study.learning.research.smart.intelligent.intellectual`.split(`.`)],[[11],[`code`,`coding`,`version control`,`git`,`repository`,`template`,`draft`,`script`,`screenplay`,`writing`,`writer`,`author`,`unwritten`,`unpublished`,`untold`]],[[11],[`code`,`coding`,`version control`,`git`,`repository`,`pull`]],[[23,37],[`audiobook`,`reading`,`listening`,`sound`,`story`,`fiction`,`novel`,`information`,`knowledge`,`education`,`student`,`study`,`learning`,`research`]],[[34,37,17],`diary.romance.novel.journal.entry.entries.personal.private.secret.crush.like.love.emotion.feminine.girls.teens.teenager.therapy.theraputic.therapist.planner.organizer.organiser.notes.notepad.stationery.sketchbook.writing.written.reading.favorite.favourite.high school`.split(`.`)],[[28,37,23,14,34,33,41],[`images`,`pictures`,`photos`,`album`,`collection`,`event`,`magazine`,`catalog`,`catalogue`,`brochure`,`browse`,`gallery`]],[[11,31,17],[`code`,`coding`,`version control`,`git`,`repository`,`private`,`public`,`secret`,`unlocked`,`hidden`,`revealed`,`knowledge`,`learning`]],[[11,31,17],[`code`,`coding`,`version control`,`git`,`repository`,`private`,`secret`,`hidden`,`knowledge`]],[[37,11,17],`dictionary.reading.booklet.magazine.leaflet.pamphlet.tome.library.writing.written.writer.author.story.script.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.documentation.saved.later.future.reference.index.code.coding.version control.git.repository`.split(`.`)],[[11,37,17],[`code`,`coding`,`version control`,`git`,`repository`,`remove`,`delete`,`censor`,`cancel`,`forbid`,`prohibit`,`ban`,`uneducated`,`re-educate`,`unlearn`,`downgrade`]],[[37,11,17],`reading.pages.booklet.magazine.leaflet.pamphlet.library.writing.written.writer.author.story.script.screenplay.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.documentation.revealed.blank.plain`.split(`.`)],[[37,11,17],`read.pages.booklet.magazine.leaflet.pamphlet.library.written.authored.published.informed.knowledgeable.educated.schooled.homework.examined.tested.marked.passed.graduated.studied.learned.lesson.researched.documented.revealed.blank.plain language.true.truth.verified.corrected.task.todo.done.completed.finished.ticked`.split(`.`)],[[37,11],`reading.pages.booklet.magazine.leaflet.pamphlet.library.writing.written.writer.author.story.script.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.documentation.revealed`.split(`.`)],[[11,37,17],[`code`,`coding`,`version control`,`git`,`repository`,`remove`,`delete`,`read`,`write`,`author`,`publish`,`inform`,`graduate`,`re-educate`,`study`,`learn`,`research`,`knowledge`,`improve`,`upgrade`,`level up`]],[[37,11,17],[`reading`,`library`,`study`,`education`,`research`,`knowledge`,`discover`,`browsing`,`lookup`,`finding`,`scanning`]],[[37,17],`reading.booklet.magazine.leaflet.pamphlet.tome.library.writing.written.writer.author.story.script.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.documentation`.split(`.`)],[[37,10,17],`thesaurus.synonym.reading.booklet.magazine.leaflet.pamphlet.tome.library.writing.written.writer.author.story.script.fiction.novel.information.knowledge.education.high school.university.college.academy.student.study.learning.homework.research.language.translate.typography.fonts.collection`.split(`.`)],[[11],[`code`,`coding`,`version control`,`git`,`repository`,`push`]],[[11],[`code`,`coding`,`version control`,`git`,`repository`,`push`,`force`]],[[1,8,7,34],[`person`,`people`,`family`,`friends`,`acquaintances`,`contacts`,`details`,`addresses`,`phone numbers`,`directory`,`listing`,`networking`]],[[37,17],[`code`,`coding`,`version control`,`git`,`repository`,`remove`,`delete`,`reading`,`misinformation`,`disinformation`,`misinformed`,`charlatan`,`sophistry`,`false`,`lies`,`untruth`,`propaganda`,`censored`,`cancelled`,`forbidden`,`prohibited`,`banned`,`uneducated`,`re-education`,`unlearn`]],[[1],[`save`,`favorite`,`mark`,`label`,`attachment`,`file`,`stick`,`pin`,`read`,`clip`,`marker`,`tag`]],[[1],[`read`,`finished`,`complete`,`clip`,`marker`,`tag`,`task`,`todo`]],[[1],[`delete`,`remove`]],[[1],[`add`]],[[1],[`read`,`clip`,`marker`,`tag`,`cancel`,`close`,`delete`,`remove`,`clear`]],[[12,23,34],[`radio`,`speakers`,`audio`,`music`,`sound`,`broadcast`,`live`,`frequency`]],[[11,34],[`robot`,`ai`,`chat`,`assistant`]],[[11,34],[`robot`,`ai`,`chat`,`assistant`]],[[11,34],[`robot`,`ai`,`chat`,`assistant`]],[[16],[`alcohol`,`drink`,`glass`,`goblet`,`chalice`,`vineyard`,`winery`,`red`,`white`,`rose`,`dry`,`sparkling`,`bar`,`party`,`nightclub`,`nightlife`,`sommelier`,`restaurant`,`dinner`,`meal`]],[[17,39],[`archer`,`archery`,`game`,`war`,`weapon`]],[[32,17,11,21],[`cube`,`package`,`container`,`storage`,`geometry`,`3d`,`isometric`]],[[32,17,11],[`cubes`,`packages`,`parts`,`group`,`units`,`collection`,`cluster`,`geometry`]],[[11,14],[`json`,`code`,`token`,`curly brackets`,`data`,`{`,`}`]],[[11,14],[`code`,`token`,`array`,`list`,`square`,`[`,`]`]],[[22,29],[`medical`,`mind`,`mental`,`intellect`,`cerebral`,`consciousness`,`genius`,`artificial intelligence`,`ai`,`think`,`thought`,`insight`,`intelligent`,`smart`]],[[29,11],[`mind`,`intellect`,`artificial intelligence`,`ai`,`deep learning`,`machine learning`,`computing`]],[[29,11],[`mind`,`intellect`,`artificial intelligence`,`ai`,`deep learning`,`machine learning`,`computing`]],[[5,18],[`bricks`,`mortar`,`cement`,`materials`,`construction`,`builder`,`labourer`,`quantity surveyor`,`blocks`,`stone`]],[[31,18,8],[`firewall`,`security`,`bricks`,`mortar`,`cement`,`materials`,`construction`,`builder`,`labourer`,`quantity surveyor`,`blocks`,`stone`,`campfire`,`camping`,`wilderness`,`outdoors`,`lit`,`warmth`,`wood`,`twigs`,`sticks`]],[[31,18,8],`firewall.security.bricks.mortar.cement.materials.construction.builder.labourer.quantity surveyor.blocks.stone.cybersecurity.secure.safety.protection.guardian.armored.armoured.defense.defence.defender.block.threat.prevention.antivirus.vigilance.vigilant.detection.scan.find.strength.strong.tough.invincible.invincibility.invulnerable.undamaged.audit.admin.verification.crest.bravery.knight.foot soldier.infantry.trooper.pawn.battle.war.military.army.cadet.scout`.split(`.`)],[[40],[`work`,`bag`,`baggage`,`folder`]],[[40],[`work`,`bag`,`baggage`,`folder`,`portfolio`]],[[41,40],[`baggage`,`luggage`,`travel`,`suitcase`,`conveyor`,`carousel`]],[[22,40],[`doctor`,`medicine`,`first aid`]],[[10,19],[`bring`,`send`,`move`,`over`,`forward`,`front`,`overlap`,`layer`,`order`]],[[37,10,39],[`clean`,`sweep`,`refactor`,`remove`,`draw`,`paint`,`color`,`artist`]],[[18,39,10],`cleaning.utensil.housekeeping.tool.sweeping.scrubbing.hygiene.maintenance.household.cleaner.chores.equipment.sanitation.bristles.handle.home care.sanitize.purify.wash.disinfect.sterilize.scrub.polish.decontaminate.wipe.spotless.remove.empty.erase.purge.eliminate`.split(`.`)],[[42],[`water`,`cleaning`,`soap`,`bath`,`hygiene`,`freshness`,`wash`,`foam`,`cleanliness`,`shampoo`,`purity`,`splash`,`lightness`,`airy`,`relaxation`,`spa`,`bubbly`,`fluid`,`floating`,`drop`]],[[11,2],[`issue`,`error`,`defect`,`testing`,`troubleshoot`,`problem`,`report`,`debug`,`code`,`insect`,`beetle`]],[[11,2],[`issue`,`fixed`,`resolved`,`testing`,`debug`,`code`,`insect`,`kill`,`exterminate`,`pest control`]],[[11,2],[`issue`,`testing`,`debug`,`reproduce`,`code`,`insect`]],[[1,5],[`organisation`,`organization`]],[[1,5],[`business`,`company`,`enterprise`,`skyscraper`,`organisation`,`organization`,`city`]],[[40],[`bus`,`vehicle`,`transport`,`trip`]],[[40],[`coach`,`vehicle`,`trip`,`road`]],[[8,12,23],`cord.wire.connector.connection.link.signal.console.computer.equipment.electricity.energy.electronics.recharging.charger.power.supply.disconnected.unplugged.plugs.interface.input.output.audio video.av.rca.scart.tv.television.optical`.split(`.`)],[[40,41],[`ski lift`,`winter holiday`,`alpine`,`resort`,`mountains`]],[[16,34,1],[`birthday`,`birthdate`,`celebration`,`party`,`surprise`,`gateaux`,`dessert`,`fondant`,`icing sugar`,`sweet`,`baking`]],[[16,34],[`birthday`,`birthdate`,`celebration`,`party`,`surprise`,`gateaux`,`dessert`,`candles`,`wish`,`fondant`,`icing sugar`,`sweet`,`baking`]],[[21,12],[`count`,`calculating machine`]],[[38],[`date`,`month`,`year`,`event`,`birthday`,`birthdate`]],[[38],[`date`,`month`,`year`,`event`,`single`,`singular`,`once`,`1`,`first`]],[[38],[`date`,`month`,`year`,`event`,`sort`,`order`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[38],[`date`,`month`,`year`,`event`,`sort`,`order`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[38],[`date`,`day`,`month`,`year`,`event`,`confirm`,`subscribe`,`schedule`,`done`,`todo`,`tick`,`complete`,`task`]],[[38],[`date`,`day`,`month`,`year`,`event`,`confirm`,`subscribe`,`schedule`,`done`,`todo`,`tick`,`complete`,`task`]],[[38],[`date`,`day`,`month`,`year`,`event`,`clock`,`hour`]],[[38],[`date`,`day`,`month`,`year`,`events`,`settings`,`gear`,`cog`]],[[38],[`date`,`month`,`year`,`event`]],[[38,14],[`date`,`month`,`year`,`event`,`birthday`,`birthdate`,`ics`]],[[38],[`date`,`month`,`year`,`event`,`heart`,`favourite`,`subscribe`,`valentines day`]],[[38],[`date`,`day`,`month`,`year`,`event`,`delete`,`remove`]],[[38],[`date`,`day`,`month`,`year`,`event`,`delete`,`remove`]],[[38],[`date`,`day`,`month`,`year`,`event`,`delete`,`remove`]],[[38],[`date`,`day`,`month`,`year`,`event`,`add`,`subscribe`,`create`,`new`]],[[38],[`date`,`day`,`month`,`year`,`event`,`add`,`subscribe`,`create`,`new`]],[[38],[`date`,`day`,`month`,`year`,`event`,`range`,`period`]],[[38],[`date`,`day`,`month`,`year`,`events`,`search`,`lens`]],[[3,38],[`repeat`,`refresh`,`reconnect`,`transfer`,`backup`,`date`,`month`,`year`,`event`,`subscribe`,`recurring`,`schedule`,`reminder`,`automatic`,`auto`]],[[38],[`date`,`day`,`month`,`year`,`event`,`remove`,`busy`]],[[38],[`date`,`day`,`month`,`year`,`event`,`remove`]],[[38],[`date`,`month`,`year`,`event`,`dates`,`months`,`years`,`events`]],[[28,12,7],[`photography`,`lens`,`focus`,`capture`,`shot`,`visual`,`image`,`device`,`equipment`,`photo`,`webcam`,`video`]],[[28,12,7],[`photo`,`webcam`,`video`]],[[16],[`sugar`,`food`,`sweet`]],[[16],[`sugar`,`food`,`sweet`,`christmas`,`xmas`]],[[16],[`sugar free`,`food`,`sweet`,`allergy`,`intolerance`,`diet`]],[[24],[`cannabis`,`weed`,`leaf`]],[[24],[`cannabis`,`weed`,`leaf`]],[[23],[`closed captions`,`subtitles`,`subhead`,`transcription`,`transcribe`,`dialogue`,`accessibility`]],[[23],[`closed captions`,`subtitles`,`subhead`,`transcription`,`transcribe`,`dialogue`,`accessibility`]],[[40],[`vehicle`,`drive`,`trip`,`journey`]],[[40],[`vehicle`,`drive`,`trip`,`journey`]],[[40],[`cab`,`vehicle`,`drive`,`trip`,`journey`]],[[40,41,24],[`trailer`,`tow`,`camping`,`campsite`,`mobile home`,`holiday`,`nomadic`,`wilderness`,`outdoors`]],[[8,7,23,12],[`cellphone`,`smartphone`,`mobile`,`network`,`cellular`,`service`,`provider`,`signal`,`coverage`,`disk`,`data`,`format`,`storage`,`flash`,`digital`,`contacts`,`phone book`,`contractual`,`circuit board`,`chip`]],[[16],[`vegetable`,`food`,`eat`]],[[37,11],[`text`,`letters`,`characters`,`font`,`typography`]],[[37],[`text`,`letters`,`characters`,`font`,`typography`]],[[37,11],[`text`,`letters`,`characters`,`font`,`typography`]],[[8,12,23,7,14],[`audio`,`music`,`recording`,`play`]],[[12,8],[`chromecast`,`airplay`,`screen`]],[[5,17,25],[`fortress`,`stronghold`,`palace`,`chateau`,`building`]],[[2],[`animal`,`pet`,`kitten`,`feline`]],[[31,12,7,8,28],[`camera`,`surveillance`,`recording`,`film`,`videotape`,`crime`,`watching`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`area`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`trending down`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`trending up`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`multivariate`,`categorical`,`comparison`]],[[6,15],[`trading`,`trader`,`financial`,`markets`,`portfolio`,`assets`,`prices`,`value`,`valuation`,`commodities`,`currencies`,`currency`,`stocks`,`exchange`,`hedge fund`,`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`trending down`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`trending up`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`multivariate`,`categorical`,`comparison`]],[[6],[`diagram`,`graph`,`timeline`,`planning`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`topology`,`cluster`,`web`,`nodes`,`connections`,`edges`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`trending down`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`trending up`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`trending up`]],[[6,38,11,10],[`projects`,`manage`,`overview`,`roadmap`,`plan`,`intentions`,`timeline`,`deadline`,`date`,`event`,`range`,`period`,`productivity`,`work`,`agile`,`code`,`coding`]],[[6,14],[`statistics`,`analytics`,`diagram`,`presentation`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`]],[[6],[`statistics`,`analytics`,`diagram`,`graph`,`curve`,`continuous`,`smooth`,`polynomial`,`quadratic`,`function`,`interpolation`]],[[26],[`done`,`todo`,`tick`,`complete`,`task`]],[[26],[`done`,`received`,`double`,`todo`,`tick`,`complete`,`task`]],[[26],[`done`,`todo`,`tick`,`complete`,`task`]],[[16],[`cooking`,`food`,`kitchen`,`restaurant`]],[[16],[`fruit`,`food`]],[[17,13],[`mitre`,`miter`,`piece`,`board game`,`religion`]],[[17,13],[`ruler`,`crown`,`piece`,`board game`,`stalemate`]],[[17,13],[`piece`,`horse`,`board game`]],[[17,13],[`piece`,`board game`]],[[17,13],[`ruler`,`crown`,`piece`,`board game`,`stalemate`]],[[17,13],[`castle`,`piece`,`board game`]],[[3,17],[`backwards`,`reverse`,`slow`,`dropdown`]],[[3,23],[`previous`,`music`]],[[3,23],[`skip`,`next`,`music`]],[[3],[`back`,`previous`,`less than`,`fewer`,`menu`,`<`]],[[3,21,11],[`forward`,`next`,`more than`,`greater`,`menu`,`code`,`coding`,`command line`,`terminal`,`prompt`,`shell`,`>`]],[[3,21,17],[`caret`,`keyboard`,`mac`,`control`,`ctrl`,`superscript`,`exponential`,`power`,`ahead`,`fast`,`^`,`dropdown`]],[[3,17],[`backwards`,`reverse`,`slower`]],[[3],[`collapse`,`fold`,`vertical`]],[[3,17],[`turn`,`corner`]],[[3],[`expand`,`horizontal`,`unfold`]],[[7,12,23,17],[`internet`,`network`,`connection`,`cable`,`lan`,`port`,`router`,`switch`,`hub`,`modem`,`web`,`online`,`networking`,`communication`,`socket`,`plug`,`slot`,`controller`,`connector`,`interface`,`console`,`signal`,`data`,`input`,`output`]],[[3,17],[`turn`,`corner`]],[[3],[`collapse`,`fold`,`horizontal`]],[[3,17],[`forward`,`ahead`,`faster`,`speed`,`boost`]],[[3],[`expand`,`unfold`,`vertical`]],[[5,25],[`temple`,`building`]],[[41,40,22],[`smoking`]],[[41,40,22],[`smoking`,`no-smoking`]],[[32],[`off`,`zero`,`record`,`shape`]],[[26],[`warning`,`alert`,`danger`,`exclamation mark`]],[[3,17],[`backwards`,`reverse`,`direction`,`south`,`sign`,`button`]],[[3,17],[`previous`,`back`,`direction`,`west`,`sign`,`turn`,`button`,`<-`]],[[3],[`outwards`,`direction`,`south-west`,`diagonal`]],[[3],[`outwards`,`direction`,`south-east`,`diagonal`]],[[3,11],[`outwards`,`direction`,`north-west`,`diagonal`,`keyboard`,`button`,`escape`]],[[3],[`outwards`,`direction`,`north-east`,`diagonal`]],[[3,17],[`next`,`forward`,`direction`,`east`,`sign`,`turn`,`button`,`->`]],[[3,17],[`forward`,`direction`,`north`,`sign`,`button`]],[[26],[`done`,`todo`,`tick`,`complete`,`task`]],[[26],[`done`,`todo`,`tick`,`complete`,`task`]],[[3],[`back`,`menu`]],[[3],[`back`,`previous`,`less than`,`fewer`,`menu`,`<`]],[[3],[`back`,`more than`,`greater`,`menu`,`>`]],[[3],[`caret`,`ahead`,`menu`,`^`]],[[11,32],[`pending`,`dot`,`progress`,`issue`,`draft`,`code`,`coding`,`version control`]],[[21],[`calculate`,`math`,`÷`,`/`]],[[15],[`monetization`,`marketing`,`currency`,`money`,`payment`]],[[11,32],[`pending`,`dot`,`progress`,`issue`,`code`,`coding`,`version control`,`choices`,`multiple choice`,`choose`]],[[11,32],[`pending`,`dot`,`progress`,`issue`,`draft`,`code`,`coding`,`version control`]],[[19,11],[`ellipsis`,`et cetera`,`etc`,`loader`,`loading`,`progress`,`pending`,`throbber`,`menu`,`options`,`operator`,`code`,`spread`,`rest`,`more`,`further`,`extra`,`overflow`,`dots`,`…`,`...`]],[[21],[`calculate`,`shape`,`=`]],[[3,11],[`north`,`up`,`upgrade`,`improve`,`circle`,`button`]],[[7,34],[`stories`,`social media`,`instagram`,`facebook`,`meta`,`snapchat`,`sharing`,`content`]],[[40,35,29],[`dashboard`,`dial`,`meter`,`speed`,`pressure`,`measure`,`level`]],[[21],[`subtract`,`remove`,`decrease`,`reduce`,`calculate`,`line`,`operator`,`code`,`coding`,`minimum`,`downgrade`,`-`]],[[32],[`diameter`,`zero`,`ø`,`nothing`,`null`,`void`,`cancel`,`ban`,`no`,`stop`,`forbidden`,`prohibited`,`error`,`incorrect`,`mistake`,`wrong`,`failure`]],[[40,25],[`parking lot`,`car park`]],[[40,25],[`parking lot`,`car park`,`no parking`]],[[23],[`music`,`audio`,`stop`]],[[34,15,33,21],[`verified`,`unverified`,`sale`,`discount`,`offer`,`marketing`,`sticker`,`price tag`]],[[32],[`off`,`zero`,`record`,`shape`,`circle-pile`,`circle`,`pile`,`stack`,`layer`,`structure`,`form`,`group`,`collection`,`stock`,`inventory`,`materials`,`warehouse`]],[[23],[`music`,`start`,`run`]],[[21,11,9,17],[`add`,`new`,`increase`,`increment`,`positive`,`calculate`,`crosshair`,`aim`,`target`,`scope`,`sight`,`reticule`,`maximum`,`upgrade`,`extra`,`operator`,`join`,`concatenate`,`code`,`coding`,`+`]],[[15],[`monetization`,`coin`,`penny`,`marketing`,`currency`,`money`,`payment`,`british`,`gbp`,`£`]],[[8],[`on`,`off`,`device`,`switch`,`toggle`,`binary`,`boolean`,`reboot`,`restart`,`button`,`keyboard`,`troubleshoot`]],[[0,37,26],[`question mark`]],[[11,21],[`diameter`,`zero`,`ø`,`nothing`,`null`,`void`,`cancel`,`ban`,`no`,`stop`,`forbidden`,`prohibited`,`error`,`incorrect`,`mistake`,`wrong`,`failure`,`divide`,`division`,`or`,`/`]],[[32,21,11],[`diameter`,`zero`,`ø`,`nothing`,`null`,`void`,`ban`,`math`,`divide`,`division`,`half`,`split`,`/`,`average`,`avg`,`mean`,`median`,`normal`]],[[32,22],[`shape`,`bullet`,`gender`,`genderless`]],[[35,17],[`badge`,`medal`,`honour`,`decoration`,`order`,`pin`,`laurel`,`trophy`,`medallion`,`insignia`,`bronze`,`silver`,`gold`]],[[23],[`media`,`music`]],[[1],[`person`,`account`,`contact`]],[[1],[`person`,`account`,`contact`]],[[21,11],[`cancel`,`close`,`delete`,`remove`,`times`,`clear`,`error`,`incorrect`,`wrong`,`mistake`,`failure`,`linter`,`multiply`,`multiplication`]],[[29,11],[`computing`,`electricity`,`electronics`]],[[16],[`lemon`,`orange`,`grapefruit`,`fruit`]],[[23],[`movie`,`film`,`video`,`camera`,`cinema`,`cut`,`action`,`television`,`tv`,`show`,`entertainment`]],[[37],[`copy`,`paste`]],[[37],[`copied`,`pasted`,`done`,`todo`,`tick`,`complete`,`task`]],[[38,37],[`copy`,`paste`,`history`,`log`,`clock`,`time`,`watch`,`alarm`,`hour`,`minute`,`reminder`,`scheduled`,`deadline`,`pending`,`time tracking`,`timesheets`,`appointment`,`logbook`]],[[37,3],[`copy`,`paste`]],[[37],[`copy`,`paste`,`tasks`]],[[37,22],[`copy`,`delete`,`remove`,`erase`,`document`,`medical`,`report`,`doctor`]],[[37,3],[`copy`,`paste`]],[[37],[`paste`,`signature`]],[[37],[`paste`]],[[37,22],[`copy`,`paste`,`add`,`create`,`new`,`document`,`medical`,`report`,`doctor`]],[[37],[`paste`,`format`,`text`]],[[37],[`copy`,`paste`,`discard`,`remove`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`,`noon`,`midnight`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`,`warning`,`wrong`]],[[38],[`time`,`watch`,`alarm`,`sort`,`order`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[38],[`time`,`watch`,`alarm`,`sort`,`order`,`ascending`,`descending`,`increasing`,`decreasing`,`rising`,`falling`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`]],[[38],[`time`,`watch`,`alarm`,`add`,`create`,`new`]],[[0,23],[`tv`,`movie`,`video`,`closed captions`,`subtitles`,`subhead`,`transcription`,`transcribe`,`dialogue`,`accessibility`]],[[42],[`weather`]],[[11],[`weather`,`danger`,`warning`,`alert`,`error`,`sync`,`network`,`exclamation`]],[[3,14],[`storage`,`memory`,`bytes`,`servers`,`backup`,`timemachine`,`rotate`,`synchronize`,`synchronise`,`refresh`,`reconnect`,`transfer`,`data`,`security`,`upload`,`save`,`remote`,`safety`]],[[11],[`sync`,`network`,`success`,`done`,`completed`,`saved`,`persisted`]],[[11],[`computing`,`ai`,`cluster`,`network`]],[[3,14],[`import`]],[[42],[`weather`,`shower`]],[[42],[`weather`,`mist`]],[[42],[`weather`,`rainfall`]],[[42],[`weather`,`bolt`]],[[42],[`weather`,`night`]],[[42],[`weather`,`partly`,`night`,`rainfall`]],[[8,42],[`disconnect`]],[[42],[`weather`,`rainfall`]],[[42],[`weather`,`rainfall`]],[[42],[`weather`,`blizzard`]],[[42],[`weather`,`partly`]],[[42],[`weather`,`partly`,`rainfall`]],[[3,14],[`synchronize`,`synchronise`,`refresh`,`reconnect`,`transfer`,`backup`,`storage`,`upload`,`download`,`connection`,`network`,`data`]],[[3,14],[`file`]],[[42],[`weather`,`clouds`]],[[17],[`leaf`,`luck`,`plant`]],[[32,17],[`shape`,`suit`,`playing`,`cards`]],[[37,11],[`source`,`programming`,`html`,`xml`]],[[37,11],[`source`,`programming`,`html`,`xml`]],[[16],[`drink`,`cup`,`mug`,`tea`,`cafe`,`hot`,`beverage`]],[[1],[`computing`,`settings`,`cog`,`edit`,`gear`,`preferences`,`controls`,`configuration`,`fixed`,`build`,`construction`,`parts`]],[[17],[`money`,`cash`,`finance`,`gamble`]],[[19,10,37],[`lines`,`list`,`queue`,`preview`,`panel`,`parallel`,`series`,`split`,`vertical`,`horizontal`,`half`,`center`,`middle`,`even`,`sidebar`,`drawer`,`gutter`,`fold`,`reflow`,`typography`,`pagination`,`pages`]],[[19,10,37],[`lines`,`list`,`queue`,`preview`,`parallel`,`series`,`split`,`vertical`,`horizontal`,`thirds`,`triple`,`center`,`middle`,`alignment`,`even`,`sidebars`,`drawers`,`gutters`,`fold`,`reflow`,`typography`,`pagination`,`pages`]],[[19,10],[`columns`,`settings`,`customize`,`table`,`grid`,`adjust`,`configuration`,`panel`,`layout`]],[[19,10,37,31],`lines.list.queue.preview.parallel.series.split.vertical.horizontal.thirds.triple.center.middle.alignment.even.sidebars.drawers.gutters.fold.reflow.typography.pagination.pages.prison.jail.bars.sentence.police.cops.cell.crime.criminal.justice.law.enforcement.grill`.split(`.`)],[[11,14],[`cubes`,`packages`,`parts`,`units`,`collection`,`cluster`,`combine`,`gather`,`merge`]],[[11],[`keyboard`,`key`,`mac`,`cmd`,`button`]],[[25,41],[`direction`,`north`,`east`,`south`,`west`,`safari`,`browser`]],[[10,11],[`design`,`element`,`group`,`module`,`part`,`symbol`]],[[12,11,17],[`pc`,`chassis`,`codespaces`,`github`]],[[41],[`reception`,`bell`,`porter`]],[[32,21],[`conical`,`triangle`,`triangular`,`geometry`,`filter`,`funnel`,`hopper`,`spotlight`,`searchlight`]],[[11],[`roadwork`,`maintenance`,`blockade`,`barricade`]],[[1,8,7,34],[`user`,`person`,`family`,`friend`,`acquaintance`,`listing`,`networking`]],[[1,8,7,34],[`user`,`person`,`family`,`friend`,`acquaintance`,`listing`,`networking`]],[[11,40,20],[`storage`,`shipping`,`freight`,`supply chain`,`docker`,`environment`,`devops`,`code`,`coding`]],[[28,0,10],[`display`,`accessibility`]],[[1,16],[`biscuit`,`privacy`,`legal`,`food`]],[[16,18],[`pod`,`cooking`,`recipe`,`food`,`kitchen`,`chef`,`restaurant`,`dinner`,`lunch`,`breakfast`,`meal`,`eat`]],[[37],[`clone`,`duplicate`,`multiple`]],[[37,26],[`clone`,`duplicate`,`done`,`multiple`]],[[37,21],[`clone`,`duplicate`,`remove`,`delete`,`collapse`,`subtract`,`multiple`,`-`]],[[37,21],[`clone`,`duplicate`,`add`,`multiple`,`expand`,`+`]],[[37,11,21],[`clone`,`duplicate`,`cancel`,`ban`,`no`,`stop`,`forbidden`,`prohibited`,`error`,`multiple`,`divide`,`division`,`split`,`or`,`/`]],[[26,21],[`cancel`,`close`,`delete`,`remove`,`clear`,`multiple`,`multiply`,`multiplication`,`times`]],[[37],[`licence`]],[[37],[`licence`,`license`]],[[3],[`arrow`,`return`]],[[3,37,11],[`arrow`,`indent`,`tab`]],[[3],[`arrow`]],[[3],[`arrow`]],[[3],[`arrow`]],[[3],[`arrow`]],[[3],[`arrow`]],[[3],[`arrow`]],[[12],[`processor`,`cores`,`technology`,`computer`,`chip`,`circuit`,`memory`,`ram`,`specs`,`gigahertz`,`ghz`]],[[37],[`licence`,`license`]],[[1,15],[`bank`,`purchase`,`payment`,`cc`]],[[16],[`bakery`,`cooking`,`food`,`pastry`]],[[28,10],[`photo`,`image`]],[[32],[`healthcare`,`first aid`]],[[28],[`aim`,`target`]],[[17],[`diadem`,`tiara`,`circlet`,`corona`,`king`,`ruler`,`winner`,`favourite`]],[[32,21,16],[`brick`,`block`,`box`,`3d`,`solid`,`volume`,`container`,`storage`,`shipping`,`carton`,`geometry`,`rectangular`,`hexahedron`,`butter`,`tofu`,`soap`,`cheese`,`package`,`parcel`,`crate`]],[[16],[`beverage`,`cup`,`drink`,`soda`,`straw`,`water`]],[[15],[`finance`,`money`]],[[32,10,21],[`shape`,`elliptical`,`geometry`,`container`,`storage`,`tin`,`pot`]],[[5,36,25],[`electricity`,`energy`,`water`]],[[12,11],[`storage`,`memory`,`container`,`tin`,`pot`,`bytes`,`servers`]],[[12,3,10,11,28],[`storage`,`memory`,`bytes`,`servers`,`backup`,`timemachine`,`rotate`,`arrow`,`left`]],[[12,11],[`storage`,`memory`,`container`,`tin`,`pot`,`bytes`,`servers`]],[[12,11],[`cache busting`,`storage`,`memory`,`bytes`,`servers`,`power`,`crash`]],[[10,37,3,21],[`numerical`,`decimal`,`decrease`,`less`,`fewer`,`precision`,`rounding`,`digits`,`fraction`,`float`,`number`]],[[10,37,3,21],[`numerical`,`decimal`,`increase`,`more`,`precision`,`rounding`,`digits`,`fraction`,`float`,`number`]],[[37,3],[`backspace`,`remove`]],[[16],[`pudding`,`christmas`,`xmas`,`custard`,`iced bun`,`icing`,`fondant`,`cake`,`ice cream`,`gelato`,`sundae`,`scoop`,`dollop`,`sugar`,`food`,`sweet`]],[[32,21,10,39],[`shape`,`circle`,`geometry`,`trigonometry`,`width`,`height`,`size`,`calculate`,`measure`]],[[32,17],[`square`,`rectangle`,`oblique`,`rhombus`,`shape`,`suit`,`playing`,`cards`]],[[23,28,39,12],[`keyframe`,`subtract`,`remove`,`decrease`,`reduce`,`calculator`,`button`,`keyboard`,`line`,`divider`,`separator`,`horizontal rule`,`hr`,`html`,`markup`,`markdown`,`---`,`toolbar`,`operator`,`code`,`coding`,`minimum`,`downgrade`]],[[34,15,33,21],[`verified`,`unverified`,`sale`,`discount`,`offer`,`marketing`,`sticker`,`price tag`]],[[23,28,39,12],[`keyframe`,`add`,`new`,`increase`,`increment`,`positive`,`calculate`,`toolbar`,`crosshair`,`aim`,`target`,`scope`,`sight`,`reticule`,`maximum`,`upgrade`,`extra`,`+`]],[[17],[`dice`,`random`,`tabletop`,`1`,`board`,`game`]],[[17],[`dice`,`random`,`tabletop`,`2`,`board`,`game`]],[[17],[`dice`,`random`,`tabletop`,`3`,`board`,`game`]],[[17],[`dice`,`random`,`tabletop`,`4`,`board`,`game`]],[[17],[`dice`,`random`,`tabletop`,`5`,`board`,`game`]],[[17],[`dice`,`random`,`tabletop`,`6`,`board`,`game`]],[[17],[`dice`,`random`,`tabletop`,`board`,`game`]],[[11,14],[`patch`,`difference`,`compare`,`plus`,`minus`,`plus-minus`,`math`]],[[12,23],[`album`,`music`,`songs`,`format`,`cd`,`dvd`,`vinyl`,`sleeve`,`cover`,`platinum`,`compilation`,`ep`,`recording`,`playback`,`spin`,`rotate`,`rpm`,`dj`]],[[12,23],[`album`,`music`,`vinyl`,`record`,`cd`,`dvd`,`format`,`dj`,`spin`,`rotate`,`rpm`]],[[12,23],[`album`,`music`,`vinyl`,`record`,`cd`,`dvd`,`format`,`dj`,`spin`,`rotate`,`rpm`]],[[12,23],[`album`,`music`,`songs`,`format`,`cd`,`dvd`,`vinyl`,`sleeve`,`cover`,`platinum`,`compilation`,`ep`,`recording`,`playback`,`spin`,`rotate`,`rpm`,`dj`]],[[21,11],[`calculate`,`math`,`division`,`operator`,`code`,`÷`,`/`]],[[22],[`gene`,`gmo`,`helix`,`heredity`,`chromosome`,`nucleic acid`]],[[22,16],[`gene`,`gmo free`,`helix`,`heredity`,`chromosome`,`nucleic acid`]],[[19,10,11,14],[`desktop`,`applications`,`launch`,`home`,`menu bar`,`bottom`,`line`,`macos`,`osx`]],[[2],[`animal`,`pet`,`puppy`,`hound`,`canine`]],[[15],[`currency`,`money`,`payment`]],[[16],[`doughnut`,`sprinkles`,`topping`,`fast food`,`junk food`,`snack`,`treat`,`sweet`,`sugar`,`dessert`,`hollow`,`ring`]],[[18,41,31],[`entrance`,`entry`,`exit`,`ingress`,`egress`,`gate`,`gateway`,`emergency exit`]],[[18,41,31],[`entrance`,`entry`,`exit`,`ingress`,`egress`,`gate`,`gateway`,`emergency exit`,`lock`]],[[18,41,31],[`entrance`,`entry`,`exit`,`ingress`,`egress`,`gate`,`gateway`,`emergency exit`]],[[32,37],[`interpunct`,`interpoint`,`middot`,`step`,`punctuation`,`period`,`full stop`,`end`,`finish`,`final`,`characters`,`font`,`typography`,`type`,`center`,`.`]],[[3,14],[`import`,`export`,`save`]],[[21,10,39],[`geometry`,`trigonometry`,`radius`,`diameter`,`circumference`,`calculate`,`measure`,`arc`,`curve`,`draw`,`sketch`]],[[23],[`drama`,`masks`,`theater`,`theatre`,`entertainment`,`show`]],[[39,18,12],[`power`,`bit`,`head`,`hole`,`diy`,`toolbox`,`build`,`construction`]],[[40,12],[`quadcopter`,`uav`,`aerial`,`flight`,`flying`,`technology`,`airborne`,`robotics`]],[[42,17],[`water`,`weather`,`liquid`,`fluid`,`wet`,`moisture`,`damp`,`bead`,`globule`]],[[42,17],[`water`,`weather`,`liquid`,`fluid`,`wet`,`moisture`,`damp`,`bead`,`globule`]],[[42],[`water`,`weather`,`liquid`,`fluid`,`wet`,`moisture`,`damp`,`bead`,`globule`]],[[23,12],[`drummer`,`kit`,`sticks`,`instrument`,`beat`,`bang`,`bass`,`backing track`,`band`,`play`,`performance`,`concert`,`march`,`music`,`audio`,`sound`,`noise`,`loud`]],[[16],[`food`,`chicken`,`meat`]],[[25,35],[`barbell`,`weight`,`workout`,`gym`]],[[22,0],[`hearing`,`noise`,`audio`,`accessibility`]],[[22,0],[`hearing`,`hard of hearing`,`hearing loss`,`deafness`,`noise`,`silence`,`audio`,`accessibility`]],[[25],[`world`,`browser`,`language`,`translate`,`globe`]],[[31,11,12],[`vpn`,`private`,`privacy`,`network`,`world`,`browser`,`security`,`encryption`,`protection`,`connection`]],[[29,10,11,0,28],[`lunar`,`solar`,`crescent moon`,`sun`,`earth`,`day`,`night`,`planet`,`space`,`mode`,`dark`,`light`,`toggle`,`switch`,`color`,`css`,`styles`,`display`,`accessibility`,`contrast`,`brightness`,`blend`,`shade`]],[[16,2],[`bird`,`chicken`,`nest`,`hatch`,`shell`,`incubate`,`soft boiled`,`hard`,`breakfast`,`brunch`,`morning`,`easter`]],[[16],[`food`,`breakfast`]],[[16],[`egg free`,`vegan`,`hatched`,`bad egg`]],[[19,11],[`et cetera`,`etc`,`loader`,`loading`,`progress`,`pending`,`throbber`,`menu`,`options`,`operator`,`code`,`coding`,`spread`,`rest`,`more`,`further`,`extra`,`overflow`,`dots`,`…`,`...`]],[[19],[`menu`,`options`,`spread`,`more`,`further`,`extra`,`overflow`,`dots`,`…`,`...`]],[[21,11],[`calculate`,`math`,`operator`,`assignment`,`code`,`=`]],[[21],[`about`,`calculate`,`math`,`operater`]],[[21,11],[`calculate`,`off`,`math`,`operator`,`code`,`≠`]],[[37],[`pencil`,`drawing`,`undo`,`delete`,`clear`,`trash`,`remove`]],[[7,12,23,17],[`internet`,`network`,`connection`,`cable`,`lan`,`port`,`router`,`switch`,`hub`,`modem`,`web`,`online`,`networking`,`communication`,`socket`,`plug`,`slot`,`controller`,`connector`,`interface`,`console`,`signal`,`data`,`input`,`output`]],[[15],[`currency`,`money`,`payment`]],[[40,25],[`electric`,`charger`,`station`,`vehicle`,`fast`,`plug`,`ev`,`power`,`electricity`,`energy`,`accumulator`,`charge`]],[[37,3],[`scale`,`fullscreen`,`maximize`,`minimize`,`contract`]],[[3,37,34],[`outbound`,`open`,`share`]],[[0,28,10,31],[`view`,`watch`,`see`,`show`,`expose`,`reveal`,`display`,`visible`,`visibility`,`vision`,`preview`,`read`]],[[0,28,10,31],[`view`,`watch`,`see`,`hide`,`conceal`,`mask`,`hidden`,`visibility`,`vision`]],[[0,28,10,31],[`view`,`watch`,`see`,`hide`,`conceal`,`mask`,`hidden`,`visibility`,`vision`]],[[5,25],[`building`,`business`,`energy`,`industry`,`manufacture`,`sector`]],[[18],[`air`,`cooler`,`ventilation`,`ventilator`,`blower`]],[[23,3],[`music`]],[[17],[`logo`]],[[18,5],[`picket`,`panels`,`woodwork`,`diy`,`materials`,`suburban`,`garden`,`property`,`territory`]],[[25],[`big wheel`,`daisy wheel`,`observation`,`attraction`,`entertainment`,`amusement park`,`theme park`,`funfair`]],[[14],[`document`]],[[14],[`zip`,`package`,`archive`]],[[10,14],[`model`,`3d`,`axis`,`coordinates`]],[[14],[`award`,`achievement`,`badge`,`rosette`,`prize`,`winner`]],[[14],[`box`,`package`,`model`]],[[14,11],[`code`,`json`,`curly braces`,`curly brackets`]],[[14,11],[`code`,`json`,`curly braces`,`curly brackets`]],[[14],[`statistics`,`analytics`,`diagram`,`graph`,`presentation`]],[[14],[`statistics`,`analytics`,`diagram`,`graph`,`presentation`,`trending up`]],[[14],[`statistics`,`analytics`,`diagram`,`graph`,`presentation`]],[[14],[`statistics`,`analytics`,`diagram`,`graph`,`presentation`]],[[14],[`done`,`document`,`todo`,`tick`,`complete`,`task`]],[[14],[`done`,`document`,`todo`,`tick`,`complete`,`task`]],[[14,38],[`history`,`log`,`clock`]],[[14,11],[`script`,`document`,`gist`,`html`,`xml`,`property list`,`plist`]],[[14,11],[`script`,`document`,`html`,`xml`,`property list`,`plist`]],[[14],[`executable`,`settings`,`cog`,`edit`,`gear`]],[[14,11],[`diff`,`patch`]],[[14,11],[`number`,`document`]],[[14,3],[`download`,`import`,`export`]],[[14,26],[`hidden`,`warning`,`alert`,`danger`,`protected`,`exclamation mark`]],[[14],[`music`,`audio`,`sound`,`headphones`]],[[14],[`heart`,`favourite`,`bookmark`,`quick link`]],[[14],[`image`,`graphics`,`photo`,`picture`]],[[14,3],[`document`]],[[14,31],[`key`,`private`,`public`,`security`]],[[14,31],[`lock`,`password`,`security`]],[[14],[`delete`,`remove`,`erase`,`document`]],[[14],[`document`]],[[14,23],[`audio`,`sound`,`noise`,`track`,`digital`,`recording`,`playback`,`piano`,`keyboard`,`keys`,`notes`,`chord`,`midi`,`octave`]],[[14,3],[`document`]],[[14],[`signature`]],[[14],[`edit`]],[[14],[`movie`,`video`,`film`]],[[14],[`add`,`create`,`new`,`document`]],[[14],[`add`,`create`,`new`,`document`]],[[14],[`readme`,`help`,`question`]],[[14],[`scan`,`code`,`qr-code`]],[[14],[`lost`,`document`,`find`,`browser`,`lens`]],[[14],[`lost`,`document`,`find`,`browser`,`lens`]],[[14],[`audio`,`music`,`volume`]],[[14,11],[`cogged`,`gear`,`mechanical`,`machinery`,`configuration`,`controls`,`preferences`,`settings`,`system`,`admin`,`edit`,`executable`]],[[14],[`spreadsheet`,`sheet`,`table`]],[[14,11],[`versions`,`multiple`,`copy`,`documents`,`revisions`,`version control`,`history`]],[[14],[`symlink`,`symbolic`,`link`]],[[14,11],[`terminal`,`bash`,`script`,`executable`]],[[14,37],[`data`,`txt`,`pdf`,`document`]],[[14,37],[`font`,`text`,`typography`,`type`]],[[14,37],[`font`,`text`,`typography`,`type`]],[[14,3],[`upload`,`import`,`export`]],[[1,14],[`person`,`personal information`,`people`,`listing`,`networking`,`document`,`contact`,`cover letter`,`resume`,`cv`,`curriculum vitae`,`application form`]],[[14],[`movie`,`video`,`film`]],[[14],[`audio`,`music`,`volume`]],[[14],[`lost`,`delete`,`remove`,`document`]],[[14],[`lost`,`delete`,`remove`,`document`]],[[14],[`multiple`,`copy`,`documents`]],[[28,23],[`movie`,`video`,`reel`,`camera`,`cinema`,`entertainment`]],[[1,31,22,12],[`2fa`,`authentication`,`biometric`,`identity`,`security`]],[[18,39,41],[`flames`,`smoke`,`foam`,`water`,`spray`,`hose`,`firefighter`,`fireman`,`department`,`brigade`,`station`,`emergency`,`suppress`,`compressed`,`tank`,`cylinder`,`safety`,`equipment`,`amenities`]],[[16,2],[`dish`,`restaurant`,`course`,`meal`,`seafood`,`pet`,`sea`,`marine`]],[[16,2],[`food`,`dish`,`restaurant`,`course`,`meal`,`seafood`,`animal`,`pet`,`sea`,`marine`,`allergy`,`intolerance`,`diet`]],[[16,2],[`dish`,`restaurant`,`course`,`meal`,`seafood`,`pet`,`sea`,`marine`]],[[35,41],[`sea`,`boating`,`angler`,`bait`,`reel`,`tackle`,`marine`,`outdoors`,`fish`,`fishing`,`hook`,`sports`,`travel`]],[[35,41],[`fishing`,`rod`,`hobby`,`equipment`,`reel`]],[[1,34],[`report`,`marker`,`notification`,`warning`,`milestone`,`goal`,`notice`,`signal`,`attention`,`banner`]],[[1,34],[`unflag`,`unmark`,`report`,`marker`,`notification`,`warning`,`milestone`,`goal`,`notice`,`signal`,`attention`,`banner`]],[[11,25],[`report`,`timeline`,`marker`,`pin`]],[[11,25],[`report`,`timeline`,`marker`,`pin`]],[[42,34,17],[`heat`,`burn`,`light`,`glow`,`ignite`,`passion`,`ember`,`fire`,`lit`,`burning`,`spark`,`embers`,`smoke`,`firefighter`,`fireman`,`department`,`brigade`,`station`,`emergency`]],[[24,34,17],[`campfire`,`camping`,`wilderness`,`outdoors`,`lit`,`warmth`,`wood`,`twigs`,`sticks`]],[[28,12],[`torch`,`light`,`beam`,`emergency`,`safety`,`tool`,`bright`]],[[28,12],[`torch`,`light`,`beam`,`emergency`,`safety`,`tool`,`bright`]],[[29,17],[`beaker`,`erlenmeyer`,`lab`,`chemistry`,`experiment`,`test`]],[[29,17],[`beaker`,`erlenmeyer`,`non toxic`,`lab`,`chemistry`,`experiment`,`test`]],[[29,17],[`beaker`,`lab`,`chemistry`,`experiment`,`test`]],[[10,28],[`reflect`,`mirror`,`alignment`,`dashed`]],[[10,28],[`reflect`,`mirror`,`alignment`,`dashed`]],[[24,17,36],[`sustainability`,`nature`,`plant`,`spring`]],[[24,36,30],[`sustainability`,`nature`,`plant`]],[[28],[`camera`,`lens`,`photo`,`dashed`]],[[3,19],[`arrow`,`collapse`,`fold`,`vertical`,`dashed`]],[[3,19],[`arrow`,`collapse`,`fold`,`vertical`,`dashed`]],[[14],[`directory`]],[[14],[`archive`,`zip`,`package`]],[[14],[`done`,`directory`,`todo`,`tick`,`complete`,`task`]],[[14,38],[`history`,`directory`,`clock`]],[[14],[`directory`,`closed`]],[[14,11],[`directory`,`coding`,`develop`,`software`]],[[14],[`directory`,`settings`,`control`,`preferences`,`cog`,`edit`,`gear`]],[[14,11],[`directory`,`root`,`project`,`pinned`,`active`,`current`,`cogged`,`gear`,`mechanical`,`machinery`,`configuration`,`controls`,`preferences`,`settings`,`system`,`admin`,`edit`]],[[14,3],[`directory`,`download`,`import`,`export`]],[[14],[`directory`,`root`,`project`,`git`,`repo`]],[[14],[`directory`,`root`,`project`,`git`,`repo`]],[[14],[`directory`,`heart`,`favourite`,`bookmark`,`quick link`]],[[14,3],[`directory`,`import`,`export`]],[[6,11,10,14],[`projects`,`manage`,`overview`,`board`,`tickets`,`issues`,`roadmap`,`plan`,`intentions`,`productivity`,`work`,`agile`,`code`,`coding`,`directory`,`project`,`root`]],[[14,31],[`directory`,`key`,`private`,`security`,`protected`]],[[14,31],[`directory`,`lock`,`private`,`security`,`protected`]],[[14],[`directory`,`remove`,`delete`]],[[14],[`directory`]],[[14,11],[`directory`,`root`,`project`,`active`,`current`,`pinned`]],[[14,3],[`directory`,`import`,`export`]],[[14],[`directory`,`rename`]],[[14],[`directory`,`add`,`create`,`new`]],[[14,11],[`directory`,`root`,`project`,`git`,`repo`]],[[14],[`directory`,`search`,`find`,`lost`,`browser`,`lens`]],[[14],[`directory`,`search`,`find`,`lost`,`browser`,`lens`]],[[14],[`directory`,`symlink`,`symbolic`,`link`]],[[14,3],[`directory`,`synchronize`,`synchronise`,`refresh`,`reconnect`,`transfer`,`backup`]],[[14],[`directory`,`tree`,`browser`]],[[14,3],[`directory`,`upload`,`import`,`export`]],[[14],[`directory`,`remove`,`delete`]],[[14],[`multiple`,`copy`,`directories`]],[[25],[`steps`,`walking`,`foot`,`feet`,`trail`,`shoe`]],[[40],[`machinery`,`industrial`,`warehouse`,`lifting`,`storage`,`equipment`,`heavy-duty`,`moving`,`vehicle`,`transport`,`logistics`]],[[11],[`document`,`page`,`file`,`layout`,`paper`,`stub`,`formality`,`structure`,`template`,`inputs`,`design`,`components`]],[[20],[`send`,`share`,`email`]],[[10,28],[`logo`,`design`,`tool`]],[[13,1],[`emoji`,`face`,`bad`,`sad`,`emotion`]],[[40,25],[`filling-station`,`gas`,`petrol`,`tank`]],[[19,23,10,28],[`expand`,`zoom`,`preview`,`focus`,`camera`,`lens`,`image`]],[[19],[`filter`,`hopper`]],[[19],[`filter`,`hopper`,`add`,`create`,`new`]],[[19],[`filter`,`hopper`,`remove`,`delete`]],[[19,10,11,28,23],[`carousel`,`pictures`,`images`,`scroll`,`swipe`,`album`,`portfolio`]],[[19,10,11,28,23,14],[`carousel`,`pictures`,`images`,`scroll`,`swipe`,`album`,`portfolio`,`history`,`versions`,`backup`,`time machine`]],[[19,10,11,28,23],[`carousel`,`pictures`,`images`,`album`,`portfolio`,`preview`]],[[19,10,11,28,23],[`carousel`,`pictures`,`images`,`scroll`,`swipe`,`album`,`portfolio`]],[[19,10,11,28,23,14],[`carousel`,`pictures`,`images`,`scroll`,`swipe`,`album`,`portfolio`,`history`,`versions`,`backup`,`time machine`]],[[17,12],[`console`]],[[17,12],[`console`]],[[17,12],[`direction`,`arrow`,`controller`,`navigation`,`button`,`move`,`pointer`,`arrowhead`,`console`,`game`,`gaming`]],[[40,35,29],[`dashboard`,`dial`,`meter`,`speed`,`pressure`,`measure`,`level`]],[[25,39],[`justice`,`law`,`court`,`judgment`,`legal`,`hands`,`penalty`,`decision`,`authority`,`hammer`,`mallet`]],[[17,11,15],[`diamond`,`crystal`,`ruby`,`jewellery`,`price`,`special`,`present`,`gift`,`ring`,`wedding`,`proposal`,`marriage`,`rubygems`]],[[15],[`currency`,`money`,`payment`]],[[17],[`pac-man`,`spooky`]],[[17,1],[`present`,`box`,`birthday`,`party`]],[[11],[`code`,`version control`,`vcs`,`repository`]],[[11],[`code`,`version control`,`vcs`,`repository`,`delete`,`remove`,`-`]],[[11],[`code`,`version control`,`vcs`,`repository`,`add`,`create`,`+`]],[[11,25],[`code`,`version control`,`waypoint`,`stop`,`station`]],[[11,25],[`code`,`version control`,`waypoint`,`stop`,`station`]],[[11],[`code`,`version control`,`diff`]],[[11,3],[`code`,`version control`,`diff`]],[[11],[`code`,`version control`]],[[11],[`code`,`version control`,`commit graph`,`commits`,`gitlens`]],[[11],[`code`,`version control`]],[[11],[`code`,`version control`,`commits`,`diff`,`error`,`conflict`]],[[11],[`code`,`version control`,`open`]],[[11,3],[`code`,`version control`,`open`]],[[11],[`code`,`version control`,`rejected`,`closed`,`cancelled`,`x`]],[[11],[`code`,`version control`,`open`,`plus`,`add`,`+`]],[[11,3],[`code`,`version control`,`open`,`plus`,`add`,`+`]],[[11],[`code`,`version control`,`open`,`draft`,`dashed`]],[[16],[`beverage`,`drink`,`glass`,`water`]],[[0],[`glasses`,`spectacles`]],[[25],[`world`,`browser`,`language`,`translate`]],[[31,11,12],[`vpn`,`private`,`privacy`,`network`,`world`,`browser`,`security`,`encryption`,`protection`,`connection`]],[[25,8,12],[`globe`,`earth`,`planet`,`disable`,`mute`,`off`,`hide`,`avoid`,`world`,`browser`,`language`,`translate`,`internet`,`offline`,`disconnected`,`network`,`connection`,`no connection`,`network failure`,`signal off`]],[[8,12,25],[`globe`,`internet`,`offline`,`disconnected`,`network`,`connection`,`world`,`no connection`,`network failure`,`signal off`]],[[17],[`flag`,`bullseye`]],[[12,17],[`processor`,`cores`,`technology`,`computer`,`chip`,`circuit`,`specs`,`graphics processing unit`,`video card`,`display adapter`,`gddr`,`rendering`,`digital image processing`,`crypto mining`]],[[5],[`school`,`university`,`learn`,`study`,`mortarboard`,`education`,`ceremony`,`academic`,`hat`,`diploma`,`bachlor's`,`master's`,`doctorate`]],[[16],[`fruit`,`wine`,`food`]],[[37,19,10,21],[`table`,`rows`,`columns`,`blocks`,`plot`,`land`,`geometry`,`measure`,`size`,`width`,`height`,`distance`,`surface area`,`square meter`,`acre`,`window`,`skylight`]],[[37,19,21],[`table`,`rows`,`columns`,`blocks`,`plot`,`land`,`geometry`,`measure`,`data`,`size`,`width`,`height`,`distance`,`surface area`,`square meter`,`acre`]],[[37,19,21],[`table`,`rows`,`columns`,`blocks`,`plot`,`land`,`geometry`,`measure`,`data`,`size`,`width`,`height`,`distance`,`surface area`,`square meter`,`acre`]],[[37,19,21],[`table`,`rows`,`columns`,`data`,`blocks`,`plot`,`land`,`geometry`,`measure`,`size`,`width`,`height`,`distance`,`surface area`,`square meter`,`acre`]],[[37,21,19,10],[`table`,`rows`,`columns`,`blocks`,`plot`,`land`,`geometry`,`measure`,`size`,`width`,`height`,`distance`,`surface area`,`square meter`,`acre`,`window`]],[[37,19,10],[`table`,`rows`,`columns`]],[[19],[`grab`,`dots`,`handle`,`move`,`drag`]],[[19],[`grab`,`dots`,`handle`,`move`,`drag`]],[[19],[`grab`,`dots`,`handle`,`move`,`drag`]],[[14],[`cubes`,`packages`,`parts`,`units`,`collection`,`cluster`,`gather`,`dashed`]],[[23],[`acoustic`,`instrument`,`strings`,`riff`,`rock`,`band`,`country`,`concert`,`performance`,`play`,`lead`,`loud`,`music`,`audio`,`sound`,`noise`]],[[16],[`food`,`pork`,`pig`,`meat`,`bone`,`hock`,`knuckle`,`gammon`,`cured`]],[[16],`burger.cheeseburger.meat.beef.patty.bun.fast food.junk food.takeaway.takeout.snack.dish.restaurant.lunch.meal.savory.savoury.cookery.cooking.grilled.barbecue.barbeque.bbq.lettuce.tomato.relish.pickles.onions.ketchup.mustard.mayonnaise`.split(`.`)],[[39,18],[`mallet`,`nails`,`diy`,`toolbox`,`build`,`construction`]],[[9,0],[`wave`,`move`,`mouse`,`grab`]],[[15,1],[`savings`,`banking`,`money`,`finance`,`offers`,`mortgage`,`payment`,`received`,`wage`,`payroll`,`allowance`,`pocket money`,`handout`,`pennies`]],[[34,13,7,35],[`clench`,`strength`,`power`,`unity`,`solidarity`,`rebellion`,`victory`,`triumph`,`support`,`fight`,`combat`,`brawl`]],[[9,10,19],[`hand`]],[[34],[`love`,`like`,`emotion`]],[[13],[`agreement`,`help`,`proposal`,`charity`,`begging`,`terms`]],[[13,23],[`rock`]],[[16,27],[`waiter`,`waitress`,`restaurant`,`table service`,`served`,`dinner`,`dining`,`meal`,`course`,`luxury`]],[[33,40],[`bag`,`baggage`,`carry`,`clutch`,`fashion`,`luggage`,`purse`,`tote`,`travel`]],[[1,34,7,15,31],[`agreement`,`partnership`,`deal`,`business`,`assistance`,`cooperation`,`friendship`,`union`,`terms`]],[[11,12],[`computer`,`server`,`memory`,`data`,`ssd`,`disk`,`hard disk`,`storage`,`hardware`,`backup`,`media`]],[[11,12,3,14],[`computer`,`server`,`memory`,`data`,`ssd`,`disk`,`hard disk`,`save`]],[[11,12,3,14],[`computer`,`server`,`memory`,`data`,`ssd`,`disk`,`hard disk`,`save`]],[[39],[`helmet`,`construction`,`safety`,`savety`]],[[37,34],[`hashtag`,`number`,`pound`]],[[34,1,31],[`incognito`,`disguise`,`costume`,`masked`,`anonymous`,`anonymity`,`privacy`,`private browsing`,`stealth`,`hidden`,`undercover`,`cloak`,`invisible`,`ghost`,`spy`,`agent`,`detective`,`identity`,`cap`,`fedora`,`spectacles`,`shades`,`sunglasses`,`eyewear`]],[[42],[`mist`,`fog`]],[[12,23],[`tv`,`resolution`,`video`,`high definition`,`720p`,`1080p`]],[[12,23,17],[`socket`,`plug`,`slot`,`controller`,`connector`,`interface`,`console`,`signal`,`audio`,`video`,`visual`,`av`,`data`,`input`,`output`]],[[37],[`h1`,`html`,`markup`,`markdown`]],[[37],[`h1`,`html`,`markup`,`markdown`]],[[37],[`h2`,`html`,`markup`,`markdown`]],[[37],[`h3`,`html`,`markup`,`markdown`]],[[37],[`h4`,`html`,`markup`,`markdown`]],[[37],[`h5`,`html`,`markup`,`markdown`]],[[37],[`h6`,`html`,`markup`,`markdown`]],[[23,8,7,12,17],[`music`,`audio`,`sound`,`mute`,`off`]],[[23,8,12,14,17],[`music`,`audio`,`sound`]],[[23,8,12,14,17],[`music`,`audio`,`sound`,`gaming`,`headphones`,`headset`,`call`,`center`,`phone`,`telephone`,`voip`,`video`]],[[22,34,23,13,17,32],[`like`,`love`,`emotion`,`suit`,`playing`,`cards`]],[[13],[`heartbreak`,`sadness`,`emotion`]],[[13,1,31],[`agreement`,`charity`,`help`,`deal`,`terms`,`emotion`,`together`,`handshake`]],[[22,1,23,17,34],[`unlike`,`unfavorite`,`remove`,`damage`,`ui & ux`]],[[34,23],[`unlike`,`dislike`,`hate`,`emotion`]],[[22,1,23,17,34],[`plus`,`like`,`favorite`,`add`,`health`,`support`]],[[22],[`heartbeat`,`pulse`,`health`,`medical`,`blood pressure`,`cardiac`,`systole`,`diastole`]],[[18,12,41],[`heating`,`warmth`,`comfort`,`fire`,`stove`,`electric`,`electronics`,`amenities`]],[[40,41],[`transport`,`flying`,`rotor`,`aviation`,`helipad`,`gear`,`flyer`,`technology`,`helicopter`,`aircraft`,`vehicle`]],[[32,4,11],[`shape`,`node.js`,`logo`]],[[37,10],[`mark`,`text`]],[[3,38],[`time`,`redo`,`undo`,`rewind`,`timeline`,`version`,`time machine`,`backup`,`rotate`,`ccw`]],[[16],[`beer`,`brewery`,`drink`]],[[16],[`beer`,`brewery`,`drink`,`hop free`,`allergy`,`intolerance`,`diet`]],[[22,5,25,41],[`infirmary`,`sanatorium`,`healthcare`,`doctor`,`hospice`,`clinic`,`emergency room`,`ward`,`building`,`medical`,`vet`]],[[5,25,41],[`building`,`hostel`,`motel`,`inn`]],[[38,17],[`timer`,`time`,`sandglass`]],[[5,18,25],[`home`,`living`,`building`,`residence`,`architecture`]],[[18,5,22],[`home sweet home`,`abode`,`building`,`residence`,`healthy living`,`lifestyle`]],[[5,18,36],[`home`,`living`,`building`,`residence`,`architecture`,`autarky`,`energy`]],[[5,22],[`home`,`living`,`medical`,`new`,`addition`,`building`,`residence`,`architecture`]],[[18,5,8],[`home`,`living`,`building`,`wifi`,`connectivity`]],[[16],[`gelato`,`food`,`dessert`,`dish`,`restaurant`,`course`,`meal`]],[[16],[`gelato`,`food`]],[[31,1],[`card`,`badge`,`identity`,`authentication`,`secure`]],[[31,1],[`id-card`,`id-card-lanyard`,`identity`,`employee`,`gate-pass`,`badge`]],[[28,37,23,14],[`picture`,`photo`]],[[28,37,23,14],[`picture`,`photo`,`download`,`save`,`export`]],[[28,23,14],[`remove`,`delete`]],[[28,23,14],[`picture`,`photo`]],[[28,37,23,14],[`picture`,`gif`,`photo`]],[[28,23,14],[`add`,`create`,`picture`]],[[28,37,23,14],[`picture`,`photo`,`upload`,`import`]],[[28,23],[`resize`,`picture`,`sharpen`,`increase`]],[[28,37,23,14],[`picture`,`photo`,`multiple`,`copy`,`gallery`,`album`,`collection`,`slideshow`,`showcase`]],[[3,14],[`save`]],[[1,20],[`email`]],[[15],[`currency`,`money`,`payment`]],[[23],[`unlimited`,`forever`,`loop`,`math`]],[[0,26],[`about`,`advice`,`clue`,`details`,`help`,`hint`,`indicator`,`information`,`knowledge`,`notice`,`status`,`support`,`tooltip`]],[[39],[`access`,`cover`,`tile`,`metal`,`materials`,`screws`]],[[37],[`oblique`,`text`,`format`]],[[3,10],[`arrow`,`right`]],[[3,10],[`arrow`,`left`]],[[15],[`currency`,`money`,`payment`]],[[17,12],[`game`,`console`,`control stick`]],[[6,11,10],[`projects`,`manage`,`overview`,`board`,`tickets`,`issues`,`roadmap`,`plan`,`intentions`,`productivity`,`work`,`agile`,`code`,`coding`]],[[40],[`kayak`,`boat`,`paddle`,`water`,`sport`,`recreation`,`adventure`,`outdoors`,`equipment`,`lake`,`ocean`]],[[31,1],[`password`,`login`,`authentication`,`secure`,`unlock`,`keychain`,`key ring`,`fob`]],[[31,1],[`password`,`login`,`authentication`,`secure`,`unlock`]],[[31,1],[`password`,`login`,`authentication`,`secure`,`unlock`,`car key`]],[[37,12,11],[`layout`,`spell`,`settings`,`mouse`]],[[23,12],[`music`,`audio`,`sound`,`noise`,`notes`,`keys`,`chord`,`octave`,`midi`,`controller`,`instrument`,`electric`,`signal`,`digital`,`studio`,`production`,`producer`,`pianist`,`piano`,`play`,`performance`,`concert`]],[[12,37,11],[`unkeys`,`layout`,`spell`,`settings`,`mouse`]],[[18],[`lighting`,`household`,`home`,`furniture`]],[[18],[`lighting`,`household`,`home`,`furniture`]],[[18],[`lighting`,`household`,`office`,`desk`,`home`,`furniture`]],[[18],[`lighting`,`household`,`floor`,`home`,`furniture`]],[[18],[`lighting`,`household`,`wall`,`home`,`furniture`]],[[18],[`lighting`,`household`,`wall`,`home`,`furniture`]],[[10,39,21,35,17],[`area`,`surface`,`square metres`,`allotment`,`parcel`,`property`,`plane`,`acres`,`measure`,`distance`,`isometric`,`flag`,`golf course`,`hole`]],[[15,25,5],[`bank`,`building`,`capitol`,`finance`,`money`,`museum`,`art gallery`,`hall`,`institute`,`pediment`,`portico`,`columns`,`pillars`,`classical`,`architecture`,`government`,`institution`]],[[37],[`translate`]],[[12],[`computer`,`screen`,`remote`]],[[12],[`computer`,`screen`,`remote`]],[[12,26],[`computer`,`screen`,`remote`,`success`,`done`,`todo`,`tick`,`complete`,`task`]],[[10,9],[`select`,`cursor`]],[[3,10,9],[`select`,`cursor`]],[[13],[`emoji`,`face`,`happy`,`good`,`emotion`]],[[10,19],[`stack`,`pile`,`pages`,`sheets`,`paperwork`,`copies`,`copy`]],[[10,19],[`stack`,`pile`,`pages`,`sheets`,`paperwork`,`copies`,`copy`,`duplicate`,`double`,`shortcuts`]],[[10,19],[`stack`,`layers`,`add`,`new`,`increase`,`create`,`positive`,`copy`,`upgrade`]],[[10,19],[`masonry`,`brick`]],[[10,19],[`app`,`home`,`start`]],[[10,19,28,37],[`todo`,`tasks`,`items`,`pending`,`image`,`photo`]],[[10,19],[`app`,`home`,`start`,`grid`]],[[19],[`window`,`webpage`,`block`,`section`,`grid`,`template`,`structure`]],[[19],[`window`,`webpage`,`block`,`section`]],[[24,36,30],[`sustainability`,`nature`,`energy`,`plant`,`autumn`]],[[16,13,36],[`salad`,`lettuce`,`vegetable`,`chard`,`cabbage`,`bok choy`]],[[7,23],[`pulpit`,`podium`,`stand`]],[[29,39,32],[`concave`,`lens`,`optics`,`light`,`magnification`,`curved`,`focus`,`refraction`,`science`,`physics`,`eyeglass`,`telescope`,`microscope`]],[[29,39,32],[`convex`,`lens`,`optics`,`magnification`,`focus`,`light`,`refraction`,`physics`,`eyeglass`,`telescope`,`microscope`,`curved`,`science`]],[[37,28,23,25,11],[`books`,`reading`,`written`,`authors`,`stories`,`fiction`,`novels`,`information`,`knowledge`,`education`,`high school`,`university`,`college`,`academy`,`learning`,`study`,`research`,`collection`,`vinyl`,`records`,`albums`,`music`,`package`]],[[37,28,23,25,11],[`books`,`reading`,`written`,`authors`,`stories`,`fiction`,`novels`,`information`,`knowledge`,`education`,`high school`,`university`,`college`,`academy`,`learning`,`study`,`research`,`collection`,`vinyl`,`records`,`albums`,`music`,`package`]],[[0,22],[`preserver`,`life belt`,`lifesaver`,`help`,`rescue`,`ship`,`ring`,`raft`,`inflatable`,`wheel`,`donut`]],[[37],[`text`,`font`,`typography`,`alternates`,`alternatives`]],[[28],[`idea`,`bright`,`lights`]],[[28],[`lights`]],[[11,25],[`code`,`version control`,`waypoint`,`stop`,`station`,`last`,`end`]],[[32,21,10],[`line`,`snakes`,`annotate`,`curve`,`doodle`,`stroke`,`pen`,`tool`,`gesture`,`draw`,`wave`,`art`,`road`]],[[37,1],[`chain`,`url`]],[[37,1],[`chain`,`url`]],[[37],[`unchain`,`chain`]],[[37],[`options`]],[[37],[`done`,`check`,`tick`,`complete`,`list`,`to-do`,`bom`]],[[37],[`todo`,`done`,`check`,`tick`,`complete`,`tasks`,`items`,`pending`]],[[37,3],[`options`,`items`,`collapse`,`expand`,`details`,`disclosure`,`show`,`hide`,`toggle`,`accordion`,`more`,`less`,`fold`,`unfold`,`vertical`]],[[37,3],[`options`,`items`,`collapse`,`expand`,`details`,`disclosure`,`show`,`hide`,`toggle`,`accordion`,`more`,`less`,`fold`,`unfold`,`vertical`]],[[37],[`items`,`collapse`,`expand`,`details`,`disclosure`,`show`,`hide`,`toggle`,`accordion`,`more`,`less`,`fold`,`unfold`]],[[23,37],[`queue`,`bottom`,`end`,`playlist`]],[[37],[`options`]],[[37,19],[`filter`,`plus`,`options`,`add`]],[[37,11],[`text`,`tab`]],[[37,11],[`text`,`tab`]],[[23,37],[`playlist`,`remove`,`song`,`subtract`,`delete`,`unqueue`]],[[23],[`playlist`,`queue`,`music`,`audio`,`playback`]],[[37],[`number`,`order`,`queue`]],[[23,37],[`playlist`,`add`,`song`,`track`,`new`]],[[23,37],[`reset`,`refresh`,`reload`,`playlist`,`replay`]],[[23,37],[`queue`,`top`,`start`,`next`,`playlist`]],[[37],[`todo`,`done`,`check`,`tick`,`complete`,`tasks`,`items`,`pending`]],[[14,37,19],[`tree`,`browser`]],[[23],[`playlist`,`video`,`playback`]],[[23,37],[`playlist`,`subtract`,`remove`,`delete`,`unqueue`]],[[9,23,19,10],[`loading`,`wait`,`busy`,`progress`,`spinner`,`spinning`,`throbber`]],[[9,23,19],[`loading`,`wait`,`busy`,`progress`,`spinner`,`spinning`,`throbber`,`circle`]],[[9,10],[`loading`,`wait`,`busy`,`progress`,`throbber`,`spinner`,`spinning`,`beach ball`,`frozen`,`freeze`]],[[25],[`map`,`gps`,`location`,`cross`]],[[25],[`map`,`gps`,`location`,`cross`]],[[25],[`map`,`gps`,`location`,`cross`]],[[31],[`security`,`password`,`secure`,`admin`]],[[31],[`security`,`password`,`secure`,`admin`]],[[31],[`security`]],[[31],[`security`]],[[3,1],[`sign in`,`arrow`,`enter`,`auth`]],[[3,1],[`sign out`,`arrow`,`exit`,`auth`]],[[37],[`options`,`list`,`menu`,`order`,`queue`,`tasks`,`logs`]],[[16],[`lolly`,`candy`,`sugar`,`food`,`sweet`,`dessert`,`spiral`]],[[41,40],[`baggage`,`luggage`,`travel`,`suitcase`]],[[10],[`horseshoe`,`lock`,`science`,`snap`]],[[37,1,20],[`email`,`message`,`letter`,`unread`]],[[20],[`email`,`message`,`letter`,`subscribe`,`delivered`,`success`,`read`,`done`,`todo`,`tick`,`complete`,`task`]],[[20],[`email`,`message`,`letter`,`remove`,`delete`]],[[20],[`email`,`message`,`letter`,`read`]],[[20],[`email`,`message`,`letter`,`add`,`create`,`new`,`compose`]],[[20],[`email`,`message`,`letter`,`delivery`,`undelivered`]],[[20],[`email`,`message`,`letter`,`search`,`lens`]],[[20],[`email`,`message`,`letter`,`delivery error`,`exclamation mark`]],[[20],[`email`,`message`,`letter`,`remove`,`delete`]],[[20],[`emails`,`messages`,`letters`,`mailing list`,`newsletter`]],[[20],[`emails`,`messages`,`letters`,`multiple`,`mailing list`,`newsletter`,`copy`]],[[37,25],[`location`,`navigation`,`travel`]],[[25,41],[`location`,`navigation`,`travel`,`drop`,`delete`,`remove`,`erase`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`done`,`tick`,`complete`,`task`,`added`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`done`,`tick`,`complete`,`task`,`added`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`home`,`living`,`building`,`residence`,`architecture`,`address`,`poi`,`real estate`,`property`,`navigation`,`destination`,`geolocation`,`place`,`landmark`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`delete`,`remove`,`erase`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`delete`,`remove`,`erase`]],[[25,41],[`location`,`waypoint`,`marker`,`remove`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`edit`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`add`,`create`,`new`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`add`,`create`,`new`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`delete`,`remove`,`erase`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`,`delete`,`remove`,`erase`]],[[25,41,1],[`location`,`waypoint`,`marker`,`drop`]],[[25],[`location`,`navigation`,`travel`,`new`,`add`,`create`]],[[22],[`gender`,`sex`,`male`,`masculine`,`man`,`boy`]],[[22],[`gender`,`androgyne`,`transgender`]],[[16],[`cocktail`,`alcohol`,`beverage`,`bar`,`drink`,`glass`]],[[19,10],[`fullscreen`,`expand`,`dashed`]],[[3,19,10],[`fullscreen`,`arrows`,`expand`]],[[35,17],[`prize`,`sports`,`winner`,`trophy`,`award`,`achievement`]],[[23,26],[`advertisement`,`announcement`,`attention`,`alert`,`loudspeaker`,`megaphone`,`notification`]],[[23,26],[`advertisement`,`announcement`,`attention`,`alert`,`loudspeaker`,`megaphone`,`notification`,`disable`,`silent`]],[[13],[`emoji`,`face`,`neutral`,`emotion`]],[[12,17],[`ram`,`random access`,`technology`,`computer`,`chip`,`circuit`,`specs`,`capacity`,`gigabytes`,`gb`]],[[19,1],[`bars`,`navigation`,`hamburger`,`options`]],[[11,3],[`combine`,`join`,`unite`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`]],[[34,1],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`moderate`,`check`,`done`,`todo`,`complete`]],[[11,34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`code review`,`coding`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`draft`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`positive`,`like`,`love`,`interest`,`valentine`,`dating`,`date`,`speech bubble`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`typing`,`writing`,`responding`,`ellipsis`,`etc`,`et cetera`,`...`,`…`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`clear`,`close`,`delete`,`remove`,`cancel`,`silence`,`mute`,`moderate`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`add`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`help`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`reply`,`response`]],[[34,26],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`report`,`abuse`,`offense`,`alert`,`danger`,`caution`,`protected`,`exclamation mark`]],[[1,34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`clear`,`close`,`delete`,`remove`,`cancel`,`silence`,`mute`,`moderate`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`]],[[34,1],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`moderate`,`check`,`done`,`todo`,`complete`]],[[11,34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`code review`,`coding`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`draft`]],[[11,14,34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`add`,`patch`,`difference`,`plus`,`minus`,`plus-minus`,`math`,`code review`,`coding`,`version control`,`git`]],[[34,26],[`unread`,`unresolved`,`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`positive`,`like`,`love`,`interest`,`valentine`,`dating`,`date`,`speech bubble`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`secure`,`encrypted`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`typing`,`writing`,`responding`,`ellipsis`,`etc`,`et cetera`,`...`,`…`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`clear`,`close`,`delete`,`remove`,`cancel`,`silence`,`mute`,`moderate`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`add`]],[[34,37],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`blockquote`,`quotation`,`indent`,`reply`,`response`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`reply`,`response`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`network`,`forward`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`]],[[34,26],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`report`,`abuse`,`offense`,`alert`,`danger`,`caution`,`protected`,`exclamation mark`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubble`,`clear`,`close`,`delete`,`remove`,`cancel`,`silence`,`mute`,`moderate`]],[[34],[`comment`,`chat`,`conversation`,`dialog`,`feedback`,`speech bubbles`,`copy`,`multiple`,`discussion`,`interview`,`debate`]],[[23,38],[`metronome`,`tempo`,`rhythm`,`beat`,`bpm`,`music`,`audio`,`sound`,`practice`,`timing`,`timer`,`time`,`pulse`,`sync`,`cadence`,`control`,`playback`,`studio`,`tool`]],[[12,7,8,23],[`record`,`sound`,`listen`,`radio`,`podcast`,`microphone`]],[[12,7,8,23],[`record`,`sound`,`mute`,`microphone`]],[[12,23],[`lyrics`,`voice`,`listen`,`sound`,`music`,`radio`,`podcast`,`karaoke`,`singing`,`microphone`]],[[12],[`processor`,`cores`,`technology`,`computer`,`chip`,`integrated circuit`,`memory`,`ram`,`specs`,`gpu`,`gigahertz`,`ghz`]],[[29,22],[`medical`,`education`,`science`,`imaging`,`research`]],[[16,18],[`oven`,`cooker`,`toaster oven`,`bake`]],[[3,25,11,17],[`signpost`,`direction`,`right`,`east`,`forward`,`version control`,`waypoint`]],[[16],[`lactose`,`bottle`,`beverage`,`drink`,`water`,`diet`]],[[16],[`lactose free`,`bottle`,`beverage`,`drink`,`water`,`allergy`,`intolerance`,`diet`]],[[19,10],[`exit fullscreen`,`close`,`shrink`]],[[3,19,10],[`exit fullscreen`,`arrows`,`close`,`shrink`]],[[21,11,37,39],[`subtract`,`remove`,`decrease`,`decrement`,`reduce`,`negative`,`calculate`,`line`,`divider`,`separator`,`horizontal rule`,`hr`,`html`,`markup`,`markdown`,`---`,`toolbar`,`operator`,`code`,`coding`,`minimum`,`downgrade`]],[[29,18,39],[`reflection`,`optics`,`glass`,`surface`,`image`,`physics`,`science`,`bathroom`,`decor`,`cosmetic`,`shiny`,`periscope`,`vanity`]],[[29,18,39],[`reflection`,`optics`,`glass`,`surface`,`image`,`physics`,`science`,`bathroom`,`vanity`,`makeup`,`decor`,`cosmetic`,`shiny`,`periscope`]],[[8,12],[`tv`,`screen`,`display`,`virtual machine`,`vm`]],[[8,12],[`tv`,`screen`,`display`,`desktop`,`running`,`active`,`virtual machine`,`vm`]],[[8,12,11],[`virtual machine`,`virtual desktop`,`vm`,`vdi`,`computing`,`remote work`,`monitoring`,`infrastructure`,`software as a service`,`saas`,`workstation`,`environment`,`tv`,`screen`,`display`]],[[8,12],[`tv`,`screen`,`display`,`virtual machine`,`vm`,`executable`,`settings`,`cog`,`edit`,`gear`,`configuration`,`preferences`,`system`,`control panel`,`network`,`computing`]],[[8,12],[`tv`,`screen`,`display`,`desktop`,`running`,`active`,`virtual machine`,`vm`]],[[8,12],[`tv`,`screen`,`display`,`desktop`,`download`]],[[8,12],[`share`]],[[8,12,23],[`tv`,`screen`,`display`,`desktop`,`video`,`movie`,`film`,`suspend`,`hibernate`,`boot`,`virtual machine`,`vm`]],[[8,12,23],[`tv`,`screen`,`display`,`desktop`,`video`,`movie`,`film`,`running`,`start`,`boot`,`virtual machine`,`vm`]],[[8,12],[`smartphone`,`phone`,`cellphone`,`device`,`mobile`,`desktop`,`monitor`,`responsive`,`screens`]],[[8,12],[`devices`,`connect`,`cast`]],[[8,12,23],[`tv`,`screen`,`display`,`desktop`,`video`,`movie`,`film`,`stop`,`shutdown`,`virtual machine`,`vm`]],[[8,12],[`tv`,`screen`,`display`,`upload`,`connect`,`remote`,`screen share`]],[[8,12],[`tv`,`screen`,`display`,`desktop`,`virtual machine`,`vm`,`close`,`stop`,`suspend`,`remove`,`delete`]],[[0],[`dark`,`night`]],[[0,42],[`dark`,`night`,`star`]],[[40],[`moto`,`motorcycle`,`transport`,`vehicle`,`drive`,`ride`,`trip`,`race`,`racing`,`journey`,`delivery`]],[[24,17],[`climb`,`hike`,`rock`]],[[24],[`alpine`,`climb`,`snow`]],[[12],[`device`,`scroll`,`click`]],[[12],[`device`,`scroll`,`click`]],[[12],[`device`,`scroll`,`click`,`disabled`]],[[3,9],[`click`,`select`]],[[3,9],[`click`,`select`]],[[3,9],[`pointer`,`mouse`,`cursor`,`off`,`disable`,`arrow`,`navigation`,`selection`,`select`,`click`,`no-click`,`interaction`]],[[3,9],[`wait`,`busy`,`loading`,`blocked`,`frozen`,`freeze`]],[[3,9],[`click`,`select`]],[[12],[`device`,`scroll`,`click`]],[[3,9],[`arrows`]],[[10],[`arrows`,`axis`,`gizmo`,`coordinates`,`transform`,`translate`]],[[3,9],[`double`,`arrow`]],[[3,9],[`double`,`arrow`]],[[3],[`arrow`,`direction`,`downwards`,`south`]],[[3],[`arrow`,`direction`]],[[3],[`arrow`,`direction`]],[[3,9],[`double`,`arrow`]],[[3],[`arrow`,`direction`,`back`,`west`]],[[3],[`arrow`,`direction`,`trend flat`,`east`]],[[3],[`arrow`,`direction`,`upwards`,`north`]],[[3],[`arrow`,`direction`]],[[3],[`arrow`,`direction`]],[[3,9],[`double`,`arrow`]],[[23,14],[`note`,`quaver`,`eighth note`]],[[23,14],[`quaver`,`eighth note`,`note`]],[[23,14],[`crotchet`,`minim`,`quarter note`,`half note`,`note`]],[[23,14],[`semiquaver`,`sixteenth note`,`note`]],[[25],[`location`,`travel`]],[[25],[`location`,`travel`]],[[25],[`location`,`travel`]],[[25],[`location`,`travel`]],[[11],[`tree`]],[[23,7],[`news`,`feed`,`home`,`magazine`,`article`,`headline`]],[[7,15,12],[`contactless`,`payment`,`near-field communication`]],[[22],[`gender`,`nonbinary`,`enby`]],[[37,7,34,10],`notepad.notes.stationery.sketchbook.moleskine.closure.strap.band.elastic.organizer.organiser.planner.diary.journal.writing.written.writer.reading.high school.university.college.academy.student.study.homework.research`.split(`.`)],[[37,34],[`pencil`,`notepad`,`notes`,`noted`,`stationery`,`sketchbook`,`organizer`,`organiser`,`planner`,`diary`,`journal`,`writing`,`write`,`written`,`reading`,`high school`,`university`,`college`,`academy`,`student`,`study`,`research`,`homework`,`eraser`,`rubber`]],[[1,7,34],[`notepad`,`notes`,`people`,`family`,`friends`,`acquaintances`,`contacts`,`details`,`addresses`,`phone numbers`,`directory`,`listing`,`networking`,`alphabetical`,`a-z`,`organizer`,`organiser`,`planner`,`diary`,`stationery`]],[[37,34],[`notepad`,`notes`,`pages`,`paper`,`stationery`,`sketchbook`,`organizer`,`organiser`,`planner`,`diary`,`journal`,`writing`,`write`,`written`,`reading`,`high school`,`university`,`college`,`academy`,`student`,`study`,`research`,`homework`,`lines`,`opened`]],[[37,34],[`notebook`,`notes`,`pages`,`paper`,`stationery`,`sketchbook`,`organizer`,`organiser`,`planner`,`diary`,`journal`,`writing`,`write`,`written`,`reading`,`high school`,`university`,`college`,`academy`,`student`,`study`,`homework`,`research`,`lines`,`opened`]],[[37,34],[`notebook`,`notes`,`pages`,`paper`,`stationery`,`diary`,`journal`,`writing`,`write`,`written`,`draft`,`template`,`lines`]],[[16],[`hazelnut`,`acorn`,`food`,`diet`]],[[16],[`hazelnut`,`acorn`,`food`,`allergy`,`intolerance`,`diet`]],[[32],[`stop`,`shape`]],[[26,32],[`warning`,`alert`,`danger`,`exclamation mark`]],[[40],[`stop`,`forbidden`,`subtract`,`remove`,`decrease`,`reduce`,`-`,`traffic`,`halt`,`restricted`]],[[23,32],[`music`,`audio`,`stop`]],[[21,26],[`delete`,`stop`,`alert`,`warning`,`times`,`clear`,`math`]],[[21,11,37,29],[`greek`,`symbol`,`mathematics`,`education`,`physics`,`engineering`,`ohms`,`electrical resistance`,`angular frequency`,`dynamical systems`,`astronomy`,`constellations`,`philosophy`]],[[11],[`keyboard`,`key`,`mac`,`alt`,`button`]],[[29],[`planet`,`space`,`physics`,`satellites`,`moons`]],[[2,10],[`paper`,`bird`]],[[14,11],[`box`,`container`,`storage`,`sealed`,`delivery`,`undelivered`,`unopened`,`packed`,`archive`,`zip`,`module`]],[[14,11],[`box`,`container`,`storage`,`sealed`,`packed`,`unopened`,`undelivered`,`archive`,`zip`]],[[11],[`confirm`,`verified`,`done`,`todo`,`tick`,`complete`,`task`,`delivered`]],[[11],[`delete`,`remove`]],[[14,11],[`box`,`container`,`storage`,`unpack`,`unarchive`,`unzip`,`opened`,`delivered`]],[[11],[`new`,`add`,`create`]],[[14,11],[`find`,`product process`,`lens`]],[[11],[`delete`,`remove`]],[[10,39],[`fill`,`paint`,`bucket`,`color`,`colour`]],[[37,10,18,39],[`brush`,`color`,`colour`,`decoration`,`diy`]],[[37,10,28,18,39],[`brush`,`paintbrush`,`design`,`color`,`colour`,`decoration`,`diy`]],[[37,10,28,18,39],[`brush`,`paintbrush`,`design`,`color`,`colour`,`decoration`,`diy`]],[[37,10,28],[`colors`,`colours`,`theme`,`scheme`,`paint`,`watercolor`,`watercolour`,`artist`]],[[2],[`animal`,`wildlife`,`bear`,`zoo`,`bamboo`]],[[19],[`drawer`,`dock`]],[[19,3],[`drawer`,`dock`,`hide`,`chevron`,`down`]],[[19],[`drawer`,`dock`,`show`,`reveal`,`padding`,`margin`,`guide`,`layout`,`bleed`]],[[19,3],[`drawer`,`dock`,`show`,`reveal`,`chevron`,`up`]],[[19],[`primary`,`drawer`]],[[19,3],[`primary`,`drawer`,`hide`,`chevron`,`<`]],[[19],[`sidebar`,`primary`,`drawer`,`show`,`reveal`,`padding`,`margin`,`guide`,`layout`,`bleed`]],[[19,3],[`primary`,`drawer`,`show`,`reveal`,`chevron`,`right`,`>`]],[[19],[`sidebar`,`primary`,`drawer`,`show`,`reveal`,`padding`,`margin`,`guide`,`layout`,`vertical`,`bleed`]],[[19],[`sidebar`,`secondary`,`drawer`]],[[19,3],[`sidebar`,`secondary`,`drawer`,`hide`,`chevron`,`>`]],[[19],[`sidebar`,`secondary`,`drawer`,`show`,`reveal`,`padding`,`margin`,`guide`,`layout`,`bleed`]],[[19,3],[`sidebar`,`secondary`,`drawer`,`show`,`reveal`,`chevron`,`left`,`<`]],[[19,10,11],[`drawer`,`browser`,`webpage`]],[[19],[`sidebar`,`primary`,`drawer`,`show`,`reveal`,`padding`,`margin`,`guide`,`layout`,`horizontal`,`bleed`]],[[19,3],[`menu bar`,`drawer`,`hide`,`chevron`,`up`]],[[19],[`menu bar`,`drawer`,`show`,`reveal`,`padding`,`margin`,`guide`,`layout`,`bleed`]],[[19,3],[`menu bar`,`drawer`,`show`,`reveal`,`chevron`,`down`]],[[19],[`drawers`,`sidebar`,`primary`]],[[19],[`drawers`,`sidebar`,`secondary`]],[[19,10,11],[`menu bar`,`sidebar`,`primary`,`drawers`,`window`,`webpage`,`projects`,`overview`]],[[37,10,14,20],[`attachment`,`file`]],[[11,14,21],[`code`,`token`,`parenthesis`,`parens`,`brackets`,`parameters`,`arguments`,`args`,`input`,`call`,`math`,`formula`,`function`,`(`,`)`]],[[40,25],[`driving`,`car park`,`pay`,`sidewalk`,`pavement`]],[[13],[`emoji`,`congratulations`,`celebration`,`party`,`tada`,`🎉`,`🎊`,`excitement`,`exciting`,`excites`,`confetti`]],[[23],[`music`,`stop`]],[[2],[`pets`,`vets`,`veterinarian`,`domesticated`,`cat`,`dog`,`bear`]],[[12,17],[`computer`,`chassis`]],[[37,10,39],[`pencil`,`change`,`create`,`draw`,`writer`,`writing`,`biro`,`ink`,`marker`,`felt tip`,`stationery`,`artist`]],[[37,10,39],[`pencil`,`change`,`create`,`draw`,`writer`,`writing`,`biro`,`ink`,`marker`,`felt tip`,`stationery`,`artist`]],[[37,10,39],[`disabled`,`inactive`,`non-editable`,`locked`,`read-only`,`unmodifiable`,`frozen`,`restricted`,`pencil`,`change`,`create`,`draw`,`writer`,`writing`,`biro`,`ink`,`marker`,`felt tip`,`stationery`,`artist`]],[[37,10,9],[`vector`,`drawing`,`path`]],[[10,9,39,37],[`rubber`,`edit`,`create`,`draw`,`sketch`,`draft`,`writer`,`writing`,`stationery`,`artist`]],[[37,10,39],[`pencil`,`change`,`create`,`draw`,`sketch`,`draft`,`writer`,`writing`,`biro`,`ink`,`marker`,`felt tip`,`stationery`,`artist`]],[[10,9,39,37],[`disabled`,`inactive`,`non-editable`,`locked`,`read-only`,`unmodifiable`,`frozen`,`restricted`,`rubber`,`edit`,`create`,`draw`,`sketch`,`draft`,`writer`,`writing`,`stationery`,`artist`]],[[39,10,19,37],`edit.create.draw.sketch.draft.writer.writing.stationery.artist.measurements.centimeters.cm.millimeters.mm.metre.foot.feet.inches.units.size.length.width.height.dimensions.depth.breadth.extent`.split(`.`)],[[32],[`shape`]],[[21,11,15,33],[`percentage`,`modulo`,`modulus`,`remainder`,`%`,`sale`,`discount`,`offer`,`marketing`]],[[0,27],[`people`,`human`,`accessibility`,`stick figure`]],[[15],[`currency`,`peso`,`money`,`php`]],[[37,8,12,7],[`call`]],[[8,12,7],[`ring`]],[[3,8,12,7],[`call`]],[[3,8,12,7],[`call`]],[[8,12,7],[`call`]],[[8,12,7],[`call`,`mute`]],[[3,8,12,7],[`call`]],[[11,21],[`constant`,`code`,`coding`,`programming`,`symbol`,`trigonometry`,`geometry`,`formula`]],[[23,12],[`music`,`audio`,`sound`,`noise`,`notes`,`chord`,`keys`,`octave`,`acoustic`,`instrument`,`play`,`pianist`,`performance`,`concert`]],[[39,17],[`mining`,`mine`,`land worker`,`extraction`,`labor`,`construction`,`progress`,`advancement`,`crafting`,`building`,`creation`]],[[23],[`display`,`play`,`video`,`pop out`,`always on top`,`window`,`inset`,`multitask`]],[[23],[`display`,`play`,`video`,`pop out`,`always on top`,`window`,`inset`,`multitask`]],[[15],[`money`,`savings`]],[[37],[`paragraph`,`mark`,`paraph`,`blind`,`typography`,`type`,`text`,`prose`,`symbol`]],[[37],[`direction`,`paragraph`,`mark`,`paraph`,`blind`,`typography`,`type`,`text`,`prose`,`symbol`]],[[37],[`direction`,`paragraph`,`mark`,`paraph`,`blind`,`typography`,`type`,`text`,`prose`,`symbol`]],[[22],[`medicine`,`medication`,`drug`,`prescription`,`tablet`,`pharmacy`]],[[22],[`medicine`,`medication`,`prescription`,`drug`,`supplement`,`vitamin`,`capsule`,`jar`,`container`,`healthcare`,`pharmaceutical`,`tablet`]],[[25,1],[`save`,`map`,`lock`,`fix`]],[[25],[`unpin`,`map`,`unlock`,`unfix`,`unsave`,`remove`]],[[37,10,29],[`eye dropper`,`color picker`,`lab`,`chemistry`]],[[16],[`pie`,`quiche`,`food`]],[[40,41,25],[`plane`,`trip`,`airplane`]],[[40,41],[`arrival`,`plane`,`trip`,`airplane`,`landing`]],[[40,41],[`departure`,`plane`,`trip`,`airplane`,`takeoff`]],[[3,23],[`music`,`audio`,`video`,`start`,`run`]],[[12,11],[`electricity`,`energy`,`electronics`,`socket`,`outlet`,`power`,`voltage`,`current`,`charger`]],[[12,11],[`electricity`,`energy`,`socket`,`outlet`]],[[12],[`electricity`,`energy`,`electronics`,`charge`,`charging`,`battery`,`connect`]],[[21,39,11,37,9,17],[`add`,`new`,`increase`,`increment`,`positive`,`calculate`,`toolbar`,`crosshair`,`aim`,`target`,`scope`,`sight`,`reticule`,`maximum`,`upgrade`,`extra`,`+`]],[[39],[`swiss army knife`,`penknife`,`multi-tool`,`multitask`,`blade`,`cutter`,`gadget`,`corkscrew`]],[[23,34],[`audio`,`music`,`mic`,`talk`,`voice`,`subscribe`,`subscription`,`stream`]],[[9],[`mouse`]],[[9],[`mouse`]],[[16,23],[`cinema`,`movies`,`films`,`salted`,`sweet`,`sugar`,`candy`,`snack`]],[[16],[`ice lolly`,`ice cream`,`sweet`,`food`]],[[15],[`currency`,`money`,`payment`]],[[8],[`on`,`off`,`device`,`switch`,`toggle`,`binary`,`boolean`,`reboot`,`restart`,`button`,`keyboard`,`troubleshoot`]],[[8],[`on`,`off`,`device`,`switch`]],[[23,28,12,7,10],[`screen`,`whiteboard`,`marker pens`,`markers`,`blackboard`,`chalk`,`easel`,`school`,`learning`,`lesson`,`office`,`meeting`,`project`,`planning`]],[[12],[`fax`,`office`,`device`]],[[12],[`fax`,`office`,`device`,`success`,`printed`]],[[12],[`fax`,`office`,`device`,`cross`,`cancel`,`remove`,`error`]],[[23,28,12,7],[`cinema`,`film`,`movie`,`home video`,`presentation`,`slideshow`,`office`,`meeting`,`project`,`planning`]],[[19,10,28,12],[`screens`,`sizes`,`rotate`,`rotation`,`adjust`,`aspect ratio`,`16:9`,`widescreen`,`4:3`,`resolution`,`responsive`,`mobile`,`desktop`,`dimensions`,`monitor`,`orientation`,`portrait`,`landscape`]],[[11,17],[`component`,`module`,`part`,`piece`]],[[32,21,41],[`prism`,`triangle`,`triangular`,`hierarchy`,`structure`,`geometry`,`ancient`,`egyptian`,`landmark`,`tourism`]],[[11,34],[`barcode`,`scan`,`link`,`url`,`information`,`digital`]],[[37],[`quotation`]],[[2],[`animal`,`rodent`,`pet`,`pest`,`bunny`,`hare`,`fast`,`speed`,`hop`]],[[25,31,7],[`scan`,`sonar`,`detect`,`find`,`locate`]],[[29],[`radioactive`,`nuclear`,`fallout`,`waste`,`atomic`,`physics`,`particle`,`element`,`molecule`]],[[11,21],[`calculate`,`formula`,`math`,`operator`,`root`,`square`,`symbol`]],[[12,23,34],[`signal`,`broadcast`,`connectivity`,`live`,`frequency`]],[[12],[`device`,`music`,`connect`]],[[12,23,34],[`signal`,`broadcast`,`connectivity`,`live`,`frequency`]],[[32,21,10,39],[`shape`,`circle`,`geometry`,`trigonometry`,`radii`,`calculate`,`measure`,`size`]],[[42],[`colors`,`colours`,`spectrum`,`light`,`prism`,`arc`,`clear`,`sunshine`]],[[2],[`mouse`,`mice`,`gerbil`,`rodent`,`pet`,`pest`,`plague`,`disease`]],[[19,10,28],[`screens`,`sizes`,`rotate`,`rotation`,`adjust`,`aspect ratio`,`proportions`,`16:9`,`widescreen`,`4:3`,`resolution`,`responsive`,`mobile`,`desktop`,`dimensions`,`monitor`,`orientation`,`portrait`,`landscape`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`dollar`,`usd`,`$`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`cents`,`dollar`,`usd`,`$`,`¢`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`€`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`inr`,`₹`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`jpy`,`¥`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`british`,`currency`,`gbp`,`£`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`rub`,`₽`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`chf`,`₣`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`details`,`small print`,`terms`,`conditions`,`contract`]],[[15,41],[`bill`,`voucher`,`slip`,`check`,`counterfoil`,`currency`,`try`,`₺`]],[[11,37],[`compose`,`keyboard`,`key`,`button`]],[[37,11],`login,password,authenticate,2fa,field,fill,ellipsis,et cetera,etc,loader,loading,progress,pending,throbber,menu,options,operator,code,spread,rest,more,further,extra,overflow,dots,…,...`.split(`,`)],[[12,17,23,8],[`vr`,`virtual`,`augmented`,`reality`,`headset`,`goggles`]],[[32,10],[`rectangle`,`aspect ratio`,`16:9`,`horizontal`,`shape`]],[[32,10],[`rectangle`,`aspect ratio`,`9:16`,`vertical`,`shape`]],[[36],[`sustainability`,`salvage`,`arrows`]],[[37,3],[`undo`,`rerun`,`history`]],[[37,3],[`undo`,`rerun`,`history`]],[[37,3],[`redo`,`history`,`step`,`over`,`forward`]],[[3],[`arrows`,`rotate`,`reload`,`rerun`,`synchronise`,`synchronize`,`circular`,`cycle`]],[[3,11],[`arrows`,`rotate`,`reload`,`synchronise`,`synchronize`,`circular`,`cycle`,`issue`,`code`,`coding`,`version control`]],[[3],[`rotate`,`reload`,`rerun`,`synchronise`,`synchronize`,`arrows`,`circular`,`cycle`]],[[3],[`rotate`,`reload`,`rerun`,`synchronise`,`synchronize`,`arrows`,`circular`,`cycle`,`cancel`,`no`,`stop`,`error`,`disconnect`,`ignore`]],[[16,18],[`frigerator`,`fridge`,`freezer`,`cooler`,`icebox`,`chiller`,`cold storage`]],[[37,11],[`search`,`text`,`code`]],[[37],[`text`,`font`,`typography`,`format`,`x`,`remove`,`delete`,`times`,`clear`]],[[3,23],[`loop`,`arrows`]],[[23],[`replay`]],[[3,34,23],[`arrows`,`retweet`,`repost`,`share`,`repeat`,`loop`]],[[37],[`search`,`substitute`,`swap`,`change`]],[[37],[`search`,`substitute`,`swap`,`change`]],[[20],[`email`]],[[20],[`email`]],[[3,23],[`music`]],[[34,22,13],[`awareness`,`strip`,`band`,`tape`,`strap`,`cordon`]],[[17,11],[`release`,`boost`,`launch`,`space`,`version`]],[[18],[`chair`,`furniture`,`seat`,`comfort`,`relax`]],[[25],[`attraction`,`entertainment`,`amusement park`,`theme park`,`funfair`]],[[24,30,36,18,34],[`roses`,`thorns`,`petals`,`plant`,`stem`,`leaves`,`spring`,`bloom`,`blossom`,`gardening`,`botanical`,`flora`,`florist`,`bouquet`,`bunch`,`gift`,`date`,`romance`,`romantic`,`valentines day`,`special occasion`]],[[10],[`gizmo`,`transform`,`orientation`,`orbit`,`axis`]],[[3,10,28],[`arrow`,`left`,`counter-clockwise`,`restart`,`reload`,`rerun`,`refresh`,`backup`,`undo`,`replay`,`redo`,`retry`,`rewind`,`reverse`]],[[31,1],[`password`,`key`,`refresh`,`change`]],[[19,10,28,39,3],[`left`,`counter-clockwise`,`rotate`,`image`,`90`,`45`,`degrees`,`°`]],[[3,10,28],[`arrow`,`right`,`clockwise`,`refresh`,`reload`,`rerun`,`redo`]],[[19,10,28,39,3],[`right`,`clockwise`,`rotate`,`image`,`90`,`45`,`degrees`,`°`]],[[25],[`path`,`journey`,`planner`,`points`,`stops`,`stations`]],[[25],[`path`,`journey`,`planner`,`points`,`stops`,`stations`,`reset`,`clear`,`cancelled`,`closed`,`blocked`]],[[11,12,8,18],[`computer`,`server`,`cloud`]],[[19,10,37],[`lines`,`list`,`queue`,`preview`,`panel`,`paragraphs`,`parallel`,`series`,`split`,`vertical`,`horizontal`,`half`,`center`,`middle`,`even`,`drawer`]],[[19,10,37],[`lines`,`list`,`queue`,`preview`,`paragraphs`,`parallel`,`series`,`split`,`vertical`,`horizontal`,`half`,`center`,`middle`,`even`,`drawers`]],[[19,10,37],[`lines`,`list`,`queue`,`preview`,`paragraphs`,`parallel`,`series`,`split`,`vertical`,`horizontal`,`half`,`center`,`middle`,`even`,`drawers`,`grill`]],[[11,34],[`feed`,`subscribe`,`news`,`updates`,`notifications`,`content`,`blog`,`articles`,`broadcast`,`syndication`,`reader`,`channels`,`posts`,`publishing`,`digest`,`alert`,`following`,`inbox`,`newsletter`,`weblog`,`podcast`]],[[39,10,19],[`measurements`,`centimeters`,`cm`,`millimeters`,`mm`,`metre`,`foot`,`feet`,`inches`,`units`,`size`,`length`,`width`,`height`,`dimensions`,`depth`,`breadth`,`extent`,`stationery`]],[[39,10,19],[`measurements`,`centimeters`,`cm`,`millimeters`,`mm`,`metre`,`foot`,`feet`,`inches`,`units`,`size`,`length`,`width`,`height`,`dimensions`,`depth`,`breadth`,`extent`,`stationery`]],[[15],[`currency`,`money`,`payment`]],[[40,41],[`ship`,`boat`,`harbor`,`harbour`,`dock`]],[[16,13],[`food`,`vegetarian`,`dish`,`restaurant`,`course`,`meal`,`side`,`vegetables`,`health`]],[[16],[`food`,`snack`,`dish`,`restaurant`,`lunch`,`meal`]],[[8,29],[`space station`,`orbit`,`transmitter`]],[[8,12,23],[`antenna`,`receiver`,`dish aerial`,`saucer`]],[[15],[`currency`,`money`,`payment`]],[[37,14],[`floppy disk`]],[[37,14],[`floppy disks`,`copy`]],[[37,14],[`floppy disk`,`unsalvageable`]],[[25,29,15],[`balance`,`legal`,`license`,`right`,`rule`,`law`,`justice`,`weight`,`measure`,`compare`,`judge`,`fair`,`ethics`,`decision`]],[[10],[`gizmo`,`transform`,`size`,`axis`]],[[10],[`scale`,`resize`,`design`]],[[12,33,31,34,17],[`qr-code`,`barcode`,`checkout`,`augmented reality`,`ar`,`target`,`surveillance`,`camera`,`lens`,`focus`,`frame`,`select`,`box`,`boundary`,`bounds`,`area`,`square`,`dashed`]],[[33,12],[`checkout`,`till`,`cart`,`transaction`,`purchase`,`buy`,`product`,`packaging`,`retail`,`consumer`]],[[28,23,0,31,12,1],[`preview`,`zoom`,`expand`,`fullscreen`,`gallery`,`image`,`camera`,`watch`,`surveillance`,`retina`,`focus`,`lens`,`biometric`,`identification`,`authentication`,`access`,`login`]],[[1,31,12,34],[`face`,`biometric`,`identification`,`authentication`,`2fa`,`access`,`login`,`dashed`]],[[22],[`health`,`heart rate`,`pulse`,`monitoring`,`healthiness`,`screening`,`dashed`]],[[12,33],[`checkout`,`till`,`cart`,`transaction`,`purchase`,`buy`,`product`,`packaging`,`retail`,`consumer`,`qr-code`,`dashed`]],[[1,33,12,31],[`barcode`,`scan`,`qrcode`,`url`,`information`,`digital`,`scanner`]],[[28,23,0],[`preview`,`zoom`,`expand`,`fullscreen`,`gallery`,`image`,`focus`,`lens`]],[[37,12],[`recognition`,`read`,`translate`,`copy`,`lines`]],[[5,25],[`building`,`education`,`childhood`,`university`,`learning`,`campus`,`scholar`,`student`,`lecture`,`degree`,`course`,`academia`,`study`,`knowledge`,`classroom`,`research`,`diploma`,`graduation`,`professor`,`tutorial`,`homework`,`assignment`,`exam`]],[[37,10,39],[`cut`,`snip`,`chop`,`stationery`,`crafts`]],[[10,39],[`cut here`,`along`,`snip`,`chop`,`stationery`,`crafts`,`instructions`,`diagram`]],[[40],[`vehicle`,`drive`,`trip`,`journey`,`transport`,`electric`,`ride`,`urban`,`commute`,`speed`]],[[8,12,7],[`host`,`desktop`,`monitor`]],[[8,12,7],[`desktop`,`disconnect`,`monitor`]],[[17,11,37],[`paper`,`log`,`scripture`,`document`,`notes`,`parchment`,`list`,`long`,`script`,`story`,`code`,`coding`]],[[17,11,37],[`paper`,`log`,`scripture`,`document`,`notes`,`parchment`,`list`,`long`,`script`,`story`,`code`,`coding`]],[[37,34],[`find`,`scan`,`magnifier`,`magnifying glass`,`lens`]],[[37,34],[`find`,`scan`,`magnifier`,`magnifying glass`,`stop`,`warning`,`alert`,`error`,`anomaly`,`lens`]],[[37,34],[`find`,`scan`,`magnifier`,`magnifying glass`,`found`,`correct`,`complete`,`tick`,`lens`]],[[37,34,11],[`find`,`scan`,`magnifier`,`magnifying glass`,`grep`,`chevrons`,`<>`,`lens`]],[[37,34],[`find`,`scan`,`magnifier`,`magnifying glass`,`stop`,`clear`,`cancel`,`abort`,`/`,`lens`]],[[37,34],[`find`,`scan`,`magnifier`,`magnifying glass`,`stop`,`clear`,`cancel`,`abort`,`lens`]],[[37],[`mark`,`typography`,`punctuation`,`legal`,`type`,`text`,`prose`,`symbol`]],[[20,7,8],[`email`,`message`,`mail`,`paper airplane`,`paper aeroplane`,`submit`]],[[20,7,8],[`email`,`message`,`mail`,`paper airplane`,`paper aeroplane`,`submit`]],[[10,19],[`bring`,`send`,`move`,`under`,`back`,`backwards`,`overlap`,`layer`,`order`]],[[37,3,19],[`move`,`split`]],[[37,3,19],[`move`,`split`]],[[11,12],[`cloud`,`storage`]],[[11,12],[`cloud`,`storage`,`computing`,`cog`,`gear`]],[[11,12],[`cloud`,`storage`,`problem`,`error`]],[[11,12],[`cloud`,`storage`]],[[1],[`cog`,`edit`,`gear`,`preferences`]],[[1],[`cog`,`edit`,`gear`,`preferences`,`slider`]],[[32,17],[`triangle`,`equilateral`,`square`,`circle`,`classification`,`different`,`collection`,`toy`,`blocks`,`learning`]],[[1,34],[`network`,`connections`]],[[1,34],[`network`,`connections`]],[[37,14],[`spreadsheets`,`table`,`excel`]],[[2,11,24,29,41,16,18],`beach.sand.holiday.sealife.fossil.ammonite.biology.ocean.terminal.command line.session.bash.zsh.roll.wrap.chewing gum.bubble gum.sweet.sugar.hosepipe.carpet.string.spiral.spinner.hypnotise.hypnosis`.split(`.`)],[[18],[`ledge`,`rack`,`storage`,`inventory`,`furniture`,`sill`,`shelves`,`shelf`,`organize`,`display`,`store`,`arrange`,`unit`,`cabinet`,`fixture`,`retail`,`warehouse`]],[[1,31,11,17,32],`cybersecurity.secure.safety.protection.guardian.armored.armoured.defense.defence.defender.block.threat.prevention.antivirus.vigilance.vigilant.detection.scan.find.strength.strong.tough.invincible.invincibility.invulnerable.undamaged.audit.admin.verification.crest.bravery.knight.foot soldier.infantry.trooper.pawn.battle.war.military.army.cadet.scout`.split(`.`)],[[1,31,11,26,17],`unshielded.cybersecurity.insecure.unsecured.safety.unsafe.protection.unprotected.guardian.unguarded.unarmored.unarmoured.defenseless.defenceless.undefended.defender.blocked.stopped.intercepted.interception.saved.thwarted.threat.prevention.unprevented.antivirus.vigilance.vigilant.detection.detected.scanned.found.exploit.vulnerability.vulnerable.weakness.infection.infected.comprimised.data leak.audited.admin.verification.unverified.uncertified.warning.emergency.attention.urgent.alarm.crest.bravery.strength.tough.attacked.damaged.injured.hit.expired.disabled.inactive.error.exclamation mark.!`.split(`.`)],[[1,31,11,17],`unshielded.cybersecurity.insecure.unsecured.safety.unsafe.protection.unprotected.guardian.unguarded.unarmored.unarmoured.defenseless.defenceless.undefended.defender.blocked.stopped.intercepted.interception.saved.thwarted.threat.prevention.unprevented.antivirus.vigilance.vigilant.detection.detected.scanned.found.exploit.vulnerability.vulnerable.weakness.infection.infected.comprimised.data leak.audited.admin.verification.unverified.uncertified.cancel.error.crest.bravery.attacked.damaged.injured.hit.expired.eliminated.disabled.inactive./`.split(`.`)],[[1,31,11,17],`cybersecurity.secured.safety.protection.protected.guardian.guarded.armored.armoured.defense.defence.defended.blocked.threat.prevention.prevented.antivirus.vigilance.vigilant.active.activated.enabled.detection.scanned.found.strength.strong.tough.invincible.invincibility.invulnerable.undamaged.audited.admin.verification.verified.certification.certified.tested.passed.qualified.cleared.cleaned.disinfected.uninfected.task.completed.todo.done.ticked.checked.crest.bravery`.split(`.`)],[[1,31,11,17],`cybersecurity,securing,protecting,guarding,armoring,armouring,defending,blocking,preventing,antivirus,detecting,scanning,finding,auditing,admin,verifying,crest,upgrading,loader,loading,throbber,progress,dots,more,etc,...,…`.split(`,`)],[[1,31,11,17],`cybersecurity.secure.safety.protection.guardian.armored.armoured.defense.defence.defender.block.threat.prevention.antivirus.vigilance.vigilant.detection.scan.strength.strong.tough.invincible.invincibility.invulnerable.undamaged.audit.admin.verification.crest.logo.sigil.flag.team.faction.fraternity.university.college.academy.school.education.uniform.bravery.knight.foot soldier.infantry.trooper.pawn.battle.war.military.ranking.army.cadet.scout`.split(`.`)],[[1,31,11,17],`unshield.cybersecurity.unsecure.unguard.unblock.antivirus.clean.clear.disinfect.patch.fix.stop.cancel.remove.relax.admin.crest.bravery.weakened.damaged.hit.unarm.disable.deactivate.decommission.downgraded.minimum.-`.split(`.`)],[[1,31,11,17],`unshielded.cybersecurity.insecure.unsecured.safety.unsafe.protection.unprotected.guardian.unguarded.unarmored.unarmoured.defenseless.defenceless.undefended.defender.interception.threat.prevention.unprevented.antivirus.detection.undetected.exploit.vulnerability.vulnerable.weakness.infected.infection.comprimised.data leak.unaudited.admin.verification.unverified.inactive.cancelled.error.crest.bravery.damaged.injured.hit.expired.eliminated`.split(`.`)],[[1,31,11,17,22],`cybersecurity.secure.safety.protection.guardian.armored.armoured.defense.defence.defender.block.threat.prevention.antivirus.vigilance.vigilant.detection.scan.strength.strong.tough.invincible.invincibility.invulnerable.undamaged.extra.added.professional.enterprise.full.maximum.upgraded.ultra.activate.enable.audit.admin.verification.crest.medic.+`.split(`.`)],[[1,31,11,17],`unshielded.cybersecurity.insecure.unsecured.safety.unsafe.protection.unprotected.guardian.unguarded.unarmored.unarmoured.defenseless.defenceless.undefended.defender.threat.prevention.unprevented.antivirus.vigilance.vigilant.detection.undetected.scan.find.exploit.vulnerability.vulnerable.weakness.infection.comprimised.data leak.audit.admin.verification.unverified.uncertified.uncertain.unknown.inactive.crest.question mark.?`.split(`.`)],[[1,31,11],[`shield`,`user`,`admin`,`protection`,`protected`,`safety`,`guard`]],[[1,31,11,17],`unshielded.cybersecurity.insecure.unsecured.safety.unsafe.protection.unprotected.guardian.unguarded.unarmored.unarmoured.defenseless.defenceless.undefended.defender.blocked.stopped.intercepted.interception.saved.thwarted.threat.prevention.prevented.antivirus.vigilance.vigilant.detection.detected.scanned.found.exploit.vulnerability.vulnerable.weakness.infection.infected.comprimised.data leak.audited.admin.verification.unverified.inactive.cancel.error.wrong.false.crest.bravery.attacked.damaged.injured.hit.dead.deceased.expired.eliminated.exterminated`.split(`.`)],[[40,25,41],[`boat`,`knots`,`nautical mile`,`maritime`,`sailing`,`yacht`,`cruise`,`ocean liner`,`tanker`,`vessel`,`navy`,`trip`,`releases`]],[[40,25,41],[`steering`,`rudder`,`boat`,`knots`,`nautical mile`,`maritime`,`sailing`,`yacht`,`cruise`,`ocean liner`,`tanker`,`vessel`,`navy`,`trip`]],[[33],[`t-shirt`,`shopping`,`store`,`clothing`,`clothes`]],[[33],[`ecommerce`,`cart`,`purchase`,`store`]],[[33],[`cart`,`e-commerce`,`store`,`purchase`,`products`,`items`,`ingredients`]],[[33],[`trolley`,`cart`,`basket`,`e-commerce`,`store`,`purchase`,`products`,`items`,`ingredients`]],[[24,39,17],[`dig`,`spade`,`treasure`]],[[18,41],[`shower`,`bath`,`bathroom`,`amenities`,`services`]],[[20,14],[`file`,`paper`,`tear`,`cut`,`delete`,`destroy`,`remove`,`erase`,`document`,`destruction`,`secure`,`security`,`confidential`,`data`,`trash`,`dispose`,`disposal`,`information`,`waste`,`permanent`]],[[2],[`seafood`,`shellfish`,`crustacean`,`prawn`,`scallop`,`whelk`,`arthropod`,`littleneck`,`quahog`,`cherrystone`]],[[19,3],[`scale`,`fullscreen`]],[[24],[`forest`,`undergrowth`,`park`,`nature`]],[[23,3],[`music`,`random`,`reorder`]],[[37,21,29],[`sum`,`calculate`,`formula`,`math`,`enumeration`,`enumerate`]],[[8],[`connection`,`wireless`,`gsm`,`phone`,`2g`,`3g`,`4g`,`5g`]],[[8],[`connection`,`wireless`,`gsm`,`phone`,`2g`,`3g`,`4g`,`5g`]],[[8],[`connection`,`wireless`,`gsm`,`phone`,`2g`,`3g`,`4g`,`5g`]],[[8],[`connection`,`wireless`,`gsm`,`phone`,`2g`,`3g`,`4g`,`5g`]],[[8],[`connection`,`wireless`,`gsm`,`phone`,`2g`,`3g`,`4g`,`5g`,`lost`]],[[37],[`text`,`format`,`input`,`contract`,`autograph`,`handwriting`,`sign`,`cursive`,`ink`,`scribble`,`authorize`,`personal`,`agreement`,`legal`,`document`,`identity`,`authentic`,`approval`,`verification`,`unique`]],[[3,25,11,17],[`bidirectional`,`left`,`right`,`east`,`west`]],[[3,25,11,17],[`bidirectional`,`left`,`right`,`east`,`west`]],[[22],[`police`,`ambulance`,`emergency`,`security`,`alert`,`alarm`,`light`]],[[23,3],[`arrow`,`previous`,`music`]],[[23,3],[`arrow`,`skip`,`next`,`music`]],[[17],[`death`,`danger`,`bone`]],[[11,21],[`divide`,`division`,`or`,`/`]],[[10],[`cutter`,`scalpel`,`knife`]],[[1],[`settings`,`filters`,`controls`]],[[1],[`settings`,`controls`]],[[8,12],[`phone`,`cellphone`,`device`,`screen`]],[[8,12],[`phone`,`cellphone`,`device`,`power`,`screen`]],[[7,15,12],[`contactless`,`payment`,`near-field communication`,`screen`]],[[13,1],[`emoji`,`face`,`happy`,`good`,`emotion`]],[[13,34,26,7],[`emoji`,`face`,`happy`,`good`,`emotion`,`react`,`reaction`,`add`]],[[2,16],[`animal`,`insect`,`slow`,`speed`,`delicacy`,`spiral`]],[[42,30],[`cold`,`weather`,`freeze`,`snow`,`winter`]],[[18,41],[`wash`,`bath`,`water`,`liquid`,`fluid`,`wet`,`moisture`,`damp`,`bead`,`globule`]],[[18],[`armchair`,`furniture`,`leisure`,`lounge`,`loveseat`,`couch`]],[[18,29,36,42],[`solar panel`,`solar`,`panel`,`sun`,`energy`,`electricity`,`light`]],[[16],[`food`,`dish`,`restaurant`,`course`,`meal`,`bowl`,`starter`]],[[37],[`text`,`selection`,`letters`,`characters`,`font`,`typography`]],[[32,17],[`shape`,`suit`,`playing`,`cards`]],[[32],[`star`,`effect`,`filter`,`night`,`magic`,`shiny`,`glitter`,`twinkle`,`celebration`]],[[9,23,17,42],[`stars`,`effect`,`filter`,`night`,`magic`]],[[23,12],[`sound`,`audio`,`music`,`tweeter`,`subwoofer`,`bass`,`production`,`producer`,`dj`]],[[0,7],[`disability`,`disabled`,`dda`,`human`,`accessibility`,`people`,`sound`]],[[37,11],[`spelling`,`error`,`mistake`,`oversight`,`typo`,`correction`,`code`,`linter`,`a`]],[[37,11],[`spelling`,`error`,`mistake`,`oversight`,`typo`,`correction`,`code`,`linter`,`a`]],[[10],[`path`,`pen`,`tool`,`shape`,`curve`,`draw`]],[[3,9,10,39],[`path`,`tool`,`curve`,`node`,`click`,`pointer`,`target`,`vector`]],[[11,3],[`break`,`disband`,`divide`,`separate`,`branch`,`disunite`]],[[7,39,34],[`bobbin`,`spindle`,`yarn`,`thread`,`string`,`sewing`,`needlework`]],[[12,28,23,7],[`winner`,`soapbox`,`stage`,`entertainment`,`drama`,`podium`,`actor`,`actress`,`singer`,`light`,`beam`,`play`,`theatre`,`show`,`focus`,`concert`,`performance`,`lens`,`leaderboard`,`followspot`,`best`,`highlight`]],[[10,39],[`paint`,`color`,`graffiti`,`decoration`,`aerosol`,`deodorant`,`shaving foam`,`air freshener`]],[[24,17,36],[`eco`,`green`,`growth`,`leaf`,`nature`,`plant`,`seed`,`spring`,`sustainability`]],[[32,23],[`stop`,`playback`,`music`,`audio`,`video`,`rectangle`,`aspect ratio`,`1:1`,`shape`]],[[22,34,29,23],`pulse.action.motion.movement.exercise.fitness.healthcare.heart rate monitor.vital signs.vitals.emergency room.er.intensive care.hospital.defibrillator.earthquake.siesmic.magnitude.richter scale.aftershock.tremor.shockwave.audio.waveform.synthesizer.synthesiser.music`.split(`.`)],[[3,17],[`backwards`,`reverse`,`direction`,`south`,`sign`,`keyboard`,`button`]],[[3,17],[`direction`,`south-west`,`diagonal`,`sign`,`turn`,`keyboard`,`button`]],[[3,17],[`direction`,`south-east`,`diagonal`,`sign`,`turn`,`keyboard`,`button`]],[[3],[`previous`,`back`,`direction`,`west`,`sign`,`keyboard`,`button`,`<-`]],[[3],[`outwards`,`direction`,`south-west`,`diagonal`]],[[3],[`outwards`,`direction`,`south-east`,`diagonal`]],[[3],[`outwards`,`direction`,`north-west`,`diagonal`]],[[3,34],[`outwards`,`direction`,`north-east`,`diagonal`,`share`,`open`,`external`,`link`]],[[3],[`next`,`forward`,`direction`,`west`,`sign`,`keyboard`,`button`,`->`]],[[3,32,19,23],[`left`,`in`,`inside`,`input`,`insert`,`source`,`import`,`place`,`->`]],[[3,32,19,23],[`out`,`outside`,`output`,`export`,`->`]],[[3],[`forward`,`direction`,`north`,`sign`,`keyboard`,`button`]],[[3],[`direction`,`north-west`,`diagonal`,`sign`,`keyboard`,`button`]],[[3,34],[`direction`,`north-east`,`diagonal`,`sign`,`keyboard`,`button`,`share`]],[[37,31,21,11],[`password`,`secret`,`access`,`key`,`multiply`,`multiplication`,`glob pattern`,`wildcard`,`*`]],[[37,10,39,14,11],[`cut`,`snippet`,`chop`,`stationery`,`crafts`]],[[10,28],[`reflect`,`mirror`,`alignment`,`dashed`]],[[10,28],[`reflect`,`mirror`,`alignment`,`dashed`]],[[6,38,11,10],[`projects`,`manage`,`overview`,`roadmap`,`plan`,`intentions`,`timeline`,`deadline`,`date`,`event`,`range`,`period`,`productivity`,`work`,`agile`,`code`,`coding`,`toolbar`,`button`]],[[26],[`done`,`todo`,`tick`,`complete`,`task`]],[[26],[`done`,`todo`,`tick`,`complete`,`task`]],[[3,25],[`back`,`menu`,`panel`]],[[3,25],[`back`,`previous`,`less than`,`fewer`,`menu`,`panel`,`button`,`keyboard`,`<`]],[[3,25,11],[`forward`,`next`,`more than`,`greater`,`menu`,`panel`,`code`,`coding`,`command line`,`terminal`,`prompt`,`shell`,`console`,`>`]],[[3,25,21],[`caret`,`keyboard`,`button`,`mac`,`control`,`ctrl`,`superscript`,`exponential`,`power`,`ahead`,`menu`,`panel`,`^`]],[[37,11],[`gist`,`source`,`programming`,`html`,`xml`,`coding`]],[[37,10],[`selection`,`square`,`rectangular`,`marquee`,`tool`,`dashed`,`box`]],[[11,14],[`rectangle`,`aspect ratio`,`1:1`,`shape`,`snippet`,`code`,`coding`]],[[11,14],[`rectangle`,`aspect ratio`,`1:1`,`shape`,`snippet`,`code`,`coding`]],[[6,11,10],[`projects`,`manage`,`overview`,`board`,`tickets`,`issues`,`roadmap`,`plan`,`intentions`,`productivity`,`work`,`agile`,`draft`,`template`,`boilerplate`,`code`,`coding`]],[[3,9,11,39],[`inspector`,`element`,`mouse`,`click`,`pointer`,`box`,`browser`,`selector`,`target`,`dom`,`node`]],[[10,11,19],[`square`,`border`,`width`,`layout`,`style`,`design`,`rectangular`,`marquee`,`dashed`,`box`,`rectangle`,`aspect ratio`,`1:1`]],[[21],[`calculate`,`math`,`÷`,`/`]],[[11],[`git`,`diff`,`modified`,`.`]],[[21],[`calculate`,`=`]],[[11,21],[`programming`,`code`,`automation`,`math`]],[[6,11,10],[`projects`,`manage`,`overview`,`board`,`tickets`,`issues`,`roadmap`,`plan`,`intentions`,`productivity`,`work`,`agile`,`code`,`coding`,`toolbar`,`button`]],[[37,28,23,25,11],[`books`,`reading`,`written`,`authors`,`stories`,`fiction`,`novels`,`information`,`knowledge`,`education`,`high school`,`university`,`college`,`academy`,`learning`,`study`,`research`,`collection`,`vinyl`,`records`,`albums`,`music`,`package`]],[[40,25],[`metro`,`subway`,`underground`,`track`,`line`]],[[19],[`bars`,`navigation`,`hamburger`,`options`,`menu bar`,`panel`]],[[21,11,37,39,12],[`subtract`,`remove`,`decrease`,`reduce`,`calculator`,`button`,`keyboard`,`line`,`divider`,`separator`,`horizontal rule`,`hr`,`html`,`markup`,`markdown`,`---`,`toolbar`,`operator`,`code`,`coding`,`minimum`,`downgrade`]],[[3,9,11,39],[`inspector`,`element`,`mouse`,`click`,`pointer`,`box`,`browser`,`selector`,`target`,`dom`,`node`]],[[40,25],[`parking lot`,`car park`]],[[40,25],[`parking lot`,`car park`,`no parking`]],[[23],[`music`,`audio`,`stop`]],[[37],[`pencil`,`edit`,`change`,`create`,`draw`,`sketch`,`draft`,`writer`,`writing`,`biro`,`ink`,`marker`,`felt tip`,`stationery`,`artist`]],[[34,15,33,21],[`verified`,`unverified`,`sale`,`discount`,`offer`,`marketing`,`sticker`,`price tag`]],[[11,21],[`constant`,`code`,`coding`,`programming`,`symbol`,`trigonometry`,`geometry`,`formula`]],[[37],[`paragraph`,`mark`,`paraph`,`blind`,`typography`,`type`,`text`,`prose`,`symbol`]],[[3,23],[`music`,`audio`,`video`,`start`,`run`]],[[21,39,11,37],[`add`,`new`,`increase`,`increment`,`positive`,`calculate`,`calculator`,`button`,`keyboard`,`toolbar`,`maximum`,`upgrade`,`extra`,`operator`,`join`,`concatenate`,`code`,`coding`,`+`]],[[8],[`on`,`off`,`device`,`switch`,`toggle`,`binary`,`boolean`,`reboot`,`restart`,`button`,`keyboard`,`troubleshoot`]],[[11,21],[`calculate`,`formula`,`math`,`operator`,`root`,`square`,`symbol`]],[[10,11,19],[`border`,`radius`,`style`,`design`,`corner`,`layout`,`round`,`rounded`]],[[37,10,39,14,11],[`cut`,`snippet`,`chop`,`stationery`,`crafts`,`toolbar`,`button`]],[[37,21],[`sum`,`calculate`,`formula`,`math`,`enumeration`,`enumerate`]],[[11,21],[`git`,`diff`,`ignored`,`divide`,`division`,`shortcut`,`or`,`/`]],[[19],[`split`,`divide`]],[[19],[`split`,`divide`]],[[19],[`float`,`center`,`rectangle`]],[[37,14,11],[`versions`,`clone`,`copy`,`duplicate`,`multiple`,`revisions`,`version control`,`backup`,`history`]],[[35,17],[`badge`,`medal`,`honour`,`decoration`,`order`,`pin`,`laurel`,`trophy`,`medallion`,`insignia`,`bronze`,`silver`,`gold`]],[[23],[`media`,`music`]],[[11],[`code`,`command line`,`prompt`,`shell`]],[[1],[`person`,`account`,`contact`]],[[1],[`person`,`account`,`contact`]],[[21,26],[`cancel`,`close`,`delete`,`remove`,`times`,`clear`,`math`,`multiply`,`multiplication`]],[[10],[`square`,`pathfinder`,`path`,`exclude`,`invert`,`xor`,`shape`,`vector`]],[[10],[`square`,`pathfinder`,`path`,`intersect`,`shape`,`include`,`vector`]],[[10],[`square`,`pathfinder`,`path`,`minus`,`subtract`,`subtraction`,`shape`,`front`,`vector`]],[[10],[`square`,`pathfinder`,`path`,`unite`,`union`,`shape`,`merge`,`vector`]],[[32],[`shape`]],[[11,32,10],[`shape`,`pending`,`progress`,`issue`,`draft`,`code`,`coding`,`version control`]],[[2],[`animal`,`rodent`,`pet`,`pest`,`nuts`,`retrieve`,`updates`,`storage`,`stash`]],[[10,9,39],[`mark`,`print`,`clone`,`loyalty`,`library`]],[[1,34,32,23,42,13,17],[`bookmark`,`favorite`,`like`,`review`,`rating`]],[[34,23],[`bookmark`,`favorite`,`like`,`review`,`rating`]],[[23,34],[`dislike`,`unlike`,`remove`,`unrate`]],[[23,3],[`arrow`,`previous`,`music`,`left`,`reverse`]],[[23,3],[`arrow`,`next`,`music`,`right`,`continue`]],[[29,22],[`phonendoscope`,`medical`,`heart`,`lungs`,`sound`]],[[34],[`reaction`,`emotion`,`smile`,`happy`,`feedback`]],[[37,34],[`post-it`,`comment`,`annotation`,`reaction`,`memo`,`reminder`,`todo`,`task`,`idea`,`brainstorm`,`document`,`page`,`paper`,`sheet`,`stationary`,`office`]],[[24],[`mineral`,`geology`,`nature`,`solid`,`pebble`,`crystal`,`ore`,`hard`,`coal`,`stone`,`rock`,`boulder`]],[[5,25,33],[`shop`,`supermarket`,`stand`,`boutique`,`building`]],[[19],[`items`,`flex`,`justify`,`distribute`]],[[19],[`items`,`flex`,`justify`,`distribute`]],[[37],[`cross out`,`delete`,`remove`,`format`]],[[37],[`text`]],[[0,42,30,36],[`brightness`,`weather`,`light`,`summer`]],[[0,42],[`brightness`,`dim`,`low`,`brightness low`]],[[0,42],[`brightness`,`medium`]],[[0],[`dark`,`light`,`moon`,`sun`,`brightness`,`theme`,`auto theme`,`system theme`,`appearance`]],[[42],[`weather`,`air conditioning`,`temperature`,`hot`,`cold`,`seasons`]],[[3,42,38],[`weather`,`time`,`morning`,`day`]],[[3,42],[`weather`,`time`,`evening`,`night`]],[[37],[`text`,`exponent`]],[[10,18,28],[`colors`,`colours`,`swatches`,`pantone`,`shades`,`tint`,`hue`,`saturation`,`brightness`,`theme`,`scheme`,`palette`,`samples`,`textile`,`carpet`]],[[15],[`currency`,`money`,`payment`]],[[7,12],[`photo`,`selfie`,`front`,`back`]],[[17,39],[`battle`,`challenge`,`game`,`war`,`weapon`]],[[17,39],[`battle`,`challenge`,`game`,`war`,`weapon`]],[[29,22],[`medicine`,`medical`,`needle`,`pump`,`plunger`,`nozzle`,`blood`]],[[37,14],[`spreadsheet`,`grid`]],[[37,14],[`spreadsheet`,`grid`]],[[37,14],[`spreadsheet`,`grid`,`row`]],[[37,14],[`spreadsheet`,`grid`,`row`]],[[37,14],[`spreadsheet`,`grid`,`cut`,`break`,`divide`,`separate`,`segment`]],[[37],[`toc`,`outline`,`navigation`,`document structure`,`index`,`overview`,`sections`,`chapters`,`content`,`documentation`,`manual`,`knowledge base`,`faq`]],[[37,11,14],[`property list`,`plist`,`spreadsheet`,`grid`,`dictionary`,`object`,`hash`]],[[37,14],[`spreadsheet`,`grid`,`cut`,`break`,`divide`,`separate`,`segment`]],[[12],[`device`]],[[12,10,11,39],[`responsive`,`screens`,`browser`,`testing`,`mobile`]],[[22],[`medicine`,`medication`,`drug`,`prescription`,`pills`,`pharmacy`]],[[1],[`label`,`badge`,`ticket`,`mark`]],[[1],[`labels`,`badges`,`tickets`,`marks`,`copy`,`multiple`]],[[21,17],[`count`,`score`,`enumerate`,`days`,`one`,`1`,`first`,`bar`,`prison`,`cell`,`sentence`]],[[21,17],[`count`,`score`,`enumerate`,`days`,`two`,`2`,`second`,`double`,`bars`,`prison`,`cell`,`sentence`]],[[21,17],[`count`,`score`,`enumerate`,`days`,`three`,`3`,`third`,`triple`,`bars`,`prison`,`cell`,`sentence`]],[[21,17],[`count`,`score`,`enumerate`,`days`,`4`,`fourth`,`quadruple`,`bars`,`prison`,`cell`,`sentence`]],[[21,17],[`count`,`score`,`enumerate`,`days`,`five`,`5`,`fifth`,`bars`,`prison`,`cell`,`sentence`,`slash`,`/`]],[[32,21,10,39],[`tangential`,`shape`,`circle`,`geometry`,`trigonometry`,`bezier curve`]],[[4,17],[`logo`,`bullseye`,`deadline`,`projects`,`overview`,`work`,`productivity`]],[[29,11,39],[`astronomy`,`space`,`discovery`,`exploration`,`explore`,`vision`,`perspective`,`focus`,`stargazing`,`observe`,`view`]],[[41,24,36],[`tipi`,`teepee`,`wigwam`,`lodge`,`camping`,`campsite`,`holiday`,`retreat`,`nomadic`,`native american`,`indian`,`wilderness`,`outdoors`]],[[41,24],[`camping`,`campsite`,`holiday`,`retreat`,`nomadic`,`wilderness`,`outdoors`]],[[11],[`code`,`command line`,`prompt`,`shell`]],[[29],[`tube`,`vial`,`phial`,`flask`,`ampoule`,`ampule`,`lab`,`chemistry`,`experiment`,`test`]],[[29],[`tube`,`vial`,`phial`,`flask`,`ampoule`,`ampule`,`lab`,`chemistry`,`experiment`,`test`]],[[29],[`tubes`,`vials`,`phials`,`flasks`,`ampoules`,`ampules`,`lab`,`chemistry`,`experiment`,`test`]],[[37],[`text`,`alignment`,`center`]],[[37],[`text`,`alignment`,`right`]],[[37],[`text`,`alignment`,`justified`,`menu`,`list`]],[[37],[`text`,`alignment`,`left`,`list`]],[[37,9],[`select`]],[[37,19],[`select`]],[[37],[`drop cap`,`text`,`format`,`typography`,`letter`,`font size`]],[[37],[`blockquote`,`quotation`,`indent`,`reply`,`response`]],[[37],[`find`,`data`,`copy`,`txt`,`pdf`,`document`,`scan`,`magnifier`,`magnifying glass`,`lens`]],[[37,9],[`find`,`search`,`selection`,`dashed`]],[[37,3],[`words`,`lines`,`break`,`paragraph`]],[[5,34],[`theater`,`theatre`,`entertainment`,`podium`,`stage`,`musical`]],[[42],[`temperature`,`celsius`,`fahrenheit`,`weather`]],[[42],[`temperature`,`celsius`,`fahrenheit`,`weather`,`cold`,`freeze`,`freezing`]],[[42],[`temperature`,`celsius`,`fahrenheit`,`weather`,`warm`,`hot`]],[[1,34,13],[`dislike`,`bad`,`emotion`]],[[1,34,13],[`like`,`good`,`emotion`]],[[1,40],[`entry`,`pass`,`voucher`,`event`,`concert`,`show`,`perforated`,`dashed`]],[[40],[`entry`,`pass`,`voucher`,`event`,`concert`,`show`,`booked`,`purchased`,`receipt`,`redeemed`,`validated`,`verified`,`certified`,`checked`,`used`]],[[40],[`entry`,`pass`,`voucher`,`event`,`concert`,`show`,`remove`,`cancel`,`unbook`,`subtract`,`decrease`,`-`]],[[40,33],[`discount`,`reduced`,`offer`,`voucher`,`entry`,`pass`,`event`,`concert`,`show`,`book`,`purchase`,`%`]],[[40],[`entry`,`pass`,`voucher`,`event`,`concert`,`show`,`book`,`purchase`,`add`,`+`]],[[40],`entry.pass.voucher.event.concert.show.redeemed.used.marked.checked.verified.spoiled.invalidated.void.denied.refused.banned.barred.forbidden.prohibited.cancelled.cancellation.refunded.delete.remove.clear.error`.split(`.`)],[[40],[`entry`,`pass`,`voucher`,`event`,`concert`,`show`,`cancelled`,`cancellation`,`refunded`,`used`,`void`,`invalidated`,`spoiled`,`denied`,`refused`,`banned`,`barred`,`forbidden`,`prohibited`,`delete`,`remove`,`clear`,`error`,`x`]],[[41,1,40],[`trip`,`travel`,`pass`,`entry`,`voucher`,`event`,`concert`,`show`,`perforated`,`dashed`]],[[40,41],[`plane`,`trip`,`airplane`,`flight`,`travel`,`fly`,`takeoff`,`vacation`,`passenger`,`pass`,`check-in`,`airport`]],[[38],[`time`,`timer`,`stopwatch`]],[[38],[`time`,`timer`,`stopwatch`]],[[38],[`time`,`timer`,`stopwatch`]],[[19,1,11],[`on`,`off`,`switch`,`boolean`]],[[19,1,11],[`on`,`off`,`switch`,`boolean`]],[[12,18],[`toilet`,`potty`,`bathroom`,`washroom`]],[[39,11,18],[`tools`,`maintenance`,`repair`]],[[39,18],[`toolkit`,`tools`,`trunk`,`chest`,`box`,`storage`,`utility`,`utilities`,`container`,`kit`,`set`,`repair`,`fix`,`service`,`maintenance`,`mechanic`,`workshop`,`construction`,`hardware`,`equipment`,`gear`,`handyman`,`engineering`,`craft`,`diy`]],[[42],[`weather`,`wind`,`storm`,`hurricane`]],[[32,10,39,16],[`donut`,`doughnut`,`ring`,`hollow`,`3d`,`fast food`,`junk food`,`snack`,`treat`,`sweet`,`sugar`,`dessert`]],[[12],[`trackpad`,`cursor`]],[[12],[`trackpad`,`cursor`]],[[18,41],[`flannel`,`bathroom`,`toiletries`,`sanitation`,`clean`,`fresh`,`dry`,`laundry`,`laundrette`,`hospitality`,`housekeeping`,`room service`,`spa break`,`health club`,`amenities`,`hanging`]],[[41,40],[`airport`,`travel`,`tower`,`transportation`,`lighthouse`]],[[17,11],[`lego`,`block`,`addon`,`plugin`,`integration`]],[[40,36,16],[`farming`,`farmer`,`ranch`,`harvest`,`equipment`,`vehicle`]],[[40],[`roadworks`,`tarmac`,`safety`,`block`]],[[40],[`railway`,`metro`,`subway`,`underground`,`high-speed`,`bullet`,`fast`,`track`,`line`]],[[40,25],[`railway`,`metro`,`subway`,`underground`,`speed`,`bullet`,`fast`,`track`,`line`]],[[40,25],[`railway`,`line`]],[[40],[`railway`,`metro`,`subway`,`underground`,`track`,`line`,`tourism`]],[[22,0],[`gender`,`inclusive`]],[[14,20],[`empty`,`deletion`,`cleanup`,`junk`,`clear`,`garbage`,`delete`,`remove`,`bin`,`waste`,`recycle`,`discard`,`binoculars`,`rubbish`]],[[14,20],[`garbage`,`delete`,`remove`,`bin`]],[[24,36],[`tree`,`forest`,`park`,`nature`]],[[24,36],[`vacation`,`leisure`,`island`]],[[24,36],[`tree`,`pine`,`forest`,`park`,`nature`]],[[24,36],[`tree`,`forest`,`park`,`nature`]],[[6,3],[`statistics`]],[[6,3],[`statistics`]],[[6,3],[`arrows`,`estimated`,`indeterminate`,`data fluctuation`,`uncertain`,`forecast`,`variable`,`prediction`,`dynamic`,`volatile`]],[[32],[`equilateral`,`delta`,`shape`,`pyramid`,`hierarchy`]],[[26,32,11],[`warning`,`alert`,`danger`,`exclamation mark`,`linter`]],[[32],[`equilateral`,`delta`,`shape`,`pyramid`,`hierarchy`,`dashed`]],[[32,21],[`volume`,`controls`,`controller`,`tv remote`,`geometry`,`delta`,`ramp`,`slope`,`incline`,`increase`]],[[35,17],[`prize`,`sports`,`winner`,`achievement`,`award`,`champion`,`celebration`,`victory`]],[[40],[`delivery`,`van`,`shipping`,`haulage`,`lorry`]],[[40],[`delivery`,`van`,`shipping`,`haulage`,`lorry`,`electric`]],[[15],[`currency`,`money`,`payment`]],[[23,18],[`record player`,`gramophone`,`stereo`,`phonograph`,`vinyl`,`lp`,`disc`,`platter`,`cut`,`music`,`analog`,`retro`,`dj deck`,`disc jockey`,`scratch`,`spinning`]],[[2],[`animal`,`pet`,`tortoise`,`slow`,`speed`]],[[12,23,7],`television.stream.display.widescreen.high-definition.hd.1080p.4k.8k.smart.digital.video.entertainment.showtime.channels.terrestrial.satellite.cable.broadcast.live.frequency.tune.scan.aerial.receiver.transmission.signal.connection.connectivity`.split(`.`)],[[12,23],[`flatscreen`,`television`,`stream`,`display`,`widescreen`,`high-definition`,`hd`,`1080p`,`4k`,`8k`,`smart`,`digital`,`video`,`home cinema`,`entertainment`,`showtime`,`channels`,`catchup`]],[[12,23],[`flatscreen`,`television`,`stream`,`display`,`widescreen`,`high-definition`,`hd`,`1080p`,`4k`,`8k`,`smart`,`digital`,`video`,`movie`,`live`,`ott`,`running`,`start`,`film`,`home cinema`,`entertainment`,`showtime`,`channels`,`catchup`]],[[37],[`text`,`font`,`typography`]],[[37],[`text`,`font`,`typography`,`silhouette`,`profile`,`contour`,`stroke`,`line`]],[[42],[`rain`,`weather`]],[[42],[`rain`,`weather`,`uncovered`,`uninsured`,`antivirus`,`unprotected`,`risky`]],[[37],[`text`,`format`]],[[37,3],[`redo`,`rerun`,`history`]],[[37,3],[`redo`,`rerun`,`history`,`back`,`return`,`reverse`,`revert`,`direction`,`u-turn`]],[[37,3],[`redo`,`history`,`step`,`back`]],[[3,19],[`arrow`,`collapse`,`fold`,`vertical`,`dashed`]],[[3,19],[`arrow`,`expand`,`vertical`,`dashed`]],[[32,14],[`cubes`,`packages`,`parts`,`units`,`collection`,`cluster`,`separate`]],[[5,25],[`building`,`education`,`childhood`,`school`,`college`,`academy`,`institute`]],[[37],[`url`,`unchain`]],[[37],[`url`,`unchain`]],[[12,11],[`electricity`,`energy`,`electronics`,`socket`,`outlet`,`disconnect`]],[[3,14],[`file`]],[[12,23,18],[`universal`,`serial`,`bus`,`controller`,`connector`,`interface`]],[[1],[`person`,`account`,`contact`]],[[1],[`followed`,`subscribed`,`done`,`todo`,`tick`,`complete`,`task`]],[[1],[`settings`,`edit`,`cog`,`gear`]],[[1],[`passkey`,`password`,`login`,`authentication`,`authorization`,`roles`,`permissions`,`private`,`public`,`security`,`person`,`account`,`contact`]],[[1,31],[`person`,`lock`,`locked`,`account`,`secure`]],[[1],[`delete`,`remove`,`unfollow`,`unsubscribe`]],[[1],[`person`,`account`,`contact`,`profile`,`edit`,`change`]],[[1],[`new`,`add`,`create`,`follow`,`subscribe`]],[[1],[`person`,`account`,`contact`]],[[1],[`followed`,`subscribed`,`done`,`todo`,`tick`,`complete`,`task`]],[[1],[`settings`,`edit`,`cog`,`gear`]],[[1],[`passkey`,`password`,`login`,`authentication`,`authorization`,`roles`,`permissions`,`private`,`public`,`security`,`person`,`account`,`contact`]],[[1],[`delete`,`remove`,`unfollow`,`unsubscribe`]],[[1],[`person`,`account`,`contact`,`profile`,`edit`,`change`]],[[1],[`new`,`add`,`create`,`follow`,`subscribe`]],[[1,34],[`person`,`account`,`contact`,`find`,`scan`,`magnifier`,`magnifying glass`,`lens`]],[[1],[`delete`,`remove`,`unfollow`,`unsubscribe`,`unavailable`]],[[1,34],[`person`,`account`,`contact`,`find`,`scan`,`magnifier`,`magnifying glass`,`lens`]],[[1],[`person`,`account`,`favorite`,`contact`,`like`,`review`,`rating`,`admin`]],[[1],[`delete`,`remove`,`unfollow`,`unsubscribe`,`unavailable`]],[[1],[`group`,`people`]],[[1],[`group`,`people`]],[[16,41,25],[`fork`,`knife`,`cutlery`,`flatware`,`tableware`,`silverware`,`food`,`restaurant`,`meal`,`breakfast`,`dinner`,`supper`]],[[16,41,25],[`fork`,`knife`,`cutlery`,`flatware`,`tableware`,`silverware`,`food`,`restaurant`,`meal`,`breakfast`,`dinner`,`supper`]],[[5,18,36],[`electricity`,`energy`,`transmission line`,`telegraph pole`,`power lines`,`phone`]],[[40],[`minivan`,`cart`,`wagon`,`truck`,`lorry`,`trailer`,`camper`,`vehicle`,`drive`,`trip`,`journey`,`van`,`transport`,`carriage`,`delivery`,`travel`]],[[11,21],[`code`,`coding`,`programming`,`symbol`,`calculate`,`algebra`,`x`,`parentheses`,`parenthesis`,`brackets`,`parameter`,`(`,`)`]],[[31,41,18],[`safe`,`lockbox`,`deposit`,`locker`,`coffer`,`strongbox`,`safety`,`secure`,`storage`,`valuables`,`bank`]],[[32,21,10,39],[`shape`,`geometry`,`art`,`width`,`height`,`size`,`calculate`,`measure`,`select`,`graphics`,`box`]],[[16,36],[`vegetarian`,`fruitarian`,`herbivorous`,`animal rights`,`diet`]],[[1,17],[`mask`,`masquerade`,`impersonate`,`secret`,`incognito`]],[[22],[`gender`,`sex`,`female`,`feminine`,`woman`,`girl`]],[[22],[`gender`,`sex`,`intersex`,`androgynous`,`hermaphrodite`]],[[12,8,1,26],[`smartphone`,`notification`,`rumble`,`haptic feedback`,`screen`]],[[12,8,1],[`smartphone`,`notification`,`rumble`,`haptic feedback`,`notifications`,`screen`]],[[12,7,8,28],[`camera`,`movie`,`film`,`recording`,`motion picture`,`camcorder`,`reel`]],[[12,7,8,28],[`camera`,`movie`,`film`]],[[12,7,8,28,14],[`vhs`,`movie`,`film`,`recording`,`motion picture`,`showreel`,`cassette`]],[[10,28],[`eye`,`look`]],[[8,12,34],[`phone`,`cassette`,`tape`,`reel`,`recording`,`audio`]],[[35,17,41],[`beach`,`sand`,`net`,`holiday`,`vacation`,`summer`,`soccer`,`football`,`futbol`,`kick`,`pitch`,`goal`,`score`,`bounce`,`leather`,`wool`,`yarn`,`knitting`,`sewing`,`thread`,`embroidery`,`textile`]],[[8,7,23],[`music`,`sound`,`mute`,`speaker`]],[[8,7,23],[`music`,`sound`,`speaker`]],[[8,7,23],[`music`,`sound`,`speaker`]],[[8,7,23],[`music`,`sound`,`mute`,`speaker`]],[[8,7,23],[`music`,`sound`,`mute`,`speaker`]],[[34],[`vote`,`poll`,`ballot`,`political`,`social`,`check`,`tick`]],[[1,15],[`money`,`finance`,`pocket`]],[[1,15],[`money`,`finance`,`pocket`,`credit`,`purchase`,`payment`,`shopping`,`retail`,`consumer`,`cc`]],[[1,15],[`finance`,`pocket`]],[[1,12],[`background`,`texture`,`image`,`art`,`design`,`visual`,`decor`,`pattern`,`screen`,`cover`,`lock screen`]],[[10,17,9,28],[`magic`,`selection`]],[[10,17,9,28],[`magic`,`wizard`,`magician`]],[[5,25],[`storage`,`storehouse`,`depot`,`depository`,`repository`,`stockroom`,`logistics`,`building`]],[[18,12,41],[`tumble dryer`,`amenities`,`electronics`,`cycle`,`clothes`,`rinse`,`spin`,`drum`]],[[38],[`clock`,`time`]],[[42,25,23,36],[`water`,`sea`,`sound`,`hertz`,`wavelength`,`vibrate`]],[[42,36],[`water`,`sea`,`level`,`sound`,`hertz`,`wavelength`,`vibrate`,`low`,`tide`,`ocean`,`rising`,`down`,`falling`]],[[42,36],[`water`,`sea`,`level`,`sound`,`hertz`,`wavelength`,`vibrate`,`high`,`tide`,`ocean`,`rising`]],[[35,18],[`swimming`,`water`,`pool`,`lifeguard`,`ocean`,`🌊`,`🏊♂️`,`🏊♀️`,`🏊`,`🥽`]],[[31,1,25,11,34],[`indirection`,`vpn`,`virtual private network`,`proxy`,`connections`,`bounce`,`reroute`,`path`,`journey`,`planner`,`stops`,`stations`,`shared`,`spread`,`viral`]],[[8,12,7],[`camera`,`security`]],[[11,34,1],[`push api`,`interface`,`callback`]],[[11,34,1],[`push api`,`interface`,`callback`]],[[21],[`mass`,`heavy`,`lead`,`metal`,`measure`,`geometry`,`scales`,`balance`]],[[21],[`measure`,`scale`,`estimate`,`load`,`balance`,`size`,`measurement`,`quantity`,`mass`]],[[16],[`corn`,`cereal`,`grain`,`gluten`]],[[16],[`corn`,`cereal`,`grain`,`gluten free`,`allergy`,`intolerance`,`diet`]],[[37],[`text`,`selection`,`letters`,`characters`,`font`,`typography`]],[[8,12],[`connection`,`signal`,`wireless`]],[[8,12,14],[`connection`,`signal`,`wireless`,`directory`,`settings`,`control`,`preferences`,`cog`,`edit`,`gear`]],[[8,12],[`connection`,`signal`,`wireless`]],[[8,12],[`connection`,`signal`,`wireless`]],[[8,12],[`disabled`]],[[8,12],[`edit`,`wifi`,`pen`,`change`,`network`]],[[8,12],[`connection`,`signal`,`wireless`,`synchronize`,`reconnect`,`reset`,`restart`]],[[8,12],[`connection`,`signal`,`wireless`]],[[42,36],[`weather`,`air`,`blow`]],[[42,36],[`weather`,`air`,`pressure`,`blow`]],[[16],[`alcohol`,`beverage`,`bar`,`drink`,`glass`,`sommelier`,`vineyard`,`winery`]],[[16],[`alcohol`,`beverage`,`drink`,`glass`,`alcohol free`,`abstinence`,`abstaining`,`teetotalism`,`allergy`,`intolerance`]],[[11],[`action`,`continuous integration`,`ci`,`automation`,`devops`,`network`,`node`,`connection`]],[[2,31],[`invertebrate`,`grub`,`larva`,`snake`,`crawl`,`wiggle`,`slither`,`pest control`,`computer virus`,`malware`]],[[1,11,39],[`account`,`settings`,`spanner`,`diy`,`toolbox`,`build`,`construction`]],[[26,21],[`cancel`,`close`,`cross`,`delete`,`ex`,`remove`,`times`,`clear`,`math`,`multiply`,`multiplication`]],[[26,21],[`line`,`top`,`arrow`,`navigation`,`up`,`pointer`,`direction`,`vector`,`symbol`,`cancel`,`close`,`delete`,`remove`,`times`,`clear`,`math`,`multiply`,`multiplication`,`mean`,`median`,`average`,`x̄`]],[[8,12,28,42],[`flash`,`camera`,`lightning`,`electricity`,`energy`]],[[8,12,28,42],[`flash`,`camera`,`lightning`,`electricity`,`energy`]],[[34,13],[`water bearer`,`waves`,`innovation`,`air`,`future`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`ram`,`horns`,`fire`,`energy`,`initiative`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`crab`,`shell`,`protection`,`water`,`intuition`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`goat`,`mountain`,`ambition`,`earth`,`discipline`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`twins`,`duality`,`communication`,`air`,`adaptability`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`lion`,`crown`,`leadership`,`fire`,`confidence`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`scales`,`balance`,`justice`,`air`,`harmony`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`serpent`,`snake holder`,`healing`,`knowledge`,`astronomy`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`fish`,`duality`,`water`,`dreams`,`empathy`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`archer`,`arrow`,`exploration`,`fire`,`philosophy`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`scorpion`,`stinger`,`intensity`,`water`,`transformation`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`bull`,`strength`,`stability`,`earth`,`endurance`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[34,13],[`virgin`,`maiden`,`harvest`,`precision`,`earth`,`analysis`,`astrology`,`star sign`,`horoscope`,`constellation`,`celestial`]],[[0,19,10,37,28],[`magnifying glass`,`plus`]],[[0,19,10,37,28],[`magnifying glass`,`plus`]]],A$={"activity-square":`square-activity`,"alarm-check":`alarm-clock-check`,"alarm-minus":`alarm-clock-minus`,"alarm-plus":`alarm-clock-plus`,"alert-circle":`circle-alert`,"alert-octagon":`octagon-alert`,"alert-triangle":`triangle-alert`,"align-center":`text-align-center`,"align-justify":`text-align-justify`,"align-left":`text-align-start`,"align-right":`text-align-end`,"area-chart":`chart-area`,"arrow-down-01":`arrow-down-0-1`,"arrow-down-10":`arrow-down-1-0`,"arrow-down-az":`arrow-down-a-z`,"arrow-down-circle":`circle-arrow-down`,"arrow-down-left-from-circle":`circle-arrow-out-down-left`,"arrow-down-left-from-square":`square-arrow-out-down-left`,"arrow-down-left-square":`square-arrow-down-left`,"arrow-down-right-from-circle":`circle-arrow-out-down-right`,"arrow-down-right-from-square":`square-arrow-out-down-right`,"arrow-down-right-square":`square-arrow-down-right`,"arrow-down-square":`square-arrow-down`,"arrow-down-za":`arrow-down-z-a`,"arrow-left-circle":`circle-arrow-left`,"arrow-left-square":`square-arrow-left`,"arrow-right-circle":`circle-arrow-right`,"arrow-right-square":`square-arrow-right`,"arrow-up-01":`arrow-up-0-1`,"arrow-up-10":`arrow-up-1-0`,"arrow-up-az":`arrow-up-a-z`,"arrow-up-circle":`circle-arrow-up`,"arrow-up-left-from-circle":`circle-arrow-out-up-left`,"arrow-up-left-from-square":`square-arrow-out-up-left`,"arrow-up-left-square":`square-arrow-up-left`,"arrow-up-right-from-circle":`circle-arrow-out-up-right`,"arrow-up-right-from-square":`square-arrow-out-up-right`,"arrow-up-right-square":`square-arrow-up-right`,"arrow-up-square":`square-arrow-up`,"arrow-up-za":`arrow-up-z-a`,"asterisk-square":`square-asterisk`,"axis-3-d":`axis-3d`,"badge-help":`badge-question-mark`,"bar-chart":`chart-no-axes-column-increasing`,"bar-chart-2":`chart-no-axes-column`,"bar-chart-3":`chart-column`,"bar-chart-4":`chart-column-increasing`,"bar-chart-big":`chart-column-big`,"bar-chart-horizontal":`chart-bar`,"bar-chart-horizontal-big":`chart-bar-big`,"between-horizonal-end":`between-horizontal-end`,"between-horizonal-start":`between-horizontal-start`,"book-template":`book-dashed`,"box-select":`square-dashed`,"candlestick-chart":`chart-candlestick`,"check-circle":`circle-check-big`,"check-circle-2":`circle-check`,"check-square":`square-check-big`,"check-square-2":`square-check`,"chevron-down-circle":`circle-chevron-down`,"chevron-down-square":`square-chevron-down`,"chevron-left-circle":`circle-chevron-left`,"chevron-left-square":`square-chevron-left`,"chevron-right-circle":`circle-chevron-right`,"chevron-right-square":`square-chevron-right`,"chevron-up-circle":`circle-chevron-up`,"chevron-up-square":`square-chevron-up`,"circle-help":`circle-question-mark`,"circle-slashed":`circle-slash-2`,"clipboard-edit":`clipboard-pen`,"clipboard-signature":`clipboard-pen-line`,"code-2":`code-xml`,"code-square":`square-code`,columns:`columns-2`,"columns-settings":`columns-3-cog`,"contact-2":`contact-round`,"curly-braces":`braces`,"divide-circle":`circle-divide`,"divide-square":`square-divide`,"dot-square":`square-dot`,"download-cloud":`cloud-download`,edit:`square-pen`,"edit-2":`pen`,"edit-3":`pen-line`,"equal-square":`square-equal`,"file-audio":`file-headphone`,"file-audio-2":`file-headphone`,"file-axis-3-d":`file-axis-3d`,"file-badge-2":`file-badge`,"file-bar-chart":`file-chart-column-increasing`,"file-bar-chart-2":`file-chart-column`,"file-check-2":`file-check-corner`,"file-code-2":`file-code-corner`,"file-cog-2":`file-cog`,"file-edit":`file-pen`,"file-json":`file-braces`,"file-json-2":`file-braces-corner`,"file-key-2":`file-key`,"file-line-chart":`file-chart-line`,"file-lock-2":`file-lock`,"file-minus-2":`file-minus-corner`,"file-pie-chart":`file-chart-pie`,"file-plus-2":`file-plus-corner`,"file-question":`file-question-mark`,"file-search-2":`file-search-corner`,"file-signature":`file-pen-line`,"file-type-2":`file-type-corner`,"file-video":`file-play`,"file-video-2":`file-video-camera`,"file-volume-2":`file-signal`,"file-warning":`file-exclamation-point`,"file-x-2":`file-x-corner`,filter:`funnel`,"filter-x":`funnel-x`,fingerprint:`fingerprint-pattern`,"flip-horizontal":`square-centerline-dashed-horizontal`,"flip-vertical":`square-centerline-dashed-vertical`,"folder-cog-2":`folder-cog`,"folder-edit":`folder-pen`,"fork-knife":`utensils`,"fork-knife-crossed":`utensils-crossed`,"form-input":`rectangle-ellipsis`,"function-square":`square-function`,"gantt-chart":`chart-no-axes-gantt`,"gantt-chart-square":`square-chart-gantt`,"gauge-circle":`circle-gauge`,"git-commit":`git-commit-horizontal`,"globe-2":`earth`,grab:`hand-grab`,grid:`grid-3x3`,"grid-2-x-2":`grid-2x2`,"grid-2-x-2-check":`grid-2x2-check`,"grid-2-x-2-plus":`grid-2x2-plus`,"grid-2-x-2-x":`grid-2x2-x`,"grid-3-x-3":`grid-3x3`,"help-circle":`circle-question-mark`,"helping-hand":`hand-helping`,home:`house`,"ice-cream":`ice-cream-cone`,"ice-cream-2":`ice-cream-bowl`,indent:`list-indent-increase`,"indent-decrease":`list-indent-decrease`,"indent-increase":`list-indent-increase`,inspect:`square-mouse-pointer`,"kanban-square":`square-kanban`,"kanban-square-dashed":`square-dashed-kanban`,"laptop-2":`laptop-minimal`,"layers-3":`layers`,layout:`panels-top-left`,"letter-text":`text-initial`,"library-square":`square-library`,"line-chart":`chart-line`,"loader-2":`loader-circle`,"location-edit":`map-pin-pen`,"m-square":`square-m`,"mail-question":`mail-question-mark`,"menu-square":`square-menu`,"message-circle-question":`message-circle-question-mark`,"mic-2":`mic-vocal`,"minus-circle":`circle-minus`,"minus-square":`square-minus`,"more-horizontal":`ellipsis`,"more-vertical":`ellipsis-vertical`,"mouse-pointer-square-dashed":`square-dashed-mouse-pointer`,"move-3-d":`move-3d`,outdent:`list-indent-decrease`,"paintbrush-2":`paintbrush-vertical`,palmtree:`tree-palm`,"panel-bottom-inactive":`panel-bottom-dashed`,"panel-left-inactive":`panel-left-dashed`,"panel-right-inactive":`panel-right-dashed`,"panel-top-inactive":`panel-top-dashed`,"panels-left-right":`columns-3`,"panels-top-bottom":`rows-3`,"parking-circle":`circle-parking`,"parking-circle-off":`circle-parking-off`,"parking-square":`square-parking`,"parking-square-off":`square-parking-off`,"pause-circle":`circle-pause`,"pause-octagon":`octagon-pause`,"pen-box":`square-pen`,"pen-square":`square-pen`,"percent-circle":`circle-percent`,"percent-diamond":`diamond-percent`,"percent-square":`square-percent`,"pi-square":`square-pi`,"pie-chart":`chart-pie`,"pilcrow-square":`square-pilcrow`,"play-circle":`circle-play`,"play-square":`square-play`,"plug-zap-2":`plug-zap`,"plus-circle":`circle-plus`,"plus-square":`square-plus`,"power-circle":`circle-power`,"power-square":`square-power`,"rotate-3-d":`rotate-3d`,rows:`rows-2`,"scale-3-d":`scale-3d`,"scatter-chart":`chart-scatter`,"school-2":`university`,"scissors-square":`square-scissors`,"scissors-square-dashed-bottom":`square-bottom-dashed-scissors`,"send-horizonal":`send-horizontal`,"shield-close":`shield-x`,"shield-question":`shield-question-mark`,sidebar:`panel-left`,"sidebar-close":`panel-left-close`,"sidebar-open":`panel-left-open`,"sigma-square":`square-sigma`,"slash-square":`square-slash`,sliders:`sliders-vertical`,"sort-asc":`arrow-up-narrow-wide`,"sort-desc":`arrow-down-wide-narrow`,"split-square-horizontal":`square-split-horizontal`,"split-square-vertical":`square-split-vertical`,"square-gantt-chart":`square-chart-gantt`,stars:`sparkles`,"stop-circle":`circle-stop`,subtitles:`captions`,"table-config":`columns-3-cog`,"terminal-square":`square-terminal`,"test-tube-2":`test-tube-diagonal`,text:`text-align-start`,"text-selection":`text-select`,train:`tram-front`,"tv-2":`tv-minimal`,unlock:`lock-open`,"unlock-keyhole":`lock-keyhole-open`,"upload-cloud":`cloud-upload`,"user-2":`user-round`,"user-check-2":`user-round-check`,"user-circle":`circle-user`,"user-circle-2":`circle-user-round`,"user-cog-2":`user-round-cog`,"user-minus-2":`user-round-minus`,"user-plus-2":`user-round-plus`,"user-square":`square-user`,"user-square-2":`square-user-round`,"user-x-2":`user-round-x`,"users-2":`users-round`,verified:`badge-check`,"wallet-2":`wallet-minimal`,"wand-2":`wand-sparkles`,"wrap-text":`text-wrap`,"x-circle":`circle-x`,"x-octagon":`octagon-x`,"x-square":`square-x`},j$={activity:[`attivita`,`sensore`,`generico`],"air-vent":[`bocchetta`,`aria`,`ventilazione`,`condizionatore`,`vent`],"alarm-smoke":[`fumo`,`antincendio`,`rilevatore`],baby:[`neonato`,`bimbo`,`cameretta`,`babymonitor`],bath:[`bagno`,`vasca`,`doccia`,`bathroom`],battery:[`batteria`],"battery-charging":[`batteria`,`carica`,`ricarica`],"battery-full":[`batteria`,`carica`,`piena`],"battery-low":[`batteria`,`scarica`],bed:[`cameretta`,`letto`,`singolo`],"bed-double":[`camera`,`letto`,`matrimoniale`,`bedroom`],bell:[`campanello`,`suoneria`,`notifica`,`chime`],"bell-off":[`silenzioso`,`notifiche`,`disattivate`,`muto`],"bell-ring":[`campanello`,`suona`,`doorbell`,`notifica`],bike:[`bicicletta`,`bici`,`moto`],bird:[`uccello`,`animale`],blinds:[`tapparella`,`persiana`,`serranda`,`avvolgibile`,`shutter`,`blind`,`veneziana`],bluetooth:[],bone:[`osso`,`cane`],bot:[`robot`,`aspirapolvere`],box:[`scatola`,`contenitore`],briefcase:[`ufficio`,`lavoro`,`valigetta`,`studio`,`office`],building:[`edificio`,`palazzo`],"building-2":[`edificio`,`uffici`,`condominio`],bus:[`autobus`,`pullman`],cable:[`cavo`],calendar:[`calendario`,`data`,`pianificazione`],camera:[`telecamera`,`videocamera`,`cam`],car:[`auto`,`macchina`,`veicolo`,`parcheggio`,`garage`],cat:[`gatto`,`animale`],"circle-dot":[`pulsante`,`bottone`,`button`,`dot`],"circle-parking":[`parcheggio`,`posto`,`auto`,`garage`,`parking`],clock:[`orologio`,`ora`,`tempo`],cloud:[`nuvola`,`nuvoloso`],"cloud-rain":[`pioggia`],"cloud-sun":[`variabile`,`sole`,`nuvole`],"cooking-pot":[`pentola`,`cucina`,`fornello`],cpu:[`processore`,`chip`,`dispositivo`],crosshair:[`mirino`,`puntamento`,`centro`],dog:[`cane`,`animale`],"door-closed":[`porta`,`chiusa`,`contatto`],"door-open":[`porta`,`aperta`,`contatto`,`ingresso`,`uscita`,`entrance`],drill:[`officina`,`trapano`,`lavori`],droplet:[`goccia`,`acqua`,`perdita`,`allagamento`],droplets:[`umidita`,`acqua`,`allagamento`,`perdita`],dumbbell:[`palestra`,`attrezzi`],eye:[`occhio`,`visibile`,`visto`],"eye-off":[`privacy`,`nascosto`,`oscurato`,`mascherato`,`invisibile`],fan:[`ventilatore`,`ventola`,`aria`],fence:[`recinto`,`cancello`,`staccionata`,`perimetro`,`gate`],flame:[`fiamma`,`gas`,`fuoco`,`incendio`],flashlight:[`faretto`,`torcia`,`spot`,`faro`],flower:[`fiore`,`pianta`],footprints:[`movimento`,`passi`,`presenza`,`motion`],"gamepad-2":[`console`,`gioco`,`joystick`],gauge:[`misura`,`livello`,`pressione`,`indicatore`],hammer:[`officina`,`martello`,`lavori`],"hard-drive":[`disco`,`hdd`,`archiviazione`,`storage`],hash:[`numero`,`contatore`,`valore`],heart:[`cuore`,`preferito`,`salute`],"heart-pulse":[`battito`,`salute`,`monitoraggio`],heater:[`riscaldamento`,`termosifone`,`stufa`,`calore`],house:[`casa`,`abitazione`,`home`],image:[`immagine`,`foto`,`snapshot`],key:[`chiave`],"key-round":[`chiave`,`tonda`],lamp:[`lampada`,`abatjour`],"lamp-ceiling":[`plafoniera`,`lampadario`,`luce`,`soffitto`],"lamp-desk":[`lampada`,`scrivania`,`abatjour`],"lamp-floor":[`piantana`,`lampada`,`terra`],laptop:[`portatile`,`notebook`],leaf:[`foglia`,`pianta`,`verde`],lightbulb:[`luce`,`lampadina`,`lampada`,`light`],lock:[`serratura`,`chiave`,`lucchetto`,`chiuso`,`locked`],"lock-open":[`serratura`,`aperta`,`sbloccato`,`unlocked`],mailbox:[`cassetta`,`postale`,`posta`],"map-pin":[`posizione`,`luogo`,`mappa`,`pin`],mic:[`microfono`,`audio`],"mic-off":[`microfono`,`spento`,`muto`],microwave:[`microonde`,`forno`],monitor:[`schermo`],"monitor-play":[`schermo`,`riproduzione`,`player`,`display`],moon:[`notte`,`luna`,`notturna`,`nightvision`],mountain:[`montagna`,`esterno`,`panorama`],music:[`musica`],network:[`rete`,`lan`],package:[`pacco`,`consegna`,`storage`],"paw-print":[`animale`,`zampa`,`pet`],"person-standing":[`persona`,`piedi`,`presenza`],phone:[`telefono`,`chiamata`],pipette:[`qualita`,`aria`,`misura`,`campione`],plane:[`aereo`],plug:[`presa`,`spina`],"plug-zap":[`presa`,`alimentata`],power:[`accensione`,`alimentazione`],"power-off":[`spegnimento`,`spento`],printer:[`stampante`],projector:[`proiettore`],radar:[`movimento`,`presenza`,`pir`,`rilevamento`,`perimeter`],radio:[],"refresh-cw":[`aggiorna`,`ricarica`,`refresh`,`reload`,`ciclo`],refrigerator:[`frigorifero`,`frigo`],route:[`percorso`,`strada`,`vialetto`,`tragitto`,`street`],router:[`modem`],sailboat:[`barca`,`imbarcazione`],"scroll-text":[`registro`,`log`,`testo`],server:[`nas`],shield:[`scudo`,`protezione`,`sicurezza`,`allarme`],"shield-alert":[`manomissione`,`allarme`,`tamper`,`avviso`],"shield-check":[`protetto`,`sicuro`,`armato`],"shield-off":[`protezione`,`disattivata`,`disarmato`],siren:[`sirena`,`allarme`],"sliders-horizontal":[`regolazione`,`cursori`,`impostazioni`,`slider`],smartphone:[`telefono`,`cellulare`],snowflake:[`freddo`,`raffrescamento`,`aria`,`condizionata`,`neve`],sofa:[`salone`,`soggiorno`,`divano`,`living`,`living room`],sparkles:[`automatico`,`intelligente`,`ai`,`scena`],speaker:[`altoparlante`,`cassa`],sprout:[`irrigazione`,`pianta`,`germoglio`,`orto`],star:[`preferito`,`stella`,`importante`],store:[`negozio`,`ingresso`,`vetrina`,`shop`],sun:[`sole`,`luminosita`,`giorno`,`esterno`,`outdoor`],"sun-medium":[`sole`,`luminosita`],sunrise:[`alba`],tablet:[`ipad`],thermometer:[`temperatura`,`termometro`,`termostato`],"thermometer-snowflake":[`freddo`,`temperatura`,`bassa`],"thermometer-sun":[`caldo`,`temperatura`,`alta`],timer:[`conto`,`rovescia`],"toggle-left":[`interruttore`,`switch`,`toggle`],"toggle-right":[`interruttore`,`switch`,`toggle`,`acceso`],tractor:[`trattore`,`tosaerba`,`giardino`],"train-front":[`treno`],"tree-pine":[`albero`,`pino`,`giardino`],trees:[`giardino`,`alberi`,`esterno`,`parco`,`garden`],truck:[`camion`,`furgone`,`consegna`],tv:[`televisore`],umbrella:[`tenda`,`markise`,`ombrellone`,`pergola`,`veranda`,`terrace`],user:[`persona`,`utente`],users:[`persone`,`gruppo`,`famiglia`],utensils:[`cucina`,`posate`,`sala`,`pranzo`,`kitchen`],vibrate:[`vibrazione`,`urto`,`tamper`],video:[],"video-off":[`video`,`spento`],"volume-2":[`volume`,`audio`,`altoparlante`,`suono`],"volume-x":[`muto`,`silenziato`,`volume`,`spento`],warehouse:[`magazzino`,`capanno`,`deposito`,`cantina`,`warehouse`],"washing-machine":[`lavatrice`,`lavastoviglie`,`asciugatrice`],waves:[`onde`,`acqua`,`vibrazione`],"waves-ladder":[`piscina`,`vasca`,`pool`],wifi:[`rete`,`segnale`],"wifi-off":[`wifi`,`assente`,`offline`,`disconnesso`],wind:[`vento`,`aria`,`gas`,`monossido`,`co`],workflow:[`automazione`,`flusso`,`scenario`],wrench:[`officina`,`manutenzione`,`attrezzi`,`utenze`],zap:[`energia`,`corrente`,`consumo`,`watt`,`elettricita`]},M$={gauge2:`gauge`},N$=new Set(O$);new Map([...Object.entries(A$),...Object.entries(M$)]);function P$(e){return typeof e==`string`&&N$.has(e)}var F$=$o(P$,`Not an icon of the catalog`),I$=O$.map((e,t)=>{let[n,r]=k$[t]??[[],[]],i=n.flatMap(e=>{let t=D$[e];return t===void 0?[]:[t]});return{key:e,categories:i,primaryCategory:i[0]??D$[0],tags:r,synonyms:j$[e]??[]}});new Map(I$.map(e=>[e.key,e]));var L$=[`devices`,`home`,`security`,`buildings`,`connectivity`,`multimedia`,`nature`,`weather`,`transportation`,`animals`],R$=new Set(I$.map(e=>e.primaryCategory));[...L$,...D$.filter(e=>!L$.includes(e))].filter(e=>R$.has(e)),j({locationKey:T(),icon:F$}),j({locationKey:T(),description:T()});var z$=F([`image`,`video`,`gif`,`audio`,`icon`]),B$=j({mediaType:z$,url:T().optional(),bytes:ns(Uint8Array).optional(),mime:T().optional(),name:T().optional()}).refine(e=>e.url!==void 0||e.bytes!==void 0,{message:"Attachment requires either `url` or `bytes`"}),V$=F([`text`,`markdown`,`html`]),H$=F([`acknowledge`,`dismiss`,`silence`,`snooze`,`view`,`play`,`open`,`close`,`lock`,`unlock`,`arm`,`arm-home`,`arm-away`,`arm-night`,`disarm`,`light`,`alert`,`camera`]),U$=j({id:T(),label:T(),url:T().optional(),icon:H$.optional(),destructive:D().optional(),mode:F([`navigate`,`background`]).optional()}),W$=M([T(),E(),D()]),G$=j({key:T().min(1),label:T(),labelKey:T().optional(),type:F([`enum`,`number`,`boolean`,`string`]),options:A(j({value:T(),label:T()})).optional(),min:E().optional(),max:E().optional(),default:W$.optional()}),K$=j({body:T(),title:T().optional(),format:V$.default(`text`),priority:E().int().min(1).max(5).default(3),level:T().optional(),attachments:A(B$).optional(),clickUrl:T().optional(),actions:A(U$).optional(),sound:T().optional(),ttl:E().optional(),tag:T().optional(),deviceId:E().optional(),eventId:T().optional(),metadata:P(T(),O()).optional(),delivery:P(T(),W$).optional()}),q$=j({id:T(),label:T(),ordinal:E().int().min(1).max(5).nullable(),flags:j({critical:D().optional(),silent:D().optional(),noPush:D().optional()}).optional(),requires:A(T()).optional(),description:T().optional()}),J$=j({attachments:j({mediaTypes:A(z$),mode:F([`url`,`bytes`,`both`]),max:E().int().nonnegative(),maxBytes:E().int().positive().optional()}),actions:E().int().nonnegative(),actionIcons:D().optional(),levels:A(q$),format:A(V$),clickUrl:D(),sound:D(),ttl:D(),bodyMaxLen:E().int().positive()}),Y$=O(),X$=j({kind:T(),label:T(),icon:T(),addonId:T(),iconUrl:T().optional(),iconMediaType:T().optional(),configSchema:Y$,destinationKeys:A(T()).optional(),supportsDiscovery:D(),deliveryParams:A(G$).optional(),caps:J$}),Z$=j({id:T(),name:T(),kind:T(),addonId:T(),enabled:D(),config:P(T(),O())}),Q$=j({kind:T(),suggestedName:T(),config:P(T(),O())}),$$=j({level:T(),format:V$,attachmentsSent:E().int().nonnegative(),actionsSent:E().int().nonnegative(),truncated:D(),dropped:A(T())}),e1=j({success:D(),error:T().optional(),renderedAs:$$.optional()}),t1=e1,n1=j({ok:D(),resolvedUrl:T(),httpStatus:E().int().optional(),stateInstance:T().optional(),error:T().optional()});Q(j({}),A(X$)),Q(j({}),A(Z$),{auth:`admin`}),Q(j({targetId:T()}),Z$,{auth:`admin`}),Q(j({kind:T(),config:P(T(),O()).optional(),targetId:T().optional()}),A(Q$),{auth:`admin`}),Q(j({kind:T(),config:P(T(),O()),targetId:T().optional()}),n1,{kind:`mutation`,auth:`admin`}),Q(j({targetId:T(),notification:K$}),e1,{kind:`mutation`,auth:`admin`}),Q(j({targetId:T(),sample:K$.optional()}),t1,{kind:`mutation`,auth:`admin`}),Q(j({target:Z$,cloneSecretsFrom:T().optional()}),Z$,{kind:`mutation`,auth:`admin`}),Q(j({targetId:T()}),k(),{kind:`mutation`,auth:`admin`}),Q(j({targetId:T(),enabled:D()}),k(),{kind:`mutation`,auth:`admin`});var r1=[{id:`speech`,name:`Speech`},{id:`scream`,name:`Scream / Shout`},{id:`crying`,name:`Crying / Baby`},{id:`laughter`,name:`Laughter`},{id:`music`,name:`Music`},{id:`dog`,name:`Dog`},{id:`cat`,name:`Cat`},{id:`bird`,name:`Bird`},{id:`animal`,name:`Animal (other)`},{id:`alarm`,name:`Alarm / Siren`},{id:`doorbell`,name:`Doorbell / Knock`},{id:`glass_breaking`,name:`Glass Breaking`},{id:`gunshot`,name:`Gunshot / Explosion`},{id:`vehicle`,name:`Vehicle`},{id:`siren`,name:`Emergency Siren`},{id:`fire`,name:`Fire / Smoke`},{id:`water`,name:`Water`},{id:`wind`,name:`Wind / Weather`},{id:`door`,name:`Door`},{id:`footsteps`,name:`Footsteps`},{id:`crowd`,name:`Crowd / Chatter`},{id:`telephone`,name:`Telephone`},{id:`engine`,name:`Engine / Motor`},{id:`tools`,name:`Tools / Construction`},{id:`silence`,name:`Silence`}],i1={mapping:{Speech:`speech`,"Child speech, kid speaking":`speech`,Conversation:`speech`,"Narration, monologue":`speech`,Babbling:`speech`,Whispering:`speech`,"Speech synthesizer":`speech`,Humming:`speech`,Rapping:`speech`,Singing:`speech`,Choir:`speech`,"Child singing":`speech`,Shout:`scream`,Bellow:`scream`,Yell:`scream`,Screaming:`scream`,"Children shouting":`scream`,Whoop:`scream`,"Crying, sobbing":`crying`,"Baby cry, infant cry":`crying`,Whimper:`crying`,"Wail, moan":`crying`,Groan:`crying`,Laughter:`laughter`,"Baby laughter":`laughter`,Giggle:`laughter`,Snicker:`laughter`,"Belly laugh":`laughter`,"Chuckle, chortle":`laughter`,Music:`music`,"Musical instrument":`music`,Guitar:`music`,Piano:`music`,Drum:`music`,"Drum kit":`music`,"Violin, fiddle":`music`,Flute:`music`,Saxophone:`music`,Trumpet:`music`,Synthesizer:`music`,"Pop music":`music`,"Rock music":`music`,"Hip hop music":`music`,"Classical music":`music`,Jazz:`music`,"Electronic music":`music`,"Background music":`music`,Dog:`dog`,Bark:`dog`,Yip:`dog`,Howl:`dog`,"Bow-wow":`dog`,Growling:`dog`,"Whimper (dog)":`dog`,Cat:`cat`,Purr:`cat`,Meow:`cat`,Hiss:`cat`,Caterwaul:`cat`,Bird:`bird`,"Bird vocalization, bird call, bird song":`bird`,"Chirp, tweet":`bird`,Squawk:`bird`,Crow:`bird`,Owl:`bird`,"Pigeon, dove":`bird`,Animal:`animal`,"Domestic animals, pets":`animal`,"Livestock, farm animals, working animals":`animal`,Horse:`animal`,"Cattle, bovinae":`animal`,Pig:`animal`,Sheep:`animal`,Goat:`animal`,Frog:`animal`,Insect:`animal`,Cricket:`animal`,Alarm:`alarm`,"Alarm clock":`alarm`,"Smoke detector, smoke alarm":`alarm`,"Fire alarm":`alarm`,Buzzer:`alarm`,"Civil defense siren":`alarm`,"Car alarm":`alarm`,Siren:`siren`,"Police car (siren)":`siren`,"Ambulance (siren)":`siren`,"Fire engine, fire truck (siren)":`siren`,"Emergency vehicle":`siren`,Foghorn:`siren`,Doorbell:`doorbell`,"Ding-dong":`doorbell`,Knock:`doorbell`,Tap:`doorbell`,Glass:`glass_breaking`,Shatter:`glass_breaking`,"Chink, clink":`glass_breaking`,"Gunshot, gunfire":`gunshot`,"Machine gun":`gunshot`,Explosion:`gunshot`,Fireworks:`gunshot`,Firecracker:`gunshot`,"Artillery fire":`gunshot`,"Cap gun":`gunshot`,Boom:`gunshot`,Vehicle:`vehicle`,Car:`vehicle`,Truck:`vehicle`,Bus:`vehicle`,Motorcycle:`vehicle`,"Car passing by":`vehicle`,"Vehicle horn, car horn, honking":`vehicle`,"Traffic noise, roadway noise":`vehicle`,Train:`vehicle`,Aircraft:`vehicle`,Helicopter:`vehicle`,Bicycle:`vehicle`,Skateboard:`vehicle`,Fire:`fire`,Crackle:`fire`,Water:`water`,Rain:`water`,Raindrop:`water`,"Rain on surface":`water`,Stream:`water`,Waterfall:`water`,Ocean:`water`,"Waves, surf":`water`,"Splash, splatter":`water`,Wind:`wind`,Thunderstorm:`wind`,Thunder:`wind`,"Wind noise (microphone)":`wind`,"Rustling leaves":`wind`,Door:`door`,"Sliding door":`door`,Slam:`door`,"Cupboard open or close":`door`,"Walk, footsteps":`footsteps`,Run:`footsteps`,Shuffle:`footsteps`,Crowd:`crowd`,Chatter:`crowd`,Cheering:`crowd`,Applause:`crowd`,"Children playing":`crowd`,"Hubbub, speech noise, speech babble":`crowd`,Telephone:`telephone`,"Telephone bell ringing":`telephone`,Ringtone:`telephone`,"Telephone dialing, DTMF":`telephone`,"Busy signal":`telephone`,Engine:`engine`,"Engine starting":`engine`,Idling:`engine`,"Accelerating, revving, vroom":`engine`,"Light engine (high frequency)":`engine`,"Medium engine (mid frequency)":`engine`,"Heavy engine (low frequency)":`engine`,"Lawn mower":`engine`,Chainsaw:`engine`,Hammer:`tools`,Jackhammer:`tools`,Sawing:`tools`,"Power tool":`tools`,Drill:`tools`,Sanding:`tools`,Silence:`silence`},preserveOriginal:!1},a1={mapping:{speech:`speech`,child_speech:`speech`,conversation:`speech`,whispering:`speech`,singing:`speech`,humming:`speech`,shout:`scream`,yell:`scream`,screaming:`scream`,crying:`crying`,baby_crying:`crying`,sobbing:`crying`,laughter:`laughter`,baby_laughter:`laughter`,giggling:`laughter`,music:`music`,guitar:`music`,piano:`music`,drums:`music`,dog_bark:`dog`,dog_bow_wow:`dog`,dog_growling:`dog`,dog_howl:`dog`,cat_meow:`cat`,cat_purr:`cat`,cat_hiss:`cat`,bird:`bird`,bird_chirp:`bird`,bird_squawk:`bird`,animal:`animal`,horse:`animal`,cow_moo:`animal`,insect:`animal`,alarm:`alarm`,smoke_alarm:`alarm`,fire_alarm:`alarm`,car_alarm:`alarm`,siren:`siren`,police_siren:`siren`,ambulance_siren:`siren`,doorbell:`doorbell`,door_knock:`doorbell`,knocking:`doorbell`,glass_breaking:`glass_breaking`,glass_shatter:`glass_breaking`,gunshot:`gunshot`,explosion:`gunshot`,fireworks:`gunshot`,car:`vehicle`,truck:`vehicle`,motorcycle:`vehicle`,car_horn:`vehicle`,vehicle_horn:`vehicle`,traffic:`vehicle`,fire:`fire`,fire_crackle:`fire`,water:`water`,rain:`water`,ocean:`water`,splash:`water`,wind:`wind`,thunder:`wind`,thunderstorm:`wind`,door:`door`,door_slam:`door`,sliding_door:`door`,footsteps:`footsteps`,walking:`footsteps`,running:`footsteps`,crowd:`crowd`,chatter:`crowd`,cheering:`crowd`,applause:`crowd`,telephone_ring:`telephone`,ringtone:`telephone`,engine:`engine`,engine_starting:`engine`,lawn_mower:`engine`,chainsaw:`engine`,hammer:`tools`,jackhammer:`tools`,drill:`tools`,power_tool:`tools`,silence:`silence`},preserveOriginal:!1},o1=new Map;for(let[e,t]of Object.entries(i1.mapping))o1.set(e.toLowerCase(),t);for(let[e,t]of Object.entries(a1.mapping))o1.set(e.toLowerCase(),t);var s1=`motion.audio.recording.live.heatmapScrub.person.vehicle.animal.package.sensor.control.face.plate.car.truck.bus.motorcycle.bicycle.airplane.boat.train.bird.dog.cat.horse.sheep.cow.elephant.bear.zebra.giraffe.package-delivered.package-picked-up.suitcase.backpack.handbag.contact.motion-sensor.smoke.flood.gas.carbon-monoxide.vibration.tamper.presence.enum-sensor.device-event.lock.cover.switch.siren.button.doorbell`.split(`.`),c1=`audio`,l1=[.3,.42,.55,.7,.85,1],u1=[`camstack`,`high-contrast`,`okabe-ito`],d1={motion:`#d946ef`,audio:`#059eb8`,recording:`#ef4444`,live:`#8d7a00`,heatmapScrub:`#4b32ff`,person:`#11a64c`,vehicle:`#3b82f6`,animal:`#ea6a09`,package:`#924667`,sensor:`#624bbc`,control:`#944d24`,face:`#ed4f8d`,plate:`#4b7027`,car:`#9684cf`,truck:`#0f9b89`,bus:`#a734a9`,motorcycle:`#c1133a`,bicycle:`#0e6a9b`,airplane:`#7c9928`,boat:`#b17933`,train:`#ad6ca3`,bird:`#0f7c55`,dog:`#c82700`,cat:`#7268f2`,horse:`#cb795e`,sheep:`#b8636b`,cow:`#cb2969`,elephant:`#1158d2`,bear:`#8d5e00`,zebra:`#0097d6`,giraffe:`#8f61bb`,"package-delivered":`#cd3f9b`,"package-picked-up":`#388a08`,suitcase:`#666800`,backpack:`#ec5022`,handbag:`#a76ef8`,contact:`#ab5a49`,"motion-sensor":`#b95d1a`,smoke:`#dd3858`,flood:`#b31e7d`,gas:`#5b70b5`,"carbon-monoxide":`#7b4e8e`,vibration:`#e65bba`,tamper:`#98464b`,presence:`#3a9468`,"enum-sensor":`#7885f8`,"device-event":`#8c43c8`,lock:`#649653`,cover:`#c67597`,switch:`#7a812a`,siren:`#ac5d7f`,button:`#b276cd`,doorbell:`#0087ab`},f1=[`#b34dc7`,`#1d7d34`,`#db6b6c`,`#a43d29`,`#0e6ee6`,`#29a10b`,`#a98731`,`#0181c6`],p1={motion:`#964360`,audio:`#23a132`,recording:`#2494ca`,live:`#bd7e2b`,heatmapScrub:`#ad6eea`,person:`#62611e`,vehicle:`#f4534c`,animal:`#1556cd`,package:`#9c4415`,sensor:`#066c48`,control:`#f2479f`,face:`#139d8a`,plate:`#909024`,car:`#8e35ab`,truck:`#bd0b2b`,bus:`#7a88ca`,motorcycle:`#e26725`,bicycle:`#a6679b`,airplane:`#7c5720`,boat:`#467a1b`,train:`#6f65a4`,bird:`#cb717f`,dog:`#c62490`,cat:`#b36850`,horse:`#1872ac`,sheep:`#927939`,cow:`#428a5c`,elephant:`#d41160`,bear:`#799453`,zebra:`#a85455`,giraffe:`#746be8`,"package-delivered":`#824a80`,"package-picked-up":`#614ac1`,suitcase:`#2f77f3`,backpack:`#fa476d`,handbag:`#c14cbe`,contact:`#c83921`,"motion-sensor":`#a07ebd`,smoke:`#a25b13`,flood:`#526bab`,gas:`#924938`,"carbon-monoxide":`#bb7e53`,vibration:`#b66182`,tamper:`#3c6931`,presence:`#6c851d`,"enum-sensor":`#ad2d48`,"device-event":`#5e9b04`,lock:`#00a062`,cover:`#ad8624`,switch:`#d05259`,siren:`#cd67b3`,button:`#c9746a`,doorbell:`#338eeb`},m1=[`#817f3b`,`#a0733e`,`#8658b2`,`#956301`,`#bc652d`,`#647331`,`#a14c9e`,`#d14e71`],h1={motion:`#b88128`,audio:`#1096c8`,recording:`#009e73`,live:`#9c8c22`,heatmapScrub:`#0072b2`,person:`#d55e00`,vehicle:`#c0739f`,animal:`#226d18`,package:`#91446c`,sensor:`#217b56`,control:`#648647`,face:`#c22998`,plate:`#fa4575`,car:`#956301`,truck:`#2f77f3`,bus:`#7a4e86`,motorcycle:`#f54597`,bicycle:`#bb3e75`,airplane:`#e054c0`,boat:`#457942`,train:`#867afa`,bird:`#88914c`,dog:`#1556cd`,cat:`#71702c`,horse:`#9b4fa4`,sheep:`#c0559d`,cow:`#d14f65`,elephant:`#98470f`,bear:`#595896`,zebra:`#96790e`,giraffe:`#cb717b`,"package-delivered":`#139d8a`,"package-picked-up":`#906ead`,suitcase:`#d02939`,backpack:`#d41160`,handbag:`#f64f54`,contact:`#7258d2`,"motion-sensor":`#b66182`,smoke:`#627abb`,flood:`#b86ae4`,gas:`#a95261`,"carbon-monoxide":`#c65d3c`,vibration:`#7a40b7`,tamper:`#914b34`,presence:`#9481c3`,"enum-sensor":`#ac6d47`,"device-event":`#7b6fce`,lock:`#c67662`,cover:`#a6564d`,switch:`#ad2c4e`,siren:`#348e08`,button:`#d27303`,doorbell:`#55770f`},g1=[`#9a3784`,`#a7392c`,`#409d50`,`#6987e7`,`#ee5b3d`,`#c0430d`,`#af79b3`,`#4b6628`],_1=T().regex(/^#[0-9a-f]{6}$/),v1=N(`form`,[j({form:I(`solid`),hex:_1}),j({form:I(`gradient`),hex:_1,alphas:A(E().gt(0).lte(1)).length(l1.length)})]);N(`status`,[j({status:I(`ready`),presetId:F(u1),customized:D(),source:F([`stored`,`unconfigured`]),swatches:P(T(),v1),fallbacks:A(_1).length(8)}),j({status:I(`unknown`),reason:T()})]),M([j({presetId:T()}),j({presetId:T(),overrides:P(T(),v1)})]),j({presetId:T(),overrides:P(T(),v1)});function y1(e){return{form:`solid`,hex:e}}function b1(e){return{form:`gradient`,hex:e,alphas:[...l1]}}function x1(e){let t={};for(let n of s1){let r=e[n];if(r===void 0)throw Error(`palette table missing ${n}`);t[n]=n===`audio`?b1(r):y1(r)}return t}function S1(e,t,n,r){return{id:e,name:t,swatches:x1(n),fallbacks:r}}var C1=[S1(`camstack`,`CamStack`,d1,f1),S1(`high-contrast`,`High contrast`,p1,m1),S1(`okabe-ito`,`Colour-blind safe`,h1,g1)];function w1(e){return C1.find(t=>t.id===e)}function T1(){let e=w1(`camstack`);if(e===void 0)throw Error(`CamStack preset missing`);return E1(e,`unconfigured`,!1)}function E1(e,t,n){return{status:`ready`,presetId:e.id,customized:n,source:t,swatches:e.swatches,fallbacks:[...e.fallbacks]}}function D1(e,t){let n=0;for(let t=0;t<e.length;t++)n=n*31+(e.codePointAt(t)??0)>>>0;let r=t[n%t.length];if(r===void 0)throw Error(`display palette has no fallback colour`);return r}function O1(e,t,n){let r=n.trim().toLowerCase();if(r.startsWith(`audio-`)){let n=e[c1];return n===void 0?D1(r,t):n.hex}let i=e[r];return i===void 0?D1(r,t):i.hex}var k1=T1();function A1(e){return O1(k1.swatches,k1.fallbacks,e)}function j1(e){let t=e[0];if(t===void 0)throw Error(`display palette has no fallback colour`);return t}j1(k1.fallbacks);function M1(e){return e.split(/[-_ ]/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var N1=new Map;function P1(e,t,n,r){N1.set(e,{kind:e,parentKind:null,level:`macro`,category:t,color:A1(e),iconId:n,labelKey:`eventKind.${e}`,label:r})}function F1(e,t,n,r,i){N1.set(e,{kind:e,parentKind:t,level:`sub`,category:n,color:A1(e),iconId:r,labelKey:`eventKind.${e}`,label:i})}P1(`motion`,`motion`,`motion`,`Motion`),P1(`audio`,`audio`,`audio`,`Audio`),P1(`person`,`detection`,`person`,`Person`),P1(`vehicle`,`detection`,`vehicle`,`Vehicle`),P1(`animal`,`detection`,`animal`,`Animal`),P1(`package`,`package`,`package`,`Package`),P1(`sensor`,`sensor`,`sensor`,`Sensor`),P1(`control`,`control`,`control`,`Control`);for(let[e,t]of Object.entries(w$.mapping))t!==`vehicle`&&t!==`animal`||N1.has(e)||F1(e,t,`detection`,e,M1(e));F1(`package-delivered`,`package`,`package`,`package`,`Package delivered`),F1(`package-picked-up`,`package`,`package`,`package`,`Package picked up`),F1(`contact`,`sensor`,`sensor`,`door`,`Contact`),F1(`motion-sensor`,`sensor`,`sensor`,`pir`,`Motion sensor`),F1(`smoke`,`sensor`,`sensor`,`smoke`,`Smoke`),F1(`flood`,`sensor`,`sensor`,`water`,`Water leak`),F1(`gas`,`sensor`,`sensor`,`gas`,`Gas`),F1(`carbon-monoxide`,`sensor`,`sensor`,`smoke`,`Carbon monoxide`),F1(`vibration`,`sensor`,`sensor`,`vibration`,`Vibration`),F1(`tamper`,`sensor`,`sensor`,`tamper`,`Tamper`),F1(`presence`,`sensor`,`sensor`,`presence`,`Presence`),F1(`enum-sensor`,`sensor`,`sensor`,`generic`,`Sensor state`),F1(`device-event`,`sensor`,`sensor`,`button`,`Device event`),F1(`lock`,`control`,`control`,`lock`,`Lock`),F1(`cover`,`control`,`control`,`door`,`Cover`),F1(`switch`,`control`,`control`,`switch`,`Switch`),F1(`siren`,`control`,`control`,`siren`,`Siren`),F1(`button`,`control`,`control`,`button`,`Button`),F1(`doorbell`,`control`,`control`,`doorbell`,`Doorbell`);for(let e of r1){let t=`audio-${e.id}`;N1.has(t)||F1(t,`audio`,`audio`,t,e.name)}var I1=Object.freeze(Object.fromEntries(N1)),L1=j({kind:T(),label:T(),parentKind:T().nullable()}),R1=j({videoClasses:A(L1),audioKinds:A(L1),labels:A(L1)});function z1(e,t,n){return{kind:e,label:t,parentKind:n}}function B1(){let e=Object.values(I1);return{videoClasses:e.filter(e=>e.category===`detection`).map(e=>z1(e.kind,e.label,e.parentKind)),audioKinds:e.filter(e=>e.category===`audio`&&e.level===`sub`).map(e=>z1(e.kind,e.label,e.parentKind)),labels:e.filter(e=>e.category===`sensor`||e.category===`control`).map(e=>z1(e.kind,e.label,e.parentKind))}}Object.freeze(B1());var V1=F([`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]),H1=F([`home`,`away`,`night`,`vacation`,`custom_bypass`]);j({state:V1,targetMode:H1.nullable().optional(),availableModes:A(H1),requiresCode:D(),lastChangedAt:E()}),p$.AlarmPanel,Q(j({deviceId:E().int().nonnegative(),mode:H1,code:T().min(1).optional()}),k(),{kind:`mutation`,auth:`protected`}),Q(j({deviceId:E().int().nonnegative(),code:T().min(1).optional()}),k(),{kind:`mutation`,auth:`protected`}),Q(j({deviceId:E().int().nonnegative()}),k(),{kind:`mutation`,auth:`protected`});var U1=j({x:E(),y:E()}),W1=j({kind:I(`rect`),x:E(),y:E(),width:E(),height:E()}),G1=j({kind:I(`polygon`),points:A(U1)});N(`kind`,[W1,G1,j({kind:I(`grid`),gridWidth:E().meta(s$(`none`)),gridHeight:E().meta(s$(`none`)),cells:A(D())}),j({kind:I(`line`),points:A(U1)})]),F([`rect`,`polygon`,`grid`,`line`]),j({min:E(),max:E()}),j({width:E(),height:E()});var K1=F([`immediate`,`track-end`,`device-event`,`package-event`,`system-event`]),q1=F(`device-online.device-offline.device-disabled.device-enabled.device-battery-low.device-battery-normal.device-consumable-low.device-consumable-normal.stream-online.stream-offline.node-online.node-offline.node-restarting.node-updating.node-inference-unavailable.detection-blind.motion-noisy.motion-calm.package-llm-silent.package-llm-answered.recording-stalled.recording-healthy.recording-degraded.device-attention-required.device-attention-resolved.storage-location-low.storage-location-critical.storage-location-ok.addon-crash-loop.addon-update-available.server-update-available.wrapper-update-available.alarm-triggered.alarm-armed.alarm-disarmed.alarm-arming.alarm-arm-refused.alarm-pending.alarm-rearmed.alarm-sensor-bypass.alarm-check-failed.addon-updated.server-updated.export-completed.backup-completed.alert-critical.alert-error.alert-critical-resolved.rule-broken.rule-repaired.camera-online.camera-offline.camera-disabled.camera-enabled`.split(`.`)),J1=[`camera-online`,`camera-offline`,`camera-disabled`,`camera-enabled`],Y1=new Set(J1);q1.options.filter(e=>!Y1.has(e));var X1=[`alarm-arm-refused`,`alarm-check-failed`,`alarm-arming`,`alarm-armed`,`alarm-pending`,`alarm-triggered`,`alarm-rearmed`,`alarm-sensor-bypass`,`alarm-disarmed`],Z1=j({kinds:A(q1).min(1),deviceIds:A(E().int()).min(1).optional(),deviceTypes:A(T().min(1)).min(1).optional(),excludeDeviceIds:A(E().int()).min(1).optional(),nodeIds:A(T().min(1)).min(1).optional(),packageNames:A(T().min(1)).min(1).optional(),consumableLowPercent:E().int().min(1).max(95).optional()}),Q1=1440,$1=j({windows:A(j({days:A(E().int().min(0).max(6)).min(1),startMinute:E().int().min(0).max(1439),endMinute:E().int().min(0).max(1439)})).min(1),timezone:T().optional(),invert:D().optional()}),e0=F([`instant`,`summary`]),t0=F([`rule`,`section`]),yae=N(`mode`,[j({mode:I(`instant`)}),j({mode:I(`summary`),schedule:$1,split:t0.optional()})]),n0=j({values:A(T().min(1)),maxDistance:E().int().min(0).max(3).default(1)}),r0=j({zoneId:T().optional(),className:T().optional(),op:F([`became-occupied`,`became-free`,`>=`,`<=`]).default(`became-occupied`),count:E().int().min(0).default(1),sustainSeconds:E().int().min(0).max(3600).default(15)}),i0=j({labels:A(T().min(1)).min(1).optional(),dbThreshold:E().min(-96).max(0).optional(),hitPercent:E().int().min(1).max(100).default(60),samplingSeconds:E().int().min(1).max(300).default(10),confirmHits:E().int().min(1).max(20).optional(),confirmWindowSec:E().int().min(1).max(60).optional()}),a0=F([`enter`,`exit`,`any`]),o0=F([`raised`,`cleared`]),s0=j({ids:A(T().min(1)).min(1),match:F([`any`,`all`]).optional()}),c0=N(`kind`,[j({kind:I(`wait`),seconds:E().min(0).max(300)}),j({kind:I(`cap`),deviceId:E().int(),cap:T().min(1),method:T().min(1),args:P(T(),O()).optional()})]),l0=j({id:T().min(1),name:T().min(1).max(120),minDelaySec:E().int().min(0).max(86400).optional(),actions:A(c0).min(1)}),u0=j({name:T().min(1).max(120),minDelaySec:E().int().min(0).max(86400).optional(),actions:A(c0).min(1)}),d0=A(N(`kind`,[j({kind:I(`sequence`),sequenceId:T().min(1)}),j({kind:I(`do`),action:c0})])).max(4),f0=j({id:T().min(1).max(64),label:T().min(1).max(40),sequenceId:T().min(1),icon:H$.optional(),destructive:D().optional()}),p0=j({onActivation:d0.optional(),onDeactivation:d0.optional(),onTrigger:d0.optional(),onTriggerOff:d0.optional(),buttons:A(f0).max(8).optional()});j({name:T().min(1).max(120),enabled:D(),minDelaySec:E().int().min(0).max(86400).optional(),actions:A(c0).min(1)});var m0=j({deviceId:E().int(),states:A(T().min(1)).min(1)}),h0=j({sceneId:T().min(1),deviceId:E().int().optional(),requiredState:F([`matched`,`diverged`]),latched:D().optional()}),g0=j({deviceState:m0.optional(),scene:h0.optional(),devices:A(E()).optional(),devicesExclude:A(E()).min(1).optional(),classes:A(T().min(1)).optional(),classesExclude:A(T().min(1)).optional(),minConfidence:E().min(0).max(1).optional(),zones:s0.optional(),zonesExclude:A(T().min(1)).optional(),crossing:a0.optional(),labelEquals:A(T().min(1)).optional(),identities:A(T().min(1)).optional(),plates:n0.optional(),identitiesExclude:A(T().min(1)).optional(),minImportance:E().min(0).max(1).optional(),minDwellSeconds:E().min(0).optional(),source:F([`pipeline`,`onboard`,`sensor`,`audio`,`any`]).optional(),minLabelConfidence:E().min(0).max(1).optional(),eventTypeTokens:A(T().min(1)).optional(),sensorKinds:A(T().min(1)).optional(),sensorTransition:o0.optional(),packagePhase:F([`delivered`,`picked-up`,`both`]).optional(),systemEvent:Z1.optional(),customZones:A(G1).optional(),occupancy:r0.optional(),audio:i0.optional()}),_0=j({targetId:T().min(1),params:P(T(),O()).optional()}),v0=F([`scene-boxes`,`crop`,`clean`,`none`]),y0=F([`cropped`,`full`,`boxed`]),b0=F([`mosaic`,`each`]),x0=j({image:v0.optional(),showTriggerZone:D().optional(),showSubjectPath:D().optional(),attach:F([`best`,`best-matching`,`keyFrame`,`none`]).optional(),frame:y0.optional(),zoneCrop:D().optional(),gif:D().optional(),clip:D().optional(),clipPreRollSec:E().int().min(0).max(30).optional(),clipPostRollSec:E().int().min(0).max(30).optional(),clipSpeed:E().min(1).max(8).optional(),profile:c$.optional(),linkedCameras:b0.optional()}),S0=F([`shared`,`per-class`]),C0=j({cooldownSec:E().int().min(0).max(86400).default(60),scope:F([`rule`,`rule-device`]).default(`rule-device`),granularity:S0.optional()}),w0=1e3,T0=2e4,E0=8e3,D0=j({op:F([`>=`,`>`,`<=`,`<`,`==`]),count:E().int().min(0).max(1e3)}),O0=j({enabled:D().default(!1),profileId:T().optional(),prompt:T().max(1e3).optional(),expect:D0.optional(),timeoutMs:E().int().min(w0).max(T0).default(E0),onTimeout:F([`fire`,`suppress`]).default(`fire`),maxImagePx:E().int().min(64).max(2048).default(448)}),k0=j({name:T().min(1).max(200),enabled:D().default(!0),delivery:K1,conditions:g0.default({}),schedule:$1.optional(),systemEventDelivery:yae.optional(),targets:A(_0),targetUsers:A(T()).optional(),media:x0.default({}),throttle:C0.default({cooldownSec:60,scope:`rule-device`}),template:j({title:T().max(500).optional(),body:T().max(2e3).optional()}).optional(),priority:E().int().min(1).max(5).default(3),ownerUserId:T().optional(),snoozeAllowGlobal:D().optional(),snoozeOptions:A(E().int().min(1).max(Q1)).max(4).optional(),actions:p0.optional(),confirm:O0.optional(),groupingSec:E().int().min(5).max(60).optional(),askVerdict:D().optional()}),A0=k0.partial().extend({disabledTargetIds:A(T()).optional(),enabled:D().optional(),conditions:g0.optional(),media:x0.optional(),throttle:C0.optional(),priority:E().int().min(1).max(5).optional()}),j0=F([`template`,`schedule`,`targetUsers`,`snoozeOptions`,`snoozeAllowGlobal`,`actions`,`confirm`,`groupingSec`,`waitForEnhancement`,`groupIdleSec`]),M0=j({ruleId:T(),patch:A0,clear:A(j0).optional()}),N0=k0.extend({id:T(),createdBy:T(),createdAt:E(),updatedAt:E(),disabledTargetIds:A(T()).default([])}),P0=F([`device-state`,`streams`,`battery`,`consumables`,`detection-blind`,`nodes`,`addons`,`addon-updates`,`updates`]),F0=j({id:P0,status:F([`read`,`unavailable`]),items:E().int().nonnegative(),reason:T().optional()}),I0=j({section:P0.optional(),title:T(),text:T(),count:E().int().nonnegative()}),L0=j({empty:D(),count:E().int().nonnegative(),text:T(),sections:A(F0),dropped:P(T(),E().int().nonnegative()),excludedGroups:A(T()),split:t0.optional(),rows:A(I0).optional()}),R0=j({recordId:T(),recordKind:F([`object-event`,`track`,`device-event`,`package-event`,`system-event`]),deviceId:E(),timestamp:E(),wouldFire:D(),failedCondition:T().optional(),className:T().optional(),label:T().optional()}),z0=F([`detection`,`sensor`,`occupancy`,`sound`,`device-events`,`system`,`alarm`,`mixed`]),B0=F([`detection`,`sensor`,`occupancy`,`sound`,`system`]),V0=F([`rule`,`timelapse`,`summary`]),H0=F([`title`,`body`,`previewText`,`captionText`]),U0=F([`subject`,`place`,`time`,`rule`,`occupancy`,`sound`,`sensor`,`system`,`digest`,`ai`]),W0=j({name:T().regex(/^\w+$/),label:T(),description:T().optional(),example:T(),group:U0,families:A(V0).min(1),fields:A(H0).optional(),kinds:A(B0).optional(),deliveries:A(K1).optional(),systemEventKinds:A(q1).optional(),systemEventDeliveries:A(e0).optional(),dynamic:j({prefix:I(`count_`),from:I(`classes`)}).optional()}),G0=j({context:j({family:V0,field:H0,kind:z0.optional(),delivery:K1.optional(),systemEventKinds:A(q1).optional(),systemEventDelivery:e0.optional()}),template:j({title:T().max(500).optional(),body:T().max(2e3).optional()})}),K0=j({title:T().nullable(),body:T().nullable(),unknown:A(T())}),q0=j({id:T(),group:F([`scope`,`class`,`zones`,`quality`,`label`,`schedule`,`device`,`package`,`occupancy`,`audio`,`system`]),label:T(),valueType:F([`deviceIdList`,`deviceIdExcludeList`,`stringList`,`number01`,`number`,`sourceSelect`,`zoneSelection`,`zoneIdList`,`schedule`,`plateMatcher`,`packagePhase`,`crossingSelect`,`sensorTransition`,`polygonDraw`,`occupancy`,`audio`,`deviceState`,`scene`,`systemEvent`]),operator:F([`in`,`notIn`,`anyOf`,`allOf`,`gte`,`fuzzyIn`,`withinSchedule`]),appliesTo:A(K1),phase:T(),description:T().optional(),options:A(j({value:T(),label:T(),hint:T().optional()})).readonly().optional()}),J0=F([`pending`,`sent`,`dead`]),Y0=F([`object-event`,`track-end`,`device-event`,`package-event`,`system-event`]),X0=j({className:T(),label:T().optional(),confidence:E().optional(),zones:A(T()),timestamp:E(),systemEvent:j({kind:q1,subject:T(),title:T(),body:T(),data:P(T(),O())}).optional()}),Z0=j({id:T(),ruleId:T(),ruleName:T(),delivery:K1,targetId:T(),deviceId:E(),recordKind:Y0,recordId:T(),trackId:T().optional(),status:J0,attempts:E().int(),createdAt:E(),updatedAt:E(),error:T().optional(),subject:X0,artifactIds:A(T().min(1)).optional()}),Q0=j({ruleId:T().optional(),deviceId:E().optional(),status:J0.optional(),since:E().optional(),until:E().optional(),limit:E().int().min(1).max(500).default(100)}),$0=j({runs:A(j({ruleId:T(),lastAt:E(),status:J0,deviceId:E()})),horizonMs:E().nonnegative().nullable()}),e2=F([`rule`,`device`,`all`]),t2=j({scope:e2,ruleId:T().optional(),deviceId:E().int().optional(),classes:A(T().min(1)).min(1).optional(),durationMinutes:E().int().min(1).max(Q1),global:D().optional(),summary:D().optional()}),n2=j({id:T(),userId:T(),scope:e2,ruleId:T().optional(),deviceId:E().int().optional(),classes:A(T().min(1)).min(1).optional(),startedAt:E(),expiresAt:E(),global:D(),summary:D(),digestSentAt:E().optional()});j({snoozeId:T(),targetId:T(),ruleId:T(),ruleName:T(),deviceId:E().int(),count:E().int(),firstAt:E(),lastAt:E()});var r2=3600,i2=E().int().min(0).max(600),a2=E().int().min(0).max(r2),o2=e=>new Set(e.map(e=>e.mode)).size===e.length,s2=F([`rearmAfter`,`disableAfter`,`doNothing`]),c2=A(j({mode:H1,exitDelaySec:i2.optional(),entryDelaySec:i2.optional(),triggeredDurationSec:a2.optional(),postTriggeredAction:s2.optional(),schedule:$1.optional(),notifyDuringEntryDelay:D().optional(),notifySensorRewatched:D().optional(),notifySensorIgnored:D().optional()})).max(8).refine(o2,{message:`modeDelays: at most one entry per arm mode`}),l2=A(j({mode:H1,exitDelaySec:i2.nullable().optional(),entryDelaySec:i2.nullable().optional(),triggeredDurationSec:a2.nullable().optional(),postTriggeredAction:s2.nullable().optional(),schedule:$1.nullable().optional(),notifyDuringEntryDelay:D().nullable().optional(),notifySensorRewatched:D().nullable().optional(),notifySensorIgnored:D().nullable().optional()})).max(8).refine(o2,{message:`modeDelays: at most one edit per arm mode`}),u2=j({mode:H1,deviceId:E().int().positive(),nonBlocking:D()}),d2=j({mode:H1,deviceId:E().int().positive(),blocking:D()}),f2=j({mode:H1,deviceId:E().int().positive(),secureOnArm:D()}),p2=j({mode:H1,deviceIds:A(E().int()).max(200)}),m2=p2,h2=p2,g2=p2,_2=A(m2).max(8).refine(o2,{message:`nonBlocking: at most one list per arm mode`}),v2=A(h2).max(8).refine(o2,{message:`blocking: at most one list per arm mode`}),y2=A(g2).max(8).refine(o2,{message:`secureOnArmOff: at most one list per arm mode`}),b2=j({exitDelaySec:i2,entryDelaySec:i2,triggeredDurationSec:a2,postTriggeredAction:s2.optional(),announceArm:D().optional(),announceTargets:A(T().min(1)).max(16),nonBlocking:_2.default([]),blocking:v2.default([]),secureOnArmOff:y2.default([]),modeDelays:c2.default([])}),x2=j({id:T().min(1).max(64),name:T().min(1).max(64),isDefault:D()}),S2=j({activeId:T().min(1),items:A(x2).min(1)}),C2=j({name:T().min(1).max(64),cloneFromId:T().min(1).max(64).optional()}),w2=j({id:T().min(1).max(64),name:T().min(1).max(64)}),T2=j({id:T().min(1).max(64)}),E2=b2.extend({nonBlocking:_2,blocking:v2,secureOnArmOff:y2,modeDelays:l2,nonBlockingEdit:u2,blockingEdit:d2,secureOnArmEdit:f2}).partial().refine(e=>e.nonBlocking===void 0||e.nonBlockingEdit===void 0,{message:`nonBlocking and nonBlockingEdit are exclusive — send the whole lists or one edit`}).refine(e=>e.blocking===void 0||e.blockingEdit===void 0,{message:`blocking and blockingEdit are exclusive — send the whole lists or one edit`}).refine(e=>e.secureOnArmOff===void 0||e.secureOnArmEdit===void 0,{message:`secureOnArmOff and secureOnArmEdit are exclusive — send the whole lists or one edit`}),D2=F([`muted`,`detection-off`,`offline`]),O2=j({deviceId:E().int(),reason:D2}),k2=j({mode:H1,ruleCount:E().int().min(0),allDevices:D(),deviceIds:A(E().int()),allDevicesExcept:A(E().int()).default([]),skippedDevices:A(O2).default([])}),A2=j({deviceId:E().int(),name:T(),state:T(),blocking:D()}),j2=j({deviceId:E().int(),name:T(),phase:F([`open`,`closed`])}),M2=j({mode:H1,devices:A(A2),unknown:A(E().int())}),N2=j({ruleId:T(),ruleName:T(),deviceId:E().int(),name:T(),since:E(),dropped:E().int().min(0)}),P2=j({state:V1,targetMode:H1.nullable(),availableModes:A(H1),openings:A(M2),exclusions:A(j2),bypassedInputs:A(N2).default([])}),F2=j({deviceId:E().int().nullable(),settings:b2,profiles:S2.optional(),coverage:A(k2),live:P2.optional()}),I2=F([`open`,`closed`,`unknown`,`not-opening`]),L2=j({deviceId:E().int().positive(),reading:I2,state:T().nullable(),unknownWhy:F([`read-failed`,`unknown-word`]).nullable(),online:D().nullable(),controllable:D().default(!1)}),R2=j({deviceIds:A(E().int().positive()).max(500)}),z2=j({sensors:A(L2),readAt:E().int().nonnegative()}),B2=j({deviceId:E().int().nonnegative().optional(),seconds:E().min(0).max(60),profile:c$.optional(),ruleId:T(),ruleName:T(),reason:F([`window`,`occupancy`])}),V2=j({rulesLoaded:D(),asks:A(B2).readonly()});Q(j({}),j({rules:A(N0)}),{auth:`admin`}),Q(j({ruleId:T()}),j({rule:N0.nullable()}),{auth:`admin`}),Q(j({rule:k0}),j({rule:N0}),{kind:`mutation`,auth:`admin`,caller:`required`}),Q(M0,j({rule:N0}),{kind:`mutation`,auth:`admin`,caller:`required`}),Q(j({ruleId:T()}),j({success:I(!0)}),{kind:`mutation`,auth:`admin`}),Q(j({ruleId:T(),enabled:D()}),j({success:I(!0)}),{kind:`mutation`,auth:`admin`}),Q(j({}),j({sequences:A(l0)}),{auth:`admin`}),Q(j({sequenceId:T().min(1)}),j({sequence:l0.nullable()}),{auth:`admin`}),Q(j({sequence:u0}),j({sequence:l0}),{kind:`mutation`,auth:`admin`}),Q(j({sequenceId:T().min(1),sequence:u0}),j({sequence:l0}),{kind:`mutation`,auth:`admin`}),Q(j({sequenceId:T().min(1)}),j({success:I(!0)}),{kind:`mutation`,auth:`admin`}),Q(j({}),V2,{auth:`admin`}),Q(j({}),j({mutedDeviceIds:A(E().int()).readonly()}),{auth:`admin`}),Q(j({deviceId:E().int(),muted:D()}),j({success:I(!0)}),{kind:`mutation`,auth:`admin`}),Q(j({rule:k0,lookbackMinutes:E().int().min(1).max(1440).default(60)}),j({results:A(R0)}),{kind:`mutation`,auth:`admin`}),Q(j({rule:k0}),L0,{kind:`mutation`,auth:`admin`,access:`view`}),Q(j({}),j({catalog:A(q0),taxonomy:R1.optional()})),Q(j({}),j({vars:A(W0)})),Q(G0,K0,{kind:`mutation`,access:`view`}),Q(j({filter:Q0.default({limit:100})}),j({entries:A(Z0)}),{auth:`admin`}),Q(j({}),$0,{auth:`admin`}),Q(j({artifactId:T().min(1)}),j({url:T().nullable()}),{auth:`admin`}),Q(j({}),j({snoozes:A(n2)}),{caller:`required`}),Q(j({snooze:t2}),j({snooze:n2}),{kind:`mutation`,caller:`required`}),Q(j({snoozeId:T()}),j({success:I(!0)}),{kind:`mutation`,caller:`required`}),Q(j({}),F2,{auth:`admin`}),Q(j({patch:E2}),F2,{kind:`mutation`,auth:`admin`}),Q(C2,F2,{kind:`mutation`,auth:`admin`}),Q(w2,F2,{kind:`mutation`,auth:`admin`}),Q(T2,F2,{kind:`mutation`,auth:`admin`}),Q(T2,F2,{kind:`mutation`,auth:`admin`}),Q(R2,z2,{auth:`admin`});var H2={motion:`motion`,audio:`audio`,person:`person`,vehicle:`vehicle`,animal:`animal`,package:`package`,door:`door`,pir:`pir`,smoke:`smoke`,water:`water`,button:`button`,generic:`generic`,gas:`smoke`,vibration:`generic`,tamper:`generic`,presence:`person`,lock:`generic`,siren:`generic`,switch:`generic`,doorbell:`button`};function U2(e){return H2[e]??`generic`}var W2={contact:`contact`,motion:`motion-sensor`,smoke:`smoke`,flood:`flood`,gas:`gas`,"carbon-monoxide":`carbon-monoxide`,vibration:`vibration`,tamper:`tamper`,presence:`presence`,"enum-sensor":`enum-sensor`,"event-emitter":`device-event`,"lock-control":`lock`,cover:`cover`,switch:`switch`,button:`button`,doorbell:`doorbell`};function G2(e,t){let n=I1[t];if(n===void 0)throw Error(`EVENT_KIND_BY_CAP: cap '${e}' maps to unknown taxonomy kind '${t}'`);return{...n,icon:U2(n.iconId)}}var K2=Object.freeze(Object.fromEntries(Object.entries(W2).map(([e,t])=>[e,G2(e,t)])));F([`queue-full`,`camera-backoff`,`sleeping`,`camera-refused`,`no-keyframe`,`decode-failed`,`no-catalog-row`,`unsupported`,`unknown-device`,`uid-missing`]),F([`deferred`,`final`]);var q2=j({id:T(),source:T(),kind:F([`motion`,`object`,`audio`,`native`]),timeRange:j({startMs:E(),endMs:E()}),labels:A(T()).max(3).optional(),thumbnail:T().optional(),stillAtMs:E().optional(),eventIds:A(T()).optional(),eventCount:E().int().nonnegative().optional(),holes:A(j({startMs:E(),endMs:E()})).optional(),thumbnailMint:T().optional(),thumbnailUnavailable:j({reason:F([`sleeping`,`camera-refused`,`no-keyframe`,`unsupported`])}).optional(),catalogAsOf:E().optional(),nativeTypes:A(T()).optional(),behaviours:A(T()).optional(),streams:j({sub:j({id:T(),bytes:E().optional()}).optional(),main:j({id:T(),bytes:E().optional()}).optional()}).optional(),supportSub:D().optional(),playable:D().optional(),unplayableReason:T().optional(),inProgress:D().optional()}),J2=j({playbackUrl:T(),format:F([`hls`,`mp4`]).optional(),served:c$.optional(),playbackEndpoints:A(T()).optional(),token:T().optional()}),Y2=F([`authorised`]),X2=j({base64:T(),contentType:T(),name:T(),bytes:E().int().nonnegative(),served:c$,durationMs:E().positive().optional()}),Z2=j({ticket:a$,contentType:T(),name:T(),served:c$,durationMs:E().positive().optional()}),Q2=F([`opus`,`pcmu`,`none`]),$2=F([`not-requested`,`unsupported-ask`]),e4=j({url:T().min(1),expiresAtMs:E(),transport:I(`forward-only`),served:c$,servedAudio:Q2,audioReason:$2.optional()}),t4=j({transport:F([`stream`,`file`]),seek:F([`forward`,`free`]),stepBack:D(),scrub:D(),rates:A(E().positive()).min(1).readonly()}),n4=j({state:F([`ok`,`sleeping`,`unreachable`,`no-storage`,`index-empty`]),reason:T().optional(),catalogAsOf:E().optional()}),r4=j({source:T(),label:T(),addonId:T().optional(),availability:n4});p$.Camera,Q(j({deviceId:E(),since:E(),until:E(),limit:E().int().positive().optional(),provider:T().min(1)}),A(q2).readonly(),{kind:`query`,auth:`protected`}),Q(j({deviceId:E()}),A(r4).readonly(),{kind:`query`,auth:`protected`}),Q(j({deviceId:E(),clipId:T(),profile:c$.optional()}),J2,{kind:`query`,auth:`protected`}),E$(j({deviceId:E(),clipId:T().min(1),provider:T().min(1),profile:c$.optional(),maxBytes:E().int().positive().optional(),wake:Y2.optional()}),X2,{kind:`query`,auth:`protected`}),E$(j({deviceId:E(),clipId:T().min(1),provider:T().min(1),profile:c$.optional(),maxBytes:E().int().positive().optional(),wake:Y2.optional()}),Z2,{kind:`query`,auth:`protected`}),E$(j({deviceId:E(),clipId:T().min(1),provider:T().min(1),profile:c$.optional(),audio:Q2.optional()}),e4,{kind:`query`,auth:`protected`}),E$(j({deviceId:E(),provider:T().min(1)}),t4,{kind:`query`,auth:`protected`});var i4=j({addonId:T(),capabilities:A(T()).readonly(),status:T()}),a4=j({pid:E(),name:T(),state:T(),cpuPercent:E(),memoryRss:E(),uptimeSeconds:E(),services:A(i4).readonly(),groupId:T().optional()}),o4=j({id:T(),status:T(),cpuPercent:E(),memoryRss:E()}),s4=j({category:T(),total:E(),healthy:E(),addons:A(o4).readonly()}),c4=j({name:T(),version:T()}),l4=j({id:T(),name:T(),hostname:T(),platform:T(),arch:T(),cpuModel:T().nullable(),cpuCores:E(),memoryMB:E(),engines:A(T()).readonly(),isHub:D(),isOnline:D(),cpuPercent:E(),memoryPercent:E(),uptime:E(),lastSeen:T(),localIps:A(T()).readonly(),addons:A(j({id:T(),capabilities:A(T()).readonly(),status:T()})).readonly(),processes:A(a4).readonly(),categories:A(s4).readonly(),rootPackage:c4.nullable(),meshTransport:F([`tls`,`clear`]).optional(),capabilitiesRegistered:D().optional()}),u4=j({callerAddonId:T(),providerAddonId:T(),capName:T(),callsPerMin:E(),lastCallAtMs:E()}),d4=j({nodeId:T(),name:T(),version:T(),status:T(),synced:D()}),f4=j({hubVersion:T(),nodes:A(d4)}),p4=j({nodeId:T(),addonId:T()}),m4=j({id:T(),status:T(),version:T().optional(),packageName:T().optional()}),h4=j({success:D()}),g4=j({success:D(),reason:T().optional()}),_4=j({restarted:A(T()).readonly(),failed:A(T()).readonly()}),v4=j({nodeId:T(),name:T()}),y4=j({nodes:A(j({id:T(),name:T(),isHub:D(),isOnline:D()})).readonly(),complete:D()});Q(k(),A(l4).readonly(),{auth:`admin`}),Q(k(),y4,{auth:`admin`}),Q(p4,h4,{kind:`mutation`,auth:`admin`}),Q(p4,h4,{kind:`mutation`,auth:`admin`}),Q(p4,h4,{kind:`mutation`,auth:`admin`}),Q(j({nodeId:T(),processName:T()}),g4,{kind:`mutation`,auth:`admin`}),Q(j({nodeId:T()}),_4,{kind:`mutation`,auth:`admin`}),Q(j({nodeId:T()}),h4,{kind:`mutation`,auth:`admin`}),Q(j({nodeId:T(),name:T().min(1).max(64)}),v4,{kind:`mutation`,auth:`admin`}),Q(k(),P(T(),f4),{auth:`admin`}),Q(j({windowSeconds:E().int().positive().max(300).default(60)}),A(u4).readonly(),{auth:`admin`}),Q(j({nodeId:T()}),A(m4).readonly(),{auth:`admin`}),Q(j({nodeId:T(),level:T()}),h4,{kind:`mutation`,auth:`admin`}),Q(j({nodeId:T(),addonId:T(),queryName:T(),params:P(T(),O()).optional()}),O(),{kind:`mutation`,auth:`admin`});var b4=E().min(.25).max(32),x4=j({fromSec:E().nonnegative(),toSec:E().nonnegative()}).refine(e=>e.toSec>e.fromSec,{message:`dense range must have toSec > fromSec`}),S4=j({everyMs:E().int().positive(),ranges:A(x4).min(1).max(200)}),C4=j({everyMs:E().int().positive(),outputFps:E().int().min(1).max(60).optional(),dense:S4.optional()}).superRefine((e,t)=>{e.dense!==void 0&&e.dense.everyMs>=e.everyMs&&t.addIssue({code:is.custom,message:`dense.everyMs must be strictly smaller than the base everyMs`,path:[`dense`,`everyMs`]})}),w4=j({speed:b4.optional(),timelapse:C4.optional(),includeAudio:D(),maxLifeMs:E().int().positive(),deleteAfterDownload:D(),title:T().max(200).optional(),notifyTargetIds:A(T().min(1)).max(20).optional()}).superRefine((e,t)=>{e.speed!==void 0&&e.timelapse!==void 0&&t.addIssue({code:is.custom,message:`speed and timelapse are mutually exclusive`,path:[`timelapse`]})}),T4=F([`queued`,`rendering`,`ready`,`failed`,`expired`,`deleted`]),E4=N(`kind`,[j({kind:I(`footage`),deviceId:E(),profiles:A(T()).min(1),fromMs:E(),toMs:E()}),j({kind:I(`clip`),deviceId:E(),provider:T().min(1),source:T().min(1),sourceLabel:T().min(1),clipId:T().min(1),catalogWindow:j({sinceMs:E(),untilMs:E()}),profile:F([`high`,`mid`,`low`]),wake:Y2.optional()})]),D4=j({id:T(),deviceId:E(),profile:T(),fromMs:E(),toMs:E(),subject:E4.optional(),options:w4,state:T4,progressPct:E().nullable(),fileBytes:E().nullable(),expiresAt:E(),deleteAfterDownload:D(),downloadedAt:E().nullable(),createdAt:E(),createdBy:T(),error:T().nullable()});F([`catalog-miss`,`catalog-unreachable`,`no-file-for-window`,`clip-in-progress`,`unsupported-option`,`sleeping`,`camera-refused`,`fetch-failed`,`too-large-to-transfer`,`wake-expired`]);var O4=j({url:T(),endpoints:A(T())}),k4=j({base64:T(),contentType:T(),name:T(),bytes:E().int().nonnegative()});function A4(e){return e.profiles!==void 0&&e.profiles.length>0?[...e.profiles]:typeof e.profile==`string`&&e.profile.length>0?[e.profile]:[]}Q(j({deviceId:E(),profile:T().optional(),profiles:A(T()).min(1).optional(),fromMs:E().optional(),toMs:E().optional(),subject:E4.optional(),options:w4}).superRefine((e,t)=>{if(e.subject?.kind===`clip`){e.subject.deviceId!==e.deviceId&&t.addIssue({code:is.custom,message:`subject.deviceId (${e.subject.deviceId}) must equal deviceId (${e.deviceId}) — the top-level field is what per-device scope enforcement reads`,path:[`subject`,`deviceId`]}),(e.fromMs!==void 0||e.toMs!==void 0)&&t.addIssue({code:is.custom,message:`a clip export asks for no time range: the camera chose the boundaries and they are read from the catalog row`,path:[`fromMs`]});return}e.subject?.kind===`footage`&&e.subject.deviceId!==e.deviceId&&t.addIssue({code:is.custom,message:`subject.deviceId (${e.subject.deviceId}) must equal deviceId (${e.deviceId})`,path:[`subject`,`deviceId`]});let n=e.subject?.kind===`footage`?e.subject.fromMs:e.fromMs,r=e.subject?.kind===`footage`?e.subject.toMs:e.toMs;(typeof n!=`number`||typeof r!=`number`)&&t.addIssue({code:is.custom,message:`a footage export needs fromMs and toMs`,path:[`fromMs`]}),(e.subject?.kind===`footage`?[...e.subject.profiles]:A4(e)).length<1&&t.addIssue({code:is.custom,message:`pass profiles[] (min 1) or legacy profile`,path:[`profiles`]})}),D4,{role:`viewer`,kind:`mutation`,auth:`protected`}),Q(j({deviceId:E().optional()}),A(D4),{role:`viewer`,kind:`query`,auth:`protected`}),Q(j({exportId:T()}),D4,{role:`viewer`,kind:`query`,auth:`protected`}),Q(j({exportId:T()}),D4,{role:`viewer`,kind:`mutation`,auth:`protected`}),Q(j({exportId:T()}),D4,{role:`viewer`,kind:`mutation`,auth:`protected`}),Q(j({exportId:T()}),O4,{role:`viewer`,kind:`query`,auth:`protected`}),Q(j({exportId:T()}),k4,{kind:`query`,auth:`protected`});var j4=`media-player.alarm-panel.thermostat.climate.humidifier.water-heater.lock.cover.valve.fan.vacuum.lawn-mower.washer.dryer.dishwasher.light.switch.siren.button.control.notifier.script.automation.update.presence.weather.image.sensor`.split(`.`),M4=[`contact-sensor`,`motion-sensor`,`occupancy-sensor`,`smoke-sensor`,`co-sensor`,`gas-sensor`,`leak-sensor`,`vibration-sensor`,`tamper-sensor`,`sound-sensor`];function N4(e){if(e===void 0)return M4.length;let t=M4.indexOf(e);return t===-1?M4.length:t}function P4(e){let t=j4.indexOf(e);return t===-1?j4.length:t}function F4(e,t){let n=e=>e.toLowerCase().replace(/[-_\s]+/g,` `).trim();return n(e)===n(t)}function I4(e,t,n){if(t!=null){let n=e.find(e=>e.stableId===t)??e.find(e=>e.entityId!==void 0&&e.entityId===t);if(n!==void 0)return n}let r=e=>n!==void 0&&n.length>0&&e.name!==void 0&&F4(e.name,n)?0:1;return[...e].toSorted((e,t)=>N4(e.role)-N4(t.role)||r(e)-r(t)||P4(e.type)-P4(t.type))[0]??null}var L4={PCMU:20*Math.log10(4),PCMA:20*Math.log10(8)};function R4(e,t){return t+L4[e]}Math.round(R4(`PCMU`,-55));var z4={hitPercent:60,samplingSeconds:10};new Set(J1),new Map(Object.entries({"device-online":`device-events`,"device-offline":`device-events`,"device-disabled":`device-events`,"device-enabled":`device-events`,"device-battery-low":`device-events`,"device-battery-normal":`device-events`,"device-consumable-low":`device-events`,"device-consumable-normal":`device-events`,"stream-online":`device-events`,"stream-offline":`device-events`,"detection-blind":`device-events`,"motion-noisy":`device-events`,"motion-calm":`device-events`,"package-llm-silent":`device-events`,"package-llm-answered":`device-events`,"recording-stalled":`device-events`,"recording-healthy":`device-events`,"recording-degraded":`device-events`,"device-attention-required":`device-events`,"device-attention-resolved":`device-events`,"node-online":`system`,"node-offline":`system`,"node-restarting":`system`,"node-updating":`system`,"node-inference-unavailable":`system`,"addon-crash-loop":`system`,"addon-update-available":`system`,"addon-updated":`system`,"server-update-available":`system`,"server-updated":`system`,"wrapper-update-available":`system`,"backup-completed":`system`,"export-completed":`system`,"alert-critical":`system`,"alert-error":`system`,"alert-critical-resolved":`system`,"rule-broken":`system`,"rule-repaired":`system`,"storage-location-low":`system`,"storage-location-critical":`system`,"storage-location-ok":`system`,"alarm-triggered":`alarm`,"alarm-armed":`alarm`,"alarm-disarmed":`alarm`,"alarm-arming":`alarm`,"alarm-arm-refused":`alarm`,"alarm-pending":`alarm`,"alarm-rearmed":`alarm`,"alarm-sensor-bypass":`alarm`,"alarm-check-failed":`alarm`,"camera-online":null,"camera-offline":null,"camera-disabled":null,"camera-enabled":null}));var B4=[{id:`device-state`,family:`device-events`,label:`Device state`,kinds:[`device-offline`,`device-online`,`device-disabled`,`device-enabled`]},{id:`streams`,family:`device-events`,label:`Streams`,kinds:[`stream-offline`,`stream-online`]},{id:`battery`,family:`device-events`,label:`Battery`,kinds:[`device-battery-low`,`device-battery-normal`]},{id:`consumables`,family:`device-events`,label:`Consumables`,kinds:[`device-consumable-low`,`device-consumable-normal`]},{id:`detection-blind`,family:`device-events`,label:`Detecting nothing`,kinds:[`detection-blind`]},{id:`motion-noise`,family:`device-events`,label:`Motion without a subject`,kinds:[`motion-noisy`,`motion-calm`]},{id:`package-llm`,family:`device-events`,label:`Package confirm`,kinds:[`package-llm-silent`,`package-llm-answered`]},{id:`recording`,family:`device-events`,label:`Recording`,kinds:[`recording-stalled`,`recording-healthy`,`recording-degraded`]},{id:`device-attention`,family:`device-events`,label:`Needs attention`,kinds:[`device-attention-required`,`device-attention-resolved`]},{id:`nodes`,family:`system`,label:`Nodes`,kinds:[`node-offline`,`node-online`,`node-restarting`,`node-inference-unavailable`]},{id:`addons`,family:`system`,label:`Addons stopped`,kinds:[`addon-crash-loop`]},{id:`addon-updates`,family:`system`,label:`Addon updates`,kinds:[`addon-update-available`,`addon-updated`]},{id:`updates`,family:`system`,label:`Server & container updates`,kinds:[`server-update-available`,`node-updating`,`server-updated`,`wrapper-update-available`]},{id:`backups-exports`,family:`system`,label:`Backups & exports`,kinds:[`backup-completed`,`export-completed`]},{id:`storage`,family:`system`,label:`Storage locations`,kinds:[`storage-location-low`,`storage-location-critical`,`storage-location-ok`]},{id:`alerts`,family:`system`,label:`Alerts`,kinds:[`alert-critical`,`alert-error`,`alert-critical-resolved`]},{id:`rule-health`,family:`system`,label:`Notification rules`,kinds:[`rule-broken`,`rule-repaired`]},{id:`alarm`,family:`alarm`,label:`Alarm`,kinds:X1}];function V4(e){return B4.filter(t=>t.family===e).flatMap(e=>e.kinds)}z4.hitPercent,z4.samplingSeconds;var H4=Object.freeze(Object.fromEntries(Object.entries(K2).flatMap(([e,t])=>{let n=C$[e];return n===void 0||t.category!==`sensor`?[]:[[t.kind,n]]})));Object.freeze(Object.keys(H4));var U4=[`body`],$=[`title`,`body`],W4=[`device-battery-low`,`device-battery-normal`],G4=[`device-consumable-low`,`device-consumable-normal`],K4=[`alert-critical`,`alert-error`,`alert-critical-resolved`],q4=[`device-attention-required`,`device-attention-resolved`],J4=[`addon-update-available`,`server-update-available`,`wrapper-update-available`],Y4=[`addon-update-available`,`server-update-available`],X4=[`alarm-triggered`,`alarm-armed`,`alarm-disarmed`,`alarm-arming`,`alarm-arm-refused`,`alarm-pending`,`alarm-rearmed`,`alarm-sensor-bypass`,`alarm-check-failed`],Z4=[`alarm-triggered`],Q4=[`device-online`,`device-offline`,`device-disabled`,`device-enabled`,...W4,...G4,`stream-online`,`stream-offline`,`detection-blind`,`motion-noisy`,`motion-calm`,`package-llm-silent`,`package-llm-answered`,`recording-stalled`,`recording-healthy`,`recording-degraded`,...q4,...X4],$4=[...V4(`device-events`),...V4(`system`)],e3=[{name:`summaryDevices`,label:`Summary: devices offline / switched off`,example:`Garage — offline since 07:12`,kinds:[`device-offline`,`device-online`,`device-disabled`,`device-enabled`]},{name:`summaryStreams`,label:`Summary: streams offline`,example:`Front door (high) — since 06:40`,kinds:[`stream-offline`,`stream-online`]},{name:`summaryBattery`,label:`Summary: low batteries`,example:`Sensore porta — 8 %`,kinds:W4},{name:`summaryConsumables`,label:`Summary: consumables`,example:`Robot — filter 10 %`,kinds:G4},{name:`summaryDetection`,label:`Summary: cameras detecting nothing`,example:`Front door — since 05:10`,kinds:[`detection-blind`]},{name:`summaryNodes`,label:`Summary: nodes`,example:`agent-a — offline since 03:00`,kinds:[`node-offline`,`node-online`,`node-restarting`,`node-inference-unavailable`]},{name:`summaryAddons`,label:`Summary: addons stopped`,example:`hub — recorder stopped after repeated crashes`,kinds:[`addon-crash-loop`]},{name:`summaryAddonUpdates`,label:`Summary: addon updates`,example:`hub:
|
|
79
|
-
• @camstack/addon-recorder 1.2.3 → 1.2.4`,kinds:[`addon-update-available`,`addon-updated`]},{name:`summaryUpdates`,label:`Summary: server & container updates`,example:`server 1.2.377 → 1.2.378`,kinds:[`server-update-available`,`node-updating`,`server-updated`,`wrapper-update-available`]}],t3=[{name:`summaryText`,label:`Summary: every section`,description:`One block per section with something to report, one line per item.`,example:`Batterie scariche: Sensore porta — 8 %`,group:`system`,families:[`rule`],fields:[...$],kinds:[`system`],systemEventKinds:[...$4],systemEventDeliveries:[`summary`]},{name:`summaryCount`,label:`Summary: items reported`,example:`3`,group:`system`,families:[`rule`],fields:[...$],kinds:[`system`],systemEventKinds:[...$4],systemEventDeliveries:[`summary`]},{name:`summarySection`,label:`Summary: this section`,description:`The section a per-section summary row is about; on a summary sent as one message, every section it reports, comma-separated.`,example:`Batterie scariche`,group:`system`,families:[`rule`],fields:[...$],kinds:[`system`],systemEventKinds:[...$4],systemEventDeliveries:[`summary`]},...e3.map(e=>({name:e.name,label:e.label,example:e.example,group:`system`,families:[`rule`],fields:[...$],kinds:[`system`],systemEventKinds:[...e.kinds],systemEventDeliveries:[`summary`]}))];[[...Q4],([...$],[...Z4]),([...$],[...Z4]),([...$],[...Z4]),[...$],([...$],[...Z4]),([...$],[...Y4]),[...$],([...$],[...Z4]),([...$],[...Z4]),([...$],[...Z4]),[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...U4],[...$],([...$],[...Q4]),([...$],[...Z4]),([...$],[...Q4]),([...$],[...W4,...G4]),([...$],[...G4]),[...$],([...$],[...J4,...K4]),([...$],[...J4,...K4]),[...$],[...$],[...$],[...$],[...$],[...$],[...$],([...$],[...q4,...K4]),[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],([...$],[...J4]),([...$],[...Y4]),([...$],[...Y4]),([...$],[...J4]),([...$],[...J4]),([...$],[...Y4]),[...$],[...$],[...$],[...$],[...$],[...$],[...$],([...$],[...q4,...K4]),([...$],[...K4]),([...$],[...q4,...K4]),([...$],[...K4]),([...$],[...q4,...K4]),[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],...t3],new Map([{id:`device-connectivity`,family:`device-events`,label:`Device connectivity (offline / back online)`,bad:[`device-offline`],recovery:[`device-online`],snapshotLabel:`Devices offline now`,snapshotSection:`device-state`},{id:`device-switch`,family:`device-events`,label:`Device switched off / back on`,bad:[`device-disabled`],recovery:[`device-enabled`],snapshotLabel:`Devices switched off now`,snapshotSection:`device-state`},{id:`stream-connectivity`,family:`device-events`,label:`Stream connectivity (offline / back online)`,bad:[`stream-offline`],recovery:[`stream-online`],snapshotLabel:`Streams offline now`,snapshotSection:`streams`},{id:`battery`,family:`device-events`,label:`Battery (low / back to normal)`,bad:[`device-battery-low`],recovery:[`device-battery-normal`],snapshotLabel:`Batteries low now`,snapshotSection:`battery`},{id:`consumables`,family:`device-events`,label:`Consumables (low / replaced)`,bad:[`device-consumable-low`],recovery:[`device-consumable-normal`],snapshotLabel:`Consumables low now`,snapshotSection:`consumables`},{id:`motion-noise`,family:`device-events`,label:`Motion without a subject (constant / calm again)`,bad:[`motion-noisy`],recovery:[`motion-calm`],snapshotLabel:`Cameras with constant motion now`,snapshotSection:null},{id:`package-llm-confirm`,family:`device-events`,label:`Package confirm (not answering / answering again)`,bad:[`package-llm-silent`],recovery:[`package-llm-answered`],snapshotLabel:`Cameras whose package confirm is not answering`,snapshotSection:null},{id:`recording-health`,family:`device-events`,label:`Recording health (stalled or degraded / recording again)`,bad:[`recording-stalled`,`recording-degraded`],recovery:[`recording-healthy`],snapshotLabel:`Recordings stalled now`,snapshotSection:null},{id:`device-attention`,family:`device-events`,label:`Device needs attention (raised / resolved)`,bad:[`device-attention-required`],recovery:[`device-attention-resolved`],snapshotLabel:`Devices needing attention now`,snapshotSection:null},{id:`node-connectivity`,family:`system`,label:`Node connectivity (offline / back online)`,bad:[`node-offline`],recovery:[`node-online`],snapshotLabel:`Nodes offline now`,snapshotSection:`nodes`},{id:`storage-space`,family:`system`,label:`Storage space (low or critical / ok again)`,bad:[`storage-location-low`,`storage-location-critical`],recovery:[`storage-location-ok`],snapshotLabel:`Storage locations low now`,snapshotSection:null},{id:`critical-alerts`,family:`system`,label:`Critical alerts (raised / resolved)`,bad:[`alert-critical`],recovery:[`alert-critical-resolved`],snapshotLabel:`Critical alerts open now`,snapshotSection:null},{id:`rule-health`,family:`system`,label:`Rule health (broken / repaired)`,bad:[`rule-broken`],recovery:[`rule-repaired`],snapshotLabel:`Notification rules broken now`,snapshotSection:null}].flatMap(e=>[...e.bad,...e.recovery].map(t=>[t,e]))),new Set(`disarmed.armed_home.armed_away.armed_night.armed_vacation.armed_custom_bypass.arming.disarming.pending.triggered.open.opening.closing.closed.stopped.locked.unlocked.locking.unlocking.jammed.on.off.home.not_home.matched.diverged.unknown.latched.live`.split(`.`));var n3=j({title:T().max(500).optional(),body:T().max(2e3).optional()}),r3=T().min(1).max(200),i3=A(E()).min(1),a3=E().int().min(2).max(3600),o3=E().int().min(1).max(60),s3=A(_0).min(1),c3=E().int().min(1).max(5),l3=E().min(.1).max(3600),u3=E().min(0).max(60),d3=T().max(200),f3=F([`image`,`gif`]),p3=A(T().min(1).max(40)).max(20),m3=j({name:r3,enabled:D().default(!0),deviceIds:i3,schedule:$1,cadenceSec:a3.default(15),framerate:o3.default(10),denseCadenceSec:l3.optional(),minDwellSec:u3.optional(),targets:s3,template:n3.optional(),previewText:d3.optional(),previewMode:f3.default(`image`),reportClasses:p3.optional(),priority:c3.default(3)});j({name:r3.optional(),enabled:D().optional(),deviceIds:i3.optional(),schedule:$1.optional(),cadenceSec:a3.optional(),framerate:o3.optional(),denseCadenceSec:l3.optional(),minDwellSec:u3.optional(),targets:s3.optional(),template:n3.nullable().optional(),previewText:d3.optional(),previewMode:f3.optional(),reportClasses:p3.optional(),priority:c3.optional()}),m3.extend({id:T(),ownerUserId:T().optional(),lastGeneratedAt:E().optional(),generatedByDevice:P(T(),E()).optional(),createdBy:T(),createdAt:E(),updatedAt:E()});var h3=` · `,g3=[` — `,` `],_3=new Set([`battery-sensor`,`temperature-sensor`,`humidity-sensor`,`ambient-light-sensor`,`connectivity-sensor`,`datetime-sensor`,`numeric-sensor`,`enum-sensor`]);function v3(e){return e.toLowerCase().replace(/[-_\s]+/g,` `).trim()}function y3(e,t){return v3(e)===v3(t)}function b3(e,t){if(t.length===0)return e;let n=e.toLowerCase(),r=t.toLowerCase();for(let t of g3){let i=`${r}${t}`;if(n.startsWith(i))return e.slice(i.length).trim()}return e}function x3(e){let t=e.role;return t==null||t.length===0?null:t}function S3(e){if(e.type===`update`)return!0;let t=x3(e);return t!==null&&_3.has(t)}function C3(e){let t=e.display?.label;return t==null?``:t.trim()}function w3(e,t,n){let r=C3(e);if(r.length>0)return r;let i=b3(e.name,t.name),a=i.length>0?i:e.name;return e.userNamed===!0?a:i.length===0||y3(i,t.name)||n.isStockPhrase(a,x3(e),e.type)?n.shortNoun(x3(e),e.type):a}function T3(e,t,n){return y3(n,t.name)?!0:C3(e).length>0||e.userNamed===!0?!1:y3(b3(e.name,t.name),t.name)}function E3(e){let t=0;for(let n of e)S3(n)||(t+=1);return t}function D3(e,t,n){let r=I4(n.map(e=>{let t=x3(e);return{id:e.id,stableId:e.stableId,type:e.type,name:e.name,...t===null?{}:{role:t}}}),t.primaryChildEntityId,t.name);return r!==null&&r.id===e.id}function O3(e,t,n,r,i){let a=w3(e,t,r);return T3(e,t,a)||i===`compact`&&t.type===`container`&&D3(e,t,n)&&E3(n)===1?t.name:`${t.name}${h3}${a}`}function k3(e,t){if(t==null)return e;let n=t.trim();return n.length===0||e.split(` · `).some(e=>y3(e,n))?e:`${e}${h3}${n}`}function A3(e,t){return t===null?!1:e.parentDeviceId!=null}function j3(e,t,n,r){if(!A3(e,n.parent))return t===`with-location`?k3(e.name,e.location):e.name;if(t===`nested`)return w3(e,n.parent,r);let i=O3(e,n.parent,n.siblings,r,t===`full`?`full`:`compact`);return t===`with-location`?k3(i,e.location):i}var M3=[{id:`siren`,key:`uiLibrary.deviceMeta.noun.role.siren`,en:`Siren`,it:`Sirena`,shortEn:`Siren`,shortIt:`Sirena`,aliases:[]},{id:`floodlight`,key:`uiLibrary.deviceMeta.noun.role.floodlight`,en:`Floodlight`,it:`Faro`,shortEn:`Floodlight`,shortIt:`Faro`,aliases:[]},{id:`spotlight`,key:`uiLibrary.deviceMeta.noun.role.spotlight`,en:`Spotlight`,it:`Faretto`,shortEn:`Spotlight`,shortIt:`Faretto`,aliases:[]},{id:`pir-sensor`,key:`uiLibrary.deviceMeta.noun.role.pirSensor`,en:`PIR sensor`,it:`Sensore PIR`,shortEn:`PIR`,shortIt:`PIR`,aliases:[]},{id:`chime`,key:`uiLibrary.deviceMeta.noun.role.chime`,en:`Chime`,it:`Campanello`,shortEn:`Chime`,shortIt:`Campanello`,aliases:[]},{id:`autotrack`,key:`uiLibrary.deviceMeta.noun.role.autotrack`,en:`Auto-track`,it:`Auto-tracking`,shortEn:`Auto-track`,shortIt:`Auto-tracking`,aliases:[]},{id:`nightvision`,key:`uiLibrary.deviceMeta.noun.role.nightvision`,en:`Night vision`,it:`Visione notturna`,shortEn:`Night`,shortIt:`Notturna`,aliases:[]},{id:`privacy-mask`,key:`uiLibrary.deviceMeta.noun.role.privacyMask`,en:`Privacy mask`,it:`Maschera privacy`,shortEn:`Privacy`,shortIt:`Privacy`,aliases:[]},{id:`doorbell`,key:`uiLibrary.deviceMeta.noun.role.doorbell`,en:`Doorbell`,it:`Campanello video`,shortEn:`Doorbell`,shortIt:`Campanello video`,aliases:[]},{id:`cover-blind`,key:`uiLibrary.deviceMeta.noun.role.coverBlind`,en:`Blind`,it:`Tapparella`,shortEn:`Blind`,shortIt:`Tapparella`,aliases:[]},{id:`cover-shutter`,key:`uiLibrary.deviceMeta.noun.role.coverShutter`,en:`Shutter`,it:`Persiana`,shortEn:`Shutter`,shortIt:`Persiana`,aliases:[]},{id:`cover-awning`,key:`uiLibrary.deviceMeta.noun.role.coverAwning`,en:`Awning`,it:`Tenda da sole`,shortEn:`Awning`,shortIt:`Tenda da sole`,aliases:[]},{id:`cover-curtain`,key:`uiLibrary.deviceMeta.noun.role.coverCurtain`,en:`Curtain`,it:`Tenda`,shortEn:`Curtain`,shortIt:`Tenda`,aliases:[]},{id:`cover-garage`,key:`uiLibrary.deviceMeta.noun.role.coverGarage`,en:`Garage door`,it:`Porta del garage`,shortEn:`Garage`,shortIt:`Garage`,aliases:[]},{id:`cover-gate`,key:`uiLibrary.deviceMeta.noun.role.coverGate`,en:`Gate`,it:`Cancello`,shortEn:`Gate`,shortIt:`Cancello`,aliases:[]},{id:`cover-door`,key:`uiLibrary.deviceMeta.noun.role.coverDoor`,en:`Door`,it:`Porta`,shortEn:`Door`,shortIt:`Porta`,aliases:[]},{id:`cover-window`,key:`uiLibrary.deviceMeta.noun.role.coverWindow`,en:`Window`,it:`Finestra`,shortEn:`Window`,shortIt:`Finestra`,aliases:[]},{id:`binary-helper`,key:`uiLibrary.deviceMeta.noun.role.binaryHelper`,en:`Binary helper`,it:`Helper binario`,shortEn:`Helper`,shortIt:`Helper`,aliases:[]},{id:`outlet`,key:`uiLibrary.deviceMeta.noun.role.outlet`,en:`Outlet`,it:`Presa`,shortEn:`Outlet`,shortIt:`Presa`,aliases:[]},{id:`motion-sensor`,key:`uiLibrary.deviceMeta.noun.role.motionSensor`,en:`Motion sensor`,it:`Sensore di movimento`,shortEn:`Motion`,shortIt:`Movimento`,aliases:[]},{id:`contact-sensor`,key:`uiLibrary.deviceMeta.noun.role.contactSensor`,en:`Contact sensor`,it:`Sensore di contatto`,shortEn:`Contact`,shortIt:`Contatto`,aliases:[]},{id:`leak-sensor`,key:`uiLibrary.deviceMeta.noun.role.leakSensor`,en:`Leak sensor`,it:`Sensore di perdite`,shortEn:`Leak`,shortIt:`Perdita`,aliases:[]},{id:`smoke-sensor`,key:`uiLibrary.deviceMeta.noun.role.smokeSensor`,en:`Smoke sensor`,it:`Sensore di fumo`,shortEn:`Smoke`,shortIt:`Fumo`,aliases:[]},{id:`co-sensor`,key:`uiLibrary.deviceMeta.noun.role.cOSensor`,en:`CO sensor`,it:`Sensore di CO`,shortEn:`CO`,shortIt:`CO`,aliases:[]},{id:`gas-sensor`,key:`uiLibrary.deviceMeta.noun.role.gasSensor`,en:`Gas sensor`,it:`Sensore di gas`,shortEn:`Gas`,shortIt:`Gas`,aliases:[]},{id:`tamper-sensor`,key:`uiLibrary.deviceMeta.noun.role.tamperSensor`,en:`Tamper sensor`,it:`Sensore antimanomissione`,shortEn:`Tamper`,shortIt:`Manomissione`,aliases:[]},{id:`vibration-sensor`,key:`uiLibrary.deviceMeta.noun.role.vibrationSensor`,en:`Vibration sensor`,it:`Sensore di vibrazione`,shortEn:`Vibration`,shortIt:`Vibrazione`,aliases:[]},{id:`connectivity-sensor`,key:`uiLibrary.deviceMeta.noun.role.connectivitySensor`,en:`Connectivity`,it:`Connettività`,shortEn:`Connectivity`,shortIt:`Connettività`,aliases:[]},{id:`sound-sensor`,key:`uiLibrary.deviceMeta.noun.role.soundSensor`,en:`Sound sensor`,it:`Sensore acustico`,shortEn:`Sound`,shortIt:`Suono`,aliases:[]},{id:`binary-sensor`,key:`uiLibrary.deviceMeta.noun.role.binarySensor`,en:`Binary sensor`,it:`Sensore binario`,shortEn:`Binary`,shortIt:`Binario`,aliases:[]},{id:`temperature-sensor`,key:`uiLibrary.deviceMeta.noun.role.temperatureSensor`,en:`Temperature`,it:`Temperatura`,shortEn:`Temperature`,shortIt:`Temperatura`,aliases:[]},{id:`humidity-sensor`,key:`uiLibrary.deviceMeta.noun.role.humiditySensor`,en:`Humidity`,it:`Umidità`,shortEn:`Humidity`,shortIt:`Umidità`,aliases:[]},{id:`ambient-light-sensor`,key:`uiLibrary.deviceMeta.noun.role.ambientLightSensor`,en:`Ambient light`,it:`Luce ambientale`,shortEn:`Light`,shortIt:`Luce`,aliases:[`Illumination`]},{id:`pressure-sensor`,key:`uiLibrary.deviceMeta.noun.role.pressureSensor`,en:`Pressure`,it:`Pressione`,shortEn:`Pressure`,shortIt:`Pressione`,aliases:[]},{id:`wind-sensor`,key:`uiLibrary.deviceMeta.noun.role.windSensor`,en:`Wind`,it:`Vento`,shortEn:`Wind`,shortIt:`Vento`,aliases:[]},{id:`rain-sensor`,key:`uiLibrary.deviceMeta.noun.role.rainSensor`,en:`Rain`,it:`Pioggia`,shortEn:`Rain`,shortIt:`Pioggia`,aliases:[]},{id:`uv-sensor`,key:`uiLibrary.deviceMeta.noun.role.uvSensor`,en:`UV index`,it:`Indice UV`,shortEn:`UV index`,shortIt:`Indice UV`,aliases:[]},{id:`solar-radiation-sensor`,key:`uiLibrary.deviceMeta.noun.role.solarRadiationSensor`,en:`Solar radiation`,it:`Radiazione solare`,shortEn:`Solar radiation`,shortIt:`Radiazione solare`,aliases:[]},{id:`soil-moisture-sensor`,key:`uiLibrary.deviceMeta.noun.role.soilMoistureSensor`,en:`Soil moisture`,it:`Umidità del suolo`,shortEn:`Soil moisture`,shortIt:`Umidità del suolo`,aliases:[]},{id:`power-sensor`,key:`uiLibrary.deviceMeta.noun.role.powerSensor`,en:`Power`,it:`Potenza`,shortEn:`Power`,shortIt:`Potenza`,aliases:[]},{id:`energy-sensor`,key:`uiLibrary.deviceMeta.noun.role.energySensor`,en:`Energy`,it:`Energia`,shortEn:`Energy`,shortIt:`Energia`,aliases:[]},{id:`voltage-sensor`,key:`uiLibrary.deviceMeta.noun.role.voltageSensor`,en:`Voltage`,it:`Tensione`,shortEn:`Voltage`,shortIt:`Tensione`,aliases:[]},{id:`current-sensor`,key:`uiLibrary.deviceMeta.noun.role.currentSensor`,en:`Current`,it:`Corrente`,shortEn:`Current`,shortIt:`Corrente`,aliases:[]},{id:`air-quality-sensor`,key:`uiLibrary.deviceMeta.noun.role.airQualitySensor`,en:`Air quality`,it:`Qualità dell’aria`,shortEn:`Air quality`,shortIt:`Qualità dell’aria`,aliases:[]},{id:`battery-sensor`,key:`uiLibrary.deviceMeta.noun.role.batterySensor`,en:`Battery`,it:`Batteria`,shortEn:`Battery`,shortIt:`Batteria`,aliases:[]},{id:`numeric-sensor`,key:`uiLibrary.deviceMeta.noun.role.numericSensor`,en:`Numeric sensor`,it:`Sensore numerico`,shortEn:`Value`,shortIt:`Numerico`,aliases:[]},{id:`enum-sensor`,key:`uiLibrary.deviceMeta.noun.role.enumSensor`,en:`Enum sensor`,it:`Sensore a stati`,shortEn:`State`,shortIt:`Stato`,aliases:[]},{id:`datetime-sensor`,key:`uiLibrary.deviceMeta.noun.role.dateTimeSensor`,en:`Date / time`,it:`Data / ora`,shortEn:`Time`,shortIt:`Ora`,aliases:[`Last seen`]},{id:`generic-sensor`,key:`uiLibrary.deviceMeta.noun.role.genericSensor`,en:`Sensor`,it:`Sensore`,shortEn:`Sensor`,shortIt:`Sensore`,aliases:[]},{id:`numeric-control`,key:`uiLibrary.deviceMeta.noun.role.numericControl`,en:`Numeric control`,it:`Controllo numerico`,shortEn:`Number`,shortIt:`Numero`,aliases:[]},{id:`select-control`,key:`uiLibrary.deviceMeta.noun.role.selectControl`,en:`Select control`,it:`Controllo a selezione`,shortEn:`Select`,shortIt:`Selezione`,aliases:[]},{id:`text-control`,key:`uiLibrary.deviceMeta.noun.role.textControl`,en:`Text control`,it:`Controllo testo`,shortEn:`Text`,shortIt:`Testo`,aliases:[]},{id:`datetime-control`,key:`uiLibrary.deviceMeta.noun.role.dateTimeControl`,en:`Date / time control`,it:`Controllo data / ora`,shortEn:`Time`,shortIt:`Ora`,aliases:[]},{id:`mobile-push-notifier`,key:`uiLibrary.deviceMeta.noun.role.mobilePushNotifier`,en:`Mobile push`,it:`Push su mobile`,shortEn:`Push`,shortIt:`Push`,aliases:[]},{id:`messaging-notifier`,key:`uiLibrary.deviceMeta.noun.role.messagingNotifier`,en:`Messaging`,it:`Messaggistica`,shortEn:`Messaging`,shortIt:`Messaggistica`,aliases:[]},{id:`email-notifier`,key:`uiLibrary.deviceMeta.noun.role.emailNotifier`,en:`Email`,it:`Email`,shortEn:`Email`,shortIt:`Email`,aliases:[]},{id:`generic-notifier`,key:`uiLibrary.deviceMeta.noun.role.genericNotifier`,en:`Notifier`,it:`Notificatore`,shortEn:`Notifier`,shortIt:`Notificatore`,aliases:[]}],N3=[{id:`camera`,key:`uiLibrary.deviceMeta.noun.type.camera`,en:`Camera`,it:`Telecamera`,shortEn:`Camera`,shortIt:`Telecamera`,aliases:[]},{id:`hub`,key:`uiLibrary.deviceMeta.noun.type.hub`,en:`Hub`,it:`Hub`,shortEn:`Hub`,shortIt:`Hub`,aliases:[]},{id:`light`,key:`uiLibrary.deviceMeta.noun.type.light`,en:`Light`,it:`Luce`,shortEn:`Light`,shortIt:`Luce`,aliases:[]},{id:`siren`,key:`uiLibrary.deviceMeta.noun.type.siren`,en:`Siren`,it:`Sirena`,shortEn:`Siren`,shortIt:`Sirena`,aliases:[]},{id:`switch`,key:`uiLibrary.deviceMeta.noun.type.switch`,en:`Switch`,it:`Interruttore`,shortEn:`Switch`,shortIt:`Interruttore`,aliases:[]},{id:`sensor`,key:`uiLibrary.deviceMeta.noun.type.sensor`,en:`Sensor`,it:`Sensore`,shortEn:`Sensor`,shortIt:`Sensore`,aliases:[]},{id:`thermostat`,key:`uiLibrary.deviceMeta.noun.type.thermostat`,en:`Thermostat`,it:`Termostato`,shortEn:`Thermostat`,shortIt:`Termostato`,aliases:[]},{id:`climate`,key:`uiLibrary.deviceMeta.noun.type.climate`,en:`Air conditioner`,it:`Condizionatore`,shortEn:`Climate`,shortIt:`Condizionatore`,aliases:[]},{id:`button`,key:`uiLibrary.deviceMeta.noun.type.button`,en:`Button`,it:`Pulsante`,shortEn:`Button`,shortIt:`Pulsante`,aliases:[]},{id:`event-emitter`,key:`uiLibrary.deviceMeta.noun.type.eventEmitter`,en:`Event Emitter`,it:`Emettitore di eventi`,shortEn:`Event`,shortIt:`Evento`,aliases:[]},{id:`update`,key:`uiLibrary.deviceMeta.noun.type.update`,en:`Update`,it:`Aggiornamento`,shortEn:`Update`,shortIt:`Aggiornamento`,aliases:[]},{id:`generic`,key:`uiLibrary.deviceMeta.noun.type.generic`,en:`Generic`,it:`Generico`,shortEn:`Generic`,shortIt:`Generico`,aliases:[]},{id:`notifier`,key:`uiLibrary.deviceMeta.noun.type.notifier`,en:`Notifier`,it:`Notificatore`,shortEn:`Notifier`,shortIt:`Notificatore`,aliases:[]},{id:`script`,key:`uiLibrary.deviceMeta.noun.type.script`,en:`Script`,it:`Script`,shortEn:`Script`,shortIt:`Script`,aliases:[]},{id:`automation`,key:`uiLibrary.deviceMeta.noun.type.automation`,en:`Automation`,it:`Automazione`,shortEn:`Automation`,shortIt:`Automazione`,aliases:[]},{id:`lock`,key:`uiLibrary.deviceMeta.noun.type.lock`,en:`Lock`,it:`Serratura`,shortEn:`Lock`,shortIt:`Serratura`,aliases:[]},{id:`cover`,key:`uiLibrary.deviceMeta.noun.type.cover`,en:`Cover`,it:`Copertura`,shortEn:`Cover`,shortIt:`Copertura`,aliases:[]},{id:`valve`,key:`uiLibrary.deviceMeta.noun.type.valve`,en:`Valve`,it:`Valvola`,shortEn:`Valve`,shortIt:`Valvola`,aliases:[]},{id:`humidifier`,key:`uiLibrary.deviceMeta.noun.type.humidifier`,en:`Humidifier`,it:`Umidificatore`,shortEn:`Humidifier`,shortIt:`Umidificatore`,aliases:[]},{id:`water-heater`,key:`uiLibrary.deviceMeta.noun.type.waterHeater`,en:`Water heater`,it:`Scaldabagno`,shortEn:`Heater`,shortIt:`Scaldabagno`,aliases:[]},{id:`fan`,key:`uiLibrary.deviceMeta.noun.type.fan`,en:`Fan`,it:`Ventilatore`,shortEn:`Fan`,shortIt:`Ventilatore`,aliases:[]},{id:`media-player`,key:`uiLibrary.deviceMeta.noun.type.mediaPlayer`,en:`Media player`,it:`Lettore multimediale`,shortEn:`Player`,shortIt:`Lettore`,aliases:[]},{id:`alarm-panel`,key:`uiLibrary.deviceMeta.noun.type.alarmPanel`,en:`Alarm panel`,it:`Pannello allarme`,shortEn:`Alarm`,shortIt:`Allarme`,aliases:[]},{id:`control`,key:`uiLibrary.deviceMeta.noun.type.control`,en:`Control`,it:`Controllo`,shortEn:`Control`,shortIt:`Controllo`,aliases:[]},{id:`presence`,key:`uiLibrary.deviceMeta.noun.type.presence`,en:`Presence`,it:`Presenza`,shortEn:`Presence`,shortIt:`Presenza`,aliases:[]},{id:`weather`,key:`uiLibrary.deviceMeta.noun.type.weather`,en:`Weather`,it:`Meteo`,shortEn:`Weather`,shortIt:`Meteo`,aliases:[]},{id:`vacuum`,key:`uiLibrary.deviceMeta.noun.type.vacuum`,en:`Vacuum`,it:`Aspirapolvere`,shortEn:`Vacuum`,shortIt:`Aspirapolvere`,aliases:[]},{id:`lawn-mower`,key:`uiLibrary.deviceMeta.noun.type.lawnMower`,en:`Lawn mower`,it:`Tagliaerba`,shortEn:`Mower`,shortIt:`Tagliaerba`,aliases:[]},{id:`container`,key:`uiLibrary.deviceMeta.noun.type.container`,en:`Container`,it:`Contenitore`,shortEn:`Container`,shortIt:`Contenitore`,aliases:[]},{id:`image`,key:`uiLibrary.deviceMeta.noun.type.image`,en:`Image`,it:`Immagine`,shortEn:`Image`,shortIt:`Immagine`,aliases:[]},{id:`pet-feeder`,key:`uiLibrary.deviceMeta.noun.type.petFeeder`,en:`Pet feeder`,it:`Distributore di cibo per animali`,shortEn:`Feeder`,shortIt:`Distributore`,aliases:[]},{id:`dishwasher`,key:`uiLibrary.deviceMeta.noun.type.dishwasher`,en:`Dishwasher`,it:`Lavastoviglie`,shortEn:`Dishwasher`,shortIt:`Lavastoviglie`,aliases:[]}],P3={id:``,key:`uiLibrary.deviceMeta.noun.fallback`,en:`Device`,it:`Dispositivo`,shortEn:`Device`,shortIt:`Dispositivo`,aliases:[]};function F3(e,t){if(!(t===null||t.length===0))return e.find(e=>e.id===t)}function bae(e,t){if(e!==null){let t=F3(M3,e);if(t!==void 0)return t}return F3(N3,t)??P3}function xae(e,t){let n=[],r=[F3(M3,e),F3(N3,t)];for(let e of r)e!==void 0&&n.push(e.en,e.it,e.shortEn,e.shortIt,...e.aliases);return n}function Sae(e,t,n){let r=v3(e);return r.length===0?!0:xae(t,n).some(e=>v3(e)===r)}function Cae(){let e=t();return{shortNoun(t,n){let r=bae(t,n);return e(r.key,r.shortEn)},isStockPhrase(e,t,n){return Sae(e,t,n)}}}function wae(e){return{id:e,name:`#${String(e)}`,type:`unknown`,stableId:``,role:null,parentDeviceId:null}}function Tae(e,t){let n=e.parentDeviceId;return n==null?null:t.byId.get(n)??wae(n)}function Eae(e,t){let n=e.parentDeviceId;if(n==null)return[];let r=t.childIds.get(n)??[],i=[];for(let e of r){let n=t.byId.get(e);n!==void 0&&i.push(n)}return i.some(t=>t.id===e.id)||i.push(e),i}function Dae(e,t,n,r,i){let a=n?.byId.get(e.id)??e;return a.parentDeviceId!=null&&n===null&&i?.parent===void 0?a.name:j3(a,t,{parent:i?.parent===void 0?n===null?null:Tae(a,n):i.parent,siblings:i?.siblings??(n===null?[]:Eae(a,n))},r)}function Oae(e,t,n){return Dae(e,t,t$(),Cae(),n)}function I3({device:e,form:t,parent:n,siblings:r,className:i,testId:a}){let o=Oae(e,t,{...n===void 0?{}:{parent:n},...r===void 0?{}:{siblings:r}});return(0,K.jsx)(`span`,{className:i,title:o,"data-testid":a,children:o})}var kae=`capability.binding-changed`;function L3(e,t){let[n,r]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(t===null){r(null);return}let n=!1,i=async()=>{try{let i=await e.deviceManager.getBindings.query({deviceId:t});n||r(i)}catch{n||r(e=>e)}};i();let a=e.live?.onEvent.subscribe({category:kae},{onData:e=>{let n=e.data?.source;if(!n){i();return}n.type===`device`&&n.id===t&&i()}});return()=>{n=!0,a?.unsubscribe()}},[e,t]),(0,s.useMemo)(()=>n?xc(e,n):null,[e,n])}function R3(e){let t=(0,s.useCallback)(t=>e?e.subscribe(()=>t()):()=>void 0,[e]),n=(0,s.useCallback)(()=>e?.value,[e]);return(0,s.useSyncExternalStore)(t,n,n)}var Aae=`/addon/snapshot/media`;function jae(e,t={}){let{width:n,baseUrl:r}=t,[i,a]=(0,s.useState)(0);return{src:(0,s.useMemo)(()=>{if(e===null||e<=0)return null;let t=r===void 0?XQ():r.replace(/\/+$/,``),a=new URLSearchParams;n!==void 0&&Number.isInteger(n)&&n>0&&a.set(`w`,String(n)),i>0&&(a.set(`force`,`1`),a.set(`r`,String(i)));let o=a.toString();return`${t}${Aae}/${String(e)}.jpg${o.length>0?`?${o}`:``}`},[e,n,r,i]),loading:!1,refresh:(0,s.useCallback)(()=>{a(e=>e+1)},[])}}B.Camera;function z3(e){let t=L3(e.trpc,e.deviceId),n=R3(t===null?void 0:e.slice(t)),r=t===null?void 0:e.cap(t),i=R3(t===null?void 0:t.state.deviceStatus),a=i?.online??!0,o=a?null:i?.lastChangedAt??null;return{dev:t,cap:r,slice:n,available:(e.requireFeature===void 0||(e.deviceFeatures??[]).includes(e.requireFeature))&&r!==void 0&&n!==void 0&&a,online:a,offlineSince:o}}pre.exclude([`full`]).options;var Mae=(0,s.forwardRef)(({className:e,...t},n)=>(0,K.jsx)(`div`,{ref:n,className:Z(`animate-pulse bg-surface-hover rounded-md h-4 w-full`,e),...t}));Mae.displayName=`Skeleton`;var Nae={danger:{box:`border-danger/40 bg-danger/10`,icon:`text-danger`,title:`text-danger`,message:`text-danger`},warning:{box:`border-amber-500/40 bg-amber-500/10`,icon:`text-amber-600 dark:text-amber-400`,title:`text-amber-700 dark:text-amber-300`,message:`text-amber-700 dark:text-amber-300`}};function B3({message:e,title:n,onRetry:r,action:i,variant:a=`danger`,className:o}){let s=t(),c=Nae[a],l=a===`warning`?BH:rV;return(0,K.jsxs)(`div`,{role:`alert`,className:Z(`flex items-start gap-2.5 rounded border px-3 py-2.5`,c.box,o),children:[(0,K.jsx)(l,{className:Z(`h-4 w-4 mt-0.5 shrink-0`,c.icon),"aria-hidden":`true`}),(0,K.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[n&&(0,K.jsx)(`p`,{className:Z(`text-xs font-semibold`,c.title),children:n}),(0,K.jsx)(`div`,{className:Z(`text-xs break-words`,c.message,n?`mt-0.5`:``),children:e})]}),i??(r&&(0,K.jsxs)(`button`,{type:`button`,onClick:r,className:Z(`shrink-0 inline-flex items-center gap-1 rounded px-2 py-1 text-[11px] font-medium`,`border border-current/30 hover:bg-current/10 transition-colors`,c.message),children:[(0,K.jsx)(fH,{className:`h-3 w-3`,"aria-hidden":`true`}),s(`uiLibrary.errorBox.retry`,`Retry`)]}))]})}EK(`camstack:vod-playback`,{request:null,play:()=>{},clear:()=>{}});var Pae=TJ(`rounded-lg p-3`,{variants:{variant:{flat:`bg-surface`,bordered:`bg-surface border border-border`}},defaultVariants:{variant:`bordered`}}),V3=(0,s.forwardRef)(({className:e,variant:t,...n},r)=>(0,K.jsx)(`div`,{ref:r,className:Z(Pae({variant:t}),e),...n}));V3.displayName=`Card`;function Fae(e){if(typeof e!=`object`||!e)return null;let t=Reflect.get(e,`data`);if(typeof t==`object`&&t){let e=Reflect.get(t,`capRouteReason`);if(typeof e==`string`)return e}return null}function Iae(e){let t=Fae(e);return t===null?(e instanceof Error?e.message:String(e)).includes(`provider not available`):t===`no-provider`||t===`node-offline`}EK(`camstack:recorded-playback`,{bindControlChannel:null,channelOpen:!1,mode:`live`,positionMs:null,send:()=>!1});var H3=(0,s.createContext)(null);function Lae(){let e=(0,s.useContext)(H3);if(!e)throw Error(`Dialog compound components must be used within <Dialog>`);return e}function U3({children:e,open:t,onOpenChange:n}){let[r,i]=(0,s.useState)(!1),a=t??r,o=(0,s.useId)(),c=(0,s.useCallback)(e=>{n?.(e),t===void 0&&i(e)},[t,n]);return(0,K.jsx)(H3.Provider,{value:{open:a,setOpen:c,contentId:o},children:e})}var Rae=TJ(`relative fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 m-0 w-[calc(100vw-2rem)] bg-background-elevated text-foreground border border-border rounded-lg p-4 backdrop:bg-black/50 backdrop:backdrop-blur-sm max-h-[calc(100dvh-2rem-2*max(env(safe-area-inset-top),env(safe-area-inset-bottom)))] [&:not([open])]:hidden`,{variants:{width:{sm:`max-w-sm`,md:`max-w-md`,lg:`max-w-lg`,xl:`max-w-4xl`},scroll:{content:`overflow-y-auto overscroll-contain`,body:`flex flex-col overflow-hidden overscroll-contain`},placement:{center:``,"sheet-on-mobile":`bottom-0 left-0 right-0 top-auto w-full max-w-full translate-x-0 translate-y-0 rounded-b-none max-h-[92dvh] pb-[calc(1rem+env(safe-area-inset-bottom))] md:left-1/2 md:top-1/2 md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-lg md:bottom-auto md:pb-4 md:max-h-[calc(100dvh-2rem-2*max(env(safe-area-inset-top),env(safe-area-inset-bottom)))]`}},compoundVariants:[{placement:`sheet-on-mobile`,width:`sm`,class:`md:w-[calc(100vw-2rem)] md:max-w-sm`},{placement:`sheet-on-mobile`,width:`md`,class:`md:w-[calc(100vw-2rem)] md:max-w-md`},{placement:`sheet-on-mobile`,width:`lg`,class:`md:w-[calc(100vw-2rem)] md:max-w-lg`},{placement:`sheet-on-mobile`,width:`xl`,class:`md:w-[calc(100vw-2rem)] md:max-w-4xl`},{scroll:`body`,placement:`sheet-on-mobile`,class:`h-[92dvh] md:h-auto`},{scroll:`body`,placement:`center`,class:`h-[calc(100dvh-2rem-2*max(env(safe-area-inset-top),env(safe-area-inset-bottom)))] md:h-auto`}],defaultVariants:{width:`md`,placement:`center`,scroll:`content`}}),W3=(0,s.forwardRef)(({className:e,width:n,placement:r,scroll:i,children:a,...o},c)=>{let{open:l,setOpen:u,contentId:d}=Lae(),f=t(),p=(0,s.useRef)(null),m=c??p;return(0,s.useEffect)(()=>{let e=m.current;e&&(l&&!e.open&&e.showModal(),!l&&e.open&&e.close())},[l,m]),(0,K.jsxs)(`dialog`,{ref:m,id:d,className:Z(Rae({width:n,placement:r,scroll:i}),e),onClose:()=>u(!1),...o,children:[(0,K.jsx)(DJ,{type:`button`,variant:`ghost`,size:`sm`,icon:$H,"aria-label":f(`uiLibrary.dialog.close`,`Close`),className:`absolute right-4 top-4 z-10 shrink-0`,onClick:()=>u(!1)}),(0,K.jsx)(WK,{id:d,modal:!0,enabled:l,children:a})]})});W3.displayName=`DialogContent`;function G3({className:e,...t}){return(0,K.jsx)(`div`,{className:Z(`flex flex-col gap-1 mb-3 shrink-0 pr-10`,e),...t})}function K3({className:e,...t}){return(0,K.jsx)(`div`,{className:Z(`flex justify-end gap-2 mt-4 shrink-0`,e),...t})}function q3({className:e,...t}){return(0,K.jsx)(`h2`,{className:Z(`text-sm font-semibold text-foreground`,e),...t})}function J3({className:e,...t}){return(0,K.jsx)(`p`,{className:Z(`text-xs text-foreground-muted`,e),...t})}(0,s.lazy)(()=>ls(()=>import(`./MotionZonesSettings-BYIe4Hj8.js`).then(e=>({default:e.MotionZonesSettings})),__vite__mapDeps([0,1,2]))),(0,s.lazy)(()=>ls(()=>import(`./PrivacyMaskSettings-cMbNvPuy.js`).then(e=>({default:e.PrivacyMaskSettings})),__vite__mapDeps([3,1,2])));var zae=Object.defineProperty,Y3=Object.getOwnPropertySymbols,X3=Object.prototype.hasOwnProperty,Z3=Object.prototype.propertyIsEnumerable,Q3=(e,t,n)=>t in e?zae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$3=(e,t)=>{for(var n in t||={})X3.call(t,n)&&Q3(e,n,t[n]);if(Y3)for(var n of Y3(t))Z3.call(t,n)&&Q3(e,n,t[n]);return e},e6=(e,t)=>{var n={};for(var r in e)X3.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Y3)for(var r of Y3(e))t.indexOf(r)<0&&Z3.call(e,r)&&(n[r]=e[r]);return n},t6;(e=>{let t=class t{constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError(`Version value out of range`);if(a<-1||a>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let o=[];for(let e=0;e<this.size;e++)o.push(!1);for(let e=0;e<this.size;e++)this.modules.push(o.slice()),this.isFunction.push(o.slice());this.drawFunctionPatterns();let s=this.addEccAndInterleave(r);if(this.drawCodewords(s),a==-1){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);let n=this.getPenaltyScore();n<e&&(a=t,e=n),this.applyMask(t)}}i(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(n,r){let i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,r)}static encodeBinary(n,r){let i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],r)}static encodeSegments(e,r,a=1,s=40,c=-1,l=!0){if(!(t.MIN_VERSION<=a&&a<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw RangeError(`Invalid value`);let u,d;for(u=a;;u++){let n=t.getNumDataCodewords(u,r)*8,i=o.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw RangeError(`Data too long`)}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=t.getNumDataCodewords(u,e)*8&&(r=e);let f=[];for(let t of e){n(t.mode.modeBits,4,f),n(t.numChars,t.mode.numCharCountBits(u),f);for(let e of t.getData())f.push(e)}i(f.length==d);let p=t.getNumDataCodewords(u,r)*8;i(f.length<=p),n(0,Math.min(4,p-f.length),f),n(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.length<p;e^=253)n(e,8,f);let m=[];for(;m.length*8<f.length;)m.push(0);return f.forEach((e,t)=>m[t>>>3]|=e<<7-(t&7)),new t(u,r,m,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)n==0&&r==0||n==0&&r==t-1||n==t-1&&r==0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.errorCorrectionLevel.formatBits<<3|e,n=t;for(let e=0;e<10;e++)n=n<<1^(n>>>9)*1335;let a=(t<<10|n)^21522;i(a>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,r(a,e));this.setFunctionModule(8,7,r(a,6)),this.setFunctionModule(8,8,r(a,7)),this.setFunctionModule(7,8,r(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,r(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,r(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,r(a,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){let n=r(t,e),i=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(i,a,n),this.setFunctionModule(a,i,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a<this.size&&0<=o&&o<this.size&&this.setFunctionModule(a,o,i!=2&&i!=4)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,Math.max(Math.abs(r),Math.abs(n))!=1)}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){let n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw RangeError(`Invalid argument`);let a=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],o=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],s=Math.floor(t.getNumRawDataModules(n)/8),c=a-s%a,l=Math.floor(s/a),u=[],d=t.reedSolomonComputeDivisor(o);for(let n=0,r=0;n<a;n++){let i=e.slice(r,r+l-o+(n<c?0:1));r+=i.length;let a=t.reedSolomonComputeRemainder(i,d);n<c&&i.push(0),u.push(i.concat(a))}let f=[];for(let e=0;e<u[0].length;e++)u.forEach((t,n)=>{(e!=l-o||n>=c)&&f.push(t[e])});return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError(`Invalid argument`);let n=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let i=0;i<this.size;i++)for(let a=0;a<2;a++){let o=t-a,s=t+1&2?i:this.size-1-i;!this.isFunction[s][o]&&n<e.length*8&&(this.modules[s][o]=r(e[n>>>3],7-(n&7)),n++)}}i(n==e.length*8)}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw Error(`Unreachable`)}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[n][o]==r?(i++,i==5?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[n][o],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[o][n]==r?(i++,i==5?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[o][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){let i=this.modules[n][r];i==this.modules[n][r+1]&&i==this.modules[n+1][r]&&i==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(let e of this.modules)n=e.reduce((e,t)=>e+ +!!t,n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return i(0<=a&&a<=9),e+=a*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError(`Version number out of range`);let n=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map(e=>0);for(let i of e){let e=i^r.shift();r.push(0),n.forEach((n,i)=>r[i]^=t.reedSolomonMultiply(n,e))}return r}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return i(n>>>8==0),n}finderPenaltyCountPatterns(e){let t=e[1];i(t<=this.size*3);let n=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return(e>>>t&1)!=0}function i(e){if(!e)throw Error(`Assertion error`)}let a=class e{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}static makeBytes(t){let r=[];for(let e of t)n(e,8,r);return new e(e.Mode.BYTE,t.length,r)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError(`String contains non-numeric characters`);let r=[];for(let e=0;e<t.length;){let i=Math.min(t.length-e,3);n(parseInt(t.substring(e,e+i),10),i*3+1,r),e+=i}return new e(e.Mode.NUMERIC,t.length,r)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw RangeError(`String contains unencodable characters in alphanumeric mode`);let r=[],i;for(i=0;i+2<=t.length;i+=2){let a=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i))*45;a+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i+1)),n(a,11,r)}return i<t.length&&n(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i)),6,r),new e(e.Mode.ALPHANUMERIC,t.length,r)}static makeSegments(t){return t==``?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let r=[];if(t<0)throw RangeError(`ECI assignment value out of range`);if(t<128)n(t,8,r);else if(t<16384)n(2,2,r),n(t,14,r);else if(t<1e6)n(6,3,r),n(t,21,r);else throw RangeError(`ECI assignment value out of range`);return new e(e.Mode.ECI,0,r)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(let r of e){let e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)==`%`?(t.push(parseInt(e.substring(n+1,n+3),16)),n+=2):t.push(e.charCodeAt(n));return t}};a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`;let o=a;e.QrSegment=a})(t6||={}),(e=>{(e=>{let t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})(e.QrCode||={})})(t6||={}),(e=>{(e=>{let t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||={})})(t6||={});var n6=t6,Bae={L:n6.QrCode.Ecc.LOW,M:n6.QrCode.Ecc.MEDIUM,Q:n6.QrCode.Ecc.QUARTILE,H:n6.QrCode.Ecc.HIGH},r6=128,i6=`L`,a6=`#FFFFFF`,o6=`#000000`,s6=!1,c6=1,Vae=4,Hae=0,Uae=.1;function l6(e,t=0){let n=[];return e.forEach(function(e,r){let i=null;e.forEach(function(a,o){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),i=null;return}if(o===e.length-1){if(!a)return;i===null?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`);return}a&&i===null&&(i=o)})}),n.join(``)}function u6(e,t){return e.slice().map((e,n)=>n<t.y||n>=t.y+t.h?e:e.map((e,n)=>n<t.x||n>=t.x+t.w?e:!1))}function Wae(e,t,n,r){if(r==null)return null;let i=e.length+n*2,a=Math.floor(t*Uae),o=i/t,s=(r.width||a)*o,c=(r.height||a)*o,l=r.x==null?e.length/2-s/2:r.x*o,u=r.y==null?e.length/2-c/2:r.y*o,d=r.opacity==null?1:r.opacity,f=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(u);f={x:e,y:t,w:Math.ceil(s+l-e),h:Math.ceil(c+u-t)}}let p=r.crossOrigin;return{x:l,y:u,h:c,w:s,excavation:f,opacity:d,crossOrigin:p}}function Gae(e,t){return t==null?e?Vae:Hae:Math.max(Math.floor(t),0)}function d6({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:a,size:o,boostLevel:c}){let l=s.useMemo(()=>{let r=(Array.isArray(e)?e:[e]).reduce((e,t)=>(e.push(...n6.QrSegment.makeSegments(t)),e),[]);return n6.QrCode.encodeSegments(r,Bae[t],n,void 0,void 0,c)},[e,t,n,c]),{cells:u,margin:d,numCells:f,calculatedImageSettings:p}=s.useMemo(()=>{let e=l.getModules(),t=Gae(r,i);return{cells:e,margin:t,numCells:e.length+t*2,calculatedImageSettings:Wae(e,o,t,a)}},[l,o,a,r,i]);return{qrcode:l,margin:d,cells:u,numCells:f,calculatedImageSettings:p}}var Kae=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),qae=s.forwardRef(function(e,t){let n=e,{value:r,size:i=r6,level:a=i6,bgColor:o=a6,fgColor:c=o6,includeMargin:l=s6,minVersion:u=c6,boostLevel:d,marginSize:f,imageSettings:p}=n,m=e6(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`marginSize`,`imageSettings`]),{style:h}=m,g=e6(m,[`style`]),_=p?.src,v=s.useRef(null),y=s.useRef(null),b=s.useCallback(e=>{v.current=e,typeof t==`function`?t(e):t&&(t.current=e)},[t]),[ee,te]=s.useState(!1),{margin:ne,cells:x,numCells:S,calculatedImageSettings:re}=d6({value:r,level:a,minVersion:u,boostLevel:d,includeMargin:l,marginSize:f,imageSettings:p,size:i});s.useEffect(()=>{if(v.current!=null){let e=v.current,t=e.getContext(`2d`);if(!t)return;let n=x,r=y.current,a=re!=null&&r!==null&&r.complete&&r.naturalHeight!==0&&r.naturalWidth!==0;a&&re.excavation!=null&&(n=u6(x,re.excavation));let s=window.devicePixelRatio||1;e.height=e.width=i*s;let l=i/S*s;t.scale(l,l),t.fillStyle=o,t.fillRect(0,0,S,S),t.fillStyle=c,Kae?t.fill(new Path2D(l6(n,ne))):x.forEach(function(e,n){e.forEach(function(e,r){e&&t.fillRect(r+ne,n+ne,1,1)})}),re&&(t.globalAlpha=re.opacity),a&&t.drawImage(r,re.x+ne,re.y+ne,re.w,re.h)}}),s.useEffect(()=>{te(!1)},[_]);let ie=$3({height:i,width:i},h),ae=null;return _!=null&&(ae=s.createElement(`img`,{src:_,key:_,style:{display:`none`},onLoad:()=>{te(!0)},ref:y,crossOrigin:re?.crossOrigin})),s.createElement(s.Fragment,null,s.createElement(`canvas`,$3({style:ie,height:i,width:i,ref:b,role:`img`},g)),ae)});qae.displayName=`QRCodeCanvas`;var Jae=s.forwardRef(function(e,t){let n=e,{value:r,size:i=r6,level:a=i6,bgColor:o=a6,fgColor:c=o6,includeMargin:l=s6,minVersion:u=c6,boostLevel:d,title:f,marginSize:p,imageSettings:m}=n,h=e6(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`title`,`marginSize`,`imageSettings`]),{margin:g,cells:_,numCells:v,calculatedImageSettings:y}=d6({value:r,level:a,minVersion:u,boostLevel:d,includeMargin:l,marginSize:p,imageSettings:m,size:i}),b=_,ee=null;m!=null&&y!=null&&(y.excavation!=null&&(b=u6(_,y.excavation)),ee=s.createElement(`image`,{href:m.src,height:y.h,width:y.w,x:y.x+g,y:y.y+g,preserveAspectRatio:`none`,opacity:y.opacity,crossOrigin:y.crossOrigin}));let te=l6(b,g);return s.createElement(`svg`,$3({height:i,width:i,viewBox:`0 0 ${v} ${v}`,ref:t,role:`img`},h),!!f&&s.createElement(`title`,null,f),s.createElement(`path`,{fill:o,d:`M0,0 h${v}v${v}H0z`,shapeRendering:`crispEdges`}),s.createElement(`path`,{fill:c,d:te,shapeRendering:`crispEdges`}),ee)});Jae.displayName=`QRCodeSVG`;var Yae=`rounded-lg border border-border bg-surface overflow-hidden`,Xae=`border-b border-border px-3 sm:px-4 py-1.5 sm:py-2`,f6=`p-2 sm:p-3 lg:p-4`,Zae=`flex min-w-0 flex-col gap-0.5 py-1.5 sm:flex-row sm:items-center`,Qae=`min-w-0 text-[11px] leading-tight text-foreground-subtle sm:w-32 sm:shrink-0 sm:pr-2`,$ae=`flex w-full min-w-0 items-center gap-1 sm:flex-1`,eoe=`min-w-0 break-all text-xs text-foreground sm:truncate`,toe=`text-[10px] sm:text-[11px] font-semibold text-foreground uppercase tracking-wider`,noe=`text-[10px] text-foreground-subtle`,roe=`inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 text-[10px] font-medium transition-colors`,ioe=`border-primary/50 bg-primary/15 text-primary`,p6=(0,s.forwardRef)(({className:e,...t},n)=>(0,K.jsx)(`label`,{ref:n,className:Z(`text-[10px] uppercase tracking-wider text-foreground-muted font-medium`,e),...t}));p6.displayName=`Label`;var aoe=TJ(``,{variants:{orientation:{horizontal:`h-px w-full bg-border-subtle`,vertical:`w-px h-full bg-border-subtle`}},defaultVariants:{orientation:`horizontal`}}),ooe=(0,s.forwardRef)(({className:e,orientation:t,...n},r)=>(0,K.jsx)(`div`,{ref:r,role:`separator`,"aria-orientation":t??`horizontal`,className:Z(aoe({orientation:t}),e),...n}));ooe.displayName=`Separator`;var m6=(0,s.forwardRef)(({className:e,...t},n)=>(0,K.jsx)(`input`,{ref:n,type:`checkbox`,className:Z(`w-3.5 h-3.5 rounded-sm border border-border accent-primary`,e),...t}));m6.displayName=`Checkbox`;var soe=(0,s.forwardRef)(({className:e,checked:t,onCheckedChange:n,label:r,...i},a)=>(0,K.jsxs)(`button`,{ref:a,role:`switch`,"aria-checked":t,type:`button`,onClick:()=>n(!t),className:Z(`inline-flex items-center gap-2`,e),...i,children:[(0,K.jsx)(`span`,{className:Z(`w-8 h-4 rounded-full transition-colors`,t?`bg-primary`:`bg-surface-hover`),children:(0,K.jsx)(`span`,{className:Z(`block w-3.5 h-3.5 rounded-full bg-white transition-transform`,t?`translate-x-4`:`translate-x-0.5`)})}),r&&(0,K.jsx)(`span`,{className:`text-xs text-foreground`,children:r})]}));soe.displayName=`Switch`;var coe=(0,s.createContext)(null);function loe(){let e=(0,s.useContext)(coe);if(!e)throw Error(`Tabs compound components must be used within <Tabs>`);return e}(0,s.forwardRef)(function({value:e,className:t,...n},r){let{value:i,setValue:a,appearance:o}=loe(),s=e===i;return(0,K.jsx)(`button`,{ref:r,type:`button`,role:`tab`,"aria-selected":s,"aria-controls":`tabpanel-${e}`,tabIndex:s?0:-1,className:Z(`inline-flex h-7 shrink-0 items-center justify-center gap-1.5 whitespace-nowrap text-xs px-3 transition-colors`,o===`pills`?s?`rounded-md bg-primary/10 font-medium text-primary`:`rounded-md text-foreground-muted hover:bg-surface-hover hover:text-foreground`:s?`border-b-2 border-primary text-foreground font-medium`:`text-foreground-muted hover:text-foreground`,t),onClick:()=>a(e),...n})});var uoe=(0,s.forwardRef)(({className:e,...t},n)=>(0,K.jsx)(`div`,{ref:n,className:Z(`overflow-auto [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-surface-hover [&::-webkit-scrollbar-thumb]:rounded-full`,e),...t}));uoe.displayName=`ScrollArea`;function doe({page:e,labels:t,onPageChange:n}){let r=e.page===0,i=e.page>=e.pageCount-1;return(0,K.jsxs)(`nav`,{"aria-label":t.navLabel,className:`flex items-center justify-end gap-2 pt-2`,children:[(0,K.jsx)(`span`,{"aria-live":`polite`,className:`text-[11px] tabular-nums text-foreground-subtle`,children:t.range(e.from,e.to,e.total)}),(0,K.jsx)(DJ,{type:`button`,variant:`outline`,size:`sm`,icon:eV,"aria-label":t.previous,title:t.previous,disabled:r,onClick:()=>n(e.page-1)}),(0,K.jsx)(DJ,{type:`button`,variant:`outline`,size:`sm`,icon:tV,"aria-label":t.next,title:t.next,disabled:i,onClick:()=>n(e.page+1)})]})}function foe(e,t,n){let r=Math.max(1,Math.floor(n)),i=e.length,a=Math.max(1,Math.ceil(i/r)),o=Math.min(Math.max(0,Math.floor(t)),a-1),s=o*r,c=e.slice(s,s+r);return{pageRows:c,page:o,pageCount:a,from:c.length===0?0:s+1,to:s+c.length,total:i}}var poe={navLabel:`Table pages`,previous:`Previous page`,next:`Next page`,range:(e,t,n)=>`${e}–${t} of ${n}`},moe=`__select`,h6=`cursor-pointer align-middle`;function hoe({checked:e,indeterminate:t,disabled:n,label:r,onToggle:i}){let a=(0,s.useRef)(null);return(0,s.useEffect)(()=>{a.current!==null&&(a.current.indeterminate=t)},[t]),(0,K.jsx)(m6,{ref:a,"aria-label":r,checked:e,disabled:n,onChange:i,className:h6})}function goe(e,t,n){let r=e.isSelectable??(()=>!0),i=t.filter(r).map(n),a=i.filter(t=>e.selected.has(t)).length,o=i.length>0&&a===i.length,s=()=>{let t=new Set(e.selected);for(let e of i)o?t.delete(e):t.add(e);e.onChange(t)},c=t=>{let n=new Set(e.selected);n.has(t)?n.delete(t):n.add(t),e.onChange(n)};return{key:moe,width:`w-8`,headerRender:()=>(0,K.jsx)(hoe,{checked:o,indeterminate:a>0&&!o,disabled:i.length===0,label:e.pageLabel,onToggle:s}),render:t=>{if(!r(t))return null;let i=n(t);return(0,K.jsx)(m6,{"aria-label":e.rowLabel(t),checked:e.selected.has(i),onChange:()=>c(i),onClick:e=>e.stopPropagation(),className:h6})}}}function _oe({label:e,active:t,dir:n,onSort:r}){return(0,K.jsxs)(`button`,{type:`button`,onClick:r,className:`group/sort inline-flex items-center gap-0.5 hover:text-foreground transition-colors`,children:[(0,K.jsx)(`span`,{children:e}),t?n===`asc`?(0,K.jsx)(nV,{className:`h-3 w-3 flex-shrink-0`}):(0,K.jsx)($B,{className:`h-3 w-3 flex-shrink-0`}):(0,K.jsx)(nV,{className:Z(`h-3 w-3 flex-shrink-0 opacity-0 transition-opacity`,`group-hover/sort:opacity-30`)})]})}function voe(e,t){return!e||t===null?`asc`:t===`asc`?`desc`:null}function yoe(e,t){let n=voe(e!==null&&e.columnKey===t,e===null?null:e.dir);return n===null?null:{columnKey:t,dir:n}}function boe(e,t){return typeof e==`number`&&typeof t==`number`?e-t:String(e).localeCompare(String(t))}function xoe(e,t,n){if(t===null)return[...e];let r=t.dir===`asc`?1:-1;return e.toSorted((e,t)=>{let i=n(e),a=n(t);return i===null||a===null?i===a?0:i===null?1:-1:r*boe(i,a)})}function Soe(e,t){return e===null||e.columnKey!==t?`none`:e.dir===`asc`?`ascending`:`descending`}var g6={left:`text-left`,right:`text-right`,center:`text-center`};function Coe({columns:e,rows:t,rowKey:n,onRowClick:r,minWidthPx:i=480,emptyMessage:a,className:o,bordered:c=!0,rowClassName:l,maxBodyHeight:u,fill:d=!1,defaultSort:f,sort:p,onSortChange:m,pageSize:h,page:g,onPageChange:_,paginationLabels:v=poe,selection:y,renderExpanded:b,isExpanded:ee}){let[te,ne]=(0,s.useState)(f??null),[x,S]=(0,s.useState)(0),re=p===void 0?te:p,ie=e=>{p===void 0&&ne(e),m?.(e)},ae=e=>{g===void 0&&S(e),_?.(e)},oe=d||u!==void 0,se=d?`h-full min-h-0`:u??``,ce=(0,s.useMemo)(()=>re===null?void 0:e.find(e=>e.key===re.columnKey&&e.sortValue!==void 0),[e,re]),le=ce?.sortValue,ue=(0,s.useMemo)(()=>le===void 0?t:xoe(t,re,le),[t,re,le]),de=ce===void 0?null:re,fe=h===void 0?null:foe(ue,g??x,h),C=fe===null?ue:fe.pageRows,pe=fe!==null&&fe.pageCount>1?(0,K.jsx)(doe,{page:fe,labels:v,onPageChange:ae}):null,w=y===void 0?e:[goe(y,C,e=>String(n?n(e,t.indexOf(e)):t.indexOf(e))),...e];if(t.length===0&&a)return(0,K.jsx)(`div`,{className:`rounded-lg ${c?`border border-border`:``} bg-surface px-3 py-4 text-xs text-foreground-subtle text-center ${o??``}`,children:a});if(t.length===0)return null;let me=(0,K.jsx)(`div`,{className:[`rounded-lg`,c?`border border-border`:``,`bg-surface overflow-x-auto`,oe?`${se} overflow-y-auto`:``,d?`min-h-0 flex-1`:``,!d&&pe===null?o??``:``].filter(Boolean).join(` `),children:(0,K.jsxs)(`table`,{className:`w-full text-xs ${oe?`border-separate border-spacing-0`:``}`,style:{minWidth:`${i}px`},children:[(0,K.jsx)(`thead`,{className:`bg-surface`,children:(0,K.jsx)(`tr`,{children:w.map(e=>{let t=e.align??`left`,n=e.nowrap??!0,r=e.sortValue!==void 0,i=de!==null&&de.columnKey===e.key;return(0,K.jsx)(`th`,{"aria-sort":r?Soe(de,e.key):void 0,title:r?void 0:e.notSortableReason,className:[`px-3 py-2 text-foreground-subtle font-medium bg-surface border-b border-border`,oe?`sticky top-0 z-10`:``,g6[t],n?`whitespace-nowrap`:``,e.width??``].filter(Boolean).join(` `),children:r?(0,K.jsx)(_oe,{label:e.headerRender?e.headerRender():e.header,active:i,dir:i&&de!==null?de.dir:`asc`,onSort:()=>ie(yoe(re,e.key))}):e.headerRender?e.headerRender():e.header},e.key)})})}),(0,K.jsx)(`tbody`,{children:C.map((e,t)=>{let i=n?n(e,t):t,a=l?.(e,t)??``,o=r!==void 0,c=b!==void 0&&ee?.(e)===!0?b(e,t):null;return(0,K.jsxs)(s.Fragment,{children:[(0,K.jsx)(`tr`,{onClick:o?()=>r(e,t):void 0,className:[o?`cursor-pointer hover:bg-primary/5`:`hover:bg-primary/5`,a].filter(Boolean).join(` `),children:w.map(n=>{let r=n.align??`left`,i=n.nowrap??!0;return(0,K.jsx)(`td`,{"data-cell":n.key,className:[`px-3 py-2 text-foreground border-b border-border`,g6[r],i?`whitespace-nowrap`:``].filter(Boolean).join(` `),children:n.render(e,t)},n.key)})}),c!==null&&(0,K.jsx)(`tr`,{"data-expanded-row":``,className:`bg-surface`,children:(0,K.jsx)(`td`,{colSpan:w.length,className:`border-b border-border px-3 py-2`,children:c})})]},i)})})]})});return pe===null?d?(0,K.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col ${o??``}`,children:me}):me:(0,K.jsxs)(`div`,{className:d?`flex min-h-0 flex-1 flex-col ${o??``}`:o,children:[me,pe]})}function _6({label:e,children:t,actions:n,elements:r=`plain`,className:i,valueClassName:a}){let o=r===`description`?`dt`:`span`,s=r===`description`?`dd`:`div`;return(0,K.jsxs)(`div`,{"data-setting-row":``,className:Z(Zae,i),children:[(0,K.jsx)(o,{"data-setting-row-label":``,className:Qae,children:e}),(0,K.jsxs)(s,{"data-setting-row-value":``,className:$ae,children:[(0,K.jsx)(`span`,{"data-setting-row-value-text":``,className:Z(eoe,a),children:t}),n!==void 0&&(0,K.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,children:n})]})]})}function v6({headingId:e,title:t,icon:n,actions:r,testId:i,children:a}){return(0,K.jsxs)(`section`,{"aria-labelledby":e,className:Yae,"data-testid":i,children:[(0,K.jsxs)(`header`,{className:`${Xae} flex min-h-9 flex-wrap items-center gap-2`,children:[n!==void 0&&(0,K.jsx)(n,{className:`h-3.5 w-3.5 shrink-0 text-foreground-subtle`,"aria-hidden":!0}),(0,K.jsx)(`h2`,{id:e,className:`${toe} min-w-0 flex-1`,children:t}),r]}),a]})}var woe=5*6e4,Toe=720*6e4,Eoe=`camstack:turn-servers:v1`;function Doe(){let e=globalThis;try{return e.localStorage??null}catch{return null}}function Ooe(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.fetchedAt!=`number`||!Array.isArray(t.servers)?!1:t.servers.every(e=>{if(typeof e!=`object`||!e)return!1;let t=e;return!(!(typeof t.urls==`string`||Array.isArray(t.urls)&&t.urls.every(e=>typeof e==`string`))||t.username!==void 0&&typeof t.username!=`string`||t.credential!==void 0&&typeof t.credential!=`string`)})}new class{freshTtlMs;staleCapMs;storage;now;storageKey;memory=new WeakMap;inflight=new WeakMap;constructor(e={}){this.freshTtlMs=e.freshTtlMs??woe,this.staleCapMs=e.staleCapMs??Toe,this.storage=`storage`in e?e.storage??null:Doe(),this.now=e.now??(()=>Date.now()),this.storageKey=e.storageKey??Eoe}async getOrFetch(e,t){let n=this.now(),r=this.memory.get(e)??this.readStorage();if(r){let i=n-r.fetchedAt;if(i<this.freshTtlMs)return r.servers;if(i<this.staleCapMs)return this.startFetch(e,t,r),r.servers}return this.startFetch(e,t,r)}startFetch(e,t,n){let r=this.inflight.get(e);if(r)return r;let i=(async()=>{try{let n=await t();if(n.length>0){let t={servers:n,fetchedAt:this.now()};this.memory.set(e,t),this.writeStorage(t)}return n}catch{return n?.servers}})().finally(()=>{this.inflight.delete(e)});return this.inflight.set(e,i),i}readStorage(){if(this.storage)try{let e=this.storage.getItem(this.storageKey);if(e===null)return;let t=JSON.parse(e);return Ooe(t)?t:void 0}catch{return}}writeStorage(e){if(this.storage)try{this.storage.setItem(this.storageKey,JSON.stringify(e))}catch{}}};var y6=[`day`,`ir`],koe={day:{labelKey:`uiLibrary.sceneMonitor.variant.day`,labelFallback:`Daylight`},ir:{labelKey:`uiLibrary.sceneMonitor.variant.ir`,labelFallback:`Night (IR)`},night:{labelKey:`uiLibrary.sceneMonitor.variant.night`,labelFallback:`Night`},dawn:{labelKey:`uiLibrary.sceneMonitor.variant.dawn`,labelFallback:`Dawn`},dusk:{labelKey:`uiLibrary.sceneMonitor.variant.dusk`,labelFallback:`Dusk`}};function b6(e,t=i){let n=koe[e];return n===void 0?e:t(n.labelKey,n.labelFallback)}function Aoe(e,t=i){let n=new Set(e.coveredConditions),r=y6.map(e=>`${b6(e,t)} ${n.has(e)?`✓`:`✗`}`),a=[...n].filter(e=>!y6.some(t=>t===e));for(let e of a)r.push(`${b6(e,t)} ✓`);let o=y6.filter(e=>!n.has(e));if(o.length===0)return r.join(` · `);if(n.size===0)return t(`uiLibrary.sceneMonitor.coverage.empty`,`{{parts}} — nothing captured yet, so this scene is not watching.`,{parts:r.join(` · `)});let[s=``,c]=o.map(e=>b6(e,t).toLowerCase()),l=c===void 0?s:t(`uiLibrary.sceneMonitor.coverage.namesJoin`,`{{first}} and {{second}}`,{first:s,second:c}),u={parts:r.join(` · `),names:l};return e.onUncoveredCondition===`judge-anyway`?t(`uiLibrary.sceneMonitor.coverage.judgeAnyway`,`{{parts}} — {{names}} judged against the references you do have.`,u):t(`uiLibrary.sceneMonitor.coverage.skip`,`{{parts}} — optional; checks in {{names}} are skipped.`,u)}function joe(e,t=i){return e.suspendedCondition===null?null:t(`uiLibrary.sceneMonitor.suspension`,`Paused — nothing was captured in {{light}}, so checks are on hold until the light changes back. Capture {{light}} if you want it watched around the clock.`,{light:b6(e.suspendedCondition,t).toLowerCase()})}var Moe={"no-reference-for-condition":{key:`uiLibrary.sceneMonitor.unavailable.no_reference_for_condition`,fallback:`can’t tell — nothing has been captured for this scene yet. Press “Capture daylight” to photograph what normal looks like.`},"view-shifted":{key:`uiLibrary.sceneMonitor.unavailable.view_shifted`,fallback:`can’t tell — the camera view has moved since the reference was captured. Re-capture it.`},"no-vision-profile":{key:`uiLibrary.sceneMonitor.unavailable.no_vision_profile`,fallback:`can’t tell — the vision model is unreachable, so the change is on hold.`},"encoder-model-changed":{key:`uiLibrary.sceneMonitor.unavailable.encoder_model_changed`,fallback:`can’t tell — the embedding model changed, so the stored references are unreadable. Re-capture them.`},"no-snapshot":{key:`uiLibrary.sceneMonitor.unavailable.no_snapshot`,fallback:`can’t tell — this camera did not return a frame.`}};function Noe(e,t,n=i){if(e.states.length===0)return n(`uiLibrary.sceneMonitor.status.notArmed`,`Not armed yet — capture the initial state to start watching.`);if(e.verdict===`unknown`){if(e.unavailable===null)return n(`uiLibrary.sceneMonitor.status.cantTellNow`,`can’t tell right now.`);let t=Moe[e.unavailable];return n(t.key,t.fallback)}let r=e.verdict===`diverged`?e.divergedAt:e.armedAt,a=r===null?``:` ${n(`uiLibrary.sceneMonitor.status.heldFor`,`for {{duration}}`,{duration:Loe(Math.max(0,t-r))})}`;if(e.latched)return e.verdict===`diverged`?n(`uiLibrary.sceneMonitor.status.changedLatched`,`CHANGED{{held}} — press Reset when you have dealt with it.`,{held:a}):n(`uiLibrary.sceneMonitor.status.backToNormal`,`Back to normal, but still flagged as changed{{held}}. Press Reset to clear it.`,{held:a});let o=joe(e,n);return o===null?e.verdict===`diverged`?n(`uiLibrary.sceneMonitor.status.changed`,`CHANGED{{held}}`,{held:a}):n(`uiLibrary.sceneMonitor.status.normal`,`Normal{{held}}`,{held:a}):o}function Poe(e,t=i){return e.states.length===0?{text:t(`uiLibrary.sceneMonitor.badge.notArmed`,`Not armed`),tone:`unknown`}:e.latched?{text:t(`uiLibrary.sceneMonitor.badge.changed`,`Changed`),tone:`alarm`}:e.suspendedCondition===null?e.verdict===`unknown`?{text:t(`uiLibrary.sceneMonitor.badge.cantTell`,`Can’t tell`),tone:`unknown`}:e.verdict===`diverged`?{text:t(`uiLibrary.sceneMonitor.badge.changed`,`Changed`),tone:`alarm`}:{text:t(`uiLibrary.sceneMonitor.badge.normal`,`Normal`),tone:`ok`}:{text:t(`uiLibrary.sceneMonitor.badge.paused`,`Paused`),tone:`unknown`}}var Foe=.4;function Ioe(e){return e.width*e.height>Foe}function Loe(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<48?`${r}h`:`${Math.floor(r/24)}d`}function Roe({label:e,icon:n,title:r,description:i,confirmLabel:a,triggerVariant:o=`outline`,confirmVariant:c=`danger`,size:l=`sm`,disabled:u,className:d,action:f,onSuccess:p}){let m=t(),[h,g]=(0,s.useState)(!1),[_,v]=(0,s.useState)(!1),[y,b]=(0,s.useState)(null),ee=async()=>{b(null),v(!0);try{let e=await f();p?.(e),g(!1)}catch(e){b(e instanceof Error?e.message:String(e))}finally{v(!1)}};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(WJ,{type:`button`,variant:o,size:l,disabled:u,onClick:()=>{b(null),g(!0)},className:d,children:[n&&(0,K.jsx)(n,{className:`h-3.5 w-3.5`}),e]}),(0,K.jsx)(U3,{open:h,onOpenChange:e=>!_&&g(e),children:(0,K.jsxs)(W3,{children:[(0,K.jsxs)(G3,{children:[(0,K.jsxs)(q3,{className:`flex items-center gap-2`,children:[(0,K.jsx)(BH,{className:`h-4 w-4 text-amber-400`}),r??m(`uiLibrary.confirmActionButton.defaultTitle`,`Confirm action`)]}),typeof i==`string`?(0,K.jsx)(J3,{children:i}):i]}),y&&(0,K.jsx)(`div`,{className:Z(`mt-2 px-3 py-2 rounded border border-danger/40 bg-danger/10`,`text-xs text-danger`),children:y}),(0,K.jsxs)(K3,{children:[(0,K.jsx)(WJ,{type:`button`,variant:`ghost`,size:l,disabled:_,onClick:()=>g(!1),children:m(`uiLibrary.confirmActionButton.cancel`,`Cancel`)}),(0,K.jsxs)(WJ,{type:`button`,variant:c,size:l,disabled:_,onClick:()=>{ee()},children:[_&&(0,K.jsx)(BV,{className:`h-3.5 w-3.5 animate-spin`}),a??e]})]})]})})]})}var x6=Cx(),zoe=new Set([`live`,`recording`,`heatmapScrub`]);Object.freeze(Object.fromEntries(_x.filter(e=>!zoe.has(e)).map(e=>[e,Tx(x6.swatches,x6.fallbacks,e)])));function Boe(e){let t=e[0];if(t===void 0)throw Error(`display palette has no fallback colour`);return t}Boe(x6.fallbacks),Cx(),(0,s.createContext)({status:`absent`});var Voe=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},S6=class{constructor(e){this.generateIdentifier=e,this.kv=new Voe}register(e,t){this.kv.getByValue(e)||(t||=this.generateIdentifier(e),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}},Hoe=class extends S6{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t==`object`?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function Uoe(e){if(`values`in Object)return Object.values(e);let t=[];for(let n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function Woe(e,t){let n=Uoe(e);if(`find`in n)return n.find(t);let r=n;for(let e=0;e<r.length;e++){let n=r[e];if(t(n))return n}}function C6(e,t){Object.entries(e).forEach(([e,n])=>t(n,e))}function w6(e,t){return e.indexOf(t)!==-1}function T6(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(t(r))return r}}var Goe=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return Woe(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},Koe=e=>Object.prototype.toString.call(e).slice(8,-1),E6=e=>e===void 0,qoe=e=>e===null,D6=e=>typeof e!=`object`||!e||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,O6=e=>D6(e)&&Object.keys(e).length===0,k6=e=>Array.isArray(e),Joe=e=>typeof e==`string`,Yoe=e=>typeof e==`number`&&!isNaN(e),Xoe=e=>typeof e==`boolean`,Zoe=e=>e instanceof RegExp,A6=e=>e instanceof Map,j6=e=>e instanceof Set,M6=e=>Koe(e)===`Symbol`,Qoe=e=>e instanceof Date&&!isNaN(e.valueOf()),N6=e=>e instanceof Error,P6=e=>typeof e==`number`&&isNaN(e),$oe=e=>Xoe(e)||qoe(e)||E6(e)||Yoe(e)||Joe(e)||M6(e),ese=e=>typeof e==`bigint`,tse=e=>e===1/0||e===-1/0,nse=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),rse=e=>e instanceof URL,F6=e=>e.replace(/\\/g,`\\\\`).replace(/\./g,`\\.`),I6=e=>e.map(String).map(F6).join(`.`),L6=(e,t)=>{let n=[],r=``;for(let i=0;i<e.length;i++){let a=e.charAt(i);if(!t&&a===`\\`){let t=e.charAt(i+1);if(t===`\\`){r+=`\\`,i++;continue}else if(t!==`.`)throw Error(`invalid path`)}if(a===`\\`&&e.charAt(i+1)===`.`){r+=`.`,i++;continue}if(a===`.`){n.push(r),r=``;continue}r+=a}let i=r;return n.push(i),n};function R6(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var z6=[R6(E6,`undefined`,()=>null,()=>void 0),R6(ese,`bigint`,e=>e.toString(),e=>typeof BigInt<`u`?BigInt(e):(console.error(`Please add a BigInt polyfill.`),e)),R6(Qoe,`Date`,e=>e.toISOString(),e=>new Date(e)),R6(N6,`Error`,(e,t)=>{let n={name:e.name,message:e.message};return`cause`in e&&(n.cause=e.cause),t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n},(e,t)=>{let n=Error(e.message,{cause:e.cause});return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n}),R6(Zoe,`regexp`,e=>``+e,e=>{let t=e.slice(1,e.lastIndexOf(`/`)),n=e.slice(e.lastIndexOf(`/`)+1);return new RegExp(t,n)}),R6(j6,`set`,e=>[...e.values()],e=>new Set(e)),R6(A6,`map`,e=>[...e.entries()],e=>new Map(e)),R6(e=>P6(e)||tse(e),`number`,e=>P6(e)?`NaN`:e>0?`Infinity`:`-Infinity`,Number),R6(e=>e===0&&1/e==-1/0,`number`,()=>`-0`,Number),R6(rse,`URL`,e=>e.toString(),e=>new URL(e))];function B6(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var V6=B6((e,t)=>M6(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>[`symbol`,t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{let r=n.symbolRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown symbol`);return r}),ise=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),H6=B6(nse,e=>[`typed-array`,e.constructor.name],e=>[...e],(e,t)=>{let n=ise[t[1]];if(!n)throw Error(`Trying to deserialize unknown typed array`);return new n(e)});function U6(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var W6=B6(U6,(e,t)=>[`class`,t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{let n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};let r={};return n.forEach(t=>{r[t]=e[t]}),r},(e,t,n)=>{let r=n.classRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),G6=B6((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>[`custom`,t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{let r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw Error(`Trying to deserialize unknown custom value`);return r.deserialize(e)}),ase=[W6,V6,G6,H6],K6=(e,t)=>{let n=T6(ase,n=>n.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};let r=T6(z6,n=>n.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},q6={};z6.forEach(e=>{q6[e.annotation]=e});var ose=(e,t,n)=>{if(k6(t))switch(t[0]){case`symbol`:return V6.untransform(e,t,n);case`class`:return W6.untransform(e,t,n);case`custom`:return G6.untransform(e,t,n);case`typed-array`:return H6.untransform(e,t,n);default:throw Error(`Unknown transformation: `+t)}else{let r=q6[t];if(!r)throw Error(`Unknown transformation: `+t);return r.untransform(e,n)}},J6=(e,t)=>{if(t>e.size)throw Error(`index out of bounds`);let n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function Y6(e){if(w6(e,`__proto__`))throw Error(`__proto__ is not allowed as a property`);if(w6(e,`prototype`))throw Error(`prototype is not allowed as a property`);if(w6(e,`constructor`))throw Error(`constructor is not allowed as a property`)}var sse=(e,t)=>{Y6(t);for(let n=0;n<t.length;n++){let r=t[n];if(j6(e))e=J6(e,+r);else if(A6(e)){let i=+r,a=+t[++n]==0?`key`:`value`,o=J6(e,i);switch(a){case`key`:e=o;break;case`value`:e=e.get(o);break}}else e=e[r]}return e},X6=(e,t,n)=>{if(Y6(t),t.length===0)return n(e);let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(k6(r)){let e=+n;r=r[e]}else if(D6(r))r=r[n];else if(j6(r)){let e=+n;r=J6(r,e)}else if(A6(r)){if(e===t.length-2)break;let i=+n,a=+t[++e]==0?`key`:`value`,o=J6(r,i);switch(a){case`key`:r=o;break;case`value`:r=r.get(o);break}}}let i=t[t.length-1];if(k6(r)?r[+i]=n(r[+i]):D6(r)&&(r[i]=n(r[i])),j6(r)){let e=J6(r,+i),t=n(e);e!==t&&(r.delete(e),r.add(t))}if(A6(r)){let e=+t[t.length-2],a=J6(r,e);switch(+i==0?`key`:`value`){case`key`:{let e=n(a);r.set(e,r.get(a)),e!==a&&r.delete(a);break}case`value`:r.set(a,n(r.get(a)));break}}return e},Z6=e=>e<1;function Q6(e,t,n,r=[]){if(!e)return;let i=Z6(n);if(!k6(e)){C6(e,(e,a)=>Q6(e,t,n,[...r,...L6(a,i)]));return}let[a,o]=e;o&&C6(o,(e,a)=>{Q6(e,t,n,[...r,...L6(a,i)])}),t(a,r)}function cse(e,t,n,r){return Q6(t,(t,n)=>{e=X6(e,n,e=>ose(e,t,r))},n),e}function lse(e,t,n){let r=Z6(n);function i(t,n){let i=sse(e,L6(n,r));t.map(e=>L6(e,r)).forEach(t=>{e=X6(e,t,()=>i)})}if(k6(t)){let[n,a]=t;n.forEach(t=>{e=X6(e,L6(t,r),()=>e)}),a&&C6(a,i)}else C6(t,i);return e}var use=(e,t)=>D6(e)||k6(e)||A6(e)||j6(e)||N6(e)||U6(e,t);function dse(e,t,n){let r=n.get(e);r?r.push(t):n.set(e,[t])}function fse(e,t){let n={},r;return e.forEach(e=>{if(e.length<=1)return;t||(e=e.map(e=>e.map(String)).sort((e,t)=>e.length-t.length));let[i,...a]=e;i.length===0?r=a.map(I6):n[I6(i)]=a.map(I6)}),r?O6(n)?[r]:[r,n]:O6(n)?void 0:n}var $6=(e,t,n,r,i=[],a=[],o=new Map)=>{let s=$oe(e);if(!s){dse(e,i,t);let n=o.get(e);if(n)return r?{transformedValue:null}:n}if(!use(e,n)){let t=K6(e,n),r=t?{transformedValue:t.value,annotations:[t.type]}:{transformedValue:e};return s||o.set(e,r),r}if(w6(a,e))return{transformedValue:null};let c=K6(e,n),l=c?.value??e,u=k6(l)?[]:{},d={};C6(l,(s,c)=>{if(c===`__proto__`||c===`constructor`||c===`prototype`)throw Error(`Detected property ${c}. This is a prototype pollution risk, please remove it from your object.`);let l=$6(s,t,n,r,[...i,c],[...a,e],o);u[c]=l.transformedValue,k6(l.annotations)?d[F6(c)]=l.annotations:D6(l.annotations)&&C6(l.annotations,(e,t)=>{d[F6(c)+`.`+t]=e})});let f=O6(d)?{transformedValue:u,annotations:c?[c.type]:void 0}:{transformedValue:u,annotations:c?[c.type,d]:d};return s||o.set(e,f),f};function e8(e){return Object.prototype.toString.call(e).slice(8,-1)}function t8(e){return e8(e)===`Array`}function pse(e){if(e8(e)!==`Object`)return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function mse(e,t,n,r,i){let a={}.propertyIsEnumerable.call(r,t)?`enumerable`:`nonenumerable`;a===`enumerable`&&(e[t]=n),i&&a===`nonenumerable`&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function n8(e,t={}){if(t8(e))return e.map(e=>n8(e,t));if(!pse(e))return e;let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((n,r)=>{if(r===`__proto__`||t8(t.props)&&!t.props.includes(r))return n;let i=e[r];return mse(n,r,n8(i,t),e,t.nonenumerable),n},{})}var r8=class{constructor({dedupe:e=!1}={}){this.classRegistry=new Hoe,this.symbolRegistry=new S6(e=>e.description??``),this.customTransformerRegistry=new Goe,this.allowedErrorProps=[],this.dedupe=e}serialize(e){let t=new Map,n=$6(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});let i=fse(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r.meta&&(r.meta.v=1),r}deserialize(e,t){let{json:n,meta:r}=e,i=t?.inPlace?n:n8(n);return r?.values&&(i=cse(i,r.values,r.v??0,this)),r?.referentialEqualities&&(i=lse(i,r.referentialEqualities,r.v??0)),i}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e),{inPlace:!0})}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};r8.defaultInstance=new r8,r8.serialize=r8.defaultInstance.serialize.bind(r8.defaultInstance),r8.deserialize=r8.defaultInstance.deserialize.bind(r8.defaultInstance),r8.stringify=r8.defaultInstance.stringify.bind(r8.defaultInstance),r8.parse=r8.defaultInstance.parse.bind(r8.defaultInstance),r8.registerClass=r8.defaultInstance.registerClass.bind(r8.defaultInstance),r8.registerSymbol=r8.defaultInstance.registerSymbol.bind(r8.defaultInstance),r8.registerCustom=r8.defaultInstance.registerCustom.bind(r8.defaultInstance),r8.allowErrorProps=r8.defaultInstance.allowErrorProps.bind(r8.defaultInstance),r8.serialize,r8.deserialize,r8.stringify,r8.parse,r8.registerClass,r8.registerCustom,r8.registerSymbol,r8.allowErrorProps;var hse=function(e){return e.Motion=`motion`,e.Person=`person`,e.Vehicle=`vehicle`,e.Animal=`animal`,e.Audio=`audio`,e.Face=`face`,e.Plate=`plate`,e.Package=`package`,e.Doorbell=`doorbell`,e.Sensor=`sensor`,e}({}),gse=`animal.dog_cat.dog.cat.horse.sheep.cow.elephant.bear.zebra.giraffe.mouse.rabbit.deer.lion.tiger.bird.eagle.owl.pigeon.fish.whale.dolphin.snake.turtle.lizard`.split(`.`),_se=[`person`,`people`,`pedestrian`,`rider`,`driver`,`cyclist`,`skier`,`skateboarder`,`face`,`hand`,`head`,`body`],vse=[`vehicle`,`car`,`truck`,`bus`,`motorcycle`,`bicycle`,`van`,`ambulance`,`police_car`,`fire_truck`,`train`,`subway`,`tram`,`airplane`,`boat`,`ship`,`helicopter`],yse=`face.eyes.nose.mouth.ears.eyebrows.left_eye.right_eye.pupil.iris.eyelid.eye_corner.upper_lip.lower_lip.teeth.chin.cheek.forehead.jaw.glasses.sunglasses.facial_hair.beard.mustache.facial_landmark.facial_keypoint`.split(`.`),bse=[`plate`,`license_plate`,`front_plate`,`rear_plate`,`motorcycle_plate`,`temporary_plate`,`dealer_plate`,`licensePlate`,`plate_number`,`plate_character`,`plate_digit`,`plate_letter`,`plate_symbol`,`plate_region`,`plate_country_identifier`,`plate_frame`,`plate_bolt`,`plate_sticker`,`plate_validation_tag`,`damaged_plate`,`obscured_plate`,`dirty_plate`],xse=[`motion`,`movement`,`other`],Sse=[`package`,`packet`],Cse=[`audio`],wse=`speech.scream.babbling.yell.bellow.whoop.whispering.laughter.snicker.crying.cry.sigh.singing.choir.chant.mantra.child_singing.rapping.humming.groan.grunt.whistling.breathing.wheeze.snoring.gasp.pant.snort.cough.throat_clearing.sneeze.sniff.cheering.applause.chatter.crowd.children_playing.bark.yip.howl.bow-wow.growling.whimper_dog.purr.meow.hiss.caterwaul.pets.livestock.doorbell.ding-dong.door.slam.knock.alarm.telephone.music.dog.dogs`.split(`.`),Tse=[`doorbell`,`ring`],Ese=[`lock`,`binary`,`flood`,`entry`,`door`,`leak`,`door_open`,`flooded`,`entry_open`];({...gse.reduce((e,t)=>({...e,[t]:`animal`}),{}),..._se.reduce((e,t)=>({...e,[t]:`person`}),{}),...vse.reduce((e,t)=>({...e,[t]:`vehicle`}),{}),...xse.reduce((e,t)=>({...e,[t]:`motion`}),{}),...Sse.reduce((e,t)=>({...e,[t]:`package`}),{}),...yse.reduce((e,t)=>({...e,[t]:`face`}),{}),...bse.reduce((e,t)=>({...e,[t]:`plate`}),{}),...Cse.reduce((e,t)=>({...e,[t]:`audio`}),{}),...wse.reduce((e,t)=>({...e,[t]:`audio`}),{}),...Tse.reduce((e,t)=>({...e,[t]:`doorbell`}),{}),...Ese.reduce((e,t)=>({...e,[t]:`sensor`}),{})}),[...Object.values(hse).filter(e=>e!==`motion`)];var Dse=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},i8=class{constructor(e){this.generateIdentifier=e,this.kv=new Dse}register(e,t){this.kv.getByValue(e)||(t||=this.generateIdentifier(e),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}},Ose=class extends i8{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t==`object`?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function kse(e){if(`values`in Object)return Object.values(e);let t=[];for(let n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function Ase(e,t){let n=kse(e);if(`find`in n)return n.find(t);let r=n;for(let e=0;e<r.length;e++){let n=r[e];if(t(n))return n}}function a8(e,t){Object.entries(e).forEach(([e,n])=>t(n,e))}function o8(e,t){return e.indexOf(t)!==-1}function s8(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(t(r))return r}}var jse=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return Ase(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},Mse=e=>Object.prototype.toString.call(e).slice(8,-1),c8=e=>e===void 0,Nse=e=>e===null,l8=e=>typeof e!=`object`||!e||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,u8=e=>l8(e)&&Object.keys(e).length===0,d8=e=>Array.isArray(e),Pse=e=>typeof e==`string`,Fse=e=>typeof e==`number`&&!isNaN(e),Ise=e=>typeof e==`boolean`,Lse=e=>e instanceof RegExp,f8=e=>e instanceof Map,p8=e=>e instanceof Set,m8=e=>Mse(e)===`Symbol`,Rse=e=>e instanceof Date&&!isNaN(e.valueOf()),h8=e=>e instanceof Error,g8=e=>typeof e==`number`&&isNaN(e),zse=e=>Ise(e)||Nse(e)||c8(e)||Fse(e)||Pse(e)||m8(e),Bse=e=>typeof e==`bigint`,Vse=e=>e===1/0||e===-1/0,Hse=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Use=e=>e instanceof URL,_8=e=>e.replace(/\\/g,`\\\\`).replace(/\./g,`\\.`),v8=e=>e.map(String).map(_8).join(`.`),y8=(e,t)=>{let n=[],r=``;for(let i=0;i<e.length;i++){let a=e.charAt(i);if(!t&&a===`\\`){let t=e.charAt(i+1);if(t===`\\`){r+=`\\`,i++;continue}else if(t!==`.`)throw Error(`invalid path`)}if(a===`\\`&&e.charAt(i+1)===`.`){r+=`.`,i++;continue}if(a===`.`){n.push(r),r=``;continue}r+=a}let i=r;return n.push(i),n};function b8(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var x8=[b8(c8,`undefined`,()=>null,()=>void 0),b8(Bse,`bigint`,e=>e.toString(),e=>typeof BigInt<`u`?BigInt(e):(console.error(`Please add a BigInt polyfill.`),e)),b8(Rse,`Date`,e=>e.toISOString(),e=>new Date(e)),b8(h8,`Error`,(e,t)=>{let n={name:e.name,message:e.message};return`cause`in e&&(n.cause=e.cause),t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n},(e,t)=>{let n=Error(e.message,{cause:e.cause});return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n}),b8(Lse,`regexp`,e=>``+e,e=>{let t=e.slice(1,e.lastIndexOf(`/`)),n=e.slice(e.lastIndexOf(`/`)+1);return new RegExp(t,n)}),b8(p8,`set`,e=>[...e.values()],e=>new Set(e)),b8(f8,`map`,e=>[...e.entries()],e=>new Map(e)),b8(e=>g8(e)||Vse(e),`number`,e=>g8(e)?`NaN`:e>0?`Infinity`:`-Infinity`,Number),b8(e=>e===0&&1/e==-1/0,`number`,()=>`-0`,Number),b8(Use,`URL`,e=>e.toString(),e=>new URL(e))];function S8(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var C8=S8((e,t)=>m8(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>[`symbol`,t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{let r=n.symbolRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown symbol`);return r}),Wse=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),w8=S8(Hse,e=>[`typed-array`,e.constructor.name],e=>[...e],(e,t)=>{let n=Wse[t[1]];if(!n)throw Error(`Trying to deserialize unknown typed array`);return new n(e)});function T8(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var E8=S8(T8,(e,t)=>[`class`,t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{let n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};let r={};return n.forEach(t=>{r[t]=e[t]}),r},(e,t,n)=>{let r=n.classRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),D8=S8((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>[`custom`,t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{let r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw Error(`Trying to deserialize unknown custom value`);return r.deserialize(e)}),Gse=[E8,C8,D8,w8],O8=(e,t)=>{let n=s8(Gse,n=>n.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};let r=s8(x8,n=>n.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},k8={};x8.forEach(e=>{k8[e.annotation]=e});var Kse=(e,t,n)=>{if(d8(t))switch(t[0]){case`symbol`:return C8.untransform(e,t,n);case`class`:return E8.untransform(e,t,n);case`custom`:return D8.untransform(e,t,n);case`typed-array`:return w8.untransform(e,t,n);default:throw Error(`Unknown transformation: `+t)}else{let r=k8[t];if(!r)throw Error(`Unknown transformation: `+t);return r.untransform(e,n)}},A8=(e,t)=>{if(t>e.size)throw Error(`index out of bounds`);let n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function j8(e){if(o8(e,`__proto__`))throw Error(`__proto__ is not allowed as a property`);if(o8(e,`prototype`))throw Error(`prototype is not allowed as a property`);if(o8(e,`constructor`))throw Error(`constructor is not allowed as a property`)}var qse=(e,t)=>{j8(t);for(let n=0;n<t.length;n++){let r=t[n];if(p8(e))e=A8(e,+r);else if(f8(e)){let i=+r,a=+t[++n]==0?`key`:`value`,o=A8(e,i);switch(a){case`key`:e=o;break;case`value`:e=e.get(o);break}}else e=e[r]}return e},M8=(e,t,n)=>{if(j8(t),t.length===0)return n(e);let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(d8(r)){let e=+n;r=r[e]}else if(l8(r))r=r[n];else if(p8(r)){let e=+n;r=A8(r,e)}else if(f8(r)){if(e===t.length-2)break;let i=+n,a=+t[++e]==0?`key`:`value`,o=A8(r,i);switch(a){case`key`:r=o;break;case`value`:r=r.get(o);break}}}let i=t[t.length-1];if(d8(r)?r[+i]=n(r[+i]):l8(r)&&(r[i]=n(r[i])),p8(r)){let e=A8(r,+i),t=n(e);e!==t&&(r.delete(e),r.add(t))}if(f8(r)){let e=+t[t.length-2],a=A8(r,e);switch(+i==0?`key`:`value`){case`key`:{let e=n(a);r.set(e,r.get(a)),e!==a&&r.delete(a);break}case`value`:r.set(a,n(r.get(a)));break}}return e},N8=e=>e<1;function P8(e,t,n,r=[]){if(!e)return;let i=N8(n);if(!d8(e)){a8(e,(e,a)=>P8(e,t,n,[...r,...y8(a,i)]));return}let[a,o]=e;o&&a8(o,(e,a)=>{P8(e,t,n,[...r,...y8(a,i)])}),t(a,r)}function Jse(e,t,n,r){return P8(t,(t,n)=>{e=M8(e,n,e=>Kse(e,t,r))},n),e}function Yse(e,t,n){let r=N8(n);function i(t,n){let i=qse(e,y8(n,r));t.map(e=>y8(e,r)).forEach(t=>{e=M8(e,t,()=>i)})}if(d8(t)){let[n,a]=t;n.forEach(t=>{e=M8(e,y8(t,r),()=>e)}),a&&a8(a,i)}else a8(t,i);return e}var Xse=(e,t)=>l8(e)||d8(e)||f8(e)||p8(e)||h8(e)||T8(e,t);function Zse(e,t,n){let r=n.get(e);r?r.push(t):n.set(e,[t])}function Qse(e,t){let n={},r;return e.forEach(e=>{if(e.length<=1)return;t||(e=e.map(e=>e.map(String)).sort((e,t)=>e.length-t.length));let[i,...a]=e;i.length===0?r=a.map(v8):n[v8(i)]=a.map(v8)}),r?u8(n)?[r]:[r,n]:u8(n)?void 0:n}var F8=(e,t,n,r,i=[],a=[],o=new Map)=>{let s=zse(e);if(!s){Zse(e,i,t);let n=o.get(e);if(n)return r?{transformedValue:null}:n}if(!Xse(e,n)){let t=O8(e,n),r=t?{transformedValue:t.value,annotations:[t.type]}:{transformedValue:e};return s||o.set(e,r),r}if(o8(a,e))return{transformedValue:null};let c=O8(e,n),l=c?.value??e,u=d8(l)?[]:{},d={};a8(l,(s,c)=>{if(c===`__proto__`||c===`constructor`||c===`prototype`)throw Error(`Detected property ${c}. This is a prototype pollution risk, please remove it from your object.`);let l=F8(s,t,n,r,[...i,c],[...a,e],o);u[c]=l.transformedValue,d8(l.annotations)?d[_8(c)]=l.annotations:l8(l.annotations)&&a8(l.annotations,(e,t)=>{d[_8(c)+`.`+t]=e})});let f=u8(d)?{transformedValue:u,annotations:c?[c.type]:void 0}:{transformedValue:u,annotations:c?[c.type,d]:d};return s||o.set(e,f),f};function I8(e){return Object.prototype.toString.call(e).slice(8,-1)}function L8(e){return I8(e)===`Array`}function $se(e){if(I8(e)!==`Object`)return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function ece(e,t,n,r,i){let a={}.propertyIsEnumerable.call(r,t)?`enumerable`:`nonenumerable`;a===`enumerable`&&(e[t]=n),i&&a===`nonenumerable`&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function R8(e,t={}){if(L8(e))return e.map(e=>R8(e,t));if(!$se(e))return e;let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((n,r)=>{if(r===`__proto__`||L8(t.props)&&!t.props.includes(r))return n;let i=e[r];return ece(n,r,R8(i,t),e,t.nonenumerable),n},{})}var z8=class{constructor({dedupe:e=!1}={}){this.classRegistry=new Ose,this.symbolRegistry=new i8(e=>e.description??``),this.customTransformerRegistry=new jse,this.allowedErrorProps=[],this.dedupe=e}serialize(e){let t=new Map,n=F8(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});let i=Qse(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r.meta&&(r.meta.v=1),r}deserialize(e,t){let{json:n,meta:r}=e,i=t?.inPlace?n:R8(n);return r?.values&&(i=Jse(i,r.values,r.v??0,this)),r?.referentialEqualities&&(i=Yse(i,r.referentialEqualities,r.v??0)),i}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e),{inPlace:!0})}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};z8.defaultInstance=new z8,z8.serialize=z8.defaultInstance.serialize.bind(z8.defaultInstance),z8.deserialize=z8.defaultInstance.deserialize.bind(z8.defaultInstance),z8.stringify=z8.defaultInstance.stringify.bind(z8.defaultInstance),z8.parse=z8.defaultInstance.parse.bind(z8.defaultInstance),z8.registerClass=z8.defaultInstance.registerClass.bind(z8.defaultInstance),z8.registerSymbol=z8.defaultInstance.registerSymbol.bind(z8.defaultInstance),z8.registerCustom=z8.defaultInstance.registerCustom.bind(z8.defaultInstance),z8.allowErrorProps=z8.defaultInstance.allowErrorProps.bind(z8.defaultInstance),z8.serialize,z8.deserialize,z8.stringify,z8.parse,z8.registerClass,z8.registerCustom,z8.registerSymbol,z8.allowErrorProps,(0,s.createContext)(null),(0,s.createContext)(null),c.AddonStarted,c.AddonInstalled,c.AddonRestarted,c.AddonUpdated,c.AddonStopped,c.AddonUninstalled,c.AddonCrashed,c.AddonError,c.DetectionPhaseTransition,c.DetectionResult,c.DetectionEvent,c.DetectionCameraNative,c.ProviderMotion,c.MotionOnMotionChanged,c.MotionAnalysis,c.MotionZonesRaw,c.ProviderDetection,c.PipelineAudioInferenceResult,c.AgentOnline,c.AgentOffline,c.DeviceRegistered,c.DeviceUnregistered,c.DeviceStateChanged,c.EventEmitted;var tce=Object.freeze([...d()]),nce=Object.freeze([c.PipelineCameraMetricsSnapshot,c.PipelineRunnerLoadSnapshot,c.PipelineEngineMetricsSnapshot,c.PipelineInferenceResult,c.PipelineTrace,c.PipelineProgress,c.StreamBrokerMetricsSnapshot,c.MetricsNodeResourcesSnapshot,c.MetricsNodeProcessesSnapshot,c.ClusterTopologySnapshot,c.MotionAnalysis,c.MotionZonesRaw,c.DetectionResult,c.PipelineAudioInferenceResult,c.PlatformProbePhase,c.BenchmarkProgress,c.ModelDownloadProgress,c.ProviderMotion]),rce=new Set(nce);Object.freeze(tce.filter(e=>!rce.has(e))),Object.freeze([...new Set(Lz.filter(e=>e.scope===`device`).map(e=>e.name))].toSorted());function B8({value:e,unit:n,onDelta:r}){let i=t();return(0,K.jsxs)(`div`,{className:`flex h-8 w-full overflow-hidden rounded-lg border border-border bg-surface`,children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":i(`uiLibrary.deviceControlAtoms.decrement`,`Decrement`),className:`w-9 shrink-0 bg-surface-hover text-base text-foreground`,onClick:()=>r(-1),children:`−`}),(0,K.jsxs)(`span`,{className:`flex flex-1 items-center justify-center gap-0.5 border-x border-border/60 text-sm`,children:[e,n?(0,K.jsx)(`span`,{"data-unit":!0,className:`text-[11px] text-foreground-subtle`,children:n}):null]}),(0,K.jsx)(`button`,{type:`button`,"aria-label":i(`uiLibrary.deviceControlAtoms.increment`,`Increment`),className:`w-9 shrink-0 bg-surface-hover text-base text-foreground`,onClick:()=>r(1),children:`+`})]})}function ice({on:e,targetLabel:t,onConfirm:n}){let r=(0,s.useRef)(null),i=(0,s.useRef)(!1);return(0,K.jsxs)(`div`,{className:Z(`relative h-12 w-full rounded-full border flex items-center`,e?`bg-emerald-50 border-emerald-200 pl-4`:`bg-amber-50 border-amber-200 justify-end pr-4`),children:[(0,K.jsx)(`span`,{className:`text-xs font-semibold opacity-60`,children:t}),(0,K.jsx)(`span`,{"data-testid":`slide-thumb`,className:`absolute top-1 left-1 h-10 w-14 rounded-[19px] bg-surface shadow flex items-center justify-center`,onPointerDown:e=>{e.currentTarget.setPointerCapture?.(e.pointerId),r.current=e.clientX,i.current=!1},onPointerMove:e=>{r.current!==null&&Math.abs(e.clientX-r.current)>40&&(i.current=!0)},onPointerUp:()=>{i.current&&n(),i.current=!1,r.current=null},onPointerCancel:()=>{i.current=!1,r.current=null}})]})}var ace=2,V8=270,oce=315;function sce(e){let t=(e-135+360)%360;return t>V8?+(t<=oce):t/V8}function H8({fraction:e,color:t,knobTopPx:n,onDragFraction:r}){let i=-135+e*270,a=(0,s.useRef)(null),[o,c]=(0,s.useState)(!1),l=r!==void 0,u=n??ace,d=e=>{r!==void 0&&(e.preventDefault(),e.stopPropagation(),e.currentTarget.setPointerCapture?.(e.pointerId),c(!0))},f=e=>{if(r===void 0||!o)return;let t=a.current;if(t===null)return;let n=t.getBoundingClientRect(),i=n.left+n.width/2,s=n.top+n.height/2;r(sce(Math.atan2(e.clientY-s,e.clientX-i)*180/Math.PI))},p=e=>{r!==void 0&&(e.currentTarget.releasePointerCapture?.(e.pointerId),c(!1))};return(0,K.jsx)(`div`,{ref:a,className:`absolute inset-0`,style:{transform:`rotate(${i}deg)`},children:(0,K.jsx)(`div`,{className:Z(`absolute left-1/2 h-5 w-5 -translate-x-1/2 rounded-full bg-white shadow`,l&&(o?`cursor-grabbing`:`cursor-grab`)),style:{top:u,border:`3px solid ${t}`},...l?{onPointerDown:d,onPointerMove:f,onPointerUp:p,onPointerCancel:p}:{}})})}function U8({fraction:e,color:t}){return(0,K.jsxs)(`div`,{className:`relative h-2 w-full rounded-full bg-border`,children:[(0,K.jsx)(`div`,{className:`absolute left-0 top-0 h-2 rounded-full`,style:{width:`${e*100}%`,background:t??`var(--color-primary)`}}),(0,K.jsx)(`div`,{className:`absolute -top-1 h-4 w-4 rounded-full bg-white shadow`,style:{left:`calc(${e*100}% - 8px)`}})]})}var W8=150,G8=64,cce=W8/2,K8=2*Math.PI*G8,q8=270/360*K8;function J8({fraction:e,color:t,children:n,onDragFraction:r}){let i=Math.min(1,Math.max(0,e)),a=W8/2,o=W8/2,s=K8-q8,c=i*q8;return(0,K.jsxs)(`div`,{className:`relative`,style:{width:W8,height:W8},children:[(0,K.jsxs)(`svg`,{width:W8,height:W8,viewBox:`0 0 ${W8} ${W8}`,"aria-hidden":`true`,className:`absolute inset-0`,style:{transform:`rotate(135deg)`},children:[(0,K.jsx)(`circle`,{cx:a,cy:o,r:G8,fill:`none`,stroke:`var(--color-border)`,strokeWidth:11,strokeDasharray:`${q8} ${s}`,strokeLinecap:`round`}),(0,K.jsx)(`circle`,{cx:a,cy:o,r:G8,fill:`none`,stroke:t,strokeWidth:11,strokeDasharray:`${c} ${K8-c}`,strokeLinecap:`round`})]}),(0,K.jsx)(`div`,{"data-testid":`arc-knob`,children:(0,K.jsx)(H8,{fraction:i,color:t,knobTopPx:cce-G8-10,...r===void 0?{}:{onDragFraction:r}})}),(0,K.jsx)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-0.5 pointer-events-none`,children:n})]})}function Y8({on:e,busy:n,onToggle:r}){let i=t(),a={transform:e?`translateX(30px)`:`translateX(3px)`};return(0,K.jsx)(`button`,{type:`button`,"aria-pressed":e,title:e?i(`uiLibrary.tapToggle.turnOff`,`Turn off`):i(`uiLibrary.tapToggle.turnOn`,`Turn on`),disabled:n,onClick:e=>{e.stopPropagation(),r()},className:Z(`relative inline-flex h-8 w-16 items-center rounded-full border transition-colors flex-shrink-0`,e?`bg-success/30 border-success/50`:`bg-surface-hover border-border`,n&&`opacity-60 cursor-not-allowed`),children:(0,K.jsx)(`span`,{className:Z(`absolute h-6 w-6 rounded-full transition-all`,e?`bg-success`:`bg-foreground-subtle`),style:a})})}function lce({trpc:e,deviceId:n}){let r=t(),i=L3(e,n),a=i===null?void 0:i.button;if(a===void 0)return null;let o=()=>{a.press({deviceId:n})};return(0,K.jsxs)(`button`,{type:`button`,"aria-label":r(`uiLibrary.buttonControl.press`,`Press`),title:r(`uiLibrary.buttonControl.press`,`Press`),onClick:e=>{e.stopPropagation(),o()},className:Z(`inline-flex h-5 items-center gap-1 rounded px-1.5 text-xs`,`bg-primary text-primary-foreground hover:bg-primary/90 transition-colors`),children:[(0,K.jsx)(ZV,{className:`h-3 w-3`}),(0,K.jsx)(`span`,{children:r(`uiLibrary.buttonControl.press`,`Press`)})]})}function uce({trpc:e,deviceId:n}){let r=t(),i=L3(e,n),a=i===null?void 0:i.button;return a===void 0?null:(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-4 rounded-lg border border-border bg-surface p-6`,children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":r(`uiLibrary.buttonControl.pressButton`,`Press button`),onClick:()=>{a.press({deviceId:n})},className:Z(`inline-flex h-14 w-14 items-center justify-center rounded-full`,`bg-primary text-primary-foreground hover:bg-primary/90 transition-colors`,`shadow-md`),children:(0,K.jsx)(ZV,{className:`h-6 w-6`})}),(0,K.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:r(`uiLibrary.buttonControl.press`,`Press`)})]})}var dce=4e3;function X8(e){if(e!==void 0)return typeof e==`object`&&e&&`lastChangedAt`in e&&typeof e.lastChangedAt==`number`?e.lastChangedAt:e}function Z8(e,t){let n=t?.enabled!==!1,r=t?.timeoutMs??dce,[i,a]=(0,s.useState)(void 0),o=(0,s.useRef)(void 0),c=(0,s.useRef)(void 0),l=(0,s.useRef)(!1),u=(0,s.useRef)(void 0),d=(0,s.useCallback)(()=>{u.current!==void 0&&(clearTimeout(u.current),u.current=void 0),o.current=void 0,l.current=!1,c.current=void 0,a(void 0)},[]);(0,s.useEffect)(()=>{if(!n||!l.current)return;let t=X8(e),r=c.current;t!==void 0&&t!==r&&d()}),(0,s.useEffect)(()=>()=>{u.current!==void 0&&clearTimeout(u.current)},[]);let f=(0,s.useCallback)(t=>{if(!n)return;u.current!==void 0&&(clearTimeout(u.current),u.current=void 0);let i=o.current??e;if(i!==void 0){let e={...i,...t};o.current=e,a(e)}c.current=X8(e),l.current=!0,u.current=setTimeout(d,r)},[n,e,d,r]);return n?{display:i===void 0?e:i,applyOptimistic:f,rollback:d}:{display:e,applyOptimistic:()=>{},rollback:()=>{}}}function fce(e){return e instanceof Error?e.message:String(e)}function pce({trpc:e,deviceId:n,layout:r,optimistic:i,features:a}){let o=t(),{cap:c,slice:l,available:u}=z3({trpc:e,deviceId:n,cap:e=>e.lockControl,slice:e=>e.state.lockControl}),{display:d,applyOptimistic:f}=Z8(l,{enabled:i??!0}),[p,m]=(0,s.useState)(null),[h,g]=(0,s.useState)(!1),[_,v]=(0,s.useState)(null);if(d===void 0)return null;let y=d.state===`locked`||d.state===`locking`,b=!u||d.state===`jammed`,ee=a?.includes(Sc.LockOpen)===!0,te=r===`compact`,ne=()=>{f({state:`locking`}),c?.lock({})},x=()=>{f({state:`unlocking`}),c?.unlock({})},S=()=>{c?.open({})},re=()=>{if(!b){if(!y){ne();return}if(te){v(null),m(`unlock`);return}x()}},ie=()=>{if(!b){if(te){v(null),m(`open`);return}S()}},ae=()=>{h||m(null)},oe=async()=>{if(!(h||p===null)){v(null),g(!0);try{p===`unlock`?(f({state:`unlocking`}),await c?.unlock({})):await c?.open({}),m(null)}catch(e){v(fce(e))}finally{g(!1)}}},se=y?o(`uiLibrary.lockPanel.unlock`,`Unlock`):o(`uiLibrary.lockPanel.lock`,`Lock`),ce=p===`open`?o(`uiLibrary.lockPanel.openDoorTitle`,`Open door?`):o(`uiLibrary.lockPanel.unlockTitle`,`Unlock device?`),le=p===`open`?o(`uiLibrary.lockPanel.openDoorBody`,`This will release the latch and open the door.`):o(`uiLibrary.lockPanel.unlockBody`,`This will unlock the device.`),ue=p===`open`?o(`uiLibrary.lockPanel.confirmOpen`,`Confirm open`):o(`uiLibrary.lockPanel.confirmUnlock`,`Confirm unlock`),de=p===`open`?(0,K.jsx)(vV,{className:`h-4 w-4 text-amber-400`}):(0,K.jsx)(VV,{className:`h-4 w-4 text-amber-400`});return(0,K.jsxs)(`div`,{className:Z(`inline-flex items-center`,r===`full`?`gap-2`:`gap-1`),children:[(0,K.jsxs)(`button`,{type:`button`,"aria-label":se,title:d.state===`jammed`?o(`uiLibrary.lockPanel.jammed`,`Jammed`):se,disabled:b,onClick:e=>{e.stopPropagation(),re()},className:Z(`inline-flex items-center justify-center rounded transition-colors`,r===`full`?`h-7 gap-1.5 px-2 text-xs`:`h-5 w-5`,y?`text-success`:`text-warning`,b&&`opacity-40 cursor-not-allowed`,`hover:bg-surface-hover`),children:[y?(0,K.jsx)(HV,{className:`h-3.5 w-3.5`}):(0,K.jsx)(VV,{className:`h-3.5 w-3.5`}),r===`full`&&(0,K.jsx)(`span`,{children:d.state})]}),ee&&(0,K.jsxs)(`button`,{type:`button`,"aria-label":o(`uiLibrary.lockPanel.openDoor`,`Open door`),title:o(`uiLibrary.lockPanel.openDoor`,`Open door`),disabled:b,onClick:e=>{e.stopPropagation(),ie()},className:Z(`inline-flex items-center justify-center rounded transition-colors`,r===`full`?`h-7 gap-1.5 px-2 text-xs`:`h-5 w-5`,`text-foreground-muted`,b&&`opacity-40 cursor-not-allowed`,`hover:bg-surface-hover`),children:[(0,K.jsx)(vV,{className:`h-3.5 w-3.5`}),r===`full`&&(0,K.jsx)(`span`,{children:o(`uiLibrary.lockPanel.open`,`Open`)})]}),te&&(0,K.jsx)(U3,{open:p!==null,onOpenChange:e=>{e||ae()},children:(0,K.jsxs)(W3,{width:`sm`,onClick:e=>e.stopPropagation(),children:[(0,K.jsxs)(G3,{children:[(0,K.jsxs)(q3,{className:`flex items-center gap-2`,children:[de,ce]}),(0,K.jsx)(J3,{children:le})]}),_!==null&&(0,K.jsx)(`div`,{className:`mt-2 px-3 py-2 rounded border border-danger/40 bg-danger/10 text-xs text-danger`,children:_}),(0,K.jsxs)(K3,{children:[(0,K.jsx)(WJ,{type:`button`,variant:`ghost`,size:`sm`,disabled:h,onClick:()=>ae(),children:o(`uiLibrary.lockPanel.cancel`,`Cancel`)}),(0,K.jsxs)(WJ,{type:`button`,variant:`danger`,size:`sm`,"aria-label":ue,disabled:h,onClick:()=>{oe()},children:[h&&(0,K.jsx)(BV,{className:`h-3.5 w-3.5 animate-spin`}),ue]})]})]})})]})}function Q8({trpc:e,deviceId:n,optimistic:r}){let i=t(),{cap:a,slice:o,available:c}=z3({trpc:e,deviceId:n,cap:e=>e.switch,slice:e=>e.state.switch}),{display:l,applyOptimistic:u}=Z8(o,{enabled:r??!0}),[d,f]=(0,s.useState)(!1);if(l===void 0)return null;let p=l.on===!0,m=d||!c,h={transform:p?`translateX(14px)`:`translateX(2px)`},g=async()=>{if(m||!a)return;let e=!p;u({on:e}),f(!0);try{await a.setState({on:e})}finally{f(!1)}};return(0,K.jsx)(`button`,{type:`button`,"aria-pressed":p,title:p?i(`uiLibrary.switchPanel.turnOff`,`Turn off`):i(`uiLibrary.switchPanel.turnOn`,`Turn on`),disabled:m,onClick:e=>{e.stopPropagation(),g()},className:Z(`relative inline-flex h-4 w-7 items-center rounded-full border transition-colors flex-shrink-0`,p?`bg-success/30 border-success/50`:`bg-surface-hover border-border`,m&&`opacity-60`),children:(0,K.jsx)(`span`,{className:Z(`absolute h-3 w-3 rounded-full transition-all`,p?`bg-success`:`bg-foreground-subtle`),style:h})})}function mce({trpc:e,deviceId:n,layout:r,optimistic:i}){let a=t(),{cap:o,slice:s,available:c}=z3({trpc:e,deviceId:n,cap:e=>e.brightness,slice:e=>e.state.brightness}),{display:l,applyOptimistic:u}=Z8(s,{enabled:i??!0});if(l===void 0)return null;let d=!c;return(0,K.jsxs)(`label`,{className:Z(`flex items-center gap-2 text-xs text-foreground-subtle`,r===`compact`&&`min-w-[140px]`),children:[(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.brightnessPanel.brightness`,`Brightness`),type:`range`,min:0,max:100,step:1,value:l.level,disabled:d,onChange:e=>{let t=Number(e.target.value);u({level:t}),d||o?.setBrightness({level:t})}}),(0,K.jsxs)(`span`,{className:`tabular-nums w-8 text-right`,children:[l.level,`%`]})]})}function hce({trpc:e,deviceId:n,features:r,layout:i,optimistic:a}){let o=t(),{cap:s,slice:c,available:l}=z3({trpc:e,deviceId:n,cap:e=>e.fanControl,slice:e=>e.state.fanControl}),{display:u,applyOptimistic:d}=Z8(c,{enabled:a??!0});if(u===void 0)return null;let f=!l,p=r??[],m=p.includes(`fan-speed`),h=p.includes(`fan-preset`),g=c?.percentageStep!=null&&c.percentageStep>0?c.percentageStep:1;return(0,K.jsxs)(`div`,{className:Z(`inline-flex items-center gap-2`,i===`full`&&`flex-col items-stretch`),children:[m&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`input`,{"aria-label":o(`uiLibrary.fanPanel.speed`,`Fan speed`),type:`range`,min:0,max:100,step:g,value:u.speed??0,disabled:f,onChange:e=>{let t=Number(e.target.value),n=Math.min(100,Math.max(0,Math.round(t/g)*g));d({speed:n}),f||s?.setPercentage({speed:n})}}),(0,K.jsxs)(`span`,{className:`tabular-nums w-8 text-right`,children:[u.speed??`—`,`%`]})]}),h&&u.availablePresets.length>0&&(0,K.jsx)(`div`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:(0,K.jsxs)(`select`,{"aria-label":o(`uiLibrary.fanPanel.preset`,`Fan preset`),value:u.preset,disabled:f,onChange:e=>{let t=e.target.value;!f&&t&&(d({preset:t}),s?.setPreset({preset:t}))},className:`bg-surface border border-border rounded px-1 py-0.5`,children:[(0,K.jsx)(`option`,{value:``,disabled:!0,children:`—`}),u.availablePresets.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))]})})]})}function $8(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:1}var gce=2,e5=3;function t5(e){if(!Number.isFinite(e))return 0;for(let t=0;t<e5;t+=1)if(Math.abs(e*10**t-Math.round(e*10**t))<1e-9)return t;return e5}function _ce(e){let t=$8(e.tempStep),n=[e.minTemp,e.maxTemp].filter(e=>typeof e==`number`&&Number.isFinite(e)),r=n.length===0?gce:Math.max(...n.map(e=>String(Math.trunc(Math.abs(e))).length)),i=+!!n.some(e=>e<0),a=Math.max(t5(t),...n.map(t5));return i+r+(a>0?1+a:0)}var vce={1:`min-w-[1ch]`,2:`min-w-[2ch]`,3:`min-w-[3ch]`,4:`min-w-[4ch]`,5:`min-w-[5ch]`,6:`min-w-[6ch]`,7:`min-w-[7ch]`,8:`min-w-[8ch]`};function n5(e){return`${vce[Math.min(Math.max(_ce(e),1),8)]} text-center`}function r5(e,t,n){let r=e+t*$8(n.tempStep),i=n.minTemp,a=n.maxTemp;return typeof i==`number`&&Number.isFinite(i)&&(r=Math.max(r,i)),typeof a==`number`&&Number.isFinite(a)&&(r=Math.min(r,a)),r}var i5={heat:`border-amber-400 bg-amber-50 dark:bg-amber-950`,cool:`border-blue-400 bg-blue-50 dark:bg-blue-950`,auto:`border-purple-400 bg-purple-50 dark:bg-purple-950`,heat_cool:`border-fuchsia-400 bg-fuchsia-50 dark:bg-fuchsia-950`,fan_only:`border-slate-400 bg-slate-50 dark:bg-slate-950`,dry:`border-cyan-400 bg-cyan-50 dark:bg-cyan-950`,off:`border-zinc-300 bg-zinc-50 dark:bg-zinc-900`},a5={heat:`text-amber-600 dark:text-amber-400`,cool:`text-blue-600 dark:text-blue-400`,auto:`text-purple-600 dark:text-purple-400`,heat_cool:`text-fuchsia-600 dark:text-fuchsia-400`,fan_only:`text-slate-600 dark:text-slate-400`,dry:`text-cyan-600 dark:text-cyan-400`,off:`text-foreground`},yce={heat:`bg-amber-400 text-amber-950`,cool:`bg-blue-400 text-blue-950`,auto:`bg-purple-400 text-purple-950`,heat_cool:`bg-fuchsia-400 text-fuchsia-950`,fan_only:`bg-slate-400 text-slate-950`,dry:`bg-cyan-400 text-cyan-950`,off:`bg-zinc-300 text-zinc-700`};function bce({trpc:e,deviceId:n,features:r,layout:i,optimistic:a}){let o=t(),{cap:s,slice:c,available:l}=z3({trpc:e,deviceId:n,cap:e=>e.climateControl,slice:e=>e.state.climateControl}),{display:u,applyOptimistic:d}=Z8(c,{enabled:a??!0});if(s===void 0||u===void 0)return null;let f=!l;if(i===`compact`)return(0,K.jsxs)(`div`,{"data-mode":u.mode,className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(`span`,{className:Z(`text-xs tabular-nums font-medium`,a5[u.mode]),children:u.target===null?u.currentTemp===null?null:(0,K.jsxs)(`span`,{className:`text-foreground-subtle`,children:[u.currentTemp,`°`]}):(0,K.jsxs)(K.Fragment,{children:[u.target,`°`,u.currentTemp!==null&&(0,K.jsxs)(`span`,{className:`text-foreground-subtle font-normal`,children:[` `,`(`,u.currentTemp,`°)`]})]})}),u.target!==null&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":o(`uiLibrary.climatePanel.decreaseTarget`,`Decrease target`),disabled:f,onClick:e=>{if(e.stopPropagation(),!f&&u.target!==null){let e=r5(u.target,-1,u);d({target:e}),s.setTarget({target:e})}},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors text-xs`,f&&`opacity-40 cursor-not-allowed`),children:`−`}),(0,K.jsx)(`button`,{type:`button`,"aria-label":o(`uiLibrary.climatePanel.increaseTarget`,`Increase target`),disabled:f,onClick:e=>{if(e.stopPropagation(),!f&&u.target!==null){let e=r5(u.target,1,u);d({target:e}),s.setTarget({target:e})}},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors text-xs`,f&&`opacity-40 cursor-not-allowed`),children:`+`})]}),(0,K.jsx)(`select`,{"aria-label":o(`uiLibrary.climatePanel.mode`,`Mode`),value:u.mode,disabled:f,onChange:e=>{e.stopPropagation();let t=e.target.value;f||(d({mode:t}),s.setMode({mode:t}))},className:Z(`bg-transparent px-0.5 text-xs text-foreground-subtle hover:text-foreground cursor-pointer`,f&&`opacity-40 cursor-not-allowed`),children:u.availableModes.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))})]});let p=u.mode===`heat_cool`||u.targetLow!==null&&u.targetHigh!==null,m=!p&&u.target!==null;return(0,K.jsxs)(`div`,{"data-mode":u.mode,className:Z(`inline-flex items-center gap-2 rounded border px-2 py-1 transition-colors`,i5[u.mode],`flex-col items-stretch gap-3`),children:[(0,K.jsxs)(`div`,{className:`inline-flex items-center gap-1 text-xs tabular-nums`,children:[u.currentTemp!==null&&(0,K.jsxs)(`span`,{className:`text-foreground-subtle`,children:[u.currentTemp,`°`]}),m&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`text-foreground-subtle`,children:`→`}),(0,K.jsxs)(`span`,{className:`font-medium`,children:[u.target,`°`]}),(0,K.jsx)(`button`,{type:`button`,"aria-label":o(`uiLibrary.climatePanel.decreaseTarget`,`Decrease target`),disabled:f,onClick:e=>{if(e.stopPropagation(),!f&&u.target!==null){let e=r5(u.target,-1,u);d({target:e}),s.setTarget({target:e})}},className:Z(`inline-flex h-4 w-4 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,f&&`opacity-40 cursor-not-allowed`),children:`−`}),(0,K.jsx)(`button`,{type:`button`,"aria-label":o(`uiLibrary.climatePanel.increaseTarget`,`Increase target`),disabled:f,onClick:e=>{if(e.stopPropagation(),!f&&u.target!==null){let e=r5(u.target,1,u);d({target:e}),s.setTarget({target:e})}},className:Z(`inline-flex h-4 w-4 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,f&&`opacity-40 cursor-not-allowed`),children:`+`})]})]}),(0,K.jsx)(`div`,{className:`inline-flex items-center gap-0.5 rounded bg-surface-subtle p-0.5`,children:u.availableModes.map(e=>(0,K.jsx)(`button`,{type:`button`,"aria-label":e,disabled:f,onClick:t=>{t.stopPropagation(),f||(d({mode:e}),s.setMode({mode:e}))},className:Z(`rounded px-1.5 py-0.5 text-xs transition-colors`,e===u.mode?yce[e]:`text-foreground-subtle hover:text-foreground hover:bg-surface-hover`,f&&`opacity-40 cursor-not-allowed`),children:e},e))}),p&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsxs)(`label`,{className:`flex items-center gap-1`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.climatePanel.low`,`Low`)}),(0,K.jsx)(`input`,{"aria-label":o(`uiLibrary.climatePanel.targetLow`,`Target low`),type:`number`,step:.5,value:u.targetLow??``,disabled:f,onChange:e=>{if(!f){let t=Number(e.target.value),n=u.targetHigh??t;d({targetLow:t}),s.setTargetRange({targetLow:t,targetHigh:n})}},className:`w-14 rounded border border-border bg-surface px-1 py-0.5 tabular-nums`})]}),(0,K.jsxs)(`label`,{className:`flex items-center gap-1`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.climatePanel.high`,`High`)}),(0,K.jsx)(`input`,{"aria-label":o(`uiLibrary.climatePanel.targetHigh`,`Target high`),type:`number`,step:.5,value:u.targetHigh??``,disabled:f,onChange:e=>{if(!f){let t=Number(e.target.value),n=u.targetLow??t;d({targetHigh:t}),s.setTargetRange({targetLow:n,targetHigh:t})}},className:`w-14 rounded border border-border bg-surface px-1 py-0.5 tabular-nums`})]})]}),u.availableFanModes.length>0&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.climatePanel.fan`,`Fan`)}),(0,K.jsxs)(`select`,{"aria-label":o(`uiLibrary.climatePanel.fanMode`,`Fan mode`),value:u.fanMode,disabled:f,onChange:e=>{let t=e.target.value;!f&&t&&(d({fanMode:t}),s.setFanMode({fanMode:t}))},className:`rounded border border-border bg-surface px-1 py-0.5`,children:[(0,K.jsx)(`option`,{value:``,disabled:!0,children:`—`}),u.availableFanModes.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))]})]}),u.availablePresets.length>0&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.climatePanel.preset`,`Preset`)}),(0,K.jsxs)(`select`,{"aria-label":o(`uiLibrary.climatePanel.preset`,`Preset`),value:u.preset,disabled:f,onChange:e=>{let t=e.target.value;!f&&t&&(d({preset:t}),s.setPreset({preset:t}))},className:`rounded border border-border bg-surface px-1 py-0.5`,children:[(0,K.jsx)(`option`,{value:``,disabled:!0,children:`—`}),u.availablePresets.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))]})]}),u.targetHumidity!==null&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.climatePanel.humidity`,`Humidity`)}),(0,K.jsx)(`input`,{"aria-label":o(`uiLibrary.climatePanel.targetHumidity`,`Target humidity`),type:`range`,min:0,max:100,step:1,value:u.targetHumidity,disabled:f,onChange:e=>{let t=Number(e.target.value);d({targetHumidity:t}),f||s.setTargetHumidity({targetHumidity:t})}}),(0,K.jsxs)(`span`,{className:`tabular-nums w-8 text-right`,children:[u.targetHumidity,`%`]})]})]})}var xce={playing:`border-green-400 bg-green-50 dark:bg-green-950`,paused:`border-amber-400 bg-amber-50 dark:bg-amber-950`,buffering:`border-blue-400 bg-blue-50 dark:bg-blue-950`,on:`border-slate-400 bg-slate-50 dark:bg-slate-950`,idle:`border-slate-400 bg-slate-50 dark:bg-slate-950`,off:`border-zinc-300 bg-zinc-50 dark:bg-zinc-900`,standby:`border-zinc-300 bg-zinc-50 dark:bg-zinc-900`},Sce={playing:`bg-green-500`,paused:`bg-amber-400`,buffering:`bg-blue-400`,on:`bg-slate-400`,idle:`bg-slate-400`,off:`bg-zinc-300`,standby:`bg-zinc-300`},o5=[`off`,`all`,`one`];function Cce(e){return o5.includes(e)}function wce(e,t){switch(t){case`off`:return e(`uiLibrary.mediaPlayerPanel.repeatOff`,`Off`);case`all`:return e(`uiLibrary.mediaPlayerPanel.repeatAll`,`All`);case`one`:return e(`uiLibrary.mediaPlayerPanel.repeatOne`,`One`)}}function Tce(e){return e===`playing`||e===`buffering`?`pause`:`play`}function Ece({trpc:e,deviceId:n,features:r,layout:i,optimistic:a}){let o=t(),{cap:s,slice:c,available:l}=z3({trpc:e,deviceId:n,cap:e=>e.mediaPlayer,slice:e=>e.state.mediaPlayer}),{display:u,applyOptimistic:d}=Z8(c,{enabled:a??!0});if(u===void 0)return null;let f=!l,p=Tce(u.state);return(0,K.jsxs)(`div`,{"data-state":u.state,className:Z(`inline-flex items-center gap-2 rounded border px-2 py-1 transition-colors`,xce[u.state],i===`full`&&`flex-col items-stretch gap-3`),children:[(0,K.jsxs)(`div`,{className:`inline-flex items-center gap-2`,children:[(0,K.jsx)(`span`,{role:`status`,"aria-label":u.state,className:Z(`inline-block h-2 w-2 rounded-full flex-shrink-0`,Sce[u.state])}),(0,K.jsx)(`button`,{type:`button`,"aria-label":p===`play`?o(`uiLibrary.mediaPlayerPanel.play`,`Play`):o(`uiLibrary.mediaPlayerPanel.pause`,`Pause`),disabled:f,onClick:e=>{e.stopPropagation(),!f&&(p===`play`?(d({state:`playing`}),s?.play({})):(d({state:`paused`}),s?.pause({})))},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors text-xs`,f&&`opacity-40 cursor-not-allowed`),children:p===`play`?`▶`:`⏸`})]}),i===`full`&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":o(`uiLibrary.mediaPlayerPanel.previous`,`Previous`),disabled:f,onClick:e=>{e.stopPropagation(),f||s?.previous({})},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors text-xs`,f&&`opacity-40 cursor-not-allowed`),children:`⏮`}),(0,K.jsx)(`button`,{type:`button`,"aria-label":o(`uiLibrary.mediaPlayerPanel.next`,`Next`),disabled:f,onClick:e=>{e.stopPropagation(),f||s?.next({})},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors text-xs`,f&&`opacity-40 cursor-not-allowed`),children:`⏭`})]}),u.volumeLevel!==null&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.mediaPlayerPanel.vol`,`Vol`)}),(0,K.jsx)(`input`,{"aria-label":o(`uiLibrary.mediaPlayerPanel.volume`,`Volume`),type:`range`,min:0,max:100,step:1,value:u.volumeLevel,disabled:f,onChange:e=>{let t=Number(e.target.value);d({volumeLevel:t}),f||s?.setVolume({volumeLevel:t})}}),(0,K.jsxs)(`span`,{className:`tabular-nums w-8 text-right`,children:[u.volumeLevel,`%`]})]}),u.isMuted!==null&&(0,K.jsx)(`button`,{type:`button`,"aria-label":u.isMuted?o(`uiLibrary.mediaPlayerPanel.unmute`,`Unmute`):o(`uiLibrary.mediaPlayerPanel.mute`,`Mute`),disabled:f,onClick:e=>{if(e.stopPropagation(),!f&&u.isMuted!==null){let e=!u.isMuted;d({isMuted:e}),s?.setMute({muted:e})}},className:Z(`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs transition-colors`,u.isMuted?`bg-amber-400 text-amber-950`:`text-foreground-subtle hover:text-foreground hover:bg-surface-hover`,f&&`opacity-40 cursor-not-allowed`),children:u.isMuted?`🔇`:`🔊`}),u.availableSources.length>0&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.mediaPlayerPanel.source`,`Source`)}),(0,K.jsxs)(`select`,{"aria-label":o(`uiLibrary.mediaPlayerPanel.source`,`Source`),value:u.source,disabled:f,onChange:e=>{let t=e.target.value;!f&&t&&(d({source:t}),s?.selectSource({source:t}))},className:`rounded border border-border bg-surface px-1 py-0.5`,children:[(0,K.jsx)(`option`,{value:``,disabled:!0,children:`—`}),u.availableSources.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))]})]}),u.shuffle!==null&&(0,K.jsxs)(`button`,{type:`button`,"aria-label":o(`uiLibrary.mediaPlayerPanel.shuffle`,`Shuffle`),disabled:f,onClick:e=>{if(e.stopPropagation(),!f&&u.shuffle!==null){let e=!u.shuffle;d({shuffle:e}),s?.setShuffle({shuffle:e})}},className:Z(`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs transition-colors`,u.shuffle?`bg-green-400 text-green-950`:`text-foreground-subtle hover:text-foreground hover:bg-surface-hover`,f&&`opacity-40 cursor-not-allowed`),children:[`⇌ `,o(`uiLibrary.mediaPlayerPanel.shuffle`,`Shuffle`)]}),u.repeat!==null&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.mediaPlayerPanel.repeat`,`Repeat`)}),(0,K.jsx)(`select`,{"aria-label":o(`uiLibrary.mediaPlayerPanel.repeat`,`Repeat`),value:u.repeat,disabled:f,onChange:e=>{let t=e.target.value;!f&&Cce(t)&&(d({repeat:t}),s?.setRepeat({repeat:t}))},className:`rounded border border-border bg-surface px-1 py-0.5`,children:o5.map(e=>(0,K.jsx)(`option`,{value:e,children:wce(o,e)},e))})]})]})]})}function s5(e,t){return t===void 0?Number.isInteger(e)?String(e):e.toFixed(1):e.toFixed(t)}function Dce(e){if(e!==void 0)return B_(e)??e}function Oce(e){if(e.quantity!==void 0){if(e.quantity===`device`){let t=e.deviceQuantity;return t===void 0||t===`device`?void 0:t}return e.quantity}}function c5(e){let t=e.capName===void 0?void 0:e.display?.perCap?.[e.capName],n=t?.precision??e.display?.precision??e.roleDefault?.precision??e.declarationPrecision,r=Oce(e),i=e.preference??`metric`,a=r===void 0?void 0:Ms(r),o=r===void 0?void 0:Ps(r,i),s=Dce(t?.unit??e.display?.unit??e.roleDefault?.unit),c=s!==void 0&&a!==void 0&&s!==a&&rz(a,s),l=c?s:o??``,u=r===`duration`||r===`information`||r===`duration-ms`,d=e=>u||a===void 0||l.length===0||l===a?e:nz(e,a,l)??e;return{unit:l,precision:n,toDisplayValue:d,fromDisplayValue:e=>u||a===void 0||l.length===0||l===a?e:nz(e,l,a)??e,format:e=>{if(r!==void 0&&!c){let t=AB({value:e,quantity:r,preference:i,precision:n});return{text:t.text,unit:t.unit}}return{text:s5(d(e),n),unit:l}}}}var kce=/^(\d{4})-(\d{2})-(\d{2})/,Ace=/^(\d{2}):(\d{2})(?::(\d{2}))?$/;function jce(e,t){let n=kce.exec(e);if(n===null)return e;let r=Number(n[1]),i=Number(n[2]),a=Number(n[3]),o=new Date(r,i-1,a);if(Number.isNaN(o.getTime()))return e;try{return o.toLocaleDateString(t)}catch{return e}}function Mce(e,t){let n=Ace.exec(e);if(n===null)return e;let r=new Date(1970,0,1,Number(n[1]),Number(n[2]),n[3]===void 0?0:Number(n[3]));if(Number.isNaN(r.getTime()))return e;try{return r.toLocaleTimeString(t,{hour:`2-digit`,minute:`2-digit`})}catch{return e}}function Nce(e,t){let n=e.includes(`T`)?e:e.replace(` `,`T`),r=new Date(n);if(Number.isNaN(r.getTime()))return e;try{return r.toLocaleString(t,{dateStyle:`medium`,timeStyle:`short`})}catch{return e}}function l5(e,t,n){return e===``?e:t===`date`?jce(e,n):t===`time`?Mce(e,n):Nce(e,n)}function Pce(e){return e.slice(0,10)}function Fce(e){return e.slice(0,5)}function Ice(e,t){return e===`date`?{type:`date`,value:Pce(t)}:e===`time`?{type:`time`,value:Fce(t)}:{type:`datetime-local`,value:Lce(t)}}function Lce(e){return(e.includes(`T`)?e:e.replace(` `,`T`)).slice(0,16)}function Rce({value:e,busy:n,onCommit:r,unit:i,min:a,max:o,step:c,precision:l}){let u=t(),[d,f]=(0,s.useState)(s5(e,l)),p=Number(d),m=d!==``&&!Number.isNaN(p),h=c??1,g=e=>{let t=e;return a!==void 0&&(t=Math.max(a,t)),o!==void 0&&(t=Math.min(o,t)),t},_=()=>{!n&&m&&r(g(p))};return(0,K.jsxs)(`div`,{className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":u(`uiLibrary.controlPanel.decrement`,`Decrement`),disabled:n,onClick:t=>{if(t.stopPropagation(),!n){let t=g(e-h);f(s5(t,l)),r(t)}},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded border border-border bg-surface text-xs transition-colors hover:bg-surface-hover`,n&&`opacity-40 cursor-not-allowed`),children:`−`}),(0,K.jsx)(`input`,{"aria-label":u(`uiLibrary.controlPanel.numeric`,`Numeric value`),type:`number`,disabled:n,value:d,onChange:e=>{f(e.target.value);let t=Number(e.target.value);e.target.value!==``&&!Number.isNaN(t)&&(n||r(g(t)))},onBlur:_,onKeyDown:e=>{e.key===`Enter`&&_()},className:Z(`w-16 rounded border border-border bg-surface px-1 py-0.5 text-xs tabular-nums text-center`,n&&`opacity-40 cursor-not-allowed`)}),i!==void 0&&(0,K.jsx)(`span`,{className:`text-foreground-subtle text-xs`,children:i}),(0,K.jsx)(`button`,{type:`button`,"aria-label":u(`uiLibrary.controlPanel.increment`,`Increment`),disabled:n,onClick:t=>{if(t.stopPropagation(),!n){let t=g(e+h);f(s5(t,l)),r(t)}},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded border border-border bg-surface text-xs transition-colors hover:bg-surface-hover`,n&&`opacity-40 cursor-not-allowed`),children:`+`})]})}function zce({value:e,busy:t,onCommit:n}){let[r,i]=(0,s.useState)(e);return(0,K.jsx)(`input`,{type:`text`,disabled:t,value:r,onChange:e=>i(e.target.value),onBlur:()=>{t||n(r)},onKeyDown:e=>{e.key===`Enter`&&!t&&n(r)},className:Z(`rounded border border-border bg-surface px-2 py-0.5 text-xs`,t&&`opacity-40 cursor-not-allowed`)})}function Bce({slice:e,busy:n,setValueFn:r,layout:i,quantity:a,display:o,dateTimeShape:s}){let c=t();switch(e.kind){case`numeric`:{let t=typeof e.value==`number`?e.value:Number(e.value),i=a===void 0?void 0:c5({quantity:a,display:o,capName:`control`}),s=i?.toDisplayValue??(e=>e),c=i?.fromDisplayValue??(e=>e),l=i!==void 0&&i.unit.length>0?i.unit:void 0;return(0,K.jsx)(Rce,{value:s(t),busy:n,onCommit:e=>{r({control:{kind:`numeric`,value:c(e)}})},unit:l,min:e.min===void 0?void 0:s(e.min),max:e.max===void 0?void 0:s(e.max),step:e.step===void 0?void 0:s(e.step),precision:i?.precision})}case`select`:{let t=String(e.value);return(0,K.jsx)(`select`,{"aria-label":c(`uiLibrary.controlPanel.value`,`Control value`),disabled:n,value:t,onChange:e=>{e.stopPropagation(),n||r({control:{kind:`select`,value:e.target.value}})},className:Z(`w-full max-w-full min-w-0 truncate rounded bg-transparent px-0.5 py-0.5 text-xs`,n&&`opacity-40 cursor-not-allowed`),children:e.options.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))})}case`text`:return(0,K.jsx)(zce,{value:String(e.value),busy:n,onCommit:e=>{r({control:{kind:`text`,value:e}})}});case`datetime`:{let t=String(e.value),a=s??`datetime`;if(i===`compact`)return t===``?(0,K.jsx)(`span`,{"aria-label":c(`uiLibrary.controlPanel.value`,`Control value`),className:`text-xs text-foreground-subtle`,children:`—`}):(0,K.jsx)(`span`,{"aria-label":c(`uiLibrary.controlPanel.value`,`Control value`),className:`text-xs text-foreground`,children:l5(t,a)});let o=Ice(a,t),l=o.type,u=o.value;return(0,K.jsx)(`input`,{type:l,"aria-label":c(`uiLibrary.controlPanel.value`,`Control value`),disabled:n,value:u,onChange:e=>{e.stopPropagation(),n||r({control:{kind:`datetime`,value:e.target.value}})},className:Z(`rounded border border-border bg-surface px-1 py-0.5 text-xs`,n&&`opacity-40 cursor-not-allowed`)})}default:return null}}function u5({trpc:e,deviceId:t,features:n,layout:r,optimistic:i}){let a=kK()?.getDeviceInfo(t)??null,{cap:o,slice:s,available:c}=z3({trpc:e,deviceId:t,cap:e=>e.control,slice:e=>e.state.control}),{display:l,applyOptimistic:u}=Z8(s,{enabled:i??!0});if(l===void 0)return null;let d=!c,f=a?.sourceInfo?.quantity,p=As(f)&&f!==`device`&&f!==`none`?f:void 0;return(0,K.jsx)(`div`,{"data-kind":l.kind,className:`inline-flex min-w-0 max-w-full items-center gap-1 rounded border border-border px-2 py-1 transition-colors`,children:(0,K.jsx)(Bce,{slice:l,busy:d,setValueFn:e=>{!d&&o&&(u({value:e.control.value}),o.setValue(e))},layout:r,quantity:p,display:a?.display,dateTimeShape:a?.sourceInfo?.dateTimeShape})})}var d5={kind:`binary`,field:`on`,onLabel:`Low`,offLabel:`Normal`,getSliceHandle:e=>e.binary};function f5(e){return e===`battery-sensor`}function p5(e,t){if(!h5(e))return!1;let n=e[t];if(typeof n!=`number`)return!1;let r=e.lastFetchedAt;return!(n===0&&r===0)}var m5={"temperature-sensor":{kind:`numeric`,field:`temperature`,quantity:`temperature`,getSliceHandle:e=>e.temperatureSensor},"humidity-sensor":{kind:`numeric`,field:`humidity`,quantity:`humidity`,getSliceHandle:e=>e.humiditySensor},"ambient-light-sensor":{kind:`numeric`,field:`illuminance`,quantity:`illuminance`,getSliceHandle:e=>e.ambientLightSensor},"pressure-sensor":{kind:`numeric`,field:`pressure`,quantity:`pressure`,getSliceHandle:e=>e.pressureSensor},"numeric-sensor":{kind:`numeric`,field:`value`,quantity:`device`,getSliceHandle:e=>e.numericSensor},"wind-sensor":{kind:`numeric`,field:`value`,quantity:`device`,getSliceHandle:e=>e.numericSensor},"rain-sensor":{kind:`numeric`,field:`value`,quantity:`device`,getSliceHandle:e=>e.numericSensor},"uv-sensor":{kind:`numeric`,field:`value`,quantity:`device`,getSliceHandle:e=>e.numericSensor},"solar-radiation-sensor":{kind:`numeric`,field:`value`,quantity:`device`,getSliceHandle:e=>e.numericSensor},"soil-moisture-sensor":{kind:`numeric`,field:`value`,quantity:`device`,getSliceHandle:e=>e.numericSensor},"power-sensor":{kind:`numeric`,field:`power`,quantity:`power`,getSliceHandle:e=>e.powerMeter},"energy-sensor":{kind:`numeric`,field:`energy`,quantity:`energy`,getSliceHandle:e=>e.powerMeter},"voltage-sensor":{kind:`numeric`,field:`voltage`,quantity:`voltage`,getSliceHandle:e=>e.powerMeter},"current-sensor":{kind:`numeric`,field:`current`,quantity:`current`,getSliceHandle:e=>e.powerMeter},"battery-sensor":{kind:`numeric`,field:`value`,quantity:`percentage`,getSliceHandle:e=>e.numericSensor},"generic-sensor":{kind:`numeric`,field:`value`,quantity:`device`,getSliceHandle:e=>e.numericSensor},"motion-sensor":{kind:`binary`,field:`detected`,onLabel:`Detected`,offLabel:`Clear`,getSliceHandle:e=>e.motion},"pir-sensor":{kind:`binary`,field:`detected`,onLabel:`Detected`,offLabel:`Clear`,getSliceHandle:e=>e.motion},"contact-sensor":{kind:`binary`,field:`entryOpen`,onLabel:`Open`,offLabel:`Closed`,getSliceHandle:e=>e.contact},"smoke-sensor":{kind:`binary`,field:`detected`,onLabel:`Smoke!`,offLabel:`Clear`,getSliceHandle:e=>e.smoke},"leak-sensor":{kind:`binary`,field:`flooded`,onLabel:`Leak!`,offLabel:`Dry`,getSliceHandle:e=>e.flood},"co-sensor":{kind:`binary`,field:`detected`,onLabel:`CO!`,offLabel:`Clear`,getSliceHandle:e=>e.carbonMonoxide},"binary-sensor":{kind:`binary`,field:`on`,onLabel:`On`,offLabel:`Off`,getSliceHandle:e=>e.binary},presence:{kind:`presence`,getSliceHandle:e=>e.presence},"enum-sensor":{kind:`string`,getSliceHandle:e=>e.enumSensor},"datetime-sensor":{kind:`datetime`,format:`datetime`,getSliceHandle:e=>e.enumSensor}};function h5(e){return typeof e==`object`&&!!e}function Vce(e){return typeof e==`object`&&!!e}function Hce(e){return typeof e==`object`&&!!e&&`state`in e&&typeof e.state==`string`}function g5(e){return typeof e==`object`&&!!e&&`value`in e&&typeof e.value==`string`}function _5(e){if(typeof e!=`object`||!e)return;let t=e.format;if(t===`date`||t===`time`||t===`datetime`)return t}function Uce(e,t){return e===`home`?t(`uiLibrary.sensor.presence.home`,`Home`):e===`not_home`?t(`uiLibrary.sensor.presence.away`,`Away`):e.charAt(0).toUpperCase()+e.slice(1)}function Wce({trpc:e,device:n}){let r=t(),i=n.role==null?void 0:m5[n.role],a=f5(n.role),{data:o}=RJ({},{staleTime:6e4}),s=L3(e,n.id),c=R3(s!==null&&i!==void 0?i.getSliceHandle(s.state):void 0),l=R3(s!==null&&i?.kind===`numeric`?s.state.enumSensor:void 0),u=R3(s!==null&&a?s.state.binary:void 0),d=a&&i?.kind===`numeric`&&!p5(c,i.field)&&u!==void 0,f=d?d5:i,p=d?u:c;if(f===void 0||p===void 0)return null;if(f.kind===`numeric`){if(!h5(p))return null;let e=p[f.field];if(typeof e!=`number`)return null;let t=p.lastFetchedAt,r=e===0&&t===0;if(r&&g5(l)&&l.value!==``)return(0,K.jsx)(`span`,{className:Z(`inline-flex items-baseline text-xs text-foreground`),children:l.value});if(r)return null;let i=n.sourceInfo?.quantity,a=c5({display:n.display,capName:n.role===`numeric-sensor`?`numeric-sensor`:void 0,roleDefault:n.role==null?void 0:o?.defaults[n.role],quantity:f.quantity??`device`,deviceQuantity:i===`device`?void 0:i}).format(e),s=a.unit,c=a.text;return(0,K.jsxs)(`span`,{className:Z(`inline-flex items-baseline gap-0.5 tabular-nums text-xs text-foreground`),children:[(0,K.jsx)(`span`,{children:c}),s&&(0,K.jsx)(`span`,{className:`text-foreground-subtle`,children:s})]})}if(f.kind===`binary`){if(!Vce(p))return null;let e=!!p[f.field],t=e?f.onLabel:f.offLabel;return(0,K.jsx)(`span`,{className:Z(`inline-flex items-center rounded px-1.5 py-0.5 text-xs font-medium`,e?`bg-warning/15 text-warning`:`bg-surface-subtle text-foreground-subtle`),children:t})}if(f.kind===`string`)return!g5(p)||p.value===``?null:(0,K.jsx)(`span`,{className:Z(`inline-flex items-baseline text-xs text-foreground`),children:p.value});if(f.kind===`datetime`){if(!g5(p)||p.value===``)return null;let e=n.sourceInfo?.dateTimeShape??_5(p)??f.format,t=l5(p.value,e);return(0,K.jsx)(`span`,{className:Z(`inline-flex items-baseline text-xs text-foreground`),children:t})}if(!Hce(p))return null;let m=Uce(p.state,r);return(0,K.jsx)(`span`,{className:Z(`inline-flex items-center rounded px-1.5 py-0.5 text-xs font-medium`,p.state===`home`?`bg-success/15 text-success`:`bg-surface-subtle text-foreground-subtle`),children:m})}function v5(e){switch(e){case`opening`:return{up:`accent`,stop:`neutral`,down:`neutral`};case`closing`:return{up:`neutral`,stop:`neutral`,down:`accent`};case`open`:return{up:`filled`,stop:`neutral`,down:`neutral`};case`closed`:return{up:`neutral`,stop:`neutral`,down:`filled`};default:return{up:`neutral`,stop:`neutral`,down:`neutral`}}}function Gce(e){switch(e){case`accent`:return`bg-primary text-primary-foreground`;case`filled`:return`bg-primary/15 text-primary`;case`neutral`:return``}}function y5({label:e,busy:t,variant:n,onClick:r,children:i}){return(0,K.jsx)(`button`,{type:`button`,"aria-label":e,title:e,disabled:t,onClick:e=>{e.stopPropagation(),r()},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,Gce(n),t&&`opacity-40 cursor-not-allowed`),children:i})}function Kce({trpc:e,deviceId:n,optimistic:r}){let i=t(),{cap:a,slice:o,available:s}=z3({trpc:e,deviceId:n,cap:e=>e.cover,slice:e=>e.state.cover}),{display:c,applyOptimistic:l}=Z8(o,{enabled:r??!0});if(a===void 0)return null;let u=v5(c?.state),d=!s,f=(e,t)=>{d||!e||(t!==void 0&&l(t),e({}))};return(0,K.jsxs)(`div`,{className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(y5,{label:i(`uiLibrary.coverInline.open`,`Open`),busy:d,variant:u.up,onClick:()=>f(a?.open,{state:`opening`}),children:(0,K.jsx)(nV,{className:`h-3.5 w-3.5`})}),(0,K.jsx)(y5,{label:i(`uiLibrary.coverInline.stop`,`Stop`),busy:d,variant:u.stop,onClick:()=>f(a?.stop,{state:`stopped`}),children:(0,K.jsx)(jH,{className:`h-3 w-3`})}),(0,K.jsx)(y5,{label:i(`uiLibrary.coverInline.close`,`Close`),busy:d,variant:u.down,onClick:()=>f(a?.close,{state:`closing`}),children:(0,K.jsx)($B,{className:`h-3.5 w-3.5`})}),c!==void 0&&c.position!==null&&(0,K.jsxs)(`span`,{className:`tabular-nums text-xs text-foreground-subtle ml-1`,children:[c.position,`%`]})]})}function b5({label:e,busy:t,variant:n,onClick:r,children:i}){return(0,K.jsx)(`button`,{type:`button`,"aria-label":e,title:e,disabled:t,onClick:e=>{e.stopPropagation(),r()},className:Z(`inline-flex h-10 w-10 items-center justify-center rounded-md text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,n===`accent`&&`bg-primary text-primary-foreground hover:bg-primary/90`,n===`filled`&&`bg-primary/15 text-primary`,t&&`opacity-40 cursor-not-allowed`),children:i})}function x5(){return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-y-0 left-1/2 w-px -translate-x-px bg-white/60`}),(0,K.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-x-0 top-1/2 h-px -translate-y-px bg-white/60`})]})}function qce({position:e,interactive:n,onSetPosition:r}){let i=t(),a=(1-e/100)*100,o=(0,s.useRef)(null),c=(0,s.useRef)(!1),l=(0,s.useRef)(null),u=t=>{let n=o.current;if(n===null)return e;let r=n.getBoundingClientRect();if(r.height<=0)return e;let i=(t-r.top)/r.height,a=Math.round(100-i*100);return Math.min(100,Math.max(0,a))},d=e=>{if(r===void 0)return;let t=u(e);l.current!==t&&(l.current=t,r(t))},f=e=>{n&&(e.stopPropagation(),e.preventDefault(),c.current=!0,l.current=null,e.currentTarget.setPointerCapture(e.pointerId),d(e.clientY))},p=e=>{!n||!c.current||(e.stopPropagation(),d(e.clientY))},m=e=>{!n||!c.current||(e.stopPropagation(),c.current=!1,l.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))};return(0,K.jsxs)(`div`,{ref:o,"data-testid":`cover-window`,...n?{"aria-label":i(`uiLibrary.coverHeroCard.dragToSet`,`Drag to set position`),role:`slider`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e}:{"aria-hidden":`true`},onPointerDown:n?f:void 0,onPointerMove:n?p:void 0,onPointerUp:n?m:void 0,onPointerCancel:n?m:void 0,className:Z(`relative w-28 h-36 rounded border-2 border-amber-700/60 bg-gradient-to-b from-sky-200 to-sky-50 overflow-hidden flex-shrink-0`,n&&`cursor-ns-resize touch-none select-none`),style:{boxShadow:`inset 0 0 0 2px rgba(255,255,255,.5)`},children:[(0,K.jsx)(x5,{}),(0,K.jsx)(`div`,{className:`absolute inset-x-0 top-0 transition-all duration-200`,style:{height:`${a}%`,background:`repeating-linear-gradient(#c9cdd2, #c9cdd2 6px, #b7bcc2 6px, #b7bcc2 8px)`,borderBottom:a>0?`1px solid #9aa`:`none`}}),(0,K.jsxs)(`div`,{"data-testid":`cover-lever`,className:Z(`absolute inset-x-0 h-4 flex items-center justify-center gap-1 z-10 transition-all duration-200`,n&&`cursor-grab active:cursor-grabbing`),style:{top:`calc(${a}% - 8px)`},children:[(0,K.jsx)(`div`,{className:`absolute -inset-x-1.5 h-full rounded-lg bg-slate-600 shadow-md`}),(0,K.jsx)(`span`,{className:`h-1 w-1 rounded-full bg-white/70 relative z-10`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{className:`h-1 w-1 rounded-full bg-white/70 relative z-10`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{className:`h-1 w-1 rounded-full bg-white/70 relative z-10`,"aria-hidden":`true`}),(0,K.jsxs)(`span`,{"data-testid":`cover-position-pct`,className:`absolute left-full ml-2 text-xs font-semibold text-foreground tabular-nums whitespace-nowrap`,children:[e,`%`]})]})]})}function Jce({isOpen:e}){return(0,K.jsxs)(`div`,{"data-testid":`cover-window`,"aria-hidden":`true`,className:`relative w-28 h-36 rounded border-2 border-amber-700/60 bg-gradient-to-b from-sky-200 to-sky-50 overflow-hidden flex-shrink-0`,style:{boxShadow:`inset 0 0 0 2px rgba(255,255,255,.5)`},children:[(0,K.jsx)(x5,{}),!e&&(0,K.jsx)(`div`,{className:`absolute inset-0`,style:{background:`repeating-linear-gradient(#c9cdd2, #c9cdd2 6px, #b7bcc2 6px, #b7bcc2 8px)`}})]})}function Yce({trpc:e,deviceId:n,features:r,optimistic:i}){let a=t(),{cap:o,slice:s,available:c}=z3({trpc:e,deviceId:n,cap:e=>e.cover,slice:e=>e.state.cover}),{display:l,applyOptimistic:u}=Z8(s,{enabled:i??!0});if(o===void 0)return null;let d=!c,f=(r??[]).includes(Sc.CoverPositionable),p=(r??[]).includes(Sc.CoverTilt),m=v5(l?.state),h=l?.position??null,g=h!==null,_=l?.state===`open`||l?.state===`opening`,v=(e,t)=>{d||!e||(t!==void 0&&u(t),e({}))},y=e=>{d||(u({position:e}),o?.setPosition({position:e}))};return(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-6`,children:[g?(0,K.jsx)(qce,{position:h,interactive:f,onSetPosition:f?y:void 0}):(0,K.jsx)(Jce,{isOpen:_}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-3 flex-1`,children:[g&&(0,K.jsxs)(`div`,{className:`flex items-baseline gap-1`,children:[(0,K.jsx)(`span`,{className:`text-3xl font-semibold tabular-nums text-foreground`,children:h}),(0,K.jsx)(`span`,{className:`text-base text-foreground-subtle`,children:`%`}),(0,K.jsx)(`span`,{className:`text-xs text-foreground-subtle ml-1`,children:a(`uiLibrary.coverHeroCard.openWord`,`open`)})]}),!g&&(0,K.jsx)(`div`,{className:`flex items-baseline gap-1`,children:(0,K.jsx)(`span`,{className:`text-3xl font-semibold capitalize text-foreground`,children:l?.state??`—`})}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(b5,{label:a(`uiLibrary.coverHeroCard.open`,`Open`),busy:d,variant:m.up,onClick:()=>v(o?.open,{state:`opening`}),children:(0,K.jsx)(nV,{className:`h-5 w-5`})}),(0,K.jsx)(b5,{label:a(`uiLibrary.coverHeroCard.stop`,`Stop`),busy:d,variant:m.stop,onClick:()=>v(o?.stop,{state:`stopped`}),children:(0,K.jsx)(jH,{className:`h-4 w-4`})}),(0,K.jsx)(b5,{label:a(`uiLibrary.coverHeroCard.close`,`Close`),busy:d,variant:m.down,onClick:()=>v(o?.close,{state:`closing`}),children:(0,K.jsx)($B,{className:`h-5 w-5`})})]})]})]}),f&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{className:`w-12 shrink-0`,children:a(`uiLibrary.coverHeroCard.position`,`Position`)}),(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.coverHeroCard.position`,`Position`),type:`range`,min:0,max:100,step:1,value:h??0,disabled:d,className:`flex-1`,onChange:e=>{y(Number(e.target.value))}}),(0,K.jsxs)(`span`,{className:`w-8 text-right tabular-nums`,children:[h??`—`,`%`]})]}),!f&&h!==null&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{className:`w-12 shrink-0`,children:a(`uiLibrary.coverHeroCard.position`,`Position`)}),(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.coverHeroCard.position`,`Position`),type:`range`,min:0,max:100,step:1,value:h,disabled:!0,readOnly:!0,className:`flex-1 opacity-60`}),(0,K.jsxs)(`span`,{className:`w-8 text-right tabular-nums`,children:[h,`%`]})]}),p&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{className:`w-12 shrink-0`,children:a(`uiLibrary.coverHeroCard.tilt`,`Tilt`)}),(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.coverHeroCard.tiltPosition`,`Tilt position`),type:`range`,min:0,max:100,step:1,value:l?.tiltPosition??0,disabled:d,className:`flex-1`,onChange:e=>{let t=Number(e.target.value);u({tiltPosition:t}),d||o?.setTiltPosition({tiltPosition:t})}}),(0,K.jsxs)(`span`,{className:`w-8 text-right tabular-nums`,children:[l?.tiltPosition??`—`,`%`]})]})]})}function Xce(e){return(0,K.jsx)(`span`,{className:`text-foreground-subtle text-xs select-none`,"aria-hidden":`true`,children:`—`})}function Zce(e){return(0,K.jsx)(`div`,{className:`rounded border border-border bg-surface-subtle px-3 py-2 text-xs text-foreground-subtle`,children:t()(`uiLibrary.dummyHeroCard.comingSoon`,`Controls coming soon`)})}function Qce(e){return{id:e.id,stableId:e.stableId,addonId:e.addonId,type:e.type,name:e.name,online:e.online,disabled:e.disabled,parentDeviceId:e.parentDeviceId,role:e.role??void 0,features:e.features}}function $ce({trpc:e,deviceId:t}){let{data:n}=zJ({deviceId:t},{staleTime:6e4});return n===void 0?null:(0,K.jsx)(Wce,{trpc:e,device:Qce(n)})}var S5={"temperature-sensor":`temperature-sensor`,"humidity-sensor":`humidity-sensor`,"ambient-light-sensor":`ambient-light-sensor`,"pressure-sensor":`pressure-sensor`,"numeric-sensor":`numeric-sensor`,"wind-sensor":`numeric-sensor`,"rain-sensor":`numeric-sensor`,"uv-sensor":`numeric-sensor`,"solar-radiation-sensor":`numeric-sensor`,"soil-moisture-sensor":`numeric-sensor`,"power-sensor":`power-meter`,"energy-sensor":`power-meter`,"voltage-sensor":`power-meter`,"current-sensor":`power-meter`,"battery-sensor":`numeric-sensor`,"generic-sensor":`numeric-sensor`,"motion-sensor":`motion`,"pir-sensor":`motion`,"contact-sensor":`contact`,"smoke-sensor":`smoke`,"leak-sensor":`flood`,"co-sensor":`carbon-monoxide`,"binary-sensor":`binary`,presence:`presence`,"enum-sensor":`enum-sensor`,"datetime-sensor":`enum-sensor`};function C5(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function w5(e,t){if(!C5(t))return!1;if(e.kind===`presence`)return typeof t.state==`string`;if(e.kind===`string`||e.kind===`datetime`)return typeof t.value==`string`&&t.value!==``;let n=t[e.field];return e.kind===`numeric`?typeof n==`number`:typeof n==`boolean`}function T5(e,t){if(!(t===void 0||!C5(e)))return e[t]}function ele(e){let t=T5(e,`battery`);if(!(!C5(t)||typeof t.level!=`number`))return{...t,value:t.level}}function tle(e){let t=T5(e.snapshotCaps,e.capName);if(e.descriptor!==void 0&&w5(e.descriptor,t))return t;if(e.role===`battery-sensor`&&e.descriptor?.kind===`numeric`)return ele(e.snapshotCaps)}function nle(e){let t=e.descriptor;if(t!==void 0&&w5(t,e.live))return{kind:`value`,slice:e.live};let n=tle(e);return t!==void 0&&w5(t,n)?{kind:`value`,slice:n}:e.addonId===`composer`&&e.snapshotStatus===`success`?{kind:`quiet`}:{kind:`awaiting`}}function rle(e){return typeof e==`object`&&!!e}function E5(e){return typeof e==`object`&&!!e}function ile(e){return typeof e==`object`&&!!e&&`state`in e&&typeof e.state==`string`}function ale(e,t){return e===`home`?t(`uiLibrary.sensor.presence.home`,`Home`):e===`not_home`?t(`uiLibrary.sensor.presence.away`,`Away`):e.charAt(0).toUpperCase()+e.slice(1)}var ole={low:`bg-danger`,medium:`bg-warning`,high:`bg-success`};function sle(e){return e<=20?`low`:e<=50?`medium`:`high`}function cle({percent:e}){let t=Math.min(100,Math.max(0,e)),n=sle(t);return(0,K.jsx)(`div`,{"data-testid":`battery-bar`,"data-band":n,className:`h-2 w-24 overflow-hidden rounded-full bg-border`,children:(0,K.jsx)(`div`,{className:Z(`h-full rounded-full transition-all`,ole[n]),style:{width:`${t}%`}})})}function lle({trpc:e,device:n}){let r=t(),i=n.role==null?m5[`temperature-sensor`]:m5[n.role],a=f5(n.role),{data:o}=RJ({},{staleTime:6e4}),s=L3(e,n.id),c=R3(s!==null&&i!==void 0?i.getSliceHandle(s.state):void 0),l=R3(s!==null&&a?s.state.binary:void 0),u=R3(s!==null&&!a?s.state.binary:void 0),d=a&&i?.kind===`numeric`&&!p5(c,i.field)&&l!==void 0,f=d?d5:i,p=d?l:c,m=BJ({deviceId:n.id},{staleTime:5e3}),h=d?`binary`:n.role==null?S5[`temperature-sensor`]:S5[n.role],g=m.status===`success`||m.status===`error`?m.status:`pending`,_=nle({addonId:n.addonId,role:n.role,descriptor:f,capName:h,live:p,snapshotStatus:g,snapshotCaps:m.data});if(_.kind===`quiet`)return(0,K.jsx)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4 min-h-[96px]`,"data-testid":`sensor-hero-quiet`,children:(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`})});let v=_.kind===`value`?_.slice:void 0;if(f===void 0||v===void 0)return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4 min-h-[96px]`,children:[(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`}),(0,K.jsx)(`span`,{className:`text-xs text-foreground-subtle italic`,children:r(`uiLibrary.sensorHeroCard.awaiting`,`Awaiting state…`)})]});if(f.kind===`numeric`){if(!rle(v))return null;let e=v[f.field];if(typeof e!=`number`)return null;let t=n.sourceInfo?.quantity,i=c5({display:n.display,capName:n.role===`numeric-sensor`?`numeric-sensor`:void 0,roleDefault:n.role==null?o?.defaults?.[`temperature-sensor`]:o?.defaults?.[n.role],quantity:f.quantity??`device`,deviceQuantity:t===`device`?void 0:t}).format(e),s=i.unit,c=i.text,l=u!==void 0&&E5(u)&&typeof u.on==`boolean`?!!u.on:null;return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-baseline gap-1`,children:[(0,K.jsx)(`span`,{className:`text-3xl font-semibold tabular-nums text-foreground`,children:c}),s&&(0,K.jsx)(`span`,{className:`text-base text-foreground-subtle`,children:s})]}),a&&(0,K.jsx)(cle,{percent:e}),l!==null&&(0,K.jsx)(`span`,{className:Z(`inline-flex items-center rounded px-2 py-0.5 text-xs font-medium`,l?`bg-warning/15 text-warning`:`bg-surface-subtle text-foreground-subtle`),"data-testid":`sensor-hero-occupancy`,children:l?r(`uiLibrary.sensorHeroCard.occupied`,`Occupied`):r(`uiLibrary.sensorHeroCard.clear`,`Clear`)}),(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`})]})}if(f.kind===`binary`){if(!E5(v))return null;let e=!!v[f.field],t=e?f.onLabel:f.offLabel;return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsx)(`span`,{className:Z(`inline-flex items-center rounded px-3 py-1.5 text-lg font-semibold`,e?`bg-warning/15 text-warning`:`bg-surface-subtle text-foreground-subtle`),children:t}),(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`})]})}if(f.kind===`datetime`){if(!g5(v))return null;if(v.value===``)return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4 min-h-[96px]`,children:[(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`}),(0,K.jsx)(`span`,{className:`text-xs text-foreground-subtle italic`,children:r(`uiLibrary.sensorHeroCard.awaiting`,`Awaiting state…`)})]});let e=n.sourceInfo?.dateTimeShape??_5(v)??f.format;return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsx)(`span`,{className:`text-3xl font-semibold tabular-nums text-foreground`,children:l5(v.value,e)}),(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`})]})}if(f.kind===`string`)return!g5(v)||v.value===``?null:(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsx)(`span`,{className:`text-xl font-semibold text-foreground`,children:v.value}),(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`})]});if(!ile(v))return null;let y=ale(v.state,r);return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsx)(`span`,{className:Z(`inline-flex items-center rounded px-3 py-1.5 text-lg font-semibold`,v.state===`home`?`bg-success/15 text-success`:`bg-surface-subtle text-foreground-subtle`),children:y}),(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`})]})}function ule({trpc:e,deviceId:t}){let{data:n}=zJ({deviceId:t},{staleTime:6e4});return n===void 0?null:(0,K.jsx)(lle,{trpc:e,device:n})}function D5(e){return e===void 0||e.inProgress?!1:e.availableVersion!==null&&e.currentVersion!==null&&e.availableVersion!==e.currentVersion}function O5(e,t){return z3({trpc:e,deviceId:t,cap:e=>e.update,slice:e=>e.state.update})}function dle({trpc:e,deviceId:n}){let r=t(),{cap:i,slice:a}=O5(e,n);return i===void 0?null:a?.inProgress?(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-xs text-foreground-subtle`,children:[(0,K.jsx)(BV,{className:`h-3.5 w-3.5 animate-spin`}),r(`uiLibrary.updateControl.updating`,`Updating…`)]}):D5(a)?(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded bg-warning/15 px-1.5 py-0.5 text-[10px] font-medium text-warning`,children:[(0,K.jsx)(yV,{className:`h-3 w-3`}),r(`uiLibrary.updateControl.update`,`Update`)]}):(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[10px] text-foreground-subtle`,children:[(0,K.jsx)(QB,{className:`h-3 w-3 text-success`}),a?.currentVersion??r(`uiLibrary.updateControl.upToDate`,`Up to date`)]})}function fle({trpc:e,deviceId:n}){let r=t(),{cap:i,slice:a,available:o}=O5(e,n);if(i===void 0)return null;let s=a?.inProgress===!0,c=D5(a),l=a?.currentVersion??`—`,u=()=>{!o||i===void 0||!c||i.installUpdate({})};return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,children:[(0,K.jsx)(`span`,{className:`text-3xl font-semibold tabular-nums text-foreground`,children:l}),c&&a?.availableVersion!=null&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`text-base text-foreground-subtle`,children:`→`}),(0,K.jsx)(`span`,{className:`text-base font-medium text-warning tabular-nums`,children:a.availableVersion})]})]}),s?(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded px-3 py-1.5 text-sm font-medium text-foreground-subtle`,children:[(0,K.jsx)(BV,{className:`h-4 w-4 animate-spin`}),r(`uiLibrary.updateControl.installing`,`Installing…`)]}):c?(0,K.jsxs)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),u()},disabled:!o,className:`inline-flex items-center gap-1.5 rounded-lg bg-primary px-4 py-1.5 text-sm font-medium text-primary-foreground shadow-sm transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:[(0,K.jsx)(yV,{className:`h-4 w-4`}),r(`uiLibrary.updateControl.install`,`Install update`)]}):(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded bg-success/15 px-3 py-1 text-sm font-medium text-success`,children:[(0,K.jsx)(QB,{className:`h-4 w-4`}),r(`uiLibrary.updateControl.upToDate`,`Up to date`)]}),a?.state!=null&&a.state!==``&&(0,K.jsx)(`span`,{className:`text-[10px] text-foreground-subtle`,children:a.state})]})}function ple(e,t=i){switch(e){case`cleaning`:return{label:t(`uiLibrary.vacuum.cleaning`,`Cleaning`),tone:`text-primary`};case`paused`:return{label:t(`uiLibrary.vacuum.paused`,`Paused`),tone:`text-warning`};case`returning`:return{label:t(`uiLibrary.vacuum.returning`,`Returning`),tone:`text-primary`};case`docked`:return{label:t(`uiLibrary.vacuum.docked`,`Docked`),tone:`text-success`};case`drying`:return{label:t(`uiLibrary.vacuum.drying`,`Drying`),tone:`text-warning`};case`idle`:return{label:t(`uiLibrary.vacuum.idle`,`Idle`),tone:`text-foreground-subtle`};case`error`:return{label:t(`uiLibrary.vacuum.error`,`Error`),tone:`text-destructive`};case void 0:return{label:t(`uiLibrary.vacuum.unknown`,`Unknown`),tone:`text-foreground-subtle`}}}function k5(e,t){return z3({trpc:e,deviceId:t,cap:e=>e.vacuumControl,slice:e=>e.state.vacuumControl})}function A5({label:e,busy:t,active:n,onClick:r,children:i}){return(0,K.jsx)(`button`,{type:`button`,"aria-label":e,title:e,disabled:t,onClick:e=>{e.stopPropagation(),r()},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,n&&`bg-primary text-primary-foreground`,t&&`opacity-40 cursor-not-allowed`),children:i})}function mle(e){switch(e){case`cleaning`:return{glow:`bg-primary/15`,accent:`text-primary`,docked:!1,active:!0};case`returning`:return{glow:`bg-primary/10`,accent:`text-primary`,docked:!1,active:!0};case`docked`:return{glow:`bg-success/10`,accent:`text-success`,docked:!0,active:!1};case`drying`:return{glow:`bg-warning/10`,accent:`text-warning`,docked:!0,active:!1};case`paused`:return{glow:`bg-warning/10`,accent:`text-warning`,docked:!1,active:!1};case`error`:return{glow:`bg-destructive/10`,accent:`text-destructive`,docked:!1,active:!1};case`idle`:return{glow:`bg-transparent`,accent:`text-foreground-subtle`,docked:!1,active:!1};case void 0:return{glow:`bg-transparent`,accent:`text-foreground-subtle`,docked:!1,active:!1}}}var hle=`
|
|
79
|
+
• @camstack/addon-recorder 1.2.3 → 1.2.4`,kinds:[`addon-update-available`,`addon-updated`]},{name:`summaryUpdates`,label:`Summary: server & container updates`,example:`server 1.2.377 → 1.2.378`,kinds:[`server-update-available`,`node-updating`,`server-updated`,`wrapper-update-available`]}],t3=[{name:`summaryText`,label:`Summary: every section`,description:`One block per section with something to report, one line per item.`,example:`Batterie scariche: Sensore porta — 8 %`,group:`system`,families:[`rule`],fields:[...$],kinds:[`system`],systemEventKinds:[...$4],systemEventDeliveries:[`summary`]},{name:`summaryCount`,label:`Summary: items reported`,example:`3`,group:`system`,families:[`rule`],fields:[...$],kinds:[`system`],systemEventKinds:[...$4],systemEventDeliveries:[`summary`]},{name:`summarySection`,label:`Summary: this section`,description:`The section a per-section summary row is about; on a summary sent as one message, every section it reports, comma-separated.`,example:`Batterie scariche`,group:`system`,families:[`rule`],fields:[...$],kinds:[`system`],systemEventKinds:[...$4],systemEventDeliveries:[`summary`]},...e3.map(e=>({name:e.name,label:e.label,example:e.example,group:`system`,families:[`rule`],fields:[...$],kinds:[`system`],systemEventKinds:[...e.kinds],systemEventDeliveries:[`summary`]}))];[[...Q4],([...$],[...Z4]),([...$],[...Z4]),([...$],[...Z4]),[...$],([...$],[...Z4]),([...$],[...Y4]),[...$],([...$],[...Z4]),([...$],[...Z4]),([...$],[...Z4]),[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...U4],[...$],([...$],[...Q4]),([...$],[...Z4]),([...$],[...Q4]),([...$],[...W4,...G4]),([...$],[...G4]),[...$],([...$],[...J4,...K4]),([...$],[...J4,...K4]),[...$],[...$],[...$],[...$],[...$],[...$],[...$],([...$],[...q4,...K4]),[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],([...$],[...J4]),([...$],[...Y4]),([...$],[...Y4]),([...$],[...J4]),([...$],[...J4]),([...$],[...Y4]),[...$],[...$],[...$],[...$],[...$],[...$],[...$],([...$],[...q4,...K4]),([...$],[...K4]),([...$],[...q4,...K4]),([...$],[...K4]),([...$],[...q4,...K4]),[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],[...$],...t3],new Map([{id:`device-connectivity`,family:`device-events`,label:`Device connectivity (offline / back online)`,bad:[`device-offline`],recovery:[`device-online`],snapshotLabel:`Devices offline now`,snapshotSection:`device-state`},{id:`device-switch`,family:`device-events`,label:`Device switched off / back on`,bad:[`device-disabled`],recovery:[`device-enabled`],snapshotLabel:`Devices switched off now`,snapshotSection:`device-state`},{id:`stream-connectivity`,family:`device-events`,label:`Stream connectivity (offline / back online)`,bad:[`stream-offline`],recovery:[`stream-online`],snapshotLabel:`Streams offline now`,snapshotSection:`streams`},{id:`battery`,family:`device-events`,label:`Battery (low / back to normal)`,bad:[`device-battery-low`],recovery:[`device-battery-normal`],snapshotLabel:`Batteries low now`,snapshotSection:`battery`},{id:`consumables`,family:`device-events`,label:`Consumables (low / replaced)`,bad:[`device-consumable-low`],recovery:[`device-consumable-normal`],snapshotLabel:`Consumables low now`,snapshotSection:`consumables`},{id:`motion-noise`,family:`device-events`,label:`Motion without a subject (constant / calm again)`,bad:[`motion-noisy`],recovery:[`motion-calm`],snapshotLabel:`Cameras with constant motion now`,snapshotSection:null},{id:`package-llm-confirm`,family:`device-events`,label:`Package confirm (not answering / answering again)`,bad:[`package-llm-silent`],recovery:[`package-llm-answered`],snapshotLabel:`Cameras whose package confirm is not answering`,snapshotSection:null},{id:`recording-health`,family:`device-events`,label:`Recording health (stalled or degraded / recording again)`,bad:[`recording-stalled`,`recording-degraded`],recovery:[`recording-healthy`],snapshotLabel:`Recordings stalled now`,snapshotSection:null},{id:`device-attention`,family:`device-events`,label:`Device needs attention (raised / resolved)`,bad:[`device-attention-required`],recovery:[`device-attention-resolved`],snapshotLabel:`Devices needing attention now`,snapshotSection:null},{id:`node-connectivity`,family:`system`,label:`Node connectivity (offline / back online)`,bad:[`node-offline`],recovery:[`node-online`],snapshotLabel:`Nodes offline now`,snapshotSection:`nodes`},{id:`storage-space`,family:`system`,label:`Storage space (low or critical / ok again)`,bad:[`storage-location-low`,`storage-location-critical`],recovery:[`storage-location-ok`],snapshotLabel:`Storage locations low now`,snapshotSection:null},{id:`critical-alerts`,family:`system`,label:`Critical alerts (raised / resolved)`,bad:[`alert-critical`],recovery:[`alert-critical-resolved`],snapshotLabel:`Critical alerts open now`,snapshotSection:null},{id:`rule-health`,family:`system`,label:`Rule health (broken / repaired)`,bad:[`rule-broken`],recovery:[`rule-repaired`],snapshotLabel:`Notification rules broken now`,snapshotSection:null}].flatMap(e=>[...e.bad,...e.recovery].map(t=>[t,e]))),new Set(`disarmed.armed_home.armed_away.armed_night.armed_vacation.armed_custom_bypass.arming.disarming.pending.triggered.open.opening.closing.closed.stopped.locked.unlocked.locking.unlocking.jammed.on.off.home.not_home.matched.diverged.unknown.latched.live`.split(`.`));var n3=j({title:T().max(500).optional(),body:T().max(2e3).optional()}),r3=T().min(1).max(200),i3=A(E()).min(1),a3=E().int().min(2).max(3600),o3=E().int().min(1).max(60),s3=A(_0).min(1),c3=E().int().min(1).max(5),l3=E().min(.1).max(3600),u3=E().min(0).max(60),d3=T().max(200),f3=F([`image`,`gif`]),p3=A(T().min(1).max(40)).max(20),m3=j({name:r3,enabled:D().default(!0),deviceIds:i3,schedule:$1,cadenceSec:a3.default(15),framerate:o3.default(10),denseCadenceSec:l3.optional(),minDwellSec:u3.optional(),targets:s3,template:n3.optional(),previewText:d3.optional(),previewMode:f3.default(`image`),reportClasses:p3.optional(),priority:c3.default(3)});j({name:r3.optional(),enabled:D().optional(),deviceIds:i3.optional(),schedule:$1.optional(),cadenceSec:a3.optional(),framerate:o3.optional(),denseCadenceSec:l3.optional(),minDwellSec:u3.optional(),targets:s3.optional(),template:n3.nullable().optional(),previewText:d3.optional(),previewMode:f3.optional(),reportClasses:p3.optional(),priority:c3.optional()}),m3.extend({id:T(),ownerUserId:T().optional(),lastGeneratedAt:E().optional(),generatedByDevice:P(T(),E()).optional(),createdBy:T(),createdAt:E(),updatedAt:E()});var h3=` · `,g3=[` — `,` `],_3=new Set([`battery-sensor`,`temperature-sensor`,`humidity-sensor`,`ambient-light-sensor`,`connectivity-sensor`,`datetime-sensor`,`numeric-sensor`,`enum-sensor`]);function v3(e){return e.toLowerCase().replace(/[-_\s]+/g,` `).trim()}function y3(e,t){return v3(e)===v3(t)}function b3(e,t){if(t.length===0)return e;let n=e.toLowerCase(),r=t.toLowerCase();for(let t of g3){let i=`${r}${t}`;if(n.startsWith(i))return e.slice(i.length).trim()}return e}function x3(e){let t=e.role;return t==null||t.length===0?null:t}function S3(e){if(e.type===`update`)return!0;let t=x3(e);return t!==null&&_3.has(t)}function C3(e){let t=e.display?.label;return t==null?``:t.trim()}function w3(e,t,n){let r=C3(e);if(r.length>0)return r;let i=b3(e.name,t.name),a=i.length>0?i:e.name;return e.userNamed===!0?a:i.length===0||y3(i,t.name)||n.isStockPhrase(a,x3(e),e.type)?n.shortNoun(x3(e),e.type):a}function T3(e,t,n){return y3(n,t.name)?!0:C3(e).length>0||e.userNamed===!0?!1:y3(b3(e.name,t.name),t.name)}function E3(e){let t=0;for(let n of e)S3(n)||(t+=1);return t}function D3(e,t,n){let r=I4(n.map(e=>{let t=x3(e);return{id:e.id,stableId:e.stableId,type:e.type,name:e.name,...t===null?{}:{role:t}}}),t.primaryChildEntityId,t.name);return r!==null&&r.id===e.id}function O3(e,t,n,r,i){let a=w3(e,t,r);return T3(e,t,a)||i===`compact`&&t.type===`container`&&D3(e,t,n)&&E3(n)===1?t.name:`${t.name}${h3}${a}`}function k3(e,t){if(t==null)return e;let n=t.trim();return n.length===0||e.split(` · `).some(e=>y3(e,n))?e:`${e}${h3}${n}`}function A3(e,t){return t===null?!1:e.parentDeviceId!=null}function j3(e,t,n,r){if(!A3(e,n.parent))return t===`with-location`?k3(e.name,e.location):e.name;if(t===`nested`)return w3(e,n.parent,r);let i=O3(e,n.parent,n.siblings,r,t===`full`?`full`:`compact`);return t===`with-location`?k3(i,e.location):i}var M3=[{id:`siren`,key:`uiLibrary.deviceMeta.noun.role.siren`,en:`Siren`,it:`Sirena`,shortEn:`Siren`,shortIt:`Sirena`,aliases:[]},{id:`floodlight`,key:`uiLibrary.deviceMeta.noun.role.floodlight`,en:`Floodlight`,it:`Faro`,shortEn:`Floodlight`,shortIt:`Faro`,aliases:[]},{id:`spotlight`,key:`uiLibrary.deviceMeta.noun.role.spotlight`,en:`Spotlight`,it:`Faretto`,shortEn:`Spotlight`,shortIt:`Faretto`,aliases:[]},{id:`pir-sensor`,key:`uiLibrary.deviceMeta.noun.role.pirSensor`,en:`PIR sensor`,it:`Sensore PIR`,shortEn:`PIR`,shortIt:`PIR`,aliases:[]},{id:`chime`,key:`uiLibrary.deviceMeta.noun.role.chime`,en:`Chime`,it:`Campanello`,shortEn:`Chime`,shortIt:`Campanello`,aliases:[]},{id:`autotrack`,key:`uiLibrary.deviceMeta.noun.role.autotrack`,en:`Auto-track`,it:`Auto-tracking`,shortEn:`Auto-track`,shortIt:`Auto-tracking`,aliases:[]},{id:`nightvision`,key:`uiLibrary.deviceMeta.noun.role.nightvision`,en:`Night vision`,it:`Visione notturna`,shortEn:`Night`,shortIt:`Notturna`,aliases:[]},{id:`privacy-mask`,key:`uiLibrary.deviceMeta.noun.role.privacyMask`,en:`Privacy mask`,it:`Maschera privacy`,shortEn:`Privacy`,shortIt:`Privacy`,aliases:[]},{id:`doorbell`,key:`uiLibrary.deviceMeta.noun.role.doorbell`,en:`Doorbell`,it:`Campanello video`,shortEn:`Doorbell`,shortIt:`Campanello video`,aliases:[]},{id:`cover-blind`,key:`uiLibrary.deviceMeta.noun.role.coverBlind`,en:`Blind`,it:`Tapparella`,shortEn:`Blind`,shortIt:`Tapparella`,aliases:[]},{id:`cover-shutter`,key:`uiLibrary.deviceMeta.noun.role.coverShutter`,en:`Shutter`,it:`Persiana`,shortEn:`Shutter`,shortIt:`Persiana`,aliases:[]},{id:`cover-awning`,key:`uiLibrary.deviceMeta.noun.role.coverAwning`,en:`Awning`,it:`Tenda da sole`,shortEn:`Awning`,shortIt:`Tenda da sole`,aliases:[]},{id:`cover-curtain`,key:`uiLibrary.deviceMeta.noun.role.coverCurtain`,en:`Curtain`,it:`Tenda`,shortEn:`Curtain`,shortIt:`Tenda`,aliases:[]},{id:`cover-garage`,key:`uiLibrary.deviceMeta.noun.role.coverGarage`,en:`Garage door`,it:`Porta del garage`,shortEn:`Garage`,shortIt:`Garage`,aliases:[]},{id:`cover-gate`,key:`uiLibrary.deviceMeta.noun.role.coverGate`,en:`Gate`,it:`Cancello`,shortEn:`Gate`,shortIt:`Cancello`,aliases:[]},{id:`cover-door`,key:`uiLibrary.deviceMeta.noun.role.coverDoor`,en:`Door`,it:`Porta`,shortEn:`Door`,shortIt:`Porta`,aliases:[]},{id:`cover-window`,key:`uiLibrary.deviceMeta.noun.role.coverWindow`,en:`Window`,it:`Finestra`,shortEn:`Window`,shortIt:`Finestra`,aliases:[]},{id:`binary-helper`,key:`uiLibrary.deviceMeta.noun.role.binaryHelper`,en:`Binary helper`,it:`Helper binario`,shortEn:`Helper`,shortIt:`Helper`,aliases:[]},{id:`outlet`,key:`uiLibrary.deviceMeta.noun.role.outlet`,en:`Outlet`,it:`Presa`,shortEn:`Outlet`,shortIt:`Presa`,aliases:[]},{id:`motion-sensor`,key:`uiLibrary.deviceMeta.noun.role.motionSensor`,en:`Motion sensor`,it:`Sensore di movimento`,shortEn:`Motion`,shortIt:`Movimento`,aliases:[]},{id:`contact-sensor`,key:`uiLibrary.deviceMeta.noun.role.contactSensor`,en:`Contact sensor`,it:`Sensore di contatto`,shortEn:`Contact`,shortIt:`Contatto`,aliases:[]},{id:`leak-sensor`,key:`uiLibrary.deviceMeta.noun.role.leakSensor`,en:`Leak sensor`,it:`Sensore di perdite`,shortEn:`Leak`,shortIt:`Perdita`,aliases:[]},{id:`smoke-sensor`,key:`uiLibrary.deviceMeta.noun.role.smokeSensor`,en:`Smoke sensor`,it:`Sensore di fumo`,shortEn:`Smoke`,shortIt:`Fumo`,aliases:[]},{id:`co-sensor`,key:`uiLibrary.deviceMeta.noun.role.cOSensor`,en:`CO sensor`,it:`Sensore di CO`,shortEn:`CO`,shortIt:`CO`,aliases:[]},{id:`gas-sensor`,key:`uiLibrary.deviceMeta.noun.role.gasSensor`,en:`Gas sensor`,it:`Sensore di gas`,shortEn:`Gas`,shortIt:`Gas`,aliases:[]},{id:`tamper-sensor`,key:`uiLibrary.deviceMeta.noun.role.tamperSensor`,en:`Tamper sensor`,it:`Sensore antimanomissione`,shortEn:`Tamper`,shortIt:`Manomissione`,aliases:[]},{id:`vibration-sensor`,key:`uiLibrary.deviceMeta.noun.role.vibrationSensor`,en:`Vibration sensor`,it:`Sensore di vibrazione`,shortEn:`Vibration`,shortIt:`Vibrazione`,aliases:[]},{id:`connectivity-sensor`,key:`uiLibrary.deviceMeta.noun.role.connectivitySensor`,en:`Connectivity`,it:`Connettività`,shortEn:`Connectivity`,shortIt:`Connettività`,aliases:[]},{id:`sound-sensor`,key:`uiLibrary.deviceMeta.noun.role.soundSensor`,en:`Sound sensor`,it:`Sensore acustico`,shortEn:`Sound`,shortIt:`Suono`,aliases:[]},{id:`binary-sensor`,key:`uiLibrary.deviceMeta.noun.role.binarySensor`,en:`Binary sensor`,it:`Sensore binario`,shortEn:`Binary`,shortIt:`Binario`,aliases:[]},{id:`temperature-sensor`,key:`uiLibrary.deviceMeta.noun.role.temperatureSensor`,en:`Temperature`,it:`Temperatura`,shortEn:`Temperature`,shortIt:`Temperatura`,aliases:[]},{id:`humidity-sensor`,key:`uiLibrary.deviceMeta.noun.role.humiditySensor`,en:`Humidity`,it:`Umidità`,shortEn:`Humidity`,shortIt:`Umidità`,aliases:[]},{id:`ambient-light-sensor`,key:`uiLibrary.deviceMeta.noun.role.ambientLightSensor`,en:`Ambient light`,it:`Luce ambientale`,shortEn:`Light`,shortIt:`Luce`,aliases:[`Illumination`]},{id:`pressure-sensor`,key:`uiLibrary.deviceMeta.noun.role.pressureSensor`,en:`Pressure`,it:`Pressione`,shortEn:`Pressure`,shortIt:`Pressione`,aliases:[]},{id:`wind-sensor`,key:`uiLibrary.deviceMeta.noun.role.windSensor`,en:`Wind`,it:`Vento`,shortEn:`Wind`,shortIt:`Vento`,aliases:[]},{id:`rain-sensor`,key:`uiLibrary.deviceMeta.noun.role.rainSensor`,en:`Rain`,it:`Pioggia`,shortEn:`Rain`,shortIt:`Pioggia`,aliases:[]},{id:`uv-sensor`,key:`uiLibrary.deviceMeta.noun.role.uvSensor`,en:`UV index`,it:`Indice UV`,shortEn:`UV index`,shortIt:`Indice UV`,aliases:[]},{id:`solar-radiation-sensor`,key:`uiLibrary.deviceMeta.noun.role.solarRadiationSensor`,en:`Solar radiation`,it:`Radiazione solare`,shortEn:`Solar radiation`,shortIt:`Radiazione solare`,aliases:[]},{id:`soil-moisture-sensor`,key:`uiLibrary.deviceMeta.noun.role.soilMoistureSensor`,en:`Soil moisture`,it:`Umidità del suolo`,shortEn:`Soil moisture`,shortIt:`Umidità del suolo`,aliases:[]},{id:`power-sensor`,key:`uiLibrary.deviceMeta.noun.role.powerSensor`,en:`Power`,it:`Potenza`,shortEn:`Power`,shortIt:`Potenza`,aliases:[]},{id:`energy-sensor`,key:`uiLibrary.deviceMeta.noun.role.energySensor`,en:`Energy`,it:`Energia`,shortEn:`Energy`,shortIt:`Energia`,aliases:[]},{id:`voltage-sensor`,key:`uiLibrary.deviceMeta.noun.role.voltageSensor`,en:`Voltage`,it:`Tensione`,shortEn:`Voltage`,shortIt:`Tensione`,aliases:[]},{id:`current-sensor`,key:`uiLibrary.deviceMeta.noun.role.currentSensor`,en:`Current`,it:`Corrente`,shortEn:`Current`,shortIt:`Corrente`,aliases:[]},{id:`air-quality-sensor`,key:`uiLibrary.deviceMeta.noun.role.airQualitySensor`,en:`Air quality`,it:`Qualità dell’aria`,shortEn:`Air quality`,shortIt:`Qualità dell’aria`,aliases:[]},{id:`battery-sensor`,key:`uiLibrary.deviceMeta.noun.role.batterySensor`,en:`Battery`,it:`Batteria`,shortEn:`Battery`,shortIt:`Batteria`,aliases:[]},{id:`numeric-sensor`,key:`uiLibrary.deviceMeta.noun.role.numericSensor`,en:`Numeric sensor`,it:`Sensore numerico`,shortEn:`Value`,shortIt:`Numerico`,aliases:[]},{id:`enum-sensor`,key:`uiLibrary.deviceMeta.noun.role.enumSensor`,en:`Enum sensor`,it:`Sensore a stati`,shortEn:`State`,shortIt:`Stato`,aliases:[]},{id:`datetime-sensor`,key:`uiLibrary.deviceMeta.noun.role.dateTimeSensor`,en:`Date / time`,it:`Data / ora`,shortEn:`Time`,shortIt:`Ora`,aliases:[`Last seen`]},{id:`generic-sensor`,key:`uiLibrary.deviceMeta.noun.role.genericSensor`,en:`Sensor`,it:`Sensore`,shortEn:`Sensor`,shortIt:`Sensore`,aliases:[]},{id:`numeric-control`,key:`uiLibrary.deviceMeta.noun.role.numericControl`,en:`Numeric control`,it:`Controllo numerico`,shortEn:`Number`,shortIt:`Numero`,aliases:[]},{id:`select-control`,key:`uiLibrary.deviceMeta.noun.role.selectControl`,en:`Select control`,it:`Controllo a selezione`,shortEn:`Select`,shortIt:`Selezione`,aliases:[]},{id:`text-control`,key:`uiLibrary.deviceMeta.noun.role.textControl`,en:`Text control`,it:`Controllo testo`,shortEn:`Text`,shortIt:`Testo`,aliases:[]},{id:`datetime-control`,key:`uiLibrary.deviceMeta.noun.role.dateTimeControl`,en:`Date / time control`,it:`Controllo data / ora`,shortEn:`Time`,shortIt:`Ora`,aliases:[]},{id:`mobile-push-notifier`,key:`uiLibrary.deviceMeta.noun.role.mobilePushNotifier`,en:`Mobile push`,it:`Push su mobile`,shortEn:`Push`,shortIt:`Push`,aliases:[]},{id:`messaging-notifier`,key:`uiLibrary.deviceMeta.noun.role.messagingNotifier`,en:`Messaging`,it:`Messaggistica`,shortEn:`Messaging`,shortIt:`Messaggistica`,aliases:[]},{id:`email-notifier`,key:`uiLibrary.deviceMeta.noun.role.emailNotifier`,en:`Email`,it:`Email`,shortEn:`Email`,shortIt:`Email`,aliases:[]},{id:`generic-notifier`,key:`uiLibrary.deviceMeta.noun.role.genericNotifier`,en:`Notifier`,it:`Notificatore`,shortEn:`Notifier`,shortIt:`Notificatore`,aliases:[]}],N3=[{id:`camera`,key:`uiLibrary.deviceMeta.noun.type.camera`,en:`Camera`,it:`Telecamera`,shortEn:`Camera`,shortIt:`Telecamera`,aliases:[]},{id:`hub`,key:`uiLibrary.deviceMeta.noun.type.hub`,en:`Hub`,it:`Hub`,shortEn:`Hub`,shortIt:`Hub`,aliases:[]},{id:`light`,key:`uiLibrary.deviceMeta.noun.type.light`,en:`Light`,it:`Luce`,shortEn:`Light`,shortIt:`Luce`,aliases:[]},{id:`siren`,key:`uiLibrary.deviceMeta.noun.type.siren`,en:`Siren`,it:`Sirena`,shortEn:`Siren`,shortIt:`Sirena`,aliases:[]},{id:`switch`,key:`uiLibrary.deviceMeta.noun.type.switch`,en:`Switch`,it:`Interruttore`,shortEn:`Switch`,shortIt:`Interruttore`,aliases:[]},{id:`sensor`,key:`uiLibrary.deviceMeta.noun.type.sensor`,en:`Sensor`,it:`Sensore`,shortEn:`Sensor`,shortIt:`Sensore`,aliases:[]},{id:`thermostat`,key:`uiLibrary.deviceMeta.noun.type.thermostat`,en:`Thermostat`,it:`Termostato`,shortEn:`Thermostat`,shortIt:`Termostato`,aliases:[]},{id:`climate`,key:`uiLibrary.deviceMeta.noun.type.climate`,en:`Air conditioner`,it:`Condizionatore`,shortEn:`Climate`,shortIt:`Condizionatore`,aliases:[]},{id:`button`,key:`uiLibrary.deviceMeta.noun.type.button`,en:`Button`,it:`Pulsante`,shortEn:`Button`,shortIt:`Pulsante`,aliases:[]},{id:`event-emitter`,key:`uiLibrary.deviceMeta.noun.type.eventEmitter`,en:`Event Emitter`,it:`Emettitore di eventi`,shortEn:`Event`,shortIt:`Evento`,aliases:[]},{id:`update`,key:`uiLibrary.deviceMeta.noun.type.update`,en:`Update`,it:`Aggiornamento`,shortEn:`Update`,shortIt:`Aggiornamento`,aliases:[]},{id:`generic`,key:`uiLibrary.deviceMeta.noun.type.generic`,en:`Generic`,it:`Generico`,shortEn:`Generic`,shortIt:`Generico`,aliases:[]},{id:`notifier`,key:`uiLibrary.deviceMeta.noun.type.notifier`,en:`Notifier`,it:`Notificatore`,shortEn:`Notifier`,shortIt:`Notificatore`,aliases:[]},{id:`script`,key:`uiLibrary.deviceMeta.noun.type.script`,en:`Script`,it:`Script`,shortEn:`Script`,shortIt:`Script`,aliases:[]},{id:`automation`,key:`uiLibrary.deviceMeta.noun.type.automation`,en:`Automation`,it:`Automazione`,shortEn:`Automation`,shortIt:`Automazione`,aliases:[]},{id:`lock`,key:`uiLibrary.deviceMeta.noun.type.lock`,en:`Lock`,it:`Serratura`,shortEn:`Lock`,shortIt:`Serratura`,aliases:[]},{id:`cover`,key:`uiLibrary.deviceMeta.noun.type.cover`,en:`Cover`,it:`Copertura`,shortEn:`Cover`,shortIt:`Copertura`,aliases:[]},{id:`valve`,key:`uiLibrary.deviceMeta.noun.type.valve`,en:`Valve`,it:`Valvola`,shortEn:`Valve`,shortIt:`Valvola`,aliases:[]},{id:`humidifier`,key:`uiLibrary.deviceMeta.noun.type.humidifier`,en:`Humidifier`,it:`Umidificatore`,shortEn:`Humidifier`,shortIt:`Umidificatore`,aliases:[]},{id:`water-heater`,key:`uiLibrary.deviceMeta.noun.type.waterHeater`,en:`Water heater`,it:`Scaldabagno`,shortEn:`Heater`,shortIt:`Scaldabagno`,aliases:[]},{id:`fan`,key:`uiLibrary.deviceMeta.noun.type.fan`,en:`Fan`,it:`Ventilatore`,shortEn:`Fan`,shortIt:`Ventilatore`,aliases:[]},{id:`media-player`,key:`uiLibrary.deviceMeta.noun.type.mediaPlayer`,en:`Media player`,it:`Lettore multimediale`,shortEn:`Player`,shortIt:`Lettore`,aliases:[]},{id:`alarm-panel`,key:`uiLibrary.deviceMeta.noun.type.alarmPanel`,en:`Alarm panel`,it:`Pannello allarme`,shortEn:`Alarm`,shortIt:`Allarme`,aliases:[]},{id:`control`,key:`uiLibrary.deviceMeta.noun.type.control`,en:`Control`,it:`Controllo`,shortEn:`Control`,shortIt:`Controllo`,aliases:[]},{id:`presence`,key:`uiLibrary.deviceMeta.noun.type.presence`,en:`Presence`,it:`Presenza`,shortEn:`Presence`,shortIt:`Presenza`,aliases:[]},{id:`weather`,key:`uiLibrary.deviceMeta.noun.type.weather`,en:`Weather`,it:`Meteo`,shortEn:`Weather`,shortIt:`Meteo`,aliases:[]},{id:`vacuum`,key:`uiLibrary.deviceMeta.noun.type.vacuum`,en:`Vacuum`,it:`Aspirapolvere`,shortEn:`Vacuum`,shortIt:`Aspirapolvere`,aliases:[]},{id:`lawn-mower`,key:`uiLibrary.deviceMeta.noun.type.lawnMower`,en:`Lawn mower`,it:`Tagliaerba`,shortEn:`Mower`,shortIt:`Tagliaerba`,aliases:[]},{id:`container`,key:`uiLibrary.deviceMeta.noun.type.container`,en:`Container`,it:`Contenitore`,shortEn:`Container`,shortIt:`Contenitore`,aliases:[]},{id:`image`,key:`uiLibrary.deviceMeta.noun.type.image`,en:`Image`,it:`Immagine`,shortEn:`Image`,shortIt:`Immagine`,aliases:[]},{id:`pet-feeder`,key:`uiLibrary.deviceMeta.noun.type.petFeeder`,en:`Pet feeder`,it:`Distributore di cibo per animali`,shortEn:`Feeder`,shortIt:`Distributore`,aliases:[]},{id:`dishwasher`,key:`uiLibrary.deviceMeta.noun.type.dishwasher`,en:`Dishwasher`,it:`Lavastoviglie`,shortEn:`Dishwasher`,shortIt:`Lavastoviglie`,aliases:[]}],P3={id:``,key:`uiLibrary.deviceMeta.noun.fallback`,en:`Device`,it:`Dispositivo`,shortEn:`Device`,shortIt:`Dispositivo`,aliases:[]};function F3(e,t){if(!(t===null||t.length===0))return e.find(e=>e.id===t)}function bae(e,t){if(e!==null){let t=F3(M3,e);if(t!==void 0)return t}return F3(N3,t)??P3}function xae(e,t){let n=[],r=[F3(M3,e),F3(N3,t)];for(let e of r)e!==void 0&&n.push(e.en,e.it,e.shortEn,e.shortIt,...e.aliases);return n}function Sae(e,t,n){let r=v3(e);return r.length===0?!0:xae(t,n).some(e=>v3(e)===r)}function Cae(){let e=t();return{shortNoun(t,n){let r=bae(t,n);return e(r.key,r.shortEn)},isStockPhrase(e,t,n){return Sae(e,t,n)}}}function wae(e){return{id:e,name:`#${String(e)}`,type:`unknown`,stableId:``,role:null,parentDeviceId:null}}function Tae(e,t){let n=e.parentDeviceId;return n==null?null:t.byId.get(n)??wae(n)}function Eae(e,t){let n=e.parentDeviceId;if(n==null)return[];let r=t.childIds.get(n)??[],i=[];for(let e of r){let n=t.byId.get(e);n!==void 0&&i.push(n)}return i.some(t=>t.id===e.id)||i.push(e),i}function Dae(e,t,n,r,i){let a=n?.byId.get(e.id)??e;return a.parentDeviceId!=null&&n===null&&i?.parent===void 0?a.name:j3(a,t,{parent:i?.parent===void 0?n===null?null:Tae(a,n):i.parent,siblings:i?.siblings??(n===null?[]:Eae(a,n))},r)}function Oae(e,t,n){return Dae(e,t,t$(),Cae(),n)}function I3({device:e,form:t,parent:n,siblings:r,className:i,testId:a}){let o=Oae(e,t,{...n===void 0?{}:{parent:n},...r===void 0?{}:{siblings:r}});return(0,K.jsx)(`span`,{className:i,title:o,"data-testid":a,children:o})}var kae=`capability.binding-changed`;function L3(e,t){let[n,r]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(t===null){r(null);return}let n=!1,i=async()=>{try{let i=await e.deviceManager.getBindings.query({deviceId:t});n||r(i)}catch{n||r(e=>e)}};i();let a=e.live?.onEvent.subscribe({category:kae},{onData:e=>{let n=e.data?.source;if(!n){i();return}n.type===`device`&&n.id===t&&i()}});return()=>{n=!0,a?.unsubscribe()}},[e,t]),(0,s.useMemo)(()=>n?xc(e,n):null,[e,n])}function R3(e){let t=(0,s.useCallback)(t=>e?e.subscribe(()=>t()):()=>void 0,[e]),n=(0,s.useCallback)(()=>e?.value,[e]);return(0,s.useSyncExternalStore)(t,n,n)}var Aae=`/addon/snapshot/media`;function jae(e,t={}){let{width:n,baseUrl:r}=t,[i,a]=(0,s.useState)(0);return{src:(0,s.useMemo)(()=>{if(e===null||e<=0)return null;let t=r===void 0?XQ():r.replace(/\/+$/,``),a=new URLSearchParams;n!==void 0&&Number.isInteger(n)&&n>0&&a.set(`w`,String(n)),i>0&&(a.set(`force`,`1`),a.set(`r`,String(i)));let o=a.toString();return`${t}${Aae}/${String(e)}.jpg${o.length>0?`?${o}`:``}`},[e,n,r,i]),loading:!1,refresh:(0,s.useCallback)(()=>{a(e=>e+1)},[])}}B.Camera;function z3(e){let t=L3(e.trpc,e.deviceId),n=R3(t===null?void 0:e.slice(t)),r=t===null?void 0:e.cap(t),i=R3(t===null?void 0:t.state.deviceStatus),a=i?.online??!0,o=a?null:i?.lastChangedAt??null;return{dev:t,cap:r,slice:n,available:(e.requireFeature===void 0||(e.deviceFeatures??[]).includes(e.requireFeature))&&r!==void 0&&n!==void 0&&a,online:a,offlineSince:o}}pre.exclude([`full`]).options;var Mae=(0,s.forwardRef)(({className:e,...t},n)=>(0,K.jsx)(`div`,{ref:n,className:Z(`animate-pulse bg-surface-hover rounded-md h-4 w-full`,e),...t}));Mae.displayName=`Skeleton`;var Nae={danger:{box:`border-danger/40 bg-danger/10`,icon:`text-danger`,title:`text-danger`,message:`text-danger`},warning:{box:`border-amber-500/40 bg-amber-500/10`,icon:`text-amber-600 dark:text-amber-400`,title:`text-amber-700 dark:text-amber-300`,message:`text-amber-700 dark:text-amber-300`}};function B3({message:e,title:n,onRetry:r,action:i,variant:a=`danger`,className:o}){let s=t(),c=Nae[a],l=a===`warning`?BH:rV;return(0,K.jsxs)(`div`,{role:`alert`,className:Z(`flex items-start gap-2.5 rounded border px-3 py-2.5`,c.box,o),children:[(0,K.jsx)(l,{className:Z(`h-4 w-4 mt-0.5 shrink-0`,c.icon),"aria-hidden":`true`}),(0,K.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[n&&(0,K.jsx)(`p`,{className:Z(`text-xs font-semibold`,c.title),children:n}),(0,K.jsx)(`div`,{className:Z(`text-xs break-words`,c.message,n?`mt-0.5`:``),children:e})]}),i??(r&&(0,K.jsxs)(`button`,{type:`button`,onClick:r,className:Z(`shrink-0 inline-flex items-center gap-1 rounded px-2 py-1 text-[11px] font-medium`,`border border-current/30 hover:bg-current/10 transition-colors`,c.message),children:[(0,K.jsx)(fH,{className:`h-3 w-3`,"aria-hidden":`true`}),s(`uiLibrary.errorBox.retry`,`Retry`)]}))]})}EK(`camstack:vod-playback`,{request:null,play:()=>{},clear:()=>{}});var Pae=TJ(`rounded-lg p-3`,{variants:{variant:{flat:`bg-surface`,bordered:`bg-surface border border-border`}},defaultVariants:{variant:`bordered`}}),V3=(0,s.forwardRef)(({className:e,variant:t,...n},r)=>(0,K.jsx)(`div`,{ref:r,className:Z(Pae({variant:t}),e),...n}));V3.displayName=`Card`;function Fae(e){if(typeof e!=`object`||!e)return null;let t=Reflect.get(e,`data`);if(typeof t==`object`&&t){let e=Reflect.get(t,`capRouteReason`);if(typeof e==`string`)return e}return null}function Iae(e){let t=Fae(e);return t===null?(e instanceof Error?e.message:String(e)).includes(`provider not available`):t===`no-provider`||t===`node-offline`}EK(`camstack:recorded-playback`,{bindControlChannel:null,channelOpen:!1,mode:`live`,positionMs:null,send:()=>!1});var H3=(0,s.createContext)(null);function Lae(){let e=(0,s.useContext)(H3);if(!e)throw Error(`Dialog compound components must be used within <Dialog>`);return e}function U3({children:e,open:t,onOpenChange:n}){let[r,i]=(0,s.useState)(!1),a=t??r,o=(0,s.useId)(),c=(0,s.useCallback)(e=>{n?.(e),t===void 0&&i(e)},[t,n]);return(0,K.jsx)(H3.Provider,{value:{open:a,setOpen:c,contentId:o},children:e})}var Rae=TJ(`relative fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 m-0 w-[calc(100vw-2rem)] bg-background-elevated text-foreground border border-border rounded-lg p-4 backdrop:bg-black/50 backdrop:backdrop-blur-sm max-h-[calc(100dvh-2rem-2*max(env(safe-area-inset-top),env(safe-area-inset-bottom)))] [&:not([open])]:hidden`,{variants:{width:{sm:`max-w-sm`,md:`max-w-md`,lg:`max-w-lg`,xl:`max-w-4xl`},scroll:{content:`overflow-y-auto overscroll-contain`,body:`flex flex-col overflow-hidden overscroll-contain`},placement:{center:``,"sheet-on-mobile":`bottom-0 left-0 right-0 top-auto w-full max-w-full translate-x-0 translate-y-0 rounded-b-none max-h-[92dvh] pb-[calc(1rem+env(safe-area-inset-bottom))] md:left-1/2 md:top-1/2 md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-lg md:bottom-auto md:pb-4 md:max-h-[calc(100dvh-2rem-2*max(env(safe-area-inset-top),env(safe-area-inset-bottom)))]`}},compoundVariants:[{placement:`sheet-on-mobile`,width:`sm`,class:`md:w-[calc(100vw-2rem)] md:max-w-sm`},{placement:`sheet-on-mobile`,width:`md`,class:`md:w-[calc(100vw-2rem)] md:max-w-md`},{placement:`sheet-on-mobile`,width:`lg`,class:`md:w-[calc(100vw-2rem)] md:max-w-lg`},{placement:`sheet-on-mobile`,width:`xl`,class:`md:w-[calc(100vw-2rem)] md:max-w-4xl`},{scroll:`body`,placement:`sheet-on-mobile`,class:`h-[92dvh] md:h-auto`},{scroll:`body`,placement:`center`,class:`h-[calc(100dvh-2rem-2*max(env(safe-area-inset-top),env(safe-area-inset-bottom)))] md:h-auto`}],defaultVariants:{width:`md`,placement:`center`,scroll:`content`}}),W3=(0,s.forwardRef)(({className:e,width:n,placement:r,scroll:i,children:a,...o},c)=>{let{open:l,setOpen:u,contentId:d}=Lae(),f=t(),p=(0,s.useRef)(null),m=c??p;return(0,s.useEffect)(()=>{let e=m.current;e&&(l&&!e.open&&e.showModal(),!l&&e.open&&e.close())},[l,m]),(0,K.jsxs)(`dialog`,{ref:m,id:d,className:Z(Rae({width:n,placement:r,scroll:i}),e),onClose:()=>u(!1),...o,children:[(0,K.jsx)(DJ,{type:`button`,variant:`ghost`,size:`sm`,icon:$H,"aria-label":f(`uiLibrary.dialog.close`,`Close`),className:`absolute right-4 top-4 z-10 shrink-0`,onClick:()=>u(!1)}),(0,K.jsx)(WK,{id:d,modal:!0,enabled:l,children:a})]})});W3.displayName=`DialogContent`;function G3({className:e,...t}){return(0,K.jsx)(`div`,{className:Z(`flex flex-col gap-1 mb-3 shrink-0 pr-10`,e),...t})}function K3({className:e,...t}){return(0,K.jsx)(`div`,{className:Z(`flex justify-end gap-2 mt-4 shrink-0`,e),...t})}function q3({className:e,...t}){return(0,K.jsx)(`h2`,{className:Z(`text-sm font-semibold text-foreground`,e),...t})}function J3({className:e,...t}){return(0,K.jsx)(`p`,{className:Z(`text-xs text-foreground-muted`,e),...t})}(0,s.lazy)(()=>ls(()=>import(`./MotionZonesSettings-6yXs0YUy.js`).then(e=>({default:e.MotionZonesSettings})),__vite__mapDeps([0,1,2]))),(0,s.lazy)(()=>ls(()=>import(`./PrivacyMaskSettings-D94_J9cQ.js`).then(e=>({default:e.PrivacyMaskSettings})),__vite__mapDeps([3,1,2])));var zae=Object.defineProperty,Y3=Object.getOwnPropertySymbols,X3=Object.prototype.hasOwnProperty,Z3=Object.prototype.propertyIsEnumerable,Q3=(e,t,n)=>t in e?zae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$3=(e,t)=>{for(var n in t||={})X3.call(t,n)&&Q3(e,n,t[n]);if(Y3)for(var n of Y3(t))Z3.call(t,n)&&Q3(e,n,t[n]);return e},e6=(e,t)=>{var n={};for(var r in e)X3.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Y3)for(var r of Y3(e))t.indexOf(r)<0&&Z3.call(e,r)&&(n[r]=e[r]);return n},t6;(e=>{let t=class t{constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError(`Version value out of range`);if(a<-1||a>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let o=[];for(let e=0;e<this.size;e++)o.push(!1);for(let e=0;e<this.size;e++)this.modules.push(o.slice()),this.isFunction.push(o.slice());this.drawFunctionPatterns();let s=this.addEccAndInterleave(r);if(this.drawCodewords(s),a==-1){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);let n=this.getPenaltyScore();n<e&&(a=t,e=n),this.applyMask(t)}}i(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(n,r){let i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,r)}static encodeBinary(n,r){let i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],r)}static encodeSegments(e,r,a=1,s=40,c=-1,l=!0){if(!(t.MIN_VERSION<=a&&a<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw RangeError(`Invalid value`);let u,d;for(u=a;;u++){let n=t.getNumDataCodewords(u,r)*8,i=o.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw RangeError(`Data too long`)}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=t.getNumDataCodewords(u,e)*8&&(r=e);let f=[];for(let t of e){n(t.mode.modeBits,4,f),n(t.numChars,t.mode.numCharCountBits(u),f);for(let e of t.getData())f.push(e)}i(f.length==d);let p=t.getNumDataCodewords(u,r)*8;i(f.length<=p),n(0,Math.min(4,p-f.length),f),n(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.length<p;e^=253)n(e,8,f);let m=[];for(;m.length*8<f.length;)m.push(0);return f.forEach((e,t)=>m[t>>>3]|=e<<7-(t&7)),new t(u,r,m,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)n==0&&r==0||n==0&&r==t-1||n==t-1&&r==0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.errorCorrectionLevel.formatBits<<3|e,n=t;for(let e=0;e<10;e++)n=n<<1^(n>>>9)*1335;let a=(t<<10|n)^21522;i(a>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,r(a,e));this.setFunctionModule(8,7,r(a,6)),this.setFunctionModule(8,8,r(a,7)),this.setFunctionModule(7,8,r(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,r(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,r(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,r(a,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){let n=r(t,e),i=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(i,a,n),this.setFunctionModule(a,i,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a<this.size&&0<=o&&o<this.size&&this.setFunctionModule(a,o,i!=2&&i!=4)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,Math.max(Math.abs(r),Math.abs(n))!=1)}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){let n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw RangeError(`Invalid argument`);let a=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],o=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],s=Math.floor(t.getNumRawDataModules(n)/8),c=a-s%a,l=Math.floor(s/a),u=[],d=t.reedSolomonComputeDivisor(o);for(let n=0,r=0;n<a;n++){let i=e.slice(r,r+l-o+(n<c?0:1));r+=i.length;let a=t.reedSolomonComputeRemainder(i,d);n<c&&i.push(0),u.push(i.concat(a))}let f=[];for(let e=0;e<u[0].length;e++)u.forEach((t,n)=>{(e!=l-o||n>=c)&&f.push(t[e])});return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError(`Invalid argument`);let n=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let i=0;i<this.size;i++)for(let a=0;a<2;a++){let o=t-a,s=t+1&2?i:this.size-1-i;!this.isFunction[s][o]&&n<e.length*8&&(this.modules[s][o]=r(e[n>>>3],7-(n&7)),n++)}}i(n==e.length*8)}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw Error(`Unreachable`)}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[n][o]==r?(i++,i==5?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[n][o],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[o][n]==r?(i++,i==5?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[o][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){let i=this.modules[n][r];i==this.modules[n][r+1]&&i==this.modules[n+1][r]&&i==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(let e of this.modules)n=e.reduce((e,t)=>e+ +!!t,n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return i(0<=a&&a<=9),e+=a*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError(`Version number out of range`);let n=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map(e=>0);for(let i of e){let e=i^r.shift();r.push(0),n.forEach((n,i)=>r[i]^=t.reedSolomonMultiply(n,e))}return r}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return i(n>>>8==0),n}finderPenaltyCountPatterns(e){let t=e[1];i(t<=this.size*3);let n=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return(e>>>t&1)!=0}function i(e){if(!e)throw Error(`Assertion error`)}let a=class e{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}static makeBytes(t){let r=[];for(let e of t)n(e,8,r);return new e(e.Mode.BYTE,t.length,r)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError(`String contains non-numeric characters`);let r=[];for(let e=0;e<t.length;){let i=Math.min(t.length-e,3);n(parseInt(t.substring(e,e+i),10),i*3+1,r),e+=i}return new e(e.Mode.NUMERIC,t.length,r)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw RangeError(`String contains unencodable characters in alphanumeric mode`);let r=[],i;for(i=0;i+2<=t.length;i+=2){let a=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i))*45;a+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i+1)),n(a,11,r)}return i<t.length&&n(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i)),6,r),new e(e.Mode.ALPHANUMERIC,t.length,r)}static makeSegments(t){return t==``?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let r=[];if(t<0)throw RangeError(`ECI assignment value out of range`);if(t<128)n(t,8,r);else if(t<16384)n(2,2,r),n(t,14,r);else if(t<1e6)n(6,3,r),n(t,21,r);else throw RangeError(`ECI assignment value out of range`);return new e(e.Mode.ECI,0,r)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(let r of e){let e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)==`%`?(t.push(parseInt(e.substring(n+1,n+3),16)),n+=2):t.push(e.charCodeAt(n));return t}};a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`;let o=a;e.QrSegment=a})(t6||={}),(e=>{(e=>{let t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})(e.QrCode||={})})(t6||={}),(e=>{(e=>{let t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||={})})(t6||={});var n6=t6,Bae={L:n6.QrCode.Ecc.LOW,M:n6.QrCode.Ecc.MEDIUM,Q:n6.QrCode.Ecc.QUARTILE,H:n6.QrCode.Ecc.HIGH},r6=128,i6=`L`,a6=`#FFFFFF`,o6=`#000000`,s6=!1,c6=1,Vae=4,Hae=0,Uae=.1;function l6(e,t=0){let n=[];return e.forEach(function(e,r){let i=null;e.forEach(function(a,o){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),i=null;return}if(o===e.length-1){if(!a)return;i===null?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`);return}a&&i===null&&(i=o)})}),n.join(``)}function u6(e,t){return e.slice().map((e,n)=>n<t.y||n>=t.y+t.h?e:e.map((e,n)=>n<t.x||n>=t.x+t.w?e:!1))}function Wae(e,t,n,r){if(r==null)return null;let i=e.length+n*2,a=Math.floor(t*Uae),o=i/t,s=(r.width||a)*o,c=(r.height||a)*o,l=r.x==null?e.length/2-s/2:r.x*o,u=r.y==null?e.length/2-c/2:r.y*o,d=r.opacity==null?1:r.opacity,f=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(u);f={x:e,y:t,w:Math.ceil(s+l-e),h:Math.ceil(c+u-t)}}let p=r.crossOrigin;return{x:l,y:u,h:c,w:s,excavation:f,opacity:d,crossOrigin:p}}function Gae(e,t){return t==null?e?Vae:Hae:Math.max(Math.floor(t),0)}function d6({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:a,size:o,boostLevel:c}){let l=s.useMemo(()=>{let r=(Array.isArray(e)?e:[e]).reduce((e,t)=>(e.push(...n6.QrSegment.makeSegments(t)),e),[]);return n6.QrCode.encodeSegments(r,Bae[t],n,void 0,void 0,c)},[e,t,n,c]),{cells:u,margin:d,numCells:f,calculatedImageSettings:p}=s.useMemo(()=>{let e=l.getModules(),t=Gae(r,i);return{cells:e,margin:t,numCells:e.length+t*2,calculatedImageSettings:Wae(e,o,t,a)}},[l,o,a,r,i]);return{qrcode:l,margin:d,cells:u,numCells:f,calculatedImageSettings:p}}var Kae=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),qae=s.forwardRef(function(e,t){let n=e,{value:r,size:i=r6,level:a=i6,bgColor:o=a6,fgColor:c=o6,includeMargin:l=s6,minVersion:u=c6,boostLevel:d,marginSize:f,imageSettings:p}=n,m=e6(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`marginSize`,`imageSettings`]),{style:h}=m,g=e6(m,[`style`]),_=p?.src,v=s.useRef(null),y=s.useRef(null),b=s.useCallback(e=>{v.current=e,typeof t==`function`?t(e):t&&(t.current=e)},[t]),[ee,te]=s.useState(!1),{margin:ne,cells:x,numCells:S,calculatedImageSettings:re}=d6({value:r,level:a,minVersion:u,boostLevel:d,includeMargin:l,marginSize:f,imageSettings:p,size:i});s.useEffect(()=>{if(v.current!=null){let e=v.current,t=e.getContext(`2d`);if(!t)return;let n=x,r=y.current,a=re!=null&&r!==null&&r.complete&&r.naturalHeight!==0&&r.naturalWidth!==0;a&&re.excavation!=null&&(n=u6(x,re.excavation));let s=window.devicePixelRatio||1;e.height=e.width=i*s;let l=i/S*s;t.scale(l,l),t.fillStyle=o,t.fillRect(0,0,S,S),t.fillStyle=c,Kae?t.fill(new Path2D(l6(n,ne))):x.forEach(function(e,n){e.forEach(function(e,r){e&&t.fillRect(r+ne,n+ne,1,1)})}),re&&(t.globalAlpha=re.opacity),a&&t.drawImage(r,re.x+ne,re.y+ne,re.w,re.h)}}),s.useEffect(()=>{te(!1)},[_]);let ie=$3({height:i,width:i},h),ae=null;return _!=null&&(ae=s.createElement(`img`,{src:_,key:_,style:{display:`none`},onLoad:()=>{te(!0)},ref:y,crossOrigin:re?.crossOrigin})),s.createElement(s.Fragment,null,s.createElement(`canvas`,$3({style:ie,height:i,width:i,ref:b,role:`img`},g)),ae)});qae.displayName=`QRCodeCanvas`;var Jae=s.forwardRef(function(e,t){let n=e,{value:r,size:i=r6,level:a=i6,bgColor:o=a6,fgColor:c=o6,includeMargin:l=s6,minVersion:u=c6,boostLevel:d,title:f,marginSize:p,imageSettings:m}=n,h=e6(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`title`,`marginSize`,`imageSettings`]),{margin:g,cells:_,numCells:v,calculatedImageSettings:y}=d6({value:r,level:a,minVersion:u,boostLevel:d,includeMargin:l,marginSize:p,imageSettings:m,size:i}),b=_,ee=null;m!=null&&y!=null&&(y.excavation!=null&&(b=u6(_,y.excavation)),ee=s.createElement(`image`,{href:m.src,height:y.h,width:y.w,x:y.x+g,y:y.y+g,preserveAspectRatio:`none`,opacity:y.opacity,crossOrigin:y.crossOrigin}));let te=l6(b,g);return s.createElement(`svg`,$3({height:i,width:i,viewBox:`0 0 ${v} ${v}`,ref:t,role:`img`},h),!!f&&s.createElement(`title`,null,f),s.createElement(`path`,{fill:o,d:`M0,0 h${v}v${v}H0z`,shapeRendering:`crispEdges`}),s.createElement(`path`,{fill:c,d:te,shapeRendering:`crispEdges`}),ee)});Jae.displayName=`QRCodeSVG`;var Yae=`rounded-lg border border-border bg-surface overflow-hidden`,Xae=`border-b border-border px-3 sm:px-4 py-1.5 sm:py-2`,f6=`p-2 sm:p-3 lg:p-4`,Zae=`flex min-w-0 flex-col gap-0.5 py-1.5 sm:flex-row sm:items-center`,Qae=`min-w-0 text-[11px] leading-tight text-foreground-subtle sm:w-32 sm:shrink-0 sm:pr-2`,$ae=`flex w-full min-w-0 items-center gap-1 sm:flex-1`,eoe=`min-w-0 break-all text-xs text-foreground sm:truncate`,toe=`text-[10px] sm:text-[11px] font-semibold text-foreground uppercase tracking-wider`,noe=`text-[10px] text-foreground-subtle`,roe=`inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 text-[10px] font-medium transition-colors`,ioe=`border-primary/50 bg-primary/15 text-primary`,p6=(0,s.forwardRef)(({className:e,...t},n)=>(0,K.jsx)(`label`,{ref:n,className:Z(`text-[10px] uppercase tracking-wider text-foreground-muted font-medium`,e),...t}));p6.displayName=`Label`;var aoe=TJ(``,{variants:{orientation:{horizontal:`h-px w-full bg-border-subtle`,vertical:`w-px h-full bg-border-subtle`}},defaultVariants:{orientation:`horizontal`}}),ooe=(0,s.forwardRef)(({className:e,orientation:t,...n},r)=>(0,K.jsx)(`div`,{ref:r,role:`separator`,"aria-orientation":t??`horizontal`,className:Z(aoe({orientation:t}),e),...n}));ooe.displayName=`Separator`;var m6=(0,s.forwardRef)(({className:e,...t},n)=>(0,K.jsx)(`input`,{ref:n,type:`checkbox`,className:Z(`w-3.5 h-3.5 rounded-sm border border-border accent-primary`,e),...t}));m6.displayName=`Checkbox`;var soe=(0,s.forwardRef)(({className:e,checked:t,onCheckedChange:n,label:r,...i},a)=>(0,K.jsxs)(`button`,{ref:a,role:`switch`,"aria-checked":t,type:`button`,onClick:()=>n(!t),className:Z(`inline-flex items-center gap-2`,e),...i,children:[(0,K.jsx)(`span`,{className:Z(`w-8 h-4 rounded-full transition-colors`,t?`bg-primary`:`bg-surface-hover`),children:(0,K.jsx)(`span`,{className:Z(`block w-3.5 h-3.5 rounded-full bg-white transition-transform`,t?`translate-x-4`:`translate-x-0.5`)})}),r&&(0,K.jsx)(`span`,{className:`text-xs text-foreground`,children:r})]}));soe.displayName=`Switch`;var coe=(0,s.createContext)(null);function loe(){let e=(0,s.useContext)(coe);if(!e)throw Error(`Tabs compound components must be used within <Tabs>`);return e}(0,s.forwardRef)(function({value:e,className:t,...n},r){let{value:i,setValue:a,appearance:o}=loe(),s=e===i;return(0,K.jsx)(`button`,{ref:r,type:`button`,role:`tab`,"aria-selected":s,"aria-controls":`tabpanel-${e}`,tabIndex:s?0:-1,className:Z(`inline-flex h-7 shrink-0 items-center justify-center gap-1.5 whitespace-nowrap text-xs px-3 transition-colors`,o===`pills`?s?`rounded-md bg-primary/10 font-medium text-primary`:`rounded-md text-foreground-muted hover:bg-surface-hover hover:text-foreground`:s?`border-b-2 border-primary text-foreground font-medium`:`text-foreground-muted hover:text-foreground`,t),onClick:()=>a(e),...n})});var uoe=(0,s.forwardRef)(({className:e,...t},n)=>(0,K.jsx)(`div`,{ref:n,className:Z(`overflow-auto [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-surface-hover [&::-webkit-scrollbar-thumb]:rounded-full`,e),...t}));uoe.displayName=`ScrollArea`;function doe({page:e,labels:t,onPageChange:n}){let r=e.page===0,i=e.page>=e.pageCount-1;return(0,K.jsxs)(`nav`,{"aria-label":t.navLabel,className:`flex items-center justify-end gap-2 pt-2`,children:[(0,K.jsx)(`span`,{"aria-live":`polite`,className:`text-[11px] tabular-nums text-foreground-subtle`,children:t.range(e.from,e.to,e.total)}),(0,K.jsx)(DJ,{type:`button`,variant:`outline`,size:`sm`,icon:eV,"aria-label":t.previous,title:t.previous,disabled:r,onClick:()=>n(e.page-1)}),(0,K.jsx)(DJ,{type:`button`,variant:`outline`,size:`sm`,icon:tV,"aria-label":t.next,title:t.next,disabled:i,onClick:()=>n(e.page+1)})]})}function foe(e,t,n){let r=Math.max(1,Math.floor(n)),i=e.length,a=Math.max(1,Math.ceil(i/r)),o=Math.min(Math.max(0,Math.floor(t)),a-1),s=o*r,c=e.slice(s,s+r);return{pageRows:c,page:o,pageCount:a,from:c.length===0?0:s+1,to:s+c.length,total:i}}var poe={navLabel:`Table pages`,previous:`Previous page`,next:`Next page`,range:(e,t,n)=>`${e}–${t} of ${n}`},moe=`__select`,h6=`cursor-pointer align-middle`;function hoe({checked:e,indeterminate:t,disabled:n,label:r,onToggle:i}){let a=(0,s.useRef)(null);return(0,s.useEffect)(()=>{a.current!==null&&(a.current.indeterminate=t)},[t]),(0,K.jsx)(m6,{ref:a,"aria-label":r,checked:e,disabled:n,onChange:i,className:h6})}function goe(e,t,n){let r=e.isSelectable??(()=>!0),i=t.filter(r).map(n),a=i.filter(t=>e.selected.has(t)).length,o=i.length>0&&a===i.length,s=()=>{let t=new Set(e.selected);for(let e of i)o?t.delete(e):t.add(e);e.onChange(t)},c=t=>{let n=new Set(e.selected);n.has(t)?n.delete(t):n.add(t),e.onChange(n)};return{key:moe,width:`w-8`,headerRender:()=>(0,K.jsx)(hoe,{checked:o,indeterminate:a>0&&!o,disabled:i.length===0,label:e.pageLabel,onToggle:s}),render:t=>{if(!r(t))return null;let i=n(t);return(0,K.jsx)(m6,{"aria-label":e.rowLabel(t),checked:e.selected.has(i),onChange:()=>c(i),onClick:e=>e.stopPropagation(),className:h6})}}}function _oe({label:e,active:t,dir:n,onSort:r}){return(0,K.jsxs)(`button`,{type:`button`,onClick:r,className:`group/sort inline-flex items-center gap-0.5 hover:text-foreground transition-colors`,children:[(0,K.jsx)(`span`,{children:e}),t?n===`asc`?(0,K.jsx)(nV,{className:`h-3 w-3 flex-shrink-0`}):(0,K.jsx)($B,{className:`h-3 w-3 flex-shrink-0`}):(0,K.jsx)(nV,{className:Z(`h-3 w-3 flex-shrink-0 opacity-0 transition-opacity`,`group-hover/sort:opacity-30`)})]})}function voe(e,t){return!e||t===null?`asc`:t===`asc`?`desc`:null}function yoe(e,t){let n=voe(e!==null&&e.columnKey===t,e===null?null:e.dir);return n===null?null:{columnKey:t,dir:n}}function boe(e,t){return typeof e==`number`&&typeof t==`number`?e-t:String(e).localeCompare(String(t))}function xoe(e,t,n){if(t===null)return[...e];let r=t.dir===`asc`?1:-1;return e.toSorted((e,t)=>{let i=n(e),a=n(t);return i===null||a===null?i===a?0:i===null?1:-1:r*boe(i,a)})}function Soe(e,t){return e===null||e.columnKey!==t?`none`:e.dir===`asc`?`ascending`:`descending`}var g6={left:`text-left`,right:`text-right`,center:`text-center`};function Coe({columns:e,rows:t,rowKey:n,onRowClick:r,minWidthPx:i=480,emptyMessage:a,className:o,bordered:c=!0,rowClassName:l,maxBodyHeight:u,fill:d=!1,defaultSort:f,sort:p,onSortChange:m,pageSize:h,page:g,onPageChange:_,paginationLabels:v=poe,selection:y,renderExpanded:b,isExpanded:ee}){let[te,ne]=(0,s.useState)(f??null),[x,S]=(0,s.useState)(0),re=p===void 0?te:p,ie=e=>{p===void 0&&ne(e),m?.(e)},ae=e=>{g===void 0&&S(e),_?.(e)},oe=d||u!==void 0,se=d?`h-full min-h-0`:u??``,ce=(0,s.useMemo)(()=>re===null?void 0:e.find(e=>e.key===re.columnKey&&e.sortValue!==void 0),[e,re]),le=ce?.sortValue,ue=(0,s.useMemo)(()=>le===void 0?t:xoe(t,re,le),[t,re,le]),de=ce===void 0?null:re,fe=h===void 0?null:foe(ue,g??x,h),C=fe===null?ue:fe.pageRows,pe=fe!==null&&fe.pageCount>1?(0,K.jsx)(doe,{page:fe,labels:v,onPageChange:ae}):null,w=y===void 0?e:[goe(y,C,e=>String(n?n(e,t.indexOf(e)):t.indexOf(e))),...e];if(t.length===0&&a)return(0,K.jsx)(`div`,{className:`rounded-lg ${c?`border border-border`:``} bg-surface px-3 py-4 text-xs text-foreground-subtle text-center ${o??``}`,children:a});if(t.length===0)return null;let me=(0,K.jsx)(`div`,{className:[`rounded-lg`,c?`border border-border`:``,`bg-surface overflow-x-auto`,oe?`${se} overflow-y-auto`:``,d?`min-h-0 flex-1`:``,!d&&pe===null?o??``:``].filter(Boolean).join(` `),children:(0,K.jsxs)(`table`,{className:`w-full text-xs ${oe?`border-separate border-spacing-0`:``}`,style:{minWidth:`${i}px`},children:[(0,K.jsx)(`thead`,{className:`bg-surface`,children:(0,K.jsx)(`tr`,{children:w.map(e=>{let t=e.align??`left`,n=e.nowrap??!0,r=e.sortValue!==void 0,i=de!==null&&de.columnKey===e.key;return(0,K.jsx)(`th`,{"aria-sort":r?Soe(de,e.key):void 0,title:r?void 0:e.notSortableReason,className:[`px-3 py-2 text-foreground-subtle font-medium bg-surface border-b border-border`,oe?`sticky top-0 z-10`:``,g6[t],n?`whitespace-nowrap`:``,e.width??``].filter(Boolean).join(` `),children:r?(0,K.jsx)(_oe,{label:e.headerRender?e.headerRender():e.header,active:i,dir:i&&de!==null?de.dir:`asc`,onSort:()=>ie(yoe(re,e.key))}):e.headerRender?e.headerRender():e.header},e.key)})})}),(0,K.jsx)(`tbody`,{children:C.map((e,t)=>{let i=n?n(e,t):t,a=l?.(e,t)??``,o=r!==void 0,c=b!==void 0&&ee?.(e)===!0?b(e,t):null;return(0,K.jsxs)(s.Fragment,{children:[(0,K.jsx)(`tr`,{onClick:o?()=>r(e,t):void 0,className:[o?`cursor-pointer hover:bg-primary/5`:`hover:bg-primary/5`,a].filter(Boolean).join(` `),children:w.map(n=>{let r=n.align??`left`,i=n.nowrap??!0;return(0,K.jsx)(`td`,{"data-cell":n.key,className:[`px-3 py-2 text-foreground border-b border-border`,g6[r],i?`whitespace-nowrap`:``].filter(Boolean).join(` `),children:n.render(e,t)},n.key)})}),c!==null&&(0,K.jsx)(`tr`,{"data-expanded-row":``,className:`bg-surface`,children:(0,K.jsx)(`td`,{colSpan:w.length,className:`border-b border-border px-3 py-2`,children:c})})]},i)})})]})});return pe===null?d?(0,K.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col ${o??``}`,children:me}):me:(0,K.jsxs)(`div`,{className:d?`flex min-h-0 flex-1 flex-col ${o??``}`:o,children:[me,pe]})}function _6({label:e,children:t,actions:n,elements:r=`plain`,className:i,valueClassName:a}){let o=r===`description`?`dt`:`span`,s=r===`description`?`dd`:`div`;return(0,K.jsxs)(`div`,{"data-setting-row":``,className:Z(Zae,i),children:[(0,K.jsx)(o,{"data-setting-row-label":``,className:Qae,children:e}),(0,K.jsxs)(s,{"data-setting-row-value":``,className:$ae,children:[(0,K.jsx)(`span`,{"data-setting-row-value-text":``,className:Z(eoe,a),children:t}),n!==void 0&&(0,K.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,children:n})]})]})}function v6({headingId:e,title:t,icon:n,actions:r,testId:i,children:a}){return(0,K.jsxs)(`section`,{"aria-labelledby":e,className:Yae,"data-testid":i,children:[(0,K.jsxs)(`header`,{className:`${Xae} flex min-h-9 flex-wrap items-center gap-2`,children:[n!==void 0&&(0,K.jsx)(n,{className:`h-3.5 w-3.5 shrink-0 text-foreground-subtle`,"aria-hidden":!0}),(0,K.jsx)(`h2`,{id:e,className:`${toe} min-w-0 flex-1`,children:t}),r]}),a]})}var woe=5*6e4,Toe=720*6e4,Eoe=`camstack:turn-servers:v1`;function Doe(){let e=globalThis;try{return e.localStorage??null}catch{return null}}function Ooe(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.fetchedAt!=`number`||!Array.isArray(t.servers)?!1:t.servers.every(e=>{if(typeof e!=`object`||!e)return!1;let t=e;return!(!(typeof t.urls==`string`||Array.isArray(t.urls)&&t.urls.every(e=>typeof e==`string`))||t.username!==void 0&&typeof t.username!=`string`||t.credential!==void 0&&typeof t.credential!=`string`)})}new class{freshTtlMs;staleCapMs;storage;now;storageKey;memory=new WeakMap;inflight=new WeakMap;constructor(e={}){this.freshTtlMs=e.freshTtlMs??woe,this.staleCapMs=e.staleCapMs??Toe,this.storage=`storage`in e?e.storage??null:Doe(),this.now=e.now??(()=>Date.now()),this.storageKey=e.storageKey??Eoe}async getOrFetch(e,t){let n=this.now(),r=this.memory.get(e)??this.readStorage();if(r){let i=n-r.fetchedAt;if(i<this.freshTtlMs)return r.servers;if(i<this.staleCapMs)return this.startFetch(e,t,r),r.servers}return this.startFetch(e,t,r)}startFetch(e,t,n){let r=this.inflight.get(e);if(r)return r;let i=(async()=>{try{let n=await t();if(n.length>0){let t={servers:n,fetchedAt:this.now()};this.memory.set(e,t),this.writeStorage(t)}return n}catch{return n?.servers}})().finally(()=>{this.inflight.delete(e)});return this.inflight.set(e,i),i}readStorage(){if(this.storage)try{let e=this.storage.getItem(this.storageKey);if(e===null)return;let t=JSON.parse(e);return Ooe(t)?t:void 0}catch{return}}writeStorage(e){if(this.storage)try{this.storage.setItem(this.storageKey,JSON.stringify(e))}catch{}}};var y6=[`day`,`ir`],koe={day:{labelKey:`uiLibrary.sceneMonitor.variant.day`,labelFallback:`Daylight`},ir:{labelKey:`uiLibrary.sceneMonitor.variant.ir`,labelFallback:`Night (IR)`},night:{labelKey:`uiLibrary.sceneMonitor.variant.night`,labelFallback:`Night`},dawn:{labelKey:`uiLibrary.sceneMonitor.variant.dawn`,labelFallback:`Dawn`},dusk:{labelKey:`uiLibrary.sceneMonitor.variant.dusk`,labelFallback:`Dusk`}};function b6(e,t=i){let n=koe[e];return n===void 0?e:t(n.labelKey,n.labelFallback)}function Aoe(e,t=i){let n=new Set(e.coveredConditions),r=y6.map(e=>`${b6(e,t)} ${n.has(e)?`✓`:`✗`}`),a=[...n].filter(e=>!y6.some(t=>t===e));for(let e of a)r.push(`${b6(e,t)} ✓`);let o=y6.filter(e=>!n.has(e));if(o.length===0)return r.join(` · `);if(n.size===0)return t(`uiLibrary.sceneMonitor.coverage.empty`,`{{parts}} — nothing captured yet, so this scene is not watching.`,{parts:r.join(` · `)});let[s=``,c]=o.map(e=>b6(e,t).toLowerCase()),l=c===void 0?s:t(`uiLibrary.sceneMonitor.coverage.namesJoin`,`{{first}} and {{second}}`,{first:s,second:c}),u={parts:r.join(` · `),names:l};return e.onUncoveredCondition===`judge-anyway`?t(`uiLibrary.sceneMonitor.coverage.judgeAnyway`,`{{parts}} — {{names}} judged against the references you do have.`,u):t(`uiLibrary.sceneMonitor.coverage.skip`,`{{parts}} — optional; checks in {{names}} are skipped.`,u)}function joe(e,t=i){return e.suspendedCondition===null?null:t(`uiLibrary.sceneMonitor.suspension`,`Paused — nothing was captured in {{light}}, so checks are on hold until the light changes back. Capture {{light}} if you want it watched around the clock.`,{light:b6(e.suspendedCondition,t).toLowerCase()})}var Moe={"no-reference-for-condition":{key:`uiLibrary.sceneMonitor.unavailable.no_reference_for_condition`,fallback:`can’t tell — nothing has been captured for this scene yet. Press “Capture daylight” to photograph what normal looks like.`},"view-shifted":{key:`uiLibrary.sceneMonitor.unavailable.view_shifted`,fallback:`can’t tell — the camera view has moved since the reference was captured. Re-capture it.`},"no-vision-profile":{key:`uiLibrary.sceneMonitor.unavailable.no_vision_profile`,fallback:`can’t tell — the vision model is unreachable, so the change is on hold.`},"encoder-model-changed":{key:`uiLibrary.sceneMonitor.unavailable.encoder_model_changed`,fallback:`can’t tell — the embedding model changed, so the stored references are unreadable. Re-capture them.`},"no-snapshot":{key:`uiLibrary.sceneMonitor.unavailable.no_snapshot`,fallback:`can’t tell — this camera did not return a frame.`}};function Noe(e,t,n=i){if(e.states.length===0)return n(`uiLibrary.sceneMonitor.status.notArmed`,`Not armed yet — capture the initial state to start watching.`);if(e.verdict===`unknown`){if(e.unavailable===null)return n(`uiLibrary.sceneMonitor.status.cantTellNow`,`can’t tell right now.`);let t=Moe[e.unavailable];return n(t.key,t.fallback)}let r=e.verdict===`diverged`?e.divergedAt:e.armedAt,a=r===null?``:` ${n(`uiLibrary.sceneMonitor.status.heldFor`,`for {{duration}}`,{duration:Loe(Math.max(0,t-r))})}`;if(e.latched)return e.verdict===`diverged`?n(`uiLibrary.sceneMonitor.status.changedLatched`,`CHANGED{{held}} — press Reset when you have dealt with it.`,{held:a}):n(`uiLibrary.sceneMonitor.status.backToNormal`,`Back to normal, but still flagged as changed{{held}}. Press Reset to clear it.`,{held:a});let o=joe(e,n);return o===null?e.verdict===`diverged`?n(`uiLibrary.sceneMonitor.status.changed`,`CHANGED{{held}}`,{held:a}):n(`uiLibrary.sceneMonitor.status.normal`,`Normal{{held}}`,{held:a}):o}function Poe(e,t=i){return e.states.length===0?{text:t(`uiLibrary.sceneMonitor.badge.notArmed`,`Not armed`),tone:`unknown`}:e.latched?{text:t(`uiLibrary.sceneMonitor.badge.changed`,`Changed`),tone:`alarm`}:e.suspendedCondition===null?e.verdict===`unknown`?{text:t(`uiLibrary.sceneMonitor.badge.cantTell`,`Can’t tell`),tone:`unknown`}:e.verdict===`diverged`?{text:t(`uiLibrary.sceneMonitor.badge.changed`,`Changed`),tone:`alarm`}:{text:t(`uiLibrary.sceneMonitor.badge.normal`,`Normal`),tone:`ok`}:{text:t(`uiLibrary.sceneMonitor.badge.paused`,`Paused`),tone:`unknown`}}var Foe=.4;function Ioe(e){return e.width*e.height>Foe}function Loe(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<48?`${r}h`:`${Math.floor(r/24)}d`}function Roe({label:e,icon:n,title:r,description:i,confirmLabel:a,triggerVariant:o=`outline`,confirmVariant:c=`danger`,size:l=`sm`,disabled:u,className:d,action:f,onSuccess:p}){let m=t(),[h,g]=(0,s.useState)(!1),[_,v]=(0,s.useState)(!1),[y,b]=(0,s.useState)(null),ee=async()=>{b(null),v(!0);try{let e=await f();p?.(e),g(!1)}catch(e){b(e instanceof Error?e.message:String(e))}finally{v(!1)}};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(WJ,{type:`button`,variant:o,size:l,disabled:u,onClick:()=>{b(null),g(!0)},className:d,children:[n&&(0,K.jsx)(n,{className:`h-3.5 w-3.5`}),e]}),(0,K.jsx)(U3,{open:h,onOpenChange:e=>!_&&g(e),children:(0,K.jsxs)(W3,{children:[(0,K.jsxs)(G3,{children:[(0,K.jsxs)(q3,{className:`flex items-center gap-2`,children:[(0,K.jsx)(BH,{className:`h-4 w-4 text-amber-400`}),r??m(`uiLibrary.confirmActionButton.defaultTitle`,`Confirm action`)]}),typeof i==`string`?(0,K.jsx)(J3,{children:i}):i]}),y&&(0,K.jsx)(`div`,{className:Z(`mt-2 px-3 py-2 rounded border border-danger/40 bg-danger/10`,`text-xs text-danger`),children:y}),(0,K.jsxs)(K3,{children:[(0,K.jsx)(WJ,{type:`button`,variant:`ghost`,size:l,disabled:_,onClick:()=>g(!1),children:m(`uiLibrary.confirmActionButton.cancel`,`Cancel`)}),(0,K.jsxs)(WJ,{type:`button`,variant:c,size:l,disabled:_,onClick:()=>{ee()},children:[_&&(0,K.jsx)(BV,{className:`h-3.5 w-3.5 animate-spin`}),a??e]})]})]})})]})}var x6=Cx(),zoe=new Set([`live`,`recording`,`heatmapScrub`]);Object.freeze(Object.fromEntries(_x.filter(e=>!zoe.has(e)).map(e=>[e,Tx(x6.swatches,x6.fallbacks,e)])));function Boe(e){let t=e[0];if(t===void 0)throw Error(`display palette has no fallback colour`);return t}Boe(x6.fallbacks),Cx(),(0,s.createContext)({status:`absent`});var Voe=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},S6=class{constructor(e){this.generateIdentifier=e,this.kv=new Voe}register(e,t){this.kv.getByValue(e)||(t||=this.generateIdentifier(e),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}},Hoe=class extends S6{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t==`object`?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function Uoe(e){if(`values`in Object)return Object.values(e);let t=[];for(let n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function Woe(e,t){let n=Uoe(e);if(`find`in n)return n.find(t);let r=n;for(let e=0;e<r.length;e++){let n=r[e];if(t(n))return n}}function C6(e,t){Object.entries(e).forEach(([e,n])=>t(n,e))}function w6(e,t){return e.indexOf(t)!==-1}function T6(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(t(r))return r}}var Goe=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return Woe(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},Koe=e=>Object.prototype.toString.call(e).slice(8,-1),E6=e=>e===void 0,qoe=e=>e===null,D6=e=>typeof e!=`object`||!e||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,O6=e=>D6(e)&&Object.keys(e).length===0,k6=e=>Array.isArray(e),Joe=e=>typeof e==`string`,Yoe=e=>typeof e==`number`&&!isNaN(e),Xoe=e=>typeof e==`boolean`,Zoe=e=>e instanceof RegExp,A6=e=>e instanceof Map,j6=e=>e instanceof Set,M6=e=>Koe(e)===`Symbol`,Qoe=e=>e instanceof Date&&!isNaN(e.valueOf()),N6=e=>e instanceof Error,P6=e=>typeof e==`number`&&isNaN(e),$oe=e=>Xoe(e)||qoe(e)||E6(e)||Yoe(e)||Joe(e)||M6(e),ese=e=>typeof e==`bigint`,tse=e=>e===1/0||e===-1/0,nse=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),rse=e=>e instanceof URL,F6=e=>e.replace(/\\/g,`\\\\`).replace(/\./g,`\\.`),I6=e=>e.map(String).map(F6).join(`.`),L6=(e,t)=>{let n=[],r=``;for(let i=0;i<e.length;i++){let a=e.charAt(i);if(!t&&a===`\\`){let t=e.charAt(i+1);if(t===`\\`){r+=`\\`,i++;continue}else if(t!==`.`)throw Error(`invalid path`)}if(a===`\\`&&e.charAt(i+1)===`.`){r+=`.`,i++;continue}if(a===`.`){n.push(r),r=``;continue}r+=a}let i=r;return n.push(i),n};function R6(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var z6=[R6(E6,`undefined`,()=>null,()=>void 0),R6(ese,`bigint`,e=>e.toString(),e=>typeof BigInt<`u`?BigInt(e):(console.error(`Please add a BigInt polyfill.`),e)),R6(Qoe,`Date`,e=>e.toISOString(),e=>new Date(e)),R6(N6,`Error`,(e,t)=>{let n={name:e.name,message:e.message};return`cause`in e&&(n.cause=e.cause),t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n},(e,t)=>{let n=Error(e.message,{cause:e.cause});return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n}),R6(Zoe,`regexp`,e=>``+e,e=>{let t=e.slice(1,e.lastIndexOf(`/`)),n=e.slice(e.lastIndexOf(`/`)+1);return new RegExp(t,n)}),R6(j6,`set`,e=>[...e.values()],e=>new Set(e)),R6(A6,`map`,e=>[...e.entries()],e=>new Map(e)),R6(e=>P6(e)||tse(e),`number`,e=>P6(e)?`NaN`:e>0?`Infinity`:`-Infinity`,Number),R6(e=>e===0&&1/e==-1/0,`number`,()=>`-0`,Number),R6(rse,`URL`,e=>e.toString(),e=>new URL(e))];function B6(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var V6=B6((e,t)=>M6(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>[`symbol`,t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{let r=n.symbolRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown symbol`);return r}),ise=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),H6=B6(nse,e=>[`typed-array`,e.constructor.name],e=>[...e],(e,t)=>{let n=ise[t[1]];if(!n)throw Error(`Trying to deserialize unknown typed array`);return new n(e)});function U6(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var W6=B6(U6,(e,t)=>[`class`,t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{let n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};let r={};return n.forEach(t=>{r[t]=e[t]}),r},(e,t,n)=>{let r=n.classRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),G6=B6((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>[`custom`,t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{let r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw Error(`Trying to deserialize unknown custom value`);return r.deserialize(e)}),ase=[W6,V6,G6,H6],K6=(e,t)=>{let n=T6(ase,n=>n.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};let r=T6(z6,n=>n.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},q6={};z6.forEach(e=>{q6[e.annotation]=e});var ose=(e,t,n)=>{if(k6(t))switch(t[0]){case`symbol`:return V6.untransform(e,t,n);case`class`:return W6.untransform(e,t,n);case`custom`:return G6.untransform(e,t,n);case`typed-array`:return H6.untransform(e,t,n);default:throw Error(`Unknown transformation: `+t)}else{let r=q6[t];if(!r)throw Error(`Unknown transformation: `+t);return r.untransform(e,n)}},J6=(e,t)=>{if(t>e.size)throw Error(`index out of bounds`);let n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function Y6(e){if(w6(e,`__proto__`))throw Error(`__proto__ is not allowed as a property`);if(w6(e,`prototype`))throw Error(`prototype is not allowed as a property`);if(w6(e,`constructor`))throw Error(`constructor is not allowed as a property`)}var sse=(e,t)=>{Y6(t);for(let n=0;n<t.length;n++){let r=t[n];if(j6(e))e=J6(e,+r);else if(A6(e)){let i=+r,a=+t[++n]==0?`key`:`value`,o=J6(e,i);switch(a){case`key`:e=o;break;case`value`:e=e.get(o);break}}else e=e[r]}return e},X6=(e,t,n)=>{if(Y6(t),t.length===0)return n(e);let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(k6(r)){let e=+n;r=r[e]}else if(D6(r))r=r[n];else if(j6(r)){let e=+n;r=J6(r,e)}else if(A6(r)){if(e===t.length-2)break;let i=+n,a=+t[++e]==0?`key`:`value`,o=J6(r,i);switch(a){case`key`:r=o;break;case`value`:r=r.get(o);break}}}let i=t[t.length-1];if(k6(r)?r[+i]=n(r[+i]):D6(r)&&(r[i]=n(r[i])),j6(r)){let e=J6(r,+i),t=n(e);e!==t&&(r.delete(e),r.add(t))}if(A6(r)){let e=+t[t.length-2],a=J6(r,e);switch(+i==0?`key`:`value`){case`key`:{let e=n(a);r.set(e,r.get(a)),e!==a&&r.delete(a);break}case`value`:r.set(a,n(r.get(a)));break}}return e},Z6=e=>e<1;function Q6(e,t,n,r=[]){if(!e)return;let i=Z6(n);if(!k6(e)){C6(e,(e,a)=>Q6(e,t,n,[...r,...L6(a,i)]));return}let[a,o]=e;o&&C6(o,(e,a)=>{Q6(e,t,n,[...r,...L6(a,i)])}),t(a,r)}function cse(e,t,n,r){return Q6(t,(t,n)=>{e=X6(e,n,e=>ose(e,t,r))},n),e}function lse(e,t,n){let r=Z6(n);function i(t,n){let i=sse(e,L6(n,r));t.map(e=>L6(e,r)).forEach(t=>{e=X6(e,t,()=>i)})}if(k6(t)){let[n,a]=t;n.forEach(t=>{e=X6(e,L6(t,r),()=>e)}),a&&C6(a,i)}else C6(t,i);return e}var use=(e,t)=>D6(e)||k6(e)||A6(e)||j6(e)||N6(e)||U6(e,t);function dse(e,t,n){let r=n.get(e);r?r.push(t):n.set(e,[t])}function fse(e,t){let n={},r;return e.forEach(e=>{if(e.length<=1)return;t||(e=e.map(e=>e.map(String)).sort((e,t)=>e.length-t.length));let[i,...a]=e;i.length===0?r=a.map(I6):n[I6(i)]=a.map(I6)}),r?O6(n)?[r]:[r,n]:O6(n)?void 0:n}var $6=(e,t,n,r,i=[],a=[],o=new Map)=>{let s=$oe(e);if(!s){dse(e,i,t);let n=o.get(e);if(n)return r?{transformedValue:null}:n}if(!use(e,n)){let t=K6(e,n),r=t?{transformedValue:t.value,annotations:[t.type]}:{transformedValue:e};return s||o.set(e,r),r}if(w6(a,e))return{transformedValue:null};let c=K6(e,n),l=c?.value??e,u=k6(l)?[]:{},d={};C6(l,(s,c)=>{if(c===`__proto__`||c===`constructor`||c===`prototype`)throw Error(`Detected property ${c}. This is a prototype pollution risk, please remove it from your object.`);let l=$6(s,t,n,r,[...i,c],[...a,e],o);u[c]=l.transformedValue,k6(l.annotations)?d[F6(c)]=l.annotations:D6(l.annotations)&&C6(l.annotations,(e,t)=>{d[F6(c)+`.`+t]=e})});let f=O6(d)?{transformedValue:u,annotations:c?[c.type]:void 0}:{transformedValue:u,annotations:c?[c.type,d]:d};return s||o.set(e,f),f};function e8(e){return Object.prototype.toString.call(e).slice(8,-1)}function t8(e){return e8(e)===`Array`}function pse(e){if(e8(e)!==`Object`)return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function mse(e,t,n,r,i){let a={}.propertyIsEnumerable.call(r,t)?`enumerable`:`nonenumerable`;a===`enumerable`&&(e[t]=n),i&&a===`nonenumerable`&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function n8(e,t={}){if(t8(e))return e.map(e=>n8(e,t));if(!pse(e))return e;let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((n,r)=>{if(r===`__proto__`||t8(t.props)&&!t.props.includes(r))return n;let i=e[r];return mse(n,r,n8(i,t),e,t.nonenumerable),n},{})}var r8=class{constructor({dedupe:e=!1}={}){this.classRegistry=new Hoe,this.symbolRegistry=new S6(e=>e.description??``),this.customTransformerRegistry=new Goe,this.allowedErrorProps=[],this.dedupe=e}serialize(e){let t=new Map,n=$6(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});let i=fse(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r.meta&&(r.meta.v=1),r}deserialize(e,t){let{json:n,meta:r}=e,i=t?.inPlace?n:n8(n);return r?.values&&(i=cse(i,r.values,r.v??0,this)),r?.referentialEqualities&&(i=lse(i,r.referentialEqualities,r.v??0)),i}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e),{inPlace:!0})}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};r8.defaultInstance=new r8,r8.serialize=r8.defaultInstance.serialize.bind(r8.defaultInstance),r8.deserialize=r8.defaultInstance.deserialize.bind(r8.defaultInstance),r8.stringify=r8.defaultInstance.stringify.bind(r8.defaultInstance),r8.parse=r8.defaultInstance.parse.bind(r8.defaultInstance),r8.registerClass=r8.defaultInstance.registerClass.bind(r8.defaultInstance),r8.registerSymbol=r8.defaultInstance.registerSymbol.bind(r8.defaultInstance),r8.registerCustom=r8.defaultInstance.registerCustom.bind(r8.defaultInstance),r8.allowErrorProps=r8.defaultInstance.allowErrorProps.bind(r8.defaultInstance),r8.serialize,r8.deserialize,r8.stringify,r8.parse,r8.registerClass,r8.registerCustom,r8.registerSymbol,r8.allowErrorProps;var hse=function(e){return e.Motion=`motion`,e.Person=`person`,e.Vehicle=`vehicle`,e.Animal=`animal`,e.Audio=`audio`,e.Face=`face`,e.Plate=`plate`,e.Package=`package`,e.Doorbell=`doorbell`,e.Sensor=`sensor`,e}({}),gse=`animal.dog_cat.dog.cat.horse.sheep.cow.elephant.bear.zebra.giraffe.mouse.rabbit.deer.lion.tiger.bird.eagle.owl.pigeon.fish.whale.dolphin.snake.turtle.lizard`.split(`.`),_se=[`person`,`people`,`pedestrian`,`rider`,`driver`,`cyclist`,`skier`,`skateboarder`,`face`,`hand`,`head`,`body`],vse=[`vehicle`,`car`,`truck`,`bus`,`motorcycle`,`bicycle`,`van`,`ambulance`,`police_car`,`fire_truck`,`train`,`subway`,`tram`,`airplane`,`boat`,`ship`,`helicopter`],yse=`face.eyes.nose.mouth.ears.eyebrows.left_eye.right_eye.pupil.iris.eyelid.eye_corner.upper_lip.lower_lip.teeth.chin.cheek.forehead.jaw.glasses.sunglasses.facial_hair.beard.mustache.facial_landmark.facial_keypoint`.split(`.`),bse=[`plate`,`license_plate`,`front_plate`,`rear_plate`,`motorcycle_plate`,`temporary_plate`,`dealer_plate`,`licensePlate`,`plate_number`,`plate_character`,`plate_digit`,`plate_letter`,`plate_symbol`,`plate_region`,`plate_country_identifier`,`plate_frame`,`plate_bolt`,`plate_sticker`,`plate_validation_tag`,`damaged_plate`,`obscured_plate`,`dirty_plate`],xse=[`motion`,`movement`,`other`],Sse=[`package`,`packet`],Cse=[`audio`],wse=`speech.scream.babbling.yell.bellow.whoop.whispering.laughter.snicker.crying.cry.sigh.singing.choir.chant.mantra.child_singing.rapping.humming.groan.grunt.whistling.breathing.wheeze.snoring.gasp.pant.snort.cough.throat_clearing.sneeze.sniff.cheering.applause.chatter.crowd.children_playing.bark.yip.howl.bow-wow.growling.whimper_dog.purr.meow.hiss.caterwaul.pets.livestock.doorbell.ding-dong.door.slam.knock.alarm.telephone.music.dog.dogs`.split(`.`),Tse=[`doorbell`,`ring`],Ese=[`lock`,`binary`,`flood`,`entry`,`door`,`leak`,`door_open`,`flooded`,`entry_open`];({...gse.reduce((e,t)=>({...e,[t]:`animal`}),{}),..._se.reduce((e,t)=>({...e,[t]:`person`}),{}),...vse.reduce((e,t)=>({...e,[t]:`vehicle`}),{}),...xse.reduce((e,t)=>({...e,[t]:`motion`}),{}),...Sse.reduce((e,t)=>({...e,[t]:`package`}),{}),...yse.reduce((e,t)=>({...e,[t]:`face`}),{}),...bse.reduce((e,t)=>({...e,[t]:`plate`}),{}),...Cse.reduce((e,t)=>({...e,[t]:`audio`}),{}),...wse.reduce((e,t)=>({...e,[t]:`audio`}),{}),...Tse.reduce((e,t)=>({...e,[t]:`doorbell`}),{}),...Ese.reduce((e,t)=>({...e,[t]:`sensor`}),{})}),[...Object.values(hse).filter(e=>e!==`motion`)];var Dse=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},i8=class{constructor(e){this.generateIdentifier=e,this.kv=new Dse}register(e,t){this.kv.getByValue(e)||(t||=this.generateIdentifier(e),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}},Ose=class extends i8{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t==`object`?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function kse(e){if(`values`in Object)return Object.values(e);let t=[];for(let n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function Ase(e,t){let n=kse(e);if(`find`in n)return n.find(t);let r=n;for(let e=0;e<r.length;e++){let n=r[e];if(t(n))return n}}function a8(e,t){Object.entries(e).forEach(([e,n])=>t(n,e))}function o8(e,t){return e.indexOf(t)!==-1}function s8(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(t(r))return r}}var jse=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return Ase(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},Mse=e=>Object.prototype.toString.call(e).slice(8,-1),c8=e=>e===void 0,Nse=e=>e===null,l8=e=>typeof e!=`object`||!e||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,u8=e=>l8(e)&&Object.keys(e).length===0,d8=e=>Array.isArray(e),Pse=e=>typeof e==`string`,Fse=e=>typeof e==`number`&&!isNaN(e),Ise=e=>typeof e==`boolean`,Lse=e=>e instanceof RegExp,f8=e=>e instanceof Map,p8=e=>e instanceof Set,m8=e=>Mse(e)===`Symbol`,Rse=e=>e instanceof Date&&!isNaN(e.valueOf()),h8=e=>e instanceof Error,g8=e=>typeof e==`number`&&isNaN(e),zse=e=>Ise(e)||Nse(e)||c8(e)||Fse(e)||Pse(e)||m8(e),Bse=e=>typeof e==`bigint`,Vse=e=>e===1/0||e===-1/0,Hse=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Use=e=>e instanceof URL,_8=e=>e.replace(/\\/g,`\\\\`).replace(/\./g,`\\.`),v8=e=>e.map(String).map(_8).join(`.`),y8=(e,t)=>{let n=[],r=``;for(let i=0;i<e.length;i++){let a=e.charAt(i);if(!t&&a===`\\`){let t=e.charAt(i+1);if(t===`\\`){r+=`\\`,i++;continue}else if(t!==`.`)throw Error(`invalid path`)}if(a===`\\`&&e.charAt(i+1)===`.`){r+=`.`,i++;continue}if(a===`.`){n.push(r),r=``;continue}r+=a}let i=r;return n.push(i),n};function b8(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var x8=[b8(c8,`undefined`,()=>null,()=>void 0),b8(Bse,`bigint`,e=>e.toString(),e=>typeof BigInt<`u`?BigInt(e):(console.error(`Please add a BigInt polyfill.`),e)),b8(Rse,`Date`,e=>e.toISOString(),e=>new Date(e)),b8(h8,`Error`,(e,t)=>{let n={name:e.name,message:e.message};return`cause`in e&&(n.cause=e.cause),t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n},(e,t)=>{let n=Error(e.message,{cause:e.cause});return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n}),b8(Lse,`regexp`,e=>``+e,e=>{let t=e.slice(1,e.lastIndexOf(`/`)),n=e.slice(e.lastIndexOf(`/`)+1);return new RegExp(t,n)}),b8(p8,`set`,e=>[...e.values()],e=>new Set(e)),b8(f8,`map`,e=>[...e.entries()],e=>new Map(e)),b8(e=>g8(e)||Vse(e),`number`,e=>g8(e)?`NaN`:e>0?`Infinity`:`-Infinity`,Number),b8(e=>e===0&&1/e==-1/0,`number`,()=>`-0`,Number),b8(Use,`URL`,e=>e.toString(),e=>new URL(e))];function S8(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var C8=S8((e,t)=>m8(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>[`symbol`,t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{let r=n.symbolRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown symbol`);return r}),Wse=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),w8=S8(Hse,e=>[`typed-array`,e.constructor.name],e=>[...e],(e,t)=>{let n=Wse[t[1]];if(!n)throw Error(`Trying to deserialize unknown typed array`);return new n(e)});function T8(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var E8=S8(T8,(e,t)=>[`class`,t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{let n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};let r={};return n.forEach(t=>{r[t]=e[t]}),r},(e,t,n)=>{let r=n.classRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),D8=S8((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>[`custom`,t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{let r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw Error(`Trying to deserialize unknown custom value`);return r.deserialize(e)}),Gse=[E8,C8,D8,w8],O8=(e,t)=>{let n=s8(Gse,n=>n.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};let r=s8(x8,n=>n.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},k8={};x8.forEach(e=>{k8[e.annotation]=e});var Kse=(e,t,n)=>{if(d8(t))switch(t[0]){case`symbol`:return C8.untransform(e,t,n);case`class`:return E8.untransform(e,t,n);case`custom`:return D8.untransform(e,t,n);case`typed-array`:return w8.untransform(e,t,n);default:throw Error(`Unknown transformation: `+t)}else{let r=k8[t];if(!r)throw Error(`Unknown transformation: `+t);return r.untransform(e,n)}},A8=(e,t)=>{if(t>e.size)throw Error(`index out of bounds`);let n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function j8(e){if(o8(e,`__proto__`))throw Error(`__proto__ is not allowed as a property`);if(o8(e,`prototype`))throw Error(`prototype is not allowed as a property`);if(o8(e,`constructor`))throw Error(`constructor is not allowed as a property`)}var qse=(e,t)=>{j8(t);for(let n=0;n<t.length;n++){let r=t[n];if(p8(e))e=A8(e,+r);else if(f8(e)){let i=+r,a=+t[++n]==0?`key`:`value`,o=A8(e,i);switch(a){case`key`:e=o;break;case`value`:e=e.get(o);break}}else e=e[r]}return e},M8=(e,t,n)=>{if(j8(t),t.length===0)return n(e);let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(d8(r)){let e=+n;r=r[e]}else if(l8(r))r=r[n];else if(p8(r)){let e=+n;r=A8(r,e)}else if(f8(r)){if(e===t.length-2)break;let i=+n,a=+t[++e]==0?`key`:`value`,o=A8(r,i);switch(a){case`key`:r=o;break;case`value`:r=r.get(o);break}}}let i=t[t.length-1];if(d8(r)?r[+i]=n(r[+i]):l8(r)&&(r[i]=n(r[i])),p8(r)){let e=A8(r,+i),t=n(e);e!==t&&(r.delete(e),r.add(t))}if(f8(r)){let e=+t[t.length-2],a=A8(r,e);switch(+i==0?`key`:`value`){case`key`:{let e=n(a);r.set(e,r.get(a)),e!==a&&r.delete(a);break}case`value`:r.set(a,n(r.get(a)));break}}return e},N8=e=>e<1;function P8(e,t,n,r=[]){if(!e)return;let i=N8(n);if(!d8(e)){a8(e,(e,a)=>P8(e,t,n,[...r,...y8(a,i)]));return}let[a,o]=e;o&&a8(o,(e,a)=>{P8(e,t,n,[...r,...y8(a,i)])}),t(a,r)}function Jse(e,t,n,r){return P8(t,(t,n)=>{e=M8(e,n,e=>Kse(e,t,r))},n),e}function Yse(e,t,n){let r=N8(n);function i(t,n){let i=qse(e,y8(n,r));t.map(e=>y8(e,r)).forEach(t=>{e=M8(e,t,()=>i)})}if(d8(t)){let[n,a]=t;n.forEach(t=>{e=M8(e,y8(t,r),()=>e)}),a&&a8(a,i)}else a8(t,i);return e}var Xse=(e,t)=>l8(e)||d8(e)||f8(e)||p8(e)||h8(e)||T8(e,t);function Zse(e,t,n){let r=n.get(e);r?r.push(t):n.set(e,[t])}function Qse(e,t){let n={},r;return e.forEach(e=>{if(e.length<=1)return;t||(e=e.map(e=>e.map(String)).sort((e,t)=>e.length-t.length));let[i,...a]=e;i.length===0?r=a.map(v8):n[v8(i)]=a.map(v8)}),r?u8(n)?[r]:[r,n]:u8(n)?void 0:n}var F8=(e,t,n,r,i=[],a=[],o=new Map)=>{let s=zse(e);if(!s){Zse(e,i,t);let n=o.get(e);if(n)return r?{transformedValue:null}:n}if(!Xse(e,n)){let t=O8(e,n),r=t?{transformedValue:t.value,annotations:[t.type]}:{transformedValue:e};return s||o.set(e,r),r}if(o8(a,e))return{transformedValue:null};let c=O8(e,n),l=c?.value??e,u=d8(l)?[]:{},d={};a8(l,(s,c)=>{if(c===`__proto__`||c===`constructor`||c===`prototype`)throw Error(`Detected property ${c}. This is a prototype pollution risk, please remove it from your object.`);let l=F8(s,t,n,r,[...i,c],[...a,e],o);u[c]=l.transformedValue,d8(l.annotations)?d[_8(c)]=l.annotations:l8(l.annotations)&&a8(l.annotations,(e,t)=>{d[_8(c)+`.`+t]=e})});let f=u8(d)?{transformedValue:u,annotations:c?[c.type]:void 0}:{transformedValue:u,annotations:c?[c.type,d]:d};return s||o.set(e,f),f};function I8(e){return Object.prototype.toString.call(e).slice(8,-1)}function L8(e){return I8(e)===`Array`}function $se(e){if(I8(e)!==`Object`)return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function ece(e,t,n,r,i){let a={}.propertyIsEnumerable.call(r,t)?`enumerable`:`nonenumerable`;a===`enumerable`&&(e[t]=n),i&&a===`nonenumerable`&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function R8(e,t={}){if(L8(e))return e.map(e=>R8(e,t));if(!$se(e))return e;let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((n,r)=>{if(r===`__proto__`||L8(t.props)&&!t.props.includes(r))return n;let i=e[r];return ece(n,r,R8(i,t),e,t.nonenumerable),n},{})}var z8=class{constructor({dedupe:e=!1}={}){this.classRegistry=new Ose,this.symbolRegistry=new i8(e=>e.description??``),this.customTransformerRegistry=new jse,this.allowedErrorProps=[],this.dedupe=e}serialize(e){let t=new Map,n=F8(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});let i=Qse(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r.meta&&(r.meta.v=1),r}deserialize(e,t){let{json:n,meta:r}=e,i=t?.inPlace?n:R8(n);return r?.values&&(i=Jse(i,r.values,r.v??0,this)),r?.referentialEqualities&&(i=Yse(i,r.referentialEqualities,r.v??0)),i}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e),{inPlace:!0})}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};z8.defaultInstance=new z8,z8.serialize=z8.defaultInstance.serialize.bind(z8.defaultInstance),z8.deserialize=z8.defaultInstance.deserialize.bind(z8.defaultInstance),z8.stringify=z8.defaultInstance.stringify.bind(z8.defaultInstance),z8.parse=z8.defaultInstance.parse.bind(z8.defaultInstance),z8.registerClass=z8.defaultInstance.registerClass.bind(z8.defaultInstance),z8.registerSymbol=z8.defaultInstance.registerSymbol.bind(z8.defaultInstance),z8.registerCustom=z8.defaultInstance.registerCustom.bind(z8.defaultInstance),z8.allowErrorProps=z8.defaultInstance.allowErrorProps.bind(z8.defaultInstance),z8.serialize,z8.deserialize,z8.stringify,z8.parse,z8.registerClass,z8.registerCustom,z8.registerSymbol,z8.allowErrorProps,(0,s.createContext)(null),(0,s.createContext)(null),c.AddonStarted,c.AddonInstalled,c.AddonRestarted,c.AddonUpdated,c.AddonStopped,c.AddonUninstalled,c.AddonCrashed,c.AddonError,c.DetectionPhaseTransition,c.DetectionResult,c.DetectionEvent,c.DetectionCameraNative,c.ProviderMotion,c.MotionOnMotionChanged,c.MotionAnalysis,c.MotionZonesRaw,c.ProviderDetection,c.PipelineAudioInferenceResult,c.AgentOnline,c.AgentOffline,c.DeviceRegistered,c.DeviceUnregistered,c.DeviceStateChanged,c.EventEmitted;var tce=Object.freeze([...d()]),nce=Object.freeze([c.PipelineCameraMetricsSnapshot,c.PipelineRunnerLoadSnapshot,c.PipelineEngineMetricsSnapshot,c.PipelineInferenceResult,c.PipelineTrace,c.PipelineProgress,c.StreamBrokerMetricsSnapshot,c.MetricsNodeResourcesSnapshot,c.MetricsNodeProcessesSnapshot,c.ClusterTopologySnapshot,c.MotionAnalysis,c.MotionZonesRaw,c.DetectionResult,c.PipelineAudioInferenceResult,c.PlatformProbePhase,c.BenchmarkProgress,c.ModelDownloadProgress,c.ProviderMotion]),rce=new Set(nce);Object.freeze(tce.filter(e=>!rce.has(e))),Object.freeze([...new Set(Lz.filter(e=>e.scope===`device`).map(e=>e.name))].toSorted());function B8({value:e,unit:n,onDelta:r}){let i=t();return(0,K.jsxs)(`div`,{className:`flex h-8 w-full overflow-hidden rounded-lg border border-border bg-surface`,children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":i(`uiLibrary.deviceControlAtoms.decrement`,`Decrement`),className:`w-9 shrink-0 bg-surface-hover text-base text-foreground`,onClick:()=>r(-1),children:`−`}),(0,K.jsxs)(`span`,{className:`flex flex-1 items-center justify-center gap-0.5 border-x border-border/60 text-sm`,children:[e,n?(0,K.jsx)(`span`,{"data-unit":!0,className:`text-[11px] text-foreground-subtle`,children:n}):null]}),(0,K.jsx)(`button`,{type:`button`,"aria-label":i(`uiLibrary.deviceControlAtoms.increment`,`Increment`),className:`w-9 shrink-0 bg-surface-hover text-base text-foreground`,onClick:()=>r(1),children:`+`})]})}function ice({on:e,targetLabel:t,onConfirm:n}){let r=(0,s.useRef)(null),i=(0,s.useRef)(!1);return(0,K.jsxs)(`div`,{className:Z(`relative h-12 w-full rounded-full border flex items-center`,e?`bg-emerald-50 border-emerald-200 pl-4`:`bg-amber-50 border-amber-200 justify-end pr-4`),children:[(0,K.jsx)(`span`,{className:`text-xs font-semibold opacity-60`,children:t}),(0,K.jsx)(`span`,{"data-testid":`slide-thumb`,className:`absolute top-1 left-1 h-10 w-14 rounded-[19px] bg-surface shadow flex items-center justify-center`,onPointerDown:e=>{e.currentTarget.setPointerCapture?.(e.pointerId),r.current=e.clientX,i.current=!1},onPointerMove:e=>{r.current!==null&&Math.abs(e.clientX-r.current)>40&&(i.current=!0)},onPointerUp:()=>{i.current&&n(),i.current=!1,r.current=null},onPointerCancel:()=>{i.current=!1,r.current=null}})]})}var ace=2,V8=270,oce=315;function sce(e){let t=(e-135+360)%360;return t>V8?+(t<=oce):t/V8}function H8({fraction:e,color:t,knobTopPx:n,onDragFraction:r}){let i=-135+e*270,a=(0,s.useRef)(null),[o,c]=(0,s.useState)(!1),l=r!==void 0,u=n??ace,d=e=>{r!==void 0&&(e.preventDefault(),e.stopPropagation(),e.currentTarget.setPointerCapture?.(e.pointerId),c(!0))},f=e=>{if(r===void 0||!o)return;let t=a.current;if(t===null)return;let n=t.getBoundingClientRect(),i=n.left+n.width/2,s=n.top+n.height/2;r(sce(Math.atan2(e.clientY-s,e.clientX-i)*180/Math.PI))},p=e=>{r!==void 0&&(e.currentTarget.releasePointerCapture?.(e.pointerId),c(!1))};return(0,K.jsx)(`div`,{ref:a,className:`absolute inset-0`,style:{transform:`rotate(${i}deg)`},children:(0,K.jsx)(`div`,{className:Z(`absolute left-1/2 h-5 w-5 -translate-x-1/2 rounded-full bg-white shadow`,l&&(o?`cursor-grabbing`:`cursor-grab`)),style:{top:u,border:`3px solid ${t}`},...l?{onPointerDown:d,onPointerMove:f,onPointerUp:p,onPointerCancel:p}:{}})})}function U8({fraction:e,color:t}){return(0,K.jsxs)(`div`,{className:`relative h-2 w-full rounded-full bg-border`,children:[(0,K.jsx)(`div`,{className:`absolute left-0 top-0 h-2 rounded-full`,style:{width:`${e*100}%`,background:t??`var(--color-primary)`}}),(0,K.jsx)(`div`,{className:`absolute -top-1 h-4 w-4 rounded-full bg-white shadow`,style:{left:`calc(${e*100}% - 8px)`}})]})}var W8=150,G8=64,cce=W8/2,K8=2*Math.PI*G8,q8=270/360*K8;function J8({fraction:e,color:t,children:n,onDragFraction:r}){let i=Math.min(1,Math.max(0,e)),a=W8/2,o=W8/2,s=K8-q8,c=i*q8;return(0,K.jsxs)(`div`,{className:`relative`,style:{width:W8,height:W8},children:[(0,K.jsxs)(`svg`,{width:W8,height:W8,viewBox:`0 0 ${W8} ${W8}`,"aria-hidden":`true`,className:`absolute inset-0`,style:{transform:`rotate(135deg)`},children:[(0,K.jsx)(`circle`,{cx:a,cy:o,r:G8,fill:`none`,stroke:`var(--color-border)`,strokeWidth:11,strokeDasharray:`${q8} ${s}`,strokeLinecap:`round`}),(0,K.jsx)(`circle`,{cx:a,cy:o,r:G8,fill:`none`,stroke:t,strokeWidth:11,strokeDasharray:`${c} ${K8-c}`,strokeLinecap:`round`})]}),(0,K.jsx)(`div`,{"data-testid":`arc-knob`,children:(0,K.jsx)(H8,{fraction:i,color:t,knobTopPx:cce-G8-10,...r===void 0?{}:{onDragFraction:r}})}),(0,K.jsx)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-0.5 pointer-events-none`,children:n})]})}function Y8({on:e,busy:n,onToggle:r}){let i=t(),a={transform:e?`translateX(30px)`:`translateX(3px)`};return(0,K.jsx)(`button`,{type:`button`,"aria-pressed":e,title:e?i(`uiLibrary.tapToggle.turnOff`,`Turn off`):i(`uiLibrary.tapToggle.turnOn`,`Turn on`),disabled:n,onClick:e=>{e.stopPropagation(),r()},className:Z(`relative inline-flex h-8 w-16 items-center rounded-full border transition-colors flex-shrink-0`,e?`bg-success/30 border-success/50`:`bg-surface-hover border-border`,n&&`opacity-60 cursor-not-allowed`),children:(0,K.jsx)(`span`,{className:Z(`absolute h-6 w-6 rounded-full transition-all`,e?`bg-success`:`bg-foreground-subtle`),style:a})})}function lce({trpc:e,deviceId:n}){let r=t(),i=L3(e,n),a=i===null?void 0:i.button;if(a===void 0)return null;let o=()=>{a.press({deviceId:n})};return(0,K.jsxs)(`button`,{type:`button`,"aria-label":r(`uiLibrary.buttonControl.press`,`Press`),title:r(`uiLibrary.buttonControl.press`,`Press`),onClick:e=>{e.stopPropagation(),o()},className:Z(`inline-flex h-5 items-center gap-1 rounded px-1.5 text-xs`,`bg-primary text-primary-foreground hover:bg-primary/90 transition-colors`),children:[(0,K.jsx)(ZV,{className:`h-3 w-3`}),(0,K.jsx)(`span`,{children:r(`uiLibrary.buttonControl.press`,`Press`)})]})}function uce({trpc:e,deviceId:n}){let r=t(),i=L3(e,n),a=i===null?void 0:i.button;return a===void 0?null:(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-4 rounded-lg border border-border bg-surface p-6`,children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":r(`uiLibrary.buttonControl.pressButton`,`Press button`),onClick:()=>{a.press({deviceId:n})},className:Z(`inline-flex h-14 w-14 items-center justify-center rounded-full`,`bg-primary text-primary-foreground hover:bg-primary/90 transition-colors`,`shadow-md`),children:(0,K.jsx)(ZV,{className:`h-6 w-6`})}),(0,K.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:r(`uiLibrary.buttonControl.press`,`Press`)})]})}var dce=4e3;function X8(e){if(e!==void 0)return typeof e==`object`&&e&&`lastChangedAt`in e&&typeof e.lastChangedAt==`number`?e.lastChangedAt:e}function Z8(e,t){let n=t?.enabled!==!1,r=t?.timeoutMs??dce,[i,a]=(0,s.useState)(void 0),o=(0,s.useRef)(void 0),c=(0,s.useRef)(void 0),l=(0,s.useRef)(!1),u=(0,s.useRef)(void 0),d=(0,s.useCallback)(()=>{u.current!==void 0&&(clearTimeout(u.current),u.current=void 0),o.current=void 0,l.current=!1,c.current=void 0,a(void 0)},[]);(0,s.useEffect)(()=>{if(!n||!l.current)return;let t=X8(e),r=c.current;t!==void 0&&t!==r&&d()}),(0,s.useEffect)(()=>()=>{u.current!==void 0&&clearTimeout(u.current)},[]);let f=(0,s.useCallback)(t=>{if(!n)return;u.current!==void 0&&(clearTimeout(u.current),u.current=void 0);let i=o.current??e;if(i!==void 0){let e={...i,...t};o.current=e,a(e)}c.current=X8(e),l.current=!0,u.current=setTimeout(d,r)},[n,e,d,r]);return n?{display:i===void 0?e:i,applyOptimistic:f,rollback:d}:{display:e,applyOptimistic:()=>{},rollback:()=>{}}}function fce(e){return e instanceof Error?e.message:String(e)}function pce({trpc:e,deviceId:n,layout:r,optimistic:i,features:a}){let o=t(),{cap:c,slice:l,available:u}=z3({trpc:e,deviceId:n,cap:e=>e.lockControl,slice:e=>e.state.lockControl}),{display:d,applyOptimistic:f}=Z8(l,{enabled:i??!0}),[p,m]=(0,s.useState)(null),[h,g]=(0,s.useState)(!1),[_,v]=(0,s.useState)(null);if(d===void 0)return null;let y=d.state===`locked`||d.state===`locking`,b=!u||d.state===`jammed`,ee=a?.includes(Sc.LockOpen)===!0,te=r===`compact`,ne=()=>{f({state:`locking`}),c?.lock({})},x=()=>{f({state:`unlocking`}),c?.unlock({})},S=()=>{c?.open({})},re=()=>{if(!b){if(!y){ne();return}if(te){v(null),m(`unlock`);return}x()}},ie=()=>{if(!b){if(te){v(null),m(`open`);return}S()}},ae=()=>{h||m(null)},oe=async()=>{if(!(h||p===null)){v(null),g(!0);try{p===`unlock`?(f({state:`unlocking`}),await c?.unlock({})):await c?.open({}),m(null)}catch(e){v(fce(e))}finally{g(!1)}}},se=y?o(`uiLibrary.lockPanel.unlock`,`Unlock`):o(`uiLibrary.lockPanel.lock`,`Lock`),ce=p===`open`?o(`uiLibrary.lockPanel.openDoorTitle`,`Open door?`):o(`uiLibrary.lockPanel.unlockTitle`,`Unlock device?`),le=p===`open`?o(`uiLibrary.lockPanel.openDoorBody`,`This will release the latch and open the door.`):o(`uiLibrary.lockPanel.unlockBody`,`This will unlock the device.`),ue=p===`open`?o(`uiLibrary.lockPanel.confirmOpen`,`Confirm open`):o(`uiLibrary.lockPanel.confirmUnlock`,`Confirm unlock`),de=p===`open`?(0,K.jsx)(vV,{className:`h-4 w-4 text-amber-400`}):(0,K.jsx)(VV,{className:`h-4 w-4 text-amber-400`});return(0,K.jsxs)(`div`,{className:Z(`inline-flex items-center`,r===`full`?`gap-2`:`gap-1`),children:[(0,K.jsxs)(`button`,{type:`button`,"aria-label":se,title:d.state===`jammed`?o(`uiLibrary.lockPanel.jammed`,`Jammed`):se,disabled:b,onClick:e=>{e.stopPropagation(),re()},className:Z(`inline-flex items-center justify-center rounded transition-colors`,r===`full`?`h-7 gap-1.5 px-2 text-xs`:`h-5 w-5`,y?`text-success`:`text-warning`,b&&`opacity-40 cursor-not-allowed`,`hover:bg-surface-hover`),children:[y?(0,K.jsx)(HV,{className:`h-3.5 w-3.5`}):(0,K.jsx)(VV,{className:`h-3.5 w-3.5`}),r===`full`&&(0,K.jsx)(`span`,{children:d.state})]}),ee&&(0,K.jsxs)(`button`,{type:`button`,"aria-label":o(`uiLibrary.lockPanel.openDoor`,`Open door`),title:o(`uiLibrary.lockPanel.openDoor`,`Open door`),disabled:b,onClick:e=>{e.stopPropagation(),ie()},className:Z(`inline-flex items-center justify-center rounded transition-colors`,r===`full`?`h-7 gap-1.5 px-2 text-xs`:`h-5 w-5`,`text-foreground-muted`,b&&`opacity-40 cursor-not-allowed`,`hover:bg-surface-hover`),children:[(0,K.jsx)(vV,{className:`h-3.5 w-3.5`}),r===`full`&&(0,K.jsx)(`span`,{children:o(`uiLibrary.lockPanel.open`,`Open`)})]}),te&&(0,K.jsx)(U3,{open:p!==null,onOpenChange:e=>{e||ae()},children:(0,K.jsxs)(W3,{width:`sm`,onClick:e=>e.stopPropagation(),children:[(0,K.jsxs)(G3,{children:[(0,K.jsxs)(q3,{className:`flex items-center gap-2`,children:[de,ce]}),(0,K.jsx)(J3,{children:le})]}),_!==null&&(0,K.jsx)(`div`,{className:`mt-2 px-3 py-2 rounded border border-danger/40 bg-danger/10 text-xs text-danger`,children:_}),(0,K.jsxs)(K3,{children:[(0,K.jsx)(WJ,{type:`button`,variant:`ghost`,size:`sm`,disabled:h,onClick:()=>ae(),children:o(`uiLibrary.lockPanel.cancel`,`Cancel`)}),(0,K.jsxs)(WJ,{type:`button`,variant:`danger`,size:`sm`,"aria-label":ue,disabled:h,onClick:()=>{oe()},children:[h&&(0,K.jsx)(BV,{className:`h-3.5 w-3.5 animate-spin`}),ue]})]})]})})]})}function Q8({trpc:e,deviceId:n,optimistic:r}){let i=t(),{cap:a,slice:o,available:c}=z3({trpc:e,deviceId:n,cap:e=>e.switch,slice:e=>e.state.switch}),{display:l,applyOptimistic:u}=Z8(o,{enabled:r??!0}),[d,f]=(0,s.useState)(!1);if(l===void 0)return null;let p=l.on===!0,m=d||!c,h={transform:p?`translateX(14px)`:`translateX(2px)`},g=async()=>{if(m||!a)return;let e=!p;u({on:e}),f(!0);try{await a.setState({on:e})}finally{f(!1)}};return(0,K.jsx)(`button`,{type:`button`,"aria-pressed":p,title:p?i(`uiLibrary.switchPanel.turnOff`,`Turn off`):i(`uiLibrary.switchPanel.turnOn`,`Turn on`),disabled:m,onClick:e=>{e.stopPropagation(),g()},className:Z(`relative inline-flex h-4 w-7 items-center rounded-full border transition-colors flex-shrink-0`,p?`bg-success/30 border-success/50`:`bg-surface-hover border-border`,m&&`opacity-60`),children:(0,K.jsx)(`span`,{className:Z(`absolute h-3 w-3 rounded-full transition-all`,p?`bg-success`:`bg-foreground-subtle`),style:h})})}function mce({trpc:e,deviceId:n,layout:r,optimistic:i}){let a=t(),{cap:o,slice:s,available:c}=z3({trpc:e,deviceId:n,cap:e=>e.brightness,slice:e=>e.state.brightness}),{display:l,applyOptimistic:u}=Z8(s,{enabled:i??!0});if(l===void 0)return null;let d=!c;return(0,K.jsxs)(`label`,{className:Z(`flex items-center gap-2 text-xs text-foreground-subtle`,r===`compact`&&`min-w-[140px]`),children:[(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.brightnessPanel.brightness`,`Brightness`),type:`range`,min:0,max:100,step:1,value:l.level,disabled:d,onChange:e=>{let t=Number(e.target.value);u({level:t}),d||o?.setBrightness({level:t})}}),(0,K.jsxs)(`span`,{className:`tabular-nums w-8 text-right`,children:[l.level,`%`]})]})}function hce({trpc:e,deviceId:n,features:r,layout:i,optimistic:a}){let o=t(),{cap:s,slice:c,available:l}=z3({trpc:e,deviceId:n,cap:e=>e.fanControl,slice:e=>e.state.fanControl}),{display:u,applyOptimistic:d}=Z8(c,{enabled:a??!0});if(u===void 0)return null;let f=!l,p=r??[],m=p.includes(`fan-speed`),h=p.includes(`fan-preset`),g=c?.percentageStep!=null&&c.percentageStep>0?c.percentageStep:1;return(0,K.jsxs)(`div`,{className:Z(`inline-flex items-center gap-2`,i===`full`&&`flex-col items-stretch`),children:[m&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`input`,{"aria-label":o(`uiLibrary.fanPanel.speed`,`Fan speed`),type:`range`,min:0,max:100,step:g,value:u.speed??0,disabled:f,onChange:e=>{let t=Number(e.target.value),n=Math.min(100,Math.max(0,Math.round(t/g)*g));d({speed:n}),f||s?.setPercentage({speed:n})}}),(0,K.jsxs)(`span`,{className:`tabular-nums w-8 text-right`,children:[u.speed??`—`,`%`]})]}),h&&u.availablePresets.length>0&&(0,K.jsx)(`div`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:(0,K.jsxs)(`select`,{"aria-label":o(`uiLibrary.fanPanel.preset`,`Fan preset`),value:u.preset,disabled:f,onChange:e=>{let t=e.target.value;!f&&t&&(d({preset:t}),s?.setPreset({preset:t}))},className:`bg-surface border border-border rounded px-1 py-0.5`,children:[(0,K.jsx)(`option`,{value:``,disabled:!0,children:`—`}),u.availablePresets.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))]})})]})}function $8(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:1}var gce=2,e5=3;function t5(e){if(!Number.isFinite(e))return 0;for(let t=0;t<e5;t+=1)if(Math.abs(e*10**t-Math.round(e*10**t))<1e-9)return t;return e5}function _ce(e){let t=$8(e.tempStep),n=[e.minTemp,e.maxTemp].filter(e=>typeof e==`number`&&Number.isFinite(e)),r=n.length===0?gce:Math.max(...n.map(e=>String(Math.trunc(Math.abs(e))).length)),i=+!!n.some(e=>e<0),a=Math.max(t5(t),...n.map(t5));return i+r+(a>0?1+a:0)}var vce={1:`min-w-[1ch]`,2:`min-w-[2ch]`,3:`min-w-[3ch]`,4:`min-w-[4ch]`,5:`min-w-[5ch]`,6:`min-w-[6ch]`,7:`min-w-[7ch]`,8:`min-w-[8ch]`};function n5(e){return`${vce[Math.min(Math.max(_ce(e),1),8)]} text-center`}function r5(e,t,n){let r=e+t*$8(n.tempStep),i=n.minTemp,a=n.maxTemp;return typeof i==`number`&&Number.isFinite(i)&&(r=Math.max(r,i)),typeof a==`number`&&Number.isFinite(a)&&(r=Math.min(r,a)),r}var i5={heat:`border-amber-400 bg-amber-50 dark:bg-amber-950`,cool:`border-blue-400 bg-blue-50 dark:bg-blue-950`,auto:`border-purple-400 bg-purple-50 dark:bg-purple-950`,heat_cool:`border-fuchsia-400 bg-fuchsia-50 dark:bg-fuchsia-950`,fan_only:`border-slate-400 bg-slate-50 dark:bg-slate-950`,dry:`border-cyan-400 bg-cyan-50 dark:bg-cyan-950`,off:`border-zinc-300 bg-zinc-50 dark:bg-zinc-900`},a5={heat:`text-amber-600 dark:text-amber-400`,cool:`text-blue-600 dark:text-blue-400`,auto:`text-purple-600 dark:text-purple-400`,heat_cool:`text-fuchsia-600 dark:text-fuchsia-400`,fan_only:`text-slate-600 dark:text-slate-400`,dry:`text-cyan-600 dark:text-cyan-400`,off:`text-foreground`},yce={heat:`bg-amber-400 text-amber-950`,cool:`bg-blue-400 text-blue-950`,auto:`bg-purple-400 text-purple-950`,heat_cool:`bg-fuchsia-400 text-fuchsia-950`,fan_only:`bg-slate-400 text-slate-950`,dry:`bg-cyan-400 text-cyan-950`,off:`bg-zinc-300 text-zinc-700`};function bce({trpc:e,deviceId:n,features:r,layout:i,optimistic:a}){let o=t(),{cap:s,slice:c,available:l}=z3({trpc:e,deviceId:n,cap:e=>e.climateControl,slice:e=>e.state.climateControl}),{display:u,applyOptimistic:d}=Z8(c,{enabled:a??!0});if(s===void 0||u===void 0)return null;let f=!l;if(i===`compact`)return(0,K.jsxs)(`div`,{"data-mode":u.mode,className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(`span`,{className:Z(`text-xs tabular-nums font-medium`,a5[u.mode]),children:u.target===null?u.currentTemp===null?null:(0,K.jsxs)(`span`,{className:`text-foreground-subtle`,children:[u.currentTemp,`°`]}):(0,K.jsxs)(K.Fragment,{children:[u.target,`°`,u.currentTemp!==null&&(0,K.jsxs)(`span`,{className:`text-foreground-subtle font-normal`,children:[` `,`(`,u.currentTemp,`°)`]})]})}),u.target!==null&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":o(`uiLibrary.climatePanel.decreaseTarget`,`Decrease target`),disabled:f,onClick:e=>{if(e.stopPropagation(),!f&&u.target!==null){let e=r5(u.target,-1,u);d({target:e}),s.setTarget({target:e})}},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors text-xs`,f&&`opacity-40 cursor-not-allowed`),children:`−`}),(0,K.jsx)(`button`,{type:`button`,"aria-label":o(`uiLibrary.climatePanel.increaseTarget`,`Increase target`),disabled:f,onClick:e=>{if(e.stopPropagation(),!f&&u.target!==null){let e=r5(u.target,1,u);d({target:e}),s.setTarget({target:e})}},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors text-xs`,f&&`opacity-40 cursor-not-allowed`),children:`+`})]}),(0,K.jsx)(`select`,{"aria-label":o(`uiLibrary.climatePanel.mode`,`Mode`),value:u.mode,disabled:f,onChange:e=>{e.stopPropagation();let t=e.target.value;f||(d({mode:t}),s.setMode({mode:t}))},className:Z(`bg-transparent px-0.5 text-xs text-foreground-subtle hover:text-foreground cursor-pointer`,f&&`opacity-40 cursor-not-allowed`),children:u.availableModes.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))})]});let p=u.mode===`heat_cool`||u.targetLow!==null&&u.targetHigh!==null,m=!p&&u.target!==null;return(0,K.jsxs)(`div`,{"data-mode":u.mode,className:Z(`inline-flex items-center gap-2 rounded border px-2 py-1 transition-colors`,i5[u.mode],`flex-col items-stretch gap-3`),children:[(0,K.jsxs)(`div`,{className:`inline-flex items-center gap-1 text-xs tabular-nums`,children:[u.currentTemp!==null&&(0,K.jsxs)(`span`,{className:`text-foreground-subtle`,children:[u.currentTemp,`°`]}),m&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`text-foreground-subtle`,children:`→`}),(0,K.jsxs)(`span`,{className:`font-medium`,children:[u.target,`°`]}),(0,K.jsx)(`button`,{type:`button`,"aria-label":o(`uiLibrary.climatePanel.decreaseTarget`,`Decrease target`),disabled:f,onClick:e=>{if(e.stopPropagation(),!f&&u.target!==null){let e=r5(u.target,-1,u);d({target:e}),s.setTarget({target:e})}},className:Z(`inline-flex h-4 w-4 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,f&&`opacity-40 cursor-not-allowed`),children:`−`}),(0,K.jsx)(`button`,{type:`button`,"aria-label":o(`uiLibrary.climatePanel.increaseTarget`,`Increase target`),disabled:f,onClick:e=>{if(e.stopPropagation(),!f&&u.target!==null){let e=r5(u.target,1,u);d({target:e}),s.setTarget({target:e})}},className:Z(`inline-flex h-4 w-4 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,f&&`opacity-40 cursor-not-allowed`),children:`+`})]})]}),(0,K.jsx)(`div`,{className:`inline-flex items-center gap-0.5 rounded bg-surface-subtle p-0.5`,children:u.availableModes.map(e=>(0,K.jsx)(`button`,{type:`button`,"aria-label":e,disabled:f,onClick:t=>{t.stopPropagation(),f||(d({mode:e}),s.setMode({mode:e}))},className:Z(`rounded px-1.5 py-0.5 text-xs transition-colors`,e===u.mode?yce[e]:`text-foreground-subtle hover:text-foreground hover:bg-surface-hover`,f&&`opacity-40 cursor-not-allowed`),children:e},e))}),p&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsxs)(`label`,{className:`flex items-center gap-1`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.climatePanel.low`,`Low`)}),(0,K.jsx)(`input`,{"aria-label":o(`uiLibrary.climatePanel.targetLow`,`Target low`),type:`number`,step:.5,value:u.targetLow??``,disabled:f,onChange:e=>{if(!f){let t=Number(e.target.value),n=u.targetHigh??t;d({targetLow:t}),s.setTargetRange({targetLow:t,targetHigh:n})}},className:`w-14 rounded border border-border bg-surface px-1 py-0.5 tabular-nums`})]}),(0,K.jsxs)(`label`,{className:`flex items-center gap-1`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.climatePanel.high`,`High`)}),(0,K.jsx)(`input`,{"aria-label":o(`uiLibrary.climatePanel.targetHigh`,`Target high`),type:`number`,step:.5,value:u.targetHigh??``,disabled:f,onChange:e=>{if(!f){let t=Number(e.target.value),n=u.targetLow??t;d({targetHigh:t}),s.setTargetRange({targetLow:n,targetHigh:t})}},className:`w-14 rounded border border-border bg-surface px-1 py-0.5 tabular-nums`})]})]}),u.availableFanModes.length>0&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.climatePanel.fan`,`Fan`)}),(0,K.jsxs)(`select`,{"aria-label":o(`uiLibrary.climatePanel.fanMode`,`Fan mode`),value:u.fanMode,disabled:f,onChange:e=>{let t=e.target.value;!f&&t&&(d({fanMode:t}),s.setFanMode({fanMode:t}))},className:`rounded border border-border bg-surface px-1 py-0.5`,children:[(0,K.jsx)(`option`,{value:``,disabled:!0,children:`—`}),u.availableFanModes.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))]})]}),u.availablePresets.length>0&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.climatePanel.preset`,`Preset`)}),(0,K.jsxs)(`select`,{"aria-label":o(`uiLibrary.climatePanel.preset`,`Preset`),value:u.preset,disabled:f,onChange:e=>{let t=e.target.value;!f&&t&&(d({preset:t}),s.setPreset({preset:t}))},className:`rounded border border-border bg-surface px-1 py-0.5`,children:[(0,K.jsx)(`option`,{value:``,disabled:!0,children:`—`}),u.availablePresets.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))]})]}),u.targetHumidity!==null&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.climatePanel.humidity`,`Humidity`)}),(0,K.jsx)(`input`,{"aria-label":o(`uiLibrary.climatePanel.targetHumidity`,`Target humidity`),type:`range`,min:0,max:100,step:1,value:u.targetHumidity,disabled:f,onChange:e=>{let t=Number(e.target.value);d({targetHumidity:t}),f||s.setTargetHumidity({targetHumidity:t})}}),(0,K.jsxs)(`span`,{className:`tabular-nums w-8 text-right`,children:[u.targetHumidity,`%`]})]})]})}var xce={playing:`border-green-400 bg-green-50 dark:bg-green-950`,paused:`border-amber-400 bg-amber-50 dark:bg-amber-950`,buffering:`border-blue-400 bg-blue-50 dark:bg-blue-950`,on:`border-slate-400 bg-slate-50 dark:bg-slate-950`,idle:`border-slate-400 bg-slate-50 dark:bg-slate-950`,off:`border-zinc-300 bg-zinc-50 dark:bg-zinc-900`,standby:`border-zinc-300 bg-zinc-50 dark:bg-zinc-900`},Sce={playing:`bg-green-500`,paused:`bg-amber-400`,buffering:`bg-blue-400`,on:`bg-slate-400`,idle:`bg-slate-400`,off:`bg-zinc-300`,standby:`bg-zinc-300`},o5=[`off`,`all`,`one`];function Cce(e){return o5.includes(e)}function wce(e,t){switch(t){case`off`:return e(`uiLibrary.mediaPlayerPanel.repeatOff`,`Off`);case`all`:return e(`uiLibrary.mediaPlayerPanel.repeatAll`,`All`);case`one`:return e(`uiLibrary.mediaPlayerPanel.repeatOne`,`One`)}}function Tce(e){return e===`playing`||e===`buffering`?`pause`:`play`}function Ece({trpc:e,deviceId:n,features:r,layout:i,optimistic:a}){let o=t(),{cap:s,slice:c,available:l}=z3({trpc:e,deviceId:n,cap:e=>e.mediaPlayer,slice:e=>e.state.mediaPlayer}),{display:u,applyOptimistic:d}=Z8(c,{enabled:a??!0});if(u===void 0)return null;let f=!l,p=Tce(u.state);return(0,K.jsxs)(`div`,{"data-state":u.state,className:Z(`inline-flex items-center gap-2 rounded border px-2 py-1 transition-colors`,xce[u.state],i===`full`&&`flex-col items-stretch gap-3`),children:[(0,K.jsxs)(`div`,{className:`inline-flex items-center gap-2`,children:[(0,K.jsx)(`span`,{role:`status`,"aria-label":u.state,className:Z(`inline-block h-2 w-2 rounded-full flex-shrink-0`,Sce[u.state])}),(0,K.jsx)(`button`,{type:`button`,"aria-label":p===`play`?o(`uiLibrary.mediaPlayerPanel.play`,`Play`):o(`uiLibrary.mediaPlayerPanel.pause`,`Pause`),disabled:f,onClick:e=>{e.stopPropagation(),!f&&(p===`play`?(d({state:`playing`}),s?.play({})):(d({state:`paused`}),s?.pause({})))},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors text-xs`,f&&`opacity-40 cursor-not-allowed`),children:p===`play`?`▶`:`⏸`})]}),i===`full`&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":o(`uiLibrary.mediaPlayerPanel.previous`,`Previous`),disabled:f,onClick:e=>{e.stopPropagation(),f||s?.previous({})},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors text-xs`,f&&`opacity-40 cursor-not-allowed`),children:`⏮`}),(0,K.jsx)(`button`,{type:`button`,"aria-label":o(`uiLibrary.mediaPlayerPanel.next`,`Next`),disabled:f,onClick:e=>{e.stopPropagation(),f||s?.next({})},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors text-xs`,f&&`opacity-40 cursor-not-allowed`),children:`⏭`})]}),u.volumeLevel!==null&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.mediaPlayerPanel.vol`,`Vol`)}),(0,K.jsx)(`input`,{"aria-label":o(`uiLibrary.mediaPlayerPanel.volume`,`Volume`),type:`range`,min:0,max:100,step:1,value:u.volumeLevel,disabled:f,onChange:e=>{let t=Number(e.target.value);d({volumeLevel:t}),f||s?.setVolume({volumeLevel:t})}}),(0,K.jsxs)(`span`,{className:`tabular-nums w-8 text-right`,children:[u.volumeLevel,`%`]})]}),u.isMuted!==null&&(0,K.jsx)(`button`,{type:`button`,"aria-label":u.isMuted?o(`uiLibrary.mediaPlayerPanel.unmute`,`Unmute`):o(`uiLibrary.mediaPlayerPanel.mute`,`Mute`),disabled:f,onClick:e=>{if(e.stopPropagation(),!f&&u.isMuted!==null){let e=!u.isMuted;d({isMuted:e}),s?.setMute({muted:e})}},className:Z(`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs transition-colors`,u.isMuted?`bg-amber-400 text-amber-950`:`text-foreground-subtle hover:text-foreground hover:bg-surface-hover`,f&&`opacity-40 cursor-not-allowed`),children:u.isMuted?`🔇`:`🔊`}),u.availableSources.length>0&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.mediaPlayerPanel.source`,`Source`)}),(0,K.jsxs)(`select`,{"aria-label":o(`uiLibrary.mediaPlayerPanel.source`,`Source`),value:u.source,disabled:f,onChange:e=>{let t=e.target.value;!f&&t&&(d({source:t}),s?.selectSource({source:t}))},className:`rounded border border-border bg-surface px-1 py-0.5`,children:[(0,K.jsx)(`option`,{value:``,disabled:!0,children:`—`}),u.availableSources.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))]})]}),u.shuffle!==null&&(0,K.jsxs)(`button`,{type:`button`,"aria-label":o(`uiLibrary.mediaPlayerPanel.shuffle`,`Shuffle`),disabled:f,onClick:e=>{if(e.stopPropagation(),!f&&u.shuffle!==null){let e=!u.shuffle;d({shuffle:e}),s?.setShuffle({shuffle:e})}},className:Z(`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs transition-colors`,u.shuffle?`bg-green-400 text-green-950`:`text-foreground-subtle hover:text-foreground hover:bg-surface-hover`,f&&`opacity-40 cursor-not-allowed`),children:[`⇌ `,o(`uiLibrary.mediaPlayerPanel.shuffle`,`Shuffle`)]}),u.repeat!==null&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:o(`uiLibrary.mediaPlayerPanel.repeat`,`Repeat`)}),(0,K.jsx)(`select`,{"aria-label":o(`uiLibrary.mediaPlayerPanel.repeat`,`Repeat`),value:u.repeat,disabled:f,onChange:e=>{let t=e.target.value;!f&&Cce(t)&&(d({repeat:t}),s?.setRepeat({repeat:t}))},className:`rounded border border-border bg-surface px-1 py-0.5`,children:o5.map(e=>(0,K.jsx)(`option`,{value:e,children:wce(o,e)},e))})]})]})]})}function s5(e,t){return t===void 0?Number.isInteger(e)?String(e):e.toFixed(1):e.toFixed(t)}function Dce(e){if(e!==void 0)return B_(e)??e}function Oce(e){if(e.quantity!==void 0){if(e.quantity===`device`){let t=e.deviceQuantity;return t===void 0||t===`device`?void 0:t}return e.quantity}}function c5(e){let t=e.capName===void 0?void 0:e.display?.perCap?.[e.capName],n=t?.precision??e.display?.precision??e.roleDefault?.precision??e.declarationPrecision,r=Oce(e),i=e.preference??`metric`,a=r===void 0?void 0:Ms(r),o=r===void 0?void 0:Ps(r,i),s=Dce(t?.unit??e.display?.unit??e.roleDefault?.unit),c=s!==void 0&&a!==void 0&&s!==a&&rz(a,s),l=c?s:o??``,u=r===`duration`||r===`information`||r===`duration-ms`,d=e=>u||a===void 0||l.length===0||l===a?e:nz(e,a,l)??e;return{unit:l,precision:n,toDisplayValue:d,fromDisplayValue:e=>u||a===void 0||l.length===0||l===a?e:nz(e,l,a)??e,format:e=>{if(r!==void 0&&!c){let t=AB({value:e,quantity:r,preference:i,precision:n});return{text:t.text,unit:t.unit}}return{text:s5(d(e),n),unit:l}}}}var kce=/^(\d{4})-(\d{2})-(\d{2})/,Ace=/^(\d{2}):(\d{2})(?::(\d{2}))?$/;function jce(e,t){let n=kce.exec(e);if(n===null)return e;let r=Number(n[1]),i=Number(n[2]),a=Number(n[3]),o=new Date(r,i-1,a);if(Number.isNaN(o.getTime()))return e;try{return o.toLocaleDateString(t)}catch{return e}}function Mce(e,t){let n=Ace.exec(e);if(n===null)return e;let r=new Date(1970,0,1,Number(n[1]),Number(n[2]),n[3]===void 0?0:Number(n[3]));if(Number.isNaN(r.getTime()))return e;try{return r.toLocaleTimeString(t,{hour:`2-digit`,minute:`2-digit`})}catch{return e}}function Nce(e,t){let n=e.includes(`T`)?e:e.replace(` `,`T`),r=new Date(n);if(Number.isNaN(r.getTime()))return e;try{return r.toLocaleString(t,{dateStyle:`medium`,timeStyle:`short`})}catch{return e}}function l5(e,t,n){return e===``?e:t===`date`?jce(e,n):t===`time`?Mce(e,n):Nce(e,n)}function Pce(e){return e.slice(0,10)}function Fce(e){return e.slice(0,5)}function Ice(e,t){return e===`date`?{type:`date`,value:Pce(t)}:e===`time`?{type:`time`,value:Fce(t)}:{type:`datetime-local`,value:Lce(t)}}function Lce(e){return(e.includes(`T`)?e:e.replace(` `,`T`)).slice(0,16)}function Rce({value:e,busy:n,onCommit:r,unit:i,min:a,max:o,step:c,precision:l}){let u=t(),[d,f]=(0,s.useState)(s5(e,l)),p=Number(d),m=d!==``&&!Number.isNaN(p),h=c??1,g=e=>{let t=e;return a!==void 0&&(t=Math.max(a,t)),o!==void 0&&(t=Math.min(o,t)),t},_=()=>{!n&&m&&r(g(p))};return(0,K.jsxs)(`div`,{className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":u(`uiLibrary.controlPanel.decrement`,`Decrement`),disabled:n,onClick:t=>{if(t.stopPropagation(),!n){let t=g(e-h);f(s5(t,l)),r(t)}},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded border border-border bg-surface text-xs transition-colors hover:bg-surface-hover`,n&&`opacity-40 cursor-not-allowed`),children:`−`}),(0,K.jsx)(`input`,{"aria-label":u(`uiLibrary.controlPanel.numeric`,`Numeric value`),type:`number`,disabled:n,value:d,onChange:e=>{f(e.target.value);let t=Number(e.target.value);e.target.value!==``&&!Number.isNaN(t)&&(n||r(g(t)))},onBlur:_,onKeyDown:e=>{e.key===`Enter`&&_()},className:Z(`w-16 rounded border border-border bg-surface px-1 py-0.5 text-xs tabular-nums text-center`,n&&`opacity-40 cursor-not-allowed`)}),i!==void 0&&(0,K.jsx)(`span`,{className:`text-foreground-subtle text-xs`,children:i}),(0,K.jsx)(`button`,{type:`button`,"aria-label":u(`uiLibrary.controlPanel.increment`,`Increment`),disabled:n,onClick:t=>{if(t.stopPropagation(),!n){let t=g(e+h);f(s5(t,l)),r(t)}},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded border border-border bg-surface text-xs transition-colors hover:bg-surface-hover`,n&&`opacity-40 cursor-not-allowed`),children:`+`})]})}function zce({value:e,busy:t,onCommit:n}){let[r,i]=(0,s.useState)(e);return(0,K.jsx)(`input`,{type:`text`,disabled:t,value:r,onChange:e=>i(e.target.value),onBlur:()=>{t||n(r)},onKeyDown:e=>{e.key===`Enter`&&!t&&n(r)},className:Z(`rounded border border-border bg-surface px-2 py-0.5 text-xs`,t&&`opacity-40 cursor-not-allowed`)})}function Bce({slice:e,busy:n,setValueFn:r,layout:i,quantity:a,display:o,dateTimeShape:s}){let c=t();switch(e.kind){case`numeric`:{let t=typeof e.value==`number`?e.value:Number(e.value),i=a===void 0?void 0:c5({quantity:a,display:o,capName:`control`}),s=i?.toDisplayValue??(e=>e),c=i?.fromDisplayValue??(e=>e),l=i!==void 0&&i.unit.length>0?i.unit:void 0;return(0,K.jsx)(Rce,{value:s(t),busy:n,onCommit:e=>{r({control:{kind:`numeric`,value:c(e)}})},unit:l,min:e.min===void 0?void 0:s(e.min),max:e.max===void 0?void 0:s(e.max),step:e.step===void 0?void 0:s(e.step),precision:i?.precision})}case`select`:{let t=String(e.value);return(0,K.jsx)(`select`,{"aria-label":c(`uiLibrary.controlPanel.value`,`Control value`),disabled:n,value:t,onChange:e=>{e.stopPropagation(),n||r({control:{kind:`select`,value:e.target.value}})},className:Z(`w-full max-w-full min-w-0 truncate rounded bg-transparent px-0.5 py-0.5 text-xs`,n&&`opacity-40 cursor-not-allowed`),children:e.options.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))})}case`text`:return(0,K.jsx)(zce,{value:String(e.value),busy:n,onCommit:e=>{r({control:{kind:`text`,value:e}})}});case`datetime`:{let t=String(e.value),a=s??`datetime`;if(i===`compact`)return t===``?(0,K.jsx)(`span`,{"aria-label":c(`uiLibrary.controlPanel.value`,`Control value`),className:`text-xs text-foreground-subtle`,children:`—`}):(0,K.jsx)(`span`,{"aria-label":c(`uiLibrary.controlPanel.value`,`Control value`),className:`text-xs text-foreground`,children:l5(t,a)});let o=Ice(a,t),l=o.type,u=o.value;return(0,K.jsx)(`input`,{type:l,"aria-label":c(`uiLibrary.controlPanel.value`,`Control value`),disabled:n,value:u,onChange:e=>{e.stopPropagation(),n||r({control:{kind:`datetime`,value:e.target.value}})},className:Z(`rounded border border-border bg-surface px-1 py-0.5 text-xs`,n&&`opacity-40 cursor-not-allowed`)})}default:return null}}function u5({trpc:e,deviceId:t,features:n,layout:r,optimistic:i}){let a=kK()?.getDeviceInfo(t)??null,{cap:o,slice:s,available:c}=z3({trpc:e,deviceId:t,cap:e=>e.control,slice:e=>e.state.control}),{display:l,applyOptimistic:u}=Z8(s,{enabled:i??!0});if(l===void 0)return null;let d=!c,f=a?.sourceInfo?.quantity,p=As(f)&&f!==`device`&&f!==`none`?f:void 0;return(0,K.jsx)(`div`,{"data-kind":l.kind,className:`inline-flex min-w-0 max-w-full items-center gap-1 rounded border border-border px-2 py-1 transition-colors`,children:(0,K.jsx)(Bce,{slice:l,busy:d,setValueFn:e=>{!d&&o&&(u({value:e.control.value}),o.setValue(e))},layout:r,quantity:p,display:a?.display,dateTimeShape:a?.sourceInfo?.dateTimeShape})})}var d5={kind:`binary`,field:`on`,onLabel:`Low`,offLabel:`Normal`,getSliceHandle:e=>e.binary};function f5(e){return e===`battery-sensor`}function p5(e,t){if(!h5(e))return!1;let n=e[t];if(typeof n!=`number`)return!1;let r=e.lastFetchedAt;return!(n===0&&r===0)}var m5={"temperature-sensor":{kind:`numeric`,field:`temperature`,quantity:`temperature`,getSliceHandle:e=>e.temperatureSensor},"humidity-sensor":{kind:`numeric`,field:`humidity`,quantity:`humidity`,getSliceHandle:e=>e.humiditySensor},"ambient-light-sensor":{kind:`numeric`,field:`illuminance`,quantity:`illuminance`,getSliceHandle:e=>e.ambientLightSensor},"pressure-sensor":{kind:`numeric`,field:`pressure`,quantity:`pressure`,getSliceHandle:e=>e.pressureSensor},"numeric-sensor":{kind:`numeric`,field:`value`,quantity:`device`,getSliceHandle:e=>e.numericSensor},"wind-sensor":{kind:`numeric`,field:`value`,quantity:`device`,getSliceHandle:e=>e.numericSensor},"rain-sensor":{kind:`numeric`,field:`value`,quantity:`device`,getSliceHandle:e=>e.numericSensor},"uv-sensor":{kind:`numeric`,field:`value`,quantity:`device`,getSliceHandle:e=>e.numericSensor},"solar-radiation-sensor":{kind:`numeric`,field:`value`,quantity:`device`,getSliceHandle:e=>e.numericSensor},"soil-moisture-sensor":{kind:`numeric`,field:`value`,quantity:`device`,getSliceHandle:e=>e.numericSensor},"power-sensor":{kind:`numeric`,field:`power`,quantity:`power`,getSliceHandle:e=>e.powerMeter},"energy-sensor":{kind:`numeric`,field:`energy`,quantity:`energy`,getSliceHandle:e=>e.powerMeter},"voltage-sensor":{kind:`numeric`,field:`voltage`,quantity:`voltage`,getSliceHandle:e=>e.powerMeter},"current-sensor":{kind:`numeric`,field:`current`,quantity:`current`,getSliceHandle:e=>e.powerMeter},"battery-sensor":{kind:`numeric`,field:`value`,quantity:`percentage`,getSliceHandle:e=>e.numericSensor},"generic-sensor":{kind:`numeric`,field:`value`,quantity:`device`,getSliceHandle:e=>e.numericSensor},"motion-sensor":{kind:`binary`,field:`detected`,onLabel:`Detected`,offLabel:`Clear`,getSliceHandle:e=>e.motion},"pir-sensor":{kind:`binary`,field:`detected`,onLabel:`Detected`,offLabel:`Clear`,getSliceHandle:e=>e.motion},"contact-sensor":{kind:`binary`,field:`entryOpen`,onLabel:`Open`,offLabel:`Closed`,getSliceHandle:e=>e.contact},"smoke-sensor":{kind:`binary`,field:`detected`,onLabel:`Smoke!`,offLabel:`Clear`,getSliceHandle:e=>e.smoke},"leak-sensor":{kind:`binary`,field:`flooded`,onLabel:`Leak!`,offLabel:`Dry`,getSliceHandle:e=>e.flood},"co-sensor":{kind:`binary`,field:`detected`,onLabel:`CO!`,offLabel:`Clear`,getSliceHandle:e=>e.carbonMonoxide},"binary-sensor":{kind:`binary`,field:`on`,onLabel:`On`,offLabel:`Off`,getSliceHandle:e=>e.binary},presence:{kind:`presence`,getSliceHandle:e=>e.presence},"enum-sensor":{kind:`string`,getSliceHandle:e=>e.enumSensor},"datetime-sensor":{kind:`datetime`,format:`datetime`,getSliceHandle:e=>e.enumSensor}};function h5(e){return typeof e==`object`&&!!e}function Vce(e){return typeof e==`object`&&!!e}function Hce(e){return typeof e==`object`&&!!e&&`state`in e&&typeof e.state==`string`}function g5(e){return typeof e==`object`&&!!e&&`value`in e&&typeof e.value==`string`}function _5(e){if(typeof e!=`object`||!e)return;let t=e.format;if(t===`date`||t===`time`||t===`datetime`)return t}function Uce(e,t){return e===`home`?t(`uiLibrary.sensor.presence.home`,`Home`):e===`not_home`?t(`uiLibrary.sensor.presence.away`,`Away`):e.charAt(0).toUpperCase()+e.slice(1)}function Wce({trpc:e,device:n}){let r=t(),i=n.role==null?void 0:m5[n.role],a=f5(n.role),{data:o}=RJ({},{staleTime:6e4}),s=L3(e,n.id),c=R3(s!==null&&i!==void 0?i.getSliceHandle(s.state):void 0),l=R3(s!==null&&i?.kind===`numeric`?s.state.enumSensor:void 0),u=R3(s!==null&&a?s.state.binary:void 0),d=a&&i?.kind===`numeric`&&!p5(c,i.field)&&u!==void 0,f=d?d5:i,p=d?u:c;if(f===void 0||p===void 0)return null;if(f.kind===`numeric`){if(!h5(p))return null;let e=p[f.field];if(typeof e!=`number`)return null;let t=p.lastFetchedAt,r=e===0&&t===0;if(r&&g5(l)&&l.value!==``)return(0,K.jsx)(`span`,{className:Z(`inline-flex items-baseline text-xs text-foreground`),children:l.value});if(r)return null;let i=n.sourceInfo?.quantity,a=c5({display:n.display,capName:n.role===`numeric-sensor`?`numeric-sensor`:void 0,roleDefault:n.role==null?void 0:o?.defaults[n.role],quantity:f.quantity??`device`,deviceQuantity:i===`device`?void 0:i}).format(e),s=a.unit,c=a.text;return(0,K.jsxs)(`span`,{className:Z(`inline-flex items-baseline gap-0.5 tabular-nums text-xs text-foreground`),children:[(0,K.jsx)(`span`,{children:c}),s&&(0,K.jsx)(`span`,{className:`text-foreground-subtle`,children:s})]})}if(f.kind===`binary`){if(!Vce(p))return null;let e=!!p[f.field],t=e?f.onLabel:f.offLabel;return(0,K.jsx)(`span`,{className:Z(`inline-flex items-center rounded px-1.5 py-0.5 text-xs font-medium`,e?`bg-warning/15 text-warning`:`bg-surface-subtle text-foreground-subtle`),children:t})}if(f.kind===`string`)return!g5(p)||p.value===``?null:(0,K.jsx)(`span`,{className:Z(`inline-flex items-baseline text-xs text-foreground`),children:p.value});if(f.kind===`datetime`){if(!g5(p)||p.value===``)return null;let e=n.sourceInfo?.dateTimeShape??_5(p)??f.format,t=l5(p.value,e);return(0,K.jsx)(`span`,{className:Z(`inline-flex items-baseline text-xs text-foreground`),children:t})}if(!Hce(p))return null;let m=Uce(p.state,r);return(0,K.jsx)(`span`,{className:Z(`inline-flex items-center rounded px-1.5 py-0.5 text-xs font-medium`,p.state===`home`?`bg-success/15 text-success`:`bg-surface-subtle text-foreground-subtle`),children:m})}function v5(e){switch(e){case`opening`:return{up:`accent`,stop:`neutral`,down:`neutral`};case`closing`:return{up:`neutral`,stop:`neutral`,down:`accent`};case`open`:return{up:`filled`,stop:`neutral`,down:`neutral`};case`closed`:return{up:`neutral`,stop:`neutral`,down:`filled`};default:return{up:`neutral`,stop:`neutral`,down:`neutral`}}}function Gce(e){switch(e){case`accent`:return`bg-primary text-primary-foreground`;case`filled`:return`bg-primary/15 text-primary`;case`neutral`:return``}}function y5({label:e,busy:t,variant:n,onClick:r,children:i}){return(0,K.jsx)(`button`,{type:`button`,"aria-label":e,title:e,disabled:t,onClick:e=>{e.stopPropagation(),r()},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,Gce(n),t&&`opacity-40 cursor-not-allowed`),children:i})}function Kce({trpc:e,deviceId:n,optimistic:r}){let i=t(),{cap:a,slice:o,available:s}=z3({trpc:e,deviceId:n,cap:e=>e.cover,slice:e=>e.state.cover}),{display:c,applyOptimistic:l}=Z8(o,{enabled:r??!0});if(a===void 0)return null;let u=v5(c?.state),d=!s,f=(e,t)=>{d||!e||(t!==void 0&&l(t),e({}))};return(0,K.jsxs)(`div`,{className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(y5,{label:i(`uiLibrary.coverInline.open`,`Open`),busy:d,variant:u.up,onClick:()=>f(a?.open,{state:`opening`}),children:(0,K.jsx)(nV,{className:`h-3.5 w-3.5`})}),(0,K.jsx)(y5,{label:i(`uiLibrary.coverInline.stop`,`Stop`),busy:d,variant:u.stop,onClick:()=>f(a?.stop,{state:`stopped`}),children:(0,K.jsx)(jH,{className:`h-3 w-3`})}),(0,K.jsx)(y5,{label:i(`uiLibrary.coverInline.close`,`Close`),busy:d,variant:u.down,onClick:()=>f(a?.close,{state:`closing`}),children:(0,K.jsx)($B,{className:`h-3.5 w-3.5`})}),c!==void 0&&c.position!==null&&(0,K.jsxs)(`span`,{className:`tabular-nums text-xs text-foreground-subtle ml-1`,children:[c.position,`%`]})]})}function b5({label:e,busy:t,variant:n,onClick:r,children:i}){return(0,K.jsx)(`button`,{type:`button`,"aria-label":e,title:e,disabled:t,onClick:e=>{e.stopPropagation(),r()},className:Z(`inline-flex h-10 w-10 items-center justify-center rounded-md text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,n===`accent`&&`bg-primary text-primary-foreground hover:bg-primary/90`,n===`filled`&&`bg-primary/15 text-primary`,t&&`opacity-40 cursor-not-allowed`),children:i})}function x5(){return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-y-0 left-1/2 w-px -translate-x-px bg-white/60`}),(0,K.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-x-0 top-1/2 h-px -translate-y-px bg-white/60`})]})}function qce({position:e,interactive:n,onSetPosition:r}){let i=t(),a=(1-e/100)*100,o=(0,s.useRef)(null),c=(0,s.useRef)(!1),l=(0,s.useRef)(null),u=t=>{let n=o.current;if(n===null)return e;let r=n.getBoundingClientRect();if(r.height<=0)return e;let i=(t-r.top)/r.height,a=Math.round(100-i*100);return Math.min(100,Math.max(0,a))},d=e=>{if(r===void 0)return;let t=u(e);l.current!==t&&(l.current=t,r(t))},f=e=>{n&&(e.stopPropagation(),e.preventDefault(),c.current=!0,l.current=null,e.currentTarget.setPointerCapture(e.pointerId),d(e.clientY))},p=e=>{!n||!c.current||(e.stopPropagation(),d(e.clientY))},m=e=>{!n||!c.current||(e.stopPropagation(),c.current=!1,l.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))};return(0,K.jsxs)(`div`,{ref:o,"data-testid":`cover-window`,...n?{"aria-label":i(`uiLibrary.coverHeroCard.dragToSet`,`Drag to set position`),role:`slider`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e}:{"aria-hidden":`true`},onPointerDown:n?f:void 0,onPointerMove:n?p:void 0,onPointerUp:n?m:void 0,onPointerCancel:n?m:void 0,className:Z(`relative w-28 h-36 rounded border-2 border-amber-700/60 bg-gradient-to-b from-sky-200 to-sky-50 overflow-hidden flex-shrink-0`,n&&`cursor-ns-resize touch-none select-none`),style:{boxShadow:`inset 0 0 0 2px rgba(255,255,255,.5)`},children:[(0,K.jsx)(x5,{}),(0,K.jsx)(`div`,{className:`absolute inset-x-0 top-0 transition-all duration-200`,style:{height:`${a}%`,background:`repeating-linear-gradient(#c9cdd2, #c9cdd2 6px, #b7bcc2 6px, #b7bcc2 8px)`,borderBottom:a>0?`1px solid #9aa`:`none`}}),(0,K.jsxs)(`div`,{"data-testid":`cover-lever`,className:Z(`absolute inset-x-0 h-4 flex items-center justify-center gap-1 z-10 transition-all duration-200`,n&&`cursor-grab active:cursor-grabbing`),style:{top:`calc(${a}% - 8px)`},children:[(0,K.jsx)(`div`,{className:`absolute -inset-x-1.5 h-full rounded-lg bg-slate-600 shadow-md`}),(0,K.jsx)(`span`,{className:`h-1 w-1 rounded-full bg-white/70 relative z-10`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{className:`h-1 w-1 rounded-full bg-white/70 relative z-10`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{className:`h-1 w-1 rounded-full bg-white/70 relative z-10`,"aria-hidden":`true`}),(0,K.jsxs)(`span`,{"data-testid":`cover-position-pct`,className:`absolute left-full ml-2 text-xs font-semibold text-foreground tabular-nums whitespace-nowrap`,children:[e,`%`]})]})]})}function Jce({isOpen:e}){return(0,K.jsxs)(`div`,{"data-testid":`cover-window`,"aria-hidden":`true`,className:`relative w-28 h-36 rounded border-2 border-amber-700/60 bg-gradient-to-b from-sky-200 to-sky-50 overflow-hidden flex-shrink-0`,style:{boxShadow:`inset 0 0 0 2px rgba(255,255,255,.5)`},children:[(0,K.jsx)(x5,{}),!e&&(0,K.jsx)(`div`,{className:`absolute inset-0`,style:{background:`repeating-linear-gradient(#c9cdd2, #c9cdd2 6px, #b7bcc2 6px, #b7bcc2 8px)`}})]})}function Yce({trpc:e,deviceId:n,features:r,optimistic:i}){let a=t(),{cap:o,slice:s,available:c}=z3({trpc:e,deviceId:n,cap:e=>e.cover,slice:e=>e.state.cover}),{display:l,applyOptimistic:u}=Z8(s,{enabled:i??!0});if(o===void 0)return null;let d=!c,f=(r??[]).includes(Sc.CoverPositionable),p=(r??[]).includes(Sc.CoverTilt),m=v5(l?.state),h=l?.position??null,g=h!==null,_=l?.state===`open`||l?.state===`opening`,v=(e,t)=>{d||!e||(t!==void 0&&u(t),e({}))},y=e=>{d||(u({position:e}),o?.setPosition({position:e}))};return(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-6`,children:[g?(0,K.jsx)(qce,{position:h,interactive:f,onSetPosition:f?y:void 0}):(0,K.jsx)(Jce,{isOpen:_}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-3 flex-1`,children:[g&&(0,K.jsxs)(`div`,{className:`flex items-baseline gap-1`,children:[(0,K.jsx)(`span`,{className:`text-3xl font-semibold tabular-nums text-foreground`,children:h}),(0,K.jsx)(`span`,{className:`text-base text-foreground-subtle`,children:`%`}),(0,K.jsx)(`span`,{className:`text-xs text-foreground-subtle ml-1`,children:a(`uiLibrary.coverHeroCard.openWord`,`open`)})]}),!g&&(0,K.jsx)(`div`,{className:`flex items-baseline gap-1`,children:(0,K.jsx)(`span`,{className:`text-3xl font-semibold capitalize text-foreground`,children:l?.state??`—`})}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(b5,{label:a(`uiLibrary.coverHeroCard.open`,`Open`),busy:d,variant:m.up,onClick:()=>v(o?.open,{state:`opening`}),children:(0,K.jsx)(nV,{className:`h-5 w-5`})}),(0,K.jsx)(b5,{label:a(`uiLibrary.coverHeroCard.stop`,`Stop`),busy:d,variant:m.stop,onClick:()=>v(o?.stop,{state:`stopped`}),children:(0,K.jsx)(jH,{className:`h-4 w-4`})}),(0,K.jsx)(b5,{label:a(`uiLibrary.coverHeroCard.close`,`Close`),busy:d,variant:m.down,onClick:()=>v(o?.close,{state:`closing`}),children:(0,K.jsx)($B,{className:`h-5 w-5`})})]})]})]}),f&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{className:`w-12 shrink-0`,children:a(`uiLibrary.coverHeroCard.position`,`Position`)}),(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.coverHeroCard.position`,`Position`),type:`range`,min:0,max:100,step:1,value:h??0,disabled:d,className:`flex-1`,onChange:e=>{y(Number(e.target.value))}}),(0,K.jsxs)(`span`,{className:`w-8 text-right tabular-nums`,children:[h??`—`,`%`]})]}),!f&&h!==null&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{className:`w-12 shrink-0`,children:a(`uiLibrary.coverHeroCard.position`,`Position`)}),(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.coverHeroCard.position`,`Position`),type:`range`,min:0,max:100,step:1,value:h,disabled:!0,readOnly:!0,className:`flex-1 opacity-60`}),(0,K.jsxs)(`span`,{className:`w-8 text-right tabular-nums`,children:[h,`%`]})]}),p&&(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{className:`w-12 shrink-0`,children:a(`uiLibrary.coverHeroCard.tilt`,`Tilt`)}),(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.coverHeroCard.tiltPosition`,`Tilt position`),type:`range`,min:0,max:100,step:1,value:l?.tiltPosition??0,disabled:d,className:`flex-1`,onChange:e=>{let t=Number(e.target.value);u({tiltPosition:t}),d||o?.setTiltPosition({tiltPosition:t})}}),(0,K.jsxs)(`span`,{className:`w-8 text-right tabular-nums`,children:[l?.tiltPosition??`—`,`%`]})]})]})}function Xce(e){return(0,K.jsx)(`span`,{className:`text-foreground-subtle text-xs select-none`,"aria-hidden":`true`,children:`—`})}function Zce(e){return(0,K.jsx)(`div`,{className:`rounded border border-border bg-surface-subtle px-3 py-2 text-xs text-foreground-subtle`,children:t()(`uiLibrary.dummyHeroCard.comingSoon`,`Controls coming soon`)})}function Qce(e){return{id:e.id,stableId:e.stableId,addonId:e.addonId,type:e.type,name:e.name,online:e.online,disabled:e.disabled,parentDeviceId:e.parentDeviceId,role:e.role??void 0,features:e.features}}function $ce({trpc:e,deviceId:t}){let{data:n}=zJ({deviceId:t},{staleTime:6e4});return n===void 0?null:(0,K.jsx)(Wce,{trpc:e,device:Qce(n)})}var S5={"temperature-sensor":`temperature-sensor`,"humidity-sensor":`humidity-sensor`,"ambient-light-sensor":`ambient-light-sensor`,"pressure-sensor":`pressure-sensor`,"numeric-sensor":`numeric-sensor`,"wind-sensor":`numeric-sensor`,"rain-sensor":`numeric-sensor`,"uv-sensor":`numeric-sensor`,"solar-radiation-sensor":`numeric-sensor`,"soil-moisture-sensor":`numeric-sensor`,"power-sensor":`power-meter`,"energy-sensor":`power-meter`,"voltage-sensor":`power-meter`,"current-sensor":`power-meter`,"battery-sensor":`numeric-sensor`,"generic-sensor":`numeric-sensor`,"motion-sensor":`motion`,"pir-sensor":`motion`,"contact-sensor":`contact`,"smoke-sensor":`smoke`,"leak-sensor":`flood`,"co-sensor":`carbon-monoxide`,"binary-sensor":`binary`,presence:`presence`,"enum-sensor":`enum-sensor`,"datetime-sensor":`enum-sensor`};function C5(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function w5(e,t){if(!C5(t))return!1;if(e.kind===`presence`)return typeof t.state==`string`;if(e.kind===`string`||e.kind===`datetime`)return typeof t.value==`string`&&t.value!==``;let n=t[e.field];return e.kind===`numeric`?typeof n==`number`:typeof n==`boolean`}function T5(e,t){if(!(t===void 0||!C5(e)))return e[t]}function ele(e){let t=T5(e,`battery`);if(!(!C5(t)||typeof t.level!=`number`))return{...t,value:t.level}}function tle(e){let t=T5(e.snapshotCaps,e.capName);if(e.descriptor!==void 0&&w5(e.descriptor,t))return t;if(e.role===`battery-sensor`&&e.descriptor?.kind===`numeric`)return ele(e.snapshotCaps)}function nle(e){let t=e.descriptor;if(t!==void 0&&w5(t,e.live))return{kind:`value`,slice:e.live};let n=tle(e);return t!==void 0&&w5(t,n)?{kind:`value`,slice:n}:e.addonId===`composer`&&e.snapshotStatus===`success`?{kind:`quiet`}:{kind:`awaiting`}}function rle(e){return typeof e==`object`&&!!e}function E5(e){return typeof e==`object`&&!!e}function ile(e){return typeof e==`object`&&!!e&&`state`in e&&typeof e.state==`string`}function ale(e,t){return e===`home`?t(`uiLibrary.sensor.presence.home`,`Home`):e===`not_home`?t(`uiLibrary.sensor.presence.away`,`Away`):e.charAt(0).toUpperCase()+e.slice(1)}var ole={low:`bg-danger`,medium:`bg-warning`,high:`bg-success`};function sle(e){return e<=20?`low`:e<=50?`medium`:`high`}function cle({percent:e}){let t=Math.min(100,Math.max(0,e)),n=sle(t);return(0,K.jsx)(`div`,{"data-testid":`battery-bar`,"data-band":n,className:`h-2 w-24 overflow-hidden rounded-full bg-border`,children:(0,K.jsx)(`div`,{className:Z(`h-full rounded-full transition-all`,ole[n]),style:{width:`${t}%`}})})}function lle({trpc:e,device:n}){let r=t(),i=n.role==null?m5[`temperature-sensor`]:m5[n.role],a=f5(n.role),{data:o}=RJ({},{staleTime:6e4}),s=L3(e,n.id),c=R3(s!==null&&i!==void 0?i.getSliceHandle(s.state):void 0),l=R3(s!==null&&a?s.state.binary:void 0),u=R3(s!==null&&!a?s.state.binary:void 0),d=a&&i?.kind===`numeric`&&!p5(c,i.field)&&l!==void 0,f=d?d5:i,p=d?l:c,m=BJ({deviceId:n.id},{staleTime:5e3}),h=d?`binary`:n.role==null?S5[`temperature-sensor`]:S5[n.role],g=m.status===`success`||m.status===`error`?m.status:`pending`,_=nle({addonId:n.addonId,role:n.role,descriptor:f,capName:h,live:p,snapshotStatus:g,snapshotCaps:m.data});if(_.kind===`quiet`)return(0,K.jsx)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4 min-h-[96px]`,"data-testid":`sensor-hero-quiet`,children:(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`})});let v=_.kind===`value`?_.slice:void 0;if(f===void 0||v===void 0)return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4 min-h-[96px]`,children:[(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`}),(0,K.jsx)(`span`,{className:`text-xs text-foreground-subtle italic`,children:r(`uiLibrary.sensorHeroCard.awaiting`,`Awaiting state…`)})]});if(f.kind===`numeric`){if(!rle(v))return null;let e=v[f.field];if(typeof e!=`number`)return null;let t=n.sourceInfo?.quantity,i=c5({display:n.display,capName:n.role===`numeric-sensor`?`numeric-sensor`:void 0,roleDefault:n.role==null?o?.defaults?.[`temperature-sensor`]:o?.defaults?.[n.role],quantity:f.quantity??`device`,deviceQuantity:t===`device`?void 0:t}).format(e),s=i.unit,c=i.text,l=u!==void 0&&E5(u)&&typeof u.on==`boolean`?!!u.on:null;return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-baseline gap-1`,children:[(0,K.jsx)(`span`,{className:`text-3xl font-semibold tabular-nums text-foreground`,children:c}),s&&(0,K.jsx)(`span`,{className:`text-base text-foreground-subtle`,children:s})]}),a&&(0,K.jsx)(cle,{percent:e}),l!==null&&(0,K.jsx)(`span`,{className:Z(`inline-flex items-center rounded px-2 py-0.5 text-xs font-medium`,l?`bg-warning/15 text-warning`:`bg-surface-subtle text-foreground-subtle`),"data-testid":`sensor-hero-occupancy`,children:l?r(`uiLibrary.sensorHeroCard.occupied`,`Occupied`):r(`uiLibrary.sensorHeroCard.clear`,`Clear`)}),(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`})]})}if(f.kind===`binary`){if(!E5(v))return null;let e=!!v[f.field],t=e?f.onLabel:f.offLabel;return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsx)(`span`,{className:Z(`inline-flex items-center rounded px-3 py-1.5 text-lg font-semibold`,e?`bg-warning/15 text-warning`:`bg-surface-subtle text-foreground-subtle`),children:t}),(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`})]})}if(f.kind===`datetime`){if(!g5(v))return null;if(v.value===``)return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4 min-h-[96px]`,children:[(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`}),(0,K.jsx)(`span`,{className:`text-xs text-foreground-subtle italic`,children:r(`uiLibrary.sensorHeroCard.awaiting`,`Awaiting state…`)})]});let e=n.sourceInfo?.dateTimeShape??_5(v)??f.format;return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsx)(`span`,{className:`text-3xl font-semibold tabular-nums text-foreground`,children:l5(v.value,e)}),(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`})]})}if(f.kind===`string`)return!g5(v)||v.value===``?null:(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsx)(`span`,{className:`text-xl font-semibold text-foreground`,children:v.value}),(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`})]});if(!ile(v))return null;let y=ale(v.state,r);return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsx)(`span`,{className:Z(`inline-flex items-center rounded px-3 py-1.5 text-lg font-semibold`,v.state===`home`?`bg-success/15 text-success`:`bg-surface-subtle text-foreground-subtle`),children:y}),(0,K.jsx)(I3,{device:n,form:`full`,className:`text-sm text-foreground-subtle`})]})}function ule({trpc:e,deviceId:t}){let{data:n}=zJ({deviceId:t},{staleTime:6e4});return n===void 0?null:(0,K.jsx)(lle,{trpc:e,device:n})}function D5(e){return e===void 0||e.inProgress?!1:e.availableVersion!==null&&e.currentVersion!==null&&e.availableVersion!==e.currentVersion}function O5(e,t){return z3({trpc:e,deviceId:t,cap:e=>e.update,slice:e=>e.state.update})}function dle({trpc:e,deviceId:n}){let r=t(),{cap:i,slice:a}=O5(e,n);return i===void 0?null:a?.inProgress?(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-xs text-foreground-subtle`,children:[(0,K.jsx)(BV,{className:`h-3.5 w-3.5 animate-spin`}),r(`uiLibrary.updateControl.updating`,`Updating…`)]}):D5(a)?(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded bg-warning/15 px-1.5 py-0.5 text-[10px] font-medium text-warning`,children:[(0,K.jsx)(yV,{className:`h-3 w-3`}),r(`uiLibrary.updateControl.update`,`Update`)]}):(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[10px] text-foreground-subtle`,children:[(0,K.jsx)(QB,{className:`h-3 w-3 text-success`}),a?.currentVersion??r(`uiLibrary.updateControl.upToDate`,`Up to date`)]})}function fle({trpc:e,deviceId:n}){let r=t(),{cap:i,slice:a,available:o}=O5(e,n);if(i===void 0)return null;let s=a?.inProgress===!0,c=D5(a),l=a?.currentVersion??`—`,u=()=>{!o||i===void 0||!c||i.installUpdate({})};return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,children:[(0,K.jsx)(`span`,{className:`text-3xl font-semibold tabular-nums text-foreground`,children:l}),c&&a?.availableVersion!=null&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`text-base text-foreground-subtle`,children:`→`}),(0,K.jsx)(`span`,{className:`text-base font-medium text-warning tabular-nums`,children:a.availableVersion})]})]}),s?(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded px-3 py-1.5 text-sm font-medium text-foreground-subtle`,children:[(0,K.jsx)(BV,{className:`h-4 w-4 animate-spin`}),r(`uiLibrary.updateControl.installing`,`Installing…`)]}):c?(0,K.jsxs)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),u()},disabled:!o,className:`inline-flex items-center gap-1.5 rounded-lg bg-primary px-4 py-1.5 text-sm font-medium text-primary-foreground shadow-sm transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:[(0,K.jsx)(yV,{className:`h-4 w-4`}),r(`uiLibrary.updateControl.install`,`Install update`)]}):(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded bg-success/15 px-3 py-1 text-sm font-medium text-success`,children:[(0,K.jsx)(QB,{className:`h-4 w-4`}),r(`uiLibrary.updateControl.upToDate`,`Up to date`)]}),a?.state!=null&&a.state!==``&&(0,K.jsx)(`span`,{className:`text-[10px] text-foreground-subtle`,children:a.state})]})}function ple(e,t=i){switch(e){case`cleaning`:return{label:t(`uiLibrary.vacuum.cleaning`,`Cleaning`),tone:`text-primary`};case`paused`:return{label:t(`uiLibrary.vacuum.paused`,`Paused`),tone:`text-warning`};case`returning`:return{label:t(`uiLibrary.vacuum.returning`,`Returning`),tone:`text-primary`};case`docked`:return{label:t(`uiLibrary.vacuum.docked`,`Docked`),tone:`text-success`};case`drying`:return{label:t(`uiLibrary.vacuum.drying`,`Drying`),tone:`text-warning`};case`idle`:return{label:t(`uiLibrary.vacuum.idle`,`Idle`),tone:`text-foreground-subtle`};case`error`:return{label:t(`uiLibrary.vacuum.error`,`Error`),tone:`text-destructive`};case void 0:return{label:t(`uiLibrary.vacuum.unknown`,`Unknown`),tone:`text-foreground-subtle`}}}function k5(e,t){return z3({trpc:e,deviceId:t,cap:e=>e.vacuumControl,slice:e=>e.state.vacuumControl})}function A5({label:e,busy:t,active:n,onClick:r,children:i}){return(0,K.jsx)(`button`,{type:`button`,"aria-label":e,title:e,disabled:t,onClick:e=>{e.stopPropagation(),r()},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,n&&`bg-primary text-primary-foreground`,t&&`opacity-40 cursor-not-allowed`),children:i})}function mle(e){switch(e){case`cleaning`:return{glow:`bg-primary/15`,accent:`text-primary`,docked:!1,active:!0};case`returning`:return{glow:`bg-primary/10`,accent:`text-primary`,docked:!1,active:!0};case`docked`:return{glow:`bg-success/10`,accent:`text-success`,docked:!0,active:!1};case`drying`:return{glow:`bg-warning/10`,accent:`text-warning`,docked:!0,active:!1};case`paused`:return{glow:`bg-warning/10`,accent:`text-warning`,docked:!1,active:!1};case`error`:return{glow:`bg-destructive/10`,accent:`text-destructive`,docked:!1,active:!1};case`idle`:return{glow:`bg-transparent`,accent:`text-foreground-subtle`,docked:!1,active:!1};case void 0:return{glow:`bg-transparent`,accent:`text-foreground-subtle`,docked:!1,active:!1}}}var hle=`
|
|
80
80
|
@keyframes rg-breathe { 0%,100%{opacity:.78;transform:scale(1)} 50%{opacity:1;transform:scale(1.05)} }
|
|
81
81
|
@keyframes rg-zzz { 0%{opacity:0;transform:translateY(3px)} 30%{opacity:.85} 100%{opacity:0;transform:translateY(-9px)} }
|
|
82
82
|
@keyframes rg-spark { 0%,100%{opacity:.25;transform:scale(.9)} 50%{opacity:1;transform:scale(1.1)} }
|
|
@@ -109,4 +109,4 @@ Error generating stack: `+e.message+`
|
|
|
109
109
|
@media (prefers-reduced-motion: reduce) {
|
|
110
110
|
.acv-streak, .acv-fan, .acv-sway-wrap, .acv-glow, .acv-swing { animation: none !important; }
|
|
111
111
|
}
|
|
112
|
-
`;function x7({trpc:e,deviceId:n,layout:r,optimistic:i}){let a=t(),{cap:o,slice:s,available:c}=z3({trpc:e,deviceId:n,cap:e=>e.climateControl,slice:e=>e.state.climateControl}),{display:l,applyOptimistic:u}=Z8(s,{enabled:i??!0});if(o===void 0||l===void 0)return null;let d=!c;if(r===`compact`)return(0,K.jsxs)(`div`,{"data-mode":l.mode,className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(`span`,{className:Z(`text-xs tabular-nums font-medium`,a5[l.mode]),children:l.target===null?l.currentTemp===null?null:(0,K.jsxs)(`span`,{className:`text-foreground-subtle`,children:[l.currentTemp,`°`]}):(0,K.jsxs)(K.Fragment,{children:[l.target,`°`,l.currentTemp!==null&&(0,K.jsxs)(`span`,{className:`text-foreground-subtle font-normal`,children:[` `,`(`,l.currentTemp,`°)`]})]})}),l.target!==null&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":a(`uiLibrary.acPanel.decrease`,`Decrease target`),disabled:d,onClick:e=>{if(e.stopPropagation(),!d&&l.target!==null){let e=r5(l.target,-1,l);u({target:e}),o.setTarget({target:e})}},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors text-xs`,d&&`opacity-40 cursor-not-allowed`),children:`−`}),(0,K.jsx)(`button`,{type:`button`,"aria-label":a(`uiLibrary.acPanel.increase`,`Increase target`),disabled:d,onClick:e=>{if(e.stopPropagation(),!d&&l.target!==null){let e=r5(l.target,1,l);u({target:e}),o.setTarget({target:e})}},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors text-xs`,d&&`opacity-40 cursor-not-allowed`),children:`+`})]}),(0,K.jsx)(`select`,{"aria-label":a(`uiLibrary.acPanel.mode`,`Mode`),value:l.mode,disabled:d,onChange:e=>{e.stopPropagation();let t=l.availableModes.find(t=>t===e.target.value);!d&&t&&(u({mode:t}),o.setMode({mode:t}))},className:Z(`bg-transparent px-0.5 text-xs text-foreground-subtle hover:text-foreground cursor-pointer`,d&&`opacity-40 cursor-not-allowed`),children:l.availableModes.map(e=>(0,K.jsx)(`option`,{value:e,children:y7(a,e)},e))})]});let f=mue[l.mode],p=l.mode!==`off`,m=!uue(l.availableModes),h=due(l),g=hue(l.preset),_=l.preset===`turbo`,v=Math.max(.55,gue(l.fanMode)*(_?.6:1)),y=l.swingVertical!==null,b=l.swingHorizontal!==null,ee=p&&(l.swingVertical===!0||l.swingHorizontal===!0);return(0,K.jsxs)(`div`,{"data-mode":l.mode,className:Z(`relative flex flex-col items-stretch gap-2.5 overflow-hidden rounded-lg border p-3 transition-colors`,i5[l.mode]),children:[(0,K.jsx)(`style`,{children:_ue}),(0,K.jsxs)(`div`,{className:`relative z-10 flex flex-col items-center justify-center gap-1 overflow-hidden rounded-lg border border-border/50 bg-surface/30 px-3 py-3`,children:[(0,K.jsx)(`div`,{className:`pointer-events-none absolute inset-0 opacity-60`,children:m&&!p?(0,K.jsx)(xue,{}):(0,K.jsx)(bue,{mode:l.mode,accent:f,periodSec:v,swaying:ee,forceRising:m})}),(0,K.jsx)(`div`,{className:`pointer-events-none absolute inset-0 bg-gradient-to-b from-surface/50 via-transparent to-surface/50`}),p&&(0,K.jsx)(`span`,{"aria-hidden":!0,className:`acv-glow pointer-events-none absolute left-1/2 top-1/2 h-16 w-16 -translate-x-1/2 -translate-y-1/2 rounded-full blur-2xl`,style:{background:f,animation:`acv-glow 3.2s ease-in-out infinite`}}),(0,K.jsxs)(`div`,{className:`relative z-10 flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wide`,style:{color:f},children:[(0,K.jsx)(S7,{mode:l.mode,heatingOnly:m,className:`h-3.5 w-3.5`}),y7(a,l.mode),l.currentTemp!==null&&(0,K.jsx)(`span`,{className:`normal-case text-foreground-subtle`,children:a(`uiLibrary.acPanel.now`,`· {{temp}}° now`,{temp:l.currentTemp})}),l.currentHumidity!==null&&(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 normal-case text-foreground-subtle`,children:[(0,K.jsx)(xV,{className:`h-3 w-3`}),l.currentHumidity,`%`]})]}),l.target===null?(0,K.jsxs)(`div`,{className:`relative z-10 flex items-baseline gap-0.5`,children:[(0,K.jsx)(`span`,{className:Z(`text-4xl font-bold leading-none tabular-nums text-foreground`,n5(l)),children:l.currentTemp??`—`}),(0,K.jsx)(`span`,{className:`text-lg text-foreground-subtle`,children:`°`})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`relative z-10 flex items-center gap-3`,children:[(0,K.jsx)(w7,{label:a(`uiLibrary.acPanel.decrease`,`Decrease target`),symbol:`−`,disabled:d,onClick:()=>{if(d||l.target===null)return;let e=r5(l.target,-1,l);u({target:e}),o.setTarget({target:e})}}),(0,K.jsxs)(`div`,{className:`flex items-baseline gap-0.5`,children:[(0,K.jsx)(`span`,{className:Z(`text-4xl font-bold leading-none tabular-nums`,n5(l)),style:{color:f},children:l.target}),(0,K.jsx)(`span`,{className:`text-lg text-foreground-subtle`,children:`°`})]}),(0,K.jsx)(w7,{label:a(`uiLibrary.acPanel.increase`,`Increase target`),symbol:`+`,disabled:d,onClick:()=>{if(d||l.target===null)return;let e=r5(l.target,1,l);u({target:e}),o.setTarget({target:e})}})]}),h!==null&&(0,K.jsx)(`div`,{className:`relative z-10 w-full px-1`,children:(0,K.jsx)(yue,{value:l.target,min:h.min,max:h.max,step:l.tempStep,accent:f,disabled:d,label:a(`uiLibrary.acPanel.setpoint`,`Setpoint`),onPreview:e=>{u({target:e})},onCommit:e=>{u({target:e}),o.setTarget({target:e})}})})]})]}),(0,K.jsxs)(`div`,{className:`relative z-10 grid grid-cols-3 gap-2`,children:[(0,K.jsx)(C7,{label:a(`uiLibrary.acPanel.mode`,`Mode`),icon:(0,K.jsx)(`span`,{style:{color:f},className:`flex`,children:(0,K.jsx)(S7,{mode:l.mode,heatingOnly:m,className:`h-4 w-4`})}),value:l.mode,options:l.availableModes.map(e=>({value:e,label:y7(a,e)})),disabled:d,onChange:e=>{let t=l.availableModes.find(t=>t===e);t&&(u({mode:t}),o.setMode({mode:t}))}}),l.availableFanModes.length>0&&(0,K.jsx)(C7,{label:a(`uiLibrary.acPanel.fan`,`Fan`),icon:(0,K.jsx)(ZH,{className:`h-4 w-4 text-sky-500`}),value:l.fanMode,options:l.availableFanModes.map(e=>({value:e,label:b7(e)})),disabled:d,onChange:e=>{u({fanMode:e}),o.setFanMode({fanMode:e})}}),l.availablePresets.length>0&&(0,K.jsx)(C7,{label:a(`uiLibrary.acPanel.preset`,`Preset`),icon:(0,K.jsx)(g,{className:`h-4 w-4 text-emerald-500`}),value:l.preset,options:l.availablePresets.map(e=>({value:e,label:b7(e)})),disabled:d,onChange:e=>{u({preset:e}),o.setPreset({preset:e})}})]}),(y||b)&&(0,K.jsx)(vue,{label:a(`uiLibrary.acPanel.swing`,`Swing`),children:(0,K.jsxs)(`div`,{className:`grid grid-cols-2 gap-1`,children:[y&&(0,K.jsx)(T7,{axis:`vertical`,on:l.swingVertical??!1,busy:d,onToggle:e=>{u({swingVertical:e}),o.setSwingVertical({on:e})}}),b&&(0,K.jsx)(T7,{axis:`horizontal`,on:l.swingHorizontal??!1,busy:d,onToggle:e=>{u({swingHorizontal:e}),o.setSwingHorizontal({on:e})}})]})})]})}function vue({label:e,children:t}){return(0,K.jsxs)(`div`,{className:`relative z-10 flex flex-col gap-1`,children:[(0,K.jsx)(`span`,{className:`text-[10px] font-semibold uppercase tracking-wider text-foreground-subtle`,children:e}),t]})}function S7({mode:e,heatingOnly:t=!1,className:n}){return(0,K.jsx)(t&&e===`heat`?jV:pue[e],{className:n,"aria-hidden":!0})}function C7({label:e,icon:t,value:n,options:r,disabled:i,onChange:a}){return(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,K.jsx)(`span`,{className:`text-[10px] font-semibold uppercase tracking-wider text-foreground-subtle`,children:e}),(0,K.jsxs)(`div`,{className:Z(`flex items-center gap-1 overflow-hidden rounded-lg border border-border/60 bg-surface-subtle px-1.5 py-1.5 has-[:focus-visible]:border-primary`,i&&`opacity-40`),children:[(0,K.jsx)(`span`,{className:`flex shrink-0`,children:t}),(0,K.jsx)(`select`,{"aria-label":e,value:n,disabled:i,onChange:e=>{e.stopPropagation(),i||a(e.target.value)},className:`min-w-0 flex-1 cursor-pointer appearance-none truncate bg-transparent text-xs font-medium text-foreground outline-none`,children:r.map(e=>(0,K.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,K.jsx)($B,{className:`h-3 w-3 shrink-0 text-foreground-subtle`})]})]})}function w7({label:e,symbol:t,disabled:n,onClick:r}){return(0,K.jsx)(`button`,{type:`button`,"aria-label":e,disabled:n,onClick:r,className:Z(`flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-border bg-surface text-lg leading-none text-foreground-subtle transition-colors hover:bg-surface-hover hover:text-foreground active:scale-95`,n&&`opacity-40 cursor-not-allowed`),children:t})}function yue({value:e,min:t,max:n,step:r,accent:i,disabled:a,label:o,onPreview:c,onCommit:l}){let u=(0,s.useRef)(null),d=(0,s.useRef)(!1),[f,p]=(0,s.useState)(null),m=f??e,h=`${Math.min(1,Math.max(0,(m-t)/(n-t)))*100}%`,g=i=>{let a=u.current;if(a===null)return e;let o=a.getBoundingClientRect();return o.width<=0?e:fue((i-o.left)/o.width,{min:t,max:n},r)},_=e=>{if(a)return;e.stopPropagation(),e.preventDefault(),d.current=!0,typeof e.currentTarget.setPointerCapture==`function`&&e.currentTarget.setPointerCapture(e.pointerId);let t=g(e.clientX);p(t),c(t)},v=e=>{if(a||!d.current)return;e.stopPropagation();let t=g(e.clientX);p(t),c(t)},y=e=>{if(!d.current)return;e.stopPropagation(),d.current=!1;let t=g(e.clientX);p(null),e.currentTarget.hasPointerCapture?.(e.pointerId)===!0&&e.currentTarget.releasePointerCapture(e.pointerId),l(t)};return(0,K.jsxs)(`div`,{ref:u,role:`slider`,"aria-label":o,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":m,"aria-disabled":a,tabIndex:a?-1:0,onPointerDown:_,onPointerMove:v,onPointerUp:y,onPointerCancel:y,onKeyDown:i=>{if(a)return;let o=f??e;i.key===`ArrowRight`||i.key===`ArrowUp`?(i.preventDefault(),l(r5(o,1,{tempStep:r,minTemp:t,maxTemp:n}))):i.key===`ArrowLeft`||i.key===`ArrowDown`?(i.preventDefault(),l(r5(o,-1,{tempStep:r,minTemp:t,maxTemp:n}))):i.key===`Home`?(i.preventDefault(),l(t)):i.key===`End`&&(i.preventDefault(),l(n))},className:Z(`mt-1 w-full touch-none select-none py-2`,a?`cursor-not-allowed opacity-40`:`cursor-ew-resize`),children:[(0,K.jsxs)(`div`,{className:`relative h-1.5 w-full rounded-full bg-surface-subtle`,children:[(0,K.jsx)(`div`,{className:`absolute inset-y-0 left-0 rounded-full`,style:{width:h,background:i}}),(0,K.jsx)(`div`,{className:`absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-surface shadow`,style:{left:h,background:i}})]}),(0,K.jsxs)(`div`,{className:`mt-0.5 flex justify-between text-[9px] tabular-nums text-foreground-subtle`,children:[(0,K.jsxs)(`span`,{children:[t,`°`]}),(0,K.jsxs)(`span`,{children:[n,`°`]})]})]})}function bue({mode:e,accent:t,periodSec:n,swaying:r,forceRising:i=!1}){let a=[0,1,2,3,4,5],o=i||e===`heat`,s=e===`dry`;return(0,K.jsx)(`div`,{"aria-hidden":!0,className:`absolute inset-0 overflow-hidden`,children:e===`off`?(0,K.jsx)(`div`,{className:`flex h-full items-center justify-center gap-2 opacity-30`,children:a.map(e=>(0,K.jsx)(`span`,{className:`h-8 w-1 rounded-full bg-foreground-subtle opacity-40`},e))}):e===`fan_only`?(0,K.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,K.jsx)(Sue,{color:t,periodSec:Math.max(.5,n*.7),size:56})}):(0,K.jsx)(`div`,{"data-testid":i?`climate-heat-rise`:void 0,className:Z(`acv-sway-wrap absolute inset-0`,r&&`acv-sway`),style:r?{animation:`acv-sway 2.6s ease-in-out infinite`}:void 0,children:a.map(e=>(0,K.jsx)(`span`,{className:`acv-streak absolute rounded-full`,style:{left:`${8+e*15}%`,width:s?`0.4rem`:`0.3rem`,height:s?`0.4rem`:`1.9rem`,background:t,boxShadow:`0 0 6px ${t}`,animationName:o?`acv-rise`:`acv-fall`,animationTimingFunction:`linear`,animationIterationCount:`infinite`,animationDuration:`${n}s`,animationDelay:`${e%3*(n/3)+e*.05}s`}},e))})})}function xue(){return(0,K.jsx)(`div`,{"data-testid":`climate-radiator`,"aria-hidden":!0,className:`flex h-full items-end justify-center gap-1.5 px-8 pb-3 opacity-40`,children:[0,1,2,3,4,5,6].map(e=>(0,K.jsx)(`span`,{className:`h-10 w-1.5 rounded-t-full bg-foreground-subtle`},e))})}function Sue({color:e,periodSec:t,size:n}){return(0,K.jsxs)(`svg`,{width:n,height:n,viewBox:`0 0 100 100`,className:`acv-fan`,style:{animation:`acv-spin ${t}s linear infinite`,transformOrigin:`50% 50%`},"aria-hidden":!0,children:[[0,120,240].map(t=>(0,K.jsx)(`path`,{d:`M50 50 C 58 30, 78 26, 84 12 C 66 20, 54 34, 50 50 Z`,fill:e,opacity:.85,transform:`rotate(${t} 50 50)`},t)),(0,K.jsx)(`circle`,{cx:`50`,cy:`50`,r:`7`,fill:e})]})}function T7({axis:e,on:n,busy:r,onToggle:i}){let a=t(),o=e===`vertical`?a(`uiLibrary.acPanel.vertical`,`Vertical`):a(`uiLibrary.acPanel.horizontal`,`Horizontal`),s=e===`vertical`?$V:QV,c=e===`vertical`?`acv-swing-v`:`acv-swing-h`;return(0,K.jsxs)(`button`,{type:`button`,"aria-label":a(`uiLibrary.acPanel.swingAxis`,`{{axis}} swing`,{axis:o}),"aria-pressed":n,disabled:r,onClick:()=>{r||i(!n)},className:Z(`flex items-center justify-center gap-2 rounded-lg border px-2 py-1.5 text-xs font-medium transition-colors`,n?`border-transparent bg-indigo-400 text-indigo-950 shadow-sm`:`border-border/60 bg-surface-subtle text-foreground-subtle hover:bg-surface-hover hover:text-foreground`,r&&`opacity-40 cursor-not-allowed`),children:[(0,K.jsx)(s,{className:`acv-swing h-4 w-4`,"aria-hidden":!0,style:n?{animation:`${c} 1.4s ease-in-out infinite`}:void 0}),o]})}var Cue=5,wue=35;function E7(e,t,n){return n<=t?0:Math.min(1,Math.max(0,(e-t)/(n-t)))}function D7(e,t,n){return Math.round(t+e*(n-t))}var O7=176,k7=76,A7=2*Math.PI*k7,j7=270/360*A7,M7=O7/2-k7-10;function N7(e){let t=O7/2,n=O7/2,r=A7-j7,i=e.mode===`band`?(()=>{let t=e.band.from*j7,n=Math.max(0,(e.band.to-e.band.from)*j7);return{dasharray:`${n} ${A7-n}`,dashoffset:-t}})():(()=>{let t=e.fraction*j7;return{dasharray:`${t} ${A7-t}`,dashoffset:void 0}})();return(0,K.jsxs)(`svg`,{width:O7,height:O7,viewBox:`0 0 ${O7} ${O7}`,"aria-hidden":`true`,className:`absolute inset-0`,style:{transform:`rotate(135deg)`},children:[(0,K.jsx)(`circle`,{cx:t,cy:n,r:k7,fill:`none`,stroke:`var(--color-border)`,strokeWidth:12,strokeDasharray:`${j7} ${r}`,strokeLinecap:`round`}),(0,K.jsx)(`circle`,{cx:t,cy:n,r:k7,fill:`none`,stroke:e.color,strokeWidth:12,strokeDasharray:i.dasharray,...i.dashoffset===void 0?{}:{strokeDashoffset:i.dashoffset},strokeLinecap:`round`})]})}var Tue={heat:`#f59e0b`,cool:`#60a5fa`,auto:`#c084fc`,heat_cool:`#e879f9`,fan_only:`#94a3b8`,dry:`#22d3ee`,off:`#d4d4d8`};function Eue({trpc:e,deviceId:n,features:r,optimistic:i}){let a=t(),o=z3({trpc:e,deviceId:n,cap:e=>e.climateControl,slice:e=>e.state.climateControl}),s=z3({trpc:e,deviceId:n,cap:e=>e.heatingValve,slice:e=>e.state.heatingValve}),{display:c,applyOptimistic:l}=Z8(o.slice,{enabled:i??!0}),u=o.cap!==void 0&&c!==void 0,d=s.cap!==void 0;if(!u&&!d)return null;if(!u&&d)return(0,K.jsx)(`div`,{className:`flex flex-col items-stretch gap-3 rounded-lg border border-border bg-surface p-4`,children:(0,K.jsx)(v7,{trpc:e,deviceId:n,layout:`full`})});if(o.cap===void 0||c===void 0)return null;let f=o.cap,p=!o.available,m=Tue[c.mode],h=c.mode===`heat_cool`||c.targetLow!==null&&c.targetHigh!==null,g=Cue,_=wue,v=!h&&c.target!==null?E7(c.target,g,_):0,y=h&&c.targetLow!==null?E7(c.targetLow,g,_):0,b=h&&c.targetHigh!==null?E7(c.targetHigh,g,_):0;return(0,K.jsxs)(`div`,{"data-mode":c.mode,className:Z(`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-4 transition-colors`,i5[c.mode]),children:[(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,K.jsxs)(`div`,{className:`relative`,style:{width:O7,height:O7},children:[h?(0,K.jsx)(N7,{mode:`band`,band:{from:y,to:b},color:m}):(0,K.jsx)(N7,{mode:`fill`,fraction:v,color:m}),h?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{"data-testid":`arc-knob`,children:(0,K.jsx)(H8,{fraction:y,color:m,knobTopPx:M7,onDragFraction:e=>{if(p||c.targetHigh===null)return;let t=Math.min(D7(e,g,_),c.targetHigh);l({targetLow:t}),f.setTargetRange({targetLow:t,targetHigh:c.targetHigh})}})}),(0,K.jsx)(`div`,{"data-testid":`arc-knob`,children:(0,K.jsx)(H8,{fraction:b,color:m,knobTopPx:M7,onDragFraction:e=>{if(p||c.targetLow===null)return;let t=Math.max(D7(e,g,_),c.targetLow);l({targetHigh:t}),f.setTargetRange({targetLow:c.targetLow,targetHigh:t})}})})]}):(0,K.jsx)(`div`,{"data-testid":`arc-knob`,children:(0,K.jsx)(H8,{fraction:v,color:m,knobTopPx:M7,onDragFraction:e=>{if(p)return;let t=D7(e,g,_);l({target:t}),f.setTarget({target:t})}})}),(0,K.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-0.5 pointer-events-none`,children:[(0,K.jsxs)(`div`,{"data-testid":`current-temp`,className:`text-4xl font-bold tabular-nums text-foreground leading-none`,children:[c.currentTemp===null?`—`:c.currentTemp,(0,K.jsx)(`span`,{className:`text-lg text-foreground-subtle font-normal ml-0.5`,children:`°`})]}),!h&&c.target!==null&&(0,K.jsx)(`div`,{className:`text-xs font-semibold`,style:{color:m},children:a(`uiLibrary.thermostatHeroCard.setTo`,`set {{value}}°`,{value:c.target})}),h&&c.targetLow!==null&&c.targetHigh!==null&&(0,K.jsxs)(`div`,{className:`text-xs font-semibold`,style:{color:m},children:[c.targetLow,`° – `,c.targetHigh,`°`]})]})]}),!h&&c.target!==null&&(0,K.jsx)(`div`,{className:`w-[200px]`,children:(0,K.jsx)(B8,{value:`${c.target}°`,onDelta:e=>{if(p||c.target===null)return;let t=c.target+e;l({target:t}),f.setTarget({target:t})}})})]}),d?(0,K.jsx)(v7,{trpc:e,deviceId:n,layout:`full`}):null,(0,K.jsx)(`select`,{"aria-label":a(`uiLibrary.thermostatHeroCard.mode`,`Mode`),value:c.mode,disabled:p,onChange:e=>{e.stopPropagation();let t=e.target.value;!p&&t&&(l({mode:c.availableModes.find(e=>e===t)??c.mode}),f.setMode({mode:c.availableModes.find(e=>e===t)??c.mode}))},className:Z(`w-full rounded border border-border bg-surface px-3 py-1.5 text-sm`,p&&`opacity-40 cursor-not-allowed`),children:c.availableModes.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))})]})}function Due(e){return e===`locked`||e===`locking`}function P7(e){return e===`jammed`}var F7={locked:{colorClass:`border-success/30 bg-success/10 text-success`,icon:`locked`},locking:{colorClass:`border-success/30 bg-success/10 text-success`,icon:`locked`},unlocked:{colorClass:`border-warning/30 bg-warning/10 text-warning`,icon:`open`},unlocking:{colorClass:`border-warning/30 bg-warning/10 text-warning`,icon:`open`},jammed:{colorClass:`border-danger/30 bg-danger/10 text-danger`,icon:`locked`}};function Oue({state:e}){let t=F7[e];return(0,K.jsx)(`div`,{"data-testid":`lock-glyph`,"data-state":e,className:Z(`flex h-16 w-16 items-center justify-center rounded-full border-2`,t.colorClass),children:t.icon===`locked`?(0,K.jsx)(HV,{className:`h-8 w-8`,"aria-hidden":`true`}):(0,K.jsx)(VV,{className:`h-8 w-8`,"aria-hidden":`true`})})}function kue({state:e}){return(0,K.jsx)(`span`,{className:Z(`text-sm font-medium capitalize`,P7(e)?`text-danger`:`text-foreground-muted`),children:e})}function Aue({busy:e,onOpen:n}){let r=t();return(0,K.jsxs)(`button`,{type:`button`,"aria-label":r(`uiLibrary.lockHeroCard.openUnlatch`,`Open (unlatch)`),title:r(`uiLibrary.lockHeroCard.openUnlatch`,`Open (unlatch)`),disabled:e,onClick:e=>{e.stopPropagation(),n()},className:Z(`inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs font-medium`,`text-foreground-muted hover:bg-surface-hover transition-colors`,e&&`opacity-40 cursor-not-allowed`),children:[(0,K.jsx)(vV,{className:`h-3.5 w-3.5`,"aria-hidden":`true`}),r(`uiLibrary.lockHeroCard.open`,`Open`)]})}function jue({trpc:e,deviceId:t,features:n,optimistic:r}){let{cap:i,slice:a,available:o}=z3({trpc:e,deviceId:t,cap:e=>e.lockControl,slice:e=>e.state.lockControl}),{display:s,applyOptimistic:c}=Z8(a,{enabled:r??!0});if(i===void 0||s===void 0||!(s.state in F7))return null;let l=Due(s.state),u=P7(s.state)||!o,d=n?.includes(Sc.LockOpen)===!0,f=()=>{u||(l?(c({state:`unlocking`}),i.unlock({})):(c({state:`locking`}),i.lock({})))},p=()=>{u||i.open({})},m=l?`Unlock`:`Lock`;return(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,K.jsx)(Oue,{state:s.state}),(0,K.jsx)(kue,{state:s.state})]}),(0,K.jsx)(`div`,{className:Z(u&&`pointer-events-none opacity-40`),children:(0,K.jsx)(ice,{on:l,targetLabel:m,onConfirm:f})}),d&&(0,K.jsx)(`div`,{className:`flex justify-center`,children:(0,K.jsx)(Aue,{busy:u,onOpen:p})})]})}var I7=500,L7=150,Mue=`linear-gradient(90deg, #9ec9ff, #ffffff, #ffb24d)`;function Nue(e,t,n){return n<=t?0:Math.min(1,Math.max(0,(e-t)/(n-t)))}function Pue(e){return Nue(e,L7,I7)}var Fue=`#f4b740`,Iue=`#d4d4d8`;function Lue({trpc:e,deviceId:n,features:r,optimistic:i}){let a=t(),o=z3({trpc:e,deviceId:n,cap:e=>e.switch,slice:e=>e.state.switch}),s=z3({trpc:e,deviceId:n,cap:e=>e.brightness,slice:e=>e.state.brightness}),c=z3({trpc:e,deviceId:n,cap:e=>e.color,slice:e=>e.state.color}),l=Z8(o.slice,{enabled:i??!0}),u=Z8(s.slice,{enabled:i??!0}),d=Z8(c.slice,{enabled:i??!0});if(o.cap===void 0||l.display===void 0)return null;let f=l.display.on===!0,p=!o.available,m=u.display?.level??0,h=!s.available,g=f?m/100:0,_=f?Fue:Iue,v=(r?.includes(Sc.LightColorMired)??!1)&&c.cap!==void 0,y=d.display?.colorTemperature,b=!c.available;return(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,K.jsxs)(J8,{fraction:g,color:_,children:[(0,K.jsxs)(`div`,{"data-testid":`brightness-readout`,className:`text-3xl font-bold tabular-nums text-foreground leading-none`,children:[m,(0,K.jsx)(`span`,{className:`text-base text-foreground-subtle font-normal ml-0.5`,children:`%`})]}),(0,K.jsx)(LV,{className:`h-5 w-5 text-foreground-subtle`,"aria-hidden":`true`})]}),s.cap!==void 0&&(0,K.jsxs)(`label`,{className:`flex w-full items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{className:`w-16`,children:a(`uiLibrary.lightHeroCard.brightness`,`Brightness`)}),(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.lightHeroCard.brightness`,`Brightness`),type:`range`,min:0,max:100,step:1,className:`flex-1`,value:m,disabled:h||!f,onChange:e=>{let t=Number(e.target.value);u.applyOptimistic({level:t}),h||s.cap?.setBrightness({level:t})}}),(0,K.jsxs)(`span`,{className:`tabular-nums w-9 text-right`,children:[m,`%`]})]})]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium text-foreground-muted`,children:f?a(`uiLibrary.lightHeroCard.on`,`On`):a(`uiLibrary.lightHeroCard.off`,`Off`)}),(0,K.jsx)(Y8,{on:f,busy:p,onToggle:()=>{if(p)return;let e=!f;l.applyOptimistic({on:e}),o.cap?.setState({on:e})}})]}),v&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,"data-testid":`color-temp-strip`,children:[(0,K.jsx)(FH,{className:`h-4 w-4 text-foreground-subtle`,"aria-hidden":`true`}),(0,K.jsxs)(`label`,{className:`flex-1`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:a(`uiLibrary.lightHeroCard.colourTemperature`,`Colour temperature`)}),(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.lightHeroCard.colourTemperature`,`Colour temperature`),type:`range`,min:L7,max:I7,step:1,className:`w-full`,value:y??I7,disabled:b||!f,onChange:e=>{let t=Number(e.target.value);d.applyOptimistic({mode:`mired`,colorTemperature:t}),b||c.cap?.setColor({color:{mode:`mired`,colorTemperature:t}})}}),(0,K.jsx)(`div`,{className:`pointer-events-none mt-1`,children:(0,K.jsx)(U8,{fraction:y===void 0?.5:Pue(y),color:Mue})})]})]})]})}var Rue=`#3aa6a0`,zue=`#d4d4d8`;function Bue({trpc:e,deviceId:n,features:r,optimistic:i}){let a=t(),o=z3({trpc:e,deviceId:n,cap:e=>e.switch,slice:e=>e.state.switch}),s=z3({trpc:e,deviceId:n,cap:e=>e.fanControl,slice:e=>e.state.fanControl}),c=Z8(o.slice,{enabled:i??!0}),l=Z8(s.slice,{enabled:i??!0});if(o.cap===void 0||c.display===void 0)return null;let u=c.display.on===!0,d=!o.available,f=l.display?.speed??0,p=!s.available,m=u?f/100:0,h=u?Rue:zue,g=r?.includes(Sc.FanSpeed)??!1,_=(r?.includes(Sc.FanOscillating)??!1)&&s.cap!==void 0,v=l.display?.availablePresets??[],y=(r?.includes(Sc.FanPreset)??!1)&&s.cap!==void 0&&v.length>0,b=l.display?.preset??``,ee=l.display?.oscillating===!0,te=()=>{if(d)return;let e=!u;c.applyOptimistic({on:e}),o.cap?.setState({on:e})},ne=()=>{if(p)return;let e=!ee;l.applyOptimistic({oscillating:e}),s.cap?.setOscillating({oscillating:e})},x=e=>{if(p)return;let t=l.display;if(t===void 0)return;let n=t.percentageStep!==void 0&&t.percentageStep>0?t.percentageStep:1,r=Math.min(100,Math.max(0,Math.round(e*100/n)*n));l.applyOptimistic({speed:r}),s.cap?.setPercentage({speed:r})},S=e=>{p||e===``||(l.applyOptimistic({preset:e}),s.cap?.setPreset({preset:e}))};return(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsx)(`div`,{className:`flex flex-col items-center gap-3`,children:g?(0,K.jsxs)(J8,{fraction:m,color:h,onDragFraction:x,children:[(0,K.jsxs)(`div`,{"data-testid":`speed-readout`,className:`text-3xl font-bold tabular-nums text-foreground leading-none`,children:[f,(0,K.jsx)(`span`,{className:`text-base text-foreground-subtle font-normal ml-0.5`,children:`%`})]}),(0,K.jsx)(wV,{className:`h-5 w-5 text-foreground-subtle`,"aria-hidden":`true`})]}):(0,K.jsx)(`div`,{"data-testid":`fan-onoff-icon`,className:`flex h-[150px] w-[150px] items-center justify-center`,children:(0,K.jsx)(wV,{className:`h-16 w-16`,style:{color:h},"aria-hidden":`true`})})}),y&&(0,K.jsx)(`div`,{className:`flex justify-center`,children:(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:a(`uiLibrary.fanHeroCard.preset`,`Preset`)}),(0,K.jsxs)(`select`,{"aria-label":a(`uiLibrary.fanHeroCard.fanPreset`,`Fan preset`),value:b,disabled:p,onChange:e=>{e.stopPropagation(),S(e.target.value)},className:Z(`bg-surface border border-border rounded px-1 py-0.5`,p&&`opacity-40 cursor-not-allowed`),children:[(0,K.jsx)(`option`,{value:``,disabled:!0,children:`—`}),v.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))]})]})}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[_?(0,K.jsxs)(`button`,{type:`button`,"aria-label":a(`uiLibrary.fanHeroCard.oscillate`,`Oscillate`),"aria-pressed":ee,disabled:p,onClick:e=>{e.stopPropagation(),ne()},className:Z(`inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs font-medium transition-colors`,ee?`border-success/50 bg-success/10 text-success`:`border-border text-foreground-muted hover:bg-surface-hover`,p&&`opacity-40 cursor-not-allowed`),children:[(0,K.jsx)(fH,{className:`h-3.5 w-3.5`,"aria-hidden":`true`}),a(`uiLibrary.fanHeroCard.oscillate`,`Oscillate`)]}):(0,K.jsx)(`span`,{className:`text-sm font-medium text-foreground-muted`,children:u?a(`uiLibrary.fanHeroCard.on`,`On`):a(`uiLibrary.fanHeroCard.off`,`Off`)}),(0,K.jsx)(Y8,{on:u,busy:d,onToggle:te})]})]})}function Vue({trpc:e,deviceId:n,optimistic:r}){let i=t(),{cap:a,slice:o,available:s}=z3({trpc:e,deviceId:n,cap:e=>e.switch,slice:e=>e.state.switch}),{display:c,applyOptimistic:l}=Z8(o,{enabled:r??!0});if(a===void 0||c===void 0)return null;let u=c.on===!0,d=!s;return(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-4 rounded-lg border border-border bg-surface p-6`,children:[(0,K.jsx)(`div`,{"data-testid":`switch-glyph`,"data-state":u?`on`:`off`,className:Z(`flex h-16 w-16 items-center justify-center rounded-full border-2 transition-colors`,u?`border-success/30 bg-success/10 text-success`:`border-border bg-surface-subtle text-foreground-subtle`),children:(0,K.jsx)(lH,{className:`h-8 w-8`,"aria-hidden":`true`})}),(0,K.jsx)(`span`,{className:`text-sm font-medium text-foreground-muted`,children:u?i(`uiLibrary.switchHeroCard.on`,`On`):i(`uiLibrary.switchHeroCard.off`,`Off`)}),(0,K.jsx)(Y8,{on:u,busy:d,onToggle:()=>{if(d)return;let e=!u;l({on:e}),a.setState({on:e})}})]})}function Hue(e){return e===`playing`||e===`buffering`?`pause`:`play`}function Uue(e,t){return e===null||t===null||t<=0?0:Math.min(1,Math.max(0,e/t))}function R7(e){if(e===null)return`--:--`;let t=Math.floor(e/1e3);return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,`0`)}`}function Wue({title:e,subtitle:n}){let r=t();return(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-1 text-center`,children:[(0,K.jsx)(eH,{className:`h-6 w-6 text-foreground-subtle`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{className:`text-base font-semibold text-foreground line-clamp-1`,children:e??r(`uiLibrary.mediaPlayerHero.nothing`,`Nothing playing`)}),n&&(0,K.jsx)(`span`,{className:`text-xs text-foreground-subtle line-clamp-1`,children:n})]})}function z7({label:e,busy:t,onPress:n,children:r,primary:i}){return(0,K.jsx)(`button`,{type:`button`,"aria-label":e,title:e,disabled:t,onClick:e=>{e.stopPropagation(),t||n()},className:Z(`inline-flex items-center justify-center rounded-full transition-colors`,i?`h-12 w-12 bg-primary text-primary-foreground hover:bg-primary/90 shadow-md`:`h-10 w-10 text-foreground-muted hover:bg-surface-hover`,t&&`opacity-40 cursor-not-allowed`),children:r})}function Gue({trpc:e,deviceId:n,features:r,optimistic:i}){let a=t(),{cap:o,slice:s,available:c}=z3({trpc:e,deviceId:n,cap:e=>e.mediaPlayer,slice:e=>e.state.mediaPlayer}),{display:l,applyOptimistic:u}=Z8(s,{enabled:i??!0});if(o===void 0||l===void 0)return null;let d=!c,f=Hue(l.state),p=(r?.includes(Sc.MediaPlayerSeek)??!1)&&l.duration!==null&&l.duration>0,m=r?.includes(Sc.MediaPlayerNext)??!1,h=r?.includes(Sc.MediaPlayerPrevious)??!1,g=(r?.includes(Sc.MediaPlayerVolume)??!1)&&l.volumeLevel!==null,_=()=>{d||(f===`play`?(u({state:`playing`}),o.play({})):(u({state:`paused`}),o.pause({})))},v=l.currentMedia?.artist??l.currentMedia?.album??null,y=Uue(l.position,l.duration),b=l.volumeLevel??0;return(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-6`,children:[(0,K.jsx)(Wue,{title:l.currentMedia?.title??null,subtitle:v}),p&&(0,K.jsxs)(`div`,{"data-testid":`media-seek`,className:`flex flex-col gap-1`,children:[(0,K.jsxs)(`label`,{className:`relative block`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:a(`uiLibrary.mediaPlayerHero.seek`,`Seek`)}),(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.mediaPlayerHero.seek`,`Seek`),type:`range`,min:0,max:l.duration??0,step:1e3,className:`absolute inset-0 h-4 w-full cursor-pointer opacity-0`,value:l.position??0,disabled:d,onChange:e=>{if(d)return;let t=Number(e.target.value);u({position:t}),o.seek({position:t})}}),(0,K.jsx)(`div`,{className:`pointer-events-none`,children:(0,K.jsx)(U8,{fraction:y})})]}),(0,K.jsxs)(`div`,{className:`flex justify-between text-[11px] tabular-nums text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:R7(l.position)}),(0,K.jsx)(`span`,{children:R7(l.duration)})]})]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-center gap-4`,children:[h&&(0,K.jsx)(z7,{label:a(`uiLibrary.mediaPlayerHero.previous`,`Previous`),busy:d,onPress:()=>void o.previous({}),children:(0,K.jsx)(wH,{className:`h-5 w-5`,"aria-hidden":`true`})}),(0,K.jsx)(z7,{label:f===`play`?a(`uiLibrary.mediaPlayerHero.play`,`Play`):a(`uiLibrary.mediaPlayerHero.pause`,`Pause`),busy:d,onPress:_,primary:!0,children:f===`play`?(0,K.jsx)(sH,{className:`h-6 w-6`,"aria-hidden":`true`}):(0,K.jsx)(iH,{className:`h-6 w-6`,"aria-hidden":`true`})}),m&&(0,K.jsx)(z7,{label:a(`uiLibrary.mediaPlayerHero.next`,`Next`),busy:d,onPress:()=>void o.next({}),children:(0,K.jsx)(TH,{className:`h-5 w-5`,"aria-hidden":`true`})})]}),g&&(0,K.jsxs)(`div`,{"data-testid":`media-volume`,className:`flex items-center gap-2`,children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":l.isMuted===!0?a(`uiLibrary.mediaPlayerHero.unmute`,`Unmute`):a(`uiLibrary.mediaPlayerHero.mute`,`Mute`),title:l.isMuted===!0?a(`uiLibrary.mediaPlayerHero.unmute`,`Unmute`):a(`uiLibrary.mediaPlayerHero.mute`,`Mute`),disabled:d,onClick:e=>{if(e.stopPropagation(),d||l.isMuted===null)return;let t=!l.isMuted;u({isMuted:t}),o.setMute({muted:t})},className:Z(`inline-flex h-7 w-7 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,d&&`opacity-40 cursor-not-allowed`),children:l.isMuted===!0?(0,K.jsx)(KH,{className:`h-4 w-4`,"aria-hidden":`true`}):(0,K.jsx)(GH,{className:`h-4 w-4`,"aria-hidden":`true`})}),(0,K.jsxs)(`label`,{className:`relative block flex-1`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:a(`uiLibrary.mediaPlayerHero.volume`,`Volume`)}),(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.mediaPlayerHero.volume`,`Volume`),type:`range`,min:0,max:100,step:1,className:`absolute inset-0 h-4 w-full cursor-pointer opacity-0`,value:b,disabled:d,onChange:e=>{if(d)return;let t=Number(e.target.value);u({volumeLevel:t}),o.setVolume({volumeLevel:t})}}),(0,K.jsx)(`div`,{className:`pointer-events-none`,children:(0,K.jsx)(U8,{fraction:b/100})})]}),(0,K.jsxs)(`span`,{className:`w-9 text-right text-[11px] tabular-nums text-foreground-subtle`,children:[b,`%`]})]})]})}var B7={disarmed:{colorClass:`border-border bg-surface-subtle text-foreground-subtle`,icon:`disarmed`},armed_home:{colorClass:`border-success/30 bg-success/10 text-success`,icon:`armed`},armed_away:{colorClass:`border-success/30 bg-success/10 text-success`,icon:`armed`},armed_night:{colorClass:`border-success/30 bg-success/10 text-success`,icon:`armed`},armed_vacation:{colorClass:`border-success/30 bg-success/10 text-success`,icon:`armed`},armed_custom_bypass:{colorClass:`border-success/30 bg-success/10 text-success`,icon:`armed`},arming:{colorClass:`border-warning/30 bg-warning/10 text-warning`,icon:`pending`},disarming:{colorClass:`border-warning/30 bg-warning/10 text-warning`,icon:`pending`},pending:{colorClass:`border-warning/30 bg-warning/10 text-warning`,icon:`pending`},triggered:{colorClass:`border-danger/30 bg-danger/10 text-danger`,icon:`triggered`}};function V7(e,t){switch(e){case`home`:return t(`uiLibrary.alarmHeroCard.modeHome`,`Home`);case`away`:return t(`uiLibrary.alarmHeroCard.modeAway`,`Away`);case`night`:return t(`uiLibrary.alarmHeroCard.modeNight`,`Night`);case`vacation`:return t(`uiLibrary.alarmHeroCard.modeVacation`,`Vacation`);case`custom_bypass`:return t(`uiLibrary.alarmHeroCard.modeBypass`,`Bypass`)}}function H7(e,t){switch(e){case`disarmed`:return t(`uiLibrary.alarmHeroCard.stateDisarmed`,`Disarmed`);case`armed_home`:return t(`uiLibrary.alarmHeroCard.stateArmedHome`,`Armed Home`);case`armed_away`:return t(`uiLibrary.alarmHeroCard.stateArmedAway`,`Armed Away`);case`armed_night`:return t(`uiLibrary.alarmHeroCard.stateArmedNight`,`Armed Night`);case`armed_vacation`:return t(`uiLibrary.alarmHeroCard.stateArmedVacation`,`Armed Vacation`);case`armed_custom_bypass`:return t(`uiLibrary.alarmHeroCard.stateArmedBypass`,`Armed (Bypass)`);case`arming`:return t(`uiLibrary.alarmHeroCard.stateArming`,`Arming…`);case`disarming`:return t(`uiLibrary.alarmHeroCard.stateDisarming`,`Disarming…`);case`pending`:return t(`uiLibrary.alarmHeroCard.statePending`,`Pending`);case`triggered`:return t(`uiLibrary.alarmHeroCard.stateTriggered`,`Triggered`)}}function U7(e){return e.startsWith(`armed_`)}function W7(e){return e===`arming`||e===`disarming`}function G7({icon:e,sizeClass:t=`h-8 w-8`}){return e===`disarmed`?(0,K.jsx)(bH,{className:t,"aria-hidden":`true`}):e===`triggered`?(0,K.jsx)(vH,{className:t,"aria-hidden":`true`}):e===`pending`?(0,K.jsx)(SH,{className:t,"aria-hidden":`true`}):(0,K.jsx)(yH,{className:t,"aria-hidden":`true`})}function K7({label:e,active:t,busy:n,onSelect:r}){return(0,K.jsx)(`button`,{type:`button`,"aria-label":e,"aria-pressed":t,disabled:n,onClick:e=>{e.stopPropagation(),n||r()},className:Z(`flex-1 rounded-md px-3 py-2 text-sm font-medium transition-colors`,t?`bg-primary text-primary-foreground shadow-sm`:`text-foreground-muted hover:bg-surface-hover`,n&&`opacity-40 cursor-not-allowed`),children:e})}function Kue({state:e,availableModes:n,busy:r,onDisarm:i,onArm:a}){let o=t(),s=U7(e),c=W7(e);return(0,K.jsxs)(`div`,{className:Z(`flex min-w-0 items-stretch gap-1 rounded-lg border border-border bg-surface-subtle p-1`),children:[(0,K.jsx)(K7,{label:o(`uiLibrary.alarmHeroCard.disarm`,`Disarm`),active:!s&&!c,busy:r,onSelect:i}),n.map(t=>(0,K.jsx)(K7,{label:V7(t,o),active:!c&&e===`armed_${t}`,busy:r,onSelect:()=>a(t)},t))]})}function q7(e){return e instanceof Error?e.message:String(e)}function J7(e,t,n){let{cap:r,slice:i,available:a}=z3({trpc:e,deviceId:t,cap:e=>e.alarmPanel,slice:e=>e.state.alarmPanel}),{display:o,applyOptimistic:c,rollback:l}=Z8(i,{enabled:n??!0}),[u,d]=(0,s.useState)(null),f=()=>d(null),p=(0,s.useRef)(0);(0,s.useEffect)(()=>{d(null)},[i]);let m=!a;return{display:o,capPresent:r!==void 0,busy:m,handleDisarm:()=>{if(r===void 0||m)return;let e=++p.current;c({state:`disarming`}),r.disarm({}).catch(t=>{p.current===e&&(l(),d(q7(t)))})},handleArm:e=>{if(r===void 0||m)return;let t=++p.current;c({state:`arming`}),r.arm({mode:e}).catch(e=>{p.current===t&&(l(),d(q7(e)))})},error:u,clearError:f}}function que({trpc:e,deviceId:n,optimistic:r}){let i=t(),{display:a,capPresent:o,busy:s,handleDisarm:c,handleArm:l,error:u}=J7(e,n,r);if(!o||a===void 0)return null;let d=B7[a.state],f=U7(a.state)?a.state.replace(`armed_`,``):``;return(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,K.jsxs)(`span`,{className:Z(`inline-flex shrink-0 items-center gap-1 rounded-md border px-1.5 py-0.5 text-[11px] font-medium whitespace-nowrap`,d.colorClass,W7(a.state)&&`animate-pulse`),children:[(0,K.jsx)(G7,{icon:d.icon,sizeClass:`h-3 w-3`}),H7(a.state,i)]}),(0,K.jsxs)(`select`,{"aria-label":i(`uiLibrary.alarmHeroCard.alarmMode`,`Alarm mode`),disabled:s,value:f,onClick:e=>e.stopPropagation(),onChange:e=>{e.stopPropagation();let t=e.target.value;t===``?c():l(t)},className:Z(`min-w-0 shrink rounded-md border border-border bg-surface-subtle px-1.5 py-0.5 text-xs text-foreground-muted`,s&&`cursor-not-allowed opacity-40`),children:[(0,K.jsx)(`option`,{value:``,children:i(`uiLibrary.alarmHeroCard.disarm`,`Disarm`)}),a.availableModes.map(e=>(0,K.jsx)(`option`,{value:e,children:V7(e,i)},e))]}),u!==null&&(0,K.jsx)(`span`,{"data-testid":`alarm-inline-error`,role:`alert`,title:u,className:`inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-danger/10 text-danger`,children:(0,K.jsx)(vH,{className:`h-3 w-3`,"aria-hidden":`true`})})]})}function Jue({trpc:e,deviceId:n,optimistic:r}){let i=t(),{display:a,capPresent:o,busy:s,handleDisarm:c,handleArm:l,error:u,clearError:d}=J7(e,n,r);if(!o||a===void 0)return null;let f=B7[a.state];return(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-6`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,K.jsx)(`div`,{"data-testid":`alarm-state`,"data-state":a.state,className:Z(`flex h-16 w-16 items-center justify-center rounded-full border-2`,f.colorClass,W7(a.state)&&`animate-pulse`),children:(0,K.jsx)(G7,{icon:f.icon})}),(0,K.jsx)(`span`,{className:Z(`text-sm font-medium`,f.colorClass,`border-0 bg-transparent`),children:H7(a.state,i)})]}),(0,K.jsx)(Kue,{state:a.state,availableModes:a.availableModes,busy:s,onDisarm:c,onArm:l}),u!==null&&(0,K.jsxs)(`div`,{"data-testid":`alarm-error`,role:`alert`,className:`flex items-start justify-between gap-2 rounded-md border border-danger/30 bg-danger/10 px-3 py-2 text-sm text-danger`,children:[(0,K.jsx)(`span`,{children:u}),(0,K.jsx)(`button`,{type:`button`,"aria-label":i(`uiLibrary.alarmHeroCard.dismiss`,`Dismiss`),onClick:e=>{e.stopPropagation(),d()},className:`shrink-0 font-medium text-danger/80 hover:text-danger`,children:`×`})]})]})}function Yue(e,t,n=i){if(e<=0)return null;let r=Math.max(0,Math.round((t-e)/1e3));return r<60?n(`uiLibrary.scriptAutomationControls.justNow`,`just now`):r<3600?n(`uiLibrary.scriptAutomationControls.minAgo`,`{{count}} min ago`,{count:Math.floor(r/60)}):r<86400?n(`uiLibrary.scriptAutomationControls.hAgo`,`{{count}} h ago`,{count:Math.floor(r/3600)}):new Date(e).toLocaleDateString()}function Y7({atMs:e,neverLabel:n}){let r=t(),i=Yue(e,Date.now(),r);return(0,K.jsx)(`span`,{className:`text-xs text-foreground-subtle`,"data-testid":`last-run`,children:i===null?n:i})}function X7({error:e}){return e===null||e===``?null:(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-xs text-danger`,title:e,"data-testid":`last-error`,children:[(0,K.jsx)(BH,{className:`h-3 w-3 shrink-0`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{className:`truncate`,children:e})]})}function Z7(e,t,n){let{cap:r,slice:i,available:a}=z3({trpc:e,deviceId:t,cap:e=>e.scriptRunner,slice:e=>e.state.scriptRunner}),{display:o,applyOptimistic:s}=Z8(i,{enabled:n??!0}),c=!a,l=o?.isRunning===!0;return{display:o,capPresent:r!==void 0,busy:c,running:l,run:()=>{r===void 0||c||l||(s({isRunning:!0}),r.run({}))},stop:()=>{r===void 0||c||!l||(s({isRunning:!1}),r.stop({}))}}}function Q7({running:e,busy:n,large:r,onRun:i,onStop:a}){let o=t(),s=e?o(`uiLibrary.scriptAutomationControls.stop`,`Stop`):o(`uiLibrary.scriptAutomationControls.run`,`Run`);return(0,K.jsxs)(`button`,{type:`button`,"aria-label":s,title:s,disabled:n,"data-testid":`script-run`,"data-running":e?`true`:`false`,onClick:t=>{t.stopPropagation(),e?a():i()},className:Z(`inline-flex items-center gap-1 rounded transition-colors`,r?`h-10 px-4 text-sm`:`h-5 px-1.5 text-xs`,e?`bg-danger text-danger-foreground hover:bg-danger/90`:`bg-primary text-primary-foreground hover:bg-primary/90`,n&&`cursor-not-allowed opacity-40`),children:[e?(0,K.jsx)(oV,{className:r?`h-4 w-4`:`h-3 w-3`,"aria-hidden":`true`}):(0,K.jsx)(sH,{className:r?`h-4 w-4`:`h-3 w-3`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{children:s})]})}function Xue({trpc:e,deviceId:n,optimistic:r}){let i=t(),{display:a,capPresent:o,busy:s,running:c,run:l,stop:u}=Z7(e,n,r);return!o||a===void 0?null:(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,K.jsx)(Q7,{running:c,busy:s,large:!1,onRun:l,onStop:u}),(0,K.jsx)(Y7,{atMs:a.lastRunAt,neverLabel:i(`uiLibrary.scriptAutomationControls.neverRun`,`never run`)})]})}function Zue({trpc:e,deviceId:n,optimistic:r}){let i=t(),{display:a,capPresent:o,busy:s,running:c,run:l,stop:u}=Z7(e,n,r);return!o||a===void 0?null:(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-6`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,K.jsx)(`div`,{"data-testid":`script-state`,"data-running":c?`true`:`false`,className:Z(`flex h-16 w-16 items-center justify-center rounded-full border-2`,c?`border-primary text-primary animate-pulse`:`border-border text-foreground-subtle`),children:(0,K.jsx)(sH,{className:`h-8 w-8`,"aria-hidden":`true`})}),(0,K.jsx)(`span`,{className:`text-sm font-medium`,children:c?i(`uiLibrary.scriptAutomationControls.running`,`Running`):i(`uiLibrary.scriptAutomationControls.idle`,`Idle`)}),(0,K.jsx)(Y7,{atMs:a.lastRunAt,neverLabel:i(`uiLibrary.scriptAutomationControls.neverRun`,`never run`)}),(0,K.jsx)(X7,{error:a.lastError})]}),(0,K.jsx)(`div`,{className:`flex justify-center`,children:(0,K.jsx)(Q7,{running:c,busy:s,large:!0,onRun:l,onStop:u})})]})}function $7(e,t,n){let{cap:r,slice:i,available:a}=z3({trpc:e,deviceId:t,cap:e=>e.automationControl,slice:e=>e.state.automationControl}),{display:o,applyOptimistic:s}=Z8(i,{enabled:n??!0}),c=!a;return{display:o,capPresent:r!==void 0,busy:c,setEnabled:e=>{r===void 0||c||(s({enabled:e}),e?r.enable({}):r.disable({}))},trigger:()=>{r===void 0||c||r.trigger({})}}}function e9({enabled:e,busy:n,onToggle:r}){let i=t();return(0,K.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,"aria-label":i(`uiLibrary.scriptAutomationControls.automationEnabled`,`Automation enabled`),disabled:n,"data-testid":`automation-enabled`,onClick:t=>{t.stopPropagation(),r(!e)},className:Z(`inline-flex shrink-0 items-center gap-1 rounded-md border px-1.5 py-0.5`,`text-[11px] font-medium whitespace-nowrap transition-colors`,e?`border-success/40 bg-success/10 text-success`:`border-border bg-surface-subtle text-foreground-subtle`,n&&`cursor-not-allowed opacity-40`),children:e?i(`uiLibrary.scriptAutomationControls.enabled`,`Enabled`):i(`uiLibrary.scriptAutomationControls.disabled`,`Disabled`)})}function t9({busy:e,large:n,onTrigger:r}){let i=t();return(0,K.jsxs)(`button`,{type:`button`,"aria-label":i(`uiLibrary.scriptAutomationControls.trigger`,`Trigger`),title:i(`uiLibrary.scriptAutomationControls.runNow`,`Run this automation now`),disabled:e,"data-testid":`automation-trigger`,onClick:e=>{e.stopPropagation(),r()},className:Z(`inline-flex items-center gap-1 rounded transition-colors`,n?`h-10 px-4 text-sm`:`h-5 px-1.5 text-xs`,`bg-primary text-primary-foreground hover:bg-primary/90`,e&&`cursor-not-allowed opacity-40`),children:[(0,K.jsx)(eU,{className:n?`h-4 w-4`:`h-3 w-3`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{children:i(`uiLibrary.scriptAutomationControls.trigger`,`Trigger`)})]})}function Que({trpc:e,deviceId:t,optimistic:n}){let{display:r,capPresent:i,busy:a,setEnabled:o,trigger:s}=$7(e,t,n);return!i||r===void 0?null:(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,K.jsx)(e9,{enabled:r.enabled,busy:a,onToggle:o}),(0,K.jsx)(t9,{busy:a,large:!1,onTrigger:s})]})}function $ue({trpc:e,deviceId:n,optimistic:r}){let i=t(),{display:a,capPresent:o,busy:s,setEnabled:c,trigger:l}=$7(e,n,r);return!o||a===void 0?null:(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-6`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,K.jsx)(`div`,{"data-testid":`automation-state`,"data-enabled":a.enabled?`true`:`false`,className:Z(`flex h-16 w-16 items-center justify-center rounded-full border-2`,a.enabled?`border-success text-success`:`border-border text-foreground-subtle`),children:(0,K.jsx)(eU,{className:`h-8 w-8`,"aria-hidden":`true`})}),(0,K.jsx)(`span`,{className:`text-sm font-medium`,children:a.enabled?i(`uiLibrary.scriptAutomationControls.enabled`,`Enabled`):i(`uiLibrary.scriptAutomationControls.disabled`,`Disabled`)}),(0,K.jsx)(Y7,{atMs:a.lastTriggeredAt,neverLabel:i(`uiLibrary.scriptAutomationControls.neverTriggered`,`never triggered`)}),(0,K.jsx)(X7,{error:a.lastError})]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-center gap-3`,children:[(0,K.jsx)(e9,{enabled:a.enabled,busy:s,onToggle:c}),(0,K.jsx)(t9,{busy:s,large:!0,onTrigger:l})]})]})}function ede({children:e}){return(0,K.jsx)(`div`,{className:`flex flex-col items-stretch gap-3 rounded-lg border border-border bg-surface p-4`,children:e})}function n9(e,t){let{cap:n}=z3({trpc:e,deviceId:t,cap:e=>e.switch,slice:e=>e.state.switch});return n!==void 0}function tde({trpc:e,deviceId:t,features:n,optimistic:r}){return n9(e,t)?(0,K.jsx)(Q8,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}):null}function nde(e,t){let{cap:n}=z3({trpc:e,deviceId:t,cap:e=>e.lockControl,slice:e=>e.state.lockControl});return n!==void 0}function rde({trpc:e,deviceId:t,features:n,optimistic:r}){return nde(e,t)?(0,K.jsx)(pce,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}):null}function ide({trpc:e,deviceId:t,features:n,optimistic:r}){return n9(e,t)?(0,K.jsxs)(`div`,{className:`inline-flex items-center gap-2`,children:[(0,K.jsx)(Q8,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}),(0,K.jsx)(mce,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r})]}):null}function ade(e,t){let{cap:n}=z3({trpc:e,deviceId:t,cap:e=>e.fanControl,slice:e=>e.state.fanControl});return n!==void 0}function ode({trpc:e,deviceId:t,features:n,optimistic:r}){return ade(e,t)?(0,K.jsxs)(`div`,{className:`inline-flex items-center gap-2`,children:[(0,K.jsx)(Q8,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}),(0,K.jsx)(hce,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r})]}):null}function r9(e,t){let{cap:n}=z3({trpc:e,deviceId:t,cap:e=>e.climateControl,slice:e=>e.state.climateControl});return n!==void 0}function sde(e,t){let{cap:n}=z3({trpc:e,deviceId:t,cap:e=>e.heatingValve,slice:e=>e.state.heatingValve});return n!==void 0}function cde({trpc:e,deviceId:t,features:n,optimistic:r}){let i=r9(e,t),a=sde(e,t);return!i&&!a?null:(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[i?(0,K.jsx)(bce,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}):null,a?(0,K.jsx)(v7,{trpc:e,deviceId:t,layout:`compact`}):null]})}function lde({trpc:e,deviceId:t,features:n,optimistic:r}){return r9(e,t)?(0,K.jsx)(x7,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}):null}function ude({trpc:e,deviceId:t,features:n,optimistic:r}){return r9(e,t)?(0,K.jsx)(x7,{trpc:e,deviceId:t,features:n,layout:`full`,optimistic:r}):null}function dde(e,t){let{cap:n}=z3({trpc:e,deviceId:t,cap:e=>e.mediaPlayer,slice:e=>e.state.mediaPlayer});return n!==void 0}function fde({trpc:e,deviceId:t,features:n,optimistic:r}){return dde(e,t)?(0,K.jsx)(Ece,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}):null}function i9(e,t){let{cap:n}=z3({trpc:e,deviceId:t,cap:e=>e.control,slice:e=>e.state.control});return n!==void 0}function pde({trpc:e,deviceId:t,features:n,optimistic:r}){return i9(e,t)?(0,K.jsx)(u5,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}):null}function mde({trpc:e,deviceId:t,features:n,optimistic:r}){return i9(e,t)?(0,K.jsx)(ede,{children:(0,K.jsx)(u5,{trpc:e,deviceId:t,features:n,layout:`full`,optimistic:r})}):null}var hde={cover:{InlineControl:Kce,HeroCard:Yce},valve:{InlineControl:kle,HeroCard:Nle},humidifier:{InlineControl:Fle,HeroCard:Lle},"water-heater":{InlineControl:Ble,HeroCard:Hle},switch:{InlineControl:tde,HeroCard:Vue},light:{InlineControl:ide,HeroCard:Lue},fan:{InlineControl:ode,HeroCard:Bue},sensor:{InlineControl:$ce,HeroCard:ule},thermostat:{InlineControl:cde,HeroCard:Eue},climate:{InlineControl:lde,HeroCard:ude},button:{InlineControl:lce,HeroCard:uce},update:{InlineControl:dle,HeroCard:fle},lock:{InlineControl:rde,HeroCard:jue},"media-player":{InlineControl:fde,HeroCard:Gue},alarm:{InlineControl:que,HeroCard:Jue},control:{InlineControl:pde,HeroCard:mde},weather:{InlineControl:Wle,HeroCard:qle},vacuum:{InlineControl:_le,HeroCard:vle},"lawn-mower":{InlineControl:Ele,HeroCard:Dle},image:{InlineControl:Jle,HeroCard:Yle},"pet-feeder":{InlineControl:Qle,HeroCard:$le},dishwasher:{InlineControl:oue,HeroCard:sue},script:{InlineControl:Xue,HeroCard:Zue},automation:{InlineControl:Que,HeroCard:$ue},dummy:{InlineControl:Xce,HeroCard:Zce}};Object.fromEntries(Object.values(B).map(e=>[e,hde[az[e]]])),B.Cover,B.Valve,B.Thermostat,B.Climate,B.Control,B.Button,B.MediaPlayer,B.AlarmPanel,B.Lock,B.Vacuum,B.LawnMower,B.Humidifier,B.Switch,B.Siren,B.Light,B.Fan,B.WaterHeater,B.Sensor,B.Presence,B.EventEmitter,B.Notifier,B.Script,B.Automation,B.Camera,B.Hub,B.Update,B.Generic,B.Weather,B.Container,B.Image,B.PetFeeder,B.Dishwasher,B.Washer,B.Dryer,new Set(Object.values(B));var a9=1e3;24*(60*a9*60),30*a9,(0,s.createContext)(null),new Set([B.Sensor,B.Presence]),(0,s.createContext)({}),Object.freeze([]),EK(`camstack:device-quick-detail`,null),j({id:E(),stableId:T(),addonId:T(),type:T(),name:T(),online:D(),disabled:D(),parentDeviceId:E().nullable(),role:T().nullable().optional(),features:A(T()).optional(),isCamera:D().optional()});function o9(e){return e.deviceKey===void 0?e.agentNodeId:`${e.agentNodeId}::${e.deviceKey}`}function s9(e){let t=[];for(let n of e){let e=t[t.length-1];if(e&&e.agentNodeId===n.agentNodeId){let r=[...e.columns,n];t[t.length-1]={...e,columns:r,grouped:r.length>1}}else t.push({agentNodeId:n.agentNodeId,engineLabel:n.engineLabel,columns:[n],grouped:!1})}return t}function gde(e){let t=[],n=(e,r)=>{for(let i of e)t.push({node:i,depth:r}),n(i.children,r+1)};return n(e,0),t}function _de(e,t,n,r=208,i=t){return e<=0?!1:t<=1?e<n+r*i:e<n+r*2}var c9={detector:{labelKey:`uiLibrary.pipelineMatrix.slotDetector`,labelFallback:`detector`,className:`text-emerald-500`},cropper:{labelKey:`uiLibrary.pipelineMatrix.slotCropper`,labelFallback:`cropper`,className:`text-blue-500`},classifier:{labelKey:`uiLibrary.pipelineMatrix.slotClassifier`,labelFallback:`classifier`,className:`text-violet-500`},refiner:{labelKey:`uiLibrary.pipelineMatrix.slotRefiner`,labelFallback:`refiner`,className:`text-amber-500`},"audio-classifier":{labelKey:`uiLibrary.pipelineMatrix.slotAudioClassifier`,labelFallback:`audio classifier`,className:`text-pink-500`}};function vde({slot:e}){let n=t(),r=c9[e]??c9.classifier;return(0,K.jsx)(`span`,{className:Z(`text-[9px] font-semibold uppercase tracking-widest leading-none`,r.className),children:n(r.labelKey,r.labelFallback)})}var l9=`inline-flex items-center rounded bg-muted px-1.5 py-px text-[9px] font-medium text-foreground-subtle`;function yde({inputs:e,outputs:t}){return e.length===0&&t.length===0?null:(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 flex-wrap`,children:[e.map(e=>(0,K.jsx)(`span`,{className:Z(l9,`bg-blue-500/10 text-blue-500`),children:e},`in-${e}`)),e.length>0&&t.length>0&&(0,K.jsx)(`span`,{className:`text-foreground-subtle/60 text-[9px]`,children:`→`}),t.map(e=>(0,K.jsx)(`span`,{className:Z(l9,`bg-emerald-500/10 text-emerald-500`),children:e},`out-${e}`))]})}function u9({column:e}){let n=t(),r=e.deviceLabel??e.deviceKey;return(0,K.jsxs)(K.Fragment,{children:[(r!==void 0||e.disabled===!0)&&(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[r!==void 0&&(0,K.jsx)(`span`,{className:`truncate text-[10px] font-medium text-foreground/90`,children:r}),e.disabled===!0&&(0,K.jsx)(`span`,{className:`shrink-0 rounded bg-muted px-1 text-[8px] font-semibold uppercase text-foreground-subtle`,children:n(`uiLibrary.pipelineMatrixShared.offWord`,`off`)})]}),(0,K.jsx)(`div`,{className:`truncate text-[9px] text-foreground-subtle`,children:e.engineLabel}),e.detail!==void 0&&(0,K.jsx)(`div`,{className:`truncate font-mono text-[9px] text-foreground-subtle`,title:e.detail,children:e.detail})]})}function bde({group:e}){let t=e.columns[0]?.nodeLabel??e.agentNodeId;return(0,K.jsxs)(`div`,{role:`columnheader`,className:`sticky top-0 z-10 min-w-0 border-b border-l border-border bg-muted/60`,style:{gridColumn:`span ${e.columns.length}`},children:[(0,K.jsx)(`div`,{className:`truncate px-3 pt-2 pb-1 text-xs font-semibold text-foreground`,children:t}),(0,K.jsx)(`div`,{className:`mt-1 flex border-t border-border/50`,children:e.columns.map((e,t)=>(0,K.jsx)(`div`,{className:Z(`min-w-0 flex-1 px-3 py-1`,t>0&&`border-l border-border/50`,e.disabled===!0&&`opacity-70`),title:`${e.deviceLabel??e.deviceKey} · ${e.engineLabel}${e.detail?` · ${e.detail}`:``}`,children:(0,K.jsx)(u9,{column:e})},o9(e)))})]})}function xde({node:e}){return(0,K.jsxs)(`div`,{className:`flex flex-col gap-1 min-w-0 flex-1`,children:[(0,K.jsx)(vde,{slot:e.slot}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,K.jsx)(`span`,{className:`font-semibold truncate`,children:e.addonName}),(0,K.jsx)(yde,{inputs:e.inputClasses,outputs:e.outputClasses})]})]})}function Sde(e,t){return t.kind===`enabled`?(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1`,title:t.overridden?e(`uiLibrary.pipelineMatrix.override`,`override`):void 0,children:[(0,K.jsx)(`span`,{className:Z(`h-1.5 w-1.5 rounded-full shrink-0`,t.overridden?`bg-amber-500`:`bg-emerald-500`)}),(0,K.jsx)(`span`,{className:`font-mono text-foreground truncate`,children:t.modelId}),t.suppliedByRoot!==void 0&&(0,K.jsx)(`span`,{className:`ml-auto shrink-0 truncate rounded bg-primary/10 px-1 text-[8px] font-semibold uppercase text-primary`,title:e(`uiLibrary.pipelineMatrix.rootModelTitle`,`Uses the root model {{model}} — this step's own model does not run here`,{model:t.suppliedByRoot}),children:e(`uiLibrary.pipelineMatrix.root`,`root`)}),t.clusterWide===!0&&(0,K.jsx)(`span`,{className:`ml-auto shrink-0 text-[8px] font-semibold uppercase text-primary`,title:e(`uiLibrary.pipelineMatrix.clusterTitle`,`One value for the whole cluster — this step writes into a shared vector index`),children:e(`uiLibrary.pipelineMatrix.cluster`,`cluster`)}),t.jumpTo!==void 0&&(0,K.jsxs)(`span`,{className:`ml-auto shrink-0 text-[8px] font-semibold text-sky-500`,title:e(`uiLibrary.pipelineMatrix.runsOn`,`runs on {{target}}`,{target:t.jumpTo}),children:[`→ `,t.jumpTo]}),t.overridden&&t.jumpTo===void 0&&(0,K.jsx)(`span`,{className:`ml-auto shrink-0 text-[8px] font-semibold uppercase text-amber-500`,children:e(`uiLibrary.pipelineMatrix.ovr`,`ovr`)})]}):t.kind===`disabled`?(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 text-foreground-subtle`,title:t.overridden?e(`uiLibrary.pipelineMatrix.override`,`override`):void 0,children:[(0,K.jsx)(`span`,{className:Z(`h-1.5 w-1.5 rounded-full shrink-0`,t.overridden?`bg-amber-500`:`border border-foreground-subtle/60`)}),(0,K.jsx)(`span`,{className:`truncate`,children:e(`uiLibrary.pipelineMatrix.off`,`off`)}),t.overridden&&(0,K.jsx)(`span`,{className:`ml-auto shrink-0 text-[8px] font-semibold uppercase text-amber-500`,children:e(`uiLibrary.pipelineMatrix.ovr`,`ovr`)})]}):t.kind===`skip`?t.jumpTo===void 0?(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 text-amber-500`,title:e(`uiLibrary.pipelineMatrix.skipTitle`,`Gated on for this camera, but no compatible model on this node — click to provision`),children:[(0,K.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-amber-500 shrink-0`}),(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e(`uiLibrary.pipelineMatrix.skip`,`⚠ skip`)})]}):(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 text-sky-500`,title:e(`uiLibrary.pipelineMatrix.autoJump`,`no build for this device — auto-jumps to {{target}}`,{target:t.jumpTo}),children:[(0,K.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-sky-500 shrink-0`}),(0,K.jsxs)(`span`,{className:`truncate font-medium`,children:[`→ `,t.jumpTo]})]}):(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 text-foreground-subtle/70`,children:[(0,K.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-muted shrink-0`}),(0,K.jsx)(`span`,{className:`truncate`,children:`—`})]})}function Cde(e,t,n){return Z(`text-left text-xs hover:bg-muted/40`,e.kind===`enabled`&&`bg-emerald-500/5`,e.kind===`skip`&&`bg-amber-500/5`,e.kind===`na`&&`bg-muted/30`,t&&`ring-2 ring-primary ring-inset`,n)}var d9=18,wde=d9*16,Tde=11;function Ede(e,t,n,r){let i=(e,t)=>({r:Math.max(0,Math.min(n-1,e)),c:Math.max(0,Math.min(r-1,t))});switch(e){case`ArrowRight`:return i(t.r,t.c+1);case`ArrowLeft`:return i(t.r,t.c-1);case`ArrowDown`:return i(t.r+1,t.c);case`ArrowUp`:return i(t.r-1,t.c);case`Home`:return i(t.r,0);case`End`:return i(t.r,r-1);case`PageDown`:return i(n-1,t.c);case`PageUp`:return i(0,t.c);default:return null}}function Dde({node:e,depth:t,r:n,tabbable:r,selected:i,badge:a,onClick:o,sticky:s}){return(0,K.jsx)(`div`,{role:`rowheader`,className:Z(`min-w-0 border-b border-border bg-surface`,s&&`sticky left-0 z-10`),children:(0,K.jsxs)(`button`,{type:`button`,"data-r":n,"data-c":0,"data-step":e.addonId,"data-col":``,tabIndex:r?0:-1,"aria-current":i?`true`:void 0,onClick:o?e=>o(e.detail===0):void 0,className:Z(`flex h-full w-full min-w-0 items-start gap-2 px-3 py-2 text-left text-xs outline-none`,`hover:bg-muted/40 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary`,i&&`bg-primary/10 shadow-[inset_3px_0_0_var(--color-primary)]`),style:{paddingLeft:`${12+t*14}px`},children:[(0,K.jsx)(xde,{node:e}),a]})})}function Ode({nodes:e,selected:n,onSelect:r}){let i=t();return(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,role:`tablist`,"aria-label":i(`uiLibrary.deviceStepMatrix.node`,`Node`),children:[(0,K.jsx)(gH,{className:`h-3.5 w-3.5 text-foreground-subtle`}),(0,K.jsx)(`span`,{className:`text-[10px] uppercase tracking-wider text-foreground-subtle`,children:i(`uiLibrary.deviceStepMatrix.node`,`Node`)}),(0,K.jsx)(`div`,{className:`flex overflow-hidden rounded-md border border-border text-[11px] font-medium`,children:e.map((e,t)=>{let i=e.agentNodeId===n;return(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":i,onClick:()=>r(e.agentNodeId),title:`${e.columns[0]?.nodeLabel??e.agentNodeId} · ${e.engineLabel}`,className:Z(`px-2.5 py-1 transition-colors`,i?`bg-primary/15 text-primary`:`bg-transparent text-foreground-subtle hover:bg-surface-hover hover:text-foreground`,t>0&&`border-l border-border`),children:e.columns[0]?.nodeLabel??e.agentNodeId},e.agentNodeId)})})]})}var kde=(0,s.forwardRef)(function({tree:e,agents:n,getCellState:r,onCellClick:i,onStepClick:a,stepBadge:o,selectedCell:c,single:l,reserveRightPx:u,label:d},f){let p=t(),m=(0,s.useMemo)(()=>gde(e),[e]),h=(0,s.useMemo)(()=>s9(n),[n]),g=(0,s.useRef)(null),_=l?Tde:d9,v=`${_}rem repeat(${n.length}, 13rem)`,y=n.length+1,[b,ee]=(0,s.useState)(!0);(0,s.useLayoutEffect)(()=>{let e=g.current;if(!e||u<=0){ee(!0);return}let t=()=>{let t=e.getBoundingClientRect().left;ee(window.innerWidth-u-t>=_*16+208+24)};return t(),window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[u,_]);let te=(0,s.useMemo)(()=>{if(c===null)return null;let e=m.findIndex(e=>e.node.addonId===c.addonId);if(e<0)return null;let t=n.findIndex(e=>o9(e)===o9(c));return{r:e,c:t<0?0:t+1}},[c,m,n]),[ne,x]=(0,s.useState)({r:0,c:0});(0,s.useEffect)(()=>{te!==null&&x(te)},[te]);let S=ne.r<m.length&&ne.c<y?ne:{r:0,c:0},re=(e,t)=>{g.current?.querySelector(`[data-r="${e}"][data-c="${t}"]`)?.focus()};return(0,s.useImperativeHandle)(f,()=>({focusCell:(e,t)=>{let r=m.findIndex(t=>t.node.addonId===e);if(r<0)return;let i=t===null?-1:n.findIndex(e=>o9(e)===t),a=i<0?0:i+1;x({r,c:a}),re(r,a)}}),[m,n]),(0,s.useLayoutEffect)(()=>{if(te===null)return;let e=g.current,t=e?.querySelector(`[data-r="${te.r}"][data-c="${te.c}"]`);if(!e||!t||(typeof t.scrollIntoView==`function`&&t.scrollIntoView({block:`nearest`,inline:`nearest`}),u<=0))return;let n=window.innerWidth-u-12,r=t.getBoundingClientRect().right;r>n&&(e.scrollLeft+=r-n)},[te,u,b]),(0,K.jsx)(`div`,{ref:g,className:`overflow-auto rounded border border-border`,children:(0,K.jsxs)(`div`,{className:`flex w-max`,children:[(0,K.jsxs)(`div`,{role:`grid`,"aria-label":d,"aria-rowcount":m.length+1,className:`grid w-max`,style:{gridTemplateColumns:v},onKeyDown:e=>{if(!(e.target instanceof HTMLElement)||e.target.dataset.r===void 0)return;let t={r:Number(e.target.dataset.r),c:Number(e.target.dataset.c)},n=Ede(e.key,t,m.length,y);n!==null&&(e.preventDefault(),x(n),re(n.r,n.c))},children:[(0,K.jsxs)(`div`,{role:`row`,className:`contents`,children:[(0,K.jsx)(`div`,{role:`columnheader`,className:Z(`top-0 z-20 border-b border-border bg-muted/60 px-3 py-2 text-[10px] uppercase tracking-widest text-foreground-subtle`,b?`sticky left-0`:`sticky`),children:p(`uiLibrary.deviceStepMatrix.step`,`Step`)}),h.map(e=>e.grouped?(0,K.jsx)(bde,{group:e},e.agentNodeId):e.columns.map(e=>(0,K.jsxs)(`div`,{role:`columnheader`,className:Z(`sticky top-0 z-10 min-w-0 border-b border-l border-border bg-muted/60 px-3 py-2`,e.disabled===!0&&`opacity-70`),children:[(0,K.jsx)(`div`,{className:`truncate text-xs font-semibold text-foreground`,children:e.nodeLabel??e.agentNodeId}),(0,K.jsx)(u9,{column:e})]},o9(e))))]}),m.map(({node:e,depth:t},s)=>(0,K.jsxs)(`div`,{role:`row`,className:`contents`,children:[(0,K.jsx)(Dde,{node:e,depth:t,r:s,tabbable:S.r===s&&S.c===0,selected:c?.addonId===e.addonId,badge:o?.(e.addonId),onClick:a?t=>a(e.addonId,t):void 0,sticky:b}),n.map((t,n)=>{let a=r(e.addonId,t),o=c!==null&&c.addonId===e.addonId&&o9(c)===o9(t),l=a.kind===`enabled`||a.kind===`skip`;return(0,K.jsx)(`div`,{role:`gridcell`,className:`min-w-0 border-b border-l border-border`,children:(0,K.jsx)(`button`,{type:`button`,"data-r":s,"data-c":n+1,"data-step":e.addonId,"data-col":o9(t),tabIndex:S.r===s&&S.c===n+1?0:-1,"aria-disabled":!l,"aria-selected":o,onClick:n=>{l&&i(e.addonId,t,n.detail===0)},className:Cde(a,o,Z(`h-full w-full min-w-0 overflow-hidden px-3 py-2 outline-none`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary`,!l&&`cursor-default hover:bg-transparent`,t.disabled===!0&&`opacity-70`)),children:Sde(p,a)})},o9(t))})]},e.addonId))]}),u>0&&(0,K.jsx)(`div`,{"aria-hidden":!0,style:{width:u},className:`shrink-0`})]})})});(0,s.forwardRef)(function({tree:e,agents:t,getCellState:n,onCellClick:r,selectedCell:i,fallbackNodeId:a,onFallbackNodeChange:o,onStepClick:c,stepBadge:l,reserveRightPx:u=0,label:d=`Detection steps`},f){let p=(0,s.useRef)(null),[m,h]=(0,s.useState)(0);(0,s.useLayoutEffect)(()=>{let e=p.current;if(!e)return;let t=()=>h(e.getBoundingClientRect().width);t();let n=typeof ResizeObserver<`u`?new ResizeObserver(t):null;return n?.observe(e),()=>n?.disconnect()},[]);let g=(0,s.useMemo)(()=>s9(t),[t]),_=_de(m,g.length,wde,208,t.length),v=(0,s.useMemo)(()=>g.length===0?null:g.find(e=>e.agentNodeId===a)??g[0]??null,[g,a]),y=i?.agentNodeId;(0,s.useEffect)(()=>{_&&y!==void 0&&y!==a&&o(y)},[_,y,a,o]);let b=_&&v?v.columns:t;return(0,K.jsxs)(`div`,{ref:p,className:`w-full space-y-2`,children:[_&&v&&g.length>1&&(0,K.jsx)(Ode,{nodes:g,selected:v.agentNodeId,onSelect:o}),(0,K.jsx)(kde,{ref:f,tree:e,agents:b,getCellState:n,onCellClick:r,onStepClick:c,stepBadge:l,selectedCell:i,single:_&&v!==null,reserveRightPx:u,label:d})]})});function f9({label:e,description:t,error:n,required:r,children:i,orientation:a=`vertical`,className:o}){let s=a===`horizontal`;return(0,K.jsxs)(`div`,{className:Z(`flex gap-2`,s?`flex-row items-center justify-between`:`flex-col`,o),children:[(0,K.jsxs)(`div`,{className:Z(s?`flex-1`:``),children:[(0,K.jsxs)(p6,{children:[e,r&&(0,K.jsx)(`span`,{className:`text-danger ml-0.5`,children:`*`})]}),t&&(0,K.jsx)(`p`,{className:`text-foreground-subtle text-xs mt-0.5`,children:t})]}),(0,K.jsx)(`div`,{className:Z(s?`shrink-0`:``),children:i}),n&&(0,K.jsx)(`p`,{className:`text-danger text-xs`,children:n})]})}function p9({icon:e,title:t,subtitle:n,actions:r,nav:i,fill:a=!1,className:o,children:s}){let c=!!t||n!=null||r!=null,l=c||i!=null;return(0,K.jsxs)(`div`,{className:Z(`overflow-x-clip p-2 sm:p-4`,a?`flex h-full min-h-0 flex-col gap-4`:`space-y-4`,o),children:[l&&(0,K.jsxs)(`div`,{className:`shrink-0 space-y-3`,children:[c&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4`,children:[(0,K.jsxs)(`div`,{className:`min-w-0`,children:[t!==void 0&&t!==``&&(0,K.jsxs)(`h1`,{className:`flex items-center gap-2 text-lg font-semibold text-foreground`,children:[e!==void 0&&(0,K.jsx)(e,{className:`h-4 w-4 shrink-0 text-foreground-subtle`,"aria-hidden":!0}),t]}),n!=null&&(0,K.jsx)(`p`,{className:`mt-0.5 text-xs text-foreground-subtle`,children:n})]}),r!=null&&(0,K.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,children:r})]}),i]}),a?(0,K.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3`,children:s}):s]})}Z(roe,`min-w-0 max-w-full gap-1.5 py-1 pl-1 pr-2.5 text-xs font-normal`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40`),Z(ioe,`font-medium`);var Ade={online:{colorClass:`bg-success`,labelKey:`uiLibrary.statusBadge.online`,labelFallback:`Online`},offline:{colorClass:`bg-danger`,labelKey:`uiLibrary.statusBadge.offline`,labelFallback:`Offline`},degraded:{colorClass:`bg-warning`,labelKey:`uiLibrary.statusBadge.degraded`,labelFallback:`Degraded`},unknown:{colorClass:`bg-foreground-subtle`,labelKey:`uiLibrary.statusBadge.unknown`,labelFallback:`Unknown`},running:{colorClass:`bg-success`,labelKey:`uiLibrary.statusBadge.running`,labelFallback:`Running`},stopped:{colorClass:`bg-foreground-subtle`,labelKey:`uiLibrary.statusBadge.stopped`,labelFallback:`Stopped`},error:{colorClass:`bg-danger`,labelKey:`uiLibrary.statusBadge.error`,labelFallback:`Error`},idle:{colorClass:`bg-info`,labelKey:`uiLibrary.statusBadge.idle`,labelFallback:`Idle`},enabled:{colorClass:`bg-success`,labelKey:`uiLibrary.statusBadge.enabled`,labelFallback:`Enabled`},disabled:{colorClass:`bg-warning`,labelKey:`uiLibrary.statusBadge.disabled`,labelFallback:`Disabled`}};function jde({status:e,label:n,showDot:r=!0,showLabel:i=!0,size:a=`sm`,className:o}){let s=t(),c=Ade[e];return(0,K.jsxs)(`span`,{className:Z(`inline-flex items-center gap-1.5`,a===`sm`?`text-xs`:`text-sm`,o),children:[r&&(0,K.jsx)(`span`,{className:Z(`h-1.5 w-1.5 shrink-0 rounded-full`,c.colorClass),"aria-hidden":`true`}),i&&(0,K.jsx)(`span`,{className:`text-foreground`,children:n??s(c.labelKey,c.labelFallback)})]})}function Mde({dirtyCount:e,saving:n,status:r,error:i,onSave:a,onDiscard:o,scope:s}){let c=t(),l=e>0,u=n?c(`uiLibrary.stepInspector.saving`,`Saving…`):l?c(`uiLibrary.stepInspector.unsaved`,{one:`{{count}} unsaved change`,other:`{{count}} unsaved changes`},{count:e}):r===`saved`?c(`uiLibrary.stepInspector.saved`,`Saved`):r===`error`?i??c(`uiLibrary.stepInspector.saveFailed`,`Save failed`):c(`uiLibrary.stepInspector.noChanges`,`No unsaved changes`);return(0,K.jsxs)(`footer`,{className:`shrink-0 space-y-2 border-t border-border bg-surface px-4 py-2 pb-[max(0.5rem,env(safe-area-inset-bottom))] md:pb-2`,children:[s!==void 0&&(0,K.jsx)(`div`,{"data-save-scope":!0,children:s}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{role:`status`,className:Z(`min-w-0 flex-1 truncate text-[11px]`,r===`error`&&!l?`text-danger`:l?`text-amber-500`:`text-foreground-subtle`),children:u}),(0,K.jsx)(WJ,{variant:`outline`,size:`md`,disabled:!l||n,onClick:o,children:c(`uiLibrary.stepInspector.discard`,`Discard`)}),(0,K.jsx)(WJ,{variant:`primary`,size:`md`,disabled:!l||n,onClick:a,children:c(`uiLibrary.stepInspector.save`,`Save`)})]})]})}(0,s.forwardRef)(function({title:e,subtitle:t,headerActions:n,headerExtra:r,leading:i,saveBar:a,onEscape:o,children:c,className:l},u){let d=(0,s.useId)();return(0,K.jsxs)(`section`,{"aria-labelledby":d,onKeyDown:e=>{e.key!==`Escape`||o===void 0||(e.stopPropagation(),o())},className:Z(`flex min-h-0 flex-1 flex-col overflow-hidden bg-surface`,l),children:[(0,K.jsxs)(`header`,{className:`shrink-0 space-y-2 border-b border-border px-4 py-2.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-start gap-x-3 gap-y-2`,children:[i,(0,K.jsxs)(`div`,{className:`min-w-[9rem] flex-1`,children:[(0,K.jsx)(`h2`,{id:d,ref:u,tabIndex:-1,title:e,className:`line-clamp-2 break-words text-sm font-semibold leading-snug text-foreground outline-none focus-visible:ring-2 focus-visible:ring-primary rounded`,children:e}),t!==void 0&&(0,K.jsx)(`div`,{className:`mt-0.5 text-[11px] text-foreground-subtle`,children:t})]}),n]}),r]}),(0,K.jsx)(`div`,{"data-inspector-body":!0,className:`min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-3`,children:c}),a!==void 0&&(0,K.jsx)(Mde,{...a})]})}),EK(`camstack:player-overlays-state`,null);var Nde=EK(`camstack:player-overlays-actions`,null);function Pde(e){let t=(0,s.useContext)(Nde);(0,s.useEffect)(()=>{if(!(!t||!e))return t.setLayer(e),()=>t.removeLayer(e.id)},[t,e])}var Fde=[`24h`,`7d`,`30d`,`1y`,`custom`],m9=24*36e5;7*m9,30*m9,365*m9;var Ide=j({subject:N(`kind`,[j({kind:I(`device`),deviceId:E().int()}),j({kind:I(`node`),nodeId:T().min(1)})]),key:T().min(1),scope:T()}),Lde=F(Fde),Rde=j({id:T().min(1),name:T().min(1).max(80),window:Lde,selection:A(Ide).max(24)});j({version:I(1),panels:A(Rde).max(50),hidden:P(T(),A(T()).max(200))}),EK(`camstack:zone-editing`,null);var h9=`en`,g9=new Map,_9=new Set,v9=0;function y9(e){let t=(e??``).trim().toLowerCase().split(/[-_]/)[0]??``;return t===``?h9:t}function b9(){if(typeof document<`u`){let e=document.documentElement.lang;if(e.trim()!==``)return y9(e)}return typeof navigator<`u`&&typeof navigator.language==`string`?y9(navigator.language):h9}function zde(e,t,n){let r=y9(t),i=g9.get(e)??new Map;i.set(r,n),g9.set(e,i),v9+=1;for(let e of _9)e()}function Bde(e){_9.add(e);let t=null;return typeof document<`u`&&typeof MutationObserver<`u`&&(t=new MutationObserver(e),t.observe(document.documentElement,{attributes:!0,attributeFilter:[`lang`]})),()=>{_9.delete(e),t?.disconnect()}}function x9(){return`${b9()}#${v9}`}function S9(e,t){let n=e;for(let e of t){if(n===void 0||typeof n==`string`)return;n=n[e]}return typeof n==`string`?n:void 0}function Vde(e,t){try{return new Intl.PluralRules(e).select(t)}catch{return`other`}}function C9(e,t,n,r){let i=g9.get(e)?.get(t);if(i===void 0)return;let a=n.split(`.`);if(r!==void 0){let e=a[a.length-1]??n,o=a.slice(0,-1),s=S9(i,[...o,`${e}_${Vde(t,r)}`]);if(s!==void 0)return s;let c=S9(i,[...o,`${e}_other`]);if(c!==void 0)return c}return S9(i,a)}var Hde=/\{\{\s*([\w.]+)\s*\}\}/g;function w9(e,t){return t===void 0?e:e.replace(Hde,(e,n)=>{let r=t[n];return r===void 0?e:String(r)})}function T9(e,t,n,r){let i=r?.count,a=typeof i==`number`?i:void 0;return w9(C9(e,t,n,a)??C9(e,h9,n,a)??n,r)}function Ude(){return(0,s.useSyncExternalStore)(Bde,x9,x9)}function E9(e,t){let n=Ude(),r=n.slice(0,n.indexOf(`#`)),i=t===void 0?r:y9(t);return{t:(0,s.useCallback)((t,n)=>T9(e,i,t,n),[e,i,n]),lang:i}}var Wde=/<(\/?)([A-Za-z][\w-]*)(\s*\/)?>/g;function D9(e,t,n,r){let i=e[t];return i===void 0?(0,K.jsx)(s.Fragment,{children:n},r):(0,s.cloneElement)(i,{key:r},...n)}function Gde(e,t,n){let r={name:``,children:[]},i=[r],a=0,o=0,s=()=>i[i.length-1]??r,c=e=>{e!==``&&s().children.push(w9(e,n))};for(let n of e.matchAll(Wde)){c(e.slice(a,n.index)),a=n.index+n[0].length;let r=n[1]===`/`,l=n[2]??``;if(o+=1,n[3]!==void 0)s().children.push(D9(t,l,[],`k${o}`));else if(!r)i.push({name:l,children:[]});else if(i.length>1&&s().name===l){let e=i.pop();e&&s().children.push(D9(t,l,e.children,`k${o}`))}}for(c(e.slice(a));i.length>1;){let e=i.pop();e&&s().children.push(...e.children)}return r.children}function Kde(e,t){for(let[n,r]of Object.entries(t))zde(e,n,r);return{ns:e,useT:t=>E9(e,t),Trans:t=>{let{t:n}=E9(e),r=t.values?.count;return(0,K.jsx)(K.Fragment,{children:Gde(n(t.i18nKey,typeof r==`number`?{count:r}:void 0),t.components??{},t.values)})},translate:(t,n)=>T9(e,b9(),t,n)}}(0,s.lazy)(()=>ls(()=>import(`./MaskShapeCanvas-BTvl6Rin.js`).then(e=>({default:e.MaskShapeCanvas})),__vite__mapDeps([2,1]))),(0,s.lazy)(()=>ls(()=>import(`./MotionZonesSettings-BYIe4Hj8.js`).then(e=>({default:e.MotionZonesSettings})),__vite__mapDeps([0,1,2]))),(0,s.lazy)(()=>ls(()=>import(`./SceneMonitorEditor-d3ZcvlVV.js`).then(e=>({default:e.SceneMonitorEditor})),__vite__mapDeps([4,1,2]))),(0,s.lazy)(()=>ls(()=>import(`./PrivacyMaskSettings-cMbNvPuy.js`).then(e=>({default:e.PrivacyMaskSettings})),__vite__mapDeps([3,1,2])));function O9(e){return e===null?`disconnected`:e.hubConnectionState===void 0?e.hubConnected===!0?`connected`:`disconnected`:e.hubConnectionState}function k9(e,t){let n=e.isHub&&t!==null&&qde(e.displayName??e.hostname)?t:e.displayName??e.hostname;return e.isHub?`${n} (hub)`:n}function qde(e){return/^[0-9a-f]{12}$|^[0-9a-f]{64}$/.test(e)}function A9(e){return e.split(`.`)[0]===`0`?`${e} beta`:e}function j9(e){if(e===null)return null;let t=e.trim();return t.length>0?t:null}function Jde(e){let t=j9(e.productVersion),n=j9(e.serverVersion),r=j9(e.fallbackVersion);return t!==null&&n!==null?{kind:`both`,productLabel:A9(t),serverVersion:n}:t===null?n===null?r===null?{kind:`none`}:{kind:`fallback`,version:r}:{kind:`server`,serverVersion:n}:{kind:`product`,productLabel:A9(t)}}var M9=`camstack_agent_ui_session`,N9=class extends Error{constructor(){super(`Unauthorized — unlock required`)}};function P9(){let e=sessionStorage.getItem(M9);return e?{Authorization:`Bearer ${e}`}:{}}async function Yde(e){let t=await fetch(`/api/agent/session`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({ticket:e})});if(!t.ok){let e=await t.json().catch(()=>null);throw Error(e?.error??`HTTP ${t.status}`)}let n=await t.json();if(typeof n.token!=`string`||n.token.length===0)throw Error(`unlock session missing token`);sessionStorage.setItem(M9,n.token)}async function F9(e){let t=await fetch(e,{headers:P9()});if(t.status===401)throw new N9;if(!t.ok)throw Error(`HTTP ${t.status}`);return t.json()}async function I9(e,t){let n=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`,...P9()},body:JSON.stringify(t)});if(n.status===401)throw new N9;return n.json()}var{useT:L9,Trans:R9,translate:z9}=Kde(`agent-ui`,{en:{common:{unknownError:`Unknown error`,loading:`Loading…`,cancel:`Cancel`,save:`Save`,saving:`Saving…`},crash:{title:`CamStack Agent UI crashed`,body:`The dashboard hit an unexpected error while rendering. The agent itself keeps running — this only affects the UI. Details below (also in the agent log).`,startFailed:`CamStack Agent UI failed to start`},dashboard:{defaultName:`CamStack Agent`,unlocking:`Unlocking from hub…`,unreachable:`Unreachable`,hub:{connected:`Hub Connected`,unconfigured:`No hub configured`,unpaired:`Not paired`,certificateRejected:`Certificate rejected`,disconnected:`Hub Disconnected`},overview:{title:`Overview`,cpu:`CPU`,memory:`Memory`,addons:`Addons`,uptime:`Uptime`},resources:{title:`Resources`,cpuCores:`CPU ({{cores}} cores)`,cpuCoresModel:`CPU ({{cores}} cores — {{model}})`,memory:`Memory ({{used}} / {{total}} MB)`},host:{title:`System (host)`,platform:`Platform`,hostname:`Hostname`,uptime:`Host uptime`,memory:`Host memory`,ipv4:`IPv4`},process:{title:`Agent Process`,pid:`PID`,uptime:`Uptime`,memory:`Memory (RSS)`,heap:`Heap`},decode:{title:`Detection / Decoding`,hwaccel:`Decode hwaccel`,driDevice:`DRI device`,detectionDevices:`Detection devices`,software:`software / none detected`},locked:{title:`Agent dashboard locked`,body:`This agent is paired with a hub. Sign in on the hub as an admin to unlock this dashboard.`,continue:`Continue with hub`,hubUnknown:`Hub address unknown — open this agent from System → Cluster → Open dashboard.`},version:{restartToUpdate:`Restart to update`,restartToUpdateTo:`Restart to update → v{{version}}`,downloading:`Downloading update…`,checking:`Checking…`,check:`Check for updates`,checkFailed:`Update check failed: {{error}}`,both:`{{product}} · server {{server}}`,serverOnly:`server {{version}}`}},hubConfig:{title:`Hub Connection`,connection:{connected:`Connected`,unpaired:`Not paired`,unconfigured:`Not configured`,certificateRejected:`Certificate rejected`,disconnected:`Disconnected`},pairingState:{paired:`Paired`,requested:`Pairing requested`,unpaired:`Not paired`},certRejected:{title:`The hub refused this agent's certificate`,message:`The certificate was revoked or was issued by another hub. Forget the hub below, then pair this agent again from the hub.`},unreachable:{title:`Hub unreachable`,message:`This agent is paired but cannot reach the hub right now. Check that the hub is running and reachable from this machine.`},hubAddress:`Hub Address`,pairing:`Pairing`,clusterNodes:`Cluster nodes`,unsupported:`This agent is too old to pair from here. Update it from the hub (System → Cluster → Nodes), then pair it again.`,statusUnavailable:`Pairing status unavailable`,emptyPairing:`This agent is not paired. On the hub open System → Cluster → Agents, pick this agent and start pairing; the request appears here.`,name:{label:`Agent Name`,placeholder:`e.g. kitchen-agent`,rename:`Rename agent`,saveFailed:`Save failed`,saveFailedWith:`Save failed: {{error}}`,saved:`Name saved.`}},paired:{pairedWith:`Paired with`,theHub:`The hub`,hubUrl:`Hub URL`,caFingerprint:`CA fingerprint`,forget:`Forget this hub`,forgetTitle:`Forget this hub?`,forgetDescription:`This agent erases the certificate the hub issued and disconnects. Its cameras stop being served from this node until a hub pairs with it again, which needs a new confirmation on both screens.`,forgetConfirm:`Forget hub`},requests:{pinHelp:`The one-time PIN is shown only on the agent's own machine: in the agent console (docker logs for a container), in pairing-pin.txt in the agent data directory, or in the desktop app window. Use the PIN printed for this hub.`,codeHelp:`The {{digits}}-digit code the hub shows for this pairing. Type it from the hub screen.`,pendingGroup:`Pending pairing requests`,pickOne_one:`{{count}} hub asked to pair - pick the one you mean`,pickOne_other:`{{count}} hubs asked to pair - pick the one you mean`,requestFrom:`Pairing request from <b>{{node}}</b>`,caFingerprint:`CA fingerprint <mono>{{fingerprint}}</mono>`,timeLeft:`Time left to confirm`,lockedTitle:`Confirming is locked`,lockedMessage:`Too many wrong PINs. Try again in {{wait}}, or reset the pairing lockout below.`,confirmedHere:`Confirmed on this agent`,confirmedHint:`Now confirm the same code on the hub. This agent pairs as soon as the hub confirms.`,codeLabel:`Code shown on the hub`,pinLabel:`Local PIN`,pinPlaceholder:`PIN from the agent machine`,noPinNeeded:`You are on the agent itself, so no PIN is needed.`,confirm:`Confirm`,reject:`Reject`},reset:{codeHelp:`The reset code is printed in the agent console at boot (docker logs for a container) and kept in pairing-reset.txt in the agent data directory. It is renewed each time it is used.`,done:`Pairing reset: lockouts and pending requests are cleared.`,hide:`Hide pairing reset`,show:`Reset pairing lockout`,explain:`Use this when confirming is locked after wrong PINs, or a stuck request keeps the agent from accepting a new one. It cancels every pending pairing; the hub can then ask again.`,noCodeNeeded:`This page runs on the agent itself, so no reset code is needed.`,codeLabel:`Reset code`,codePlaceholder:`Reset code from the agent`,resetting:`Resetting…`,submit:`Reset pairing`},pairingApi:{httpStatus:`The agent answered HTTP {{status}}`,requestFailed:`The request failed`,refused:`The agent refused the request`,retryIn:`{{message}} (try again in {{wait}})`},addons:{title:`Addons`,empty:`No addons loaded`,readFailed:`Could not read the addons: {{error}}`,hubVersionsFailed:`The hub could not be asked which versions this node should run: {{error}}`,startFailed:`The update could not be started`,columns:{addon:`Addon`,version:`Version`,versionNotSortable:`A version cell can also say what is being updated.`,runner:`Runner`,cpu:`CPU`,memory:`Memory`,status:`Status`,actionsNotSortable:`Actions.`},runnerWithoutAddon:`runner without a known addon`,updateFailed:`Update failed: {{message}}`,updatingTo:`Updating to {{version}}…`,updatedTo:`Updated to {{version}}`,published:`{{version}} published`,publishedHint:`A newer release is published. It reaches this node once the hub runs it — update the hub first.`,inAgentProcess:`in the agent process`,shared_one:`shared with {{count}} other`,shared_other:`shared with {{count}} others`,updating:`Updating…`,updateTo:`Update to {{version}}`,restart:`Restart {{name}}`},updates:{title:`Framework update`,bootMode:{dataRoot:`Updatable copy (runtime-updatable)`,baked:`Image copy (read-only)`,workspace:`Dev workspace`},restartWarning:`Applying downloads the release, then restarts this node to swap it in. Live streams and detection on this node stop for the restart, and this page goes unreachable until the agent comes back.`,state:{checking:`Checking the registry…`,staging:`Downloading and staging the release…`,pendingRestart:`Staged — restarting to apply`,pendingRestartVersion:`Staged v{{version}} — restarting to apply`,working:`Working…`},updateAvailable:`update available`,checking:`Checking…`,check:`Check for updates`,confirmApply:`Confirm — update and restart this node`,apply:`Update`,applyTo:`Update → v{{version}}`,running:`Running`,published:`Published (npm)`,notChecked:`not checked`,loadedFrom:`Code loaded from`,checkFailed:`Update check failed: {{error}}`,npmNote:`The framework installs from the npm registry — this works with the hub unreachable.`,readFailed:`Could not read update state: {{error}}`,checkRequestFailed:`Check failed`,applyFailed:`Update could not be started`}},it:{common:{unknownError:`Errore sconosciuto`,loading:`Caricamento…`,cancel:`Annulla`,save:`Salva`,saving:`Salvataggio…`},crash:{title:`L'interfaccia dell'agente CamStack si è interrotta`,body:`La dashboard ha incontrato un errore imprevisto durante la visualizzazione. L'agente continua a funzionare: riguarda solo l'interfaccia. Dettagli qui sotto (anche nel log dell'agente).`,startFailed:`Impossibile avviare l'interfaccia dell'agente CamStack`},dashboard:{defaultName:`Agente CamStack`,unlocking:`Sblocco dall'hub in corso…`,unreachable:`Non raggiungibile`,hub:{connected:`Hub connesso`,unconfigured:`Nessun hub configurato`,unpaired:`Non associato`,certificateRejected:`Certificato rifiutato`,disconnected:`Hub disconnesso`},overview:{title:`Panoramica`,cpu:`CPU`,memory:`Memoria`,addons:`Addon`,uptime:`Uptime`},resources:{title:`Risorse`,cpuCores:`CPU ({{cores}} core)`,cpuCoresModel:`CPU ({{cores}} core — {{model}})`,memory:`Memoria ({{used}} / {{total}} MB)`},host:{title:`Sistema (host)`,platform:`Piattaforma`,hostname:`Nome host`,uptime:`Uptime host`,memory:`Memoria host`,ipv4:`IPv4`},process:{title:`Processo dell'agente`,pid:`PID`,uptime:`Uptime`,memory:`Memoria (RSS)`,heap:`Heap`},decode:{title:`Detection / Decodifica`,hwaccel:`Accelerazione hardware di decodifica`,driDevice:`Dispositivo DRI`,detectionDevices:`Dispositivi di detection`,software:`software / nessuno rilevato`},locked:{title:`Dashboard dell'agente bloccata`,body:`Questo agente è associato a un hub. Accedi all'hub come amministratore per sbloccare la dashboard.`,continue:`Continua con l'hub`,hubUnknown:`Indirizzo dell'hub sconosciuto: apri questo agente da Sistema → Cluster → Apri dashboard.`},version:{restartToUpdate:`Riavvia per aggiornare`,restartToUpdateTo:`Riavvia per aggiornare → v{{version}}`,downloading:`Download dell'aggiornamento…`,checking:`Controllo…`,check:`Cerca aggiornamenti`,checkFailed:`Controllo aggiornamenti non riuscito: {{error}}`,both:`{{product}} · server {{server}}`,serverOnly:`server {{version}}`}},hubConfig:{title:`Connessione all'hub`,connection:{connected:`Connesso`,unpaired:`Non associato`,unconfigured:`Non configurato`,certificateRejected:`Certificato rifiutato`,disconnected:`Disconnesso`},pairingState:{paired:`Associato`,requested:`Associazione richiesta`,unpaired:`Non associato`},certRejected:{title:`L'hub ha rifiutato il certificato di questo agente`,message:`Il certificato è stato revocato o emesso da un altro hub. Dimentica l'hub qui sotto, poi associa di nuovo questo agente dall'hub.`},unreachable:{title:`Hub non raggiungibile`,message:`Questo agente è associato ma ora non riesce a raggiungere l'hub. Verifica che l'hub sia in esecuzione e raggiungibile da questa macchina.`},hubAddress:`Indirizzo dell'hub`,pairing:`Associazione`,clusterNodes:`Nodi del cluster`,unsupported:`Questo agente è troppo vecchio per essere associato da qui. Aggiornalo dall'hub (Sistema → Cluster → Nodi), poi associalo di nuovo.`,statusUnavailable:`Stato dell'associazione non disponibile`,emptyPairing:`Questo agente non è associato. Sull'hub apri Sistema → Cluster → Agenti, scegli questo agente e avvia l'associazione: la richiesta compare qui.`,name:{label:`Nome dell'agente`,placeholder:`es. agent-kitchen`,rename:`Rinomina agente`,saveFailed:`Salvataggio non riuscito`,saveFailedWith:`Salvataggio non riuscito: {{error}}`,saved:`Nome salvato.`}},paired:{pairedWith:`Associato a`,theHub:`L'hub`,hubUrl:`URL dell'hub`,caFingerprint:`Impronta della CA`,forget:`Dimentica questo hub`,forgetTitle:`Dimenticare questo hub?`,forgetDescription:`L'agente cancella il certificato emesso dall'hub e si disconnette. Le sue telecamere non vengono più servite da questo nodo finché un hub non lo associa di nuovo, cosa che richiede una nuova conferma su entrambe le schermate.`,forgetConfirm:`Dimentica hub`},requests:{pinHelp:`Il PIN monouso è mostrato solo sulla macchina dell'agente: nella console dell'agente (docker logs per un container), in pairing-pin.txt nella cartella dati dell'agente o nella finestra dell'app desktop. Usa il PIN stampato per questo hub.`,codeHelp:`Il codice di {{digits}} cifre che l'hub mostra per questa associazione. Digitalo dalla schermata dell'hub.`,pendingGroup:`Richieste di associazione in sospeso`,pickOne_one:`{{count}} hub ha chiesto di associarsi - scegli quello giusto`,pickOne_other:`{{count}} hub hanno chiesto di associarsi - scegli quello giusto`,requestFrom:`Richiesta di associazione da <b>{{node}}</b>`,caFingerprint:`Impronta della CA <mono>{{fingerprint}}</mono>`,timeLeft:`Tempo rimasto per confermare`,lockedTitle:`La conferma è bloccata`,lockedMessage:`Troppi PIN errati. Riprova tra {{wait}} oppure reimposta il blocco dell'associazione qui sotto.`,confirmedHere:`Confermato su questo agente`,confirmedHint:`Ora conferma lo stesso codice sull'hub. L'agente si associa non appena l'hub conferma.`,codeLabel:`Codice mostrato sull'hub`,pinLabel:`PIN locale`,pinPlaceholder:`PIN dalla macchina dell'agente`,noPinNeeded:`Sei sull'agente stesso, quindi non serve il PIN.`,confirm:`Conferma`,reject:`Rifiuta`},reset:{codeHelp:`Il codice di reimpostazione viene stampato nella console dell'agente all'avvio (docker logs per un container) e salvato in pairing-reset.txt nella cartella dati dell'agente. Viene rinnovato a ogni utilizzo.`,done:`Associazione reimpostata: blocchi e richieste in sospeso eliminati.`,hide:`Nascondi reimpostazione associazione`,show:`Reimposta blocco associazione`,explain:`Usalo quando la conferma è bloccata dopo PIN errati o quando una richiesta bloccata impedisce all'agente di accettarne una nuova. Annulla ogni associazione in sospeso; l'hub potrà poi chiederla di nuovo.`,noCodeNeeded:`Questa pagina è in esecuzione sull'agente stesso, quindi non serve il codice di reimpostazione.`,codeLabel:`Codice di reimpostazione`,codePlaceholder:`Codice di reimpostazione dall'agente`,resetting:`Reimpostazione…`,submit:`Reimposta associazione`},pairingApi:{httpStatus:`L'agente ha risposto HTTP {{status}}`,requestFailed:`La richiesta non è riuscita`,refused:`L'agente ha rifiutato la richiesta`,retryIn:`{{message}} (riprova tra {{wait}})`},addons:{title:`Addon`,empty:`Nessun addon caricato`,readFailed:`Impossibile leggere gli addon: {{error}}`,hubVersionsFailed:`Impossibile chiedere all'hub quali versioni questo nodo deve eseguire: {{error}}`,startFailed:`Impossibile avviare l'aggiornamento`,columns:{addon:`Addon`,version:`Versione`,versionNotSortable:`Una cella di versione può anche indicare cosa si sta aggiornando.`,runner:`Runner`,cpu:`CPU`,memory:`Memoria`,status:`Stato`,actionsNotSortable:`Azioni.`},runnerWithoutAddon:`runner senza un addon noto`,updateFailed:`Aggiornamento non riuscito: {{message}}`,updatingTo:`Aggiornamento a {{version}}…`,updatedTo:`Aggiornato a {{version}}`,published:`{{version}} pubblicata`,publishedHint:`È stata pubblicata una versione più recente. Arriva su questo nodo quando l'hub la esegue: aggiorna prima l'hub.`,inAgentProcess:`nel processo dell'agente`,shared_one:`condiviso con {{count}} altro`,shared_other:`condiviso con altri {{count}}`,updating:`Aggiornamento…`,updateTo:`Aggiorna a {{version}}`,restart:`Riavvia {{name}}`},updates:{title:`Aggiornamento del framework`,bootMode:{dataRoot:`Copia aggiornabile (aggiornabile a runtime)`,baked:`Copia dell'immagine (sola lettura)`,workspace:`Workspace di sviluppo`},restartWarning:`L'applicazione scarica la release e poi riavvia questo nodo per attivarla. Streaming live e detection su questo nodo si fermano durante il riavvio e questa pagina resta irraggiungibile finché l'agente non torna disponibile.`,state:{checking:`Controllo del registry…`,staging:`Download e preparazione della release…`,pendingRestart:`Preparata: riavvio per applicare`,pendingRestartVersion:`Preparata v{{version}}: riavvio per applicare`,working:`Elaborazione…`},updateAvailable:`aggiornamento disponibile`,checking:`Controllo…`,check:`Cerca aggiornamenti`,confirmApply:`Conferma: aggiorna e riavvia questo nodo`,apply:`Aggiorna`,applyTo:`Aggiorna → v{{version}}`,running:`In esecuzione`,published:`Pubblicata (npm)`,notChecked:`non controllato`,loadedFrom:`Codice caricato da`,checkFailed:`Controllo aggiornamenti non riuscito: {{error}}`,npmNote:`Il framework si installa dal registry npm: funziona anche con l'hub non raggiungibile.`,readFailed:`Impossibile leggere lo stato degli aggiornamenti: {{error}}`,checkRequestFailed:`Controllo non riuscito`,applyFailed:`Impossibile avviare l'aggiornamento`}}}),Xde={minHeight:`100vh`,margin:0,padding:`48px 32px`,background:`#0c0a09`,color:`#fafaf9`,fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif`},Zde={marginTop:16,padding:12,background:`#1c1917`,border:`1px solid #292524`,borderRadius:8,color:`#f87171`,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`};function B9(e){return e instanceof Error?e.stack??`${e.name}: ${e.message}`:String(e)}var Qde=class extends s.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`[agent-ui] React render error: ${B9(e)}${t.componentStack??``}`)}render(){return this.state.error===null?this.props.children:(0,K.jsxs)(`div`,{style:Xde,children:[(0,K.jsx)(`h1`,{style:{fontSize:18,margin:0},children:z9(`crash.title`)}),(0,K.jsx)(`p`,{style:{color:`#a8a29e`,fontSize:13},children:z9(`crash.body`)}),(0,K.jsx)(`pre`,{style:Zde,children:B9(this.state.error)})]})}};function V9(e){let t=document.getElementById(`root`);if(!t||t.childElementCount>0)return;t.innerHTML=``;let n=document.createElement(`div`);n.setAttribute(`style`,`min-height:100vh;margin:0;padding:48px 32px;background:#0c0a09;color:#fafaf9;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif`);let r=document.createElement(`h1`);r.setAttribute(`style`,`font-size:18px;margin:0 0 8px`),r.textContent=z9(`crash.startFailed`);let i=document.createElement(`pre`);i.setAttribute(`style`,`margin-top:16px;padding:12px;background:#1c1917;border:1px solid #292524;border-radius:8px;color:#f87171;font-size:12px;white-space:pre-wrap;word-break:break-word`),i.textContent=e,n.appendChild(r),n.appendChild(i),t.appendChild(n)}function $de(){window.addEventListener(`error`,e=>{console.error(`[agent-ui] uncaught error: ${B9(e.error??e.message)}`),V9(B9(e.error??e.message))}),window.addEventListener(`unhandledrejection`,e=>{console.error(`[agent-ui] unhandled rejection: ${B9(e.reason)}`),V9(B9(e.reason))})}function efe(e){return e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function tfe(e){return e===`running`?`running`:e===`crashed`||e===`error`||e===`failed`?`error`:e===`stopped`?`stopped`:`unknown`}function nfe(e){return Math.max(0,e.addonIds.length-1)}function rfe({row:e,update:t,t:n}){return e.kind===`runner`?(0,K.jsx)(`span`,{className:`text-foreground-subtle`,children:`—`}):(0,K.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[(0,K.jsxs)(`span`,{className:`font-mono text-[11px]`,children:[t?.installedVersion??e.version??`—`,t?.behindHub===!0&&t.hubVersion!==null?` → ${t.hubVersion}`:``]}),t?.update?.status===`failed`&&(0,K.jsx)(`span`,{className:`max-w-[16rem] truncate text-[10px] text-danger`,title:t.update.message??``,children:n(`addons.updateFailed`,{message:t.update.message??``})}),t?.update?.status===`running`&&(0,K.jsx)(`span`,{className:`text-[10px] text-warning`,children:n(`addons.updatingTo`,{version:t.update.targetVersion})}),t?.update?.status===`done`&&t.behindHub===!1&&(0,K.jsx)(`span`,{className:`text-[10px] text-success`,children:n(`addons.updatedTo`,{version:t.update.targetVersion})}),t!==void 0&&!t.behindHub&&t.updateAvailable&&t.latestVersion!==null&&(0,K.jsx)(`span`,{className:`text-[10px] text-foreground-subtle`,title:n(`addons.publishedHint`),children:n(`addons.published`,{version:t.latestVersion})})]})}function ife({runner:e,t}){if(e===null)return(0,K.jsx)(`span`,{className:`text-[11px] text-foreground-subtle`,children:t(`addons.inAgentProcess`)});let n=nfe(e),r=n>0?t(`addons.shared`,{count:n}):null;return(0,K.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[(0,K.jsxs)(`span`,{className:`font-mono text-[11px]`,children:[e.groupId,` · pid `,e.pid]}),r!==null&&(0,K.jsx)(`span`,{className:`text-[10px] text-foreground-subtle`,title:e.addonIds.join(`, `),children:r})]})}function afe(e){return[{key:`addon`,header:e.t(`addons.columns.addon`),sortValue:e=>e.addonId??e.runner?.name??e.key,render:t=>(0,K.jsxs)(`span`,{className:`flex flex-col`,children:[(0,K.jsx)(`span`,{className:`font-mono text-xs`,children:t.addonId??t.runner?.name}),t.kind===`runner`&&(0,K.jsx)(`span`,{className:`text-[10px] text-foreground-subtle`,children:e.t(`addons.runnerWithoutAddon`)}),t.packageName!==null&&(0,K.jsx)(`span`,{className:`text-[10px] text-foreground-subtle`,children:t.packageName})]})},{key:`version`,header:e.t(`addons.columns.version`),notSortableReason:e.t(`addons.columns.versionNotSortable`),render:t=>(0,K.jsx)(rfe,{row:t,update:e.updateFor(t),t:e.t})},{key:`runner`,header:e.t(`addons.columns.runner`),sortValue:e=>e.runner?.groupId??null,render:t=>(0,K.jsx)(ife,{runner:t.runner,t:e.t})},{key:`cpu`,header:e.t(`addons.columns.cpu`),align:`right`,sortValue:e=>e.runner?.cpuPercent??null,render:e=>e.runner===null?`—`:`${e.runner.cpuPercent.toFixed(1)}%`},{key:`memory`,header:e.t(`addons.columns.memory`),align:`right`,sortValue:e=>e.runner?.memoryRss??null,render:e=>e.runner===null?`—`:efe(e.runner.memoryRss)},{key:`status`,header:e.t(`addons.columns.status`),sortValue:e=>e.status,render:e=>(0,K.jsx)(jde,{status:tfe(e.status),label:e.status,size:`sm`})},{key:`actions`,header:``,align:`right`,notSortableReason:e.t(`addons.columns.actionsNotSortable`),render:t=>{let n=e.updateFor(t),r=n?.update?.status===`running`;return(0,K.jsxs)(`span`,{className:`flex items-center justify-end gap-1`,children:[n?.behindHub===!0&&t.packageName!==null&&(0,K.jsxs)(WJ,{type:`button`,variant:`outline`,size:`sm`,disabled:r,onClick:()=>e.onUpdate(t.packageName??``),children:[(0,K.jsx)(rH,{className:`h-3 w-3`}),r?e.t(`addons.updating`):e.t(`addons.updateTo`,{version:n.hubVersion??``})]}),t.kind===`addon`&&t.addonId!==null&&(0,K.jsx)(DJ,{type:`button`,variant:`ghost`,size:`sm`,icon:fH,"aria-label":e.t(`addons.restart`,{name:t.addonId}),onClick:()=>e.onRestartAddon(t.addonId??``)}),t.kind===`runner`&&t.runner!==null&&(0,K.jsx)(DJ,{type:`button`,variant:`ghost`,size:`sm`,icon:fH,"aria-label":e.t(`addons.restart`,{name:t.runner.name}),onClick:()=>e.onRestartRunner(t.runner?.name??``)})]})}}]}var ofe=3e3,sfe=12e4,cfe=3e3;function lfe({locked:e,onUnauthorized:t}){let{t:n}=L9(),[r,i]=(0,s.useState)(null),[a,o]=(0,s.useState)(null),[c,l]=(0,s.useState)(null),[u,d]=(0,s.useState)(null),f=(0,s.useCallback)(e=>{e instanceof N9?t():l(e instanceof Error?e.message:z9(`common.unknownError`))},[t]),p=(0,s.useCallback)(async()=>{try{i(await F9(`/api/agent/addon-runtime`)),l(null)}catch(e){f(e)}},[f]),m=(0,s.useCallback)(async()=>{try{o(await F9(`/api/agent/addon-updates`))}catch(e){f(e)}},[f]);(0,s.useEffect)(()=>{if(e)return;p();let t=setInterval(()=>void p(),ofe);return()=>clearInterval(t)},[e,p]);let h=a?.available===!0&&a.entries.some(e=>e.update?.status===`running`);(0,s.useEffect)(()=>{if(e)return;m();let t=setInterval(()=>void m(),h?cfe:sfe);return()=>clearInterval(t)},[e,m,h]);let g=(0,s.useMemo)(()=>new Map(a?.available===!0?a.entries.map(e=>[e.packageName,e]):[]),[a]),_=(0,s.useCallback)(async e=>{d(null);try{let t=await I9(`/api/agent/addon-updates/update`,{packageName:e});t.started||d(t.message??z9(`addons.startFailed`)),await m()}catch(e){e instanceof N9?t():d(e instanceof Error?e.message:z9(`addons.startFailed`))}},[m,t]),v=(0,s.useMemo)(()=>afe({t:n,updateFor:e=>e.packageName===null?void 0:g.get(e.packageName),onRestartAddon:e=>void I9(`/api/agent/addon/restart`,{addonId:e}),onRestartRunner:e=>void I9(`/api/agent/process/restart`,{name:e}),onUpdate:e=>void _(e)}),[g,_,n]);return(0,K.jsx)(v6,{headingId:`agent-addons`,title:n(`addons.title`),icon:rH,actions:(0,K.jsx)(HJ,{variant:`default`,className:`text-[10px]`,children:r?.length??0}),children:(0,K.jsxs)(`div`,{className:`${f6} space-y-3`,children:[c!==null&&(0,K.jsx)(B3,{message:n(`addons.readFailed`,{error:c})}),u!==null&&(0,K.jsx)(B3,{message:u}),a?.available===!0&&a.hubVersionsError!==null&&(0,K.jsx)(B3,{variant:`warning`,message:n(`addons.hubVersionsFailed`,{error:a.hubVersionsError})}),a?.available===!0&&a.error!==null&&(0,K.jsx)(B3,{variant:`warning`,message:a.error}),(0,K.jsx)(Coe,{columns:v,rows:r??[],rowKey:e=>e.key,minWidthPx:640,bordered:!1,emptyMessage:n(r===null?`common.loading`:`addons.empty`)})]})})}var ufe=`/api/agent/pairing/status`,dfe=`/api/agent/pairing/confirm`,ffe=`/api/agent/pairing/reject`,pfe=`/api/agent/pairing/reset`,mfe=`/api/agent/pairing/forget`;function hfe(){return F9(ufe)}function H9(e){return e.some(e=>typeof e.pin==`string`)}function gfe(e){return e===`localhost`||e===`127.0.0.1`||e===`[::1]`}function _fe(e){return typeof e==`object`&&!!e&&typeof Reflect.get(e,`ok`)==`boolean`}async function U9(e,t){try{let n=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`,...P9()},body:JSON.stringify(t)}),r=await n.json().catch(()=>null);return _fe(r)?r:n.ok?{ok:!0}:{ok:!1,message:z9(`pairingApi.httpStatus`,{status:n.status})}}catch(e){return{ok:!1,message:e instanceof Error?e.message:z9(`pairingApi.requestFailed`)}}}function W9(e){let t=Math.max(1,Math.ceil(e/1e3));return t<90?`${t} s`:`${Math.ceil(t/60)} min`}function G9(e){let t=e.message??e.error??z9(`pairingApi.refused`);return e.retryAfterMs===void 0?t:z9(`pairingApi.retryIn`,{message:t,wait:W9(e.retryAfterMs)})}function vfe(e,t){let n=Math.max(0,Math.ceil((e-t)/1e3));return`${Math.floor(n/60)}:${String(n%60).padStart(2,`0`)}`}function K9(e){return e.replace(/(.{4})/g,`$1 `).trim()}async function yfe(){let e=await U9(mfe,{});if(!e.ok)throw Error(G9(e))}function bfe({hub:e,hubName:t,onForgotten:n}){let{t:r}=L9();return(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsxs)(`div`,{className:`space-y-0`,children:[(0,K.jsx)(_6,{label:r(`paired.pairedWith`),children:t??r(`paired.theHub`)}),e?.url!=null&&(0,K.jsx)(_6,{label:r(`paired.hubUrl`),valueClassName:`font-mono break-all`,children:e.url}),e!==null&&(0,K.jsx)(_6,{label:r(`paired.caFingerprint`),valueClassName:`font-mono break-all`,children:K9(e.caFingerprint)})]}),(0,K.jsx)(Roe,{label:r(`paired.forget`),icon:HH,title:r(`paired.forgetTitle`),description:r(`paired.forgetDescription`),confirmLabel:r(`paired.forgetConfirm`),size:`sm`,action:yfe,onSuccess:()=>void n()})]})}var xfe=new Set([`pin-locked`,`reset-locked`]);function q9(e){return e.hub.caFingerprint}function Sfe({pairing:e}){return(0,K.jsxs)(`div`,{className:`space-y-0.5 min-w-0`,children:[(0,K.jsx)(`div`,{className:`text-xs text-foreground`,children:(0,K.jsx)(R9,{i18nKey:`requests.requestFrom`,values:{node:e.hub.nodeId},components:{b:(0,K.jsx)(`span`,{className:`font-semibold`})}})}),(0,K.jsx)(`div`,{className:`text-[11px] font-mono text-foreground-subtle break-all`,children:e.hub.url}),(0,K.jsx)(`div`,{className:`text-[11px] text-foreground-subtle`,children:(0,K.jsx)(R9,{i18nKey:`requests.caFingerprint`,values:{fingerprint:K9(e.hub.caFingerprint)},components:{mono:(0,K.jsx)(`span`,{className:`font-mono break-all`})}})})]})}function Cfe({pending:e,onChanged:t}){let{t:n}=L9(),[r,i]=(0,s.useState)(null),[a,o]=(0,s.useState)(``),[c,l]=(0,s.useState)(``),[u,d]=(0,s.useState)(!1),[f,p]=(0,s.useState)(null),[m,h]=(0,s.useState)(null),[g,_]=(0,s.useState)([]),[v,y]=(0,s.useState)(()=>Date.now());(0,s.useEffect)(()=>{let e=setInterval(()=>y(Date.now()),1e3);return()=>clearInterval(e)},[]);let b=e.find(e=>q9(e)===r)??e[0],ee=H9(e),te=m!==null&&m>v;if(b===void 0)return null;let ne=q9(b),x=b.localConfirmed===!0||g.includes(ne),S=e=>{e!==ne&&(i(e),o(``),p(null))},re=()=>ee?{pin:b.pin??``}:{pin:c.trim()},ie=e=>{if(p(G9(e)),e.retryAfterMs!==void 0&&xfe.has(e.error??``)){let t=Date.now();y(t),h(t+e.retryAfterMs)}},ae=async()=>{d(!0),p(null);let e=await U9(dfe,{...re(),code:a.trim()});if(d(!1),o(``),e.ok){_(e=>[...e,ne]),l(``),await t();return}ie(e),await t()},oe=async()=>{d(!0),p(null);let e=await U9(ffe,re());d(!1),e.ok||ie(e),o(``),await t()},se=!u&&!te&&a.trim().length===6&&(ee||c.trim().length===8),ce=!u&&!te&&(ee||c.trim().length===8);return(0,K.jsxs)(`div`,{className:`space-y-3`,children:[e.length>1&&(0,K.jsxs)(`div`,{className:`space-y-1`,role:`radiogroup`,"aria-label":n(`requests.pendingGroup`),children:[(0,K.jsx)(`div`,{className:`text-[10px] uppercase tracking-wider text-foreground-subtle font-medium`,children:n(`requests.pickOne`,{count:e.length})}),e.map(e=>(0,K.jsx)(WJ,{type:`button`,role:`radio`,"aria-checked":q9(e)===ne,variant:q9(e)===ne?`primary`:`outline`,size:`sm`,className:`w-full justify-start text-left h-auto py-1.5`,onClick:()=>S(q9(e)),children:(0,K.jsxs)(`span`,{className:`min-w-0 truncate`,children:[e.hub.nodeId,` · `,e.hub.url]})},q9(e)))]}),(0,K.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-start gap-2 min-w-0`,children:[(0,K.jsx)(xH,{className:`h-4 w-4 mt-0.5 shrink-0 text-warning`}),(0,K.jsx)(Sfe,{pairing:b})]}),(0,K.jsx)(HJ,{variant:`warning`,className:`shrink-0 font-mono`,title:n(`requests.timeLeft`),children:vfe(b.expiresAt,v)})]}),te&&m!==null&&(0,K.jsx)(B3,{variant:`warning`,title:n(`requests.lockedTitle`),message:n(`requests.lockedMessage`,{wait:W9(m-v)})}),x?(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(HJ,{variant:`success`,icon:(0,K.jsx)(QB,{className:`h-3 w-3`}),children:n(`requests.confirmedHere`)}),(0,K.jsx)(`p`,{className:`text-[11px] text-foreground-subtle`,children:n(`requests.confirmedHint`)})]}):(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsx)(f9,{label:n(`requests.codeLabel`),description:n(`requests.codeHelp`,{digits:6}),children:(0,K.jsx)(kJ,{id:`agent-pairing-code`,"aria-label":n(`requests.codeLabel`),type:`text`,inputMode:`numeric`,autoComplete:`off`,maxLength:6,value:a,onChange:e=>o(e.target.value.replace(/\D/g,``)),placeholder:`000000`,className:`font-mono tracking-widest`,disabled:te})}),!ee&&(0,K.jsx)(f9,{label:n(`requests.pinLabel`),description:n(`requests.pinHelp`),children:(0,K.jsx)(kJ,{id:`agent-pairing-pin`,"aria-label":n(`requests.pinLabel`),type:`text`,inputMode:`numeric`,autoComplete:`off`,maxLength:8,value:c,onChange:e=>l(e.target.value.replace(/\D/g,``)),placeholder:n(`requests.pinPlaceholder`),className:`font-mono tracking-widest`,disabled:te})}),ee&&(0,K.jsx)(`p`,{className:`text-[11px] text-foreground-subtle`,children:n(`requests.noPinNeeded`)})]}),f!==null&&(0,K.jsx)(`p`,{role:`alert`,className:`text-[11px] text-danger`,children:f}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[!x&&(0,K.jsxs)(WJ,{type:`button`,variant:`primary`,size:`sm`,disabled:!se,onClick:()=>void ae(),children:[(0,K.jsx)(QB,{className:`h-3 w-3`}),n(`requests.confirm`)]}),(0,K.jsxs)(WJ,{type:`button`,variant:`outline`,size:`sm`,disabled:!ce,onClick:()=>void oe(),children:[(0,K.jsx)($H,{className:`h-3 w-3`}),n(`requests.reject`)]})]})]})}function wfe({local:e,onReset:t}){let{t:n}=L9(),[r,i]=(0,s.useState)(!1),[a,o]=(0,s.useState)(``),[c,l]=(0,s.useState)(!1),[u,d]=(0,s.useState)(!1),f=!e||u,[p,m]=(0,s.useState)(null),h=async()=>{l(!0),m(null);let e=await U9(pfe,f?{code:a.trim()}:{});if(l(!1),e.ok){o(``),m({ok:!0,text:n(`reset.done`)}),await t();return}e.error===`reset-code-required`&&d(!0),m({ok:!1,text:G9(e)})};return(0,K.jsxs)(`div`,{className:`border-t border-border pt-3 space-y-3`,children:[(0,K.jsxs)(WJ,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>i(e=>!e),children:[(0,K.jsx)(pH,{className:`h-3 w-3`}),n(r?`reset.hide`:`reset.show`)]}),r&&(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsx)(`p`,{className:`text-[11px] text-foreground-subtle`,children:n(`reset.explain`)}),f?(0,K.jsx)(f9,{label:n(`reset.codeLabel`),description:n(`reset.codeHelp`),children:(0,K.jsx)(kJ,{id:`agent-pairing-reset-code`,"aria-label":n(`reset.codeLabel`),type:`text`,inputMode:`numeric`,autoComplete:`off`,maxLength:8,value:a,onChange:e=>o(e.target.value),placeholder:n(`reset.codePlaceholder`)})}):(0,K.jsx)(`p`,{className:`text-[11px] text-foreground-subtle`,children:n(`reset.noCodeNeeded`)}),(0,K.jsx)(WJ,{type:`button`,variant:`outline`,size:`sm`,disabled:c||f&&a.trim().length===0,onClick:()=>void h(),children:n(c?`reset.resetting`:`reset.submit`)}),p!==null&&(0,K.jsx)(`p`,{role:`status`,className:p.ok?`text-[11px] text-success`:`text-[11px] text-danger`,children:p.text})]})]})}var Tfe=2e3;function Efe(e=Tfe){let[t,n]=(0,s.useState)(null),[r,i]=(0,s.useState)(null),a=(0,s.useRef)(!0),o=(0,s.useRef)(async()=>void 0);return o.current=async()=>{try{let e=await hfe();if(!a.current)return;n(e),i(null)}catch(e){a.current&&i(e instanceof Error?e.message:z9(`common.unknownError`))}},(0,s.useEffect)(()=>{a.current=!0,o.current();let t=setInterval(()=>void o.current(),e);return()=>{a.current=!1,clearInterval(t)}},[e]),{view:t,error:r,refresh:()=>o.current()}}function Dfe({connectionState:e}){let{t}=L9();switch(e){case`connected`:return(0,K.jsx)(HJ,{variant:`success`,children:t(`hubConfig.connection.connected`)});case`unpaired`:return(0,K.jsx)(HJ,{variant:`warning`,children:t(`hubConfig.connection.unpaired`)});case`unconfigured`:return(0,K.jsx)(HJ,{variant:`default`,children:t(`hubConfig.connection.unconfigured`)});case`certificate-rejected`:return(0,K.jsx)(HJ,{variant:`danger`,children:t(`hubConfig.connection.certificateRejected`)});case`disconnected`:return(0,K.jsx)(HJ,{variant:`danger`,children:t(`hubConfig.connection.disconnected`)})}}function Ofe(e,t,n){return t?.state===`paired`||t===null&&n?e(`hubConfig.pairingState.paired`):t?.state===`pending`?e(`hubConfig.pairingState.requested`):e(`hubConfig.pairingState.unpaired`)}function kfe({status:e,onSaved:t}){let[n,r]=(0,s.useState)(!1),[i,a]=(0,s.useState)(``),[o,c]=(0,s.useState)(!1),[l,u]=(0,s.useState)(null),{t:d}=L9();(0,s.useEffect)(()=>{n||a(e?.name??``)},[e?.name,n]);let f=(0,s.useCallback)(async()=>{let n=i.trim();if(n.length===0||n===e?.name){r(!1);return}c(!0),u(null);try{let e=await I9(`/api/agent/config`,{name:n});if(e.success===!1){u(e.error??d(`hubConfig.name.saveFailed`));return}r(!1),u(d(`hubConfig.name.saved`)),await t()}catch(e){u(d(`hubConfig.name.saveFailedWith`,{error:e instanceof Error?e.message:d(`common.unknownError`)}))}finally{c(!1)}},[i,e?.name,t,d]);return(0,K.jsxs)(`div`,{className:`border-t border-border pt-3 space-y-2`,children:[n?(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(p6,{htmlFor:`agent-name`,className:`text-[10px] text-foreground-subtle`,children:d(`hubConfig.name.label`)}),(0,K.jsx)(kJ,{id:`agent-name`,type:`text`,value:i,onChange:e=>a(e.target.value),placeholder:d(`hubConfig.name.placeholder`)}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsxs)(WJ,{type:`button`,variant:`primary`,size:`sm`,onClick:()=>void f(),disabled:o,children:[(0,K.jsx)(mH,{className:`h-3 w-3`}),d(o?`common.saving`:`common.save`)]}),(0,K.jsx)(WJ,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>r(!1),disabled:o,children:d(`common.cancel`)})]})]}):(0,K.jsx)(WJ,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>r(!0),children:d(`hubConfig.name.rename`)}),l!==null&&(0,K.jsx)(`p`,{className:`text-[11px] text-foreground-subtle`,children:l})]})}function J9({status:e,onStatusRefresh:t}){let{t:n}=L9(),r=Efe(),i=r.view,a=e===null?`unpaired`:O9(e),o=e?.discoveredNodes??[],c=e?.hubAddress??e?.resolvedHubAddress??null,l=o.find(e=>e.isHub),u=l===void 0?null:k9(l,c).replace(/ \(hub\)$/,``),d=i?.state===`paired`||i===null&&e?.paired===!0,f=i?.pending??[],p=H9(f)||gfe(window.location.hostname),m=i===null&&r.error!==null&&r.error.includes(`404`),h=(0,s.useCallback)(async()=>{await r.refresh(),await t().catch(()=>void 0)},[r,t]);return(0,K.jsx)(v6,{headingId:`agent-hub-connection`,title:n(`hubConfig.title`),icon:_H,actions:(0,K.jsx)(Dfe,{connectionState:a}),children:(0,K.jsxs)(`div`,{className:`${f6} space-y-3`,children:[a===`certificate-rejected`&&(0,K.jsx)(B3,{variant:`warning`,title:n(`hubConfig.certRejected.title`),message:n(`hubConfig.certRejected.message`)}),a===`disconnected`&&d&&(0,K.jsx)(B3,{variant:`warning`,title:n(`hubConfig.unreachable.title`),message:n(`hubConfig.unreachable.message`)}),(0,K.jsxs)(`div`,{className:`space-y-0`,children:[(0,K.jsx)(_6,{label:n(`hubConfig.hubAddress`),valueClassName:`font-mono`,children:c??n(`hubConfig.connection.unpaired`)}),(0,K.jsx)(_6,{label:n(`hubConfig.pairing`),children:Ofe(n,i,e?.paired===!0)}),o.length>0&&(0,K.jsx)(_6,{label:n(`hubConfig.clusterNodes`),children:(0,K.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:o.filter(e=>!e.id.includes(`/`)).map(e=>(0,K.jsx)(HJ,{variant:e.isHub?`info`:`default`,className:`text-[9px] font-mono`,title:e.id,children:k9(e,c)},e.id))})})]}),m&&(0,K.jsx)(B3,{variant:`warning`,message:n(`hubConfig.unsupported`)}),!m&&i===null&&r.error!==null&&(0,K.jsx)(B3,{variant:`warning`,title:n(`hubConfig.statusUnavailable`),message:r.error,onRetry:()=>void r.refresh()}),i!==null&&d&&(0,K.jsx)(bfe,{hub:e?.pairedHub??null,hubName:u,onForgotten:h}),i!==null&&!d&&f.length>0&&(0,K.jsx)(Cfe,{pending:f,onChanged:h}),i!==null&&!d&&f.length===0&&(0,K.jsx)(`p`,{className:`text-xs text-foreground-subtle`,children:n(`hubConfig.emptyPairing`)}),i!==null&&!d&&(0,K.jsx)(wfe,{local:p,onReset:h}),(0,K.jsx)(kfe,{status:e,onSaved:t})]})})}function Afe(e,t){switch(t){case`data-root`:return e(`updates.bootMode.dataRoot`);case`baked`:return e(`updates.bootMode.baked`);case`workspace`:return e(`updates.bootMode.workspace`);default:return t}}function Y9({text:e}){return(0,K.jsxs)(`div`,{className:`flex items-start gap-1.5 text-[11px] text-foreground-subtle`,children:[(0,K.jsx)(FV,{className:`h-3 w-3 shrink-0 mt-px`}),(0,K.jsx)(`span`,{children:e})]})}function jfe(e,t,n){return t===`checking`?e(`updates.state.checking`):t===`staging`?e(`updates.state.staging`):t===`pending-restart`?n?e(`updates.state.pendingRestartVersion`,{version:n}):e(`updates.state.pendingRestart`):null}function Mfe({view:e,onCheck:t,onApply:n,checking:r,startError:i}){let[a,o]=(0,s.useState)(!1),{t:c}=L9(),{status:l,lastApply:u,applyInFlight:d,lastCheckError:f}=e,p=jfe(c,l.updateState,l.pendingVersion),m=d||l.updateState===`staging`,h=l.updateState===`pending-restart`;return(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2 flex-wrap`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,K.jsx)(`span`,{className:`text-xs font-mono truncate`,children:l.packageName}),l.updateAvailable&&(0,K.jsx)(HJ,{variant:`warning`,className:`text-[10px]`,children:c(`updates.updateAvailable`)})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(WJ,{type:`button`,variant:`outline`,size:`sm`,onClick:t,disabled:r||m,children:c(r?`updates.checking`:`updates.check`)}),!h&&(0,K.jsxs)(WJ,{type:`button`,variant:a?`danger`:`primary`,size:`sm`,onClick:()=>{if(!a){o(!0);return}o(!1),n()},disabled:m||!l.updateAvailable,children:[(0,K.jsx)(yV,{className:`h-3 w-3`}),a?c(`updates.confirmApply`):l.latestVersion?c(`updates.applyTo`,{version:l.latestVersion}):c(`updates.apply`)]})]})]}),(0,K.jsxs)(`div`,{className:`space-y-0`,children:[(0,K.jsx)(_6,{label:c(`updates.running`),valueClassName:`font-mono`,children:l.runningVersion??`—`}),(0,K.jsx)(_6,{label:c(`updates.published`),valueClassName:`font-mono`,children:l.latestVersion??c(`updates.notChecked`)}),(0,K.jsx)(_6,{label:c(`updates.loadedFrom`),children:Afe(c,l.bootMode)})]}),a&&!m&&(0,K.jsx)(B3,{message:c(`updates.restartWarning`),variant:`warning`}),m&&(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px] text-warning`,children:[(0,K.jsx)(fH,{className:`h-3 w-3 animate-spin`}),p??c(`updates.state.working`)]}),!m&&h&&p&&(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px] text-warning`,children:[(0,K.jsx)(fH,{className:`h-3 w-3 animate-spin`}),p]}),i!==null&&(0,K.jsx)(B3,{message:i}),u!==null&&!u.accepted&&(0,K.jsx)(B3,{message:u.message}),u!==null&&u.accepted&&(0,K.jsx)(Y9,{text:u.message}),f!==null&&(0,K.jsx)(B3,{message:c(`updates.checkFailed`,{error:f})}),(0,K.jsx)(Y9,{text:c(`updates.npmNote`)})]})}function Nfe({locked:e,onUnauthorized:t}){let{t:n}=L9(),[r,i]=(0,s.useState)(null),[a,o]=(0,s.useState)(null),[c,l]=(0,s.useState)(!1),[u,d]=(0,s.useState)(null),f=(0,s.useCallback)(e=>{if(e instanceof N9){t();return}o(e instanceof Error?e.message:z9(`common.unknownError`))},[t]),p=(0,s.useCallback)(async()=>{try{i(await F9(`/api/agent/server-update`)),o(null)}catch(e){f(e)}},[f]);(0,s.useEffect)(()=>{if(e)return;let t=!0,n=()=>{t&&p()};n();let r=setInterval(n,5e3);return()=>{t=!1,clearInterval(r)}},[e,p]);let m=(0,s.useCallback)(async()=>{l(!0);try{await I9(`/api/agent/server-update/check`,{}),await p()}catch(e){o(e instanceof Error?e.message:z9(`updates.checkRequestFailed`))}finally{l(!1)}},[p]),h=(0,s.useRef)(!1);(0,s.useEffect)(()=>{e||h.current||r===null||!r.available||r.status.latestVersion!==null||r.status.updateState!==`idle`||(h.current=!0,m())},[e,r,m]);let g=(0,s.useCallback)(async()=>{d(null);try{let e=await I9(`/api/agent/server-update/apply`,{});!e.started&&e.message!==null&&d(e.message),await p()}catch(e){d(e instanceof Error?e.message:z9(`updates.applyFailed`))}},[p]);return(0,K.jsx)(v6,{headingId:`agent-updates`,title:n(`updates.title`),icon:yV,children:(0,K.jsxs)(`div`,{className:`${f6} space-y-4`,children:[a!==null&&(0,K.jsx)(B3,{message:n(`updates.readFailed`,{error:a})}),r===null&&a===null&&(0,K.jsx)(`div`,{className:`text-[11px] text-foreground-subtle`,children:n(`common.loading`)}),r!==null&&(r.available?(0,K.jsx)(Mfe,{view:r,onCheck:()=>void m(),onApply:()=>void g(),checking:c,startError:u}):(0,K.jsx)(Y9,{text:r.reason}))]})})}function X9(e){let t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60);return t>0?`${t}d ${n}h ${r}m`:n>0?`${n}h ${r}m`:`${r}m`}function Pfe({text:e}){let[t,n]=(0,s.useState)(!1);return(0,K.jsxs)(WJ,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>n(e=>!e),title:e,className:`h-auto py-0.5 px-1.5 text-[10px] text-danger hover:text-danger text-left max-w-[10rem] sm:max-w-[14rem] ${t?`whitespace-normal break-words`:``}`,children:[(0,K.jsx)(BH,{className:`h-3 w-3 shrink-0 mt-px`}),(0,K.jsx)(`span`,{className:t?`break-words`:`truncate`,children:e})]})}function Z9({label:e,value:t,icon:n,tone:r}){return(0,K.jsxs)(V3,{variant:`bordered`,className:`p-3 sm:p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,K.jsx)(n,{className:`h-4 w-4 ${r===`danger`?`text-danger`:r===`primary`?`text-primary`:`text-foreground-subtle`}`}),(0,K.jsx)(`span`,{className:`text-[10px] uppercase tracking-wider text-foreground-subtle font-medium`,children:e})]}),(0,K.jsx)(`div`,{className:`text-xl font-bold text-foreground`,children:t})]})}function Ffe({productVersion:e,serverVersion:t,appVersion:n}){let{t:r}=L9(),i=typeof window<`u`?window.camstackAgentApp:void 0,[a,o]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(!i)return;let e=!0;i.getUpdateState().then(t=>{e&&o(t)});let t=i.onUpdateState(e=>o(e));return()=>{e=!1,t()}},[i]);let c=Jde({productVersion:e??n??i?.version??null,serverVersion:t??null,fallbackVersion:n??i?.version??null}),l=c.kind===`both`?r(`dashboard.version.both`,{product:c.productLabel,server:c.serverVersion}):c.kind===`product`?c.productLabel:c.kind===`server`?r(`dashboard.version.serverOnly`,{version:c.serverVersion}):c.kind===`fallback`?`v${c.version}`:null;return l===null&&!i?null:(0,K.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0 max-w-full flex-wrap justify-end`,children:[l!==null&&(0,K.jsx)(`span`,{"data-testid":`release-identity`,className:`text-[10px] font-mono text-foreground-subtle`,children:l}),i&&a?.downloaded&&(0,K.jsxs)(WJ,{type:`button`,variant:`primary`,size:`sm`,onClick:()=>i.installUpdate(),children:[(0,K.jsx)(yV,{className:`h-3 w-3`}),a.version?r(`dashboard.version.restartToUpdateTo`,{version:a.version}):r(`dashboard.version.restartToUpdate`)]}),i&&a&&!a.downloaded&&a.available&&(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[10px] text-warning`,children:[(0,K.jsx)(fH,{className:`h-3 w-3 animate-spin`}),r(`dashboard.version.downloading`)]}),i&&a&&!a.available&&!a.downloaded&&(0,K.jsx)(WJ,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>void i.checkForUpdates(),disabled:a.checking,children:a.checking?r(`dashboard.version.checking`):r(`dashboard.version.check`)}),i&&a?.error!=null&&!a.checking&&(0,K.jsx)(Pfe,{text:r(`dashboard.version.checkFailed`,{error:a.error})})]})}function Ife({info:e}){let{t}=L9();return(0,K.jsx)(v6,{headingId:`agent-process`,title:t(`dashboard.process.title`),icon:mV,children:(0,K.jsxs)(`div`,{className:`${f6} space-y-0`,children:[(0,K.jsx)(_6,{label:t(`dashboard.process.pid`),valueClassName:`font-mono`,children:e?.pid??`—`}),(0,K.jsx)(_6,{label:t(`dashboard.process.uptime`),valueClassName:`font-mono`,children:e?X9(e.uptimeSeconds):`—`}),(0,K.jsx)(_6,{label:t(`dashboard.process.memory`),valueClassName:`font-mono`,children:e?`${e.rssMB} MB`:`—`}),(0,K.jsx)(_6,{label:t(`dashboard.process.heap`),valueClassName:`font-mono`,children:e?`${e.heapUsedMB} / ${e.heapTotalMB} MB`:`—`})]})})}function Q9({value:e,max:t,tone:n}){let r=t>0?Math.min(100,e/t*100):0;return(0,K.jsx)(`div`,{className:`h-2 bg-surface-hover rounded-full overflow-hidden`,children:(0,K.jsx)(`div`,{className:`h-full rounded-full transition-all ${n===`danger`?`bg-danger`:`bg-primary`}`,style:{width:`${r}%`}})})}function Lfe({status:e}){let{t}=L9(),n=e?.decode?.hwaccel??`—`,r=e?.decode?.driDevice??null,i=e?.detectionDevices??[];return(0,K.jsx)(v6,{headingId:`agent-decode-detection`,title:t(`dashboard.decode.title`),icon:hV,children:(0,K.jsxs)(`div`,{className:`${f6} space-y-0`,children:[(0,K.jsx)(_6,{label:t(`dashboard.decode.hwaccel`),valueClassName:`font-mono`,children:n}),(0,K.jsx)(_6,{label:t(`dashboard.decode.driDevice`),valueClassName:`font-mono`,children:r??`—`}),(0,K.jsx)(_6,{label:t(`dashboard.decode.detectionDevices`),children:i.length>0?(0,K.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:i.map(e=>(0,K.jsx)(HJ,{variant:`info`,className:`text-[10px] font-mono`,children:e},e))}):(0,K.jsx)(`span`,{className:`text-foreground-subtle`,children:t(`dashboard.decode.software`)})})]})})}function Rfe({hubHttpsOrigin:e,nodeId:t}){let[n,r]=(0,s.useState)(e),[i,a]=(0,s.useState)(t),[o,c]=(0,s.useState)(!1),{t:l}=L9();(0,s.useEffect)(()=>{let e=!1;return fetch(`/api/agent/unlock-info`).then(e=>e.ok?e.json():null).then(t=>{e||t===null||(t.paired===!1&&c(!0),typeof t.hubHttpsOrigin==`string`&&r(t.hubHttpsOrigin),typeof t.nodeId==`string`&&a(t.nodeId))}).catch(()=>{}),()=>{e=!0}},[]);let u=e??n,d=t??i,f=(0,s.useCallback)(()=>{if(u===null||d===null)return;let e=`${window.location.origin}/`,t=new URL(`/system/nodes`,u);t.searchParams.set(`unlockNode`,d),t.searchParams.set(`returnTo`,e),window.location.assign(t.toString())},[u,d]);return o?(0,K.jsx)(`div`,{className:`min-h-screen bg-background text-foreground`,children:(0,K.jsx)(`div`,{className:`max-w-4xl mx-auto`,children:(0,K.jsx)(p9,{icon:gH,title:l(`dashboard.defaultName`),subtitle:(0,K.jsx)(`span`,{className:`font-mono`,children:d??`...`}),children:(0,K.jsx)(J9,{status:null,onStatusRefresh:async()=>window.location.reload()})})})}):(0,K.jsx)(`div`,{className:`min-h-screen bg-background text-foreground flex items-center justify-center p-2 sm:p-4`,children:(0,K.jsxs)(V3,{variant:`bordered`,className:`w-full max-w-sm p-6 space-y-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(gH,{className:`h-4 w-4 text-primary`}),(0,K.jsx)(`h1`,{className:`text-sm font-semibold`,children:l(`dashboard.locked.title`)})]}),(0,K.jsx)(`p`,{className:`text-xs text-foreground-subtle`,children:l(`dashboard.locked.body`)}),(0,K.jsx)(WJ,{type:`button`,variant:`primary`,className:`w-full`,disabled:u===null||d===null,onClick:f,children:l(`dashboard.locked.continue`)}),u===null&&(0,K.jsx)(`p`,{className:`text-[11px] text-foreground-subtle`,children:l(`dashboard.locked.hubUnknown`)})]})})}function zfe(){let{t:e}=L9(),[t,n]=(0,s.useState)(null),[r,i]=(0,s.useState)(!1),[a,o]=(0,s.useState)(null),[c,l]=(0,s.useState)(!1),[u,d]=(0,s.useState)(`idle`),f=(0,s.useCallback)(async()=>{n(await F9(`/api/agent/status`)),i(!0),o(null)},[]);(0,s.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=e.get(`ticket`);if(t===null||t.length===0)return;let n=!1;return d(`redeeming`),Yde(t).then(()=>{if(n)return;e.delete(`ticket`);let t=e.toString();window.history.replaceState(null,``,t.length>0?`${window.location.pathname}?${t}`:window.location.pathname),d(`idle`),l(!1)}).catch(()=>{n||(d(`failed`),l(!0))}),()=>{n=!0}},[]),(0,s.useEffect)(()=>{if(c||u===`redeeming`)return;let e=!0,t=async()=>{try{let t=await F9(`/api/agent/status`);e&&(n(t),i(!0),o(null))}catch(t){if(e){if(t instanceof N9){l(!0);return}i(!1),o(t instanceof Error?t.message:z9(`common.unknownError`))}}};t();let r=setInterval(()=>void t(),3e3);return()=>{e=!1,clearInterval(r)}},[c,u]);let p=t?t.totalMemoryMB-t.freeMemoryMB:0,m=t?Math.round(p/t.totalMemoryMB*100):0,h=t?.cpuPercent??0;if(u===`redeeming`)return(0,K.jsx)(`div`,{className:`min-h-screen bg-background text-foreground flex items-center justify-center p-4 text-sm text-foreground-subtle`,children:e(`dashboard.unlocking`)});if(c)return(0,K.jsx)(Rfe,{hubHttpsOrigin:t?.hubHttpsOrigin??null,nodeId:t?.nodeId??null});let g=O9(t),_=!r,v=_||g===`disconnected`||g===`certificate-rejected`?YH:XH,y=_?a??e(`dashboard.unreachable`):e(g===`connected`?`dashboard.hub.connected`:g===`unconfigured`?`dashboard.hub.unconfigured`:g===`unpaired`?`dashboard.hub.unpaired`:g===`certificate-rejected`?`dashboard.hub.certificateRejected`:`dashboard.hub.disconnected`),b=_?`danger`:g===`connected`?`success`:g===`unconfigured`||g===`unpaired`?`warning`:`danger`,ee=(t?.localIps??[]).filter(e=>!e.includes(`:`)).join(`, `)||`—`;return(0,K.jsx)(`div`,{className:`min-h-screen bg-background text-foreground`,children:(0,K.jsx)(`div`,{className:`max-w-4xl mx-auto`,children:(0,K.jsxs)(p9,{icon:gH,title:t?.name??e(`dashboard.defaultName`),subtitle:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:t?.nodeId??`...`}),t?.hostname&&(0,K.jsxs)(`span`,{className:`ml-2`,children:[`· `,t.hostname]}),ee!==`—`&&(0,K.jsxs)(`span`,{className:`ml-2`,children:[`· `,ee]})]}),actions:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Ffe,{productVersion:t?.productVersion,serverVersion:t?.serverVersion,appVersion:t?.appVersion}),(0,K.jsxs)(HJ,{variant:b,className:`inline-flex items-center gap-1.5 shrink-0`,children:[(0,K.jsx)(v,{className:`h-3 w-3`}),(0,K.jsx)(`span`,{className:`max-w-[8rem] sm:max-w-none truncate`,children:y})]})]}),children:[(0,K.jsx)(v6,{headingId:`agent-overview`,title:e(`dashboard.overview.title`),icon:zB,children:(0,K.jsxs)(`div`,{className:`${f6} grid grid-cols-2 md:grid-cols-4 gap-2 sm:gap-4`,children:[(0,K.jsx)(Z9,{icon:hV,label:e(`dashboard.overview.cpu`),value:`${h}%`,tone:h>80?`danger`:`primary`}),(0,K.jsx)(Z9,{icon:KV,label:e(`dashboard.overview.memory`),value:`${m}%`,tone:m>90?`danger`:`primary`}),(0,K.jsx)(Z9,{icon:rH,label:e(`dashboard.overview.addons`),value:String(t?.addons.length??0)}),(0,K.jsx)(Z9,{icon:sV,label:e(`dashboard.overview.uptime`),value:t?X9(t.uptime):`—`})]})}),(0,K.jsx)(J9,{status:t,onStatusRefresh:f}),(0,K.jsx)(lfe,{locked:c,onUnauthorized:()=>l(!0)}),(0,K.jsx)(Nfe,{locked:c,onUnauthorized:()=>l(!0)}),(0,K.jsx)(Lfe,{status:t}),(0,K.jsx)(v6,{headingId:`agent-resources`,title:e(`dashboard.resources.title`),icon:kV,children:(0,K.jsxs)(`div`,{className:`${f6} space-y-4`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`flex justify-between text-xs text-foreground-subtle mb-1`,children:[(0,K.jsx)(`span`,{children:t?.cpuModel?e(`dashboard.resources.cpuCoresModel`,{cores:t.cpuCores??0,model:t.cpuModel}):e(`dashboard.resources.cpuCores`,{cores:t?.cpuCores??0})}),(0,K.jsxs)(`span`,{children:[h,`%`]})]}),(0,K.jsx)(Q9,{value:h,max:100,tone:h>80?`danger`:`primary`})]}),(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`flex justify-between text-xs text-foreground-subtle mb-1`,children:[(0,K.jsx)(`span`,{children:e(`dashboard.resources.memory`,{used:p,total:t?.totalMemoryMB??0})}),(0,K.jsxs)(`span`,{children:[m,`%`]})]}),(0,K.jsx)(Q9,{value:m,max:100,tone:m>90?`danger`:`primary`})]})]})}),(0,K.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-6`,children:[(0,K.jsx)(v6,{headingId:`agent-system-host`,title:e(`dashboard.host.title`),icon:gH,children:(0,K.jsxs)(`div`,{className:`${f6} space-y-0`,children:[(0,K.jsxs)(_6,{label:e(`dashboard.host.platform`),valueClassName:`font-mono`,children:[t?.platform,` / `,t?.arch]}),(0,K.jsx)(_6,{label:e(`dashboard.host.hostname`),valueClassName:`font-mono`,children:t?.hostname??`—`}),(0,K.jsx)(_6,{label:e(`dashboard.host.uptime`),valueClassName:`font-mono`,children:t?X9(t.uptime):`—`}),(0,K.jsx)(_6,{label:e(`dashboard.host.memory`),valueClassName:`font-mono`,children:t?`${p} / ${t.totalMemoryMB} MB`:`—`}),(0,K.jsx)(_6,{label:e(`dashboard.host.ipv4`),valueClassName:`font-mono`,children:ee})]})}),(0,K.jsx)(Ife,{info:t?.agentProcess})]})]})})})}$de();var $9=document.getElementById(`root`);$9&&(0,UQ.createRoot)($9).render((0,K.jsx)(Qde,{children:(0,K.jsx)(zfe,{})}));export{ZB as C,SV as S,zH as _,Ioe as a,JV as b,noe as c,L3 as d,R3 as f,OK as g,qJ as h,Aoe as i,Iae as l,QQ as m,y6 as n,Noe as o,$Q as p,Poe as r,b6 as s,Pde as t,jae as u,jH as v,G as w,NV as x,pH as y};
|
|
112
|
+
`;function x7({trpc:e,deviceId:n,layout:r,optimistic:i}){let a=t(),{cap:o,slice:s,available:c}=z3({trpc:e,deviceId:n,cap:e=>e.climateControl,slice:e=>e.state.climateControl}),{display:l,applyOptimistic:u}=Z8(s,{enabled:i??!0});if(o===void 0||l===void 0)return null;let d=!c;if(r===`compact`)return(0,K.jsxs)(`div`,{"data-mode":l.mode,className:`inline-flex items-center gap-1`,children:[(0,K.jsx)(`span`,{className:Z(`text-xs tabular-nums font-medium`,a5[l.mode]),children:l.target===null?l.currentTemp===null?null:(0,K.jsxs)(`span`,{className:`text-foreground-subtle`,children:[l.currentTemp,`°`]}):(0,K.jsxs)(K.Fragment,{children:[l.target,`°`,l.currentTemp!==null&&(0,K.jsxs)(`span`,{className:`text-foreground-subtle font-normal`,children:[` `,`(`,l.currentTemp,`°)`]})]})}),l.target!==null&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":a(`uiLibrary.acPanel.decrease`,`Decrease target`),disabled:d,onClick:e=>{if(e.stopPropagation(),!d&&l.target!==null){let e=r5(l.target,-1,l);u({target:e}),o.setTarget({target:e})}},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors text-xs`,d&&`opacity-40 cursor-not-allowed`),children:`−`}),(0,K.jsx)(`button`,{type:`button`,"aria-label":a(`uiLibrary.acPanel.increase`,`Increase target`),disabled:d,onClick:e=>{if(e.stopPropagation(),!d&&l.target!==null){let e=r5(l.target,1,l);u({target:e}),o.setTarget({target:e})}},className:Z(`inline-flex h-5 w-5 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors text-xs`,d&&`opacity-40 cursor-not-allowed`),children:`+`})]}),(0,K.jsx)(`select`,{"aria-label":a(`uiLibrary.acPanel.mode`,`Mode`),value:l.mode,disabled:d,onChange:e=>{e.stopPropagation();let t=l.availableModes.find(t=>t===e.target.value);!d&&t&&(u({mode:t}),o.setMode({mode:t}))},className:Z(`bg-transparent px-0.5 text-xs text-foreground-subtle hover:text-foreground cursor-pointer`,d&&`opacity-40 cursor-not-allowed`),children:l.availableModes.map(e=>(0,K.jsx)(`option`,{value:e,children:y7(a,e)},e))})]});let f=mue[l.mode],p=l.mode!==`off`,m=!uue(l.availableModes),h=due(l),g=hue(l.preset),_=l.preset===`turbo`,v=Math.max(.55,gue(l.fanMode)*(_?.6:1)),y=l.swingVertical!==null,b=l.swingHorizontal!==null,ee=p&&(l.swingVertical===!0||l.swingHorizontal===!0);return(0,K.jsxs)(`div`,{"data-mode":l.mode,className:Z(`relative flex flex-col items-stretch gap-2.5 overflow-hidden rounded-lg border p-3 transition-colors`,i5[l.mode]),children:[(0,K.jsx)(`style`,{children:_ue}),(0,K.jsxs)(`div`,{className:`relative z-10 flex flex-col items-center justify-center gap-1 overflow-hidden rounded-lg border border-border/50 bg-surface/30 px-3 py-3`,children:[(0,K.jsx)(`div`,{className:`pointer-events-none absolute inset-0 opacity-60`,children:m&&!p?(0,K.jsx)(xue,{}):(0,K.jsx)(bue,{mode:l.mode,accent:f,periodSec:v,swaying:ee,forceRising:m})}),(0,K.jsx)(`div`,{className:`pointer-events-none absolute inset-0 bg-gradient-to-b from-surface/50 via-transparent to-surface/50`}),p&&(0,K.jsx)(`span`,{"aria-hidden":!0,className:`acv-glow pointer-events-none absolute left-1/2 top-1/2 h-16 w-16 -translate-x-1/2 -translate-y-1/2 rounded-full blur-2xl`,style:{background:f,animation:`acv-glow 3.2s ease-in-out infinite`}}),(0,K.jsxs)(`div`,{className:`relative z-10 flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wide`,style:{color:f},children:[(0,K.jsx)(S7,{mode:l.mode,heatingOnly:m,className:`h-3.5 w-3.5`}),y7(a,l.mode),l.currentTemp!==null&&(0,K.jsx)(`span`,{className:`normal-case text-foreground-subtle`,children:a(`uiLibrary.acPanel.now`,`· {{temp}}° now`,{temp:l.currentTemp})}),l.currentHumidity!==null&&(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 normal-case text-foreground-subtle`,children:[(0,K.jsx)(xV,{className:`h-3 w-3`}),l.currentHumidity,`%`]})]}),l.target===null?(0,K.jsxs)(`div`,{className:`relative z-10 flex items-baseline gap-0.5`,children:[(0,K.jsx)(`span`,{className:Z(`text-4xl font-bold leading-none tabular-nums text-foreground`,n5(l)),children:l.currentTemp??`—`}),(0,K.jsx)(`span`,{className:`text-lg text-foreground-subtle`,children:`°`})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`relative z-10 flex items-center gap-3`,children:[(0,K.jsx)(w7,{label:a(`uiLibrary.acPanel.decrease`,`Decrease target`),symbol:`−`,disabled:d,onClick:()=>{if(d||l.target===null)return;let e=r5(l.target,-1,l);u({target:e}),o.setTarget({target:e})}}),(0,K.jsxs)(`div`,{className:`flex items-baseline gap-0.5`,children:[(0,K.jsx)(`span`,{className:Z(`text-4xl font-bold leading-none tabular-nums`,n5(l)),style:{color:f},children:l.target}),(0,K.jsx)(`span`,{className:`text-lg text-foreground-subtle`,children:`°`})]}),(0,K.jsx)(w7,{label:a(`uiLibrary.acPanel.increase`,`Increase target`),symbol:`+`,disabled:d,onClick:()=>{if(d||l.target===null)return;let e=r5(l.target,1,l);u({target:e}),o.setTarget({target:e})}})]}),h!==null&&(0,K.jsx)(`div`,{className:`relative z-10 w-full px-1`,children:(0,K.jsx)(yue,{value:l.target,min:h.min,max:h.max,step:l.tempStep,accent:f,disabled:d,label:a(`uiLibrary.acPanel.setpoint`,`Setpoint`),onPreview:e=>{u({target:e})},onCommit:e=>{u({target:e}),o.setTarget({target:e})}})})]})]}),(0,K.jsxs)(`div`,{className:`relative z-10 grid grid-cols-3 gap-2`,children:[(0,K.jsx)(C7,{label:a(`uiLibrary.acPanel.mode`,`Mode`),icon:(0,K.jsx)(`span`,{style:{color:f},className:`flex`,children:(0,K.jsx)(S7,{mode:l.mode,heatingOnly:m,className:`h-4 w-4`})}),value:l.mode,options:l.availableModes.map(e=>({value:e,label:y7(a,e)})),disabled:d,onChange:e=>{let t=l.availableModes.find(t=>t===e);t&&(u({mode:t}),o.setMode({mode:t}))}}),l.availableFanModes.length>0&&(0,K.jsx)(C7,{label:a(`uiLibrary.acPanel.fan`,`Fan`),icon:(0,K.jsx)(ZH,{className:`h-4 w-4 text-sky-500`}),value:l.fanMode,options:l.availableFanModes.map(e=>({value:e,label:b7(e)})),disabled:d,onChange:e=>{u({fanMode:e}),o.setFanMode({fanMode:e})}}),l.availablePresets.length>0&&(0,K.jsx)(C7,{label:a(`uiLibrary.acPanel.preset`,`Preset`),icon:(0,K.jsx)(g,{className:`h-4 w-4 text-emerald-500`}),value:l.preset,options:l.availablePresets.map(e=>({value:e,label:b7(e)})),disabled:d,onChange:e=>{u({preset:e}),o.setPreset({preset:e})}})]}),(y||b)&&(0,K.jsx)(vue,{label:a(`uiLibrary.acPanel.swing`,`Swing`),children:(0,K.jsxs)(`div`,{className:`grid grid-cols-2 gap-1`,children:[y&&(0,K.jsx)(T7,{axis:`vertical`,on:l.swingVertical??!1,busy:d,onToggle:e=>{u({swingVertical:e}),o.setSwingVertical({on:e})}}),b&&(0,K.jsx)(T7,{axis:`horizontal`,on:l.swingHorizontal??!1,busy:d,onToggle:e=>{u({swingHorizontal:e}),o.setSwingHorizontal({on:e})}})]})})]})}function vue({label:e,children:t}){return(0,K.jsxs)(`div`,{className:`relative z-10 flex flex-col gap-1`,children:[(0,K.jsx)(`span`,{className:`text-[10px] font-semibold uppercase tracking-wider text-foreground-subtle`,children:e}),t]})}function S7({mode:e,heatingOnly:t=!1,className:n}){return(0,K.jsx)(t&&e===`heat`?jV:pue[e],{className:n,"aria-hidden":!0})}function C7({label:e,icon:t,value:n,options:r,disabled:i,onChange:a}){return(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,K.jsx)(`span`,{className:`text-[10px] font-semibold uppercase tracking-wider text-foreground-subtle`,children:e}),(0,K.jsxs)(`div`,{className:Z(`flex items-center gap-1 overflow-hidden rounded-lg border border-border/60 bg-surface-subtle px-1.5 py-1.5 has-[:focus-visible]:border-primary`,i&&`opacity-40`),children:[(0,K.jsx)(`span`,{className:`flex shrink-0`,children:t}),(0,K.jsx)(`select`,{"aria-label":e,value:n,disabled:i,onChange:e=>{e.stopPropagation(),i||a(e.target.value)},className:`min-w-0 flex-1 cursor-pointer appearance-none truncate bg-transparent text-xs font-medium text-foreground outline-none`,children:r.map(e=>(0,K.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,K.jsx)($B,{className:`h-3 w-3 shrink-0 text-foreground-subtle`})]})]})}function w7({label:e,symbol:t,disabled:n,onClick:r}){return(0,K.jsx)(`button`,{type:`button`,"aria-label":e,disabled:n,onClick:r,className:Z(`flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-border bg-surface text-lg leading-none text-foreground-subtle transition-colors hover:bg-surface-hover hover:text-foreground active:scale-95`,n&&`opacity-40 cursor-not-allowed`),children:t})}function yue({value:e,min:t,max:n,step:r,accent:i,disabled:a,label:o,onPreview:c,onCommit:l}){let u=(0,s.useRef)(null),d=(0,s.useRef)(!1),[f,p]=(0,s.useState)(null),m=f??e,h=`${Math.min(1,Math.max(0,(m-t)/(n-t)))*100}%`,g=i=>{let a=u.current;if(a===null)return e;let o=a.getBoundingClientRect();return o.width<=0?e:fue((i-o.left)/o.width,{min:t,max:n},r)},_=e=>{if(a)return;e.stopPropagation(),e.preventDefault(),d.current=!0,typeof e.currentTarget.setPointerCapture==`function`&&e.currentTarget.setPointerCapture(e.pointerId);let t=g(e.clientX);p(t),c(t)},v=e=>{if(a||!d.current)return;e.stopPropagation();let t=g(e.clientX);p(t),c(t)},y=e=>{if(!d.current)return;e.stopPropagation(),d.current=!1;let t=g(e.clientX);p(null),e.currentTarget.hasPointerCapture?.(e.pointerId)===!0&&e.currentTarget.releasePointerCapture(e.pointerId),l(t)};return(0,K.jsxs)(`div`,{ref:u,role:`slider`,"aria-label":o,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":m,"aria-disabled":a,tabIndex:a?-1:0,onPointerDown:_,onPointerMove:v,onPointerUp:y,onPointerCancel:y,onKeyDown:i=>{if(a)return;let o=f??e;i.key===`ArrowRight`||i.key===`ArrowUp`?(i.preventDefault(),l(r5(o,1,{tempStep:r,minTemp:t,maxTemp:n}))):i.key===`ArrowLeft`||i.key===`ArrowDown`?(i.preventDefault(),l(r5(o,-1,{tempStep:r,minTemp:t,maxTemp:n}))):i.key===`Home`?(i.preventDefault(),l(t)):i.key===`End`&&(i.preventDefault(),l(n))},className:Z(`mt-1 w-full touch-none select-none py-2`,a?`cursor-not-allowed opacity-40`:`cursor-ew-resize`),children:[(0,K.jsxs)(`div`,{className:`relative h-1.5 w-full rounded-full bg-surface-subtle`,children:[(0,K.jsx)(`div`,{className:`absolute inset-y-0 left-0 rounded-full`,style:{width:h,background:i}}),(0,K.jsx)(`div`,{className:`absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-surface shadow`,style:{left:h,background:i}})]}),(0,K.jsxs)(`div`,{className:`mt-0.5 flex justify-between text-[9px] tabular-nums text-foreground-subtle`,children:[(0,K.jsxs)(`span`,{children:[t,`°`]}),(0,K.jsxs)(`span`,{children:[n,`°`]})]})]})}function bue({mode:e,accent:t,periodSec:n,swaying:r,forceRising:i=!1}){let a=[0,1,2,3,4,5],o=i||e===`heat`,s=e===`dry`;return(0,K.jsx)(`div`,{"aria-hidden":!0,className:`absolute inset-0 overflow-hidden`,children:e===`off`?(0,K.jsx)(`div`,{className:`flex h-full items-center justify-center gap-2 opacity-30`,children:a.map(e=>(0,K.jsx)(`span`,{className:`h-8 w-1 rounded-full bg-foreground-subtle opacity-40`},e))}):e===`fan_only`?(0,K.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,K.jsx)(Sue,{color:t,periodSec:Math.max(.5,n*.7),size:56})}):(0,K.jsx)(`div`,{"data-testid":i?`climate-heat-rise`:void 0,className:Z(`acv-sway-wrap absolute inset-0`,r&&`acv-sway`),style:r?{animation:`acv-sway 2.6s ease-in-out infinite`}:void 0,children:a.map(e=>(0,K.jsx)(`span`,{className:`acv-streak absolute rounded-full`,style:{left:`${8+e*15}%`,width:s?`0.4rem`:`0.3rem`,height:s?`0.4rem`:`1.9rem`,background:t,boxShadow:`0 0 6px ${t}`,animationName:o?`acv-rise`:`acv-fall`,animationTimingFunction:`linear`,animationIterationCount:`infinite`,animationDuration:`${n}s`,animationDelay:`${e%3*(n/3)+e*.05}s`}},e))})})}function xue(){return(0,K.jsx)(`div`,{"data-testid":`climate-radiator`,"aria-hidden":!0,className:`flex h-full items-end justify-center gap-1.5 px-8 pb-3 opacity-40`,children:[0,1,2,3,4,5,6].map(e=>(0,K.jsx)(`span`,{className:`h-10 w-1.5 rounded-t-full bg-foreground-subtle`},e))})}function Sue({color:e,periodSec:t,size:n}){return(0,K.jsxs)(`svg`,{width:n,height:n,viewBox:`0 0 100 100`,className:`acv-fan`,style:{animation:`acv-spin ${t}s linear infinite`,transformOrigin:`50% 50%`},"aria-hidden":!0,children:[[0,120,240].map(t=>(0,K.jsx)(`path`,{d:`M50 50 C 58 30, 78 26, 84 12 C 66 20, 54 34, 50 50 Z`,fill:e,opacity:.85,transform:`rotate(${t} 50 50)`},t)),(0,K.jsx)(`circle`,{cx:`50`,cy:`50`,r:`7`,fill:e})]})}function T7({axis:e,on:n,busy:r,onToggle:i}){let a=t(),o=e===`vertical`?a(`uiLibrary.acPanel.vertical`,`Vertical`):a(`uiLibrary.acPanel.horizontal`,`Horizontal`),s=e===`vertical`?$V:QV,c=e===`vertical`?`acv-swing-v`:`acv-swing-h`;return(0,K.jsxs)(`button`,{type:`button`,"aria-label":a(`uiLibrary.acPanel.swingAxis`,`{{axis}} swing`,{axis:o}),"aria-pressed":n,disabled:r,onClick:()=>{r||i(!n)},className:Z(`flex items-center justify-center gap-2 rounded-lg border px-2 py-1.5 text-xs font-medium transition-colors`,n?`border-transparent bg-indigo-400 text-indigo-950 shadow-sm`:`border-border/60 bg-surface-subtle text-foreground-subtle hover:bg-surface-hover hover:text-foreground`,r&&`opacity-40 cursor-not-allowed`),children:[(0,K.jsx)(s,{className:`acv-swing h-4 w-4`,"aria-hidden":!0,style:n?{animation:`${c} 1.4s ease-in-out infinite`}:void 0}),o]})}var Cue=5,wue=35;function E7(e,t,n){return n<=t?0:Math.min(1,Math.max(0,(e-t)/(n-t)))}function D7(e,t,n){return Math.round(t+e*(n-t))}var O7=176,k7=76,A7=2*Math.PI*k7,j7=270/360*A7,M7=O7/2-k7-10;function N7(e){let t=O7/2,n=O7/2,r=A7-j7,i=e.mode===`band`?(()=>{let t=e.band.from*j7,n=Math.max(0,(e.band.to-e.band.from)*j7);return{dasharray:`${n} ${A7-n}`,dashoffset:-t}})():(()=>{let t=e.fraction*j7;return{dasharray:`${t} ${A7-t}`,dashoffset:void 0}})();return(0,K.jsxs)(`svg`,{width:O7,height:O7,viewBox:`0 0 ${O7} ${O7}`,"aria-hidden":`true`,className:`absolute inset-0`,style:{transform:`rotate(135deg)`},children:[(0,K.jsx)(`circle`,{cx:t,cy:n,r:k7,fill:`none`,stroke:`var(--color-border)`,strokeWidth:12,strokeDasharray:`${j7} ${r}`,strokeLinecap:`round`}),(0,K.jsx)(`circle`,{cx:t,cy:n,r:k7,fill:`none`,stroke:e.color,strokeWidth:12,strokeDasharray:i.dasharray,...i.dashoffset===void 0?{}:{strokeDashoffset:i.dashoffset},strokeLinecap:`round`})]})}var Tue={heat:`#f59e0b`,cool:`#60a5fa`,auto:`#c084fc`,heat_cool:`#e879f9`,fan_only:`#94a3b8`,dry:`#22d3ee`,off:`#d4d4d8`};function Eue({trpc:e,deviceId:n,features:r,optimistic:i}){let a=t(),o=z3({trpc:e,deviceId:n,cap:e=>e.climateControl,slice:e=>e.state.climateControl}),s=z3({trpc:e,deviceId:n,cap:e=>e.heatingValve,slice:e=>e.state.heatingValve}),{display:c,applyOptimistic:l}=Z8(o.slice,{enabled:i??!0}),u=o.cap!==void 0&&c!==void 0,d=s.cap!==void 0;if(!u&&!d)return null;if(!u&&d)return(0,K.jsx)(`div`,{className:`flex flex-col items-stretch gap-3 rounded-lg border border-border bg-surface p-4`,children:(0,K.jsx)(v7,{trpc:e,deviceId:n,layout:`full`})});if(o.cap===void 0||c===void 0)return null;let f=o.cap,p=!o.available,m=Tue[c.mode],h=c.mode===`heat_cool`||c.targetLow!==null&&c.targetHigh!==null,g=Cue,_=wue,v=!h&&c.target!==null?E7(c.target,g,_):0,y=h&&c.targetLow!==null?E7(c.targetLow,g,_):0,b=h&&c.targetHigh!==null?E7(c.targetHigh,g,_):0;return(0,K.jsxs)(`div`,{"data-mode":c.mode,className:Z(`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-4 transition-colors`,i5[c.mode]),children:[(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,K.jsxs)(`div`,{className:`relative`,style:{width:O7,height:O7},children:[h?(0,K.jsx)(N7,{mode:`band`,band:{from:y,to:b},color:m}):(0,K.jsx)(N7,{mode:`fill`,fraction:v,color:m}),h?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{"data-testid":`arc-knob`,children:(0,K.jsx)(H8,{fraction:y,color:m,knobTopPx:M7,onDragFraction:e=>{if(p||c.targetHigh===null)return;let t=Math.min(D7(e,g,_),c.targetHigh);l({targetLow:t}),f.setTargetRange({targetLow:t,targetHigh:c.targetHigh})}})}),(0,K.jsx)(`div`,{"data-testid":`arc-knob`,children:(0,K.jsx)(H8,{fraction:b,color:m,knobTopPx:M7,onDragFraction:e=>{if(p||c.targetLow===null)return;let t=Math.max(D7(e,g,_),c.targetLow);l({targetHigh:t}),f.setTargetRange({targetLow:c.targetLow,targetHigh:t})}})})]}):(0,K.jsx)(`div`,{"data-testid":`arc-knob`,children:(0,K.jsx)(H8,{fraction:v,color:m,knobTopPx:M7,onDragFraction:e=>{if(p)return;let t=D7(e,g,_);l({target:t}),f.setTarget({target:t})}})}),(0,K.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-0.5 pointer-events-none`,children:[(0,K.jsxs)(`div`,{"data-testid":`current-temp`,className:`text-4xl font-bold tabular-nums text-foreground leading-none`,children:[c.currentTemp===null?`—`:c.currentTemp,(0,K.jsx)(`span`,{className:`text-lg text-foreground-subtle font-normal ml-0.5`,children:`°`})]}),!h&&c.target!==null&&(0,K.jsx)(`div`,{className:`text-xs font-semibold`,style:{color:m},children:a(`uiLibrary.thermostatHeroCard.setTo`,`set {{value}}°`,{value:c.target})}),h&&c.targetLow!==null&&c.targetHigh!==null&&(0,K.jsxs)(`div`,{className:`text-xs font-semibold`,style:{color:m},children:[c.targetLow,`° – `,c.targetHigh,`°`]})]})]}),!h&&c.target!==null&&(0,K.jsx)(`div`,{className:`w-[200px]`,children:(0,K.jsx)(B8,{value:`${c.target}°`,onDelta:e=>{if(p||c.target===null)return;let t=c.target+e;l({target:t}),f.setTarget({target:t})}})})]}),d?(0,K.jsx)(v7,{trpc:e,deviceId:n,layout:`full`}):null,(0,K.jsx)(`select`,{"aria-label":a(`uiLibrary.thermostatHeroCard.mode`,`Mode`),value:c.mode,disabled:p,onChange:e=>{e.stopPropagation();let t=e.target.value;!p&&t&&(l({mode:c.availableModes.find(e=>e===t)??c.mode}),f.setMode({mode:c.availableModes.find(e=>e===t)??c.mode}))},className:Z(`w-full rounded border border-border bg-surface px-3 py-1.5 text-sm`,p&&`opacity-40 cursor-not-allowed`),children:c.availableModes.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))})]})}function Due(e){return e===`locked`||e===`locking`}function P7(e){return e===`jammed`}var F7={locked:{colorClass:`border-success/30 bg-success/10 text-success`,icon:`locked`},locking:{colorClass:`border-success/30 bg-success/10 text-success`,icon:`locked`},unlocked:{colorClass:`border-warning/30 bg-warning/10 text-warning`,icon:`open`},unlocking:{colorClass:`border-warning/30 bg-warning/10 text-warning`,icon:`open`},jammed:{colorClass:`border-danger/30 bg-danger/10 text-danger`,icon:`locked`}};function Oue({state:e}){let t=F7[e];return(0,K.jsx)(`div`,{"data-testid":`lock-glyph`,"data-state":e,className:Z(`flex h-16 w-16 items-center justify-center rounded-full border-2`,t.colorClass),children:t.icon===`locked`?(0,K.jsx)(HV,{className:`h-8 w-8`,"aria-hidden":`true`}):(0,K.jsx)(VV,{className:`h-8 w-8`,"aria-hidden":`true`})})}function kue({state:e}){return(0,K.jsx)(`span`,{className:Z(`text-sm font-medium capitalize`,P7(e)?`text-danger`:`text-foreground-muted`),children:e})}function Aue({busy:e,onOpen:n}){let r=t();return(0,K.jsxs)(`button`,{type:`button`,"aria-label":r(`uiLibrary.lockHeroCard.openUnlatch`,`Open (unlatch)`),title:r(`uiLibrary.lockHeroCard.openUnlatch`,`Open (unlatch)`),disabled:e,onClick:e=>{e.stopPropagation(),n()},className:Z(`inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs font-medium`,`text-foreground-muted hover:bg-surface-hover transition-colors`,e&&`opacity-40 cursor-not-allowed`),children:[(0,K.jsx)(vV,{className:`h-3.5 w-3.5`,"aria-hidden":`true`}),r(`uiLibrary.lockHeroCard.open`,`Open`)]})}function jue({trpc:e,deviceId:t,features:n,optimistic:r}){let{cap:i,slice:a,available:o}=z3({trpc:e,deviceId:t,cap:e=>e.lockControl,slice:e=>e.state.lockControl}),{display:s,applyOptimistic:c}=Z8(a,{enabled:r??!0});if(i===void 0||s===void 0||!(s.state in F7))return null;let l=Due(s.state),u=P7(s.state)||!o,d=n?.includes(Sc.LockOpen)===!0,f=()=>{u||(l?(c({state:`unlocking`}),i.unlock({})):(c({state:`locking`}),i.lock({})))},p=()=>{u||i.open({})},m=l?`Unlock`:`Lock`;return(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,K.jsx)(Oue,{state:s.state}),(0,K.jsx)(kue,{state:s.state})]}),(0,K.jsx)(`div`,{className:Z(u&&`pointer-events-none opacity-40`),children:(0,K.jsx)(ice,{on:l,targetLabel:m,onConfirm:f})}),d&&(0,K.jsx)(`div`,{className:`flex justify-center`,children:(0,K.jsx)(Aue,{busy:u,onOpen:p})})]})}var I7=500,L7=150,Mue=`linear-gradient(90deg, #9ec9ff, #ffffff, #ffb24d)`;function Nue(e,t,n){return n<=t?0:Math.min(1,Math.max(0,(e-t)/(n-t)))}function Pue(e){return Nue(e,L7,I7)}var Fue=`#f4b740`,Iue=`#d4d4d8`;function Lue({trpc:e,deviceId:n,features:r,optimistic:i}){let a=t(),o=z3({trpc:e,deviceId:n,cap:e=>e.switch,slice:e=>e.state.switch}),s=z3({trpc:e,deviceId:n,cap:e=>e.brightness,slice:e=>e.state.brightness}),c=z3({trpc:e,deviceId:n,cap:e=>e.color,slice:e=>e.state.color}),l=Z8(o.slice,{enabled:i??!0}),u=Z8(s.slice,{enabled:i??!0}),d=Z8(c.slice,{enabled:i??!0});if(o.cap===void 0||l.display===void 0)return null;let f=l.display.on===!0,p=!o.available,m=u.display?.level??0,h=!s.available,g=f?m/100:0,_=f?Fue:Iue,v=(r?.includes(Sc.LightColorMired)??!1)&&c.cap!==void 0,y=d.display?.colorTemperature,b=!c.available;return(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,K.jsxs)(J8,{fraction:g,color:_,children:[(0,K.jsxs)(`div`,{"data-testid":`brightness-readout`,className:`text-3xl font-bold tabular-nums text-foreground leading-none`,children:[m,(0,K.jsx)(`span`,{className:`text-base text-foreground-subtle font-normal ml-0.5`,children:`%`})]}),(0,K.jsx)(LV,{className:`h-5 w-5 text-foreground-subtle`,"aria-hidden":`true`})]}),s.cap!==void 0&&(0,K.jsxs)(`label`,{className:`flex w-full items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{className:`w-16`,children:a(`uiLibrary.lightHeroCard.brightness`,`Brightness`)}),(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.lightHeroCard.brightness`,`Brightness`),type:`range`,min:0,max:100,step:1,className:`flex-1`,value:m,disabled:h||!f,onChange:e=>{let t=Number(e.target.value);u.applyOptimistic({level:t}),h||s.cap?.setBrightness({level:t})}}),(0,K.jsxs)(`span`,{className:`tabular-nums w-9 text-right`,children:[m,`%`]})]})]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium text-foreground-muted`,children:f?a(`uiLibrary.lightHeroCard.on`,`On`):a(`uiLibrary.lightHeroCard.off`,`Off`)}),(0,K.jsx)(Y8,{on:f,busy:p,onToggle:()=>{if(p)return;let e=!f;l.applyOptimistic({on:e}),o.cap?.setState({on:e})}})]}),v&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,"data-testid":`color-temp-strip`,children:[(0,K.jsx)(FH,{className:`h-4 w-4 text-foreground-subtle`,"aria-hidden":`true`}),(0,K.jsxs)(`label`,{className:`flex-1`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:a(`uiLibrary.lightHeroCard.colourTemperature`,`Colour temperature`)}),(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.lightHeroCard.colourTemperature`,`Colour temperature`),type:`range`,min:L7,max:I7,step:1,className:`w-full`,value:y??I7,disabled:b||!f,onChange:e=>{let t=Number(e.target.value);d.applyOptimistic({mode:`mired`,colorTemperature:t}),b||c.cap?.setColor({color:{mode:`mired`,colorTemperature:t}})}}),(0,K.jsx)(`div`,{className:`pointer-events-none mt-1`,children:(0,K.jsx)(U8,{fraction:y===void 0?.5:Pue(y),color:Mue})})]})]})]})}var Rue=`#3aa6a0`,zue=`#d4d4d8`;function Bue({trpc:e,deviceId:n,features:r,optimistic:i}){let a=t(),o=z3({trpc:e,deviceId:n,cap:e=>e.switch,slice:e=>e.state.switch}),s=z3({trpc:e,deviceId:n,cap:e=>e.fanControl,slice:e=>e.state.fanControl}),c=Z8(o.slice,{enabled:i??!0}),l=Z8(s.slice,{enabled:i??!0});if(o.cap===void 0||c.display===void 0)return null;let u=c.display.on===!0,d=!o.available,f=l.display?.speed??0,p=!s.available,m=u?f/100:0,h=u?Rue:zue,g=r?.includes(Sc.FanSpeed)??!1,_=(r?.includes(Sc.FanOscillating)??!1)&&s.cap!==void 0,v=l.display?.availablePresets??[],y=(r?.includes(Sc.FanPreset)??!1)&&s.cap!==void 0&&v.length>0,b=l.display?.preset??``,ee=l.display?.oscillating===!0,te=()=>{if(d)return;let e=!u;c.applyOptimistic({on:e}),o.cap?.setState({on:e})},ne=()=>{if(p)return;let e=!ee;l.applyOptimistic({oscillating:e}),s.cap?.setOscillating({oscillating:e})},x=e=>{if(p)return;let t=l.display;if(t===void 0)return;let n=t.percentageStep!==void 0&&t.percentageStep>0?t.percentageStep:1,r=Math.min(100,Math.max(0,Math.round(e*100/n)*n));l.applyOptimistic({speed:r}),s.cap?.setPercentage({speed:r})},S=e=>{p||e===``||(l.applyOptimistic({preset:e}),s.cap?.setPreset({preset:e}))};return(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-4`,children:[(0,K.jsx)(`div`,{className:`flex flex-col items-center gap-3`,children:g?(0,K.jsxs)(J8,{fraction:m,color:h,onDragFraction:x,children:[(0,K.jsxs)(`div`,{"data-testid":`speed-readout`,className:`text-3xl font-bold tabular-nums text-foreground leading-none`,children:[f,(0,K.jsx)(`span`,{className:`text-base text-foreground-subtle font-normal ml-0.5`,children:`%`})]}),(0,K.jsx)(wV,{className:`h-5 w-5 text-foreground-subtle`,"aria-hidden":`true`})]}):(0,K.jsx)(`div`,{"data-testid":`fan-onoff-icon`,className:`flex h-[150px] w-[150px] items-center justify-center`,children:(0,K.jsx)(wV,{className:`h-16 w-16`,style:{color:h},"aria-hidden":`true`})})}),y&&(0,K.jsx)(`div`,{className:`flex justify-center`,children:(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:a(`uiLibrary.fanHeroCard.preset`,`Preset`)}),(0,K.jsxs)(`select`,{"aria-label":a(`uiLibrary.fanHeroCard.fanPreset`,`Fan preset`),value:b,disabled:p,onChange:e=>{e.stopPropagation(),S(e.target.value)},className:Z(`bg-surface border border-border rounded px-1 py-0.5`,p&&`opacity-40 cursor-not-allowed`),children:[(0,K.jsx)(`option`,{value:``,disabled:!0,children:`—`}),v.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))]})]})}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[_?(0,K.jsxs)(`button`,{type:`button`,"aria-label":a(`uiLibrary.fanHeroCard.oscillate`,`Oscillate`),"aria-pressed":ee,disabled:p,onClick:e=>{e.stopPropagation(),ne()},className:Z(`inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs font-medium transition-colors`,ee?`border-success/50 bg-success/10 text-success`:`border-border text-foreground-muted hover:bg-surface-hover`,p&&`opacity-40 cursor-not-allowed`),children:[(0,K.jsx)(fH,{className:`h-3.5 w-3.5`,"aria-hidden":`true`}),a(`uiLibrary.fanHeroCard.oscillate`,`Oscillate`)]}):(0,K.jsx)(`span`,{className:`text-sm font-medium text-foreground-muted`,children:u?a(`uiLibrary.fanHeroCard.on`,`On`):a(`uiLibrary.fanHeroCard.off`,`Off`)}),(0,K.jsx)(Y8,{on:u,busy:d,onToggle:te})]})]})}function Vue({trpc:e,deviceId:n,optimistic:r}){let i=t(),{cap:a,slice:o,available:s}=z3({trpc:e,deviceId:n,cap:e=>e.switch,slice:e=>e.state.switch}),{display:c,applyOptimistic:l}=Z8(o,{enabled:r??!0});if(a===void 0||c===void 0)return null;let u=c.on===!0,d=!s;return(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-4 rounded-lg border border-border bg-surface p-6`,children:[(0,K.jsx)(`div`,{"data-testid":`switch-glyph`,"data-state":u?`on`:`off`,className:Z(`flex h-16 w-16 items-center justify-center rounded-full border-2 transition-colors`,u?`border-success/30 bg-success/10 text-success`:`border-border bg-surface-subtle text-foreground-subtle`),children:(0,K.jsx)(lH,{className:`h-8 w-8`,"aria-hidden":`true`})}),(0,K.jsx)(`span`,{className:`text-sm font-medium text-foreground-muted`,children:u?i(`uiLibrary.switchHeroCard.on`,`On`):i(`uiLibrary.switchHeroCard.off`,`Off`)}),(0,K.jsx)(Y8,{on:u,busy:d,onToggle:()=>{if(d)return;let e=!u;l({on:e}),a.setState({on:e})}})]})}function Hue(e){return e===`playing`||e===`buffering`?`pause`:`play`}function Uue(e,t){return e===null||t===null||t<=0?0:Math.min(1,Math.max(0,e/t))}function R7(e){if(e===null)return`--:--`;let t=Math.floor(e/1e3);return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,`0`)}`}function Wue({title:e,subtitle:n}){let r=t();return(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-1 text-center`,children:[(0,K.jsx)(eH,{className:`h-6 w-6 text-foreground-subtle`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{className:`text-base font-semibold text-foreground line-clamp-1`,children:e??r(`uiLibrary.mediaPlayerHero.nothing`,`Nothing playing`)}),n&&(0,K.jsx)(`span`,{className:`text-xs text-foreground-subtle line-clamp-1`,children:n})]})}function z7({label:e,busy:t,onPress:n,children:r,primary:i}){return(0,K.jsx)(`button`,{type:`button`,"aria-label":e,title:e,disabled:t,onClick:e=>{e.stopPropagation(),t||n()},className:Z(`inline-flex items-center justify-center rounded-full transition-colors`,i?`h-12 w-12 bg-primary text-primary-foreground hover:bg-primary/90 shadow-md`:`h-10 w-10 text-foreground-muted hover:bg-surface-hover`,t&&`opacity-40 cursor-not-allowed`),children:r})}function Gue({trpc:e,deviceId:n,features:r,optimistic:i}){let a=t(),{cap:o,slice:s,available:c}=z3({trpc:e,deviceId:n,cap:e=>e.mediaPlayer,slice:e=>e.state.mediaPlayer}),{display:l,applyOptimistic:u}=Z8(s,{enabled:i??!0});if(o===void 0||l===void 0)return null;let d=!c,f=Hue(l.state),p=(r?.includes(Sc.MediaPlayerSeek)??!1)&&l.duration!==null&&l.duration>0,m=r?.includes(Sc.MediaPlayerNext)??!1,h=r?.includes(Sc.MediaPlayerPrevious)??!1,g=(r?.includes(Sc.MediaPlayerVolume)??!1)&&l.volumeLevel!==null,_=()=>{d||(f===`play`?(u({state:`playing`}),o.play({})):(u({state:`paused`}),o.pause({})))},v=l.currentMedia?.artist??l.currentMedia?.album??null,y=Uue(l.position,l.duration),b=l.volumeLevel??0;return(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-6`,children:[(0,K.jsx)(Wue,{title:l.currentMedia?.title??null,subtitle:v}),p&&(0,K.jsxs)(`div`,{"data-testid":`media-seek`,className:`flex flex-col gap-1`,children:[(0,K.jsxs)(`label`,{className:`relative block`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:a(`uiLibrary.mediaPlayerHero.seek`,`Seek`)}),(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.mediaPlayerHero.seek`,`Seek`),type:`range`,min:0,max:l.duration??0,step:1e3,className:`absolute inset-0 h-4 w-full cursor-pointer opacity-0`,value:l.position??0,disabled:d,onChange:e=>{if(d)return;let t=Number(e.target.value);u({position:t}),o.seek({position:t})}}),(0,K.jsx)(`div`,{className:`pointer-events-none`,children:(0,K.jsx)(U8,{fraction:y})})]}),(0,K.jsxs)(`div`,{className:`flex justify-between text-[11px] tabular-nums text-foreground-subtle`,children:[(0,K.jsx)(`span`,{children:R7(l.position)}),(0,K.jsx)(`span`,{children:R7(l.duration)})]})]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-center gap-4`,children:[h&&(0,K.jsx)(z7,{label:a(`uiLibrary.mediaPlayerHero.previous`,`Previous`),busy:d,onPress:()=>void o.previous({}),children:(0,K.jsx)(wH,{className:`h-5 w-5`,"aria-hidden":`true`})}),(0,K.jsx)(z7,{label:f===`play`?a(`uiLibrary.mediaPlayerHero.play`,`Play`):a(`uiLibrary.mediaPlayerHero.pause`,`Pause`),busy:d,onPress:_,primary:!0,children:f===`play`?(0,K.jsx)(sH,{className:`h-6 w-6`,"aria-hidden":`true`}):(0,K.jsx)(iH,{className:`h-6 w-6`,"aria-hidden":`true`})}),m&&(0,K.jsx)(z7,{label:a(`uiLibrary.mediaPlayerHero.next`,`Next`),busy:d,onPress:()=>void o.next({}),children:(0,K.jsx)(TH,{className:`h-5 w-5`,"aria-hidden":`true`})})]}),g&&(0,K.jsxs)(`div`,{"data-testid":`media-volume`,className:`flex items-center gap-2`,children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":l.isMuted===!0?a(`uiLibrary.mediaPlayerHero.unmute`,`Unmute`):a(`uiLibrary.mediaPlayerHero.mute`,`Mute`),title:l.isMuted===!0?a(`uiLibrary.mediaPlayerHero.unmute`,`Unmute`):a(`uiLibrary.mediaPlayerHero.mute`,`Mute`),disabled:d,onClick:e=>{if(e.stopPropagation(),d||l.isMuted===null)return;let t=!l.isMuted;u({isMuted:t}),o.setMute({muted:t})},className:Z(`inline-flex h-7 w-7 items-center justify-center rounded text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,d&&`opacity-40 cursor-not-allowed`),children:l.isMuted===!0?(0,K.jsx)(KH,{className:`h-4 w-4`,"aria-hidden":`true`}):(0,K.jsx)(GH,{className:`h-4 w-4`,"aria-hidden":`true`})}),(0,K.jsxs)(`label`,{className:`relative block flex-1`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:a(`uiLibrary.mediaPlayerHero.volume`,`Volume`)}),(0,K.jsx)(`input`,{"aria-label":a(`uiLibrary.mediaPlayerHero.volume`,`Volume`),type:`range`,min:0,max:100,step:1,className:`absolute inset-0 h-4 w-full cursor-pointer opacity-0`,value:b,disabled:d,onChange:e=>{if(d)return;let t=Number(e.target.value);u({volumeLevel:t}),o.setVolume({volumeLevel:t})}}),(0,K.jsx)(`div`,{className:`pointer-events-none`,children:(0,K.jsx)(U8,{fraction:b/100})})]}),(0,K.jsxs)(`span`,{className:`w-9 text-right text-[11px] tabular-nums text-foreground-subtle`,children:[b,`%`]})]})]})}var B7={disarmed:{colorClass:`border-border bg-surface-subtle text-foreground-subtle`,icon:`disarmed`},armed_home:{colorClass:`border-success/30 bg-success/10 text-success`,icon:`armed`},armed_away:{colorClass:`border-success/30 bg-success/10 text-success`,icon:`armed`},armed_night:{colorClass:`border-success/30 bg-success/10 text-success`,icon:`armed`},armed_vacation:{colorClass:`border-success/30 bg-success/10 text-success`,icon:`armed`},armed_custom_bypass:{colorClass:`border-success/30 bg-success/10 text-success`,icon:`armed`},arming:{colorClass:`border-warning/30 bg-warning/10 text-warning`,icon:`pending`},disarming:{colorClass:`border-warning/30 bg-warning/10 text-warning`,icon:`pending`},pending:{colorClass:`border-warning/30 bg-warning/10 text-warning`,icon:`pending`},triggered:{colorClass:`border-danger/30 bg-danger/10 text-danger`,icon:`triggered`}};function V7(e,t){switch(e){case`home`:return t(`uiLibrary.alarmHeroCard.modeHome`,`Home`);case`away`:return t(`uiLibrary.alarmHeroCard.modeAway`,`Away`);case`night`:return t(`uiLibrary.alarmHeroCard.modeNight`,`Night`);case`vacation`:return t(`uiLibrary.alarmHeroCard.modeVacation`,`Vacation`);case`custom_bypass`:return t(`uiLibrary.alarmHeroCard.modeBypass`,`Bypass`)}}function H7(e,t){switch(e){case`disarmed`:return t(`uiLibrary.alarmHeroCard.stateDisarmed`,`Disarmed`);case`armed_home`:return t(`uiLibrary.alarmHeroCard.stateArmedHome`,`Armed Home`);case`armed_away`:return t(`uiLibrary.alarmHeroCard.stateArmedAway`,`Armed Away`);case`armed_night`:return t(`uiLibrary.alarmHeroCard.stateArmedNight`,`Armed Night`);case`armed_vacation`:return t(`uiLibrary.alarmHeroCard.stateArmedVacation`,`Armed Vacation`);case`armed_custom_bypass`:return t(`uiLibrary.alarmHeroCard.stateArmedBypass`,`Armed (Bypass)`);case`arming`:return t(`uiLibrary.alarmHeroCard.stateArming`,`Arming…`);case`disarming`:return t(`uiLibrary.alarmHeroCard.stateDisarming`,`Disarming…`);case`pending`:return t(`uiLibrary.alarmHeroCard.statePending`,`Pending`);case`triggered`:return t(`uiLibrary.alarmHeroCard.stateTriggered`,`Triggered`)}}function U7(e){return e.startsWith(`armed_`)}function W7(e){return e===`arming`||e===`disarming`}function G7({icon:e,sizeClass:t=`h-8 w-8`}){return e===`disarmed`?(0,K.jsx)(bH,{className:t,"aria-hidden":`true`}):e===`triggered`?(0,K.jsx)(vH,{className:t,"aria-hidden":`true`}):e===`pending`?(0,K.jsx)(SH,{className:t,"aria-hidden":`true`}):(0,K.jsx)(yH,{className:t,"aria-hidden":`true`})}function K7({label:e,active:t,busy:n,onSelect:r}){return(0,K.jsx)(`button`,{type:`button`,"aria-label":e,"aria-pressed":t,disabled:n,onClick:e=>{e.stopPropagation(),n||r()},className:Z(`flex-1 rounded-md px-3 py-2 text-sm font-medium transition-colors`,t?`bg-primary text-primary-foreground shadow-sm`:`text-foreground-muted hover:bg-surface-hover`,n&&`opacity-40 cursor-not-allowed`),children:e})}function Kue({state:e,availableModes:n,busy:r,onDisarm:i,onArm:a}){let o=t(),s=U7(e),c=W7(e);return(0,K.jsxs)(`div`,{className:Z(`flex min-w-0 items-stretch gap-1 rounded-lg border border-border bg-surface-subtle p-1`),children:[(0,K.jsx)(K7,{label:o(`uiLibrary.alarmHeroCard.disarm`,`Disarm`),active:!s&&!c,busy:r,onSelect:i}),n.map(t=>(0,K.jsx)(K7,{label:V7(t,o),active:!c&&e===`armed_${t}`,busy:r,onSelect:()=>a(t)},t))]})}function q7(e){return e instanceof Error?e.message:String(e)}function J7(e,t,n){let{cap:r,slice:i,available:a}=z3({trpc:e,deviceId:t,cap:e=>e.alarmPanel,slice:e=>e.state.alarmPanel}),{display:o,applyOptimistic:c,rollback:l}=Z8(i,{enabled:n??!0}),[u,d]=(0,s.useState)(null),f=()=>d(null),p=(0,s.useRef)(0);(0,s.useEffect)(()=>{d(null)},[i]);let m=!a;return{display:o,capPresent:r!==void 0,busy:m,handleDisarm:()=>{if(r===void 0||m)return;let e=++p.current;c({state:`disarming`}),r.disarm({}).catch(t=>{p.current===e&&(l(),d(q7(t)))})},handleArm:e=>{if(r===void 0||m)return;let t=++p.current;c({state:`arming`}),r.arm({mode:e}).catch(e=>{p.current===t&&(l(),d(q7(e)))})},error:u,clearError:f}}function que({trpc:e,deviceId:n,optimistic:r}){let i=t(),{display:a,capPresent:o,busy:s,handleDisarm:c,handleArm:l,error:u}=J7(e,n,r);if(!o||a===void 0)return null;let d=B7[a.state],f=U7(a.state)?a.state.replace(`armed_`,``):``;return(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,K.jsxs)(`span`,{className:Z(`inline-flex shrink-0 items-center gap-1 rounded-md border px-1.5 py-0.5 text-[11px] font-medium whitespace-nowrap`,d.colorClass,W7(a.state)&&`animate-pulse`),children:[(0,K.jsx)(G7,{icon:d.icon,sizeClass:`h-3 w-3`}),H7(a.state,i)]}),(0,K.jsxs)(`select`,{"aria-label":i(`uiLibrary.alarmHeroCard.alarmMode`,`Alarm mode`),disabled:s,value:f,onClick:e=>e.stopPropagation(),onChange:e=>{e.stopPropagation();let t=e.target.value;t===``?c():l(t)},className:Z(`min-w-0 shrink rounded-md border border-border bg-surface-subtle px-1.5 py-0.5 text-xs text-foreground-muted`,s&&`cursor-not-allowed opacity-40`),children:[(0,K.jsx)(`option`,{value:``,children:i(`uiLibrary.alarmHeroCard.disarm`,`Disarm`)}),a.availableModes.map(e=>(0,K.jsx)(`option`,{value:e,children:V7(e,i)},e))]}),u!==null&&(0,K.jsx)(`span`,{"data-testid":`alarm-inline-error`,role:`alert`,title:u,className:`inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-danger/10 text-danger`,children:(0,K.jsx)(vH,{className:`h-3 w-3`,"aria-hidden":`true`})})]})}function Jue({trpc:e,deviceId:n,optimistic:r}){let i=t(),{display:a,capPresent:o,busy:s,handleDisarm:c,handleArm:l,error:u,clearError:d}=J7(e,n,r);if(!o||a===void 0)return null;let f=B7[a.state];return(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-6`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,K.jsx)(`div`,{"data-testid":`alarm-state`,"data-state":a.state,className:Z(`flex h-16 w-16 items-center justify-center rounded-full border-2`,f.colorClass,W7(a.state)&&`animate-pulse`),children:(0,K.jsx)(G7,{icon:f.icon})}),(0,K.jsx)(`span`,{className:Z(`text-sm font-medium`,f.colorClass,`border-0 bg-transparent`),children:H7(a.state,i)})]}),(0,K.jsx)(Kue,{state:a.state,availableModes:a.availableModes,busy:s,onDisarm:c,onArm:l}),u!==null&&(0,K.jsxs)(`div`,{"data-testid":`alarm-error`,role:`alert`,className:`flex items-start justify-between gap-2 rounded-md border border-danger/30 bg-danger/10 px-3 py-2 text-sm text-danger`,children:[(0,K.jsx)(`span`,{children:u}),(0,K.jsx)(`button`,{type:`button`,"aria-label":i(`uiLibrary.alarmHeroCard.dismiss`,`Dismiss`),onClick:e=>{e.stopPropagation(),d()},className:`shrink-0 font-medium text-danger/80 hover:text-danger`,children:`×`})]})]})}function Yue(e,t,n=i){if(e<=0)return null;let r=Math.max(0,Math.round((t-e)/1e3));return r<60?n(`uiLibrary.scriptAutomationControls.justNow`,`just now`):r<3600?n(`uiLibrary.scriptAutomationControls.minAgo`,`{{count}} min ago`,{count:Math.floor(r/60)}):r<86400?n(`uiLibrary.scriptAutomationControls.hAgo`,`{{count}} h ago`,{count:Math.floor(r/3600)}):new Date(e).toLocaleDateString()}function Y7({atMs:e,neverLabel:n}){let r=t(),i=Yue(e,Date.now(),r);return(0,K.jsx)(`span`,{className:`text-xs text-foreground-subtle`,"data-testid":`last-run`,children:i===null?n:i})}function X7({error:e}){return e===null||e===``?null:(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-xs text-danger`,title:e,"data-testid":`last-error`,children:[(0,K.jsx)(BH,{className:`h-3 w-3 shrink-0`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{className:`truncate`,children:e})]})}function Z7(e,t,n){let{cap:r,slice:i,available:a}=z3({trpc:e,deviceId:t,cap:e=>e.scriptRunner,slice:e=>e.state.scriptRunner}),{display:o,applyOptimistic:s}=Z8(i,{enabled:n??!0}),c=!a,l=o?.isRunning===!0;return{display:o,capPresent:r!==void 0,busy:c,running:l,run:()=>{r===void 0||c||l||(s({isRunning:!0}),r.run({}))},stop:()=>{r===void 0||c||!l||(s({isRunning:!1}),r.stop({}))}}}function Q7({running:e,busy:n,large:r,onRun:i,onStop:a}){let o=t(),s=e?o(`uiLibrary.scriptAutomationControls.stop`,`Stop`):o(`uiLibrary.scriptAutomationControls.run`,`Run`);return(0,K.jsxs)(`button`,{type:`button`,"aria-label":s,title:s,disabled:n,"data-testid":`script-run`,"data-running":e?`true`:`false`,onClick:t=>{t.stopPropagation(),e?a():i()},className:Z(`inline-flex items-center gap-1 rounded transition-colors`,r?`h-10 px-4 text-sm`:`h-5 px-1.5 text-xs`,e?`bg-danger text-danger-foreground hover:bg-danger/90`:`bg-primary text-primary-foreground hover:bg-primary/90`,n&&`cursor-not-allowed opacity-40`),children:[e?(0,K.jsx)(oV,{className:r?`h-4 w-4`:`h-3 w-3`,"aria-hidden":`true`}):(0,K.jsx)(sH,{className:r?`h-4 w-4`:`h-3 w-3`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{children:s})]})}function Xue({trpc:e,deviceId:n,optimistic:r}){let i=t(),{display:a,capPresent:o,busy:s,running:c,run:l,stop:u}=Z7(e,n,r);return!o||a===void 0?null:(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,K.jsx)(Q7,{running:c,busy:s,large:!1,onRun:l,onStop:u}),(0,K.jsx)(Y7,{atMs:a.lastRunAt,neverLabel:i(`uiLibrary.scriptAutomationControls.neverRun`,`never run`)})]})}function Zue({trpc:e,deviceId:n,optimistic:r}){let i=t(),{display:a,capPresent:o,busy:s,running:c,run:l,stop:u}=Z7(e,n,r);return!o||a===void 0?null:(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-6`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,K.jsx)(`div`,{"data-testid":`script-state`,"data-running":c?`true`:`false`,className:Z(`flex h-16 w-16 items-center justify-center rounded-full border-2`,c?`border-primary text-primary animate-pulse`:`border-border text-foreground-subtle`),children:(0,K.jsx)(sH,{className:`h-8 w-8`,"aria-hidden":`true`})}),(0,K.jsx)(`span`,{className:`text-sm font-medium`,children:c?i(`uiLibrary.scriptAutomationControls.running`,`Running`):i(`uiLibrary.scriptAutomationControls.idle`,`Idle`)}),(0,K.jsx)(Y7,{atMs:a.lastRunAt,neverLabel:i(`uiLibrary.scriptAutomationControls.neverRun`,`never run`)}),(0,K.jsx)(X7,{error:a.lastError})]}),(0,K.jsx)(`div`,{className:`flex justify-center`,children:(0,K.jsx)(Q7,{running:c,busy:s,large:!0,onRun:l,onStop:u})})]})}function $7(e,t,n){let{cap:r,slice:i,available:a}=z3({trpc:e,deviceId:t,cap:e=>e.automationControl,slice:e=>e.state.automationControl}),{display:o,applyOptimistic:s}=Z8(i,{enabled:n??!0}),c=!a;return{display:o,capPresent:r!==void 0,busy:c,setEnabled:e=>{r===void 0||c||(s({enabled:e}),e?r.enable({}):r.disable({}))},trigger:()=>{r===void 0||c||r.trigger({})}}}function e9({enabled:e,busy:n,onToggle:r}){let i=t();return(0,K.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,"aria-label":i(`uiLibrary.scriptAutomationControls.automationEnabled`,`Automation enabled`),disabled:n,"data-testid":`automation-enabled`,onClick:t=>{t.stopPropagation(),r(!e)},className:Z(`inline-flex shrink-0 items-center gap-1 rounded-md border px-1.5 py-0.5`,`text-[11px] font-medium whitespace-nowrap transition-colors`,e?`border-success/40 bg-success/10 text-success`:`border-border bg-surface-subtle text-foreground-subtle`,n&&`cursor-not-allowed opacity-40`),children:e?i(`uiLibrary.scriptAutomationControls.enabled`,`Enabled`):i(`uiLibrary.scriptAutomationControls.disabled`,`Disabled`)})}function t9({busy:e,large:n,onTrigger:r}){let i=t();return(0,K.jsxs)(`button`,{type:`button`,"aria-label":i(`uiLibrary.scriptAutomationControls.trigger`,`Trigger`),title:i(`uiLibrary.scriptAutomationControls.runNow`,`Run this automation now`),disabled:e,"data-testid":`automation-trigger`,onClick:e=>{e.stopPropagation(),r()},className:Z(`inline-flex items-center gap-1 rounded transition-colors`,n?`h-10 px-4 text-sm`:`h-5 px-1.5 text-xs`,`bg-primary text-primary-foreground hover:bg-primary/90`,e&&`cursor-not-allowed opacity-40`),children:[(0,K.jsx)(eU,{className:n?`h-4 w-4`:`h-3 w-3`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{children:i(`uiLibrary.scriptAutomationControls.trigger`,`Trigger`)})]})}function Que({trpc:e,deviceId:t,optimistic:n}){let{display:r,capPresent:i,busy:a,setEnabled:o,trigger:s}=$7(e,t,n);return!i||r===void 0?null:(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,K.jsx)(e9,{enabled:r.enabled,busy:a,onToggle:o}),(0,K.jsx)(t9,{busy:a,large:!1,onTrigger:s})]})}function $ue({trpc:e,deviceId:n,optimistic:r}){let i=t(),{display:a,capPresent:o,busy:s,setEnabled:c,trigger:l}=$7(e,n,r);return!o||a===void 0?null:(0,K.jsxs)(`div`,{className:`flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-6`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,K.jsx)(`div`,{"data-testid":`automation-state`,"data-enabled":a.enabled?`true`:`false`,className:Z(`flex h-16 w-16 items-center justify-center rounded-full border-2`,a.enabled?`border-success text-success`:`border-border text-foreground-subtle`),children:(0,K.jsx)(eU,{className:`h-8 w-8`,"aria-hidden":`true`})}),(0,K.jsx)(`span`,{className:`text-sm font-medium`,children:a.enabled?i(`uiLibrary.scriptAutomationControls.enabled`,`Enabled`):i(`uiLibrary.scriptAutomationControls.disabled`,`Disabled`)}),(0,K.jsx)(Y7,{atMs:a.lastTriggeredAt,neverLabel:i(`uiLibrary.scriptAutomationControls.neverTriggered`,`never triggered`)}),(0,K.jsx)(X7,{error:a.lastError})]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-center gap-3`,children:[(0,K.jsx)(e9,{enabled:a.enabled,busy:s,onToggle:c}),(0,K.jsx)(t9,{busy:s,large:!0,onTrigger:l})]})]})}function ede({children:e}){return(0,K.jsx)(`div`,{className:`flex flex-col items-stretch gap-3 rounded-lg border border-border bg-surface p-4`,children:e})}function n9(e,t){let{cap:n}=z3({trpc:e,deviceId:t,cap:e=>e.switch,slice:e=>e.state.switch});return n!==void 0}function tde({trpc:e,deviceId:t,features:n,optimistic:r}){return n9(e,t)?(0,K.jsx)(Q8,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}):null}function nde(e,t){let{cap:n}=z3({trpc:e,deviceId:t,cap:e=>e.lockControl,slice:e=>e.state.lockControl});return n!==void 0}function rde({trpc:e,deviceId:t,features:n,optimistic:r}){return nde(e,t)?(0,K.jsx)(pce,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}):null}function ide({trpc:e,deviceId:t,features:n,optimistic:r}){return n9(e,t)?(0,K.jsxs)(`div`,{className:`inline-flex items-center gap-2`,children:[(0,K.jsx)(Q8,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}),(0,K.jsx)(mce,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r})]}):null}function ade(e,t){let{cap:n}=z3({trpc:e,deviceId:t,cap:e=>e.fanControl,slice:e=>e.state.fanControl});return n!==void 0}function ode({trpc:e,deviceId:t,features:n,optimistic:r}){return ade(e,t)?(0,K.jsxs)(`div`,{className:`inline-flex items-center gap-2`,children:[(0,K.jsx)(Q8,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}),(0,K.jsx)(hce,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r})]}):null}function r9(e,t){let{cap:n}=z3({trpc:e,deviceId:t,cap:e=>e.climateControl,slice:e=>e.state.climateControl});return n!==void 0}function sde(e,t){let{cap:n}=z3({trpc:e,deviceId:t,cap:e=>e.heatingValve,slice:e=>e.state.heatingValve});return n!==void 0}function cde({trpc:e,deviceId:t,features:n,optimistic:r}){let i=r9(e,t),a=sde(e,t);return!i&&!a?null:(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[i?(0,K.jsx)(bce,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}):null,a?(0,K.jsx)(v7,{trpc:e,deviceId:t,layout:`compact`}):null]})}function lde({trpc:e,deviceId:t,features:n,optimistic:r}){return r9(e,t)?(0,K.jsx)(x7,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}):null}function ude({trpc:e,deviceId:t,features:n,optimistic:r}){return r9(e,t)?(0,K.jsx)(x7,{trpc:e,deviceId:t,features:n,layout:`full`,optimistic:r}):null}function dde(e,t){let{cap:n}=z3({trpc:e,deviceId:t,cap:e=>e.mediaPlayer,slice:e=>e.state.mediaPlayer});return n!==void 0}function fde({trpc:e,deviceId:t,features:n,optimistic:r}){return dde(e,t)?(0,K.jsx)(Ece,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}):null}function i9(e,t){let{cap:n}=z3({trpc:e,deviceId:t,cap:e=>e.control,slice:e=>e.state.control});return n!==void 0}function pde({trpc:e,deviceId:t,features:n,optimistic:r}){return i9(e,t)?(0,K.jsx)(u5,{trpc:e,deviceId:t,features:n,layout:`compact`,optimistic:r}):null}function mde({trpc:e,deviceId:t,features:n,optimistic:r}){return i9(e,t)?(0,K.jsx)(ede,{children:(0,K.jsx)(u5,{trpc:e,deviceId:t,features:n,layout:`full`,optimistic:r})}):null}var hde={cover:{InlineControl:Kce,HeroCard:Yce},valve:{InlineControl:kle,HeroCard:Nle},humidifier:{InlineControl:Fle,HeroCard:Lle},"water-heater":{InlineControl:Ble,HeroCard:Hle},switch:{InlineControl:tde,HeroCard:Vue},light:{InlineControl:ide,HeroCard:Lue},fan:{InlineControl:ode,HeroCard:Bue},sensor:{InlineControl:$ce,HeroCard:ule},thermostat:{InlineControl:cde,HeroCard:Eue},climate:{InlineControl:lde,HeroCard:ude},button:{InlineControl:lce,HeroCard:uce},update:{InlineControl:dle,HeroCard:fle},lock:{InlineControl:rde,HeroCard:jue},"media-player":{InlineControl:fde,HeroCard:Gue},alarm:{InlineControl:que,HeroCard:Jue},control:{InlineControl:pde,HeroCard:mde},weather:{InlineControl:Wle,HeroCard:qle},vacuum:{InlineControl:_le,HeroCard:vle},"lawn-mower":{InlineControl:Ele,HeroCard:Dle},image:{InlineControl:Jle,HeroCard:Yle},"pet-feeder":{InlineControl:Qle,HeroCard:$le},dishwasher:{InlineControl:oue,HeroCard:sue},script:{InlineControl:Xue,HeroCard:Zue},automation:{InlineControl:Que,HeroCard:$ue},dummy:{InlineControl:Xce,HeroCard:Zce}};Object.fromEntries(Object.values(B).map(e=>[e,hde[az[e]]])),B.Cover,B.Valve,B.Thermostat,B.Climate,B.Control,B.Button,B.MediaPlayer,B.AlarmPanel,B.Lock,B.Vacuum,B.LawnMower,B.Humidifier,B.Switch,B.Siren,B.Light,B.Fan,B.WaterHeater,B.Sensor,B.Presence,B.EventEmitter,B.Notifier,B.Script,B.Automation,B.Camera,B.Hub,B.Update,B.Generic,B.Weather,B.Container,B.Image,B.PetFeeder,B.Dishwasher,B.Washer,B.Dryer,new Set(Object.values(B));var a9=1e3;24*(60*a9*60),30*a9,(0,s.createContext)(null),new Set([B.Sensor,B.Presence]),(0,s.createContext)({}),Object.freeze([]),EK(`camstack:device-quick-detail`,null),j({id:E(),stableId:T(),addonId:T(),type:T(),name:T(),online:D(),disabled:D(),parentDeviceId:E().nullable(),role:T().nullable().optional(),features:A(T()).optional(),isCamera:D().optional()});function o9(e){return e.deviceKey===void 0?e.agentNodeId:`${e.agentNodeId}::${e.deviceKey}`}function s9(e){let t=[];for(let n of e){let e=t[t.length-1];if(e&&e.agentNodeId===n.agentNodeId){let r=[...e.columns,n];t[t.length-1]={...e,columns:r,grouped:r.length>1}}else t.push({agentNodeId:n.agentNodeId,engineLabel:n.engineLabel,columns:[n],grouped:!1})}return t}function gde(e){let t=[],n=(e,r)=>{for(let i of e)t.push({node:i,depth:r}),n(i.children,r+1)};return n(e,0),t}function _de(e,t,n,r=208,i=t){return e<=0?!1:t<=1?e<n+r*i:e<n+r*2}var c9={detector:{labelKey:`uiLibrary.pipelineMatrix.slotDetector`,labelFallback:`detector`,className:`text-emerald-500`},cropper:{labelKey:`uiLibrary.pipelineMatrix.slotCropper`,labelFallback:`cropper`,className:`text-blue-500`},classifier:{labelKey:`uiLibrary.pipelineMatrix.slotClassifier`,labelFallback:`classifier`,className:`text-violet-500`},refiner:{labelKey:`uiLibrary.pipelineMatrix.slotRefiner`,labelFallback:`refiner`,className:`text-amber-500`},"audio-classifier":{labelKey:`uiLibrary.pipelineMatrix.slotAudioClassifier`,labelFallback:`audio classifier`,className:`text-pink-500`}};function vde({slot:e}){let n=t(),r=c9[e]??c9.classifier;return(0,K.jsx)(`span`,{className:Z(`text-[9px] font-semibold uppercase tracking-widest leading-none`,r.className),children:n(r.labelKey,r.labelFallback)})}var l9=`inline-flex items-center rounded bg-muted px-1.5 py-px text-[9px] font-medium text-foreground-subtle`;function yde({inputs:e,outputs:t}){return e.length===0&&t.length===0?null:(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 flex-wrap`,children:[e.map(e=>(0,K.jsx)(`span`,{className:Z(l9,`bg-blue-500/10 text-blue-500`),children:e},`in-${e}`)),e.length>0&&t.length>0&&(0,K.jsx)(`span`,{className:`text-foreground-subtle/60 text-[9px]`,children:`→`}),t.map(e=>(0,K.jsx)(`span`,{className:Z(l9,`bg-emerald-500/10 text-emerald-500`),children:e},`out-${e}`))]})}function u9({column:e}){let n=t(),r=e.deviceLabel??e.deviceKey;return(0,K.jsxs)(K.Fragment,{children:[(r!==void 0||e.disabled===!0)&&(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[r!==void 0&&(0,K.jsx)(`span`,{className:`truncate text-[10px] font-medium text-foreground/90`,children:r}),e.disabled===!0&&(0,K.jsx)(`span`,{className:`shrink-0 rounded bg-muted px-1 text-[8px] font-semibold uppercase text-foreground-subtle`,children:n(`uiLibrary.pipelineMatrixShared.offWord`,`off`)})]}),(0,K.jsx)(`div`,{className:`truncate text-[9px] text-foreground-subtle`,children:e.engineLabel}),e.detail!==void 0&&(0,K.jsx)(`div`,{className:`truncate font-mono text-[9px] text-foreground-subtle`,title:e.detail,children:e.detail})]})}function bde({group:e}){let t=e.columns[0]?.nodeLabel??e.agentNodeId;return(0,K.jsxs)(`div`,{role:`columnheader`,className:`sticky top-0 z-10 min-w-0 border-b border-l border-border bg-muted/60`,style:{gridColumn:`span ${e.columns.length}`},children:[(0,K.jsx)(`div`,{className:`truncate px-3 pt-2 pb-1 text-xs font-semibold text-foreground`,children:t}),(0,K.jsx)(`div`,{className:`mt-1 flex border-t border-border/50`,children:e.columns.map((e,t)=>(0,K.jsx)(`div`,{className:Z(`min-w-0 flex-1 px-3 py-1`,t>0&&`border-l border-border/50`,e.disabled===!0&&`opacity-70`),title:`${e.deviceLabel??e.deviceKey} · ${e.engineLabel}${e.detail?` · ${e.detail}`:``}`,children:(0,K.jsx)(u9,{column:e})},o9(e)))})]})}function xde({node:e}){return(0,K.jsxs)(`div`,{className:`flex flex-col gap-1 min-w-0 flex-1`,children:[(0,K.jsx)(vde,{slot:e.slot}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,K.jsx)(`span`,{className:`font-semibold truncate`,children:e.addonName}),(0,K.jsx)(yde,{inputs:e.inputClasses,outputs:e.outputClasses})]})]})}function Sde(e,t){return t.kind===`enabled`?(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1`,title:t.overridden?e(`uiLibrary.pipelineMatrix.override`,`override`):void 0,children:[(0,K.jsx)(`span`,{className:Z(`h-1.5 w-1.5 rounded-full shrink-0`,t.overridden?`bg-amber-500`:`bg-emerald-500`)}),(0,K.jsx)(`span`,{className:`font-mono text-foreground truncate`,children:t.modelId}),t.suppliedByRoot!==void 0&&(0,K.jsx)(`span`,{className:`ml-auto shrink-0 truncate rounded bg-primary/10 px-1 text-[8px] font-semibold uppercase text-primary`,title:e(`uiLibrary.pipelineMatrix.rootModelTitle`,`Uses the root model {{model}} — this step's own model does not run here`,{model:t.suppliedByRoot}),children:e(`uiLibrary.pipelineMatrix.root`,`root`)}),t.clusterWide===!0&&(0,K.jsx)(`span`,{className:`ml-auto shrink-0 text-[8px] font-semibold uppercase text-primary`,title:e(`uiLibrary.pipelineMatrix.clusterTitle`,`One value for the whole cluster — this step writes into a shared vector index`),children:e(`uiLibrary.pipelineMatrix.cluster`,`cluster`)}),t.jumpTo!==void 0&&(0,K.jsxs)(`span`,{className:`ml-auto shrink-0 text-[8px] font-semibold text-sky-500`,title:e(`uiLibrary.pipelineMatrix.runsOn`,`runs on {{target}}`,{target:t.jumpTo}),children:[`→ `,t.jumpTo]}),t.overridden&&t.jumpTo===void 0&&(0,K.jsx)(`span`,{className:`ml-auto shrink-0 text-[8px] font-semibold uppercase text-amber-500`,children:e(`uiLibrary.pipelineMatrix.ovr`,`ovr`)})]}):t.kind===`disabled`?(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 text-foreground-subtle`,title:t.overridden?e(`uiLibrary.pipelineMatrix.override`,`override`):void 0,children:[(0,K.jsx)(`span`,{className:Z(`h-1.5 w-1.5 rounded-full shrink-0`,t.overridden?`bg-amber-500`:`border border-foreground-subtle/60`)}),(0,K.jsx)(`span`,{className:`truncate`,children:e(`uiLibrary.pipelineMatrix.off`,`off`)}),t.overridden&&(0,K.jsx)(`span`,{className:`ml-auto shrink-0 text-[8px] font-semibold uppercase text-amber-500`,children:e(`uiLibrary.pipelineMatrix.ovr`,`ovr`)})]}):t.kind===`skip`?t.jumpTo===void 0?(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 text-amber-500`,title:e(`uiLibrary.pipelineMatrix.skipTitle`,`Gated on for this camera, but no compatible model on this node — click to provision`),children:[(0,K.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-amber-500 shrink-0`}),(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e(`uiLibrary.pipelineMatrix.skip`,`⚠ skip`)})]}):(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 text-sky-500`,title:e(`uiLibrary.pipelineMatrix.autoJump`,`no build for this device — auto-jumps to {{target}}`,{target:t.jumpTo}),children:[(0,K.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-sky-500 shrink-0`}),(0,K.jsxs)(`span`,{className:`truncate font-medium`,children:[`→ `,t.jumpTo]})]}):(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 text-foreground-subtle/70`,children:[(0,K.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-muted shrink-0`}),(0,K.jsx)(`span`,{className:`truncate`,children:`—`})]})}function Cde(e,t,n){return Z(`text-left text-xs hover:bg-muted/40`,e.kind===`enabled`&&`bg-emerald-500/5`,e.kind===`skip`&&`bg-amber-500/5`,e.kind===`na`&&`bg-muted/30`,t&&`ring-2 ring-primary ring-inset`,n)}var d9=18,wde=d9*16,Tde=11;function Ede(e,t,n,r){let i=(e,t)=>({r:Math.max(0,Math.min(n-1,e)),c:Math.max(0,Math.min(r-1,t))});switch(e){case`ArrowRight`:return i(t.r,t.c+1);case`ArrowLeft`:return i(t.r,t.c-1);case`ArrowDown`:return i(t.r+1,t.c);case`ArrowUp`:return i(t.r-1,t.c);case`Home`:return i(t.r,0);case`End`:return i(t.r,r-1);case`PageDown`:return i(n-1,t.c);case`PageUp`:return i(0,t.c);default:return null}}function Dde({node:e,depth:t,r:n,tabbable:r,selected:i,badge:a,onClick:o,sticky:s}){return(0,K.jsx)(`div`,{role:`rowheader`,className:Z(`min-w-0 border-b border-border bg-surface`,s&&`sticky left-0 z-10`),children:(0,K.jsxs)(`button`,{type:`button`,"data-r":n,"data-c":0,"data-step":e.addonId,"data-col":``,tabIndex:r?0:-1,"aria-current":i?`true`:void 0,onClick:o?e=>o(e.detail===0):void 0,className:Z(`flex h-full w-full min-w-0 items-start gap-2 px-3 py-2 text-left text-xs outline-none`,`hover:bg-muted/40 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary`,i&&`bg-primary/10 shadow-[inset_3px_0_0_var(--color-primary)]`),style:{paddingLeft:`${12+t*14}px`},children:[(0,K.jsx)(xde,{node:e}),a]})})}function Ode({nodes:e,selected:n,onSelect:r}){let i=t();return(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,role:`tablist`,"aria-label":i(`uiLibrary.deviceStepMatrix.node`,`Node`),children:[(0,K.jsx)(gH,{className:`h-3.5 w-3.5 text-foreground-subtle`}),(0,K.jsx)(`span`,{className:`text-[10px] uppercase tracking-wider text-foreground-subtle`,children:i(`uiLibrary.deviceStepMatrix.node`,`Node`)}),(0,K.jsx)(`div`,{className:`flex overflow-hidden rounded-md border border-border text-[11px] font-medium`,children:e.map((e,t)=>{let i=e.agentNodeId===n;return(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":i,onClick:()=>r(e.agentNodeId),title:`${e.columns[0]?.nodeLabel??e.agentNodeId} · ${e.engineLabel}`,className:Z(`px-2.5 py-1 transition-colors`,i?`bg-primary/15 text-primary`:`bg-transparent text-foreground-subtle hover:bg-surface-hover hover:text-foreground`,t>0&&`border-l border-border`),children:e.columns[0]?.nodeLabel??e.agentNodeId},e.agentNodeId)})})]})}var kde=(0,s.forwardRef)(function({tree:e,agents:n,getCellState:r,onCellClick:i,onStepClick:a,stepBadge:o,selectedCell:c,single:l,reserveRightPx:u,label:d},f){let p=t(),m=(0,s.useMemo)(()=>gde(e),[e]),h=(0,s.useMemo)(()=>s9(n),[n]),g=(0,s.useRef)(null),_=l?Tde:d9,v=`${_}rem repeat(${n.length}, 13rem)`,y=n.length+1,[b,ee]=(0,s.useState)(!0);(0,s.useLayoutEffect)(()=>{let e=g.current;if(!e||u<=0){ee(!0);return}let t=()=>{let t=e.getBoundingClientRect().left;ee(window.innerWidth-u-t>=_*16+208+24)};return t(),window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[u,_]);let te=(0,s.useMemo)(()=>{if(c===null)return null;let e=m.findIndex(e=>e.node.addonId===c.addonId);if(e<0)return null;let t=n.findIndex(e=>o9(e)===o9(c));return{r:e,c:t<0?0:t+1}},[c,m,n]),[ne,x]=(0,s.useState)({r:0,c:0});(0,s.useEffect)(()=>{te!==null&&x(te)},[te]);let S=ne.r<m.length&&ne.c<y?ne:{r:0,c:0},re=(e,t)=>{g.current?.querySelector(`[data-r="${e}"][data-c="${t}"]`)?.focus()};return(0,s.useImperativeHandle)(f,()=>({focusCell:(e,t)=>{let r=m.findIndex(t=>t.node.addonId===e);if(r<0)return;let i=t===null?-1:n.findIndex(e=>o9(e)===t),a=i<0?0:i+1;x({r,c:a}),re(r,a)}}),[m,n]),(0,s.useLayoutEffect)(()=>{if(te===null)return;let e=g.current,t=e?.querySelector(`[data-r="${te.r}"][data-c="${te.c}"]`);if(!e||!t||(typeof t.scrollIntoView==`function`&&t.scrollIntoView({block:`nearest`,inline:`nearest`}),u<=0))return;let n=window.innerWidth-u-12,r=t.getBoundingClientRect().right;r>n&&(e.scrollLeft+=r-n)},[te,u,b]),(0,K.jsx)(`div`,{ref:g,className:`overflow-auto rounded border border-border`,children:(0,K.jsxs)(`div`,{className:`flex w-max`,children:[(0,K.jsxs)(`div`,{role:`grid`,"aria-label":d,"aria-rowcount":m.length+1,className:`grid w-max`,style:{gridTemplateColumns:v},onKeyDown:e=>{if(!(e.target instanceof HTMLElement)||e.target.dataset.r===void 0)return;let t={r:Number(e.target.dataset.r),c:Number(e.target.dataset.c)},n=Ede(e.key,t,m.length,y);n!==null&&(e.preventDefault(),x(n),re(n.r,n.c))},children:[(0,K.jsxs)(`div`,{role:`row`,className:`contents`,children:[(0,K.jsx)(`div`,{role:`columnheader`,className:Z(`top-0 z-20 border-b border-border bg-muted/60 px-3 py-2 text-[10px] uppercase tracking-widest text-foreground-subtle`,b?`sticky left-0`:`sticky`),children:p(`uiLibrary.deviceStepMatrix.step`,`Step`)}),h.map(e=>e.grouped?(0,K.jsx)(bde,{group:e},e.agentNodeId):e.columns.map(e=>(0,K.jsxs)(`div`,{role:`columnheader`,className:Z(`sticky top-0 z-10 min-w-0 border-b border-l border-border bg-muted/60 px-3 py-2`,e.disabled===!0&&`opacity-70`),children:[(0,K.jsx)(`div`,{className:`truncate text-xs font-semibold text-foreground`,children:e.nodeLabel??e.agentNodeId}),(0,K.jsx)(u9,{column:e})]},o9(e))))]}),m.map(({node:e,depth:t},s)=>(0,K.jsxs)(`div`,{role:`row`,className:`contents`,children:[(0,K.jsx)(Dde,{node:e,depth:t,r:s,tabbable:S.r===s&&S.c===0,selected:c?.addonId===e.addonId,badge:o?.(e.addonId),onClick:a?t=>a(e.addonId,t):void 0,sticky:b}),n.map((t,n)=>{let a=r(e.addonId,t),o=c!==null&&c.addonId===e.addonId&&o9(c)===o9(t),l=a.kind===`enabled`||a.kind===`skip`;return(0,K.jsx)(`div`,{role:`gridcell`,className:`min-w-0 border-b border-l border-border`,children:(0,K.jsx)(`button`,{type:`button`,"data-r":s,"data-c":n+1,"data-step":e.addonId,"data-col":o9(t),tabIndex:S.r===s&&S.c===n+1?0:-1,"aria-disabled":!l,"aria-selected":o,onClick:n=>{l&&i(e.addonId,t,n.detail===0)},className:Cde(a,o,Z(`h-full w-full min-w-0 overflow-hidden px-3 py-2 outline-none`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary`,!l&&`cursor-default hover:bg-transparent`,t.disabled===!0&&`opacity-70`)),children:Sde(p,a)})},o9(t))})]},e.addonId))]}),u>0&&(0,K.jsx)(`div`,{"aria-hidden":!0,style:{width:u},className:`shrink-0`})]})})});(0,s.forwardRef)(function({tree:e,agents:t,getCellState:n,onCellClick:r,selectedCell:i,fallbackNodeId:a,onFallbackNodeChange:o,onStepClick:c,stepBadge:l,reserveRightPx:u=0,label:d=`Detection steps`},f){let p=(0,s.useRef)(null),[m,h]=(0,s.useState)(0);(0,s.useLayoutEffect)(()=>{let e=p.current;if(!e)return;let t=()=>h(e.getBoundingClientRect().width);t();let n=typeof ResizeObserver<`u`?new ResizeObserver(t):null;return n?.observe(e),()=>n?.disconnect()},[]);let g=(0,s.useMemo)(()=>s9(t),[t]),_=_de(m,g.length,wde,208,t.length),v=(0,s.useMemo)(()=>g.length===0?null:g.find(e=>e.agentNodeId===a)??g[0]??null,[g,a]),y=i?.agentNodeId;(0,s.useEffect)(()=>{_&&y!==void 0&&y!==a&&o(y)},[_,y,a,o]);let b=_&&v?v.columns:t;return(0,K.jsxs)(`div`,{ref:p,className:`w-full space-y-2`,children:[_&&v&&g.length>1&&(0,K.jsx)(Ode,{nodes:g,selected:v.agentNodeId,onSelect:o}),(0,K.jsx)(kde,{ref:f,tree:e,agents:b,getCellState:n,onCellClick:r,onStepClick:c,stepBadge:l,selectedCell:i,single:_&&v!==null,reserveRightPx:u,label:d})]})});function f9({label:e,description:t,error:n,required:r,children:i,orientation:a=`vertical`,className:o}){let s=a===`horizontal`;return(0,K.jsxs)(`div`,{className:Z(`flex gap-2`,s?`flex-row items-center justify-between`:`flex-col`,o),children:[(0,K.jsxs)(`div`,{className:Z(s?`flex-1`:``),children:[(0,K.jsxs)(p6,{children:[e,r&&(0,K.jsx)(`span`,{className:`text-danger ml-0.5`,children:`*`})]}),t&&(0,K.jsx)(`p`,{className:`text-foreground-subtle text-xs mt-0.5`,children:t})]}),(0,K.jsx)(`div`,{className:Z(s?`shrink-0`:``),children:i}),n&&(0,K.jsx)(`p`,{className:`text-danger text-xs`,children:n})]})}function p9({icon:e,title:t,subtitle:n,actions:r,nav:i,fill:a=!1,className:o,children:s}){let c=!!t||n!=null||r!=null,l=c||i!=null;return(0,K.jsxs)(`div`,{className:Z(`overflow-x-clip p-2 sm:p-4`,a?`flex h-full min-h-0 flex-col gap-4`:`space-y-4`,o),children:[l&&(0,K.jsxs)(`div`,{className:`shrink-0 space-y-3`,children:[c&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4`,children:[(0,K.jsxs)(`div`,{className:`min-w-0`,children:[t!==void 0&&t!==``&&(0,K.jsxs)(`h1`,{className:`flex items-center gap-2 text-lg font-semibold text-foreground`,children:[e!==void 0&&(0,K.jsx)(e,{className:`h-4 w-4 shrink-0 text-foreground-subtle`,"aria-hidden":!0}),t]}),n!=null&&(0,K.jsx)(`p`,{className:`mt-0.5 text-xs text-foreground-subtle`,children:n})]}),r!=null&&(0,K.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,children:r})]}),i]}),a?(0,K.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3`,children:s}):s]})}Z(roe,`min-w-0 max-w-full gap-1.5 py-1 pl-1 pr-2.5 text-xs font-normal`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40`),Z(ioe,`font-medium`);var Ade={online:{colorClass:`bg-success`,labelKey:`uiLibrary.statusBadge.online`,labelFallback:`Online`},offline:{colorClass:`bg-danger`,labelKey:`uiLibrary.statusBadge.offline`,labelFallback:`Offline`},degraded:{colorClass:`bg-warning`,labelKey:`uiLibrary.statusBadge.degraded`,labelFallback:`Degraded`},unknown:{colorClass:`bg-foreground-subtle`,labelKey:`uiLibrary.statusBadge.unknown`,labelFallback:`Unknown`},running:{colorClass:`bg-success`,labelKey:`uiLibrary.statusBadge.running`,labelFallback:`Running`},stopped:{colorClass:`bg-foreground-subtle`,labelKey:`uiLibrary.statusBadge.stopped`,labelFallback:`Stopped`},error:{colorClass:`bg-danger`,labelKey:`uiLibrary.statusBadge.error`,labelFallback:`Error`},idle:{colorClass:`bg-info`,labelKey:`uiLibrary.statusBadge.idle`,labelFallback:`Idle`},enabled:{colorClass:`bg-success`,labelKey:`uiLibrary.statusBadge.enabled`,labelFallback:`Enabled`},disabled:{colorClass:`bg-warning`,labelKey:`uiLibrary.statusBadge.disabled`,labelFallback:`Disabled`}};function jde({status:e,label:n,showDot:r=!0,showLabel:i=!0,size:a=`sm`,className:o}){let s=t(),c=Ade[e];return(0,K.jsxs)(`span`,{className:Z(`inline-flex items-center gap-1.5`,a===`sm`?`text-xs`:`text-sm`,o),children:[r&&(0,K.jsx)(`span`,{className:Z(`h-1.5 w-1.5 shrink-0 rounded-full`,c.colorClass),"aria-hidden":`true`}),i&&(0,K.jsx)(`span`,{className:`text-foreground`,children:n??s(c.labelKey,c.labelFallback)})]})}function Mde({dirtyCount:e,saving:n,status:r,error:i,onSave:a,onDiscard:o,scope:s}){let c=t(),l=e>0,u=n?c(`uiLibrary.stepInspector.saving`,`Saving…`):l?c(`uiLibrary.stepInspector.unsaved`,{one:`{{count}} unsaved change`,other:`{{count}} unsaved changes`},{count:e}):r===`saved`?c(`uiLibrary.stepInspector.saved`,`Saved`):r===`error`?i??c(`uiLibrary.stepInspector.saveFailed`,`Save failed`):c(`uiLibrary.stepInspector.noChanges`,`No unsaved changes`);return(0,K.jsxs)(`footer`,{className:`shrink-0 space-y-2 border-t border-border bg-surface px-4 py-2 pb-[max(0.5rem,env(safe-area-inset-bottom))] md:pb-2`,children:[s!==void 0&&(0,K.jsx)(`div`,{"data-save-scope":!0,children:s}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{role:`status`,className:Z(`min-w-0 flex-1 truncate text-[11px]`,r===`error`&&!l?`text-danger`:l?`text-amber-500`:`text-foreground-subtle`),children:u}),(0,K.jsx)(WJ,{variant:`outline`,size:`md`,disabled:!l||n,onClick:o,children:c(`uiLibrary.stepInspector.discard`,`Discard`)}),(0,K.jsx)(WJ,{variant:`primary`,size:`md`,disabled:!l||n,onClick:a,children:c(`uiLibrary.stepInspector.save`,`Save`)})]})]})}(0,s.forwardRef)(function({title:e,subtitle:t,headerActions:n,headerExtra:r,leading:i,saveBar:a,onEscape:o,children:c,className:l},u){let d=(0,s.useId)();return(0,K.jsxs)(`section`,{"aria-labelledby":d,onKeyDown:e=>{e.key!==`Escape`||o===void 0||(e.stopPropagation(),o())},className:Z(`flex min-h-0 flex-1 flex-col overflow-hidden bg-surface`,l),children:[(0,K.jsxs)(`header`,{className:`shrink-0 space-y-2 border-b border-border px-4 py-2.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-start gap-x-3 gap-y-2`,children:[i,(0,K.jsxs)(`div`,{className:`min-w-[9rem] flex-1`,children:[(0,K.jsx)(`h2`,{id:d,ref:u,tabIndex:-1,title:e,className:`line-clamp-2 break-words text-sm font-semibold leading-snug text-foreground outline-none focus-visible:ring-2 focus-visible:ring-primary rounded`,children:e}),t!==void 0&&(0,K.jsx)(`div`,{className:`mt-0.5 text-[11px] text-foreground-subtle`,children:t})]}),n]}),r]}),(0,K.jsx)(`div`,{"data-inspector-body":!0,className:`min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-3`,children:c}),a!==void 0&&(0,K.jsx)(Mde,{...a})]})}),EK(`camstack:player-overlays-state`,null);var Nde=EK(`camstack:player-overlays-actions`,null);function Pde(e){let t=(0,s.useContext)(Nde);(0,s.useEffect)(()=>{if(!(!t||!e))return t.setLayer(e),()=>t.removeLayer(e.id)},[t,e])}var Fde=[`24h`,`7d`,`30d`,`1y`,`custom`],m9=24*36e5;7*m9,30*m9,365*m9;var Ide=j({subject:N(`kind`,[j({kind:I(`device`),deviceId:E().int()}),j({kind:I(`node`),nodeId:T().min(1)})]),key:T().min(1),scope:T()}),Lde=F(Fde),Rde=j({id:T().min(1),name:T().min(1).max(80),window:Lde,selection:A(Ide).max(24)});j({version:I(1),panels:A(Rde).max(50),hidden:P(T(),A(T()).max(200))}),EK(`camstack:zone-editing`,null);var h9=`en`,g9=new Map,_9=new Set,v9=0;function y9(e){let t=(e??``).trim().toLowerCase().split(/[-_]/)[0]??``;return t===``?h9:t}function b9(){if(typeof document<`u`){let e=document.documentElement.lang;if(e.trim()!==``)return y9(e)}return typeof navigator<`u`&&typeof navigator.language==`string`?y9(navigator.language):h9}function zde(e,t,n){let r=y9(t),i=g9.get(e)??new Map;i.set(r,n),g9.set(e,i),v9+=1;for(let e of _9)e()}function Bde(e){_9.add(e);let t=null;return typeof document<`u`&&typeof MutationObserver<`u`&&(t=new MutationObserver(e),t.observe(document.documentElement,{attributes:!0,attributeFilter:[`lang`]})),()=>{_9.delete(e),t?.disconnect()}}function x9(){return`${b9()}#${v9}`}function S9(e,t){let n=e;for(let e of t){if(n===void 0||typeof n==`string`)return;n=n[e]}return typeof n==`string`?n:void 0}function Vde(e,t){try{return new Intl.PluralRules(e).select(t)}catch{return`other`}}function C9(e,t,n,r){let i=g9.get(e)?.get(t);if(i===void 0)return;let a=n.split(`.`);if(r!==void 0){let e=a[a.length-1]??n,o=a.slice(0,-1),s=S9(i,[...o,`${e}_${Vde(t,r)}`]);if(s!==void 0)return s;let c=S9(i,[...o,`${e}_other`]);if(c!==void 0)return c}return S9(i,a)}var Hde=/\{\{\s*([\w.]+)\s*\}\}/g;function w9(e,t){return t===void 0?e:e.replace(Hde,(e,n)=>{let r=t[n];return r===void 0?e:String(r)})}function T9(e,t,n,r){let i=r?.count,a=typeof i==`number`?i:void 0;return w9(C9(e,t,n,a)??C9(e,h9,n,a)??n,r)}function Ude(){return(0,s.useSyncExternalStore)(Bde,x9,x9)}function E9(e,t){let n=Ude(),r=n.slice(0,n.indexOf(`#`)),i=t===void 0?r:y9(t);return{t:(0,s.useCallback)((t,n)=>T9(e,i,t,n),[e,i,n]),lang:i}}var Wde=/<(\/?)([A-Za-z][\w-]*)(\s*\/)?>/g;function D9(e,t,n,r){let i=e[t];return i===void 0?(0,K.jsx)(s.Fragment,{children:n},r):(0,s.cloneElement)(i,{key:r},...n)}function Gde(e,t,n){let r={name:``,children:[]},i=[r],a=0,o=0,s=()=>i[i.length-1]??r,c=e=>{e!==``&&s().children.push(w9(e,n))};for(let n of e.matchAll(Wde)){c(e.slice(a,n.index)),a=n.index+n[0].length;let r=n[1]===`/`,l=n[2]??``;if(o+=1,n[3]!==void 0)s().children.push(D9(t,l,[],`k${o}`));else if(!r)i.push({name:l,children:[]});else if(i.length>1&&s().name===l){let e=i.pop();e&&s().children.push(D9(t,l,e.children,`k${o}`))}}for(c(e.slice(a));i.length>1;){let e=i.pop();e&&s().children.push(...e.children)}return r.children}function Kde(e,t){for(let[n,r]of Object.entries(t))zde(e,n,r);return{ns:e,useT:t=>E9(e,t),Trans:t=>{let{t:n}=E9(e),r=t.values?.count;return(0,K.jsx)(K.Fragment,{children:Gde(n(t.i18nKey,typeof r==`number`?{count:r}:void 0),t.components??{},t.values)})},translate:(t,n)=>T9(e,b9(),t,n)}}(0,s.lazy)(()=>ls(()=>import(`./MaskShapeCanvas-BTvl6Rin.js`).then(e=>({default:e.MaskShapeCanvas})),__vite__mapDeps([2,1]))),(0,s.lazy)(()=>ls(()=>import(`./MotionZonesSettings-6yXs0YUy.js`).then(e=>({default:e.MotionZonesSettings})),__vite__mapDeps([0,1,2]))),(0,s.lazy)(()=>ls(()=>import(`./SceneMonitorEditor-DCNzhy47.js`).then(e=>({default:e.SceneMonitorEditor})),__vite__mapDeps([4,1,2]))),(0,s.lazy)(()=>ls(()=>import(`./PrivacyMaskSettings-D94_J9cQ.js`).then(e=>({default:e.PrivacyMaskSettings})),__vite__mapDeps([3,1,2])));function O9(e){return e===null?`disconnected`:e.hubConnectionState===void 0?e.hubConnected===!0?`connected`:`disconnected`:e.hubConnectionState}function k9(e,t){let n=e.isHub&&t!==null&&qde(e.displayName??e.hostname)?t:e.displayName??e.hostname;return e.isHub?`${n} (hub)`:n}function qde(e){return/^[0-9a-f]{12}$|^[0-9a-f]{64}$/.test(e)}function A9(e){return e.split(`.`)[0]===`0`?`${e} beta`:e}function j9(e){if(e===null)return null;let t=e.trim();return t.length>0?t:null}function Jde(e){let t=j9(e.productVersion),n=j9(e.serverVersion),r=j9(e.fallbackVersion);return t!==null&&n!==null?{kind:`both`,productLabel:A9(t),serverVersion:n}:t===null?n===null?r===null?{kind:`none`}:{kind:`fallback`,version:r}:{kind:`server`,serverVersion:n}:{kind:`product`,productLabel:A9(t)}}var M9=`camstack_agent_ui_session`,N9=class extends Error{constructor(){super(`Unauthorized — unlock required`)}};function P9(){let e=sessionStorage.getItem(M9);return e?{Authorization:`Bearer ${e}`}:{}}async function Yde(e){let t=await fetch(`/api/agent/session`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({ticket:e})});if(!t.ok){let e=await t.json().catch(()=>null);throw Error(e?.error??`HTTP ${t.status}`)}let n=await t.json();if(typeof n.token!=`string`||n.token.length===0)throw Error(`unlock session missing token`);sessionStorage.setItem(M9,n.token)}async function F9(e){let t=await fetch(e,{headers:P9()});if(t.status===401)throw new N9;if(!t.ok)throw Error(`HTTP ${t.status}`);return t.json()}async function I9(e,t){let n=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`,...P9()},body:JSON.stringify(t)});if(n.status===401)throw new N9;return n.json()}var{useT:L9,Trans:R9,translate:z9}=Kde(`agent-ui`,{en:{common:{unknownError:`Unknown error`,loading:`Loading…`,cancel:`Cancel`,save:`Save`,saving:`Saving…`},crash:{title:`CamStack Agent UI crashed`,body:`The dashboard hit an unexpected error while rendering. The agent itself keeps running — this only affects the UI. Details below (also in the agent log).`,startFailed:`CamStack Agent UI failed to start`},dashboard:{defaultName:`CamStack Agent`,unlocking:`Unlocking from hub…`,unreachable:`Unreachable`,hub:{connected:`Hub Connected`,unconfigured:`No hub configured`,unpaired:`Not paired`,certificateRejected:`Certificate rejected`,disconnected:`Hub Disconnected`},overview:{title:`Overview`,cpu:`CPU`,memory:`Memory`,addons:`Addons`,uptime:`Uptime`},resources:{title:`Resources`,cpuCores:`CPU ({{cores}} cores)`,cpuCoresModel:`CPU ({{cores}} cores — {{model}})`,memory:`Memory ({{used}} / {{total}} MB)`},host:{title:`System (host)`,platform:`Platform`,hostname:`Hostname`,uptime:`Host uptime`,memory:`Host memory`,ipv4:`IPv4`},process:{title:`Agent Process`,pid:`PID`,uptime:`Uptime`,memory:`Memory (RSS)`,heap:`Heap`},decode:{title:`Detection / Decoding`,hwaccel:`Decode hwaccel`,driDevice:`DRI device`,detectionDevices:`Detection devices`,software:`software / none detected`},locked:{title:`Agent dashboard locked`,body:`This agent is paired with a hub. Sign in on the hub as an admin to unlock this dashboard.`,continue:`Continue with hub`,hubUnknown:`Hub address unknown — open this agent from System → Cluster → Open dashboard.`},version:{restartToUpdate:`Restart to update`,restartToUpdateTo:`Restart to update → v{{version}}`,downloading:`Downloading update…`,checking:`Checking…`,check:`Check for updates`,checkFailed:`Update check failed: {{error}}`,both:`{{product}} · server {{server}}`,serverOnly:`server {{version}}`}},hubConfig:{title:`Hub Connection`,connection:{connected:`Connected`,unpaired:`Not paired`,unconfigured:`Not configured`,certificateRejected:`Certificate rejected`,disconnected:`Disconnected`},pairingState:{paired:`Paired`,requested:`Pairing requested`,unpaired:`Not paired`},certRejected:{title:`The hub refused this agent's certificate`,message:`The certificate was revoked or was issued by another hub. Forget the hub below, then pair this agent again from the hub.`},unreachable:{title:`Hub unreachable`,message:`This agent is paired but cannot reach the hub right now. Check that the hub is running and reachable from this machine.`},hubAddress:`Hub Address`,pairing:`Pairing`,clusterNodes:`Cluster nodes`,unsupported:`This agent is too old to pair from here. Update it from the hub (System → Cluster → Nodes), then pair it again.`,statusUnavailable:`Pairing status unavailable`,emptyPairing:`This agent is not paired. On the hub open System → Cluster → Agents, pick this agent and start pairing; the request appears here.`,name:{label:`Agent Name`,placeholder:`e.g. kitchen-agent`,rename:`Rename agent`,saveFailed:`Save failed`,saveFailedWith:`Save failed: {{error}}`,saved:`Name saved.`}},paired:{pairedWith:`Paired with`,theHub:`The hub`,hubUrl:`Hub URL`,caFingerprint:`CA fingerprint`,forget:`Forget this hub`,forgetTitle:`Forget this hub?`,forgetDescription:`This agent erases the certificate the hub issued and disconnects. Its cameras stop being served from this node until a hub pairs with it again, which needs a new confirmation on both screens.`,forgetConfirm:`Forget hub`},requests:{pinHelp:`The one-time PIN is shown only on the agent's own machine: in the agent console (docker logs for a container), in pairing-pin.txt in the agent data directory, or in the desktop app window. Use the PIN printed for this hub.`,codeHelp:`The {{digits}}-digit code the hub shows for this pairing. Type it from the hub screen.`,pendingGroup:`Pending pairing requests`,pickOne_one:`{{count}} hub asked to pair - pick the one you mean`,pickOne_other:`{{count}} hubs asked to pair - pick the one you mean`,requestFrom:`Pairing request from <b>{{node}}</b>`,caFingerprint:`CA fingerprint <mono>{{fingerprint}}</mono>`,timeLeft:`Time left to confirm`,lockedTitle:`Confirming is locked`,lockedMessage:`Too many wrong PINs. Try again in {{wait}}, or reset the pairing lockout below.`,confirmedHere:`Confirmed on this agent`,confirmedHint:`Now type this code on the hub. This agent pairs as soon as the hub accepts it.`,codeLabel:`Code shown on the hub`,pinLabel:`Local PIN`,pinPlaceholder:`PIN from the agent machine`,noPinNeeded:`You are on the agent itself, so no PIN is needed.`,confirm:`Confirm`,reject:`Reject`,agentCodeLabel:`Code on this agent - type it on the hub`,noCodeReturned:`The agent confirmed but did not return its code. Reject this request and start the pairing again from the hub.`},reset:{codeHelp:`The reset code is printed in the agent console at boot (docker logs for a container) and kept in pairing-reset.txt in the agent data directory. It is renewed each time it is used.`,done:`Pairing reset: lockouts and pending requests are cleared.`,hide:`Hide pairing reset`,show:`Reset pairing lockout`,explain:`Use this when confirming is locked after wrong PINs, or a stuck request keeps the agent from accepting a new one. It cancels every pending pairing; the hub can then ask again.`,noCodeNeeded:`This page runs on the agent itself, so no reset code is needed.`,codeLabel:`Reset code`,codePlaceholder:`Reset code from the agent`,resetting:`Resetting…`,submit:`Reset pairing`},pairingApi:{httpStatus:`The agent answered HTTP {{status}}`,requestFailed:`The request failed`,refused:`The agent refused the request`,retryIn:`{{message}} (try again in {{wait}})`},addons:{title:`Addons`,empty:`No addons loaded`,readFailed:`Could not read the addons: {{error}}`,hubVersionsFailed:`The hub could not be asked which versions this node should run: {{error}}`,startFailed:`The update could not be started`,columns:{addon:`Addon`,version:`Version`,versionNotSortable:`A version cell can also say what is being updated.`,runner:`Runner`,cpu:`CPU`,memory:`Memory`,status:`Status`,actionsNotSortable:`Actions.`},runnerWithoutAddon:`runner without a known addon`,updateFailed:`Update failed: {{message}}`,updatingTo:`Updating to {{version}}…`,updatedTo:`Updated to {{version}}`,published:`{{version}} published`,publishedHint:`A newer release is published. It reaches this node once the hub runs it — update the hub first.`,inAgentProcess:`in the agent process`,shared_one:`shared with {{count}} other`,shared_other:`shared with {{count}} others`,updating:`Updating…`,updateTo:`Update to {{version}}`,restart:`Restart {{name}}`},updates:{title:`Framework update`,bootMode:{dataRoot:`Updatable copy (runtime-updatable)`,baked:`Image copy (read-only)`,workspace:`Dev workspace`},restartWarning:`Applying downloads the release, then restarts this node to swap it in. Live streams and detection on this node stop for the restart, and this page goes unreachable until the agent comes back.`,state:{checking:`Checking the registry…`,staging:`Downloading and staging the release…`,pendingRestart:`Staged — restarting to apply`,pendingRestartVersion:`Staged v{{version}} — restarting to apply`,working:`Working…`},updateAvailable:`update available`,checking:`Checking…`,check:`Check for updates`,confirmApply:`Confirm — update and restart this node`,apply:`Update`,applyTo:`Update → v{{version}}`,running:`Running`,published:`Published (npm)`,notChecked:`not checked`,loadedFrom:`Code loaded from`,checkFailed:`Update check failed: {{error}}`,npmNote:`The framework installs from the npm registry — this works with the hub unreachable.`,readFailed:`Could not read update state: {{error}}`,checkRequestFailed:`Check failed`,applyFailed:`Update could not be started`}},it:{common:{unknownError:`Errore sconosciuto`,loading:`Caricamento…`,cancel:`Annulla`,save:`Salva`,saving:`Salvataggio…`},crash:{title:`L'interfaccia dell'agente CamStack si è interrotta`,body:`La dashboard ha incontrato un errore imprevisto durante la visualizzazione. L'agente continua a funzionare: riguarda solo l'interfaccia. Dettagli qui sotto (anche nel log dell'agente).`,startFailed:`Impossibile avviare l'interfaccia dell'agente CamStack`},dashboard:{defaultName:`Agente CamStack`,unlocking:`Sblocco dall'hub in corso…`,unreachable:`Non raggiungibile`,hub:{connected:`Hub connesso`,unconfigured:`Nessun hub configurato`,unpaired:`Non associato`,certificateRejected:`Certificato rifiutato`,disconnected:`Hub disconnesso`},overview:{title:`Panoramica`,cpu:`CPU`,memory:`Memoria`,addons:`Addon`,uptime:`Uptime`},resources:{title:`Risorse`,cpuCores:`CPU ({{cores}} core)`,cpuCoresModel:`CPU ({{cores}} core — {{model}})`,memory:`Memoria ({{used}} / {{total}} MB)`},host:{title:`Sistema (host)`,platform:`Piattaforma`,hostname:`Nome host`,uptime:`Uptime host`,memory:`Memoria host`,ipv4:`IPv4`},process:{title:`Processo dell'agente`,pid:`PID`,uptime:`Uptime`,memory:`Memoria (RSS)`,heap:`Heap`},decode:{title:`Detection / Decodifica`,hwaccel:`Accelerazione hardware di decodifica`,driDevice:`Dispositivo DRI`,detectionDevices:`Dispositivi di detection`,software:`software / nessuno rilevato`},locked:{title:`Dashboard dell'agente bloccata`,body:`Questo agente è associato a un hub. Accedi all'hub come amministratore per sbloccare la dashboard.`,continue:`Continua con l'hub`,hubUnknown:`Indirizzo dell'hub sconosciuto: apri questo agente da Sistema → Cluster → Apri dashboard.`},version:{restartToUpdate:`Riavvia per aggiornare`,restartToUpdateTo:`Riavvia per aggiornare → v{{version}}`,downloading:`Download dell'aggiornamento…`,checking:`Controllo…`,check:`Cerca aggiornamenti`,checkFailed:`Controllo aggiornamenti non riuscito: {{error}}`,both:`{{product}} · server {{server}}`,serverOnly:`server {{version}}`}},hubConfig:{title:`Connessione all'hub`,connection:{connected:`Connesso`,unpaired:`Non associato`,unconfigured:`Non configurato`,certificateRejected:`Certificato rifiutato`,disconnected:`Disconnesso`},pairingState:{paired:`Associato`,requested:`Associazione richiesta`,unpaired:`Non associato`},certRejected:{title:`L'hub ha rifiutato il certificato di questo agente`,message:`Il certificato è stato revocato o emesso da un altro hub. Dimentica l'hub qui sotto, poi associa di nuovo questo agente dall'hub.`},unreachable:{title:`Hub non raggiungibile`,message:`Questo agente è associato ma ora non riesce a raggiungere l'hub. Verifica che l'hub sia in esecuzione e raggiungibile da questa macchina.`},hubAddress:`Indirizzo dell'hub`,pairing:`Associazione`,clusterNodes:`Nodi del cluster`,unsupported:`Questo agente è troppo vecchio per essere associato da qui. Aggiornalo dall'hub (Sistema → Cluster → Nodi), poi associalo di nuovo.`,statusUnavailable:`Stato dell'associazione non disponibile`,emptyPairing:`Questo agente non è associato. Sull'hub apri Sistema → Cluster → Agenti, scegli questo agente e avvia l'associazione: la richiesta compare qui.`,name:{label:`Nome dell'agente`,placeholder:`es. agent-kitchen`,rename:`Rinomina agente`,saveFailed:`Salvataggio non riuscito`,saveFailedWith:`Salvataggio non riuscito: {{error}}`,saved:`Nome salvato.`}},paired:{pairedWith:`Associato a`,theHub:`L'hub`,hubUrl:`URL dell'hub`,caFingerprint:`Impronta della CA`,forget:`Dimentica questo hub`,forgetTitle:`Dimenticare questo hub?`,forgetDescription:`L'agente cancella il certificato emesso dall'hub e si disconnette. Le sue telecamere non vengono più servite da questo nodo finché un hub non lo associa di nuovo, cosa che richiede una nuova conferma su entrambe le schermate.`,forgetConfirm:`Dimentica hub`},requests:{pinHelp:`Il PIN monouso è mostrato solo sulla macchina dell'agente: nella console dell'agente (docker logs per un container), in pairing-pin.txt nella cartella dati dell'agente o nella finestra dell'app desktop. Usa il PIN stampato per questo hub.`,codeHelp:`Il codice di {{digits}} cifre che l'hub mostra per questa associazione. Digitalo dalla schermata dell'hub.`,pendingGroup:`Richieste di associazione in sospeso`,pickOne_one:`{{count}} hub ha chiesto di associarsi - scegli quello giusto`,pickOne_other:`{{count}} hub hanno chiesto di associarsi - scegli quello giusto`,requestFrom:`Richiesta di associazione da <b>{{node}}</b>`,caFingerprint:`Impronta della CA <mono>{{fingerprint}}</mono>`,timeLeft:`Tempo rimasto per confermare`,lockedTitle:`La conferma è bloccata`,lockedMessage:`Troppi PIN errati. Riprova tra {{wait}} oppure reimposta il blocco dell'associazione qui sotto.`,confirmedHere:`Confermato su questo agente`,confirmedHint:`Ora digita questo codice sull'hub. L'agente si associa non appena l'hub lo accetta.`,codeLabel:`Codice mostrato sull'hub`,pinLabel:`PIN locale`,pinPlaceholder:`PIN dalla macchina dell'agente`,noPinNeeded:`Sei sull'agente stesso, quindi non serve il PIN.`,confirm:`Conferma`,reject:`Rifiuta`,agentCodeLabel:`Codice su questo agente - digitalo sull'hub`,noCodeReturned:`L'agente ha confermato ma non ha restituito il suo codice. Rifiuta questa richiesta e avvia di nuovo l'associazione dall'hub.`},reset:{codeHelp:`Il codice di reimpostazione viene stampato nella console dell'agente all'avvio (docker logs per un container) e salvato in pairing-reset.txt nella cartella dati dell'agente. Viene rinnovato a ogni utilizzo.`,done:`Associazione reimpostata: blocchi e richieste in sospeso eliminati.`,hide:`Nascondi reimpostazione associazione`,show:`Reimposta blocco associazione`,explain:`Usalo quando la conferma è bloccata dopo PIN errati o quando una richiesta bloccata impedisce all'agente di accettarne una nuova. Annulla ogni associazione in sospeso; l'hub potrà poi chiederla di nuovo.`,noCodeNeeded:`Questa pagina è in esecuzione sull'agente stesso, quindi non serve il codice di reimpostazione.`,codeLabel:`Codice di reimpostazione`,codePlaceholder:`Codice di reimpostazione dall'agente`,resetting:`Reimpostazione…`,submit:`Reimposta associazione`},pairingApi:{httpStatus:`L'agente ha risposto HTTP {{status}}`,requestFailed:`La richiesta non è riuscita`,refused:`L'agente ha rifiutato la richiesta`,retryIn:`{{message}} (riprova tra {{wait}})`},addons:{title:`Addon`,empty:`Nessun addon caricato`,readFailed:`Impossibile leggere gli addon: {{error}}`,hubVersionsFailed:`Impossibile chiedere all'hub quali versioni questo nodo deve eseguire: {{error}}`,startFailed:`Impossibile avviare l'aggiornamento`,columns:{addon:`Addon`,version:`Versione`,versionNotSortable:`Una cella di versione può anche indicare cosa si sta aggiornando.`,runner:`Runner`,cpu:`CPU`,memory:`Memoria`,status:`Stato`,actionsNotSortable:`Azioni.`},runnerWithoutAddon:`runner senza un addon noto`,updateFailed:`Aggiornamento non riuscito: {{message}}`,updatingTo:`Aggiornamento a {{version}}…`,updatedTo:`Aggiornato a {{version}}`,published:`{{version}} pubblicata`,publishedHint:`È stata pubblicata una versione più recente. Arriva su questo nodo quando l'hub la esegue: aggiorna prima l'hub.`,inAgentProcess:`nel processo dell'agente`,shared_one:`condiviso con {{count}} altro`,shared_other:`condiviso con altri {{count}}`,updating:`Aggiornamento…`,updateTo:`Aggiorna a {{version}}`,restart:`Riavvia {{name}}`},updates:{title:`Aggiornamento del framework`,bootMode:{dataRoot:`Copia aggiornabile (aggiornabile a runtime)`,baked:`Copia dell'immagine (sola lettura)`,workspace:`Workspace di sviluppo`},restartWarning:`L'applicazione scarica la release e poi riavvia questo nodo per attivarla. Streaming live e detection su questo nodo si fermano durante il riavvio e questa pagina resta irraggiungibile finché l'agente non torna disponibile.`,state:{checking:`Controllo del registry…`,staging:`Download e preparazione della release…`,pendingRestart:`Preparata: riavvio per applicare`,pendingRestartVersion:`Preparata v{{version}}: riavvio per applicare`,working:`Elaborazione…`},updateAvailable:`aggiornamento disponibile`,checking:`Controllo…`,check:`Cerca aggiornamenti`,confirmApply:`Conferma: aggiorna e riavvia questo nodo`,apply:`Aggiorna`,applyTo:`Aggiorna → v{{version}}`,running:`In esecuzione`,published:`Pubblicata (npm)`,notChecked:`non controllato`,loadedFrom:`Codice caricato da`,checkFailed:`Controllo aggiornamenti non riuscito: {{error}}`,npmNote:`Il framework si installa dal registry npm: funziona anche con l'hub non raggiungibile.`,readFailed:`Impossibile leggere lo stato degli aggiornamenti: {{error}}`,checkRequestFailed:`Controllo non riuscito`,applyFailed:`Impossibile avviare l'aggiornamento`}}}),Xde={minHeight:`100vh`,margin:0,padding:`48px 32px`,background:`#0c0a09`,color:`#fafaf9`,fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif`},Zde={marginTop:16,padding:12,background:`#1c1917`,border:`1px solid #292524`,borderRadius:8,color:`#f87171`,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`};function B9(e){return e instanceof Error?e.stack??`${e.name}: ${e.message}`:String(e)}var Qde=class extends s.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`[agent-ui] React render error: ${B9(e)}${t.componentStack??``}`)}render(){return this.state.error===null?this.props.children:(0,K.jsxs)(`div`,{style:Xde,children:[(0,K.jsx)(`h1`,{style:{fontSize:18,margin:0},children:z9(`crash.title`)}),(0,K.jsx)(`p`,{style:{color:`#a8a29e`,fontSize:13},children:z9(`crash.body`)}),(0,K.jsx)(`pre`,{style:Zde,children:B9(this.state.error)})]})}};function V9(e){let t=document.getElementById(`root`);if(!t||t.childElementCount>0)return;t.innerHTML=``;let n=document.createElement(`div`);n.setAttribute(`style`,`min-height:100vh;margin:0;padding:48px 32px;background:#0c0a09;color:#fafaf9;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif`);let r=document.createElement(`h1`);r.setAttribute(`style`,`font-size:18px;margin:0 0 8px`),r.textContent=z9(`crash.startFailed`);let i=document.createElement(`pre`);i.setAttribute(`style`,`margin-top:16px;padding:12px;background:#1c1917;border:1px solid #292524;border-radius:8px;color:#f87171;font-size:12px;white-space:pre-wrap;word-break:break-word`),i.textContent=e,n.appendChild(r),n.appendChild(i),t.appendChild(n)}function $de(){window.addEventListener(`error`,e=>{console.error(`[agent-ui] uncaught error: ${B9(e.error??e.message)}`),V9(B9(e.error??e.message))}),window.addEventListener(`unhandledrejection`,e=>{console.error(`[agent-ui] unhandled rejection: ${B9(e.reason)}`),V9(B9(e.reason))})}function efe(e){return e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function tfe(e){return e===`running`?`running`:e===`crashed`||e===`error`||e===`failed`?`error`:e===`stopped`?`stopped`:`unknown`}function nfe(e){return Math.max(0,e.addonIds.length-1)}function rfe({row:e,update:t,t:n}){return e.kind===`runner`?(0,K.jsx)(`span`,{className:`text-foreground-subtle`,children:`—`}):(0,K.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[(0,K.jsxs)(`span`,{className:`font-mono text-[11px]`,children:[t?.installedVersion??e.version??`—`,t?.behindHub===!0&&t.hubVersion!==null?` → ${t.hubVersion}`:``]}),t?.update?.status===`failed`&&(0,K.jsx)(`span`,{className:`max-w-[16rem] truncate text-[10px] text-danger`,title:t.update.message??``,children:n(`addons.updateFailed`,{message:t.update.message??``})}),t?.update?.status===`running`&&(0,K.jsx)(`span`,{className:`text-[10px] text-warning`,children:n(`addons.updatingTo`,{version:t.update.targetVersion})}),t?.update?.status===`done`&&t.behindHub===!1&&(0,K.jsx)(`span`,{className:`text-[10px] text-success`,children:n(`addons.updatedTo`,{version:t.update.targetVersion})}),t!==void 0&&!t.behindHub&&t.updateAvailable&&t.latestVersion!==null&&(0,K.jsx)(`span`,{className:`text-[10px] text-foreground-subtle`,title:n(`addons.publishedHint`),children:n(`addons.published`,{version:t.latestVersion})})]})}function ife({runner:e,t}){if(e===null)return(0,K.jsx)(`span`,{className:`text-[11px] text-foreground-subtle`,children:t(`addons.inAgentProcess`)});let n=nfe(e),r=n>0?t(`addons.shared`,{count:n}):null;return(0,K.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[(0,K.jsxs)(`span`,{className:`font-mono text-[11px]`,children:[e.groupId,` · pid `,e.pid]}),r!==null&&(0,K.jsx)(`span`,{className:`text-[10px] text-foreground-subtle`,title:e.addonIds.join(`, `),children:r})]})}function afe(e){return[{key:`addon`,header:e.t(`addons.columns.addon`),sortValue:e=>e.addonId??e.runner?.name??e.key,render:t=>(0,K.jsxs)(`span`,{className:`flex flex-col`,children:[(0,K.jsx)(`span`,{className:`font-mono text-xs`,children:t.addonId??t.runner?.name}),t.kind===`runner`&&(0,K.jsx)(`span`,{className:`text-[10px] text-foreground-subtle`,children:e.t(`addons.runnerWithoutAddon`)}),t.packageName!==null&&(0,K.jsx)(`span`,{className:`text-[10px] text-foreground-subtle`,children:t.packageName})]})},{key:`version`,header:e.t(`addons.columns.version`),notSortableReason:e.t(`addons.columns.versionNotSortable`),render:t=>(0,K.jsx)(rfe,{row:t,update:e.updateFor(t),t:e.t})},{key:`runner`,header:e.t(`addons.columns.runner`),sortValue:e=>e.runner?.groupId??null,render:t=>(0,K.jsx)(ife,{runner:t.runner,t:e.t})},{key:`cpu`,header:e.t(`addons.columns.cpu`),align:`right`,sortValue:e=>e.runner?.cpuPercent??null,render:e=>e.runner===null?`—`:`${e.runner.cpuPercent.toFixed(1)}%`},{key:`memory`,header:e.t(`addons.columns.memory`),align:`right`,sortValue:e=>e.runner?.memoryRss??null,render:e=>e.runner===null?`—`:efe(e.runner.memoryRss)},{key:`status`,header:e.t(`addons.columns.status`),sortValue:e=>e.status,render:e=>(0,K.jsx)(jde,{status:tfe(e.status),label:e.status,size:`sm`})},{key:`actions`,header:``,align:`right`,notSortableReason:e.t(`addons.columns.actionsNotSortable`),render:t=>{let n=e.updateFor(t),r=n?.update?.status===`running`;return(0,K.jsxs)(`span`,{className:`flex items-center justify-end gap-1`,children:[n?.behindHub===!0&&t.packageName!==null&&(0,K.jsxs)(WJ,{type:`button`,variant:`outline`,size:`sm`,disabled:r,onClick:()=>e.onUpdate(t.packageName??``),children:[(0,K.jsx)(rH,{className:`h-3 w-3`}),r?e.t(`addons.updating`):e.t(`addons.updateTo`,{version:n.hubVersion??``})]}),t.kind===`addon`&&t.addonId!==null&&(0,K.jsx)(DJ,{type:`button`,variant:`ghost`,size:`sm`,icon:fH,"aria-label":e.t(`addons.restart`,{name:t.addonId}),onClick:()=>e.onRestartAddon(t.addonId??``)}),t.kind===`runner`&&t.runner!==null&&(0,K.jsx)(DJ,{type:`button`,variant:`ghost`,size:`sm`,icon:fH,"aria-label":e.t(`addons.restart`,{name:t.runner.name}),onClick:()=>e.onRestartRunner(t.runner?.name??``)})]})}}]}var ofe=3e3,sfe=12e4,cfe=3e3;function lfe({locked:e,onUnauthorized:t}){let{t:n}=L9(),[r,i]=(0,s.useState)(null),[a,o]=(0,s.useState)(null),[c,l]=(0,s.useState)(null),[u,d]=(0,s.useState)(null),f=(0,s.useCallback)(e=>{e instanceof N9?t():l(e instanceof Error?e.message:z9(`common.unknownError`))},[t]),p=(0,s.useCallback)(async()=>{try{i(await F9(`/api/agent/addon-runtime`)),l(null)}catch(e){f(e)}},[f]),m=(0,s.useCallback)(async()=>{try{o(await F9(`/api/agent/addon-updates`))}catch(e){f(e)}},[f]);(0,s.useEffect)(()=>{if(e)return;p();let t=setInterval(()=>void p(),ofe);return()=>clearInterval(t)},[e,p]);let h=a?.available===!0&&a.entries.some(e=>e.update?.status===`running`);(0,s.useEffect)(()=>{if(e)return;m();let t=setInterval(()=>void m(),h?cfe:sfe);return()=>clearInterval(t)},[e,m,h]);let g=(0,s.useMemo)(()=>new Map(a?.available===!0?a.entries.map(e=>[e.packageName,e]):[]),[a]),_=(0,s.useCallback)(async e=>{d(null);try{let t=await I9(`/api/agent/addon-updates/update`,{packageName:e});t.started||d(t.message??z9(`addons.startFailed`)),await m()}catch(e){e instanceof N9?t():d(e instanceof Error?e.message:z9(`addons.startFailed`))}},[m,t]),v=(0,s.useMemo)(()=>afe({t:n,updateFor:e=>e.packageName===null?void 0:g.get(e.packageName),onRestartAddon:e=>void I9(`/api/agent/addon/restart`,{addonId:e}),onRestartRunner:e=>void I9(`/api/agent/process/restart`,{name:e}),onUpdate:e=>void _(e)}),[g,_,n]);return(0,K.jsx)(v6,{headingId:`agent-addons`,title:n(`addons.title`),icon:rH,actions:(0,K.jsx)(HJ,{variant:`default`,className:`text-[10px]`,children:r?.length??0}),children:(0,K.jsxs)(`div`,{className:`${f6} space-y-3`,children:[c!==null&&(0,K.jsx)(B3,{message:n(`addons.readFailed`,{error:c})}),u!==null&&(0,K.jsx)(B3,{message:u}),a?.available===!0&&a.hubVersionsError!==null&&(0,K.jsx)(B3,{variant:`warning`,message:n(`addons.hubVersionsFailed`,{error:a.hubVersionsError})}),a?.available===!0&&a.error!==null&&(0,K.jsx)(B3,{variant:`warning`,message:a.error}),(0,K.jsx)(Coe,{columns:v,rows:r??[],rowKey:e=>e.key,minWidthPx:640,bordered:!1,emptyMessage:n(r===null?`common.loading`:`addons.empty`)})]})})}var ufe=`/api/agent/pairing/status`,dfe=`/api/agent/pairing/confirm`,ffe=`/api/agent/pairing/reject`,pfe=`/api/agent/pairing/reset`,mfe=`/api/agent/pairing/forget`;function hfe(){return F9(ufe)}function H9(e){return e.some(e=>typeof e.pin==`string`)}function gfe(e){return e===`localhost`||e===`127.0.0.1`||e===`[::1]`}function _fe(e){return typeof e==`object`&&!!e&&typeof Reflect.get(e,`ok`)==`boolean`}async function U9(e,t){try{let n=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`,...P9()},body:JSON.stringify(t)}),r=await n.json().catch(()=>null);return _fe(r)?r:n.ok?{ok:!0}:{ok:!1,message:z9(`pairingApi.httpStatus`,{status:n.status})}}catch(e){return{ok:!1,message:e instanceof Error?e.message:z9(`pairingApi.requestFailed`)}}}function W9(e){let t=Math.max(1,Math.ceil(e/1e3));return t<90?`${t} s`:`${Math.ceil(t/60)} min`}function G9(e){let t=e.message??e.error??z9(`pairingApi.refused`);return e.retryAfterMs===void 0?t:z9(`pairingApi.retryIn`,{message:t,wait:W9(e.retryAfterMs)})}function vfe(e,t){let n=Math.max(0,Math.ceil((e-t)/1e3));return`${Math.floor(n/60)}:${String(n%60).padStart(2,`0`)}`}function K9(e){return e.replace(/(.{4})/g,`$1 `).trim()}function yfe(e){return e.replace(/(\d{3})(?=\d)/g,`$1 `)}async function bfe(){let e=await U9(mfe,{});if(!e.ok)throw Error(G9(e))}function xfe({hub:e,hubName:t,onForgotten:n}){let{t:r}=L9();return(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsxs)(`div`,{className:`space-y-0`,children:[(0,K.jsx)(_6,{label:r(`paired.pairedWith`),children:t??r(`paired.theHub`)}),e?.url!=null&&(0,K.jsx)(_6,{label:r(`paired.hubUrl`),valueClassName:`font-mono break-all`,children:e.url}),e!==null&&(0,K.jsx)(_6,{label:r(`paired.caFingerprint`),valueClassName:`font-mono break-all`,children:K9(e.caFingerprint)})]}),(0,K.jsx)(Roe,{label:r(`paired.forget`),icon:HH,title:r(`paired.forgetTitle`),description:r(`paired.forgetDescription`),confirmLabel:r(`paired.forgetConfirm`),size:`sm`,action:bfe,onSuccess:()=>void n()})]})}var Sfe=new Set([`pin-locked`,`reset-locked`]);function q9(e){return e.hub.caFingerprint}function Cfe({pairing:e}){return(0,K.jsxs)(`div`,{className:`space-y-0.5 min-w-0`,children:[(0,K.jsx)(`div`,{className:`text-xs text-foreground`,children:(0,K.jsx)(R9,{i18nKey:`requests.requestFrom`,values:{node:e.hub.nodeId},components:{b:(0,K.jsx)(`span`,{className:`font-semibold`})}})}),(0,K.jsx)(`div`,{className:`text-[11px] font-mono text-foreground-subtle break-all`,children:e.hub.url}),(0,K.jsx)(`div`,{className:`text-[11px] text-foreground-subtle`,children:(0,K.jsx)(R9,{i18nKey:`requests.caFingerprint`,values:{fingerprint:K9(e.hub.caFingerprint)},components:{mono:(0,K.jsx)(`span`,{className:`font-mono break-all`})}})})]})}function wfe({pending:e,onChanged:t}){let{t:n}=L9(),[r,i]=(0,s.useState)(null),[a,o]=(0,s.useState)(``),[c,l]=(0,s.useState)(``),[u,d]=(0,s.useState)(!1),[f,p]=(0,s.useState)(null),[m,h]=(0,s.useState)(null),[g,_]=(0,s.useState)({}),[v,y]=(0,s.useState)(()=>Date.now());(0,s.useEffect)(()=>{let e=setInterval(()=>y(Date.now()),1e3);return()=>clearInterval(e)},[]);let b=e.find(e=>q9(e)===r)??e[0],ee=H9(e),te=m!==null&&m>v;if(b===void 0)return null;let ne=q9(b),x=g[ne]??(b.localConfirmed===!0?b.code??null:null),S=x!==null,re=e=>{e!==ne&&(i(e),o(``),p(null))},ie=()=>ee?{pin:b.pin??``}:{pin:c.trim()},ae=e=>{if(p(G9(e)),e.retryAfterMs!==void 0&&Sfe.has(e.error??``)){let t=Date.now();y(t),h(t+e.retryAfterMs)}},oe=async()=>{d(!0),p(null);let e=await U9(dfe,{...ie(),code:a.trim()});if(d(!1),o(``),e.ok&&e.code!==void 0){let n=e.code;_(e=>({...e,[ne]:n})),l(``),await t();return}ae(e.ok?{ok:!1,message:n(`requests.noCodeReturned`)}:e),await t()},se=async()=>{d(!0),p(null);let e=await U9(ffe,ie());d(!1),e.ok||ae(e),o(``),await t()},ce=!u&&!te&&a.trim().length===6&&(ee||c.trim().length===8),le=!u&&!te&&(ee||c.trim().length===8);return(0,K.jsxs)(`div`,{className:`space-y-3`,children:[e.length>1&&(0,K.jsxs)(`div`,{className:`space-y-1`,role:`radiogroup`,"aria-label":n(`requests.pendingGroup`),children:[(0,K.jsx)(`div`,{className:`text-[10px] uppercase tracking-wider text-foreground-subtle font-medium`,children:n(`requests.pickOne`,{count:e.length})}),e.map(e=>(0,K.jsx)(WJ,{type:`button`,role:`radio`,"aria-checked":q9(e)===ne,variant:q9(e)===ne?`primary`:`outline`,size:`sm`,className:`w-full justify-start text-left h-auto py-1.5`,onClick:()=>re(q9(e)),children:(0,K.jsxs)(`span`,{className:`min-w-0 truncate`,children:[e.hub.nodeId,` · `,e.hub.url]})},q9(e)))]}),(0,K.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-start gap-2 min-w-0`,children:[(0,K.jsx)(xH,{className:`h-4 w-4 mt-0.5 shrink-0 text-warning`}),(0,K.jsx)(Cfe,{pairing:b})]}),(0,K.jsx)(HJ,{variant:`warning`,className:`shrink-0 font-mono`,title:n(`requests.timeLeft`),children:vfe(b.expiresAt,v)})]}),te&&m!==null&&(0,K.jsx)(B3,{variant:`warning`,title:n(`requests.lockedTitle`),message:n(`requests.lockedMessage`,{wait:W9(m-v)})}),S?(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(HJ,{variant:`success`,icon:(0,K.jsx)(QB,{className:`h-3 w-3`}),children:n(`requests.confirmedHere`)}),(0,K.jsxs)(`div`,{className:`space-y-1`,children:[(0,K.jsx)(`div`,{className:`text-[11px] text-foreground-subtle`,children:n(`requests.agentCodeLabel`)}),(0,K.jsx)(`div`,{className:`text-2xl font-mono tracking-widest text-foreground`,"data-testid":`agent-pairing-own-code`,children:yfe(x)})]}),(0,K.jsx)(`p`,{className:`text-[11px] text-foreground-subtle`,children:n(`requests.confirmedHint`)})]}):(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsx)(f9,{label:n(`requests.codeLabel`),description:n(`requests.codeHelp`,{digits:6}),children:(0,K.jsx)(kJ,{id:`agent-pairing-code`,"aria-label":n(`requests.codeLabel`),type:`text`,inputMode:`numeric`,autoComplete:`off`,maxLength:6,value:a,onChange:e=>o(e.target.value.replace(/\D/g,``)),placeholder:`000000`,className:`font-mono tracking-widest`,disabled:te})}),!ee&&(0,K.jsx)(f9,{label:n(`requests.pinLabel`),description:n(`requests.pinHelp`),children:(0,K.jsx)(kJ,{id:`agent-pairing-pin`,"aria-label":n(`requests.pinLabel`),type:`text`,inputMode:`numeric`,autoComplete:`off`,maxLength:8,value:c,onChange:e=>l(e.target.value.replace(/\D/g,``)),placeholder:n(`requests.pinPlaceholder`),className:`font-mono tracking-widest`,disabled:te})}),ee&&(0,K.jsx)(`p`,{className:`text-[11px] text-foreground-subtle`,children:n(`requests.noPinNeeded`)})]}),f!==null&&(0,K.jsx)(`p`,{role:`alert`,className:`text-[11px] text-danger`,children:f}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[!S&&(0,K.jsxs)(WJ,{type:`button`,variant:`primary`,size:`sm`,disabled:!ce,onClick:()=>void oe(),children:[(0,K.jsx)(QB,{className:`h-3 w-3`}),n(`requests.confirm`)]}),(0,K.jsxs)(WJ,{type:`button`,variant:`outline`,size:`sm`,disabled:!le,onClick:()=>void se(),children:[(0,K.jsx)($H,{className:`h-3 w-3`}),n(`requests.reject`)]})]})]})}function Tfe({local:e,onReset:t}){let{t:n}=L9(),[r,i]=(0,s.useState)(!1),[a,o]=(0,s.useState)(``),[c,l]=(0,s.useState)(!1),[u,d]=(0,s.useState)(!1),f=!e||u,[p,m]=(0,s.useState)(null),h=async()=>{l(!0),m(null);let e=await U9(pfe,f?{code:a.trim()}:{});if(l(!1),e.ok){o(``),m({ok:!0,text:n(`reset.done`)}),await t();return}e.error===`reset-code-required`&&d(!0),m({ok:!1,text:G9(e)})};return(0,K.jsxs)(`div`,{className:`border-t border-border pt-3 space-y-3`,children:[(0,K.jsxs)(WJ,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>i(e=>!e),children:[(0,K.jsx)(pH,{className:`h-3 w-3`}),n(r?`reset.hide`:`reset.show`)]}),r&&(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsx)(`p`,{className:`text-[11px] text-foreground-subtle`,children:n(`reset.explain`)}),f?(0,K.jsx)(f9,{label:n(`reset.codeLabel`),description:n(`reset.codeHelp`),children:(0,K.jsx)(kJ,{id:`agent-pairing-reset-code`,"aria-label":n(`reset.codeLabel`),type:`text`,inputMode:`numeric`,autoComplete:`off`,maxLength:8,value:a,onChange:e=>o(e.target.value),placeholder:n(`reset.codePlaceholder`)})}):(0,K.jsx)(`p`,{className:`text-[11px] text-foreground-subtle`,children:n(`reset.noCodeNeeded`)}),(0,K.jsx)(WJ,{type:`button`,variant:`outline`,size:`sm`,disabled:c||f&&a.trim().length===0,onClick:()=>void h(),children:n(c?`reset.resetting`:`reset.submit`)}),p!==null&&(0,K.jsx)(`p`,{role:`status`,className:p.ok?`text-[11px] text-success`:`text-[11px] text-danger`,children:p.text})]})]})}var Efe=2e3;function Dfe(e=Efe){let[t,n]=(0,s.useState)(null),[r,i]=(0,s.useState)(null),a=(0,s.useRef)(!0),o=(0,s.useRef)(async()=>void 0);return o.current=async()=>{try{let e=await hfe();if(!a.current)return;n(e),i(null)}catch(e){a.current&&i(e instanceof Error?e.message:z9(`common.unknownError`))}},(0,s.useEffect)(()=>{a.current=!0,o.current();let t=setInterval(()=>void o.current(),e);return()=>{a.current=!1,clearInterval(t)}},[e]),{view:t,error:r,refresh:()=>o.current()}}function Ofe({connectionState:e}){let{t}=L9();switch(e){case`connected`:return(0,K.jsx)(HJ,{variant:`success`,children:t(`hubConfig.connection.connected`)});case`unpaired`:return(0,K.jsx)(HJ,{variant:`warning`,children:t(`hubConfig.connection.unpaired`)});case`unconfigured`:return(0,K.jsx)(HJ,{variant:`default`,children:t(`hubConfig.connection.unconfigured`)});case`certificate-rejected`:return(0,K.jsx)(HJ,{variant:`danger`,children:t(`hubConfig.connection.certificateRejected`)});case`disconnected`:return(0,K.jsx)(HJ,{variant:`danger`,children:t(`hubConfig.connection.disconnected`)})}}function kfe(e,t,n){return t?.state===`paired`||t===null&&n?e(`hubConfig.pairingState.paired`):t?.state===`pending`?e(`hubConfig.pairingState.requested`):e(`hubConfig.pairingState.unpaired`)}function Afe({status:e,onSaved:t}){let[n,r]=(0,s.useState)(!1),[i,a]=(0,s.useState)(``),[o,c]=(0,s.useState)(!1),[l,u]=(0,s.useState)(null),{t:d}=L9();(0,s.useEffect)(()=>{n||a(e?.name??``)},[e?.name,n]);let f=(0,s.useCallback)(async()=>{let n=i.trim();if(n.length===0||n===e?.name){r(!1);return}c(!0),u(null);try{let e=await I9(`/api/agent/config`,{name:n});if(e.success===!1){u(e.error??d(`hubConfig.name.saveFailed`));return}r(!1),u(d(`hubConfig.name.saved`)),await t().catch(()=>void 0)}catch(e){u(d(`hubConfig.name.saveFailedWith`,{error:e instanceof Error?e.message:d(`common.unknownError`)}))}finally{c(!1)}},[i,e?.name,t,d]);return(0,K.jsxs)(`div`,{className:`border-t border-border pt-3 space-y-2`,children:[n?(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(p6,{htmlFor:`agent-name`,className:`text-[10px] text-foreground-subtle`,children:d(`hubConfig.name.label`)}),(0,K.jsx)(kJ,{id:`agent-name`,type:`text`,value:i,onChange:e=>a(e.target.value),placeholder:d(`hubConfig.name.placeholder`)}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsxs)(WJ,{type:`button`,variant:`primary`,size:`sm`,onClick:()=>void f(),disabled:o,children:[(0,K.jsx)(mH,{className:`h-3 w-3`}),d(o?`common.saving`:`common.save`)]}),(0,K.jsx)(WJ,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>r(!1),disabled:o,children:d(`common.cancel`)})]})]}):(0,K.jsx)(WJ,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>r(!0),children:d(`hubConfig.name.rename`)}),l!==null&&(0,K.jsx)(`p`,{className:`text-[11px] text-foreground-subtle`,children:l})]})}function J9({status:e,onStatusRefresh:t}){let{t:n}=L9(),r=Dfe(),i=r.view,a=e===null?`unpaired`:O9(e),o=e?.discoveredNodes??[],c=e?.hubAddress??e?.resolvedHubAddress??null,l=o.find(e=>e.isHub),u=l===void 0?null:k9(l,c).replace(/ \(hub\)$/,``),d=i?.state===`paired`||i===null&&e?.paired===!0,f=i?.pending??[],p=H9(f)||gfe(window.location.hostname),m=i===null&&r.error!==null&&r.error.includes(`404`),h=(0,s.useCallback)(async()=>{await r.refresh(),await t().catch(()=>void 0)},[r,t]);return(0,K.jsx)(v6,{headingId:`agent-hub-connection`,title:n(`hubConfig.title`),icon:_H,actions:(0,K.jsx)(Ofe,{connectionState:a}),children:(0,K.jsxs)(`div`,{className:`${f6} space-y-3`,children:[a===`certificate-rejected`&&(0,K.jsx)(B3,{variant:`warning`,title:n(`hubConfig.certRejected.title`),message:n(`hubConfig.certRejected.message`)}),a===`disconnected`&&d&&(0,K.jsx)(B3,{variant:`warning`,title:n(`hubConfig.unreachable.title`),message:n(`hubConfig.unreachable.message`)}),(0,K.jsxs)(`div`,{className:`space-y-0`,children:[(0,K.jsx)(_6,{label:n(`hubConfig.hubAddress`),valueClassName:`font-mono`,children:c??n(`hubConfig.connection.unpaired`)}),(0,K.jsx)(_6,{label:n(`hubConfig.pairing`),children:kfe(n,i,e?.paired===!0)}),o.length>0&&(0,K.jsx)(_6,{label:n(`hubConfig.clusterNodes`),children:(0,K.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:o.filter(e=>!e.id.includes(`/`)).map(e=>(0,K.jsx)(HJ,{variant:e.isHub?`info`:`default`,className:`text-[9px] font-mono`,title:e.id,children:k9(e,c)},e.id))})})]}),m&&(0,K.jsx)(B3,{variant:`warning`,message:n(`hubConfig.unsupported`)}),!m&&i===null&&r.error!==null&&(0,K.jsx)(B3,{variant:`warning`,title:n(`hubConfig.statusUnavailable`),message:r.error,onRetry:()=>void r.refresh()}),i!==null&&d&&(0,K.jsx)(xfe,{hub:e?.pairedHub??null,hubName:u,onForgotten:h}),i!==null&&!d&&f.length>0&&(0,K.jsx)(wfe,{pending:f,onChanged:h}),i!==null&&!d&&f.length===0&&(0,K.jsx)(`p`,{className:`text-xs text-foreground-subtle`,children:n(`hubConfig.emptyPairing`)}),i!==null&&!d&&(0,K.jsx)(Tfe,{local:p,onReset:h}),(0,K.jsx)(Afe,{status:e,onSaved:t})]})})}function jfe(e,t){switch(t){case`data-root`:return e(`updates.bootMode.dataRoot`);case`baked`:return e(`updates.bootMode.baked`);case`workspace`:return e(`updates.bootMode.workspace`);default:return t}}function Y9({text:e}){return(0,K.jsxs)(`div`,{className:`flex items-start gap-1.5 text-[11px] text-foreground-subtle`,children:[(0,K.jsx)(FV,{className:`h-3 w-3 shrink-0 mt-px`}),(0,K.jsx)(`span`,{children:e})]})}function Mfe(e,t,n){return t===`checking`?e(`updates.state.checking`):t===`staging`?e(`updates.state.staging`):t===`pending-restart`?n?e(`updates.state.pendingRestartVersion`,{version:n}):e(`updates.state.pendingRestart`):null}function Nfe({view:e,onCheck:t,onApply:n,checking:r,startError:i}){let[a,o]=(0,s.useState)(!1),{t:c}=L9(),{status:l,lastApply:u,applyInFlight:d,lastCheckError:f}=e,p=Mfe(c,l.updateState,l.pendingVersion),m=d||l.updateState===`staging`,h=l.updateState===`pending-restart`;return(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2 flex-wrap`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,K.jsx)(`span`,{className:`text-xs font-mono truncate`,children:l.packageName}),l.updateAvailable&&(0,K.jsx)(HJ,{variant:`warning`,className:`text-[10px]`,children:c(`updates.updateAvailable`)})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(WJ,{type:`button`,variant:`outline`,size:`sm`,onClick:t,disabled:r||m,children:c(r?`updates.checking`:`updates.check`)}),!h&&(0,K.jsxs)(WJ,{type:`button`,variant:a?`danger`:`primary`,size:`sm`,onClick:()=>{if(!a){o(!0);return}o(!1),n()},disabled:m||!l.updateAvailable,children:[(0,K.jsx)(yV,{className:`h-3 w-3`}),a?c(`updates.confirmApply`):l.latestVersion?c(`updates.applyTo`,{version:l.latestVersion}):c(`updates.apply`)]})]})]}),(0,K.jsxs)(`div`,{className:`space-y-0`,children:[(0,K.jsx)(_6,{label:c(`updates.running`),valueClassName:`font-mono`,children:l.runningVersion??`—`}),(0,K.jsx)(_6,{label:c(`updates.published`),valueClassName:`font-mono`,children:l.latestVersion??c(`updates.notChecked`)}),(0,K.jsx)(_6,{label:c(`updates.loadedFrom`),children:jfe(c,l.bootMode)})]}),a&&!m&&(0,K.jsx)(B3,{message:c(`updates.restartWarning`),variant:`warning`}),m&&(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px] text-warning`,children:[(0,K.jsx)(fH,{className:`h-3 w-3 animate-spin`}),p??c(`updates.state.working`)]}),!m&&h&&p&&(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px] text-warning`,children:[(0,K.jsx)(fH,{className:`h-3 w-3 animate-spin`}),p]}),i!==null&&(0,K.jsx)(B3,{message:i}),u!==null&&!u.accepted&&(0,K.jsx)(B3,{message:u.message}),u!==null&&u.accepted&&(0,K.jsx)(Y9,{text:u.message}),f!==null&&(0,K.jsx)(B3,{message:c(`updates.checkFailed`,{error:f})}),(0,K.jsx)(Y9,{text:c(`updates.npmNote`)})]})}function Pfe({locked:e,onUnauthorized:t}){let{t:n}=L9(),[r,i]=(0,s.useState)(null),[a,o]=(0,s.useState)(null),[c,l]=(0,s.useState)(!1),[u,d]=(0,s.useState)(null),f=(0,s.useCallback)(e=>{if(e instanceof N9){t();return}o(e instanceof Error?e.message:z9(`common.unknownError`))},[t]),p=(0,s.useCallback)(async()=>{try{i(await F9(`/api/agent/server-update`)),o(null)}catch(e){f(e)}},[f]);(0,s.useEffect)(()=>{if(e)return;let t=!0,n=()=>{t&&p()};n();let r=setInterval(n,5e3);return()=>{t=!1,clearInterval(r)}},[e,p]);let m=(0,s.useCallback)(async()=>{l(!0);try{await I9(`/api/agent/server-update/check`,{}),await p()}catch(e){o(e instanceof Error?e.message:z9(`updates.checkRequestFailed`))}finally{l(!1)}},[p]),h=(0,s.useRef)(!1);(0,s.useEffect)(()=>{e||h.current||r===null||!r.available||r.status.latestVersion!==null||r.status.updateState!==`idle`||(h.current=!0,m())},[e,r,m]);let g=(0,s.useCallback)(async()=>{d(null);try{let e=await I9(`/api/agent/server-update/apply`,{});!e.started&&e.message!==null&&d(e.message),await p()}catch(e){d(e instanceof Error?e.message:z9(`updates.applyFailed`))}},[p]);return(0,K.jsx)(v6,{headingId:`agent-updates`,title:n(`updates.title`),icon:yV,children:(0,K.jsxs)(`div`,{className:`${f6} space-y-4`,children:[a!==null&&(0,K.jsx)(B3,{message:n(`updates.readFailed`,{error:a})}),r===null&&a===null&&(0,K.jsx)(`div`,{className:`text-[11px] text-foreground-subtle`,children:n(`common.loading`)}),r!==null&&(r.available?(0,K.jsx)(Nfe,{view:r,onCheck:()=>void m(),onApply:()=>void g(),checking:c,startError:u}):(0,K.jsx)(Y9,{text:r.reason}))]})})}function X9(e){let t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60);return t>0?`${t}d ${n}h ${r}m`:n>0?`${n}h ${r}m`:`${r}m`}function Ffe({text:e}){let[t,n]=(0,s.useState)(!1);return(0,K.jsxs)(WJ,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>n(e=>!e),title:e,className:`h-auto py-0.5 px-1.5 text-[10px] text-danger hover:text-danger text-left max-w-[10rem] sm:max-w-[14rem] ${t?`whitespace-normal break-words`:``}`,children:[(0,K.jsx)(BH,{className:`h-3 w-3 shrink-0 mt-px`}),(0,K.jsx)(`span`,{className:t?`break-words`:`truncate`,children:e})]})}function Z9({label:e,value:t,icon:n,tone:r}){return(0,K.jsxs)(V3,{variant:`bordered`,className:`p-3 sm:p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,K.jsx)(n,{className:`h-4 w-4 ${r===`danger`?`text-danger`:r===`primary`?`text-primary`:`text-foreground-subtle`}`}),(0,K.jsx)(`span`,{className:`text-[10px] uppercase tracking-wider text-foreground-subtle font-medium`,children:e})]}),(0,K.jsx)(`div`,{className:`text-xl font-bold text-foreground`,children:t})]})}function Ife({productVersion:e,serverVersion:t,appVersion:n}){let{t:r}=L9(),i=typeof window<`u`?window.camstackAgentApp:void 0,[a,o]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(!i)return;let e=!0;i.getUpdateState().then(t=>{e&&o(t)});let t=i.onUpdateState(e=>o(e));return()=>{e=!1,t()}},[i]);let c=Jde({productVersion:e??n??i?.version??null,serverVersion:t??null,fallbackVersion:n??i?.version??null}),l=c.kind===`both`?r(`dashboard.version.both`,{product:c.productLabel,server:c.serverVersion}):c.kind===`product`?c.productLabel:c.kind===`server`?r(`dashboard.version.serverOnly`,{version:c.serverVersion}):c.kind===`fallback`?`v${c.version}`:null;return l===null&&!i?null:(0,K.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0 max-w-full flex-wrap justify-end`,children:[l!==null&&(0,K.jsx)(`span`,{"data-testid":`release-identity`,className:`text-[10px] font-mono text-foreground-subtle`,children:l}),i&&a?.downloaded&&(0,K.jsxs)(WJ,{type:`button`,variant:`primary`,size:`sm`,onClick:()=>i.installUpdate(),children:[(0,K.jsx)(yV,{className:`h-3 w-3`}),a.version?r(`dashboard.version.restartToUpdateTo`,{version:a.version}):r(`dashboard.version.restartToUpdate`)]}),i&&a&&!a.downloaded&&a.available&&(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[10px] text-warning`,children:[(0,K.jsx)(fH,{className:`h-3 w-3 animate-spin`}),r(`dashboard.version.downloading`)]}),i&&a&&!a.available&&!a.downloaded&&(0,K.jsx)(WJ,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>void i.checkForUpdates(),disabled:a.checking,children:a.checking?r(`dashboard.version.checking`):r(`dashboard.version.check`)}),i&&a?.error!=null&&!a.checking&&(0,K.jsx)(Ffe,{text:r(`dashboard.version.checkFailed`,{error:a.error})})]})}function Lfe({info:e}){let{t}=L9();return(0,K.jsx)(v6,{headingId:`agent-process`,title:t(`dashboard.process.title`),icon:mV,children:(0,K.jsxs)(`div`,{className:`${f6} space-y-0`,children:[(0,K.jsx)(_6,{label:t(`dashboard.process.pid`),valueClassName:`font-mono`,children:e?.pid??`—`}),(0,K.jsx)(_6,{label:t(`dashboard.process.uptime`),valueClassName:`font-mono`,children:e?X9(e.uptimeSeconds):`—`}),(0,K.jsx)(_6,{label:t(`dashboard.process.memory`),valueClassName:`font-mono`,children:e?`${e.rssMB} MB`:`—`}),(0,K.jsx)(_6,{label:t(`dashboard.process.heap`),valueClassName:`font-mono`,children:e?`${e.heapUsedMB} / ${e.heapTotalMB} MB`:`—`})]})})}function Q9({value:e,max:t,tone:n}){let r=t>0?Math.min(100,e/t*100):0;return(0,K.jsx)(`div`,{className:`h-2 bg-surface-hover rounded-full overflow-hidden`,children:(0,K.jsx)(`div`,{className:`h-full rounded-full transition-all ${n===`danger`?`bg-danger`:`bg-primary`}`,style:{width:`${r}%`}})})}function Rfe({status:e}){let{t}=L9(),n=e?.decode?.hwaccel??`—`,r=e?.decode?.driDevice??null,i=e?.detectionDevices??[];return(0,K.jsx)(v6,{headingId:`agent-decode-detection`,title:t(`dashboard.decode.title`),icon:hV,children:(0,K.jsxs)(`div`,{className:`${f6} space-y-0`,children:[(0,K.jsx)(_6,{label:t(`dashboard.decode.hwaccel`),valueClassName:`font-mono`,children:n}),(0,K.jsx)(_6,{label:t(`dashboard.decode.driDevice`),valueClassName:`font-mono`,children:r??`—`}),(0,K.jsx)(_6,{label:t(`dashboard.decode.detectionDevices`),children:i.length>0?(0,K.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:i.map(e=>(0,K.jsx)(HJ,{variant:`info`,className:`text-[10px] font-mono`,children:e},e))}):(0,K.jsx)(`span`,{className:`text-foreground-subtle`,children:t(`dashboard.decode.software`)})})]})})}function zfe({hubHttpsOrigin:e,nodeId:t}){let[n,r]=(0,s.useState)(e),[i,a]=(0,s.useState)(t),[o,c]=(0,s.useState)(!1),{t:l}=L9();(0,s.useEffect)(()=>{let e=!1;return fetch(`/api/agent/unlock-info`).then(e=>e.ok?e.json():null).then(t=>{e||t===null||(t.paired===!1&&c(!0),typeof t.hubHttpsOrigin==`string`&&r(t.hubHttpsOrigin),typeof t.nodeId==`string`&&a(t.nodeId))}).catch(()=>{}),()=>{e=!0}},[]);let u=e??n,d=t??i,f=(0,s.useCallback)(()=>{if(u===null||d===null)return;let e=`${window.location.origin}/`,t=new URL(`/system/nodes`,u);t.searchParams.set(`unlockNode`,d),t.searchParams.set(`returnTo`,e),window.location.assign(t.toString())},[u,d]);return o?(0,K.jsx)(`div`,{className:`min-h-screen bg-background text-foreground`,children:(0,K.jsx)(`div`,{className:`max-w-4xl mx-auto`,children:(0,K.jsx)(p9,{icon:gH,title:l(`dashboard.defaultName`),subtitle:(0,K.jsx)(`span`,{className:`font-mono`,children:d??`...`}),children:(0,K.jsx)(J9,{status:null,onStatusRefresh:async()=>window.location.reload()})})})}):(0,K.jsx)(`div`,{className:`min-h-screen bg-background text-foreground flex items-center justify-center p-2 sm:p-4`,children:(0,K.jsxs)(V3,{variant:`bordered`,className:`w-full max-w-sm p-6 space-y-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(gH,{className:`h-4 w-4 text-primary`}),(0,K.jsx)(`h1`,{className:`text-sm font-semibold`,children:l(`dashboard.locked.title`)})]}),(0,K.jsx)(`p`,{className:`text-xs text-foreground-subtle`,children:l(`dashboard.locked.body`)}),(0,K.jsx)(WJ,{type:`button`,variant:`primary`,className:`w-full`,disabled:u===null||d===null,onClick:f,children:l(`dashboard.locked.continue`)}),u===null&&(0,K.jsx)(`p`,{className:`text-[11px] text-foreground-subtle`,children:l(`dashboard.locked.hubUnknown`)})]})})}function Bfe(){let{t:e}=L9(),[t,n]=(0,s.useState)(null),[r,i]=(0,s.useState)(!1),[a,o]=(0,s.useState)(null),[c,l]=(0,s.useState)(!1),[u,d]=(0,s.useState)(`idle`),f=(0,s.useCallback)(async()=>{n(await F9(`/api/agent/status`)),i(!0),o(null)},[]);(0,s.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=e.get(`ticket`);if(t===null||t.length===0)return;let n=!1;return d(`redeeming`),Yde(t).then(()=>{if(n)return;e.delete(`ticket`);let t=e.toString();window.history.replaceState(null,``,t.length>0?`${window.location.pathname}?${t}`:window.location.pathname),d(`idle`),l(!1)}).catch(()=>{n||(d(`failed`),l(!0))}),()=>{n=!0}},[]),(0,s.useEffect)(()=>{if(c||u===`redeeming`)return;let e=!0,t=async()=>{try{let t=await F9(`/api/agent/status`);e&&(n(t),i(!0),o(null))}catch(t){if(e){if(t instanceof N9){l(!0);return}i(!1),o(t instanceof Error?t.message:z9(`common.unknownError`))}}};t();let r=setInterval(()=>void t(),3e3);return()=>{e=!1,clearInterval(r)}},[c,u]);let p=t?t.totalMemoryMB-t.freeMemoryMB:0,m=t?Math.round(p/t.totalMemoryMB*100):0,h=t?.cpuPercent??0;if(u===`redeeming`)return(0,K.jsx)(`div`,{className:`min-h-screen bg-background text-foreground flex items-center justify-center p-4 text-sm text-foreground-subtle`,children:e(`dashboard.unlocking`)});if(c)return(0,K.jsx)(zfe,{hubHttpsOrigin:t?.hubHttpsOrigin??null,nodeId:t?.nodeId??null});let g=O9(t),_=!r,v=_||g===`disconnected`||g===`certificate-rejected`?YH:XH,y=_?a??e(`dashboard.unreachable`):e(g===`connected`?`dashboard.hub.connected`:g===`unconfigured`?`dashboard.hub.unconfigured`:g===`unpaired`?`dashboard.hub.unpaired`:g===`certificate-rejected`?`dashboard.hub.certificateRejected`:`dashboard.hub.disconnected`),b=_?`danger`:g===`connected`?`success`:g===`unconfigured`||g===`unpaired`?`warning`:`danger`,ee=(t?.localIps??[]).filter(e=>!e.includes(`:`)).join(`, `)||`—`;return(0,K.jsx)(`div`,{className:`min-h-screen bg-background text-foreground`,children:(0,K.jsx)(`div`,{className:`max-w-4xl mx-auto`,children:(0,K.jsxs)(p9,{icon:gH,title:t?.name??e(`dashboard.defaultName`),subtitle:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:t?.nodeId??`...`}),t?.hostname&&(0,K.jsxs)(`span`,{className:`ml-2`,children:[`· `,t.hostname]}),ee!==`—`&&(0,K.jsxs)(`span`,{className:`ml-2`,children:[`· `,ee]})]}),actions:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Ife,{productVersion:t?.productVersion,serverVersion:t?.serverVersion,appVersion:t?.appVersion}),(0,K.jsxs)(HJ,{variant:b,className:`inline-flex items-center gap-1.5 shrink-0`,children:[(0,K.jsx)(v,{className:`h-3 w-3`}),(0,K.jsx)(`span`,{className:`max-w-[8rem] sm:max-w-none truncate`,children:y})]})]}),children:[(0,K.jsx)(v6,{headingId:`agent-overview`,title:e(`dashboard.overview.title`),icon:zB,children:(0,K.jsxs)(`div`,{className:`${f6} grid grid-cols-2 md:grid-cols-4 gap-2 sm:gap-4`,children:[(0,K.jsx)(Z9,{icon:hV,label:e(`dashboard.overview.cpu`),value:`${h}%`,tone:h>80?`danger`:`primary`}),(0,K.jsx)(Z9,{icon:KV,label:e(`dashboard.overview.memory`),value:`${m}%`,tone:m>90?`danger`:`primary`}),(0,K.jsx)(Z9,{icon:rH,label:e(`dashboard.overview.addons`),value:String(t?.addons.length??0)}),(0,K.jsx)(Z9,{icon:sV,label:e(`dashboard.overview.uptime`),value:t?X9(t.uptime):`—`})]})}),(0,K.jsx)(J9,{status:t,onStatusRefresh:f}),(0,K.jsx)(lfe,{locked:c,onUnauthorized:()=>l(!0)}),(0,K.jsx)(Pfe,{locked:c,onUnauthorized:()=>l(!0)}),(0,K.jsx)(Rfe,{status:t}),(0,K.jsx)(v6,{headingId:`agent-resources`,title:e(`dashboard.resources.title`),icon:kV,children:(0,K.jsxs)(`div`,{className:`${f6} space-y-4`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`flex justify-between text-xs text-foreground-subtle mb-1`,children:[(0,K.jsx)(`span`,{children:t?.cpuModel?e(`dashboard.resources.cpuCoresModel`,{cores:t.cpuCores??0,model:t.cpuModel}):e(`dashboard.resources.cpuCores`,{cores:t?.cpuCores??0})}),(0,K.jsxs)(`span`,{children:[h,`%`]})]}),(0,K.jsx)(Q9,{value:h,max:100,tone:h>80?`danger`:`primary`})]}),(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`flex justify-between text-xs text-foreground-subtle mb-1`,children:[(0,K.jsx)(`span`,{children:e(`dashboard.resources.memory`,{used:p,total:t?.totalMemoryMB??0})}),(0,K.jsxs)(`span`,{children:[m,`%`]})]}),(0,K.jsx)(Q9,{value:m,max:100,tone:m>90?`danger`:`primary`})]})]})}),(0,K.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-6`,children:[(0,K.jsx)(v6,{headingId:`agent-system-host`,title:e(`dashboard.host.title`),icon:gH,children:(0,K.jsxs)(`div`,{className:`${f6} space-y-0`,children:[(0,K.jsxs)(_6,{label:e(`dashboard.host.platform`),valueClassName:`font-mono`,children:[t?.platform,` / `,t?.arch]}),(0,K.jsx)(_6,{label:e(`dashboard.host.hostname`),valueClassName:`font-mono`,children:t?.hostname??`—`}),(0,K.jsx)(_6,{label:e(`dashboard.host.uptime`),valueClassName:`font-mono`,children:t?X9(t.uptime):`—`}),(0,K.jsx)(_6,{label:e(`dashboard.host.memory`),valueClassName:`font-mono`,children:t?`${p} / ${t.totalMemoryMB} MB`:`—`}),(0,K.jsx)(_6,{label:e(`dashboard.host.ipv4`),valueClassName:`font-mono`,children:ee})]})}),(0,K.jsx)(Lfe,{info:t?.agentProcess})]})]})})})}$de();var $9=document.getElementById(`root`);$9&&(0,UQ.createRoot)($9).render((0,K.jsx)(Qde,{children:(0,K.jsx)(Bfe,{})}));export{ZB as C,SV as S,zH as _,Ioe as a,JV as b,noe as c,L3 as d,R3 as f,OK as g,qJ as h,Aoe as i,Iae as l,QQ as m,y6 as n,Noe as o,$Q as p,Poe as r,b6 as s,Pde as t,jae as u,jH as v,G as w,NV as x,pH as y};
|