@kedem/okdb 1.0.1 → 1.0.4
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/bin/okdb.js +1 -1
- package/keys/public.pem +3 -0
- package/okdb.js +1 -1
- package/package.json +2 -2
- package/public/admin-app.js +1 -1
- package/public/components/admin-route-host.ok.js +1 -1
- package/public/components/env-picker.ok.js +1 -1
- package/public/components/field-path-input.ok.js +1 -1
- package/public/components/field.html +154 -2
- package/public/components/geo-map.ok.js +1 -1
- package/public/components/ok-cron-input.ok.js +1 -1
- package/public/components/ok-dropzone.ok.js +1 -1
- package/public/components/ok-js-input.ok.js +1 -1
- package/public/components/ok-json-input.ok.js +1 -1
- package/public/components/ok-text-monaco-input.ok.js +1 -1
- package/public/components/theme-toggle.ok.js +1 -1
- package/public/index.html +29 -2
- package/public/layouts/_default.ok.html +1 -1
- package/public/layouts/okdb-cube.ok.html +1 -1
- package/public/login-app.js +1 -1
- package/public/login.html +205 -1
- package/public/modules/ok.js +1 -1
- package/public/sections/api/index.ok.html +1 -1
- package/public/sections/api/parts/api-endpoint.ok.js +1 -1
- package/public/sections/auth/index.ok.html +1 -1
- package/public/sections/auth/modals/create-token-modal.ok.js +1 -1
- package/public/sections/auth/modals/edit-token-modal.ok.js +1 -1
- package/public/sections/auth/modals/perm-info-popover.ok.js +1 -1
- package/public/sections/auth/parts/token-detail.ok.js +1 -1
- package/public/sections/auth/parts/token-list.ok.js +1 -1
- package/public/sections/db/index.ok.html +1 -1
- package/public/sections/db/modals/add-item-modal.ok.js +1 -1
- package/public/sections/db/modals/create-env-modal.ok.js +1 -1
- package/public/sections/db/modals/create-fts-modal.ok.js +1 -1
- package/public/sections/db/modals/create-index-modal.ok.js +1 -1
- package/public/sections/db/modals/create-pipeline-modal.ok.js +1 -1
- package/public/sections/db/modals/demo-env-modal.ok.js +1 -1
- package/public/sections/db/modals/remove-env-modal.ok.js +1 -1
- package/public/sections/db/modals/schema-edit-modal.ok.js +1 -1
- package/public/sections/db/parts/db-overview.ok.js +1 -1
- package/public/sections/db/parts/db-pipelines-panel.ok.js +1 -1
- package/public/sections/db/parts/edit-row.ok.js +1 -1
- package/public/sections/db/parts/tm-timeline.ok.js +1 -1
- package/public/sections/db/parts/type-changelog.ok.js +1 -1
- package/public/sections/db/parts/type-list.ok.js +1 -1
- package/public/sections/db/parts/type-pipelines-tab.ok.js +1 -1
- package/public/sections/db/parts/type-schema-tab.ok.js +1 -1
- package/public/sections/db/parts/type-viewer.ok.js +1 -1
- package/public/sections/db/parts/type-violations-tab.ok.js +1 -1
- package/public/sections/docs/index.ok.html +1 -1
- package/public/sections/embeddings/index.ok.html +1 -1
- package/public/sections/embeddings/modals/register-model-modal.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-create-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-embedder-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-engine-declaration-editor.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-engine-list.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-indexer-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-lifecycle-bar.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-model-catalog.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-overview.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-search-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-worker-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embeddings-engine-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/engines-overview.ok.js +1 -1
- package/public/sections/embeddings/parts/pipeline-create-panel.ok.js +1 -1
- package/public/sections/engines/engine-panel-shared-style.js +1 -1
- package/public/sections/engines/engine-ui-utils.js +1 -1
- package/public/sections/engines/index.ok.html +1 -1
- package/public/sections/engines/modals/engine-modal.ok.js +1 -1
- package/public/sections/engines/parts/engine-declaration-editor.ok.js +1 -1
- package/public/sections/engines/parts/engine-lifecycle-actions.ok.js +1 -1
- package/public/sections/engines/parts/engine-panel-shell.ok.js +1 -1
- package/public/sections/engines/parts/engine-resource-card.ok.js +1 -1
- package/public/sections/engines/parts/engine-row-item.ok.js +1 -1
- package/public/sections/engines/parts/generic-engine-panel.ok.js +1 -1
- package/public/sections/files/index.ok.html +1 -1
- package/public/sections/files/parts/files-blob-status.ok.js +1 -1
- package/public/sections/files/parts/files-collection-list.ok.js +1 -1
- package/public/sections/files/parts/files-collection-panel.ok.js +1 -1
- package/public/sections/files/parts/files-file-list.ok.js +1 -1
- package/public/sections/files/parts/files-overview.ok.js +1 -1
- package/public/sections/files/parts/files-path-browser.ok.js +1 -1
- package/public/sections/files/parts/files-upload-panel.ok.js +1 -1
- package/public/sections/functions/index.ok.html +1 -1
- package/public/sections/functions/modals/function-modal.ok.js +1 -1
- package/public/sections/functions/parts/function-detail.ok.js +1 -1
- package/public/sections/functions/parts/function-logs.ok.js +1 -1
- package/public/sections/functions/parts/function-runner.ok.js +1 -1
- package/public/sections/functions/parts/functions-list.ok.js +1 -1
- package/public/sections/license/index.ok.html +1 -1
- package/public/sections/license/parts/license-panel.ok.js +1 -1
- package/public/sections/processors/index.ok.html +1 -1
- package/public/sections/queue/index.ok.html +1 -1
- package/public/sections/queue/modals/create-bucket-modal.ok.js +1 -1
- package/public/sections/queue/modals/edit-bucket-modal.ok.js +1 -1
- package/public/sections/queue/modals/edit-job-modal.ok.js +1 -1
- package/public/sections/queue/modals/enqueue-job-modal.ok.js +1 -1
- package/public/sections/queue/modals/job-type-modal.ok.js +1 -1
- package/public/sections/queue/parts/ok-job-form.ok.js +1 -1
- package/public/sections/queue/parts/queue-buckets.ok.js +1 -1
- package/public/sections/queue/parts/queue-job-types.ok.js +1 -1
- package/public/sections/queue/parts/queue-jobs.ok.js +1 -1
- package/public/sections/queue/parts/queue-types.ok.js +1 -1
- package/public/sections/queue/parts/queue-workers.ok.js +1 -1
- package/public/sections/sync/index.ok.html +1 -1
- package/public/sections/sync/parts/sync-node-detail.ok.js +1 -1
- package/public/sections/sync/parts/sync-retention.ok.js +1 -1
- package/public/sections/sync/parts/sync-topology.ok.js +1 -1
- package/public/sections/system/index.ok.html +1 -1
- package/public/sections/system/modals/data-ops-modal.ok.js +1 -1
- package/public/sections/system/parts/system-api-panel.ok.js +1 -1
- package/public/sections/system/parts/system-auth-panel.ok.js +1 -1
- package/public/sections/system/parts/system-log-history.ok.js +1 -1
- package/public/sections/system/parts/system-log.ok.js +1 -1
- package/public/sections/system/parts/system-status.ok.js +1 -1
- package/public/sections/system/parts/system-sync-panel.ok.js +1 -1
- package/public/sections/views/index.ok.html +1 -1
- package/public/sections/views/modals/create-view-modal.ok.js +1 -1
- package/public/sections/views/parts/view-detail.ok.js +1 -1
- package/public/sections/views/parts/views-list.ok.js +1 -1
- package/public/sections/views/parts/views-overview.ok.js +1 -1
- package/public/setup-app.js +1 -1
- package/public/setup.html +189 -1
- package/public/stores/auth-store.js +1 -1
- package/public/stores/events-store.js +1 -1
- package/public/stores/functions-store.js +1 -1
- package/public/stores/okdb-store.js +1 -1
- package/public/stores/theme-store.js +1 -1
- package/public/test-cron-input.html +53 -3
- package/public/test-json-input.html +182 -3
- package/public/util/permissions.js +1 -1
- package/public/util/sift-schema.js +1 -1
- package/public/vendor/okjs/ok.esm.min.js +1 -2
- package/public/view-models/type-query-vm.js +1 -1
- package/okdb-data/default/data.mdb +0 -0
- package/okdb-data/default/lock.mdb +0 -0
- package/okdb-data/~log/data.mdb +0 -0
- package/okdb-data/~log/lock.mdb +0 -0
- package/okdb-data/~system/data.mdb +0 -0
- package/okdb-data/~system/lock.mdb +0 -0
- package/public/images/logo.png +0 -0
- package/public/images/logo.svg +0 -333
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xe21ad8=_0x53d2;(function(_0x3cd30d,_0x43f3fb){const _0x9c2161=_0x53d2,_0x3c7f5b=_0x3cd30d();while(!![]){try{const _0x2d3fd7=parseInt(_0x9c2161(0x1be))/0x1*(parseInt(_0x9c2161(0x1b0))/0x2)+parseInt(_0x9c2161(0x1ca))/0x3*(parseInt(_0x9c2161(0x1bb))/0x4)+-parseInt(_0x9c2161(0x238))/0x5+-parseInt(_0x9c2161(0x21c))/0x6+-parseInt(_0x9c2161(0x1f5))/0x7+-parseInt(_0x9c2161(0x1e2))/0x8*(parseInt(_0x9c2161(0x1ef))/0x9)+parseInt(_0x9c2161(0x1ed))/0xa;if(_0x2d3fd7===_0x43f3fb)break;else _0x3c7f5b['push'](_0x3c7f5b['shift']());}catch(_0x22b296){_0x3c7f5b['push'](_0x3c7f5b['shift']());}}}(_0x1ccf,0xbe690));import _0x3df25a from'../../../stores/events-store.js';function _0x53d2(_0x4c119e,_0x56bbb7){_0x4c119e=_0x4c119e-0x1ae;const _0x1ccfaa=_0x1ccf();let _0x53d2a2=_0x1ccfaa[_0x4c119e];return _0x53d2a2;}function _0x1ccf(){const _0x263630=['isNaN','data','push','trim','degraded','length','env','externalSelectedPipeline','okdb','1085076MMcZys','var(--okdb-sky)','role','engines','health','type','status','selectedEnv','db-pipelines-panel','filteredPipelines','message','/pipelines/','json','stores','engine:installed','/start','Delete\x20pipeline\x20\x22<b>','object','open','owned','var(--okdb-app-fg-muted)','Stop\x20pipeline\x20\x22<b>','online','progress','store:','source_env','number','<engine-modal\x20:modal=\x22modal\x22\x20:engine=\x22engine\x22\x20:env=\x22envName\x22\x20:on-done=\x22onDone\x22\x20/>','1825760kFHVal','exists','selectedpipeline','handler:','var(--okdb-warning)','2332306VAcpSp','Failed\x20to\x20load\x20pipelines','/pipelines','actionBusy','busy','confirm','memberOwnerEnv','runtime','Stop\x20failed','Deleted\x20pipeline\x20\x22','</b>\x22?','501028GkaShZ','/db','state','1HeranT','$dispatch','Started\x20pipeline\x20\x22','result','source\x20env:','font-size:10px;padding:2px\x207px;border-radius:999px;border:1px\x20solid\x20','localeCompare','_request','info','success','</b>\x22?<br><br>','shared','30nPLUQZ','join','source_type','string','phase','pipelineKey','search','var(--okdb-success)','label','job:','Stopped\x20pipeline\x20\x22','load','$watch','toLocaleString','selectedPipeline','<br><br>Env-owned\x20members\x20will\x20be\x20removed;\x20shared\x20members\x20will\x20be\x20preserved.','$vars','meta','isAllEnvs','envName','Edit\x20Engine\x20·\x20','resolve','name','No\x20members','1434176doDDPe','toLowerCase','catch','/env/','envname','API','select','job_type','sort','<br>','var(--okdb-danger)','4913110qHXLLp','DELETE','9FzpaVC','relatedEnv','selectedKey','$ok','stopped','engine:uninstalled','9833908DUdRud','toast','true','find','flatMap','config','\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipelines-wrap\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20flex-direction:\x20column;\x0a\x20\x20\x20\x20\x20\x20\x20\x20gap:\x2014px;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipelines-head\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20justify-content:\x20space-between;\x0a\x20\x20\x20\x20\x20\x20\x20\x20gap:\x2012px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20flex-start;\x0a\x20\x20\x20\x20\x20\x20\x20\x20flex-wrap:\x20wrap;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipelines-title\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2014px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20font-weight:\x20600;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipelines-sub\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2012px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20opacity:\x20.5;\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin-top:\x204px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20max-width:\x20560px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20line-height:\x201.6;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipelines-error\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20var(--okdb-danger);\x0a\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2012px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2010px\x2012px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x2010px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border:\x201px\x20solid\x20color-mix(in\x20srgb,\x20var(--okdb-danger)\x2033%,\x20transparent);\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20color-mix(in\x20srgb,\x20var(--okdb-danger)\x205%,\x20transparent);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipelines-empty\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20border:\x201px\x20dashed\x20var(--okdb-app-border);\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x2012px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2028px\x2024px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20flex-direction:\x20column;\x0a\x20\x20\x20\x20\x20\x20\x20\x20gap:\x2010px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipelines-layout\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20grid;\x0a\x20\x20\x20\x20\x20\x20\x20\x20grid-template-columns:\x20minmax(240px,\x20300px)\x20minmax(0,\x201fr);\x0a\x20\x20\x20\x20\x20\x20\x20\x20gap:\x2014px;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipelines-list-card,\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipelines-detail-card\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20border:\x201px\x20solid\x20var(--okdb-app-border);\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x2012px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20var(--okdb-app-bg);\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipelines-list-head\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2012px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-bottom:\x201px\x20solid\x20var(--okdb-app-border);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipelines-list\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20flex-direction:\x20column;\x0a\x20\x20\x20\x20\x20\x20\x20\x20gap:\x208px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2010px;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipeline-row\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20width:\x20100%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20text-align:\x20left;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x2010px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border:\x201px\x20solid\x20var(--okdb-app-border);\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20var(--okdb-app-bg-deep);\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2010px\x2011px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipeline-row:hover\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-color:\x20var(--okdb-app-border-strong);\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20var(--okdb-app-bg-deep);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipeline-row--active\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-color:\x20color-mix(in\x20srgb,\x20var(--okdb-accent)\x2033%,\x20transparent);\x0a\x20\x20\x20\x20\x20\x20\x20\x20box-shadow:\x20inset\x200\x200\x200\x201px\x20color-mix(in\x20srgb,\x20var(--okdb-accent)\x2013%,\x20transparent);\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20#10202a;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipelines-detail-card\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2014px;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipelines-members\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20flex-direction:\x20column;\x0a\x20\x20\x20\x20\x20\x20\x20\x20gap:\x2010px;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipeline-member-card\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20border:\x201px\x20solid\x20var(--okdb-app-border);\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x2010px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2012px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20var(--okdb-app-bg-deep);\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20flex-direction:\x20column;\x0a\x20\x20\x20\x20\x20\x20\x20\x20gap:\x2010px;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipeline-member-error\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2012px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20line-height:\x201.6;\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20var(--okdb-danger);\x0a\x20\x20\x20\x20\x20\x20\x20\x20border:\x201px\x20solid\x20var(--okdb-danger-deep-border);\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20#450a0a33;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x208px\x2010px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x208px;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20@media\x20(max-width:\x20860px)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20db-pipelines-panel\x20.pipelines-layout\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20grid-template-columns:\x201fr;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20','$attr','some','relatedType','/stop','filter','_unsubs','includes','applyExternalSelection','storeEnv','selectEnv',';background:','modal','55;color:','pipelines','engine:stopped','has','POST','error','Delete\x20failed','map','add','type:','handler'];_0x1ccf=function(){return _0x263630;};return _0x1ccf();}import _0x21acbd from'../../engines/modals/engine-modal.ok.js';export default{'tag':_0xe21ad8(0x224),'dependencies':[_0x21acbd],'attr':{'showall':{},'envname':{},'selectedpipeline':{}},'context':_0x598328=>({'busy':!0x1,'error':null,'search':'','pipelines':[],'selectedKey':null,'actionBusy':!0x1,'_unsubs':[],get 'isAllEnvs'(){const _0x15f098=_0xe21ad8;return!0x0===_0x598328[_0x15f098(0x1fc)]['showall']||_0x15f098(0x1f7)===_0x598328['$attr']['showall'];},get 'envName'(){const _0x45baa6=_0xe21ad8;return _0x598328[_0x45baa6(0x1fc)][_0x45baa6(0x1e6)]||_0x598328[_0x45baa6(0x1f2)][_0x45baa6(0x229)][_0x45baa6(0x21b)]['selectedEnv']||'default';},get 'externalSelectedPipeline'(){const _0x40da4c=_0xe21ad8;return String(_0x598328[_0x40da4c(0x1fc)]['selectedpipeline']||'');},'pipelineKey'(_0x5bb038){const _0x5d494a=_0xe21ad8;return(_0x5bb038?.['env']||this[_0x5d494a(0x1dd)])+'::'+(_0x5bb038?.[_0x5d494a(0x1e0)]||'');},get 'filteredPipelines'(){const _0x14e2e1=_0xe21ad8,_0x5ab0a9=this[_0x14e2e1(0x1d0)][_0x14e2e1(0x216)]()[_0x14e2e1(0x1e3)](),_0x40a408=[...this['pipelines']][_0x14e2e1(0x1ea)]((_0x3fd572,_0x3fec62)=>{const _0x3eb7a1=_0x14e2e1,_0x353b85=String(_0x3fd572['env']||'')[_0x3eb7a1(0x1c4)](String(_0x3fec62[_0x3eb7a1(0x219)]||''));return 0x0!==_0x353b85?_0x353b85:_0x3fd572['name'][_0x3eb7a1(0x1c4)](_0x3fec62[_0x3eb7a1(0x1e0)]);});return _0x5ab0a9?_0x40a408[_0x14e2e1(0x200)](_0x4892e8=>[_0x4892e8[_0x14e2e1(0x219)],_0x4892e8[_0x14e2e1(0x1e0)],_0x4892e8[_0x14e2e1(0x1db)]?.[_0x14e2e1(0x1d2)],_0x4892e8[_0x14e2e1(0x222)],_0x4892e8[_0x14e2e1(0x220)],...(_0x4892e8[_0x14e2e1(0x21f)]||[])[_0x14e2e1(0x1f9)](_0x15decf=>[_0x15decf[_0x14e2e1(0x21e)],_0x15decf['type'],_0x15decf['name'],_0x15decf[_0x14e2e1(0x1bd)],_0x15decf[_0x14e2e1(0x1fa)]?.[_0x14e2e1(0x1cc)],_0x15decf[_0x14e2e1(0x1fa)]?.[_0x14e2e1(0x1e9)]])][_0x14e2e1(0x200)](Boolean)[_0x14e2e1(0x1cb)]('\x20')[_0x14e2e1(0x1e3)]()[_0x14e2e1(0x202)](_0x5ab0a9)):_0x40a408;},get 'selectedPipeline'(){const _0x56993b=_0xe21ad8;return 0x0===this[_0x56993b(0x225)]['length']?null:this['filteredPipelines'][_0x56993b(0x1f8)](_0x16ebf6=>this['pipelineKey'](_0x16ebf6)===this['selectedKey'])??this[_0x56993b(0x225)][0x0];},'applyExternalSelection'(){const _0xc4a198=_0xe21ad8,_0x30a54a=this[_0xc4a198(0x21a)][_0xc4a198(0x216)]();if(!_0x30a54a||0x0===this['pipelines'][_0xc4a198(0x218)])return;const _0x4f5435=this[_0xc4a198(0x209)]['find'](_0x3ec97f=>this['pipelineKey'](_0x3ec97f)===_0x30a54a)??this[_0xc4a198(0x209)][_0xc4a198(0x1f8)](_0x10c403=>_0x10c403?.[_0xc4a198(0x1e0)]===_0x30a54a)??null;if(_0x4f5435){const _0x5b5f10=this[_0xc4a198(0x1cf)](_0x4f5435);this[_0xc4a198(0x1f1)]!==_0x5b5f10&&(this[_0xc4a198(0x1f1)]=_0x5b5f10);}},get 'selectedRelatedTypes'(){const _0x2642cb=_0xe21ad8,_0x368d67=this[_0x2642cb(0x1d8)];if(!_0x368d67)return[];const _0xff9f59=new Set(),_0x69d81=[];for(const _0x57c26c of _0x368d67[_0x2642cb(0x21f)]||[]){const _0x36e0ce=this[_0x2642cb(0x1fe)](_0x57c26c);_0x36e0ce&&!_0xff9f59[_0x2642cb(0x20b)](_0x36e0ce)&&(_0xff9f59[_0x2642cb(0x210)](_0x36e0ce),_0x69d81[_0x2642cb(0x215)]({'type':_0x36e0ce,'env':this[_0x2642cb(0x1f0)](_0x57c26c)}));}return _0x69d81;},async 'load'(){const _0xf3c4a4=_0xe21ad8;this[_0xf3c4a4(0x1b4)]=!0x0,this[_0xf3c4a4(0x20d)]=null;try{const _0x5d27ff=this['isAllEnvs']?__ENV__['API']+_0xf3c4a4(0x1b2):__ENV__[_0xf3c4a4(0x1e7)]+'/env/'+encodeURIComponent(this[_0xf3c4a4(0x1dd)])+_0xf3c4a4(0x1b2),_0x15f13b=await fetch(_0x5d27ff),_0x50536b=await _0x15f13b[_0xf3c4a4(0x228)]()['catch'](()=>({}));if(!_0x15f13b['ok'])throw new Error(_0x50536b?.[_0xf3c4a4(0x20d)]?.[_0xf3c4a4(0x226)]||_0xf3c4a4(0x1b1));this['pipelines']=_0x50536b['data']??_0x50536b['result']??[],this[_0xf3c4a4(0x203)](),this[_0xf3c4a4(0x209)][_0xf3c4a4(0x1fd)](_0x4a917e=>this[_0xf3c4a4(0x1cf)](_0x4a917e)===this[_0xf3c4a4(0x1f1)])||(this[_0xf3c4a4(0x1f1)]=this[_0xf3c4a4(0x209)][0x0]?this[_0xf3c4a4(0x1cf)](this[_0xf3c4a4(0x209)][0x0]):null);}catch(_0x44c764){this[_0xf3c4a4(0x20d)]=_0x44c764?.[_0xf3c4a4(0x226)]||String(_0x44c764),this[_0xf3c4a4(0x209)]=[],this[_0xf3c4a4(0x1f1)]=null;}finally{this[_0xf3c4a4(0x1b4)]=!0x1;}},'selectPipeline'(_0x4311fb){const _0x443c6e=_0xe21ad8;this[_0x443c6e(0x1f1)]=this[_0x443c6e(0x1cf)](_0x4311fb),_0x598328[_0x443c6e(0x1bf)](_0x443c6e(0x1e8),_0x4311fb);},'healthColor':_0x55fa4c=>_0xe21ad8(0x232)===_0x55fa4c?'var(--okdb-success)':'degraded'===_0x55fa4c?_0xe21ad8(0x1af):_0xe21ad8(0x20d)===_0x55fa4c?_0xe21ad8(0x1ec):_0xe21ad8(0x230),'stateColor':_0x1667e3=>_0xe21ad8(0x232)===_0x1667e3?_0xe21ad8(0x1d1):_0xe21ad8(0x217)===_0x1667e3?'var(--okdb-warning)':'error'===_0x1667e3||'missing'===_0x1667e3?'var(--okdb-danger)':_0xe21ad8(0x1f3)===_0x1667e3?_0xe21ad8(0x230):_0xe21ad8(0x21d),'chipStyle':(_0x192a53,_0x5ebb64=!0x1)=>_0xe21ad8(0x1c3)+_0x192a53+_0xe21ad8(0x208)+_0x192a53+_0xe21ad8(0x206)+(_0x5ebb64?'transparent':_0x192a53+'12')+';white-space:nowrap;','summaryText'(_0x4cbe22){const _0x39d4f0=_0xe21ad8,_0x5cb08f=_0x4cbe22[_0x39d4f0(0x21f)]||[];return 0x0===_0x5cb08f['length']?_0x39d4f0(0x1e1):_0x5cb08f[_0x39d4f0(0x20f)](_0x907ec=>_0x907ec[_0x39d4f0(0x21e)]||_0x907ec['type'])[_0x39d4f0(0x1cb)]('\x20·\x20');},'formatNumber':_0x43aa6e=>null==_0x43aa6e||Number[_0xe21ad8(0x213)](Number(_0x43aa6e))?null:Number(_0x43aa6e)[_0xe21ad8(0x1d7)](),'progressLabel'(_0x44f8ac){const _0x3c3f2c=_0xe21ad8,_0x3edc83=_0x44f8ac[_0x3c3f2c(0x233)]??_0x44f8ac[_0x3c3f2c(0x1b7)]?.[_0x3c3f2c(0x233)]??null;if(null==_0x3edc83)return null;if('string'==typeof _0x3edc83||_0x3c3f2c(0x236)==typeof _0x3edc83)return String(_0x3edc83);if(_0x3c3f2c(0x22d)==typeof _0x3edc83&&_0x3c3f2c(0x1cd)==typeof _0x3edc83[_0x3c3f2c(0x1ce)])return _0x3edc83['phase'];try{return JSON['stringify'](_0x3edc83);}catch{return'progress';}},'relatedType':_0x4452da=>_0x4452da?.[_0xe21ad8(0x1fa)]?.['source_type']??_0x4452da?.[_0xe21ad8(0x1b7)]?.['source_type']??null,'relatedEnv'(_0x51d025){const _0x9d75f2=_0xe21ad8;return _0x51d025?.[_0x9d75f2(0x1fa)]?.[_0x9d75f2(0x235)]??_0x51d025?.[_0x9d75f2(0x1b7)]?.[_0x9d75f2(0x235)]??this[_0x9d75f2(0x1dd)];},'memberOwnerEnv'(_0x43b4ee){const _0x301d55=_0xe21ad8;return _0x43b4ee?.['storeEnv']??_0x43b4ee?.[_0x301d55(0x219)]??this[_0x301d55(0x1f0)](_0x43b4ee)??this[_0x301d55(0x1d8)]?.[_0x301d55(0x219)]??this[_0x301d55(0x1dd)];},'memberFacts'(_0x343735){const _0x4541f3=_0xe21ad8,_0x54655d=[];return _0x343735?.[_0x4541f3(0x1fa)]?.['job_type']&&_0x54655d[_0x4541f3(0x215)](_0x4541f3(0x1d3)+_0x343735[_0x4541f3(0x1fa)][_0x4541f3(0x1e9)]),_0x343735?.[_0x4541f3(0x1fa)]?.[_0x4541f3(0x212)]?.[_0x4541f3(0x1e0)]&&_0x54655d[_0x4541f3(0x215)](_0x4541f3(0x1ae)+_0x343735['config'][_0x4541f3(0x212)][_0x4541f3(0x1e0)]),_0x343735?.[_0x4541f3(0x1fa)]?.[_0x4541f3(0x1cc)]&&_0x54655d[_0x4541f3(0x215)](_0x4541f3(0x211)+_0x343735[_0x4541f3(0x1fa)]['source_type']),_0x343735?.[_0x4541f3(0x1fa)]?.[_0x4541f3(0x235)]&&_0x343735[_0x4541f3(0x1fa)]['source_env']!==this[_0x4541f3(0x1dd)]&&_0x54655d[_0x4541f3(0x215)](_0x4541f3(0x1c2)+_0x343735[_0x4541f3(0x1fa)][_0x4541f3(0x235)]),_0x343735?.[_0x4541f3(0x204)]&&_0x54655d[_0x4541f3(0x215)](_0x4541f3(0x234)+_0x343735[_0x4541f3(0x204)]),_0x343735?.[_0x4541f3(0x22f)]?_0x54655d[_0x4541f3(0x215)](_0x4541f3(0x22f)):_0x343735?.[_0x4541f3(0x239)]&&_0x54655d[_0x4541f3(0x215)](_0x4541f3(0x1c9)),_0x54655d;},async '_request'(_0x2a7435,_0x8be49d={}){const _0x338e38=_0xe21ad8,_0x34178b=await fetch(_0x2a7435,_0x8be49d),_0x3ecdeb=await _0x34178b[_0x338e38(0x228)]()[_0x338e38(0x1e4)](()=>({}));if(!_0x34178b['ok'])throw new Error(_0x3ecdeb?.[_0x338e38(0x20d)]?.[_0x338e38(0x226)]||'Request\x20failed\x20('+_0x34178b[_0x338e38(0x222)]+')');return _0x3ecdeb[_0x338e38(0x214)]??_0x3ecdeb[_0x338e38(0x1c1)]??null;},async 'startSelected'(){const _0x29ec5e=_0xe21ad8;if(this[_0x29ec5e(0x1d8)]&&!this[_0x29ec5e(0x1b3)]){this[_0x29ec5e(0x1b3)]=!0x0;try{const _0x58a720=this['selectedPipeline'][_0x29ec5e(0x219)]||this[_0x29ec5e(0x1dd)];await this['_request'](__ENV__['API']+_0x29ec5e(0x1e5)+encodeURIComponent(_0x58a720)+'/pipelines/'+encodeURIComponent(this[_0x29ec5e(0x1d8)][_0x29ec5e(0x1e0)])+_0x29ec5e(0x22b),{'method':_0x29ec5e(0x20c)}),_0x598328[_0x29ec5e(0x1f2)][_0x29ec5e(0x1c9)]?.[_0x29ec5e(0x1f6)]?.[_0x29ec5e(0x1c7)]?.(_0x29ec5e(0x1c0)+this[_0x29ec5e(0x1d8)][_0x29ec5e(0x1e0)]+'\x22'),await this['load']();}catch(_0x3064a8){_0x598328[_0x29ec5e(0x1f2)]['shared']?.[_0x29ec5e(0x1f6)]?.['error']?.(_0x3064a8?.[_0x29ec5e(0x226)]||'Start\x20failed');}finally{this[_0x29ec5e(0x1b3)]=!0x1;}}},async 'stopSelected'(){const _0x455486=_0xe21ad8;if(this['selectedPipeline']&&!this[_0x455486(0x1b3)]&&await _0x598328[_0x455486(0x1f2)][_0x455486(0x1c9)][_0x455486(0x207)][_0x455486(0x1b5)](_0x455486(0x231)+this[_0x455486(0x1d8)][_0x455486(0x1e0)]+_0x455486(0x1ba))){this[_0x455486(0x1b3)]=!0x0;try{const _0x1ee92b=this['selectedPipeline'][_0x455486(0x219)]||this[_0x455486(0x1dd)];await this['_request'](__ENV__[_0x455486(0x1e7)]+_0x455486(0x1e5)+encodeURIComponent(_0x1ee92b)+'/pipelines/'+encodeURIComponent(this[_0x455486(0x1d8)][_0x455486(0x1e0)])+_0x455486(0x1ff),{'method':'POST'}),_0x598328[_0x455486(0x1f2)][_0x455486(0x1c9)]?.['toast']?.[_0x455486(0x1c6)]?.(_0x455486(0x1d4)+this[_0x455486(0x1d8)][_0x455486(0x1e0)]+'\x22'),await this['load']();}catch(_0x5dc641){_0x598328['$ok']['shared']?.[_0x455486(0x1f6)]?.['error']?.(_0x5dc641?.[_0x455486(0x226)]||_0x455486(0x1b8));}finally{this['actionBusy']=!0x1;}}},async 'deleteSelected'(){const _0x545291=_0xe21ad8;if(!this[_0x545291(0x1d8)]||this[_0x545291(0x1b3)])return;const _0x3ae3cf=this[_0x545291(0x1d8)],_0x4b10cb=(_0x3ae3cf[_0x545291(0x21f)]||[])[_0x545291(0x20f)](_0x2c5293=>'•\x20'+(_0x2c5293[_0x545291(0x21e)]||_0x2c5293[_0x545291(0x221)])+':\x20'+_0x2c5293[_0x545291(0x221)]+'@'+_0x2c5293[_0x545291(0x1e0)])[_0x545291(0x1cb)](_0x545291(0x1eb));if(await _0x598328[_0x545291(0x1f2)][_0x545291(0x1c9)][_0x545291(0x207)][_0x545291(0x1b5)](_0x545291(0x22c)+_0x3ae3cf[_0x545291(0x1e0)]+_0x545291(0x1c8)+(_0x4b10cb||'No\x20members')+_0x545291(0x1d9))){this['actionBusy']=!0x0;try{const _0x3da9f4=_0x3ae3cf[_0x545291(0x219)]||this[_0x545291(0x1dd)];await this[_0x545291(0x1c5)](__ENV__['API']+_0x545291(0x1e5)+encodeURIComponent(_0x3da9f4)+_0x545291(0x227)+encodeURIComponent(_0x3ae3cf[_0x545291(0x1e0)]),{'method':_0x545291(0x1ee)}),_0x598328['$ok'][_0x545291(0x1c9)]?.['toast']?.[_0x545291(0x1c7)]?.(_0x545291(0x1b9)+_0x3ae3cf[_0x545291(0x1e0)]+'\x22'),this[_0x545291(0x1f1)]=null,await this[_0x545291(0x1d5)]();}catch(_0x15252c){_0x598328['$ok'][_0x545291(0x1c9)]?.[_0x545291(0x1f6)]?.[_0x545291(0x20d)]?.(_0x15252c?.[_0x545291(0x226)]||_0x545291(0x20e));}finally{this[_0x545291(0x1b3)]=!0x1;}}},'openType'(_0x3eb3c7){const _0x140d17=_0xe21ad8,_0x3e067e=this[_0x140d17(0x1fe)](_0x3eb3c7);if(!_0x3e067e)return;const _0x3781be=this[_0x140d17(0x1f0)](_0x3eb3c7);_0x3781be&&_0x3781be!==_0x598328[_0x140d17(0x1f2)][_0x140d17(0x229)][_0x140d17(0x21b)][_0x140d17(0x223)]&&_0x598328['$ok'][_0x140d17(0x229)]['okdb'][_0x140d17(0x205)](_0x3781be);const _0x2d07e1=_0x598328[_0x140d17(0x1da)]['$router'];_0x2d07e1?.[_0x140d17(0x215)](_0x2d07e1[_0x140d17(0x1df)](_0x140d17(0x1bc),{'env':_0x3781be,'type':_0x3e067e,'tab':'pipelines'}));},async 'openEngineModal'(_0x381802){const _0x3cb6ef=_0xe21ad8;if(!_0x381802?.[_0x3cb6ef(0x239)])return;const _0x2e09a0=this,_0x1ac68a=this[_0x3cb6ef(0x1b6)](_0x381802);await _0x598328[_0x3cb6ef(0x1f2)][_0x3cb6ef(0x1c9)][_0x3cb6ef(0x207)][_0x3cb6ef(0x22e)]({'owner':_0x598328,'title':_0x3cb6ef(0x1de)+_0x381802[_0x3cb6ef(0x1e0)],'canDrag':!0x0,'content':_0x3cb6ef(0x237),'context':_0x586063=>({'modal':_0x586063,'engine':_0x381802,'envName':_0x1ac68a,'onDone':async()=>{const _0x10660e=_0x3cb6ef;await _0x2e09a0[_0x10660e(0x1d5)]();}})});}}),async 'init'(_0x483bd5){const _0x501f9c=_0xe21ad8;_0x483bd5[_0x501f9c(0x1d6)](()=>_0x483bd5['$attr'][_0x501f9c(0x23a)],()=>this[_0x501f9c(0x203)]()),_0x483bd5[_0x501f9c(0x1d6)](()=>_0x483bd5['$ok']['stores'][_0x501f9c(0x21b)][_0x501f9c(0x223)],()=>{const _0xd441c8=_0x501f9c;this[_0xd441c8(0x1dc)]||(this[_0xd441c8(0x1f1)]=null),this[_0xd441c8(0x1d5)]();}),await this[_0x501f9c(0x1d5)]();const _0x385ad4=()=>this[_0x501f9c(0x1d5)]();this[_0x501f9c(0x201)]=[_0x3df25a['on']('engine:started',_0x385ad4),_0x3df25a['on'](_0x501f9c(0x20a),_0x385ad4),_0x3df25a['on']('engine:error',_0x385ad4),_0x3df25a['on'](_0x501f9c(0x22a),_0x385ad4),_0x3df25a['on'](_0x501f9c(0x1f4),_0x385ad4)];},'unmount'(){const _0x9c461e=_0xe21ad8;for(const _0x24ac7c of this[_0x9c461e(0x201)])_0x24ac7c();this[_0x9c461e(0x201)]=[];},'template':'\x0a<div\x20class=\x22pipelines-wrap\x22>\x0a\x20\x20<div\x20class=\x22pipelines-head\x22>\x0a\x20\x20\x20\x20<div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22pipelines-title\x22>{{\x20isAllEnvs\x20?\x20\x27Pipelines\x20·\x20all\x20environments\x27\x20:\x20\x27Pipelines\x27\x20}}</div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22pipelines-sub\x22>{{\x20isAllEnvs\x20?\x20\x27Primary\x20grouped\x20lifecycle\x20management\x20across\x20opened\x20environments.\x20Open\x20DB\x20or\x20Files\x20only\x20when\x20you\x20need\x20source-specific\x20context.\x27\x20:\x20\x27Primary\x20grouped\x20lifecycle\x20management\x20for\x20the\x20selected\x20environment.\x20Open\x20DB\x20or\x20Files\x20only\x20when\x20you\x20need\x20source-specific\x20context.\x27\x20}}</div>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20align-items:center;\x20flex-wrap:wrap;\x22>\x0a\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(\x27var(--okdb-indigo)\x27)\x22>{{\x20pipelines.length\x20}}\x20pipeline{{\x20pipelines.length\x20!==\x201\x20?\x20\x27s\x27\x20:\x20\x27\x27\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20<button\x20@click=\x22load()\x22\x20:disabled=\x22busy\x22\x20style=\x22font-size:12px;\x20padding:5px\x2012px;\x20opacity:.75;\x22>↻\x20Refresh</button>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</div>\x0a\x0a\x20\x20<if\x20:=\x22error\x22>\x0a\x20\x20\x20\x20<div\x20class=\x22pipelines-error\x22>{{\x20error\x20}}</div>\x0a\x20\x20</if>\x0a\x0a\x20\x20<if\x20:=\x22!busy\x20&&\x20pipelines.length\x20===\x200\x20&&\x20!error\x22>\x0a\x20\x20\x20\x20<div\x20class=\x22pipelines-empty\x22>\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22font-size:30px;\x20opacity:.25;\x22>⛓</div>\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22font-size:14px;\x20font-weight:600;\x20opacity:.75;\x22>No\x20pipelines\x20{{\x20isAllEnvs\x20?\x20\x27in\x20opened\x20environments\x27\x20:\x20\x27in\x20\x27\x20+\x20envName\x20}}</div>\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22font-size:12px;\x20opacity:.5;\x20max-width:520px;\x20line-height:1.7;\x20text-align:center;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20Pipelines\x20appear\x20here\x20once\x20created\x20or\x20synced\x20into\x20the\x20environment.\x0a\x20\x20\x20\x20\x20\x20\x20\x20This\x20view\x20preserves\x20member\x20order,\x20shows\x20aggregate\x20health,\x20and\x20exposes\x20lifecycle\x20controls.\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</if>\x0a\x0a\x20\x20<if\x20:=\x22pipelines.length\x20>\x200\x22>\x0a\x20\x20\x20\x20<div\x20class=\x22pipelines-layout\x22>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22pipelines-list-card\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22pipelines-list-head\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type=\x22text\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20placeholder=\x22Filter\x20pipelines…\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:value=\x22search\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@input=\x22search\x20=\x20$event.target.value\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22width:100%;\x20box-sizing:border-box;\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22pipelines-list\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<each\x20:of=\x22filteredPipelines\x22\x20let:item=\x22pipeline\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22selectPipeline(pipeline)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:class=\x22selectedPipeline\x20&&\x20pipelineKey(selectedPipeline)\x20===\x20pipelineKey(pipeline)\x20?\x20\x27pipeline-row\x20pipeline-row--active\x27\x20:\x20\x27pipeline-row\x27\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20align-items:center;\x20gap:8px;\x20min-width:0;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22\x27width:8px;height:8px;border-radius:50%;flex-shrink:0;background:\x27\x20+\x20healthColor(pipeline.health)\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:13px;\x20font-weight:600;\x20overflow:hidden;\x20text-overflow:ellipsis;\x20white-space:nowrap;\x22>{{\x20pipeline.meta?.label\x20||\x20pipeline.name\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20gap:6px;\x20flex-wrap:wrap;\x20margin-top:6px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22isAllEnvs\x20||\x20pipeline.env\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(\x27var(--okdb-indigo)\x27,\x20true)\x22>{{\x20pipeline.env\x20||\x20envName\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(healthColor(pipeline.health))\x22>{{\x20pipeline.health\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(\x27var(--okdb-sky)\x27,\x20true)\x22>{{\x20pipeline.status\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(\x27var(--okdb-app-fg-muted)\x27,\x20true)\x22>{{\x20pipeline.engines.length\x20}}\x20members</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22font-size:11px;\x20opacity:.5;\x20margin-top:7px;\x20overflow:hidden;\x20text-overflow:ellipsis;\x20white-space:nowrap;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{\x20summaryText(pipeline)\x20}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</each>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22filteredPipelines.length\x20===\x200\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22font-size:12px;\x20opacity:.45;\x20padding:8px;\x22>No\x20pipelines\x20match\x20the\x20current\x20filter.</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22pipelines-detail-card\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22selectedPipeline\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:14px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20justify-content:space-between;\x20gap:12px;\x20align-items:flex-start;\x20flex-wrap:wrap;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:8px;\x20min-width:0;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20align-items:center;\x20gap:8px;\x20flex-wrap:wrap;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22font-size:18px;\x20font-weight:700;\x20min-width:0;\x22>{{\x20selectedPipeline.name\x20}}</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(healthColor(selectedPipeline.health))\x22>{{\x20selectedPipeline.health\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(\x27var(--okdb-sky)\x27,\x20true)\x22>{{\x20selectedPipeline.status\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22selectedPipeline.meta?.label\x20&&\x20selectedPipeline.meta.label\x20!==\x20selectedPipeline.name\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22font-size:12px;\x20opacity:.6;\x22>{{\x20selectedPipeline.meta.label\x20}}</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22font-size:12px;\x20color:var(--okdb-app-fg-muted);\x20line-height:1.6;\x20max-width:620px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20This\x20is\x20the\x20global\x20grouped\x20view\x20for\x20the\x20pipeline.\x20Use\x20the\x20related\x20type\x20shortcuts\x20below\x20only\x20when\x20you\x20need\x20the\x20local\x20DB\x20drill-in.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20gap:6px;\x20flex-wrap:wrap;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(\x27var(--okdb-app-fg-muted)\x27,\x20true)\x22>env:\x20{{\x20selectedPipeline.env\x20||\x20envName\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(\x27var(--okdb-app-fg-muted)\x27,\x20true)\x22>{{\x20selectedPipeline.engines.length\x20}}\x20ordered\x20member{{\x20selectedPipeline.engines.length\x20!==\x201\x20?\x20\x27s\x27\x20:\x20\x27\x27\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<each\x20:of=\x22selectedRelatedTypes\x22\x20let:item=\x22rel\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22openType({\x20config:\x20{\x20source_type:\x20rel.type,\x20source_env:\x20rel.env\x20}\x20})\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22font-size:10px;\x20padding:2px\x207px;\x20border-radius:999px;\x20border:1px\x20solid\x20color-mix(in\x20srgb,\x20var(--okdb-indigo)\x2033%,\x20transparent);\x20color:var(--okdb-indigo);\x20background:color-mix(in\x20srgb,\x20var(--okdb-indigo)\x206%,\x20transparent);\x20cursor:pointer;\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:title=\x22\x27Open\x20type\x20\x27\x20+\x20rel.type\x20+\x20\x27\x20in\x20env\x20\x27\x20+\x20rel.env\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20>{{\x20rel.env\x20!==\x20envName\x20?\x20rel.env\x20+\x20\x27:\x27\x20:\x20\x27\x27\x20}}{{\x20rel.type\x20}}\x20→</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</each>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20flex-wrap:wrap;\x20align-items:center;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20@click=\x22startSelected()\x22\x20:disabled=\x22actionBusy\x22\x20style=\x22font-size:12px;\x20padding:5px\x2012px;\x20color:var(--okdb-success);\x20border-color:color-mix(in\x20srgb,\x20var(--okdb-success)\x2033%,\x20transparent);\x22>▶\x20Start</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20@click=\x22stopSelected()\x22\x20:disabled=\x22actionBusy\x22\x20style=\x22font-size:12px;\x20padding:5px\x2012px;\x20color:var(--okdb-warning);\x20border-color:color-mix(in\x20srgb,\x20var(--okdb-warning)\x2033%,\x20transparent);\x22>⏹\x20Stop</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20@click=\x22deleteSelected()\x22\x20:disabled=\x22actionBusy\x22\x20style=\x22font-size:12px;\x20padding:5px\x2012px;\x20color:var(--okdb-danger);\x20border-color:color-mix(in\x20srgb,\x20var(--okdb-danger)\x2033%,\x20transparent);\x22>🗑\x20Delete</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22pipelines-members\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<each\x20:of=\x22selectedPipeline.engines\x22\x20let:item=\x22member\x22\x20let:index=\x22index\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22pipeline-member-card\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20justify-content:space-between;\x20gap:12px;\x20align-items:flex-start;\x20flex-wrap:wrap;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:8px;\x20min-width:0;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20align-items:center;\x20flex-wrap:wrap;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:11px;\x20opacity:.4;\x20min-width:18px;\x22>{{\x20index\x20+\x201\x20}}.</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(\x27var(--okdb-accent)\x27,\x20true)\x22>{{\x20member.role\x20||\x20member.type\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<code\x20style=\x22font-size:12px;\x20overflow:hidden;\x20text-overflow:ellipsis;\x20white-space:nowrap;\x22>{{\x20member.type\x20}}@{{\x20member.name\x20}}</code>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(stateColor(member.state))\x22>{{\x20member.state\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22member.status\x20&&\x20member.status\x20!==\x20member.state\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(\x27var(--okdb-app-fg-muted)\x27,\x20true)\x22>{{\x20member.status\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20gap:6px;\x20flex-wrap:wrap;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<each\x20:of=\x22memberFacts(member)\x22\x20let:item=\x22fact\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(\x27var(--okdb-app-fg-muted)\x27,\x20true)\x22>{{\x20fact\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</each>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22member.lag\x20!=\x20null\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(\x27var(--okdb-warning)\x27,\x20true)\x22>lag:\x20{{\x20formatNumber(member.lag)\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22progressLabel(member)\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(\x27var(--okdb-sky)\x27,\x20true)\x22>progress:\x20{{\x20progressLabel(member)\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22member.cursorKey\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22chipStyle(\x27var(--okdb-app-fg-muted)\x27,\x20true)\x22>cursor:\x20{{\x20member.cursorKey\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20flex-wrap:wrap;\x20align-items:center;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22member.exists\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22openEngineModal(member)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22font-size:11px;\x20padding:3px\x2010px;\x20border-radius:999px;\x20border:1px\x20solid\x20color-mix(in\x20srgb,\x20var(--okdb-accent)\x2033%,\x20transparent);\x20color:var(--okdb-accent);\x20background:color-mix(in\x20srgb,\x20var(--okdb-accent)\x206%,\x20transparent);\x20cursor:pointer;\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20title=\x22Open\x20engine\x20editor\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20>Edit\x20engine</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22relatedType(member)\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22openType(member)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22font-size:11px;\x20padding:3px\x2010px;\x20border-radius:999px;\x20border:1px\x20solid\x20color-mix(in\x20srgb,\x20var(--okdb-indigo)\x2033%,\x20transparent);\x20color:var(--okdb-indigo);\x20background:color-mix(in\x20srgb,\x20var(--okdb-indigo)\x206%,\x20transparent);\x20cursor:pointer;\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:title=\x22\x27Open\x20type\x20\x27\x20+\x20relatedType(member)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20>Open\x20type\x20→</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22member.error\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22pipeline-member-error\x22>{{\x20member.error\x20}}</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</each>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</if>\x0a\x0a\x20\x20<if\x20:=\x22busy\x20&&\x20pipelines.length\x20===\x200\x22>\x0a\x20\x20\x20\x20<div\x20style=\x22font-size:12px;\x20opacity:.45;\x20padding:4px\x200;\x22>Loading\x20pipelines…</div>\x0a\x20\x20</if>\x0a</div>','style':_0xe21ad8(0x1fb)};
|
|
1
|
+
import e from"../../../stores/events-store.js";import n from"../../engines/modals/engine-modal.ok.js";export default{tag:"db-pipelines-panel",dependencies:[n],attr:{showall:{},envname:{},selectedpipeline:{}},context:e=>({busy:!1,error:null,search:"",pipelines:[],selectedKey:null,actionBusy:!1,_unsubs:[],get isAllEnvs(){return!0===e.$attr.showall||"true"===e.$attr.showall},get envName(){return e.$attr.envname||e.$ok.stores.okdb.selectedEnv||"default"},get externalSelectedPipeline(){return String(e.$attr.selectedpipeline||"")},pipelineKey(e){return`${e?.env||this.envName}::${e?.name||""}`},get filteredPipelines(){const e=this.search.trim().toLowerCase(),n=[...this.pipelines].sort((e,n)=>{const i=String(e.env||"").localeCompare(String(n.env||""));return 0!==i?i:e.name.localeCompare(n.name)});return e?n.filter(n=>[n.env,n.name,n.meta?.label,n.status,n.health,...(n.engines||[]).flatMap(e=>[e.role,e.type,e.name,e.state,e.config?.source_type,e.config?.job_type])].filter(Boolean).join(" ").toLowerCase().includes(e)):n},get selectedPipeline(){return 0===this.filteredPipelines.length?null:this.filteredPipelines.find(e=>this.pipelineKey(e)===this.selectedKey)??this.filteredPipelines[0]},applyExternalSelection(){const e=this.externalSelectedPipeline.trim();if(!e||0===this.pipelines.length)return;const n=this.pipelines.find(n=>this.pipelineKey(n)===e)??this.pipelines.find(n=>n?.name===e)??null;if(n){const e=this.pipelineKey(n);this.selectedKey!==e&&(this.selectedKey=e)}},get selectedRelatedTypes(){const e=this.selectedPipeline;if(!e)return[];const n=new Set,i=[];for(const t of e.engines||[]){const e=this.relatedType(t);e&&!n.has(e)&&(n.add(e),i.push({type:e,env:this.relatedEnv(t)}))}return i},async load(){this.busy=!0,this.error=null;try{const e=this.isAllEnvs?`${__ENV__.API}/pipelines`:`${__ENV__.API}/env/${encodeURIComponent(this.envName)}/pipelines`,n=await fetch(e),i=await n.json().catch(()=>({}));if(!n.ok)throw new Error(i?.error?.message||"Failed to load pipelines");this.pipelines=i.data??i.result??[],this.applyExternalSelection(),this.pipelines.some(e=>this.pipelineKey(e)===this.selectedKey)||(this.selectedKey=this.pipelines[0]?this.pipelineKey(this.pipelines[0]):null)}catch(e){this.error=e?.message||String(e),this.pipelines=[],this.selectedKey=null}finally{this.busy=!1}},selectPipeline(n){this.selectedKey=this.pipelineKey(n),e.$dispatch("select",n)},healthColor:e=>"online"===e?"var(--okdb-success)":"degraded"===e?"var(--okdb-warning)":"error"===e?"var(--okdb-danger)":"var(--okdb-app-fg-muted)",stateColor:e=>"online"===e?"var(--okdb-success)":"degraded"===e?"var(--okdb-warning)":"error"===e||"missing"===e?"var(--okdb-danger)":"stopped"===e?"var(--okdb-app-fg-muted)":"var(--okdb-sky)",chipStyle:(e,n=!1)=>`font-size:10px;padding:2px 7px;border-radius:999px;border:1px solid ${e}55;color:${e};background:${n?"transparent":`${e}12`};white-space:nowrap;`,summaryText(e){const n=e.engines||[];return 0===n.length?"No members":n.map(e=>e.role||e.type).join(" · ")},formatNumber:e=>null==e||Number.isNaN(Number(e))?null:Number(e).toLocaleString(),progressLabel(e){const n=e.progress??e.runtime?.progress??null;if(null==n)return null;if("string"==typeof n||"number"==typeof n)return String(n);if("object"==typeof n&&"string"==typeof n.phase)return n.phase;try{return JSON.stringify(n)}catch{return"progress"}},relatedType:e=>e?.config?.source_type??e?.runtime?.source_type??null,relatedEnv(e){return e?.config?.source_env??e?.runtime?.source_env??this.envName},memberOwnerEnv(e){return e?.storeEnv??e?.env??this.relatedEnv(e)??this.selectedPipeline?.env??this.envName},memberFacts(e){const n=[];return e?.config?.job_type&&n.push(`job:${e.config.job_type}`),e?.config?.handler?.name&&n.push(`handler:${e.config.handler.name}`),e?.config?.source_type&&n.push(`type:${e.config.source_type}`),e?.config?.source_env&&e.config.source_env!==this.envName&&n.push(`source env:${e.config.source_env}`),e?.storeEnv&&n.push(`store:${e.storeEnv}`),e?.owned?n.push("owned"):e?.exists&&n.push("shared"),n},async _request(e,n={}){const i=await fetch(e,n),t=await i.json().catch(()=>({}));if(!i.ok)throw new Error(t?.error?.message||`Request failed (${i.status})`);return t.data??t.result??null},async startSelected(){if(this.selectedPipeline&&!this.actionBusy){this.actionBusy=!0;try{const n=this.selectedPipeline.env||this.envName;await this._request(`${__ENV__.API}/env/${encodeURIComponent(n)}/pipelines/${encodeURIComponent(this.selectedPipeline.name)}/start`,{method:"POST"}),e.$ok.shared?.toast?.success?.(`Started pipeline "${this.selectedPipeline.name}"`),await this.load()}catch(n){e.$ok.shared?.toast?.error?.(n?.message||"Start failed")}finally{this.actionBusy=!1}}},async stopSelected(){if(this.selectedPipeline&&!this.actionBusy&&await e.$ok.shared.modal.confirm(`Stop pipeline "<b>${this.selectedPipeline.name}</b>"?`)){this.actionBusy=!0;try{const n=this.selectedPipeline.env||this.envName;await this._request(`${__ENV__.API}/env/${encodeURIComponent(n)}/pipelines/${encodeURIComponent(this.selectedPipeline.name)}/stop`,{method:"POST"}),e.$ok.shared?.toast?.info?.(`Stopped pipeline "${this.selectedPipeline.name}"`),await this.load()}catch(n){e.$ok.shared?.toast?.error?.(n?.message||"Stop failed")}finally{this.actionBusy=!1}}},async deleteSelected(){if(!this.selectedPipeline||this.actionBusy)return;const n=this.selectedPipeline,i=(n.engines||[]).map(e=>`• ${e.role||e.type}: ${e.type}@${e.name}`).join("<br>");if(await e.$ok.shared.modal.confirm(`Delete pipeline "<b>${n.name}</b>"?<br><br>${i||"No members"}<br><br>Env-owned members will be removed; shared members will be preserved.`)){this.actionBusy=!0;try{const i=n.env||this.envName;await this._request(`${__ENV__.API}/env/${encodeURIComponent(i)}/pipelines/${encodeURIComponent(n.name)}`,{method:"DELETE"}),e.$ok.shared?.toast?.success?.(`Deleted pipeline "${n.name}"`),this.selectedKey=null,await this.load()}catch(n){e.$ok.shared?.toast?.error?.(n?.message||"Delete failed")}finally{this.actionBusy=!1}}},openType(n){const i=this.relatedType(n);if(!i)return;const t=this.relatedEnv(n);t&&t!==e.$ok.stores.okdb.selectedEnv&&e.$ok.stores.okdb.selectEnv(t);const s=e.$vars.$router;s?.push(s.resolve("/db",{env:t,type:i,tab:"pipelines"}))},async openEngineModal(n){if(!n?.exists)return;const i=this,t=this.memberOwnerEnv(n);await e.$ok.shared.modal.open({owner:e,title:`Edit Engine · ${n.name}`,canDrag:!0,content:'<engine-modal :modal="modal" :engine="engine" :env="envName" :on-done="onDone" />',context:e=>({modal:e,engine:n,envName:t,onDone:async()=>{await i.load()}})})}}),async init(n){n.$watch(()=>n.$attr.selectedpipeline,()=>this.applyExternalSelection()),n.$watch(()=>n.$ok.stores.okdb.selectedEnv,()=>{this.isAllEnvs||(this.selectedKey=null),this.load()}),await this.load();const i=()=>this.load();this._unsubs=[e.on("engine:started",i),e.on("engine:stopped",i),e.on("engine:error",i),e.on("engine:installed",i),e.on("engine:uninstalled",i)]},unmount(){for(const e of this._unsubs)e();this._unsubs=[]},template:'\n<div class="pipelines-wrap">\n <div class="pipelines-head">\n <div>\n <div class="pipelines-title">{{ isAllEnvs ? \'Pipelines · all environments\' : \'Pipelines\' }}</div>\n <div class="pipelines-sub">{{ isAllEnvs ? \'Primary grouped lifecycle management across opened environments. Open DB or Files only when you need source-specific context.\' : \'Primary grouped lifecycle management for the selected environment. Open DB or Files only when you need source-specific context.\' }}</div>\n </div>\n <div style="display:flex; gap:8px; align-items:center; flex-wrap:wrap;">\n <span :style="chipStyle(\'var(--okdb-indigo)\')">{{ pipelines.length }} pipeline{{ pipelines.length !== 1 ? \'s\' : \'\' }}</span>\n <button @click="load()" :disabled="busy" style="font-size:12px; padding:5px 12px; opacity:.75;">↻ Refresh</button>\n </div>\n </div>\n\n <if :="error">\n <div class="pipelines-error">{{ error }}</div>\n </if>\n\n <if :="!busy && pipelines.length === 0 && !error">\n <div class="pipelines-empty">\n <div style="font-size:30px; opacity:.25;">⛓</div>\n <div style="font-size:14px; font-weight:600; opacity:.75;">No pipelines {{ isAllEnvs ? \'in opened environments\' : \'in \' + envName }}</div>\n <div style="font-size:12px; opacity:.5; max-width:520px; line-height:1.7; text-align:center;">\n Pipelines appear here once created or synced into the environment.\n This view preserves member order, shows aggregate health, and exposes lifecycle controls.\n </div>\n </div>\n </if>\n\n <if :="pipelines.length > 0">\n <div class="pipelines-layout">\n <div class="pipelines-list-card">\n <div class="pipelines-list-head">\n <input\n type="text"\n placeholder="Filter pipelines…"\n :value="search"\n @input="search = $event.target.value"\n style="width:100%; box-sizing:border-box;"\n />\n </div>\n <div class="pipelines-list">\n <each :of="filteredPipelines" let:item="pipeline">\n <button\n @click="selectPipeline(pipeline)"\n :class="selectedPipeline && pipelineKey(selectedPipeline) === pipelineKey(pipeline) ? \'pipeline-row pipeline-row--active\' : \'pipeline-row\'"\n >\n <div style="display:flex; align-items:center; gap:8px; min-width:0;">\n <span :style="\'width:8px;height:8px;border-radius:50%;flex-shrink:0;background:\' + healthColor(pipeline.health)"></span>\n <span style="font-size:13px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">{{ pipeline.meta?.label || pipeline.name }}</span>\n </div>\n <div style="display:flex; gap:6px; flex-wrap:wrap; margin-top:6px;">\n <if :="isAllEnvs || pipeline.env">\n <span :style="chipStyle(\'var(--okdb-indigo)\', true)">{{ pipeline.env || envName }}</span>\n </if>\n <span :style="chipStyle(healthColor(pipeline.health))">{{ pipeline.health }}</span>\n <span :style="chipStyle(\'var(--okdb-sky)\', true)">{{ pipeline.status }}</span>\n <span :style="chipStyle(\'var(--okdb-app-fg-muted)\', true)">{{ pipeline.engines.length }} members</span>\n </div>\n <div style="font-size:11px; opacity:.5; margin-top:7px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">\n {{ summaryText(pipeline) }}\n </div>\n </button>\n </each>\n <if :="filteredPipelines.length === 0">\n <div style="font-size:12px; opacity:.45; padding:8px;">No pipelines match the current filter.</div>\n </if>\n </div>\n </div>\n\n <div class="pipelines-detail-card">\n <if :="selectedPipeline">\n <div style="display:flex; flex-direction:column; gap:14px;">\n <div style="display:flex; justify-content:space-between; gap:12px; align-items:flex-start; flex-wrap:wrap;">\n <div style="display:flex; flex-direction:column; gap:8px; min-width:0;">\n <div style="display:flex; align-items:center; gap:8px; flex-wrap:wrap;">\n <div style="font-size:18px; font-weight:700; min-width:0;">{{ selectedPipeline.name }}</div>\n <span :style="chipStyle(healthColor(selectedPipeline.health))">{{ selectedPipeline.health }}</span>\n <span :style="chipStyle(\'var(--okdb-sky)\', true)">{{ selectedPipeline.status }}</span>\n </div>\n <if :="selectedPipeline.meta?.label && selectedPipeline.meta.label !== selectedPipeline.name">\n <div style="font-size:12px; opacity:.6;">{{ selectedPipeline.meta.label }}</div>\n </if>\n <div style="font-size:12px; color:var(--okdb-app-fg-muted); line-height:1.6; max-width:620px;">\n This is the global grouped view for the pipeline. Use the related type shortcuts below only when you need the local DB drill-in.\n </div>\n <div style="display:flex; gap:6px; flex-wrap:wrap;">\n <span :style="chipStyle(\'var(--okdb-app-fg-muted)\', true)">env: {{ selectedPipeline.env || envName }}</span>\n <span :style="chipStyle(\'var(--okdb-app-fg-muted)\', true)">{{ selectedPipeline.engines.length }} ordered member{{ selectedPipeline.engines.length !== 1 ? \'s\' : \'\' }}</span>\n <each :of="selectedRelatedTypes" let:item="rel">\n <button\n @click="openType({ config: { source_type: rel.type, source_env: rel.env } })"\n style="font-size:10px; padding:2px 7px; border-radius:999px; border:1px solid color-mix(in srgb, var(--okdb-indigo) 33%, transparent); color:var(--okdb-indigo); background:color-mix(in srgb, var(--okdb-indigo) 6%, transparent); cursor:pointer;"\n :title="\'Open type \' + rel.type + \' in env \' + rel.env"\n >{{ rel.env !== envName ? rel.env + \':\' : \'\' }}{{ rel.type }} →</button>\n </each>\n </div>\n </div>\n <div style="display:flex; gap:8px; flex-wrap:wrap; align-items:center;">\n <button @click="startSelected()" :disabled="actionBusy" style="font-size:12px; padding:5px 12px; color:var(--okdb-success); border-color:color-mix(in srgb, var(--okdb-success) 33%, transparent);">▶ Start</button>\n <button @click="stopSelected()" :disabled="actionBusy" style="font-size:12px; padding:5px 12px; color:var(--okdb-warning); border-color:color-mix(in srgb, var(--okdb-warning) 33%, transparent);">⏹ Stop</button>\n <button @click="deleteSelected()" :disabled="actionBusy" style="font-size:12px; padding:5px 12px; color:var(--okdb-danger); border-color:color-mix(in srgb, var(--okdb-danger) 33%, transparent);">🗑 Delete</button>\n </div>\n </div>\n\n <div class="pipelines-members">\n <each :of="selectedPipeline.engines" let:item="member" let:index="index">\n <div class="pipeline-member-card">\n <div style="display:flex; justify-content:space-between; gap:12px; align-items:flex-start; flex-wrap:wrap;">\n <div style="display:flex; flex-direction:column; gap:8px; min-width:0;">\n <div style="display:flex; gap:8px; align-items:center; flex-wrap:wrap;">\n <span style="font-size:11px; opacity:.4; min-width:18px;">{{ index + 1 }}.</span>\n <span :style="chipStyle(\'var(--okdb-accent)\', true)">{{ member.role || member.type }}</span>\n <code style="font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">{{ member.type }}@{{ member.name }}</code>\n <span :style="chipStyle(stateColor(member.state))">{{ member.state }}</span>\n <if :="member.status && member.status !== member.state">\n <span :style="chipStyle(\'var(--okdb-app-fg-muted)\', true)">{{ member.status }}</span>\n </if>\n </div>\n <div style="display:flex; gap:6px; flex-wrap:wrap;">\n <each :of="memberFacts(member)" let:item="fact">\n <span :style="chipStyle(\'var(--okdb-app-fg-muted)\', true)">{{ fact }}</span>\n </each>\n <if :="member.lag != null">\n <span :style="chipStyle(\'var(--okdb-warning)\', true)">lag: {{ formatNumber(member.lag) }}</span>\n </if>\n <if :="progressLabel(member)">\n <span :style="chipStyle(\'var(--okdb-sky)\', true)">progress: {{ progressLabel(member) }}</span>\n </if>\n <if :="member.cursorKey">\n <span :style="chipStyle(\'var(--okdb-app-fg-muted)\', true)">cursor: {{ member.cursorKey }}</span>\n </if>\n </div>\n </div>\n <div style="display:flex; gap:8px; flex-wrap:wrap; align-items:center;">\n <if :="member.exists">\n <button\n @click="openEngineModal(member)"\n style="font-size:11px; padding:3px 10px; border-radius:999px; border:1px solid color-mix(in srgb, var(--okdb-accent) 33%, transparent); color:var(--okdb-accent); background:color-mix(in srgb, var(--okdb-accent) 6%, transparent); cursor:pointer;"\n title="Open engine editor"\n >Edit engine</button>\n </if>\n <if :="relatedType(member)">\n <button\n @click="openType(member)"\n style="font-size:11px; padding:3px 10px; border-radius:999px; border:1px solid color-mix(in srgb, var(--okdb-indigo) 33%, transparent); color:var(--okdb-indigo); background:color-mix(in srgb, var(--okdb-indigo) 6%, transparent); cursor:pointer;"\n :title="\'Open type \' + relatedType(member)"\n >Open type →</button>\n </if>\n </div>\n </div>\n <if :="member.error">\n <div class="pipeline-member-error">{{ member.error }}</div>\n </if>\n </div>\n </each>\n </div>\n </div>\n </if>\n </div>\n </div>\n </if>\n\n <if :="busy && pipelines.length === 0">\n <div style="font-size:12px; opacity:.45; padding:4px 0;">Loading pipelines…</div>\n </if>\n</div>',style:"\n db-pipelines-panel .pipelines-wrap {\n display: flex;\n flex-direction: column;\n gap: 14px;\n }\n db-pipelines-panel .pipelines-head {\n display: flex;\n justify-content: space-between;\n gap: 12px;\n align-items: flex-start;\n flex-wrap: wrap;\n }\n db-pipelines-panel .pipelines-title {\n font-size: 14px;\n font-weight: 600;\n }\n db-pipelines-panel .pipelines-sub {\n font-size: 12px;\n opacity: .5;\n margin-top: 4px;\n max-width: 560px;\n line-height: 1.6;\n }\n db-pipelines-panel .pipelines-error {\n color: var(--okdb-danger);\n font-size: 12px;\n padding: 10px 12px;\n border-radius: 10px;\n border: 1px solid color-mix(in srgb, var(--okdb-danger) 33%, transparent);\n background: color-mix(in srgb, var(--okdb-danger) 5%, transparent);\n }\n db-pipelines-panel .pipelines-empty {\n border: 1px dashed var(--okdb-app-border);\n border-radius: 12px;\n padding: 28px 24px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n align-items: center;\n }\n db-pipelines-panel .pipelines-layout {\n display: grid;\n grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);\n gap: 14px;\n }\n db-pipelines-panel .pipelines-list-card,\n db-pipelines-panel .pipelines-detail-card {\n border: 1px solid var(--okdb-app-border);\n border-radius: 12px;\n background: var(--okdb-app-bg);\n overflow: hidden;\n }\n db-pipelines-panel .pipelines-list-head {\n padding: 12px;\n border-bottom: 1px solid var(--okdb-app-border);\n }\n db-pipelines-panel .pipelines-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 10px;\n }\n db-pipelines-panel .pipeline-row {\n width: 100%;\n text-align: left;\n border-radius: 10px;\n border: 1px solid var(--okdb-app-border);\n background: var(--okdb-app-bg-deep);\n padding: 10px 11px;\n cursor: pointer;\n }\n db-pipelines-panel .pipeline-row:hover {\n border-color: var(--okdb-app-border-strong);\n background: var(--okdb-app-bg-deep);\n }\n db-pipelines-panel .pipeline-row--active {\n border-color: color-mix(in srgb, var(--okdb-accent) 33%, transparent);\n box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--okdb-accent) 13%, transparent);\n background: #10202a;\n }\n db-pipelines-panel .pipelines-detail-card {\n padding: 14px;\n }\n db-pipelines-panel .pipelines-members {\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n db-pipelines-panel .pipeline-member-card {\n border: 1px solid var(--okdb-app-border);\n border-radius: 10px;\n padding: 12px;\n background: var(--okdb-app-bg-deep);\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n db-pipelines-panel .pipeline-member-error {\n font-size: 12px;\n line-height: 1.6;\n color: var(--okdb-danger);\n border: 1px solid var(--okdb-danger-deep-border);\n background: #450a0a33;\n padding: 8px 10px;\n border-radius: 8px;\n }\n @media (max-width: 860px) {\n db-pipelines-panel .pipelines-layout {\n grid-template-columns: 1fr;\n }\n }\n "};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2565(){const _0x447169=['3817816wqkrhP','$el','6zKxbUU','Failed\x20to\x20set\x20TTL','assign','short','catch','tmCurrentIdx','/time-machine/','/type/','tmSelectedClock','ttl\x20…','1\x20hr','message','ttlInputMs','all','en-GB','loadTTL','forEach','indexOf','2VQdWqe','946096gFmGVp','2523255SVLjpG','clockOpen','tmValue','type','jsonError','$refs','parse','data','var(--okdb-app-fg-muted)','loadClock','info','var(--okdb-orange)','apiBase','edited','busyRemove','onTMClockSelect','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<transition\x20name=\x22grow\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!--\x20Clock\x20+\x20TTL\x20badges\x20row\x20-->\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20align-items:center;\x20gap:6px;\x20margin-bottom:8px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22toggleClock()\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22font-size:10px;\x20padding:1px\x207px;\x20border-radius:4px;\x20border:1px\x20solid\x20var(--okdb-app-border);\x20background:var(--okdb-app-bg-deep);\x20color:var(--okdb-app-fg-muted);\x20cursor:pointer;\x20font-family:monospace;\x20display:flex;\x20align-items:center;\x20gap:5px;\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20title=\x22Show\x20change\x20history\x20for\x20this\x20record\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22clockBusy\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>clock\x20…</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22!clockBusy\x20&&\x20latestClock\x20!=\x20null\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>clock:\x20{{\x20latestClock\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22latestTime\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.55;\x20font-family:sans-serif;\x20font-size:10px;\x22>·\x20{{\x20latestTime\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.4;\x22>{{\x20clockOpen\x20?\x20\x27▲\x27\x20:\x20\x27▼\x27\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22!clockBusy\x20&&\x20latestClock\x20==\x20null\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.5;\x22>no\x20clock</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22ttlOpen\x20=\x20!ttlOpen\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:style=\x22\x27font-size:10px;\x20padding:1px\x207px;\x20border-radius:4px;\x20border:1px\x20solid\x20\x27\x20+\x20(ttlInfo\x20?\x20ttlBadgeColor\x20+\x20\x2755\x27\x20:\x20\x27var(--okdb-app-border)\x27)\x20+\x20\x27;\x20background:var(--okdb-app-bg-deep);\x20color:\x27\x20+\x20ttlBadgeColor\x20+\x20\x27;\x20cursor:pointer;\x20font-family:monospace;\x20display:flex;\x20align-items:center;\x20gap:5px;\x27\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20title=\x22TTL\x20(time-to-live)\x20for\x20this\x20record\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>{{\x20ttlBadgeText\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22ttlInfo\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.4;\x22>{{\x20ttlOpen\x20?\x20\x27▲\x27\x20:\x20\x27▼\x27\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!--\x20Changelog\x20+\x20time-travel\x20panel\x20(opens\x20when\x20clock\x20badge\x20clicked)\x20-->\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22clockOpen\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22margin-bottom:10px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!--\x20Changelog\x20table\x20-->\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22clockEntries\x20&&\x20clockEntries.length\x20>\x200\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22margin-bottom:8px;\x20background:var(--okdb-app-bg-deep);\x20border:1px\x20solid\x20var(--okdb-app-border);\x20border-radius:6px;\x20overflow:hidden;\x20font-size:11px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:grid;\x20grid-template-columns:auto\x20auto\x201fr\x20auto;\x20gap:0;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22padding:4px\x2010px;\x20opacity:.4;\x20border-bottom:1px\x20solid\x20var(--okdb-app-border);\x20font-weight:600;\x22>clock</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22padding:4px\x2010px;\x20opacity:.4;\x20border-bottom:1px\x20solid\x20var(--okdb-app-border);\x20font-weight:600;\x22>action</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22padding:4px\x2010px;\x20opacity:.4;\x20border-bottom:1px\x20solid\x20var(--okdb-app-border);\x20font-weight:600;\x22>wall\x20time</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22padding:4px\x2010px;\x20opacity:.4;\x20border-bottom:1px\x20solid\x20var(--okdb-app-border);\x20font-weight:600;\x22>origin</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<each\x20:of=\x22clockEntries\x22\x20let:item=\x22entry\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22padding:3px\x2010px;\x20font-family:monospace;\x20opacity:.8;\x20border-bottom:1px\x20solid\x20var(--okdb-app-surface);\x22>{{\x20entry.clock\x20??\x20\x27—\x27\x20}}</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22padding:3px\x2010px;\x20border-bottom:1px\x20solid\x20var(--okdb-app-surface);\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22\x27color:\x27\x20+\x20(entry.action\x20===\x20\x27put\x27\x20?\x20\x27var(--okdb-success)\x27\x20:\x20entry.action\x20===\x20\x27remove\x27\x20?\x20\x27var(--okdb-danger)\x27\x20:\x20\x27var(--okdb-warning)\x27)\x22>{{\x20entry.action\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22padding:3px\x2010px;\x20opacity:.6;\x20border-bottom:1px\x20solid\x20var(--okdb-app-surface);\x20white-space:nowrap;\x22>{{\x20hlcToDate(entry.timestamp)\x20}}</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22padding:3px\x2010px;\x20font-family:monospace;\x20opacity:.35;\x20font-size:10px;\x20border-bottom:1px\x20solid\x20var(--okdb-app-surface);\x20white-space:nowrap;\x20overflow:hidden;\x20text-overflow:ellipsis;\x20max-width:120px;\x22\x20:title=\x22entry.origin\x22>{{\x20(entry.origin\x20||\x20\x27—\x27).slice(0,\x208)\x20}}</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</each>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!--\x20Time-travel\x20scrubber\x20(sits\x20outside\x20overflow:hidden\x20so\x20tooltips\x20aren\x27t\x20clipped)\x20-->\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<tm-timeline\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:type=\x22type\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:item-key=\x22key\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:env=\x22$ok.stores.okdb.selectedEnv\x20||\x20\x27default\x27\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:selected-clock=\x22tmSelectedClock\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@tm-clock-select=\x22onTMClockSelect($event.detail)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@tm-diffs-loaded=\x22tmDiffs\x20=\x20$event.detail.diffs\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!--\x20TTL\x20detail\x20panel\x20-->\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22ttlOpen\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22margin-bottom:10px;\x20background:var(--okdb-app-bg-deep);\x20border:1px\x20solid\x20var(--okdb-app-border);\x20border-radius:6px;\x20padding:10px;\x20font-size:11px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20align-items:center;\x20gap:8px;\x20margin-bottom:8px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-weight:600;\x20opacity:.6;\x22>Time-to-Live</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22ttlInfo\x20&&\x20ttlInfo.expiresAt\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22\x27color:\x27\x20+\x20ttlBadgeColor\x20+\x20\x27;\x20font-family:monospace;\x27\x22>{{\x20fmtDuration(ttlInfo.remainingMs)\x20}}\x20remaining</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.35;\x20font-size:10px;\x22>·\x20expires\x20{{\x20new\x20Date(ttlInfo.expiresAt).toLocaleString()\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22!ttlInfo\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.4;\x22>No\x20TTL\x20set\x20—\x20this\x20item\x20will\x20not\x20expire.</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20gap:6px;\x20align-items:center;\x20flex-wrap:wrap;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<select\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@change=\x22onTTLPresetChange($event.target.value)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22font-size:11px;\x20padding:2px\x206px;\x20background:var(--okdb-app-bg-deep);\x20border:1px\x20solid\x20var(--okdb-app-border);\x20border-radius:4px;\x20color:var(--okdb-app-fg);\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<option\x20value=\x22\x22>Custom…</option>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<each\x20:of=\x22ttlPresets\x22\x20let:item=\x22p\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<option\x20:value=\x22String(p.ms)\x22\x20:selected=\x22ttlPreset\x20===\x20String(p.ms)\x22>{{\x20p.label\x20}}</option>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</each>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type=\x22number\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20!value=\x22ttlInputMs\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@input=\x22(ttlInputMs\x20=\x20$el.value,\x20ttlPreset\x20=\x20\x27\x27)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20placeholder=\x22ms\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22width:100px;\x20font-size:11px;\x20padding:2px\x206px;\x20background:var(--okdb-app-bg-deep);\x20border:1px\x20solid\x20var(--okdb-app-border);\x20border-radius:4px;\x20color:var(--okdb-app-fg);\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20@click=\x22setItemTTL()\x22\x20:disabled=\x22ttlBusy\x20||\x20!ttlInputMs\x22\x20style=\x22font-size:11px;\x20padding:2px\x2010px;\x20color:var(--okdb-success);\x20border-color:color-mix(in\x20srgb,\x20var(--okdb-success)\x2033%,\x20transparent);\x22>Set\x20TTL</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22ttlInfo\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20@click=\x22clearItemTTL()\x22\x20:disabled=\x22ttlBusy\x22\x20style=\x22font-size:11px;\x20padding:2px\x2010px;\x20color:var(--okdb-danger);\x20border-color:color-mix(in\x20srgb,\x20var(--okdb-danger)\x2033%,\x20transparent);\x22>Clear\x20TTL</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20@click=\x22loadTTL()\x22\x20:disabled=\x22ttlBusy\x22\x20style=\x22font-size:11px;\x20padding:2px\x208px;\x20opacity:.5;\x22\x20title=\x22Refresh\x20TTL\x20info\x22>↻</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!--\x20JSON\x20header\x20with\x20historical\x20clock\x20badge\x20+\x20prev/next\x20navigation\x20-->\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20align-items:center;\x20gap:5px;\x20margin-bottom:4px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22tmSelectedClock\x20!==\x20null\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22goPrev()\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:disabled=\x22!canGoPrev\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:style=\x22\x27font-size:12px;\x20padding:0\x206px;\x20height:20px;\x20line-height:1;\x20border-radius:4px;\x20border:1px\x20solid\x20var(--okdb-app-border);\x20background:var(--okdb-app-bg-deep);\x20color:var(--okdb-app-fg-muted);\x20cursor:pointer;\x20font-family:monospace;\x20opacity:\x27\x20+\x20(canGoPrev\x20?\x20\x271\x27\x20:\x20\x27.3\x27)\x20+\x20\x27;\x20transition:opacity\x20120ms;\x27\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20title=\x22Previous\x20snapshot\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20>←</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22display:inline-flex;\x20align-items:center;\x20gap:6px;\x20font-size:10px;\x20padding:1px\x208px;\x20border-radius:4px;\x20background:color-mix(in\x20srgb,\x20var(--okdb-accent)\x2012%,\x20transparent);\x20color:var(--okdb-accent);\x20font-family:monospace;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>clock\x20{{\x20tmSelectedClock\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22tmSelectedTime\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.6;\x20font-family:sans-serif;\x20font-weight:400;\x22>{{\x20tmSelectedTime\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22goNext()\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:disabled=\x22!canGoNext\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:style=\x22\x27font-size:12px;\x20padding:0\x206px;\x20height:20px;\x20line-height:1;\x20border-radius:4px;\x20border:1px\x20solid\x20var(--okdb-app-border);\x20background:var(--okdb-app-bg-deep);\x20color:var(--okdb-app-fg-muted);\x20cursor:pointer;\x20font-family:monospace;\x20opacity:\x27\x20+\x20(canGoNext\x20?\x20\x271\x27\x20:\x20\x27.3\x27)\x20+\x20\x27;\x20transition:opacity\x20120ms;\x27\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20title=\x22Next\x20snapshot\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20>→</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22position:relative;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<ok-json-input\x20ref=\x22editor\x22\x20:value=\x22tmSelectedClock\x20!==\x20null\x20?\x20tmValue\x20:\x20row\x22\x20@edit=\x22edited=$event.detail\x22\x20@parse-error=\x22jsonError=$event.detail\x22\x20style=\x22min-height:\x20300px\x22></ok-json-input>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22tmFetchBusy\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22position:absolute;\x20inset:0;\x20background:var(--okdb-app-bg)88;\x20display:flex;\x20align-items:center;\x20justify-content:center;\x20border-radius:6px;\x20z-index:2;\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:12px;\x20opacity:.6;\x22>loading…</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22margin-top:8px;\x20display:flex;\x20gap:8px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20@click=\x22reset\x22\x20:disabled=\x22!hasEditedValue\x22>Reset</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20@click=\x22save\x22\x20:disabled=\x22!hasEditedValue\x20||\x20busySave\x22>Save</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20@click=\x22remove\x22\x20:disabled=\x22busyRemove\x22>Delete</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</transition>\x0a\x20\x20\x20\x20','var(--okdb-success)','busySave','timestamp','Failed\x20to\x20clear\x20TTL','/ttl','7\x20days','$ok','remainingMs','Save\x20failed','DELETE','fmtDuration','tmFetchBusy','3262350bIrdwC','823499GJfzGU','value','toast','string','/changelog?limit=20','ttlPreset','numeric','5\x20min','6421257ZrkKqq','error','object','map','key','726873EXMVVi','statusText','toLocaleString','ttlBusy','find','Failed','\x20deleted','dispatchEvent','keys','stringify','/item/','stores','clockBusy','PUT','application/json','canGoPrev','$attr','30\x20days','ttlInfo','api','row','2-digit','json','TTL\x20set\x20(','shared','okdb','tmDiffs','clock','tmDiffClocks','clockEntries','floor','$watch','length','reloadTypes','24\x20hr','remove'];_0x2565=function(){return _0x447169;};return _0x2565();}const _0x41e131=_0x3bfb;(function(_0x1843c0,_0x242574){const _0x4d45ea=_0x3bfb,_0xadd0c3=_0x1843c0();while(!![]){try{const _0x3a5413=-parseInt(_0x4d45ea(0x125))/0x1*(parseInt(_0x4d45ea(0x105))/0x2)+parseInt(_0x4d45ea(0xcd))/0x3+parseInt(_0x4d45ea(0xf1))/0x4+parseInt(_0x4d45ea(0x107))/0x5*(parseInt(_0x4d45ea(0xf3))/0x6)+parseInt(_0x4d45ea(0x124))/0x7+parseInt(_0x4d45ea(0x106))/0x8+-parseInt(_0x4d45ea(0x12d))/0x9;if(_0x3a5413===_0x242574)break;else _0xadd0c3['push'](_0xadd0c3['shift']());}catch(_0x1ec7ee){_0xadd0c3['push'](_0xadd0c3['shift']());}}}(_0x2565,0xb6cc0));import _0x56789e from'../../../components/ok-json-input.ok.js';import _0x584c72 from'./tm-timeline.ok.js';function _0x3bfb(_0x1a2ae9,_0x433b97){_0x1a2ae9=_0x1a2ae9-0xca;const _0x2565f4=_0x2565();let _0x3bfb7f=_0x2565f4[_0x1a2ae9];return _0x3bfb7f;}function o(_0x514d96){const _0x12d3fd=_0x3bfb;return!!_0x514d96&&_0x12d3fd(0xca)==typeof _0x514d96&&!Array['isArray'](_0x514d96);}export default{'tag':'edit-row','dependencies':[_0x56789e,_0x584c72],'attr':{'type':{},'key':{},'row':{}},'context':_0x320a7f=>({get 'api'(){const _0xb0c805=_0x3bfb;return _0x320a7f[_0xb0c805(0x11e)][_0xb0c805(0xd8)][_0xb0c805(0xe6)][_0xb0c805(0x113)];},get 'type'(){return _0x320a7f['$attr']['type'];},get 'key'(){const _0x53b6fa=_0x3bfb;return _0x320a7f[_0x53b6fa(0xdd)][_0x53b6fa(0xcc)];},get 'row'(){const _0x4f7ad1=_0x3bfb;return _0x320a7f['$attr'][_0x4f7ad1(0xe1)];},get 'hasEditedValue'(){const _0x5f094b=_0x3bfb;return void 0x0!==this[_0x5f094b(0x114)]&&!this[_0x5f094b(0x10b)];},'edited':void 0x0,'jsonError':!0x1,'busySave':!0x1,'busyRemove':!0x1,'tmSelectedClock':null,'tmFetchBusy':!0x1,'tmValue':null,'tmDiffs':[],get 'tmDiffClocks'(){const _0x2bad37=_0x3bfb;return this[_0x2bad37(0xe7)][_0x2bad37(0xcb)](_0x37c4e8=>_0x37c4e8[_0x2bad37(0xe8)]);},get 'tmSelectedDiff'(){const _0x3c8e8a=_0x3bfb;return null===this[_0x3c8e8a(0xfb)]?null:this['tmDiffs'][_0x3c8e8a(0xd1)](_0x30583d=>_0x30583d['clock']===this[_0x3c8e8a(0xfb)])??null;},get 'tmSelectedTime'(){const _0x5dbdd7=_0x3bfb,_0x521b84=this['tmSelectedDiff']?.[_0x5dbdd7(0x11a)];return _0x521b84?new Date(_0x521b84)[_0x5dbdd7(0xcf)](_0x5dbdd7(0x101),{'day':_0x5dbdd7(0x12b),'month':_0x5dbdd7(0xf6),'year':_0x5dbdd7(0x12b),'hour':_0x5dbdd7(0xe2),'minute':_0x5dbdd7(0xe2),'second':_0x5dbdd7(0xe2)}):null;},get 'tmCurrentIdx'(){const _0x49eb03=_0x3bfb;return null===this[_0x49eb03(0xfb)]?-0x1:this[_0x49eb03(0xe9)][_0x49eb03(0x104)](this['tmSelectedClock']);},get 'canGoPrev'(){const _0x143eee=_0x3bfb;return this[_0x143eee(0xf8)]>0x0;},get 'canGoNext'(){const _0xf3b5e4=_0x3bfb;return-0x1!==this[_0xf3b5e4(0xf8)]&&this[_0xf3b5e4(0xf8)]<this['tmDiffClocks']['length']-0x1;},'goPrev'(){const _0x46d29a=_0x3bfb;this[_0x46d29a(0xdc)]&&this['onTMClockSelect']({'clock':this[_0x46d29a(0xe9)][this['tmCurrentIdx']-0x1]});},'goNext'(){const _0x5a1fb6=_0x3bfb;this['canGoNext']&&this[_0x5a1fb6(0x116)]({'clock':this[_0x5a1fb6(0xe9)][this['tmCurrentIdx']+0x1]});},'clockOpen':!0x1,'clockBusy':!0x1,'clockEntries':null,'ttlInfo':null,'ttlBusy':!0x1,'ttlOpen':!0x1,'ttlInputMs':'','ttlPreset':'','ttlPresets':[{'label':'1\x20min','ms':0xea60},{'label':_0x41e131(0x12c),'ms':0x493e0},{'label':'15\x20min','ms':0xdbba0},{'label':_0x41e131(0xfd),'ms':0x36ee80},{'label':'6\x20hr','ms':0x1499700},{'label':_0x41e131(0xef),'ms':0x5265c00},{'label':_0x41e131(0x11d),'ms':0x240c8400},{'label':_0x41e131(0xde),'ms':0x9a7ec800}],async 'loadTTL'(){const _0x3e9597=_0x41e131;if(!this[_0x3e9597(0xd0)]){this[_0x3e9597(0xd0)]=!0x0;try{const _0x4afbac=await fetch(this[_0x3e9597(0xe0)]+_0x3e9597(0xfa)+encodeURIComponent(this[_0x3e9597(0x10a)])+_0x3e9597(0xd7)+encodeURIComponent(this[_0x3e9597(0xcc)])+_0x3e9597(0x11c)),_0x2e3da7=await _0x4afbac[_0x3e9597(0xe3)](),_0xd00092=_0x2e3da7[_0x3e9597(0x10e)]??_0x2e3da7['result']??null;this[_0x3e9597(0xdf)]=_0xd00092||!0x1;}catch{this['ttlInfo']=!0x1;}finally{this[_0x3e9597(0xd0)]=!0x1;}}},async 'setItemTTL'(){const _0x35c2a2=_0x41e131,_0x46a6ef=parseInt(this[_0x35c2a2(0xff)]);if(_0x46a6ef&&!(_0x46a6ef<=0x0)){this[_0x35c2a2(0xd0)]=!0x0;try{const _0x392c55=await fetch(this['api']+_0x35c2a2(0xfa)+encodeURIComponent(this[_0x35c2a2(0x10a)])+_0x35c2a2(0xd7)+encodeURIComponent(this[_0x35c2a2(0xcc)])+'/ttl',{'method':_0x35c2a2(0xda),'headers':{'Content-Type':_0x35c2a2(0xdb)},'body':JSON[_0x35c2a2(0xd6)]({'ttl':_0x46a6ef})});if(!_0x392c55['ok']){const _0x540882=await _0x392c55[_0x35c2a2(0xe3)]()['catch'](()=>({}));throw new Error(_0x540882?.[_0x35c2a2(0x12e)]?.[_0x35c2a2(0xfe)]||_0x392c55[_0x35c2a2(0xce)]);}_0x320a7f[_0x35c2a2(0x11e)][_0x35c2a2(0xe5)]?.[_0x35c2a2(0x127)]?.[_0x35c2a2(0x111)]?.(_0x35c2a2(0xe4)+this[_0x35c2a2(0x122)](_0x46a6ef)+')'),await this[_0x35c2a2(0x102)]();}catch(_0x2c2473){_0x320a7f[_0x35c2a2(0x11e)][_0x35c2a2(0xe5)]?.[_0x35c2a2(0x127)]?.[_0x35c2a2(0x12e)]?.(_0x2c2473['message']||_0x35c2a2(0xf4));}finally{this[_0x35c2a2(0xd0)]=!0x1;}}},async 'clearItemTTL'(){const _0x150de6=_0x41e131;this[_0x150de6(0xd0)]=!0x0;try{const _0x595169=await fetch(this[_0x150de6(0xe0)]+_0x150de6(0xfa)+encodeURIComponent(this[_0x150de6(0x10a)])+'/item/'+encodeURIComponent(this[_0x150de6(0xcc)])+_0x150de6(0x11c),{'method':_0x150de6(0x121)});if(!_0x595169['ok'])throw new Error(_0x595169[_0x150de6(0xce)]);this['ttlInfo']=!0x1,this[_0x150de6(0xff)]='',this[_0x150de6(0x12a)]='',_0x320a7f[_0x150de6(0x11e)][_0x150de6(0xe5)]?.['toast']?.[_0x150de6(0x111)]?.('TTL\x20cleared');}catch(_0x9861a6){_0x320a7f[_0x150de6(0x11e)][_0x150de6(0xe5)]?.['toast']?.[_0x150de6(0x12e)]?.(_0x9861a6[_0x150de6(0xfe)]||_0x150de6(0x11b));}finally{this[_0x150de6(0xd0)]=!0x1;}},'onTTLPresetChange'(_0x583a26){const _0x59271a=_0x41e131;this['ttlPreset']=_0x583a26,_0x583a26&&(this[_0x59271a(0xff)]=_0x583a26);},'fmtDuration'(_0x3b31f0){const _0x55b14b=_0x41e131;if(null==_0x3b31f0)return'—';const _0x7b4d1f=Math['floor'](_0x3b31f0/0x3e8);return _0x7b4d1f<0x3c?_0x7b4d1f+'s':_0x7b4d1f<0xe10?Math[_0x55b14b(0xeb)](_0x7b4d1f/0x3c)+'m\x20'+_0x7b4d1f%0x3c+'s':_0x7b4d1f<0x15180?Math[_0x55b14b(0xeb)](_0x7b4d1f/0xe10)+'h\x20'+Math[_0x55b14b(0xeb)](_0x7b4d1f%0xe10/0x3c)+'m':Math[_0x55b14b(0xeb)](_0x7b4d1f/0x15180)+'d\x20'+Math[_0x55b14b(0xeb)](_0x7b4d1f%0x15180/0xe10)+'h';},get 'ttlBadgeText'(){const _0x2df51c=_0x41e131;return this['ttlBusy']?_0x2df51c(0xfc):this['ttlInfo']?this[_0x2df51c(0xdf)][_0x2df51c(0x11f)]<=0x0?'ttl:\x20expired':'ttl:\x20'+this['fmtDuration'](this['ttlInfo'][_0x2df51c(0x11f)]):'no\x20ttl';},get 'ttlBadgeColor'(){const _0xc9b16f=_0x41e131;return this[_0xc9b16f(0xdf)]?this[_0xc9b16f(0xdf)][_0xc9b16f(0x11f)]<=0x0?'var(--okdb-danger)':this[_0xc9b16f(0xdf)][_0xc9b16f(0x11f)]<0xea60?_0xc9b16f(0x112):_0xc9b16f(0x118):_0xc9b16f(0x10f);},'hlcToDate'(_0x1e3aac){const _0x53eb8f=_0x41e131,_0x24c6fb=Number(_0x1e3aac)||0x0,_0x1943fa=(_0x24c6fb-_0x24c6fb%0x400)/0x400;return _0x1943fa?new Date(_0x1943fa)[_0x53eb8f(0xcf)]():'—';},get 'latestClock'(){const _0x547c38=_0x41e131;return this['clockEntries']?.[_0x547c38(0xed)]?this[_0x547c38(0xea)][0x0][_0x547c38(0xe8)]??null:null;},get 'latestTime'(){const _0x5a844e=_0x41e131;if(!this[_0x5a844e(0xea)]?.[_0x5a844e(0xed)])return null;const _0x4471cf=this[_0x5a844e(0xea)][0x0]['timestamp'];return _0x4471cf?this['hlcToDate'](_0x4471cf):null;},async 'toggleClock'(){const _0x737661=_0x41e131;this[_0x737661(0x108)]=!this[_0x737661(0x108)];},async 'loadClock'(){const _0x129070=_0x41e131;if(!this['clockBusy']){this['clockBusy']=!0x0;try{const _0x41fca0=await fetch(this[_0x129070(0xe0)]+_0x129070(0xfa)+encodeURIComponent(this[_0x129070(0x10a)])+_0x129070(0xd7)+encodeURIComponent(this[_0x129070(0xcc)])+_0x129070(0x129)),_0x209980=await _0x41fca0[_0x129070(0xe3)]();this[_0x129070(0xea)]=_0x209980[_0x129070(0x10e)]??[];}catch{this[_0x129070(0xea)]=[];}finally{this[_0x129070(0xd9)]=!0x1;}}},async 'onTMClockSelect'({clock:_0x393335}){const _0x1fcf37=_0x41e131;if(this['tmSelectedClock']=_0x393335,null===_0x393335)return this[_0x1fcf37(0x109)]=null,this[_0x1fcf37(0x123)]=!0x1,void(this[_0x1fcf37(0x114)]=void 0x0);this[_0x1fcf37(0x123)]=!0x0;try{const _0x2c61e4=await fetch(this[_0x1fcf37(0xe0)]+_0x1fcf37(0xf9)+encodeURIComponent(this['type'])+'/'+encodeURIComponent(this[_0x1fcf37(0xcc)])+'/at/'+_0x393335),_0x100711=await _0x2c61e4[_0x1fcf37(0xe3)]();if(!_0x2c61e4['ok'])throw new Error(_0x100711?.[_0x1fcf37(0x12e)]?.[_0x1fcf37(0xfe)]||_0x1fcf37(0xd2));this[_0x1fcf37(0x109)]=_0x100711['result']?.[_0x1fcf37(0x126)]??_0x100711[_0x1fcf37(0x10e)]?.['value']??null,this[_0x1fcf37(0x114)]=JSON[_0x1fcf37(0x10d)](JSON[_0x1fcf37(0xd6)](this[_0x1fcf37(0x109)]));}catch{this[_0x1fcf37(0xfb)]=null,this[_0x1fcf37(0x109)]=null;}finally{this[_0x1fcf37(0x123)]=!0x1;}},'reset'(){const _0x3d7ec7=_0x41e131;this[_0x3d7ec7(0x114)]=void 0x0,this['jsonError']=!0x1,_0x320a7f[_0x3d7ec7(0x10c)]['editor']['reset']?.();},async 'save'(){const _0x98e582=_0x41e131;if(void 0x0!==this[_0x98e582(0x114)]&&!this[_0x98e582(0x10b)]){this[_0x98e582(0x119)]=!0x0;try{const _0x47c294=this['edited'],_0x36bf2c=await fetch(this[_0x98e582(0xe0)]+_0x98e582(0xfa)+this['type']+_0x98e582(0xd7)+this[_0x98e582(0xcc)],{'method':_0x98e582(0xda),'headers':{'Content-Type':_0x98e582(0xdb)},'body':JSON[_0x98e582(0xd6)](_0x47c294)});if(!_0x36bf2c['ok']){const _0x211de5=await _0x36bf2c['json']()[_0x98e582(0xf7)](()=>({})),_0x4889d6=_0x211de5?.['error']?.[_0x98e582(0xfe)]||_0x211de5?.[_0x98e582(0xfe)]||_0x211de5?.[_0x98e582(0x12e)]||_0x36bf2c[_0x98e582(0xce)];throw new Error(_0x98e582(0x128)==typeof _0x4889d6?_0x4889d6:_0x36bf2c['statusText']);}o(this['row'])&&o(_0x47c294)&&(Object[_0x98e582(0xd5)](this[_0x98e582(0xe1)])[_0x98e582(0x103)](_0x395bf7=>delete this[_0x98e582(0xe1)][_0x395bf7]),Object[_0x98e582(0xf5)](this['row'],_0x47c294)),_0x320a7f[_0x98e582(0xf2)]['dispatchEvent'](new CustomEvent('change',{'detail':{'key':this['key'],'value':_0x47c294}})),this[_0x98e582(0xea)]=null,await this[_0x98e582(0x110)]();}catch(_0x4c2072){console[_0x98e582(0x12e)]('Save\x20row\x20error',_0x4c2072),_0x320a7f['$ok'][_0x98e582(0xe5)]?.[_0x98e582(0x127)]?.[_0x98e582(0x12e)]?.(_0x4c2072[_0x98e582(0xfe)]||_0x98e582(0x120));}finally{this['busySave']=!0x1;}}},async 'remove'(){const _0x174dc3=_0x41e131;this['busyRemove']=!0x0;try{const _0x3fcba6=await fetch(this[_0x174dc3(0xe0)]+_0x174dc3(0xfa)+this[_0x174dc3(0x10a)]+'/item/'+this['key'],{'method':_0x174dc3(0x121)});if(!_0x3fcba6['ok'])throw new Error(_0x3fcba6['statusText']);_0x320a7f[_0x174dc3(0x11e)]['shared']['toast']?.[_0x174dc3(0x111)](this[_0x174dc3(0xcc)]+_0x174dc3(0xd3)),_0x320a7f[_0x174dc3(0xf2)][_0x174dc3(0xd4)](new CustomEvent(_0x174dc3(0xf0),{'detail':{'key':this[_0x174dc3(0xcc)],'value':this[_0x174dc3(0xe1)]}})),await _0x320a7f['$ok'][_0x174dc3(0xd8)][_0x174dc3(0xe6)][_0x174dc3(0xee)]();}catch(_0x1f2d78){console['error']('Remove\x20row\x20error',_0x1f2d78);}finally{this[_0x174dc3(0x115)]=!0x1;}}}),async 'init'(_0x3d7e4c){const _0x3083e3=_0x41e131;_0x3d7e4c[_0x3083e3(0xec)](()=>_0x3d7e4c[_0x3083e3(0xdd)][_0x3083e3(0x10a)]+'|'+_0x3d7e4c[_0x3083e3(0xdd)][_0x3083e3(0xcc)],()=>{const _0x5e3ad8=_0x3083e3;this[_0x5e3ad8(0xfb)]=null,this[_0x5e3ad8(0x109)]=null,this[_0x5e3ad8(0x123)]=!0x1,this[_0x5e3ad8(0xe7)]=[];}),await Promise[_0x3083e3(0x100)]([this['loadClock'](),this[_0x3083e3(0x102)]()]);},'template':_0x41e131(0x117)};
|
|
1
|
+
import t from"../../../components/ok-json-input.ok.js";import e from"./tm-timeline.ok.js";function o(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}export default{tag:"edit-row",dependencies:[t,e],attr:{type:{},key:{},row:{}},context:t=>({get api(){return t.$ok.stores.okdb.apiBase},get type(){return t.$attr.type},get key(){return t.$attr.key},get row(){return t.$attr.row},get hasEditedValue(){return void 0!==this.edited&&!this.jsonError},edited:void 0,jsonError:!1,busySave:!1,busyRemove:!1,tmSelectedClock:null,tmFetchBusy:!1,tmValue:null,tmDiffs:[],get tmDiffClocks(){return this.tmDiffs.map(t=>t.clock)},get tmSelectedDiff(){return null===this.tmSelectedClock?null:this.tmDiffs.find(t=>t.clock===this.tmSelectedClock)??null},get tmSelectedTime(){const t=this.tmSelectedDiff?.timestamp;return t?new Date(t).toLocaleString("en-GB",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):null},get tmCurrentIdx(){return null===this.tmSelectedClock?-1:this.tmDiffClocks.indexOf(this.tmSelectedClock)},get canGoPrev(){return this.tmCurrentIdx>0},get canGoNext(){return-1!==this.tmCurrentIdx&&this.tmCurrentIdx<this.tmDiffClocks.length-1},goPrev(){this.canGoPrev&&this.onTMClockSelect({clock:this.tmDiffClocks[this.tmCurrentIdx-1]})},goNext(){this.canGoNext&&this.onTMClockSelect({clock:this.tmDiffClocks[this.tmCurrentIdx+1]})},clockOpen:!1,clockBusy:!1,clockEntries:null,ttlInfo:null,ttlBusy:!1,ttlOpen:!1,ttlInputMs:"",ttlPreset:"",ttlPresets:[{label:"1 min",ms:6e4},{label:"5 min",ms:3e5},{label:"15 min",ms:9e5},{label:"1 hr",ms:36e5},{label:"6 hr",ms:216e5},{label:"24 hr",ms:864e5},{label:"7 days",ms:6048e5},{label:"30 days",ms:2592e6}],async loadTTL(){if(!this.ttlBusy){this.ttlBusy=!0;try{const t=await fetch(`${this.api}/type/${encodeURIComponent(this.type)}/item/${encodeURIComponent(this.key)}/ttl`),e=await t.json(),o=e.data??e.result??null;this.ttlInfo=o||!1}catch{this.ttlInfo=!1}finally{this.ttlBusy=!1}}},async setItemTTL(){const e=parseInt(this.ttlInputMs);if(e&&!(e<=0)){this.ttlBusy=!0;try{const o=await fetch(`${this.api}/type/${encodeURIComponent(this.type)}/item/${encodeURIComponent(this.key)}/ttl`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({ttl:e})});if(!o.ok){const t=await o.json().catch(()=>({}));throw new Error(t?.error?.message||o.statusText)}t.$ok.shared?.toast?.info?.(`TTL set (${this.fmtDuration(e)})`),await this.loadTTL()}catch(e){t.$ok.shared?.toast?.error?.(e.message||"Failed to set TTL")}finally{this.ttlBusy=!1}}},async clearItemTTL(){this.ttlBusy=!0;try{const e=await fetch(`${this.api}/type/${encodeURIComponent(this.type)}/item/${encodeURIComponent(this.key)}/ttl`,{method:"DELETE"});if(!e.ok)throw new Error(e.statusText);this.ttlInfo=!1,this.ttlInputMs="",this.ttlPreset="",t.$ok.shared?.toast?.info?.("TTL cleared")}catch(e){t.$ok.shared?.toast?.error?.(e.message||"Failed to clear TTL")}finally{this.ttlBusy=!1}},onTTLPresetChange(t){this.ttlPreset=t,t&&(this.ttlInputMs=t)},fmtDuration(t){if(null==t)return"—";const e=Math.floor(t/1e3);return e<60?e+"s":e<3600?Math.floor(e/60)+"m "+e%60+"s":e<86400?Math.floor(e/3600)+"h "+Math.floor(e%3600/60)+"m":Math.floor(e/86400)+"d "+Math.floor(e%86400/3600)+"h"},get ttlBadgeText(){return this.ttlBusy?"ttl …":this.ttlInfo?this.ttlInfo.remainingMs<=0?"ttl: expired":"ttl: "+this.fmtDuration(this.ttlInfo.remainingMs):"no ttl"},get ttlBadgeColor(){return this.ttlInfo?this.ttlInfo.remainingMs<=0?"var(--okdb-danger)":this.ttlInfo.remainingMs<6e4?"var(--okdb-orange)":"var(--okdb-success)":"var(--okdb-app-fg-muted)"},hlcToDate(t){const e=Number(t)||0,o=(e-e%1024)/1024;return o?new Date(o).toLocaleString():"—"},get latestClock(){return this.clockEntries?.length?this.clockEntries[0].clock??null:null},get latestTime(){if(!this.clockEntries?.length)return null;const t=this.clockEntries[0].timestamp;return t?this.hlcToDate(t):null},async toggleClock(){this.clockOpen=!this.clockOpen},async loadClock(){if(!this.clockBusy){this.clockBusy=!0;try{const t=await fetch(`${this.api}/type/${encodeURIComponent(this.type)}/item/${encodeURIComponent(this.key)}/changelog?limit=20`),e=await t.json();this.clockEntries=e.data??[]}catch{this.clockEntries=[]}finally{this.clockBusy=!1}}},async onTMClockSelect({clock:t}){if(this.tmSelectedClock=t,null===t)return this.tmValue=null,this.tmFetchBusy=!1,void(this.edited=void 0);this.tmFetchBusy=!0;try{const e=await fetch(`${this.api}/time-machine/${encodeURIComponent(this.type)}/${encodeURIComponent(this.key)}/at/${t}`),o=await e.json();if(!e.ok)throw new Error(o?.error?.message||"Failed");this.tmValue=o.result?.value??o.data?.value??null,this.edited=JSON.parse(JSON.stringify(this.tmValue))}catch{this.tmSelectedClock=null,this.tmValue=null}finally{this.tmFetchBusy=!1}},reset(){this.edited=void 0,this.jsonError=!1,t.$refs.editor.reset?.()},async save(){if(void 0!==this.edited&&!this.jsonError){this.busySave=!0;try{const e=this.edited,n=await fetch(`${this.api}/type/${this.type}/item/${this.key}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok){const t=await n.json().catch(()=>({})),e=t?.error?.message||t?.message||t?.error||n.statusText;throw new Error("string"==typeof e?e:n.statusText)}o(this.row)&&o(e)&&(Object.keys(this.row).forEach(t=>delete this.row[t]),Object.assign(this.row,e)),t.$el.dispatchEvent(new CustomEvent("change",{detail:{key:this.key,value:e}})),this.clockEntries=null,await this.loadClock()}catch(e){console.error("Save row error",e),t.$ok.shared?.toast?.error?.(e.message||"Save failed")}finally{this.busySave=!1}}},async remove(){this.busyRemove=!0;try{const e=await fetch(`${this.api}/type/${this.type}/item/${this.key}`,{method:"DELETE"});if(!e.ok)throw new Error(e.statusText);t.$ok.shared.toast?.info(`${this.key} deleted`),t.$el.dispatchEvent(new CustomEvent("remove",{detail:{key:this.key,value:this.row}})),await t.$ok.stores.okdb.reloadTypes()}catch(t){console.error("Remove row error",t)}finally{this.busyRemove=!1}}}),async init(t){t.$watch(()=>`${t.$attr.type}|${t.$attr.key}`,()=>{this.tmSelectedClock=null,this.tmValue=null,this.tmFetchBusy=!1,this.tmDiffs=[]}),await Promise.all([this.loadClock(),this.loadTTL()])},template:'\n <transition name="grow">\n <div>\n \x3c!-- Clock + TTL badges row --\x3e\n <div style="display:flex; align-items:center; gap:6px; margin-bottom:8px;">\n <button\n @click="toggleClock()"\n style="font-size:10px; padding:1px 7px; border-radius:4px; border:1px solid var(--okdb-app-border); background:var(--okdb-app-bg-deep); color:var(--okdb-app-fg-muted); cursor:pointer; font-family:monospace; display:flex; align-items:center; gap:5px;"\n title="Show change history for this record"\n >\n <if :="clockBusy">\n <span>clock …</span>\n </if>\n <if :="!clockBusy && latestClock != null">\n <span>clock: {{ latestClock }}</span>\n <if :="latestTime">\n <span style="opacity:.55; font-family:sans-serif; font-size:10px;">· {{ latestTime }}</span>\n </if>\n <span style="opacity:.4;">{{ clockOpen ? \'▲\' : \'▼\' }}</span>\n </if>\n <if :="!clockBusy && latestClock == null">\n <span style="opacity:.5;">no clock</span>\n </if>\n </button>\n\n <button\n @click="ttlOpen = !ttlOpen"\n :style="\'font-size:10px; padding:1px 7px; border-radius:4px; border:1px solid \' + (ttlInfo ? ttlBadgeColor + \'55\' : \'var(--okdb-app-border)\') + \'; background:var(--okdb-app-bg-deep); color:\' + ttlBadgeColor + \'; cursor:pointer; font-family:monospace; display:flex; align-items:center; gap:5px;\'"\n title="TTL (time-to-live) for this record"\n >\n <span>{{ ttlBadgeText }}</span>\n <if :="ttlInfo">\n <span style="opacity:.4;">{{ ttlOpen ? \'▲\' : \'▼\' }}</span>\n </if>\n </button>\n </div>\n\n \x3c!-- Changelog + time-travel panel (opens when clock badge clicked) --\x3e\n <if :="clockOpen">\n <div style="margin-bottom:10px;">\n \x3c!-- Changelog table --\x3e\n <if :="clockEntries && clockEntries.length > 0">\n <div style="margin-bottom:8px; background:var(--okdb-app-bg-deep); border:1px solid var(--okdb-app-border); border-radius:6px; overflow:hidden; font-size:11px;">\n <div style="display:grid; grid-template-columns:auto auto 1fr auto; gap:0;">\n <div style="padding:4px 10px; opacity:.4; border-bottom:1px solid var(--okdb-app-border); font-weight:600;">clock</div>\n <div style="padding:4px 10px; opacity:.4; border-bottom:1px solid var(--okdb-app-border); font-weight:600;">action</div>\n <div style="padding:4px 10px; opacity:.4; border-bottom:1px solid var(--okdb-app-border); font-weight:600;">wall time</div>\n <div style="padding:4px 10px; opacity:.4; border-bottom:1px solid var(--okdb-app-border); font-weight:600;">origin</div>\n <each :of="clockEntries" let:item="entry">\n <div style="padding:3px 10px; font-family:monospace; opacity:.8; border-bottom:1px solid var(--okdb-app-surface);">{{ entry.clock ?? \'—\' }}</div>\n <div style="padding:3px 10px; border-bottom:1px solid var(--okdb-app-surface);">\n <span :style="\'color:\' + (entry.action === \'put\' ? \'var(--okdb-success)\' : entry.action === \'remove\' ? \'var(--okdb-danger)\' : \'var(--okdb-warning)\')">{{ entry.action }}</span>\n </div>\n <div style="padding:3px 10px; opacity:.6; border-bottom:1px solid var(--okdb-app-surface); white-space:nowrap;">{{ hlcToDate(entry.timestamp) }}</div>\n <div style="padding:3px 10px; font-family:monospace; opacity:.35; font-size:10px; border-bottom:1px solid var(--okdb-app-surface); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:120px;" :title="entry.origin">{{ (entry.origin || \'—\').slice(0, 8) }}</div>\n </each>\n </div>\n </div>\n </if>\n \x3c!-- Time-travel scrubber (sits outside overflow:hidden so tooltips aren\'t clipped) --\x3e\n <tm-timeline\n :type="type"\n :item-key="key"\n :env="$ok.stores.okdb.selectedEnv || \'default\'"\n :selected-clock="tmSelectedClock"\n @tm-clock-select="onTMClockSelect($event.detail)"\n @tm-diffs-loaded="tmDiffs = $event.detail.diffs"\n />\n </div>\n </if>\n\n \x3c!-- TTL detail panel --\x3e\n <if :="ttlOpen">\n <div style="margin-bottom:10px; background:var(--okdb-app-bg-deep); border:1px solid var(--okdb-app-border); border-radius:6px; padding:10px; font-size:11px;">\n <div style="display:flex; align-items:center; gap:8px; margin-bottom:8px;">\n <span style="font-weight:600; opacity:.6;">Time-to-Live</span>\n <if :="ttlInfo && ttlInfo.expiresAt">\n <span :style="\'color:\' + ttlBadgeColor + \'; font-family:monospace;\'">{{ fmtDuration(ttlInfo.remainingMs) }} remaining</span>\n <span style="opacity:.35; font-size:10px;">· expires {{ new Date(ttlInfo.expiresAt).toLocaleString() }}</span>\n </if>\n <if :="!ttlInfo">\n <span style="opacity:.4;">No TTL set — this item will not expire.</span>\n </if>\n </div>\n <div style="display:flex; gap:6px; align-items:center; flex-wrap:wrap;">\n <select\n @change="onTTLPresetChange($event.target.value)"\n style="font-size:11px; padding:2px 6px; background:var(--okdb-app-bg-deep); border:1px solid var(--okdb-app-border); border-radius:4px; color:var(--okdb-app-fg);"\n >\n <option value="">Custom…</option>\n <each :of="ttlPresets" let:item="p">\n <option :value="String(p.ms)" :selected="ttlPreset === String(p.ms)">{{ p.label }}</option>\n </each>\n </select>\n <input\n type="number"\n !value="ttlInputMs"\n @input="(ttlInputMs = $el.value, ttlPreset = \'\')"\n placeholder="ms"\n style="width:100px; font-size:11px; padding:2px 6px; background:var(--okdb-app-bg-deep); border:1px solid var(--okdb-app-border); border-radius:4px; color:var(--okdb-app-fg);"\n />\n <button @click="setItemTTL()" :disabled="ttlBusy || !ttlInputMs" style="font-size:11px; padding:2px 10px; color:var(--okdb-success); border-color:color-mix(in srgb, var(--okdb-success) 33%, transparent);">Set TTL</button>\n <if :="ttlInfo">\n <button @click="clearItemTTL()" :disabled="ttlBusy" style="font-size:11px; padding:2px 10px; color:var(--okdb-danger); border-color:color-mix(in srgb, var(--okdb-danger) 33%, transparent);">Clear TTL</button>\n </if>\n <button @click="loadTTL()" :disabled="ttlBusy" style="font-size:11px; padding:2px 8px; opacity:.5;" title="Refresh TTL info">↻</button>\n </div>\n </div>\n </if>\n\n <div>\n \x3c!-- JSON header with historical clock badge + prev/next navigation --\x3e\n <div style="display:flex; align-items:center; gap:5px; margin-bottom:4px;">\n <if :="tmSelectedClock !== null">\n <button\n @click="goPrev()"\n :disabled="!canGoPrev"\n :style="\'font-size:12px; padding:0 6px; height:20px; line-height:1; border-radius:4px; border:1px solid var(--okdb-app-border); background:var(--okdb-app-bg-deep); color:var(--okdb-app-fg-muted); cursor:pointer; font-family:monospace; opacity:\' + (canGoPrev ? \'1\' : \'.3\') + \'; transition:opacity 120ms;\'"\n title="Previous snapshot"\n >←</button>\n <span style="display:inline-flex; align-items:center; gap:6px; font-size:10px; padding:1px 8px; border-radius:4px; background:color-mix(in srgb, var(--okdb-accent) 12%, transparent); color:var(--okdb-accent); font-family:monospace;">\n <span>clock {{ tmSelectedClock }}</span>\n <if :="tmSelectedTime">\n <span style="opacity:.6; font-family:sans-serif; font-weight:400;">{{ tmSelectedTime }}</span>\n </if>\n </span>\n <button\n @click="goNext()"\n :disabled="!canGoNext"\n :style="\'font-size:12px; padding:0 6px; height:20px; line-height:1; border-radius:4px; border:1px solid var(--okdb-app-border); background:var(--okdb-app-bg-deep); color:var(--okdb-app-fg-muted); cursor:pointer; font-family:monospace; opacity:\' + (canGoNext ? \'1\' : \'.3\') + \'; transition:opacity 120ms;\'"\n title="Next snapshot"\n >→</button>\n </if>\n </div>\n\n <div style="position:relative;">\n <ok-json-input ref="editor" :value="tmSelectedClock !== null ? tmValue : row" @edit="edited=$event.detail" @parse-error="jsonError=$event.detail" style="min-height: 300px"></ok-json-input>\n <if :="tmFetchBusy">\n <div\n style="position:absolute; inset:0; background:var(--okdb-app-bg)88; display:flex; align-items:center; justify-content:center; border-radius:6px; z-index:2;"\n >\n <span style="font-size:12px; opacity:.6;">loading…</span>\n </div>\n </if>\n </div>\n\n <div style="margin-top:8px; display:flex; gap:8px;">\n <button @click="reset" :disabled="!hasEditedValue">Reset</button>\n <button @click="save" :disabled="!hasEditedValue || busySave">Save</button>\n <button @click="remove" :disabled="busyRemove">Delete</button>\n </div>\n </div>\n </div>\n </transition>\n '};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xd483a5=_0x8d5f;function _0x8d5f(_0x52f4d5,_0x112031){_0x52f4d5=_0x52f4d5-0x18b;const _0x749d11=_0x749d();let _0x8d5f53=_0x749d11[_0x52f4d5];return _0x8d5f53;}(function(_0x8d64e4,_0x551713){const _0x128965=_0x8d5f,_0x577aec=_0x8d64e4();while(!![]){try{const _0x195f70=-parseInt(_0x128965(0x1bb))/0x1+parseInt(_0x128965(0x1e0))/0x2+-parseInt(_0x128965(0x18e))/0x3*(-parseInt(_0x128965(0x19f))/0x4)+parseInt(_0x128965(0x1b7))/0x5+parseInt(_0x128965(0x1a6))/0x6*(-parseInt(_0x128965(0x197))/0x7)+parseInt(_0x128965(0x1e3))/0x8*(parseInt(_0x128965(0x1b6))/0x9)+-parseInt(_0x128965(0x1b5))/0xa;if(_0x195f70===_0x551713)break;else _0x577aec['push'](_0x577aec['shift']());}catch(_0x62e44b){_0x577aec['push'](_0x577aec['shift']());}}}(_0x749d,0x75b5c));import _0x510767 from'@toolkit/elements/ok-icon.ok.js';export default{'tag':'tm-timeline','components':[_0x510767],'attr':{'type':{},'itemKey':{},'env':{},'selectedClock':{}},'context':_0x5a70e9=>({'busy':!0x1,'diffs':[],'hoverClock':null,'isDragging':!0x1,'dragClock':null,get 'type'(){const _0x5f0fe1=_0x8d5f;return _0x5a70e9['$attr'][_0x5f0fe1(0x1cf)];},get 'itemKey'(){const _0x33b1a3=_0x8d5f;return _0x5a70e9[_0x33b1a3(0x1b3)][_0x33b1a3(0x1ca)];},get 'env'(){const _0x5ac1d9=_0x8d5f;return _0x5a70e9[_0x5ac1d9(0x1b3)][_0x5ac1d9(0x1b2)];},get 'selectedClock'(){const _0x2521bf=_0x8d5f,_0x1908ab=_0x5a70e9[_0x2521bf(0x1b3)]['selectedClock'];return null!=_0x1908ab?Number(_0x1908ab):null;},get '_cappedFractions'(){const _0x5387a1=_0x8d5f,_0x378fae=this[_0x5387a1(0x1de)][_0x5387a1(0x1c2)];if(0x0===_0x378fae)return new Map();if(0x1===_0x378fae)return new Map([[this[_0x5387a1(0x1de)][0x0]['clock'],0.5]]);const _0x2fa2e8=this[_0x5387a1(0x1de)]['map'](_0x44175c=>_0x44175c['clock']),_0x159719=[];for(let _0x3b31a8=0x1;_0x3b31a8<_0x378fae;_0x3b31a8++)_0x159719[_0x5387a1(0x1c3)](_0x2fa2e8[_0x3b31a8]-_0x2fa2e8[_0x3b31a8-0x1]);const _0x180115=[..._0x159719][_0x5387a1(0x1d5)]((_0x176456,_0x1c8f30)=>_0x176456-_0x1c8f30),_0x1aab96=0x4*_0x180115[Math['floor'](_0x180115[_0x5387a1(0x1c2)]/0x2)],_0x4b34c8=_0x159719[_0x5387a1(0x198)](_0x59e2e8=>Math[_0x5387a1(0x1c4)](_0x59e2e8,_0x1aab96)),_0x152cc1=[0x0];for(const _0x55249e of _0x4b34c8)_0x152cc1[_0x5387a1(0x1c3)](_0x152cc1[_0x152cc1[_0x5387a1(0x1c2)]-0x1]+_0x55249e);const _0x505d4b=_0x152cc1[_0x152cc1['length']-0x1],_0x1c734e=new Map();return _0x2fa2e8[_0x5387a1(0x194)]((_0x4b495a,_0x271fea)=>_0x1c734e[_0x5387a1(0x18d)](_0x4b495a,_0x505d4b?_0x152cc1[_0x271fea]/_0x505d4b:0x0)),_0x1c734e;},'dotFraction'(_0x204c86){const _0x259b24=_0x8d5f;return this[_0x259b24(0x191)][_0x259b24(0x1a0)](_0x204c86)??0.5;},'fieldsChanged':_0x108c55=>Object[_0xd483a5(0x1da)](_0x108c55[_0xd483a5(0x1c9)]||{})[_0xd483a5(0x1c2)]+(_0x108c55[_0xd483a5(0x1d7)]||[])[_0xd483a5(0x1c2)],'wallTime':_0x1cf9e1=>_0x1cf9e1['timestamp']?new Date(_0x1cf9e1[_0xd483a5(0x1a8)])['toLocaleString'](_0xd483a5(0x1dc),{'day':'numeric','month':_0xd483a5(0x18f),'year':_0xd483a5(0x1db),'hour':_0xd483a5(0x1ed),'minute':_0xd483a5(0x1ed),'second':_0xd483a5(0x1ed)}):null,get 'activeTooltipClock'(){const _0x1a0c7c=_0xd483a5;return this['isDragging']?this[_0x1a0c7c(0x1ae)]:this[_0x1a0c7c(0x1ec)];},async 'load'(){const _0x1ffbe0=_0xd483a5;if(this[_0x1ffbe0(0x1cf)]&&this[_0x1ffbe0(0x1ca)]&&this[_0x1ffbe0(0x1b2)]){this[_0x1ffbe0(0x1b9)]=!0x0;try{const _0x291d30=__ENV__[_0x1ffbe0(0x1d6)]+_0x1ffbe0(0x1b0)+encodeURIComponent(this[_0x1ffbe0(0x1b2)])+_0x1ffbe0(0x192)+encodeURIComponent(this[_0x1ffbe0(0x1cf)])+'/'+encodeURIComponent(this[_0x1ffbe0(0x1ca)])+_0x1ffbe0(0x1a5),_0x5386ad=await fetch(_0x291d30);if(!_0x5386ad['ok'])return void(this[_0x1ffbe0(0x1de)]=[]);const _0x56317a=await _0x5386ad[_0x1ffbe0(0x1a7)]();this[_0x1ffbe0(0x1de)]=_0x56317a[_0x1ffbe0(0x19c)]?.['diffs']||[];}catch{this[_0x1ffbe0(0x1de)]=[];}finally{this['busy']=!0x1;}_0x5a70e9['$el'][_0x1ffbe0(0x1aa)](new CustomEvent(_0x1ffbe0(0x1eb),{'detail':{'diffs':this['diffs']},'bubbles':!0x0}));}},'selectDot'(_0x1e8258){const _0x588f89=_0xd483a5;_0x5a70e9[_0x588f89(0x1b4)]['dispatchEvent'](new CustomEvent(_0x588f89(0x1c5),{'detail':{'clock':_0x1e8258},'bubbles':!0x0}));},'selectCurrent'(){const _0x212c34=_0xd483a5;_0x5a70e9[_0x212c34(0x1b4)][_0x212c34(0x1aa)](new CustomEvent(_0x212c34(0x1c5),{'detail':{'clock':null},'bubbles':!0x0}));},'nearestClockForFrac'(_0x2e6b24){const _0x121d13=_0xd483a5;if(!this[_0x121d13(0x1de)][_0x121d13(0x1c2)])return null;const _0x5ba5f3=this[_0x121d13(0x191)];let _0x12203d=this[_0x121d13(0x1de)][0x0],_0x26695d=0x1/0x0;for(const _0x15f42c of this['diffs']){const _0x4919b6=Math[_0x121d13(0x1c6)]((_0x5ba5f3[_0x121d13(0x1a0)](_0x15f42c[_0x121d13(0x1d4)])??0x0)-_0x2e6b24);_0x4919b6<_0x26695d&&(_0x26695d=_0x4919b6,_0x12203d=_0x15f42c);}return _0x12203d[_0x121d13(0x1d4)];},'fracFromEvent'(_0x2024b6){const _0x17b97b=_0xd483a5,_0x6d17f4=_0x5a70e9[_0x17b97b(0x1b4)][_0x17b97b(0x18c)](_0x17b97b(0x19a));if(!_0x6d17f4)return null;const _0x43c0b3=_0x6d17f4['getBoundingClientRect']();return Math['max'](0x0,Math['min'](0x1,(_0x2024b6[_0x17b97b(0x1af)]-_0x43c0b3[_0x17b97b(0x199)])/_0x43c0b3[_0x17b97b(0x1bd)]));},'startDrag'(_0x569251){const _0x23c4d3=_0xd483a5;_0x569251[_0x23c4d3(0x1ab)]();const _0x3216e4=this['fracFromEvent'](_0x569251);if(null===_0x3216e4)return;this[_0x23c4d3(0x1a2)]=!0x0,this['dragClock']=this[_0x23c4d3(0x1b8)](_0x3216e4);const _0x10a5cd=_0x1c5eba=>{const _0x4d7b6d=_0x23c4d3,_0x5a7fcb=this['fracFromEvent'](_0x1c5eba);null!==_0x5a7fcb&&(this[_0x4d7b6d(0x1ae)]=this[_0x4d7b6d(0x1b8)](_0x5a7fcb));},_0xede425=()=>{const _0x3f9e40=_0x23c4d3;document[_0x3f9e40(0x1be)](_0x3f9e40(0x1e7),_0x10a5cd),document['removeEventListener']('mouseup',_0xede425),this[_0x3f9e40(0x1a2)]=!0x1;const _0x584565=this['dragClock'];this[_0x3f9e40(0x1ae)]=null,null!==_0x584565&&(this[_0x3f9e40(0x1cd)](_0x584565),this[_0x3f9e40(0x1ec)]=_0x584565);};document['addEventListener'](_0x23c4d3(0x1e7),_0x10a5cd),document[_0x23c4d3(0x1a1)](_0x23c4d3(0x1e1),_0xede425);},'dotStyle'(_0x28c6ca){const _0x45348b=_0xd483a5,_0x113812=this[_0x45348b(0x1d9)](_0x28c6ca[_0x45348b(0x1d4)]),_0x163ea2=!this['isDragging']&&this[_0x45348b(0x1ec)]===_0x28c6ca['clock'],_0x5dce40=this[_0x45348b(0x1a2)]&&this[_0x45348b(0x1ae)]===_0x28c6ca[_0x45348b(0x1d4)];let _0x7a7a5b=_0x45348b(0x1d3),_0x241733=_0x45348b(0x1ac),_0x5562cc='.55';return this[_0x45348b(0x1a3)]===_0x28c6ca['clock']?(_0x7a7a5b='10px',_0x241733=_0x45348b(0x19e),_0x5562cc='1'):_0x5dce40?(_0x7a7a5b='8px',_0x241733=_0x45348b(0x19e),_0x5562cc=_0x45348b(0x1cc)):_0x163ea2&&(_0x7a7a5b=_0x45348b(0x1d2),_0x241733=_0x45348b(0x1c0),_0x5562cc='.9'),[_0x45348b(0x1e9),_0x45348b(0x1d8)+_0x113812+'\x20*\x20(100%\x20-\x2012px))',_0x45348b(0x19b),_0x45348b(0x18b),_0x45348b(0x195)+_0x7a7a5b,_0x45348b(0x19d)+_0x7a7a5b,_0x45348b(0x1ad),'background:'+_0x241733,_0x45348b(0x1e4)+_0x5562cc,_0x45348b(0x1ba),_0x45348b(0x1cb)+(this[_0x45348b(0x1a2)]?_0x45348b(0x1bc):_0x45348b(0x1c1)),_0x45348b(0x196)][_0x45348b(0x1ce)](';');},'dragRingStyle'(){const _0x18e072=_0xd483a5;return this[_0x18e072(0x1a2)]&&null!==this[_0x18e072(0x1ae)]?[_0x18e072(0x1e9),'left:calc(6px\x20+\x20'+this[_0x18e072(0x1d9)](this['dragClock'])+_0x18e072(0x1b1),'top:50%',_0x18e072(0x18b),'width:16px',_0x18e072(0x1e2),_0x18e072(0x1ad),'border:2px\x20solid\x20var(--okdb-accent)',_0x18e072(0x1d0),_0x18e072(0x1a4),'z-index:4','transition:left\x2070ms\x20cubic-bezier(0.25,0.1,0.25,1)']['join'](';'):_0x18e072(0x1e5);},'tooltipStyle'(_0x595180){const _0x49250a=_0xd483a5;return[_0x49250a(0x1e9),_0x49250a(0x1ee)+this[_0x49250a(0x1d9)](_0x595180[_0x49250a(0x1d4)])+'\x20*\x20(100%\x20-\x2012px)),\x20calc(100%\x20-\x2040px))',_0x49250a(0x1ea),_0x49250a(0x1e6),'background:var(--okdb-app-bg-deep)',_0x49250a(0x1dd),_0x49250a(0x1c8),_0x49250a(0x1d1),'font-size:11px',_0x49250a(0x1a9),_0x49250a(0x1a4),_0x49250a(0x1bf),_0x49250a(0x1c7),_0x49250a(0x193)]['join'](';');}}),async 'init'(_0x2bf4a2){const _0x4b4f97=_0xd483a5;_0x2bf4a2[_0x4b4f97(0x1e8)](()=>_0x2bf4a2[_0x4b4f97(0x1b3)]['type']+'|'+_0x2bf4a2[_0x4b4f97(0x1b3)][_0x4b4f97(0x1ca)]+'|'+_0x2bf4a2[_0x4b4f97(0x1b3)][_0x4b4f97(0x1b2)],()=>{this['diffs']=[],this['load']();}),await this[_0x4b4f97(0x190)]();},'template':_0xd483a5(0x1df),'style':''};function _0x749d(){const _0x5cd2c6=['abs','color:var(--okdb-app-fg)','border-radius:6px','put','itemKey','cursor:','.75','selectDot','join','type','background:color-mix(in\x20srgb,\x20var(--okdb-accent)\x2010%,\x20transparent)','padding:6px\x2010px','10px','6px','clock','sort','API','delete','left:calc(6px\x20+\x20','dotFraction','keys','numeric','en-GB','border:1px\x20solid\x20var(--okdb-app-border)','diffs','\x0a<if\x20:=\x22diffs.length\x20>\x200\x22>\x0a<div>\x0a\x0a\x20\x20<!--\x20Header:\x20label\x20+\x20\x22back\x20to\x20live\x22\x20button\x20-->\x0a\x20\x20<div\x20style=\x22display:flex;\x20align-items:center;\x20justify-content:space-between;\x20margin-bottom:7px;\x22>\x0a\x20\x20\x20\x20<span\x20style=\x22font-size:10px;\x20font-family:monospace;\x20letter-spacing:.05em;\x20text-transform:uppercase;\x20opacity:.38;\x20user-select:none;\x22>\x0a\x20\x20\x20\x20\x20\x20time\x20travel\x20·\x20{{\x20diffs.length\x20}}\x20snapshot{{\x20diffs.length\x20===\x201\x20?\x20\x27\x27\x20:\x20\x27s\x27\x20}}\x0a\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20<if\x20:=\x22selectedClock\x20!==\x20null\x22>\x0a\x20\x20\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22selectCurrent()\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20style=\x22font-size:10px;\x20padding:1px\x208px;\x20border-radius:4px;\x20border:1px\x20solid\x20color-mix(in\x20srgb,\x20var(--okdb-accent)\x2035%,\x20transparent);\x20background:color-mix(in\x20srgb,\x20var(--okdb-accent)\x208%,\x20transparent);\x20color:var(--okdb-accent);\x20cursor:pointer;\x20font-family:monospace;\x20line-height:1.6;\x22\x0a\x20\x20\x20\x20\x20\x20>←\x20live</button>\x0a\x20\x20\x20\x20</if>\x0a\x20\x20</div>\x0a\x0a\x20\x20<!--\x20Scrubber:\x20capped\x20width\x20so\x20it\x20never\x20fills\x20a\x20wide\x20table\x20-->\x0a\x20\x20<div\x20style=\x22max-width:480px;\x20padding-bottom:10px;\x22>\x0a\x20\x20\x20\x20<div\x0a\x20\x20\x20\x20\x20\x20data-track\x0a\x20\x20\x20\x20\x20\x20style=\x22position:relative;\x20height:26px;\x20width:100%;\x20user-select:none;\x22\x0a\x20\x20\x20\x20\x20\x20:style=\x22\x27cursor:\x27\x20+\x20(isDragging\x20?\x20\x27grabbing\x27\x20:\x20\x27ew-resize\x27)\x22\x0a\x20\x20\x20\x20\x20\x20@mousedown=\x22startDrag($event)\x22\x0a\x20\x20\x20\x20>\x0a\x0a\x20\x20\x20\x20\x20\x20<!--\x20Track\x20line\x20-->\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22position:absolute;\x20left:6px;\x20right:6px;\x20top:50%;\x20height:2px;\x20transform:translateY(-50%);\x20background:var(--okdb-app-border);\x20border-radius:1px;\x20pointer-events:none;\x22></div>\x0a\x0a\x20\x20\x20\x20\x20\x20<!--\x20Diff\x20dots\x20+\x20tooltips\x20-->\x0a\x20\x20\x20\x20\x20\x20<div\x20as=\x22repeat\x22\x20:of=\x22diffs\x22\x20let:item=\x22diff\x22>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<!--\x20Tooltip\x20(above\x20track,\x20shown\x20on\x20hover\x20or\x20drag-snap)\x20-->\x0a\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22activeTooltipClock\x20===\x20diff.clock\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20:style=\x22tooltipStyle(diff)\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20align-items:center;\x20gap:5px;\x20margin-bottom:3px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<ok-icon\x20name=\x22clock\x22\x20style=\x22width:10px;height:10px;opacity:.5;flex-shrink:0;\x22></ok-icon>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-family:monospace;\x20color:var(--okdb-accent);\x20font-size:10px;\x22>clock\x20{{\x20diff.clock\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22wallTime(diff)\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22opacity:.7;\x20font-size:11px;\x22>{{\x20wallTime(diff)\x20}}</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22opacity:.4;\x20margin-top:3px;\x20font-size:10px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{\x20fieldsChanged(diff)\x20}}\x20field{{\x20fieldsChanged(diff)\x20===\x201\x20?\x20\x27\x27\x20:\x20\x27s\x27\x20}}\x20changed\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<!--\x20Dot\x20-->\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:style=\x22dotStyle(diff)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@mouseenter=\x22!isDragging\x20&&\x20(hoverClock\x20=\x20diff.clock)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@mouseleave=\x22!isDragging\x20&&\x20(hoverClock\x20=\x20null)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22!isDragging\x20&&\x20selectDot(diff.clock)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20></div>\x0a\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20\x20\x20<!--\x20Snapping\x20ring:\x20jumps\x20to\x20nearest\x20clock\x20with\x20CSS\x20transition\x20-->\x0a\x20\x20\x20\x20\x20\x20<div\x20:style=\x22dragRingStyle()\x22\x20style=\x22pointer-events:none;\x22></div>\x0a\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</div>\x0a\x0a</div>\x0a</if>\x0a','1887862FkxObM','mouseup','height:16px','8hkniiw','opacity:','display:none','transform:translateX(-50%)','mousemove','$watch','position:absolute','bottom:calc(100%\x20+\x208px)','tm-diffs-loaded','hoverClock','2-digit','left:clamp(40px,\x20calc(6px\x20+\x20','transform:translate(-50%,-50%)','querySelector','set','611904OaCAkS','short','load','_cappedFractions','/time-machine/','box-shadow:0\x202px\x2010px\x20color-mix(in\x20srgb,\x20#000\x2025%,\x20transparent)','forEach','width:','z-index:3','405006lcKjWf','map','left','[data-track]','top:50%','data','height:','var(--okdb-accent)','8ebbbCM','get','addEventListener','isDragging','selectedClock','pointer-events:none','/history','84peOUal','json','timestamp','white-space:nowrap','dispatchEvent','preventDefault','var(--okdb-app-fg-muted)','border-radius:50%','dragClock','clientX','/env/','\x20*\x20(100%\x20-\x2012px))','env','$attr','$el','2230340jsqbsz','1729656LrXgNy','1597400sKXqVZ','nearestClockForFrac','busy','transition:width\x20100ms\x20ease,height\x20100ms\x20ease,background\x20100ms\x20ease,opacity\x20100ms\x20ease','348345SdXKSs','grabbing','width','removeEventListener','z-index:10','var(--okdb-app-fg)','pointer','length','push','min','tm-clock-select'];_0x749d=function(){return _0x5cd2c6;};return _0x749d();}
|
|
1
|
+
import t from"@toolkit/elements/ok-icon.ok.js";export default{tag:"tm-timeline",components:[t],attr:{type:{},itemKey:{},env:{},selectedClock:{}},context:t=>({busy:!1,diffs:[],hoverClock:null,isDragging:!1,dragClock:null,get type(){return t.$attr.type},get itemKey(){return t.$attr.itemKey},get env(){return t.$attr.env},get selectedClock(){const e=t.$attr.selectedClock;return null!=e?Number(e):null},get _cappedFractions(){const t=this.diffs.length;if(0===t)return new Map;if(1===t)return new Map([[this.diffs[0].clock,.5]]);const e=this.diffs.map(t=>t.clock),n=[];for(let i=1;i<t;i++)n.push(e[i]-e[i-1]);const i=[...n].sort((t,e)=>t-e),o=4*i[Math.floor(i.length/2)],s=n.map(t=>Math.min(t,o)),r=[0];for(const t of s)r.push(r[r.length-1]+t);const a=r[r.length-1],l=new Map;return e.forEach((t,e)=>l.set(t,a?r[e]/a:0)),l},dotFraction(t){return this._cappedFractions.get(t)??.5},fieldsChanged:t=>Object.keys(t.put||{}).length+(t.delete||[]).length,wallTime:t=>t.timestamp?new Date(t.timestamp).toLocaleString("en-GB",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):null,get activeTooltipClock(){return this.isDragging?this.dragClock:this.hoverClock},async load(){if(this.type&&this.itemKey&&this.env){this.busy=!0;try{const t=`${__ENV__.API}/env/${encodeURIComponent(this.env)}/time-machine/${encodeURIComponent(this.type)}/${encodeURIComponent(this.itemKey)}/history`,e=await fetch(t);if(!e.ok)return void(this.diffs=[]);const n=await e.json();this.diffs=n.data?.diffs||[]}catch{this.diffs=[]}finally{this.busy=!1}t.$el.dispatchEvent(new CustomEvent("tm-diffs-loaded",{detail:{diffs:this.diffs},bubbles:!0}))}},selectDot(e){t.$el.dispatchEvent(new CustomEvent("tm-clock-select",{detail:{clock:e},bubbles:!0}))},selectCurrent(){t.$el.dispatchEvent(new CustomEvent("tm-clock-select",{detail:{clock:null},bubbles:!0}))},nearestClockForFrac(t){if(!this.diffs.length)return null;const e=this._cappedFractions;let n=this.diffs[0],i=1/0;for(const o of this.diffs){const s=Math.abs((e.get(o.clock)??0)-t);s<i&&(i=s,n=o)}return n.clock},fracFromEvent(e){const n=t.$el.querySelector("[data-track]");if(!n)return null;const i=n.getBoundingClientRect();return Math.max(0,Math.min(1,(e.clientX-i.left)/i.width))},startDrag(t){t.preventDefault();const e=this.fracFromEvent(t);if(null===e)return;this.isDragging=!0,this.dragClock=this.nearestClockForFrac(e);const n=t=>{const e=this.fracFromEvent(t);null!==e&&(this.dragClock=this.nearestClockForFrac(e))},i=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",i),this.isDragging=!1;const t=this.dragClock;this.dragClock=null,null!==t&&(this.selectDot(t),this.hoverClock=t)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",i)},dotStyle(t){const e=this.dotFraction(t.clock),n=!this.isDragging&&this.hoverClock===t.clock,i=this.isDragging&&this.dragClock===t.clock;let o="6px",s="var(--okdb-app-fg-muted)",r=".55";return this.selectedClock===t.clock?(o="10px",s="var(--okdb-accent)",r="1"):i?(o="8px",s="var(--okdb-accent)",r=".75"):n&&(o="10px",s="var(--okdb-app-fg)",r=".9"),["position:absolute",`left:calc(6px + ${e} * (100% - 12px))`,"top:50%","transform:translate(-50%,-50%)",`width:${o}`,`height:${o}`,"border-radius:50%",`background:${s}`,`opacity:${r}`,"transition:width 100ms ease,height 100ms ease,background 100ms ease,opacity 100ms ease","cursor:"+(this.isDragging?"grabbing":"pointer"),"z-index:3"].join(";")},dragRingStyle(){return this.isDragging&&null!==this.dragClock?["position:absolute",`left:calc(6px + ${this.dotFraction(this.dragClock)} * (100% - 12px))`,"top:50%","transform:translate(-50%,-50%)","width:16px","height:16px","border-radius:50%","border:2px solid var(--okdb-accent)","background:color-mix(in srgb, var(--okdb-accent) 10%, transparent)","pointer-events:none","z-index:4","transition:left 70ms cubic-bezier(0.25,0.1,0.25,1)"].join(";"):"display:none"},tooltipStyle(t){return["position:absolute",`left:clamp(40px, calc(6px + ${this.dotFraction(t.clock)} * (100% - 12px)), calc(100% - 40px))`,"bottom:calc(100% + 8px)","transform:translateX(-50%)","background:var(--okdb-app-bg-deep)","border:1px solid var(--okdb-app-border)","border-radius:6px","padding:6px 10px","font-size:11px","white-space:nowrap","pointer-events:none","z-index:10","color:var(--okdb-app-fg)","box-shadow:0 2px 10px color-mix(in srgb, #000 25%, transparent)"].join(";")}}),async init(t){t.$watch(()=>`${t.$attr.type}|${t.$attr.itemKey}|${t.$attr.env}`,()=>{this.diffs=[],this.load()}),await this.load()},template:'\n<if :="diffs.length > 0">\n<div>\n\n \x3c!-- Header: label + "back to live" button --\x3e\n <div style="display:flex; align-items:center; justify-content:space-between; margin-bottom:7px;">\n <span style="font-size:10px; font-family:monospace; letter-spacing:.05em; text-transform:uppercase; opacity:.38; user-select:none;">\n time travel · {{ diffs.length }} snapshot{{ diffs.length === 1 ? \'\' : \'s\' }}\n </span>\n <if :="selectedClock !== null">\n <button\n @click="selectCurrent()"\n style="font-size:10px; padding:1px 8px; border-radius:4px; border:1px solid color-mix(in srgb, var(--okdb-accent) 35%, transparent); background:color-mix(in srgb, var(--okdb-accent) 8%, transparent); color:var(--okdb-accent); cursor:pointer; font-family:monospace; line-height:1.6;"\n >← live</button>\n </if>\n </div>\n\n \x3c!-- Scrubber: capped width so it never fills a wide table --\x3e\n <div style="max-width:480px; padding-bottom:10px;">\n <div\n data-track\n style="position:relative; height:26px; width:100%; user-select:none;"\n :style="\'cursor:\' + (isDragging ? \'grabbing\' : \'ew-resize\')"\n @mousedown="startDrag($event)"\n >\n\n \x3c!-- Track line --\x3e\n <div style="position:absolute; left:6px; right:6px; top:50%; height:2px; transform:translateY(-50%); background:var(--okdb-app-border); border-radius:1px; pointer-events:none;"></div>\n\n \x3c!-- Diff dots + tooltips --\x3e\n <div as="repeat" :of="diffs" let:item="diff">\n\n \x3c!-- Tooltip (above track, shown on hover or drag-snap) --\x3e\n <if :="activeTooltipClock === diff.clock">\n <div :style="tooltipStyle(diff)">\n <div style="display:flex; align-items:center; gap:5px; margin-bottom:3px;">\n <ok-icon name="clock" style="width:10px;height:10px;opacity:.5;flex-shrink:0;"></ok-icon>\n <span style="font-family:monospace; color:var(--okdb-accent); font-size:10px;">clock {{ diff.clock }}</span>\n </div>\n <if :="wallTime(diff)">\n <div style="opacity:.7; font-size:11px;">{{ wallTime(diff) }}</div>\n </if>\n <div style="opacity:.4; margin-top:3px; font-size:10px;">\n {{ fieldsChanged(diff) }} field{{ fieldsChanged(diff) === 1 ? \'\' : \'s\' }} changed\n </div>\n </div>\n </if>\n\n \x3c!-- Dot --\x3e\n <div\n :style="dotStyle(diff)"\n @mouseenter="!isDragging && (hoverClock = diff.clock)"\n @mouseleave="!isDragging && (hoverClock = null)"\n @click="!isDragging && selectDot(diff.clock)"\n ></div>\n\n </div>\n\n \x3c!-- Snapping ring: jumps to nearest clock with CSS transition --\x3e\n <div :style="dragRingStyle()" style="pointer-events:none;"></div>\n\n </div>\n </div>\n\n</div>\n</if>\n',style:""};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x230940=_0x4736;(function(_0x23902d,_0x8f2aa4){const _0x2d6949=_0x4736,_0x16e27e=_0x23902d();while(!![]){try{const _0x4f27f2=-parseInt(_0x2d6949(0x1c2))/0x1*(-parseInt(_0x2d6949(0x1bc))/0x2)+parseInt(_0x2d6949(0x1d4))/0x3*(-parseInt(_0x2d6949(0x1bf))/0x4)+parseInt(_0x2d6949(0x1b8))/0x5+parseInt(_0x2d6949(0x1b7))/0x6*(-parseInt(_0x2d6949(0x1aa))/0x7)+parseInt(_0x2d6949(0x1c4))/0x8*(-parseInt(_0x2d6949(0x1c9))/0x9)+parseInt(_0x2d6949(0x1a5))/0xa+parseInt(_0x2d6949(0x1df))/0xb*(parseInt(_0x2d6949(0x1ae))/0xc);if(_0x4f27f2===_0x8f2aa4)break;else _0x16e27e['push'](_0x16e27e['shift']());}catch(_0x2d9c17){_0x16e27e['push'](_0x16e27e['shift']());}}}(_0x200c,0x420c4));function _0x200c(){const _0x570693=['118461JWuaAY','$ok','.ch-th{text-align:left;font-weight:500;font-size:10px;text-transform:uppercase;letter-spacing:.04em;opacity:.5}.ch-td,.ch-th{padding:5px\x208px;border-bottom:1px\x20solid\x20var(--okdb-app-border)}.ch-row:hover\x20.ch-td{background:#ffffff06}','shortKey','1541676jVZOoV','var(--okdb-accent)','$attr','var(--okdb-purple)','API','limit','/changelog?','dropFts','resetFts','36tgOJWc','916290sjKmqM','/type/','var(--okdb-orange)','default','384718ZIWsgQ','trim','round','1470548jeCjSb','m\x20ago','busy','1zqBmEX','meta','24SmMflf','registerType','timemachine','put','dropType','1007289iYqkdZ','before','Failed','h\x20ago','slice','error','clock','just\x20now','okdb','toLocaleDateString','#6ee7b7','3VNblzR','fts','var(--okdb-warning)','length','\x20$1','registerIndex','s\x20ago','var(--okdb-app-fg-muted)','$watch','type','message','33hlvQTH','now','\x0a<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:10px;\x20height:100%;\x20min-height:0;\x22>\x0a\x0a\x20\x20<!--\x20Toolbar\x20-->\x0a\x20\x20<div\x20style=\x22display:flex;\x20align-items:center;\x20gap:8px;\x22>\x0a\x20\x20\x20\x20<div\x20style=\x22font-size:13px;\x20opacity:.7;\x22>Change\x20log\x20for\x20<b>{{type}}</b></div>\x0a\x20\x20\x20\x20<div\x20style=\x22margin-left:auto;\x20display:flex;\x20gap:6px;\x20align-items:center;\x22>\x0a\x20\x20\x20\x20\x20\x20<if\x20:=\x22before\x20!=\x20null\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<button\x20@click=\x22loadLatest()\x22\x20style=\x22font-size:12px;\x20opacity:.8;\x22>↑\x20Latest</button>\x0a\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20<button\x20@click=\x22load(before)\x22\x20:disabled=\x22busy\x22\x20style=\x22font-size:12px;\x20opacity:.8;\x22>↻</button>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</div>\x0a\x0a\x20\x20<if\x20:=\x22error\x22>\x0a\x20\x20\x20\x20<div\x20style=\x22color:var(--okdb-danger);\x20font-size:12px;\x22>{{error}}</div>\x0a\x20\x20</if>\x0a\x0a\x20\x20<if\x20:=\x22!busy\x20&&\x20changes.length\x20===\x200\x20&&\x20!error\x22>\x0a\x20\x20\x20\x20<div\x20style=\x22opacity:.5;\x20font-size:13px;\x22>No\x20changes\x20recorded\x20yet.</div>\x0a\x20\x20</if>\x0a\x0a\x20\x20<!--\x20Table\x20-->\x0a\x20\x20<div\x20style=\x22flex:1;\x20min-height:0;\x20overflow:auto;\x22>\x0a\x20\x20\x20\x20<table\x20style=\x22width:100%;\x20border-collapse:collapse;\x20font-size:12px;\x22>\x0a\x20\x20\x20\x20\x20\x20<thead\x20style=\x22position:sticky;\x20top:0;\x20z-index:1;\x20background:var(--okdb-app-bg-deep);\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<th\x20class=\x22ch-th\x22\x20style=\x22text-align:right;\x20width:70px;\x22>Clock</th>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<th\x20class=\x22ch-th\x22\x20style=\x22width:110px;\x22>Action</th>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<th\x20class=\x22ch-th\x22>Key</th>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<th\x20class=\x22ch-th\x22\x20style=\x22width:90px;\x22>Origin</th>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<th\x20class=\x22ch-th\x22\x20style=\x22width:90px;\x20text-align:right;\x22>When</th>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20\x20\x20</thead>\x0a\x20\x20\x20\x20\x20\x20<tbody>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<tr\x20as=\x22repeat\x22\x20:of=\x22changes\x22\x20let:item=\x22ch\x22\x20class=\x22ch-row\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<td\x20class=\x22ch-td\x22\x20style=\x22text-align:right;\x20font-family:monospace;\x20opacity:.6;\x22>{{ch.clock}}</td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<td\x20class=\x22ch-td\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22\x27font-size:10px;\x20padding:2px\x206px;\x20border-radius:4px;\x20border:1px\x20solid;\x20color:\x27\x20+\x20actionColor(ch.action)\x20+\x20\x27;\x20border-color:\x27\x20+\x20actionColor(ch.action)\x20+\x20\x2744;\x27\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{actionLabel(ch.action)}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22ch.tmDiff\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22font-size:9px;\x20padding:1px\x205px;\x20border-radius:3px;\x20border:1px\x20solid\x20var(--okdb-accent)44;\x20color:var(--okdb-accent);\x20opacity:.7;\x20font-family:monospace;\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20title=\x22Time-machine\x20snapshot\x20available\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20>TM</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<td\x20class=\x22ch-td\x22\x20style=\x22font-family:monospace;\x20max-width:220px;\x20overflow:hidden;\x20text-overflow:ellipsis;\x20white-space:nowrap;\x22\x20:title=\x22ch.key\x20||\x20ch.index\x20||\x20ch.fts\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{displayKey(ch)}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<td\x20class=\x22ch-td\x22\x20style=\x22font-family:monospace;\x20font-size:11px;\x20opacity:.6;\x20overflow:hidden;\x20text-overflow:ellipsis;\x20white-space:nowrap;\x22\x20:title=\x22ch.origin\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{ch.origin\x20?\x20ch.origin.slice(0,8)\x20:\x20\x27—\x27}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<td\x20class=\x22ch-td\x22\x20style=\x22text-align:right;\x20opacity:.6;\x20white-space:nowrap;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{relTime(ch.timestamp)}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20\x20\x20</tbody>\x0a\x20\x20\x20\x20</table>\x0a\x20\x20</div>\x0a\x0a\x20\x20<!--\x20Pagination\x20-->\x0a\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20align-items:center;\x20padding-top:4px;\x20border-top:1px\x20solid\x20var(--okdb-app-border);\x22>\x0a\x20\x20\x20\x20<span\x20style=\x22font-size:12px;\x20opacity:.55;\x22>{{changes.length}}\x20entries</span>\x0a\x20\x20\x20\x20<if\x20:=\x22hasOlder\x22>\x0a\x20\x20\x20\x20\x20\x20<button\x20@click=\x22loadOlder()\x22\x20:disabled=\x22busy\x22\x20style=\x22font-size:12px;\x20margin-left:auto;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20Load\x20older\x20▼\x0a\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20</if>\x0a\x20\x20</div>\x0a\x0a</div>\x0a','oldestClock','load','registerFts','changes','replace','toUpperCase','json','key','3144340FWCWvd','dropIndex','stores','/env/','var(--okdb-danger)'];_0x200c=function(){return _0x570693;};return _0x200c();}function _0x4736(_0x2d301b,_0x1d6f92){_0x2d301b=_0x2d301b-0x1a1;const _0x200c07=_0x200c();let _0x473610=_0x200c07[_0x2d301b];return _0x473610;}export default{'tag':'type-changelog','attr':{'type':{}},'context':_0x8b667c=>({'busy':!0x1,'error':null,'changes':[],'clock':null,'limit':0x64,'before':null,get 'type'(){const _0x352d5d=_0x4736;return _0x8b667c[_0x352d5d(0x1b0)][_0x352d5d(0x1dd)];},async 'load'(_0x65e1a8=null){const _0x56ec7a=_0x4736;if(this['type']){this[_0x56ec7a(0x1c1)]=!0x0,this[_0x56ec7a(0x1ce)]=null;try{const _0x2cd215=new URLSearchParams({'limit':this[_0x56ec7a(0x1b3)],'annotate':_0x56ec7a(0x1c6)});null!=_0x65e1a8&&_0x2cd215['set'](_0x56ec7a(0x1ca),_0x65e1a8);const _0x5c2259=_0x8b667c[_0x56ec7a(0x1ab)][_0x56ec7a(0x1a7)][_0x56ec7a(0x1d1)]['selectedEnv']||_0x56ec7a(0x1bb),_0x19ae22=await fetch(__ENV__[_0x56ec7a(0x1b2)]+_0x56ec7a(0x1a8)+encodeURIComponent(_0x5c2259)+_0x56ec7a(0x1b9)+encodeURIComponent(this[_0x56ec7a(0x1dd)])+_0x56ec7a(0x1b4)+_0x2cd215),_0x2b0ddf=await _0x19ae22[_0x56ec7a(0x1a3)]();if(!_0x19ae22['ok'])throw new Error(_0x2b0ddf?.[_0x56ec7a(0x1ce)]?.[_0x56ec7a(0x1de)]||_0x56ec7a(0x1cb));this['changes']=_0x2b0ddf['data']??[],this['clock']=_0x2b0ddf[_0x56ec7a(0x1c3)]??null,this[_0x56ec7a(0x1ca)]=_0x65e1a8;}catch(_0x5d2709){this[_0x56ec7a(0x1ce)]=_0x5d2709?.['message']||String(_0x5d2709),this['changes']=[];}finally{this[_0x56ec7a(0x1c1)]=!0x1;}}},get 'hasOlder'(){const _0x1b6055=_0x4736;return this['changes'][_0x1b6055(0x1d7)]===this[_0x1b6055(0x1b3)];},get 'oldestClock'(){const _0x5d5051=_0x4736;return this['changes'][_0x5d5051(0x1d7)]?this[_0x5d5051(0x1e5)][this[_0x5d5051(0x1e5)][_0x5d5051(0x1d7)]-0x1][_0x5d5051(0x1cf)]:null;},'loadOlder'(){const _0x11df58=_0x4736;null!=this[_0x11df58(0x1e2)]&&this['load'](this[_0x11df58(0x1e2)]-0x1);},'loadLatest'(){const _0x28b0f6=_0x4736;this[_0x28b0f6(0x1e3)](null);},'actionColor'(_0x2888e6){const _0x51ea78=_0x4736;switch(_0x2888e6){case _0x51ea78(0x1c7):case _0x51ea78(0x1e4):return'var(--okdb-success)';case'remove':case _0x51ea78(0x1c8):return _0x51ea78(0x1a9);case _0x51ea78(0x1c5):return _0x51ea78(0x1af);case _0x51ea78(0x1d9):return _0x51ea78(0x1b1);case _0x51ea78(0x1a6):return _0x51ea78(0x1d6);case'resetIndex':return'var(--okdb-indigo)';case _0x51ea78(0x1b5):return _0x51ea78(0x1ba);case _0x51ea78(0x1b6):return _0x51ea78(0x1d3);default:return _0x51ea78(0x1db);}},'actionLabel':_0x3b689c=>_0x3b689c?_0x3b689c['replace'](/([A-Z])/g,_0x230940(0x1d8))[_0x230940(0x1a1)](/_/g,'\x20')[_0x230940(0x1a2)]()[_0x230940(0x1bd)]():'','displayKey'(_0x40139f){const _0x19d914=_0x230940,_0x1a7c1c=_0x40139f[_0x19d914(0x1a4)]||_0x40139f['index']||_0x40139f[_0x19d914(0x1d5)]||null;return this[_0x19d914(0x1ad)](_0x1a7c1c);},'shortKey':_0x149428=>_0x149428?_0x149428['length']<=0x18?_0x149428:_0x149428[_0x230940(0x1cd)](0x0,0xa)+'…'+_0x149428[_0x230940(0x1cd)](-0x6):'—','relTime'(_0x6b215b){const _0x530906=_0x230940;if(!_0x6b215b)return'—';const _0x4010bf=Date[_0x530906(0x1e0)]()-_0x6b215b;return _0x4010bf<0x1388?_0x530906(0x1d0):_0x4010bf<0xea60?Math['round'](_0x4010bf/0x3e8)+_0x530906(0x1da):_0x4010bf<0x36ee80?Math[_0x530906(0x1be)](_0x4010bf/0xea60)+_0x530906(0x1c0):_0x4010bf<0x5265c00?Math['round'](_0x4010bf/0x36ee80)+_0x530906(0x1cc):new Date(_0x6b215b)[_0x530906(0x1d2)]();}}),async 'init'(_0xa743f1){const _0x319dfa=_0x230940;_0xa743f1[_0x319dfa(0x1dc)](()=>_0xa743f1[_0x319dfa(0x1b0)]['type'],()=>{const _0x4762f6=_0x319dfa;this[_0x4762f6(0x1e5)]=[],this['load']();}),await this['load']();},'template':_0x230940(0x1e1),'style':_0x230940(0x1ac)};
|
|
1
|
+
export default{tag:"type-changelog",attr:{type:{}},context:t=>({busy:!1,error:null,changes:[],clock:null,limit:100,before:null,get type(){return t.$attr.type},async load(e=null){if(this.type){this.busy=!0,this.error=null;try{const n=new URLSearchParams({limit:this.limit,annotate:"timemachine"});null!=e&&n.set("before",e);const a=t.$ok.stores.okdb.selectedEnv||"default",o=await fetch(`${__ENV__.API}/env/${encodeURIComponent(a)}/type/${encodeURIComponent(this.type)}/changelog?${n}`),i=await o.json();if(!o.ok)throw new Error(i?.error?.message||"Failed");this.changes=i.data??[],this.clock=i.meta??null,this.before=e}catch(t){this.error=t?.message||String(t),this.changes=[]}finally{this.busy=!1}}},get hasOlder(){return this.changes.length===this.limit},get oldestClock(){return this.changes.length?this.changes[this.changes.length-1].clock:null},loadOlder(){null!=this.oldestClock&&this.load(this.oldestClock-1)},loadLatest(){this.load(null)},actionColor(t){switch(t){case"put":case"registerFts":return"var(--okdb-success)";case"remove":case"dropType":return"var(--okdb-danger)";case"registerType":return"var(--okdb-accent)";case"registerIndex":return"var(--okdb-purple)";case"dropIndex":return"var(--okdb-warning)";case"resetIndex":return"var(--okdb-indigo)";case"dropFts":return"var(--okdb-orange)";case"resetFts":return"#6ee7b7";default:return"var(--okdb-app-fg-muted)"}},actionLabel:t=>t?t.replace(/([A-Z])/g," $1").replace(/_/g," ").toUpperCase().trim():"",displayKey(t){const e=t.key||t.index||t.fts||null;return this.shortKey(e)},shortKey:t=>t?t.length<=24?t:t.slice(0,10)+"…"+t.slice(-6):"—",relTime(t){if(!t)return"—";const e=Date.now()-t;return e<5e3?"just now":e<6e4?`${Math.round(e/1e3)}s ago`:e<36e5?`${Math.round(e/6e4)}m ago`:e<864e5?`${Math.round(e/36e5)}h ago`:new Date(t).toLocaleDateString()}}),async init(t){t.$watch(()=>t.$attr.type,()=>{this.changes=[],this.load()}),await this.load()},template:'\n<div style="display:flex; flex-direction:column; gap:10px; height:100%; min-height:0;">\n\n \x3c!-- Toolbar --\x3e\n <div style="display:flex; align-items:center; gap:8px;">\n <div style="font-size:13px; opacity:.7;">Change log for <b>{{type}}</b></div>\n <div style="margin-left:auto; display:flex; gap:6px; align-items:center;">\n <if :="before != null">\n <button @click="loadLatest()" style="font-size:12px; opacity:.8;">↑ Latest</button>\n </if>\n <button @click="load(before)" :disabled="busy" style="font-size:12px; opacity:.8;">↻</button>\n </div>\n </div>\n\n <if :="error">\n <div style="color:var(--okdb-danger); font-size:12px;">{{error}}</div>\n </if>\n\n <if :="!busy && changes.length === 0 && !error">\n <div style="opacity:.5; font-size:13px;">No changes recorded yet.</div>\n </if>\n\n \x3c!-- Table --\x3e\n <div style="flex:1; min-height:0; overflow:auto;">\n <table style="width:100%; border-collapse:collapse; font-size:12px;">\n <thead style="position:sticky; top:0; z-index:1; background:var(--okdb-app-bg-deep);">\n <tr>\n <th class="ch-th" style="text-align:right; width:70px;">Clock</th>\n <th class="ch-th" style="width:110px;">Action</th>\n <th class="ch-th">Key</th>\n <th class="ch-th" style="width:90px;">Origin</th>\n <th class="ch-th" style="width:90px; text-align:right;">When</th>\n </tr>\n </thead>\n <tbody>\n <tr as="repeat" :of="changes" let:item="ch" class="ch-row">\n <td class="ch-td" style="text-align:right; font-family:monospace; opacity:.6;">{{ch.clock}}</td>\n <td class="ch-td">\n <span :style="\'font-size:10px; padding:2px 6px; border-radius:4px; border:1px solid; color:\' + actionColor(ch.action) + \'; border-color:\' + actionColor(ch.action) + \'44;\'">\n {{actionLabel(ch.action)}}\n </span>\n <if :="ch.tmDiff">\n <span\n style="font-size:9px; padding:1px 5px; border-radius:3px; border:1px solid var(--okdb-accent)44; color:var(--okdb-accent); opacity:.7; font-family:monospace;"\n title="Time-machine snapshot available"\n >TM</span>\n </if>\n </td>\n <td class="ch-td" style="font-family:monospace; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;" :title="ch.key || ch.index || ch.fts">\n {{displayKey(ch)}}\n </td>\n <td class="ch-td" style="font-family:monospace; font-size:11px; opacity:.6; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;" :title="ch.origin">\n {{ch.origin ? ch.origin.slice(0,8) : \'—\'}}\n </td>\n <td class="ch-td" style="text-align:right; opacity:.6; white-space:nowrap;">\n {{relTime(ch.timestamp)}}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n \x3c!-- Pagination --\x3e\n <div style="display:flex; gap:8px; align-items:center; padding-top:4px; border-top:1px solid var(--okdb-app-border);">\n <span style="font-size:12px; opacity:.55;">{{changes.length}} entries</span>\n <if :="hasOlder">\n <button @click="loadOlder()" :disabled="busy" style="font-size:12px; margin-left:auto;">\n Load older ▼\n </button>\n </if>\n </div>\n\n</div>\n',style:".ch-th{text-align:left;font-weight:500;font-size:10px;text-transform:uppercase;letter-spacing:.04em;opacity:.5}.ch-td,.ch-th{padding:5px 8px;border-bottom:1px solid var(--okdb-app-border)}.ch-row:hover .ch-td{background:#ffffff06}"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2940(_0x193f3f,_0x5a9c2f){_0x193f3f=_0x193f3f-0x18b;const _0x26f554=_0x26f5();let _0x29408b=_0x26f554[_0x193f3f];return _0x29408b;}const _0x286863=_0x2940;function _0x26f5(){const _0xb43ae9=['136pEFgRA','toast','$dispatch','showSystem','84747CbOphK','56700hxxfJl','items','loadError','types','load','filter','type:registered','reloadTypes','registerType\x20error','trim','$watch','selectedEnv','message','loaded','\x0a\x20\x20\x20\x20\x20\x20\x20\x20type-list\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20flex-direction:\x20column;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20gap:\x202px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20type-list\x20button\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-align:\x20left;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.type-list__add\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2012px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x207px\x2010px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-bottom:\x204px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.type-list__item\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20gap:\x206px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x206px\x2010px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2012px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20transparent;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-color:\x20transparent;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20var(--okdb-app-fg-muted);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x207px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.type-list__item:hover\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20var(--okdb-app-surface-2);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-color:\x20var(--okdb-app-border);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20var(--okdb-app-fg);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.type-list__item\x20.tl-name\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20flex:\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-family:\x20monospace;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2012px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-overflow:\x20ellipsis;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20white-space:\x20nowrap;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.type-list__item\x20.tl-count\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2011px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20opacity:\x20.5;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20flex-shrink:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.type-list__item--selected\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20var(--okdb-app-bg-deep)\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-color:\x20color-mix(in\x20srgb,\x20var(--okdb-accent)\x2027%,\x20transparent)\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20var(--okdb-accent)\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.type-list__item--selected\x20.tl-count\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20opacity:\x20.7;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.type-list__system-toggle\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-top:\x204px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2011px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20opacity:\x200.45;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-color:\x20transparent;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20transparent;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20inherit;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x203px\x206px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.type-list__system-toggle:hover\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20opacity:\x200.8;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20transparent;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-color:\x20transparent;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.type-list__error\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20flex-start;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20gap:\x206px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x208px\x2010px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2011px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20var(--okdb-danger);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20rgba(255,60,60,.06);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border:\x201px\x20solid\x20rgba(255,60,60,.18);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x206px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20line-height:\x201.4;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20word-break:\x20break-word;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.type-list__error\x20span\x20{\x20flex:\x201;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.type-list__error-retry\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20flex-shrink:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20transparent;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20var(--okdb-danger);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2014px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200\x202px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20opacity:\x20.7;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.type-list__error-retry:hover\x20{\x20opacity:\x201;\x20}\x0a\x20\x20\x20\x20','error','allItems','shared','3111484YaGBsf','$ok','Type\x20name','busy','modal','index:drop','2213834CpZGMZ','find','prompt','300744FEVbCc','Register','_unsubs','Name\x20is\x20required','reloadInfo','156260FOBlAh','registerType','Failed\x20to\x20load\x20types','Register\x20Type','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22busy\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<ok-overlay>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22loader-center\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<ok-icon\x20name=\x22loader\x22\x20class=\x22spin\x22\x20style=\x22width:32px;height:32px;\x22></ok-icon>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</ok-overlay>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22loadError\x20&&\x20!busy\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22type-list__error\x22\x20:title=\x22loadError\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<ok-icon\x20name=\x22alert-circle\x22\x20style=\x22width:13px;height:13px;flex-shrink:0;opacity:.7;\x22></ok-icon>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>{{\x20loadError\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22type-list__error-retry\x22\x20@click=\x22load()\x22\x20title=\x22Retry\x22>↺</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22!loadError\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<!--\x20Overview\x20shortcut\x20-->\x0a\x20\x20\x20\x20\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20class=\x22type-list__item\x20type-list__overview\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:class=\x22selected\x20==\x20null\x20?\x20\x27type-list__item--selected\x27\x20:\x20\x27\x27\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22select(null)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22margin-bottom:4px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<ok-icon\x20name=\x22home\x22\x20style=\x22width:13px;height:13px;opacity:.6;flex-shrink:0;\x22></ok-icon>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22tl-name\x22>Overview</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22height:1px;\x20background:var(--okdb-app-surface-2);\x20margin:2px\x200\x206px;\x22></div>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22type-list__add\x22\x20@click=\x22openAddModal\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20+\x20Register\x20Type\x20({{\x20items.length\x20}})\x0a\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<each\x20:of=\x22items\x22\x20let:item=\x22t\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:class=\x22[\x27type-list__item\x27,\x20selected\x20===\x20t\x20?\x20\x27type-list__item--selected\x27\x20:\x20\x27\x27]\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22select(t)\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22tl-name\x22>{{\x20t.type\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22tl-count\x22>{{\x20t.count\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</each>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<if\x20:=\x22systemCount\x20>\x200\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20class=\x22type-list__system-toggle\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22showSystem\x20=\x20!showSystem\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:title=\x22showSystem\x20?\x20\x27Hide\x20system\x20types\x27\x20:\x20\x27Show\x20system\x20types\x27\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{\x20showSystem\x20?\x20\x27▴\x20hide\x20system\x20(\x27\x20+\x20systemCount\x20+\x20\x27)\x27\x20:\x20\x27⚙\x20system\x20(\x27\x20+\x20systemCount\x20+\x20\x27)\x27\x20}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20','type-list','okdb','1950070sjSLMp','select','startsWith','stores','selected','16AjXQYJ','type'];_0x26f5=function(){return _0xb43ae9;};return _0x26f5();}(function(_0x4820b0,_0x77a3fd){const _0xfcbef2=_0x2940,_0x3c8824=_0x4820b0();while(!![]){try{const _0x25982e=-parseInt(_0xfcbef2(0x19a))/0x1+parseInt(_0xfcbef2(0x1a6))/0x2*(parseInt(_0xfcbef2(0x1ac))/0x3)+-parseInt(_0xfcbef2(0x18c))/0x4+parseInt(_0xfcbef2(0x1a1))/0x5+-parseInt(_0xfcbef2(0x1ad))/0x6+parseInt(_0xfcbef2(0x192))/0x7+-parseInt(_0xfcbef2(0x1a8))/0x8*(-parseInt(_0xfcbef2(0x195))/0x9);if(_0x25982e===_0x77a3fd)break;else _0x3c8824['push'](_0x3c8824['shift']());}catch(_0x40a7c5){_0x3c8824['push'](_0x3c8824['shift']());}}}(_0x26f5,0x87ed7));import _0x9b7c98 from'@toolkit/elements/ok-icon.ok.js';import _0x9ef7a6 from'@toolkit/core/ok-overlay.ok.js';import _0x47da52 from'../../../stores/events-store.js';export default{'tag':_0x286863(0x19f),'dependencies':[_0x9ef7a6,_0x9b7c98],'context':_0x3bb405=>({'busy':!0x1,'loadError':null,'showSystem':!0x1,'_unsubs':[],get 'allItems'(){const _0xfc5274=_0x286863;return _0x3bb405[_0xfc5274(0x18d)][_0xfc5274(0x1a4)][_0xfc5274(0x1a0)][_0xfc5274(0x1b0)]||[];},get 'items'(){const _0x552e66=_0x286863;return this[_0x552e66(0x1ab)]?this[_0x552e66(0x1bd)]:this[_0x552e66(0x1bd)]['filter'](_0x2081a8=>!_0x2081a8[_0x552e66(0x1a7)][_0x552e66(0x1a3)]('~'));},get 'systemCount'(){const _0x21d922=_0x286863;return this[_0x21d922(0x1bd)][_0x21d922(0x1b2)](_0x2a621b=>_0x2a621b[_0x21d922(0x1a7)][_0x21d922(0x1a3)]('~'))['length'];},'selected':null,async 'load'(){const _0x579d5e=_0x286863;this[_0x579d5e(0x1af)]=null;try{this[_0x579d5e(0x18f)]=!0x0,await _0x3bb405['$ok'][_0x579d5e(0x1a4)][_0x579d5e(0x1a0)][_0x579d5e(0x1b4)](),await _0x3bb405[_0x579d5e(0x18d)][_0x579d5e(0x1a4)][_0x579d5e(0x1a0)][_0x579d5e(0x199)]();}catch(_0x586042){this[_0x579d5e(0x1af)]=_0x586042?.[_0x579d5e(0x1b9)]||_0x579d5e(0x19c),console['error']('Error\x20fetching\x20types',_0x586042);}this['busy']=!0x1,_0x3bb405[_0x579d5e(0x1aa)](_0x579d5e(0x1ba),this[_0x579d5e(0x1ae)]);},'select'(_0x3fdfe3){const _0x280845=_0x286863;this[_0x280845(0x1a5)]=_0x3fdfe3??null,_0x3bb405['$dispatch'](_0x280845(0x1a5),_0x3fdfe3??null);},async 'openAddModal'(){const _0x2c5b80=_0x286863,_0x2d3875=await _0x3bb405[_0x2c5b80(0x18d)][_0x2c5b80(0x18b)][_0x2c5b80(0x190)][_0x2c5b80(0x194)](_0x2c5b80(0x18e),{'title':_0x2c5b80(0x19d),'placeholder':'e.g.\x20user,\x20product,\x20event','confirmText':_0x2c5b80(0x196),'validate':_0x461fa3=>!(!_0x461fa3||!_0x461fa3[_0x2c5b80(0x1b6)]())||_0x2c5b80(0x198)});if(_0x2d3875)try{await _0x3bb405['$ok'][_0x2c5b80(0x1a4)][_0x2c5b80(0x1a0)][_0x2c5b80(0x19b)](_0x2d3875['trim']());const _0x4d7c9d=this['items'][_0x2c5b80(0x193)](_0x102013=>_0x102013['type']===_0x2d3875['trim']());_0x4d7c9d&&this[_0x2c5b80(0x1a2)](_0x4d7c9d);}catch(_0x339a68){_0x3bb405[_0x2c5b80(0x18d)][_0x2c5b80(0x18b)]?.[_0x2c5b80(0x1a9)]?.[_0x2c5b80(0x1bc)]?.(_0x339a68?.['message']||'Failed\x20to\x20register\x20type'),console[_0x2c5b80(0x1bc)](_0x2c5b80(0x1b5),_0x339a68);}}}),'mount'(_0x394cf6){const _0x5bc74a=_0x286863,_0xd4e280=()=>this[_0x5bc74a(0x1b1)]();this[_0x5bc74a(0x197)]=[_0x47da52['on'](_0x5bc74a(0x1b3),_0xd4e280),_0x47da52['on']('type:drop',_0xd4e280),_0x47da52['on']('index:registered',_0xd4e280),_0x47da52['on'](_0x5bc74a(0x191),_0xd4e280)],_0x394cf6[_0x5bc74a(0x1b7)](()=>_0x394cf6[_0x5bc74a(0x18d)]['stores']['okdb'][_0x5bc74a(0x1b8)],()=>this['load']()),this[_0x5bc74a(0x1b1)]();},'unmount'(){const _0x3360b8=_0x286863;for(const _0x42499b of this[_0x3360b8(0x197)])_0x42499b();this[_0x3360b8(0x197)]=[];},'style':_0x286863(0x1bb),'template':_0x286863(0x19e)};
|
|
1
|
+
import t from"@toolkit/elements/ok-icon.ok.js";import e from"@toolkit/core/ok-overlay.ok.js";import n from"../../../stores/events-store.js";export default{tag:"type-list",dependencies:[e,t],context:t=>({busy:!1,loadError:null,showSystem:!1,_unsubs:[],get allItems(){return t.$ok.stores.okdb.types||[]},get items(){return this.showSystem?this.allItems:this.allItems.filter(t=>!t.type.startsWith("~"))},get systemCount(){return this.allItems.filter(t=>t.type.startsWith("~")).length},selected:null,async load(){this.loadError=null;try{this.busy=!0,await t.$ok.stores.okdb.reloadTypes(),await t.$ok.stores.okdb.reloadInfo()}catch(t){this.loadError=t?.message||"Failed to load types",console.error("Error fetching types",t)}this.busy=!1,t.$dispatch("loaded",this.items)},select(e){this.selected=e??null,t.$dispatch("selected",e??null)},async openAddModal(){const e=await t.$ok.shared.modal.prompt("Type name",{title:"Register Type",placeholder:"e.g. user, product, event",confirmText:"Register",validate:t=>!(!t||!t.trim())||"Name is required"});if(e)try{await t.$ok.stores.okdb.registerType(e.trim());const n=this.items.find(t=>t.type===e.trim());n&&this.select(n)}catch(e){t.$ok.shared?.toast?.error?.(e?.message||"Failed to register type"),console.error("registerType error",e)}}}),mount(t){const e=()=>this.load();this._unsubs=[n.on("type:registered",e),n.on("type:drop",e),n.on("index:registered",e),n.on("index:drop",e)],t.$watch(()=>t.$ok.stores.okdb.selectedEnv,()=>this.load()),this.load()},unmount(){for(const t of this._unsubs)t();this._unsubs=[]},style:"\n type-list {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 2px;\n }\n type-list button {\n text-align: left;\n }\n .type-list__add {\n font-size: 12px;\n padding: 7px 10px;\n margin-bottom: 4px;\n }\n .type-list__item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 10px;\n font-size: 12px;\n background: transparent;\n border-color: transparent;\n color: var(--okdb-app-fg-muted);\n border-radius: 7px;\n }\n .type-list__item:hover {\n background: var(--okdb-app-surface-2);\n border-color: var(--okdb-app-border);\n color: var(--okdb-app-fg);\n }\n .type-list__item .tl-name {\n flex: 1;\n font-family: monospace;\n font-size: 12px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .type-list__item .tl-count {\n font-size: 11px;\n opacity: .5;\n flex-shrink: 0;\n }\n .type-list__item--selected {\n background: var(--okdb-app-bg-deep) !important;\n border-color: color-mix(in srgb, var(--okdb-accent) 27%, transparent) !important;\n color: var(--okdb-accent) !important;\n }\n .type-list__item--selected .tl-count {\n opacity: .7;\n }\n .type-list__system-toggle {\n margin-top: 4px;\n font-size: 11px;\n opacity: 0.45;\n border-color: transparent;\n background: transparent;\n color: inherit;\n padding: 3px 6px;\n }\n .type-list__system-toggle:hover {\n opacity: 0.8;\n background: transparent;\n border-color: transparent;\n }\n .type-list__error {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n padding: 8px 10px;\n font-size: 11px;\n color: var(--okdb-danger);\n background: rgba(255,60,60,.06);\n border: 1px solid rgba(255,60,60,.18);\n border-radius: 6px;\n line-height: 1.4;\n word-break: break-word;\n }\n .type-list__error span { flex: 1; }\n .type-list__error-retry {\n flex-shrink: 0;\n background: transparent;\n border: none;\n color: var(--okdb-danger);\n cursor: pointer;\n font-size: 14px;\n padding: 0 2px;\n opacity: .7;\n }\n .type-list__error-retry:hover { opacity: 1; }\n ",template:'\n <if :="busy">\n <ok-overlay>\n <div class="loader-center">\n <ok-icon name="loader" class="spin" style="width:32px;height:32px;"></ok-icon>\n </div>\n </ok-overlay>\n </if>\n\n <if :="loadError && !busy">\n <div class="type-list__error" :title="loadError">\n <ok-icon name="alert-circle" style="width:13px;height:13px;flex-shrink:0;opacity:.7;"></ok-icon>\n <span>{{ loadError }}</span>\n <button class="type-list__error-retry" @click="load()" title="Retry">↺</button>\n </div>\n </if>\n\n <if :="!loadError">\n \x3c!-- Overview shortcut --\x3e\n <button\n class="type-list__item type-list__overview"\n :class="selected == null ? \'type-list__item--selected\' : \'\'"\n @click="select(null)"\n style="margin-bottom:4px;">\n <ok-icon name="home" style="width:13px;height:13px;opacity:.6;flex-shrink:0;"></ok-icon>\n <span class="tl-name">Overview</span>\n </button>\n\n <div style="height:1px; background:var(--okdb-app-surface-2); margin:2px 0 6px;"></div>\n\n <button class="type-list__add" @click="openAddModal">\n + Register Type ({{ items.length }})\n </button>\n\n <each :of="items" let:item="t">\n <button\n :class="[\'type-list__item\', selected === t ? \'type-list__item--selected\' : \'\']"\n @click="select(t)">\n <span class="tl-name">{{ t.type }}</span>\n <span class="tl-count">{{ t.count }}</span>\n </button>\n </each>\n\n <if :="systemCount > 0">\n <button\n class="type-list__system-toggle"\n @click="showSystem = !showSystem"\n :title="showSystem ? \'Hide system types\' : \'Show system types\'"\n >\n {{ showSystem ? \'▴ hide system (\' + systemCount + \')\' : \'⚙ system (\' + systemCount + \')\' }}\n </button>\n </if>\n </if>\n '};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x310b36=_0x3a75;function _0x5ac5(){const _0x20ec38=['attention','sort','engine:installed','search','12DHmtyp','sourceType','open','value','busy','embeddings:pipeline:ready','fulfilled','message','226242IumXmR','$router','load','running','pipeline:start','envName','$attr','focusedpipeline','add','type','_anchor','then','push','2XBKyOg','\x0a<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:12px;\x20flex:1;\x20min-height:0;\x20overflow:auto;\x20padding-right:4px;\x22>\x0a\x0a\x20\x20<div\x20style=\x22display:flex;\x20align-items:center;\x20gap:10px;\x20flex-wrap:wrap;\x22>\x0a\x20\x20\x20\x20<div\x20style=\x22font-weight:600;\x20font-size:15px;\x22>Engines</div>\x0a\x20\x20\x20\x20<span\x20style=\x22font-size:11px;\x20padding:2px\x208px;\x20border-radius:999px;\x20border:1px\x20solid\x20var(--okdb-app-border);\x20color:#cbd5e1;\x20background:var(--okdb-app-bg-deep);\x22>type:\x20{{\x20sourceType\x20}}</span>\x0a\x20\x20\x20\x20<if\x20:=\x22focusedPipelineName\x22>\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:11px;\x20padding:2px\x208px;\x20border-radius:999px;\x20border:1px\x20solid\x20color-mix(in\x20srgb,\x20var(--okdb-indigo)\x2027%,\x20transparent);\x20color:var(--okdb-indigo);\x20background:color-mix(in\x20srgb,\x20var(--okdb-indigo)\x207%,\x20transparent);\x22>pipeline:\x20{{\x20focusedPipelineName\x20}}</span>\x0a\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20<div\x20style=\x22margin-left:auto;\x20display:flex;\x20gap:6px;\x20flex-wrap:wrap;\x22>\x0a\x20\x20\x20\x20\x20\x20<button\x20@click=\x22load()\x22\x20:disabled=\x22busy\x22\x20style=\x22font-size:11px;\x20padding:3px\x2010px;\x22>↻</button>\x0a\x20\x20\x20\x20\x20\x20<button\x20@click=\x22openGlobalWorkspace()\x22\x20style=\x22font-size:11px;\x20padding:3px\x2010px;\x20border-color:color-mix(in\x20srgb,\x20var(--okdb-accent)\x2027%,\x20transparent);\x20color:var(--okdb-accent);\x22>Open\x20Global\x20→</button>\x0a\x20\x20\x20\x20\x20\x20<button\x20@click=\x22openCreatePipeline()\x22\x20style=\x22background:color-mix(in\x20srgb,\x20var(--okdb-accent)\x2013%,\x20transparent);\x20border-color:var(--okdb-accent);\x20color:var(--okdb-accent);\x20font-weight:600;\x20padding:5px\x2014px;\x20font-size:12px;\x22>+\x20Create\x20Pipeline</button>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</div>\x0a\x0a\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20align-items:end;\x20flex-wrap:wrap;\x20padding:10px\x2012px;\x20border:1px\x20solid\x20var(--okdb-app-border);\x20border-radius:10px;\x20background:var(--okdb-app-bg-deep);\x22>\x0a\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:4px;\x20min-width:170px;\x22>\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:11px;\x20color:var(--okdb-app-fg-muted);\x22>View</span>\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20gap:4px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22setMode(\x27pipelines\x27)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:style=\x22mode\x20===\x20\x27pipelines\x27\x20?\x20\x27flex:1;\x20font-size:11px;\x20padding:5px\x2010px;\x20border-radius:6px;\x20border:1px\x20solid\x20var(--okdb-indigo);\x20color:var(--okdb-indigo);\x20background:color-mix(in\x20srgb,\x20var(--okdb-indigo)\x207%,\x20transparent);\x20cursor:pointer;\x27\x20:\x20\x27flex:1;\x20font-size:11px;\x20padding:5px\x2010px;\x20border-radius:6px;\x20border:1px\x20solid\x20var(--okdb-app-border);\x20color:var(--okdb-app-fg-muted);\x20background:var(--okdb-app-bg-deep);\x20cursor:pointer;\x27\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20>Pipelines</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22setMode(\x27engines\x27)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:style=\x22mode\x20===\x20\x27engines\x27\x20?\x20\x27flex:1;\x20font-size:11px;\x20padding:5px\x2010px;\x20border-radius:6px;\x20border:1px\x20solid\x20var(--okdb-purple);\x20color:var(--okdb-purple);\x20background:color-mix(in\x20srgb,\x20var(--okdb-purple)\x207%,\x20transparent);\x20cursor:pointer;\x27\x20:\x20\x27flex:1;\x20font-size:11px;\x20padding:5px\x2010px;\x20border-radius:6px;\x20border:1px\x20solid\x20var(--okdb-app-border);\x20color:var(--okdb-app-fg-muted);\x20background:var(--okdb-app-bg-deep);\x20cursor:pointer;\x27\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20>Engines</button>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20<label\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:4px;\x20min-width:200px;\x20flex:1;\x22>\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:11px;\x20color:var(--okdb-app-fg-muted);\x22>Search</span>\x0a\x20\x20\x20\x20\x20\x20<input\x0a\x20\x20\x20\x20\x20\x20\x20\x20:value=\x22search\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20@input:debounce.200=\x22setSearchTerm($event.target.value)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20:placeholder=\x22mode\x20===\x20\x27engines\x27\x20?\x20\x27Search\x20engines…\x27\x20:\x20\x27Search\x20pipelines…\x27\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20style=\x22width:100%;\x20box-sizing:border-box;\x22\x0a\x20\x20\x20\x20\x20\x20/>\x0a\x20\x20\x20\x20</label>\x0a\x0a\x20\x20\x20\x20<label\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:4px;\x20min-width:150px;\x22>\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:11px;\x20color:var(--okdb-app-fg-muted);\x22>Status</span>\x0a\x20\x20\x20\x20\x20\x20<select\x20@change=\x22setStatusFilter($event.target.value)\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<option\x20value=\x22all\x22\x20:selected=\x22status\x20===\x20\x27all\x27\x22>Any</option>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<option\x20value=\x22running\x22\x20:selected=\x22status\x20===\x20\x27running\x27\x22>Running</option>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<option\x20value=\x22attention\x22\x20:selected=\x22status\x20===\x20\x27attention\x27\x22>Needs\x20attention</option>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<option\x20value=\x22stopped\x22\x20:selected=\x22status\x20===\x20\x27stopped\x27\x22>Stopped</option>\x0a\x20\x20\x20\x20\x20\x20</select>\x0a\x20\x20\x20\x20</label>\x0a\x0a\x20\x20\x20\x20<if\x20:=\x22mode\x20===\x20\x27engines\x27\x20&&\x20availableEngineTypes.length\x20>\x200\x22>\x0a\x20\x20\x20\x20\x20\x20<label\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:4px;\x20min-width:170px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:11px;\x20color:var(--okdb-app-fg-muted);\x22>Engine\x20Type</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<select\x20@change=\x22setEngineTypeFilter($event.target.value)\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<option\x20value=\x22\x22\x20:selected=\x22!engineType\x22>All\x20engines</option>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<each\x20:of=\x22availableEngineTypes\x22\x20let:item=\x22engineKind\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<option\x20:value=\x22engineKind\x22\x20:selected=\x22engineType\x20===\x20engineKind\x22>{{\x20engineKind\x20}}</option>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</each>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</select>\x0a\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20</if>\x0a\x0a\x20\x20\x20\x20<if\x20:=\x22embedPipelines.length\x20>\x201\x22>\x0a\x20\x20\x20\x20\x20\x20<label\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:4px;\x20min-width:190px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:11px;\x20color:var(--okdb-app-fg-muted);\x22>Pipeline</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<select\x20@change=\x22updateFocusedPipeline($event.target.value)\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<option\x20value=\x22\x22\x20:selected=\x22!focusedPipelineName\x22>All\x20pipelines</option>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<each\x20:of=\x22embedPipelines\x22\x20let:item=\x22pipeline\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<option\x20:value=\x22pipeline.name\x20||\x20pipeline.pipeline\x20||\x20pipeline.storage_key\x22\x20:selected=\x22focusedPipelineName\x20===\x20(pipeline.name\x20||\x20pipeline.pipeline\x20||\x20pipeline.storage_key)\x22>{{\x20pipeline.meta?.label\x20||\x20pipeline.meta?.pipeline\x20||\x20pipeline.pipeline\x20||\x20pipeline.name\x20||\x20pipeline.storage_key\x20}}</option>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</each>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</select>\x0a\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20</if>\x0a\x0a\x20\x20\x20\x20<if\x20:=\x22focusedPipelineName\x22>\x0a\x20\x20\x20\x20\x20\x20<button\x20@click=\x22updateFocusedPipeline(\x27\x27)\x22\x20style=\x22font-size:11px;\x20padding:4px\x2010px;\x22>Clear\x20focus</button>\x0a\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20<if\x20:=\x22search\x20||\x20status\x20!==\x20\x27all\x27\x20||\x20engineType\x22>\x0a\x20\x20\x20\x20\x20\x20<button\x20@click=\x22clearFilters()\x22\x20style=\x22font-size:11px;\x20padding:4px\x2010px;\x22>Clear\x20filters</button>\x0a\x20\x20\x20\x20</if>\x0a\x20\x20</div>\x0a\x0a\x20\x20<if\x20:=\x22error\x22>\x0a\x20\x20\x20\x20<div\x20style=\x22color:var(--okdb-danger);\x20font-size:12px;\x20padding:8px;\x20border:1px\x20solid\x20var(--okdb-danger);\x20border-radius:6px;\x22>{{\x20error\x20}}</div>\x0a\x20\x20</if>\x0a\x0a\x20\x20<if\x20:=\x22!busy\x20&&\x20!hasWorkspaceData\x20&&\x20!error\x22>\x0a\x20\x20\x20\x20<div\x20style=\x22padding:22px\x2020px;\x20background:#111a1f;\x20border:1px\x20solid\x20var(--okdb-app-border);\x20border-radius:10px;\x20display:flex;\x20flex-direction:column;\x20gap:8px;\x20align-items:center;\x20text-align:center;\x22>\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22font-size:30px;\x20opacity:.22;\x22>⊛</div>\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22font-size:14px;\x20font-weight:600;\x20opacity:.75;\x22>No\x20engines\x20for\x20{{\x20sourceType\x20}}</div>\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22font-size:12px;\x20opacity:.5;\x20line-height:1.7;\x20max-width:500px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20This\x20is\x20the\x20same\x20engines\x20workspace,\x20already\x20scoped\x20to\x20this\x20type.\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20<button\x20@click=\x22openCreatePipeline()\x22\x20style=\x22background:color-mix(in\x20srgb,\x20var(--okdb-accent)\x2013%,\x20transparent);\x20border-color:var(--okdb-accent);\x20color:var(--okdb-accent);\x20font-weight:600;\x20padding:6px\x2014px;\x20font-size:12px;\x22>+\x20Create\x20Pipeline</button>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</if>\x0a\x0a\x20\x20<if\x20:=\x22busy\x20&&\x20!hasWorkspaceData\x20&&\x20!error\x22>\x0a\x20\x20\x20\x20<div\x20style=\x22font-size:12px;\x20opacity:.45;\x20padding:8px\x200;\x22>Loading…</div>\x0a\x20\x20</if>\x0a\x0a\x20\x20<if\x20:=\x22hasWorkspaceData\x22>\x0a\x20\x20\x20\x20<engines-overview\x0a\x20\x20\x20\x20\x20\x20embedded=\x22true\x22\x0a\x20\x20\x20\x20\x20\x20filterpipeline=\x22true\x22\x0a\x20\x20\x20\x20\x20\x20:embed-engines=\x22embedEngines\x22\x0a\x20\x20\x20\x20\x20\x20:embed-pipelines=\x22embedPipelines\x22\x0a\x20\x20\x20\x20\x20\x20:file-engines=\x22emptyFileEngines\x22\x0a\x20\x20\x20\x20\x20\x20:mode=\x22mode\x22\x0a\x20\x20\x20\x20\x20\x20pipelinetype=\x22all\x22\x0a\x20\x20\x20\x20\x20\x20:enginetype=\x22engineType\x22\x0a\x20\x20\x20\x20\x20\x20:status=\x22status\x22\x0a\x20\x20\x20\x20\x20\x20:search=\x22search\x22\x0a\x20\x20\x20\x20\x20\x20:sourcetype=\x22sourceType\x22\x0a\x20\x20\x20\x20\x20\x20:selectedpipeline=\x22focusedPipelineName\x22\x0a\x20\x20\x20\x20\x20\x20@select=\x22handleOverviewSelect($event.detail)\x22\x0a\x20\x20\x20\x20\x20\x20@refresh=\x22load()\x22\x0a\x20\x20\x20\x20\x20\x20@goto-type=\x22goToType($event.detail)\x22\x0a\x20\x20\x20\x20/>\x0a\x20\x20</if>\x0a\x0a</div>','updateFocusedPipeline','pipeline','modal','catch','7158800vnHqXj','allSettled','892456oVrkst','/engines','$ok','focusedPipelineName','reason','272041pJYGRK','data','engine:stopped','shared','628668kTATWp','resolve','engineType','json','_search','env','embedEngines','okdb','_unsubs','trim','rejected','pipelines','all','embedPipelines','selectedEnv','stores','mode','9LeAVsY','pipeline:delete','length','$watch','<create-pipeline-modal\x20:modal=\x22modal\x22\x20:type=\x22type\x22\x20:env=\x22envName\x22\x20:on-done=\x22onDone\x22\x20/>','includes','engines','error','16948pCcLAb','replace','/db','name','stopped','Failed\x20to\x20load\x20env\x20pipelines','API','$vars','status','type-pipelines-tab','1402475EdoiDs','default'];_0x5ac5=function(){return _0x20ec38;};return _0x5ac5();}(function(_0x440c6f,_0xec5dc0){const _0x7b879a=_0x3a75,_0xcd7d3a=_0x440c6f();while(!![]){try{const _0x4505f3=parseInt(_0x7b879a(0x108))/0x1*(-parseInt(_0x7b879a(0xfb))/0x2)+parseInt(_0x7b879a(0xf3))/0x3*(-parseInt(_0x7b879a(0xe3))/0x4)+-parseInt(_0x7b879a(0xed))/0x5+-parseInt(_0x7b879a(0xca))/0x6+-parseInt(_0x7b879a(0xc6))/0x7+-parseInt(_0x7b879a(0xc1))/0x8*(-parseInt(_0x7b879a(0xdb))/0x9)+parseInt(_0x7b879a(0xbf))/0xa;if(_0x4505f3===_0xec5dc0)break;else _0xcd7d3a['push'](_0xcd7d3a['shift']());}catch(_0x207578){_0xcd7d3a['push'](_0xcd7d3a['shift']());}}}(_0x5ac5,0x2716f));import _0x1ee30f from'../../embeddings/parts/engines-overview.ok.js';import _0x1323f2 from'../modals/create-pipeline-modal.ok.js';function _0x3a75(_0x1525e4,_0x31e059){_0x1525e4=_0x1525e4-0xbb;const _0x5ac520=_0x5ac5();let _0x3a7581=_0x5ac520[_0x1525e4];return _0x3a7581;}import _0x24de04 from'../../../stores/events-store.js';export default{'tag':_0x310b36(0xec),'dependencies':[_0x1ee30f,_0x1323f2],'attr':{'type':{},'focusedpipeline':{},'currentmode':{}},'context':_0x141453=>({'busy':!0x1,'error':null,'embedEngines':[],'embedPipelines':[],'search':'','status':_0x310b36(0xd6),'engineType':'','emptyFileEngines':{'extractors':[],'collections':[],'workers':[]},'_unsubs':[],get 'sourceType'(){const _0x503965=_0x310b36;return _0x141453[_0x503965(0x101)][_0x503965(0x104)]||'';},get 'envName'(){const _0x37fee7=_0x310b36;return _0x141453[_0x37fee7(0xc3)][_0x37fee7(0xd9)][_0x37fee7(0xd1)][_0x37fee7(0xd8)]||_0x37fee7(0xee);},get 'mode'(){const _0x2c0956=_0x310b36;return'pipelines'===_0x141453[_0x2c0956(0x101)]['currentmode']?_0x2c0956(0xd5):_0x2c0956(0xe1);},get 'focusedPipelineName'(){const _0xc84d4f=_0x310b36;return String(_0x141453[_0xc84d4f(0x101)][_0xc84d4f(0x102)]||'')[_0xc84d4f(0xd3)]();},'normalizeStatus':_0x137728=>[_0x310b36(0xd6),_0x310b36(0xfe),_0x310b36(0xef),_0x310b36(0xe7)][_0x310b36(0xe0)](_0x137728)?_0x137728:_0x310b36(0xd6),get 'availableEngineTypes'(){const _0x1b387c=_0x310b36,_0x54189f=new Set();for(const _0x4b6dd9 of this[_0x1b387c(0xd0)]??[])_0x4b6dd9?.[_0x1b387c(0x104)]&&_0x54189f[_0x1b387c(0x103)](_0x4b6dd9['type']);return[..._0x54189f][_0x1b387c(0xf0)]();},get 'hasWorkspaceData'(){const _0x5b0805=_0x310b36;return(this[_0x5b0805(0xd0)]?.[_0x5b0805(0xdd)]??0x0)>0x0||(this[_0x5b0805(0xd7)]?.[_0x5b0805(0xdd)]??0x0)>0x0;},async 'load'(){const _0x36df80=_0x310b36;if(!this['sourceType'])return this[_0x36df80(0xd0)]=[],this[_0x36df80(0xd7)]=[],this['error']=null,void(this['busy']=!0x1);this[_0x36df80(0xf7)]=!0x0,this[_0x36df80(0xe2)]=null;try{const [_0x4734fd,_0x12308c,_0x3928db]=await Promise[_0x36df80(0xc0)]([fetch(__ENV__[_0x36df80(0xe9)]+'/env/'+encodeURIComponent(this['envName'])+_0x36df80(0xc2))['then'](async _0x4a95d2=>{const _0x583c0c=_0x36df80,_0x20a259=await _0x4a95d2[_0x583c0c(0xcd)]()[_0x583c0c(0xbe)](()=>({}));if(!_0x4a95d2['ok'])throw new Error(_0x20a259?.[_0x583c0c(0xe2)]?.['message']||'Failed\x20to\x20load\x20env\x20engines');return _0x20a259;}),fetch(__ENV__['API']+'/embeddings/embedders')[_0x36df80(0x106)](async _0x218115=>{const _0x400c7f=_0x36df80,_0x108901=await _0x218115[_0x400c7f(0xcd)]()[_0x400c7f(0xbe)](()=>({}));if(!_0x218115['ok'])throw new Error(_0x108901?.[_0x400c7f(0xe2)]?.['message']||'Failed\x20to\x20load\x20embedders');return _0x108901;}),fetch(__ENV__['API']+'/env/'+encodeURIComponent(this['envName'])+'/pipelines')[_0x36df80(0x106)](async _0x4702a4=>{const _0x828536=_0x36df80,_0x123d85=await _0x4702a4['json']()[_0x828536(0xbe)](()=>({}));if(!_0x4702a4['ok'])throw new Error(_0x123d85?.[_0x828536(0xe2)]?.[_0x828536(0xfa)]||_0x828536(0xe8));return _0x123d85;})]);if(_0x36df80(0xd4)===_0x4734fd[_0x36df80(0xeb)])throw _0x4734fd[_0x36df80(0xc5)];if(_0x36df80(0xd4)===_0x3928db['status'])throw _0x3928db['reason'];const _0xac2f4d=_0x4734fd[_0x36df80(0xf6)]?.[_0x36df80(0xc7)]??[],_0x4ab6ee=_0x36df80(0xf9)===_0x12308c[_0x36df80(0xeb)]?_0x12308c[_0x36df80(0xf6)]?.[_0x36df80(0xc7)]??[]:[],_0x813c84=_0x3928db[_0x36df80(0xf6)]?.[_0x36df80(0xc7)]??[];this[_0x36df80(0xd7)]=_0x813c84,this[_0x36df80(0xd0)]=[..._0xac2f4d,..._0x4ab6ee];}catch(_0x178f04){this[_0x36df80(0xe2)]=_0x178f04?.[_0x36df80(0xfa)]||String(_0x178f04),this[_0x36df80(0xd7)]=[],this['embedEngines']=[];}finally{this[_0x36df80(0xf7)]=!0x1;}},'setSearchTerm'(_0x209696){const _0x2bea55=_0x310b36;this[_0x2bea55(0xf2)]=String(_0x209696??'');},'setStatusFilter'(_0x34623f){const _0x5d6b4e=_0x310b36;this[_0x5d6b4e(0xeb)]=this['normalizeStatus'](_0x34623f);},'setEngineTypeFilter'(_0x4dd56c){const _0x10f887=_0x310b36;this['engineType']=String(_0x4dd56c??'')[_0x10f887(0xd3)]();},'setMode'(_0x4b4dc4){const _0x580863=_0x310b36,_0x426ee3=_0x141453[_0x580863(0xea)]?.[_0x580863(0xfc)];if(!_0x426ee3?.[_0x580863(0xcb)]||!_0x426ee3?.['replace'])return;const _0x303f63={..._0x426ee3[_0x580863(0xce)]||{},'env':this['envName'],'type':this[_0x580863(0xf4)],'tab':_0x580863(0xe1),'mode':'pipelines'===_0x4b4dc4?_0x580863(0xd5):_0x580863(0xe1)};this['focusedPipelineName']?_0x303f63[_0x580863(0xbc)]=this[_0x580863(0xc4)]:delete _0x303f63['pipeline'],_0x426ee3[_0x580863(0xe4)](_0x426ee3[_0x580863(0xcb)](_0x580863(0xe5),_0x303f63,_0x426ee3[_0x580863(0x105)]||''));},'clearFilters'(){const _0x17117d=_0x310b36;this[_0x17117d(0xf2)]='',this[_0x17117d(0xeb)]=_0x17117d(0xd6),this[_0x17117d(0xcc)]='';},'updateFocusedPipeline'(_0xba4e5b=''){const _0x390b10=_0x310b36,_0x2120a3=_0x141453[_0x390b10(0xea)]?.[_0x390b10(0xfc)];if(!_0x2120a3?.[_0x390b10(0xcb)]||!_0x2120a3?.[_0x390b10(0xe4)])return;const _0x26a181={..._0x2120a3[_0x390b10(0xce)]||{},'env':this['envName'],'type':this['sourceType'],'tab':_0x390b10(0xe1),'mode':this[_0x390b10(0xda)]},_0x9f9df2=String(_0xba4e5b||'')[_0x390b10(0xd3)]();_0x9f9df2?_0x26a181[_0x390b10(0xbc)]=_0x9f9df2:delete _0x26a181['pipeline'],_0x2120a3[_0x390b10(0xe4)](_0x2120a3['resolve'](_0x390b10(0xe5),_0x26a181,_0x2120a3[_0x390b10(0x105)]||''));},'handleOverviewSelect'(_0x48b449=null){const _0x2d3503=_0x310b36;this[_0x2d3503(0xbb)](_0x48b449?.[_0x2d3503(0xe6)]||'');},'goToType'(_0x52f546=null){const _0x1816fc=_0x310b36,_0x19d7d8=_0x52f546?.[_0x1816fc(0x104)];if(!_0x19d7d8)return;const _0x35bd20=_0x52f546?.[_0x1816fc(0xcf)]||this[_0x1816fc(0x100)],_0xaed40c=_0x141453[_0x1816fc(0xea)]?.[_0x1816fc(0xfc)];_0xaed40c?.['resolve']&&_0xaed40c?.[_0x1816fc(0x107)]&&_0xaed40c['push'](_0xaed40c[_0x1816fc(0xcb)](_0x1816fc(0xe5),{'env':_0x35bd20,'type':_0x19d7d8,'tab':_0x1816fc(0xe1),'mode':'pipelines'}));},'openGlobalWorkspace'(){const _0x4b76db=_0x310b36,_0x54add7=_0x141453['$vars']?.[_0x4b76db(0xfc)];if(!_0x54add7?.[_0x4b76db(0xcb)]||!_0x54add7?.[_0x4b76db(0x107)])return;const _0x5693aa={'env':this[_0x4b76db(0x100)],'sourceType':this['sourceType'],'mode':this[_0x4b76db(0xda)]};_0x4b76db(0xe1)===this[_0x4b76db(0xda)]&&this[_0x4b76db(0xcc)]&&(_0x5693aa['engineType']=this[_0x4b76db(0xcc)]),this['focusedPipelineName']&&(_0x5693aa[_0x4b76db(0xbc)]=this[_0x4b76db(0xc4)]),_0x4b76db(0xd6)!==this['status']&&(_0x5693aa[_0x4b76db(0xeb)]=this[_0x4b76db(0xeb)]),this['search'][_0x4b76db(0xd3)]()&&(_0x5693aa['search']=this[_0x4b76db(0xf2)][_0x4b76db(0xd3)]()),_0x54add7[_0x4b76db(0x107)](_0x54add7[_0x4b76db(0xcb)](_0x4b76db(0xc2),_0x5693aa));},async 'openCreatePipeline'(){const _0x1ccd52=_0x310b36;this['sourceType']&&await _0x141453[_0x1ccd52(0xc3)][_0x1ccd52(0xc9)][_0x1ccd52(0xbd)][_0x1ccd52(0xf5)]({'owner':_0x141453,'title':'Create\x20Pipeline\x20·\x20'+this[_0x1ccd52(0xf4)],'canDrag':!0x0,'content':_0x1ccd52(0xdf),'context':_0x37cf71=>({'modal':_0x37cf71,'type':this['sourceType'],'envName':this['envName'],'onDone':async()=>{const _0x59b578=_0x1ccd52;await this[_0x59b578(0xfd)]();}})});}}),async 'init'(_0x5ce6d1){const _0x2a3852=_0x310b36;_0x5ce6d1[_0x2a3852(0xde)](()=>_0x5ce6d1[_0x2a3852(0x101)]['type'],()=>this['load']()),_0x5ce6d1[_0x2a3852(0xde)](()=>_0x5ce6d1['$ok'][_0x2a3852(0xd9)][_0x2a3852(0xd1)][_0x2a3852(0xd8)],()=>this[_0x2a3852(0xfd)]()),await this['load']();const _0x445bb1=()=>this[_0x2a3852(0xfd)]();this[_0x2a3852(0xd2)]=[_0x24de04['on']('engine:started',_0x445bb1),_0x24de04['on'](_0x2a3852(0xc8),_0x445bb1),_0x24de04['on']('engine:error',_0x445bb1),_0x24de04['on'](_0x2a3852(0xf1),_0x445bb1),_0x24de04['on']('engine:uninstalled',_0x445bb1),_0x24de04['on'](_0x2a3852(0xf8),_0x445bb1),_0x24de04['on'](_0x2a3852(0xff),_0x445bb1),_0x24de04['on']('pipeline:stop',_0x445bb1),_0x24de04['on'](_0x2a3852(0xdc),_0x445bb1)];},'unmount'(){const _0xe683bd=_0x310b36;for(const _0x45c9cb of this[_0xe683bd(0xd2)])_0x45c9cb();this[_0xe683bd(0xd2)]=[];},'template':_0x310b36(0x109)};
|
|
1
|
+
import e from"../../embeddings/parts/engines-overview.ok.js";import n from"../modals/create-pipeline-modal.ok.js";import i from"../../../stores/events-store.js";export default{tag:"type-pipelines-tab",dependencies:[e,n],attr:{type:{},focusedpipeline:{},currentmode:{}},context:e=>({busy:!1,error:null,embedEngines:[],embedPipelines:[],search:"",status:"all",engineType:"",emptyFileEngines:{extractors:[],collections:[],workers:[]},_unsubs:[],get sourceType(){return e.$attr.type||""},get envName(){return e.$ok.stores.okdb.selectedEnv||"default"},get mode(){return"pipelines"===e.$attr.currentmode?"pipelines":"engines"},get focusedPipelineName(){return String(e.$attr.focusedpipeline||"").trim()},normalizeStatus:e=>["all","running","attention","stopped"].includes(e)?e:"all",get availableEngineTypes(){const e=new Set;for(const n of this.embedEngines??[])n?.type&&e.add(n.type);return[...e].sort()},get hasWorkspaceData(){return(this.embedEngines?.length??0)>0||(this.embedPipelines?.length??0)>0},async load(){if(!this.sourceType)return this.embedEngines=[],this.embedPipelines=[],this.error=null,void(this.busy=!1);this.busy=!0,this.error=null;try{const[e,n,i]=await Promise.allSettled([fetch(`${__ENV__.API}/env/${encodeURIComponent(this.envName)}/engines`).then(async e=>{const n=await e.json().catch(()=>({}));if(!e.ok)throw new Error(n?.error?.message||"Failed to load env engines");return n}),fetch(`${__ENV__.API}/embeddings/embedders`).then(async e=>{const n=await e.json().catch(()=>({}));if(!e.ok)throw new Error(n?.error?.message||"Failed to load embedders");return n}),fetch(`${__ENV__.API}/env/${encodeURIComponent(this.envName)}/pipelines`).then(async e=>{const n=await e.json().catch(()=>({}));if(!e.ok)throw new Error(n?.error?.message||"Failed to load env pipelines");return n})]);if("rejected"===e.status)throw e.reason;if("rejected"===i.status)throw i.reason;const t=e.value?.data??[],o="fulfilled"===n.status?n.value?.data??[]:[],s=i.value?.data??[];this.embedPipelines=s,this.embedEngines=[...t,...o]}catch(e){this.error=e?.message||String(e),this.embedPipelines=[],this.embedEngines=[]}finally{this.busy=!1}},setSearchTerm(e){this.search=String(e??"")},setStatusFilter(e){this.status=this.normalizeStatus(e)},setEngineTypeFilter(e){this.engineType=String(e??"").trim()},setMode(n){const i=e.$vars?.$router;if(!i?.resolve||!i?.replace)return;const t={...i._search||{},env:this.envName,type:this.sourceType,tab:"engines",mode:"pipelines"===n?"pipelines":"engines"};this.focusedPipelineName?t.pipeline=this.focusedPipelineName:delete t.pipeline,i.replace(i.resolve("/db",t,i._anchor||""))},clearFilters(){this.search="",this.status="all",this.engineType=""},updateFocusedPipeline(n=""){const i=e.$vars?.$router;if(!i?.resolve||!i?.replace)return;const t={...i._search||{},env:this.envName,type:this.sourceType,tab:"engines",mode:this.mode},o=String(n||"").trim();o?t.pipeline=o:delete t.pipeline,i.replace(i.resolve("/db",t,i._anchor||""))},handleOverviewSelect(e=null){this.updateFocusedPipeline(e?.name||"")},goToType(n=null){const i=n?.type;if(!i)return;const t=n?.env||this.envName,o=e.$vars?.$router;o?.resolve&&o?.push&&o.push(o.resolve("/db",{env:t,type:i,tab:"engines",mode:"pipelines"}))},openGlobalWorkspace(){const n=e.$vars?.$router;if(!n?.resolve||!n?.push)return;const i={env:this.envName,sourceType:this.sourceType,mode:this.mode};"engines"===this.mode&&this.engineType&&(i.engineType=this.engineType),this.focusedPipelineName&&(i.pipeline=this.focusedPipelineName),"all"!==this.status&&(i.status=this.status),this.search.trim()&&(i.search=this.search.trim()),n.push(n.resolve("/engines",i))},async openCreatePipeline(){this.sourceType&&await e.$ok.shared.modal.open({owner:e,title:`Create Pipeline · ${this.sourceType}`,canDrag:!0,content:'<create-pipeline-modal :modal="modal" :type="type" :env="envName" :on-done="onDone" />',context:e=>({modal:e,type:this.sourceType,envName:this.envName,onDone:async()=>{await this.load()}})})}}),async init(e){e.$watch(()=>e.$attr.type,()=>this.load()),e.$watch(()=>e.$ok.stores.okdb.selectedEnv,()=>this.load()),await this.load();const n=()=>this.load();this._unsubs=[i.on("engine:started",n),i.on("engine:stopped",n),i.on("engine:error",n),i.on("engine:installed",n),i.on("engine:uninstalled",n),i.on("embeddings:pipeline:ready",n),i.on("pipeline:start",n),i.on("pipeline:stop",n),i.on("pipeline:delete",n)]},unmount(){for(const e of this._unsubs)e();this._unsubs=[]},template:'\n<div style="display:flex; flex-direction:column; gap:12px; flex:1; min-height:0; overflow:auto; padding-right:4px;">\n\n <div style="display:flex; align-items:center; gap:10px; flex-wrap:wrap;">\n <div style="font-weight:600; font-size:15px;">Engines</div>\n <span style="font-size:11px; padding:2px 8px; border-radius:999px; border:1px solid var(--okdb-app-border); color:#cbd5e1; background:var(--okdb-app-bg-deep);">type: {{ sourceType }}</span>\n <if :="focusedPipelineName">\n <span style="font-size:11px; padding:2px 8px; border-radius:999px; border:1px solid color-mix(in srgb, var(--okdb-indigo) 27%, transparent); color:var(--okdb-indigo); background:color-mix(in srgb, var(--okdb-indigo) 7%, transparent);">pipeline: {{ focusedPipelineName }}</span>\n </if>\n <div style="margin-left:auto; display:flex; gap:6px; flex-wrap:wrap;">\n <button @click="load()" :disabled="busy" style="font-size:11px; padding:3px 10px;">↻</button>\n <button @click="openGlobalWorkspace()" style="font-size:11px; padding:3px 10px; border-color:color-mix(in srgb, var(--okdb-accent) 27%, transparent); color:var(--okdb-accent);">Open Global →</button>\n <button @click="openCreatePipeline()" style="background:color-mix(in srgb, var(--okdb-accent) 13%, transparent); border-color:var(--okdb-accent); color:var(--okdb-accent); font-weight:600; padding:5px 14px; font-size:12px;">+ Create Pipeline</button>\n </div>\n </div>\n\n <div style="display:flex; gap:8px; align-items:end; flex-wrap:wrap; padding:10px 12px; border:1px solid var(--okdb-app-border); border-radius:10px; background:var(--okdb-app-bg-deep);">\n <div style="display:flex; flex-direction:column; gap:4px; min-width:170px;">\n <span style="font-size:11px; color:var(--okdb-app-fg-muted);">View</span>\n <div style="display:flex; gap:4px;">\n <button\n @click="setMode(\'pipelines\')"\n :style="mode === \'pipelines\' ? \'flex:1; font-size:11px; padding:5px 10px; border-radius:6px; border:1px solid var(--okdb-indigo); color:var(--okdb-indigo); background:color-mix(in srgb, var(--okdb-indigo) 7%, transparent); cursor:pointer;\' : \'flex:1; font-size:11px; padding:5px 10px; border-radius:6px; border:1px solid var(--okdb-app-border); color:var(--okdb-app-fg-muted); background:var(--okdb-app-bg-deep); cursor:pointer;\'"\n >Pipelines</button>\n <button\n @click="setMode(\'engines\')"\n :style="mode === \'engines\' ? \'flex:1; font-size:11px; padding:5px 10px; border-radius:6px; border:1px solid var(--okdb-purple); color:var(--okdb-purple); background:color-mix(in srgb, var(--okdb-purple) 7%, transparent); cursor:pointer;\' : \'flex:1; font-size:11px; padding:5px 10px; border-radius:6px; border:1px solid var(--okdb-app-border); color:var(--okdb-app-fg-muted); background:var(--okdb-app-bg-deep); cursor:pointer;\'"\n >Engines</button>\n </div>\n </div>\n\n <label style="display:flex; flex-direction:column; gap:4px; min-width:200px; flex:1;">\n <span style="font-size:11px; color:var(--okdb-app-fg-muted);">Search</span>\n <input\n :value="search"\n @input:debounce.200="setSearchTerm($event.target.value)"\n :placeholder="mode === \'engines\' ? \'Search engines…\' : \'Search pipelines…\'"\n style="width:100%; box-sizing:border-box;"\n />\n </label>\n\n <label style="display:flex; flex-direction:column; gap:4px; min-width:150px;">\n <span style="font-size:11px; color:var(--okdb-app-fg-muted);">Status</span>\n <select @change="setStatusFilter($event.target.value)">\n <option value="all" :selected="status === \'all\'">Any</option>\n <option value="running" :selected="status === \'running\'">Running</option>\n <option value="attention" :selected="status === \'attention\'">Needs attention</option>\n <option value="stopped" :selected="status === \'stopped\'">Stopped</option>\n </select>\n </label>\n\n <if :="mode === \'engines\' && availableEngineTypes.length > 0">\n <label style="display:flex; flex-direction:column; gap:4px; min-width:170px;">\n <span style="font-size:11px; color:var(--okdb-app-fg-muted);">Engine Type</span>\n <select @change="setEngineTypeFilter($event.target.value)">\n <option value="" :selected="!engineType">All engines</option>\n <each :of="availableEngineTypes" let:item="engineKind">\n <option :value="engineKind" :selected="engineType === engineKind">{{ engineKind }}</option>\n </each>\n </select>\n </label>\n </if>\n\n <if :="embedPipelines.length > 1">\n <label style="display:flex; flex-direction:column; gap:4px; min-width:190px;">\n <span style="font-size:11px; color:var(--okdb-app-fg-muted);">Pipeline</span>\n <select @change="updateFocusedPipeline($event.target.value)">\n <option value="" :selected="!focusedPipelineName">All pipelines</option>\n <each :of="embedPipelines" let:item="pipeline">\n <option :value="pipeline.name || pipeline.pipeline || pipeline.storage_key" :selected="focusedPipelineName === (pipeline.name || pipeline.pipeline || pipeline.storage_key)">{{ pipeline.meta?.label || pipeline.meta?.pipeline || pipeline.pipeline || pipeline.name || pipeline.storage_key }}</option>\n </each>\n </select>\n </label>\n </if>\n\n <if :="focusedPipelineName">\n <button @click="updateFocusedPipeline(\'\')" style="font-size:11px; padding:4px 10px;">Clear focus</button>\n </if>\n <if :="search || status !== \'all\' || engineType">\n <button @click="clearFilters()" style="font-size:11px; padding:4px 10px;">Clear filters</button>\n </if>\n </div>\n\n <if :="error">\n <div style="color:var(--okdb-danger); font-size:12px; padding:8px; border:1px solid var(--okdb-danger); border-radius:6px;">{{ error }}</div>\n </if>\n\n <if :="!busy && !hasWorkspaceData && !error">\n <div style="padding:22px 20px; background:#111a1f; border:1px solid var(--okdb-app-border); border-radius:10px; display:flex; flex-direction:column; gap:8px; align-items:center; text-align:center;">\n <div style="font-size:30px; opacity:.22;">⊛</div>\n <div style="font-size:14px; font-weight:600; opacity:.75;">No engines for {{ sourceType }}</div>\n <div style="font-size:12px; opacity:.5; line-height:1.7; max-width:500px;">\n This is the same engines workspace, already scoped to this type.\n </div>\n <button @click="openCreatePipeline()" style="background:color-mix(in srgb, var(--okdb-accent) 13%, transparent); border-color:var(--okdb-accent); color:var(--okdb-accent); font-weight:600; padding:6px 14px; font-size:12px;">+ Create Pipeline</button>\n </div>\n </if>\n\n <if :="busy && !hasWorkspaceData && !error">\n <div style="font-size:12px; opacity:.45; padding:8px 0;">Loading…</div>\n </if>\n\n <if :="hasWorkspaceData">\n <engines-overview\n embedded="true"\n filterpipeline="true"\n :embed-engines="embedEngines"\n :embed-pipelines="embedPipelines"\n :file-engines="emptyFileEngines"\n :mode="mode"\n pipelinetype="all"\n :enginetype="engineType"\n :status="status"\n :search="search"\n :sourcetype="sourceType"\n :selectedpipeline="focusedPipelineName"\n @select="handleOverviewSelect($event.detail)"\n @refresh="load()"\n @goto-type="goToType($event.detail)"\n />\n </if>\n\n</div>'};
|