@kedem/okdb 1.0.0 → 1.0.3
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/README.md +1 -1
- 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/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/login-app.js +1 -1
- package/public/modules/ok.js +1 -1
- package/public/sections/api/parts/api-endpoint.ok.js +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/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/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/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/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/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/parts/license-panel.ok.js +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/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/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/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/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/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/vendor/okjs/toolkit/behavior/async.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-chart.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-doc-viewer.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-marked.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/ok-layer-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/ok-layer.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/ok-overlay.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/ok-sandbox.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/transition.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/virtualized.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-console-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-console.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-fps-monitor-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-fps-monitor.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-inspector-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-inspector.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-js-tree.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-timeline-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-timeline.ok.js +1 -1
- package/public/vendor/okjs/toolkit/docs/doc-viewer.ok.js +1 -1
- package/public/vendor/okjs/toolkit/editor/ok-live-component.ok.js +1 -1
- package/public/vendor/okjs/toolkit/editor/ok-live-example.ok.js +1 -1
- package/public/vendor/okjs/toolkit/editor/ok-live-shell.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-dropdown.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-icon.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-select.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-table.ok.js +1 -1
- package/public/vendor/okjs/toolkit/errors/ok-crash-boundary.ok.js +1 -1
- package/public/vendor/okjs/toolkit/errors/ok-crash-info.ok.js +1 -1
- package/public/vendor/okjs/toolkit/i18n/i18n-editor-examples.ok.js +1 -1
- package/public/vendor/okjs/toolkit/i18n/i18n-editor.ok.js +1 -1
- package/public/vendor/okjs/toolkit/i18n/i18n-key-editor-tips.ok.js +1 -1
- package/public/vendor/okjs/toolkit/i18n/i18n-key-editor.ok.js +1 -1
- package/public/vendor/okjs/toolkit/i18n/i18n-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/i18n/ok-i18n.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-contextmenu.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-dismiss-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-draggable.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-flyover-panel.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-flyover.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-highlight-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-highlight.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-hotkeys-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-picker-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-popout-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-popout.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-portal-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-submenu.ok.js +1 -1
- package/public/vendor/okjs/toolkit/layout/ok-resizer.ok.js +1 -1
- package/public/vendor/okjs/toolkit/manifest.js +1 -1
- package/public/vendor/okjs/toolkit/modals/ok-modal-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/modals/ok-modal.ok.js +1 -1
- package/public/vendor/okjs/toolkit/modals/ok-toast-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/modals/ok-window.ok.js +1 -1
- package/public/vendor/okjs/toolkit/navigation/hash-router.ok.js +1 -1
- package/public/vendor/okjs/toolkit/navigation/history-router.ok.js +1 -1
- package/public/vendor/okjs/toolkit/navigation/router.ok.js +1 -1
- package/public/vendor/okjs/toolkit/sync/reactive-sync-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/sync/reactive-sync.js +1 -1
- package/public/vendor/okjs/toolkit/theming/blocks/ok-design-button.css.js +1 -1
- package/public/vendor/okjs/toolkit/theming/blocks/ok-design-input.css.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-design-style.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-design-vars.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-design.ok.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-input.ok.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-style.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-utils.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-variable.ok.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-vm.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor.ok.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme.ok.js +1 -1
- package/public/view-models/type-query-vm.js +1 -1
- package/public/images/logo.png +0 -0
- package/public/images/logo.svg +0 -333
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1e7e(_0x9aa2a,_0x9b10fb){_0x9aa2a=_0x9aa2a-0xcc;const _0x3678aa=_0x3678();let _0x1e7e1e=_0x3678aa[_0x9aa2a];return _0x1e7e1e;}function _0x3678(){const _0x42055b=['success','/auth/permissions','token','trim','password','work','fair','var(--okdb-danger)','summary','localeCompare','filter','getTime','22381640WUwieV','6942xnISzA','close','sort','448EWfhWf','shared','routes','implies','test','godMode','ADMIN_API','Failed','1502557RkbzDc','entries','collapsedScopes','System','validateForm','Gate','catalogLoading','$ok','hoveredPerm','json','keys','length','namespaces','error','isArray','177642LtiSEK','map','Failed\x20to\x20update\x20token','indexOf','PATCH','application/json','data','5zfxHqD','edit-token-modal','hoveredAnchor','Token\x20label\x20is\x20required','system','.tf-header-fields,.tf-root,edit-token-modal{display:flex;flex-direction:column}.tf-root{gap:0;width:520px;max-width:88vw;position:relative}.tf-header-fields{gap:12px;padding-bottom:16px}.tf-field,.tf-header-row{display:flex;gap:10px}.tf-field{flex-direction:column;gap:4px;min-width:0}.tf-label{font-size:10px;color:var(--okdb-app-fg-muted);text-transform:uppercase;letter-spacing:.07em;font-weight:600}.tf-creds-section{display:flex;flex-direction:column;gap:8px;padding:10px\x2012px;border:1px\x20solid\x20var(--okdb-app-surface);border-radius:6px;background:rgba(0,0,0,.15)}.tf-creds-label{font-size:10px;color:var(--okdb-app-fg-muted);text-transform:uppercase;letter-spacing:.07em;font-weight:600}.tf-creds-hint{font-size:10px;color:var(--okdb-app-fg-subtle);line-height:1.4;margin-top:-4px}.tf-creds-row{display:flex;gap:10px}.tf-pw-wrap{position:relative;display:flex;align-items:center}.tf-pw-wrap\x20.tf-input{padding-right:30px}.tf-pw-eye{position:absolute;right:7px;background:0\x200;border:0;color:var(--okdb-app-fg-subtle);cursor:pointer;font-size:12px;padding:0;line-height:1;user-select:none}.tf-pw-eye:hover,.tf-scope-header:hover\x20.tf-scope-name{color:var(--okdb-accent-muted)}.tf-strength-bar{height:2px;border-radius:1px;background:var(--okdb-app-surface);margin-top:3px;overflow:hidden}.tf-strength-fill{height:100%;border-radius:1px;transition:width\x20.2s,background-color\x20.2s}.tf-strength-text{font-size:9px;margin-top:2px;text-transform:uppercase;letter-spacing:.05em}.tf-input{padding:6px\x208px;border:1px\x20solid\x20var(--okdb-app-surface-2);border-radius:4px;background:0\x200;color:var(--okdb-app-fg-strong);font-size:12px;font-family:monospace;width:100%;box-sizing:border-box}.tf-input:focus{outline:0;border-color:rgba(79,193,255,.4)}.tf-hint{font-size:10px;color:var(--okdb-app-fg-subtle);line-height:1.4}.tf-divider{height:1px;background:var(--okdb-app-surface);margin-bottom:12px}.tf-section{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}.tf-scope-header{display:flex;align-items:center;gap:8px;cursor:pointer;user-select:none;padding:2px\x200}.tf-scope-name{font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:var(--okdb-app-fg-muted);font-weight:600;transition:color\x20.1s}.tf-scope-count{font-size:10px;color:var(--okdb-accent);opacity:.8}.tf-scope-chevron{margin-left:auto;font-size:10px;color:var(--okdb-app-fg-subtle)}.tf-ns-block{display:flex;flex-direction:column;gap:4px;margin-bottom:8px}.tf-ns-row{display:flex;align-items:baseline;gap:8px}.tf-ns-label{font-size:11px;color:var(--okdb-app-fg-subtle);font-family:monospace;flex-shrink:0;cursor:pointer;user-select:none;transition:color\x20.1s;font-weight:600}.tf-ns-label:hover{color:var(--okdb-accent-muted)}.tf-ns-label--on{color:var(--okdb-accent)}.tf-ns-desc{font-size:10px;color:var(--okdb-app-fg-subtle);line-height:1.4}.tf-pills{display:flex;flex-wrap:wrap;gap:4px;padding-left:4px}.tf-pill-wrap{display:inline-flex}.tf-pill-warn{font-size:7px;color:rgba(215,150,60,.85);vertical-align:super;margin-left:1px;line-height:0}.tf-pill--destructive{border-color:rgba(200,140,60,.35)}.tf-pill--destructive:hover{border-color:rgba(200,140,60,.6)}.tf-pill{display:inline-flex;align-items:center;padding:2px\x208px;border-radius:4px;font-size:11px;font-family:monospace;border:1px\x20solid\x20var(--okdb-app-surface-2);color:var(--okdb-app-fg-subtle);cursor:pointer;user-select:none;transition:background\x20.1s,border-color\x20.1s,color\x20.1s;white-space:nowrap}.tf-pill:hover{border-color:var(--okdb-app-border);color:var(--okdb-accent-muted)}.tf-pill--on{background:rgba(79,193,255,.1);border-color:rgba(79,193,255,.35);color:var(--okdb-accent)}.tf-pill--on:hover{background:rgba(79,193,255,.15)}.tf-pill--full{border-color:rgba(251,191,36,.2);color:#5a4a20}.tf-pill--full-on,.tf-pill--full:hover{border-color:rgba(251,191,36,.4);color:var(--okdb-warning-text)}.tf-pill--full-on{background:rgba(251,191,36,.1)}.tf-pill--full-on:hover{background:rgba(251,191,36,.16)}.tf-pill--add{border-style:dashed;border-color:var(--okdb-app-surface-2);color:var(--okdb-app-fg-subtle)}.tf-pill--add:hover{border-color:var(--okdb-app-border);color:var(--okdb-accent-muted);border-style:solid}.tf-pill--wild{border-color:rgba(251,191,36,.2);color:#5a4a20;font-weight:700}.tf-pill--wild-on,.tf-pill--wild:hover{border-color:rgba(251,191,36,.4);color:var(--okdb-warning-text)}.tf-pill--wild-on{background:rgba(251,191,36,.1);font-weight:700}.tf-pill--wild-on:hover{background:rgba(251,191,36,.16)}.tf-pill--wild-inherited{border-style:dashed;border-color:rgba(251,191,36,.45);color:rgba(251,191,36,.6);background:rgba(251,191,36,.05);font-weight:700}.tf-pill--wild-inherited:hover{border-color:rgba(251,191,36,.65);color:rgba(251,191,36,.8);background:rgba(251,191,36,.09)}.tf-pill--inherited{border-style:dashed;border-color:rgba(79,193,255,.5);color:rgba(79,193,255,.65);background:rgba(79,193,255,.06)}.tf-pill--inherited:hover{border-color:rgba(79,193,255,.7);color:rgba(79,193,255,.85);background:rgba(79,193,255,.1)}.tf-env-row{display:flex;flex-direction:column;gap:6px;padding:8px\x200\x2010px;border-top:1px\x20solid\x20var(--okdb-app-bg)}.tf-env-row-header{display:flex;align-items:center;justify-content:space-between}.tf-env-name{font-size:11px;font-weight:600;color:var(--okdb-app-fg-muted);font-family:monospace}.tf-env-all,.tf-env-remove{font-size:10px;color:var(--okdb-app-fg-subtle);cursor:pointer;user-select:none;padding:1px\x204px;transition:color\x20.1s}.tf-env-remove:hover{color:var(--okdb-danger)}.tf-env-all:hover{color:var(--okdb-accent-muted)}.tf-env-all--on{color:var(--okdb-warning-text)}.tf-env-all--on:hover{color:var(--okdb-warning)}.tf-error{font-size:11px;color:var(--okdb-danger);padding:6px\x200\x200}.tf-actions{display:flex;gap:8px;justify-content:flex-end;padding-top:14px;margin-top:4px;border-top:1px\x20solid\x20var(--okdb-app-surface)}.tf-btn{padding:5px\x2012px;border-radius:5px;font-size:12px;border:1px\x20solid;background:0\x200;cursor:pointer;transition:background\x20.12s,color\x20.12s}.tf-btn:disabled{opacity:.4;cursor:not-allowed}.tf-btn--primary{border-color:var(--okdb-app-border);color:var(--okdb-accent-muted)}.tf-btn--primary:not(:disabled):hover{background:var(--okdb-app-surface);border-color:var(--okdb-app-border);color:var(--okdb-sky)}.tf-btn--secondary{border-color:var(--okdb-app-surface-2);color:var(--okdb-app-fg-subtle)}.tf-btn--secondary:hover{background:var(--okdb-app-bg)}.tf-pip{min-width:260px;max-width:460px;background:var(--okdb-app-bg-deep);border:1px\x20solid\x20var(--okdb-app-surface-2);border-radius:5px;padding:8px\x2010px;box-shadow:0\x204px\x2018px\x20rgba(0,0,0,.75);pointer-events:none;white-space:normal;font-size:11px}.tf-pip-perm{font-family:monospace;font-size:10px;color:var(--okdb-accent);margin-bottom:3px}.tf-pip-summary{color:var(--okdb-accent-muted);line-height:1.4;margin-bottom:5px}.tf-pip-routes-hd{font-size:9px;color:var(--okdb-app-fg-subtle);text-transform:uppercase;letter-spacing:.06em;margin-bottom:3px}.tf-pip-route{display:flex;align-items:baseline;gap:5px;padding:1px\x200}.tf-pip-method{font-family:monospace;font-size:9px;color:var(--okdb-accent);width:34px;flex-shrink:0}.tf-pip-path{font-family:monospace;font-size:10px;color:var(--okdb-accent-muted);word-break:break-all}.tf-pip-bd,.tf-pip-lr{font-size:8px;border-radius:2px;padding:0\x203px;flex-shrink:0}.tf-pip-bd{color:var(--okdb-danger);background:rgba(180,50,40,.15)}.tf-pip-lr{color:var(--okdb-app-fg-muted);background:rgba(100,100,100,.12)}.tf-pip-route-desc{font-size:9px;color:var(--okdb-app-fg-subtle);padding-left:39px;margin-bottom:1px}.tf-pip-gate,.tf-pip-implied{color:var(--okdb-app-fg-subtle);font-size:10px}.tf-pip-implied{margin-top:5px;font-size:9px;font-family:monospace}','opOrder','name','catalog','loadCatalog','1268oRDOZJ','slice','3958829Amljnj','<div\x20class=\x22tf-root\x22><if\x20:=\x22busy\x22><ok-overlay><div\x20class=\x22loader-center\x22><ok-icon\x20name=\x22loader\x22\x20class=\x22spin\x22\x20style=\x22width:28px;height:28px;\x22/></div></ok-overlay></if><div\x20class=\x22tf-header-fields\x22><div\x20class=\x22tf-header-row\x22><div\x20class=\x22tf-field\x22\x20style=\x22flex:2;\x22><span\x20class=\x22tf-label\x22>Label</span>\x20<input\x20class=\x22tf-input\x22\x20type=\x22text\x22\x20placeholder=\x22e.g.,\x20API\x20Client\x22\x20:value=\x22label\x22\x20@input=\x22label\x20=\x20$el.value\x22\x20:disabled=\x22busy\x22></div><div\x20class=\x22tf-field\x22\x20style=\x22flex:1.5;\x22><span\x20class=\x22tf-label\x22>Expires\x20<span\x20style=\x22opacity:.4;\x22>(optional)</span></span>\x20<input\x20class=\x22tf-input\x22\x20type=\x22datetime-local\x22\x20:value=\x22expiresAt\x22\x20@input=\x22expiresAt\x20=\x20$el.value\x22\x20:disabled=\x22busy\x22></div></div><div\x20class=\x22tf-creds-section\x22><div><div\x20class=\x22tf-creds-label\x22>Login\x20credentials\x20<span\x20style=\x22opacity:.4;\x20text-transform:none;\x20font-weight:400;\x20letter-spacing:0;\x22>(optional)</span></div><div\x20class=\x22tf-creds-hint\x22>If\x20set,\x20this\x20token\x20can\x20also\x20be\x20used\x20via\x20username\x20+\x20password\x20authentication.</div></div><div\x20class=\x22tf-creds-row\x22><div\x20class=\x22tf-field\x22\x20style=\x22flex:1;\x22><span\x20class=\x22tf-label\x22>Username</span>\x20<input\x20class=\x22tf-input\x22\x20type=\x22text\x22\x20placeholder=\x22leave\x20blank\x20for\x20token-only\x22\x20:value=\x22name\x22\x20@input=\x22name\x20=\x20$el.value\x22\x20:disabled=\x22busy\x22\x20autocomplete=\x22off\x22></div><div\x20class=\x22tf-field\x22\x20style=\x22flex:1;\x22><span\x20class=\x22tf-label\x22>Password\x20<span\x20style=\x22opacity:.4;\x22>(new)</span></span><div\x20class=\x22tf-pw-wrap\x22><input\x20class=\x22tf-input\x22\x20:type=\x22showPassword\x20?\x20\x27text\x27\x20:\x20\x27password\x27\x22\x20placeholder=\x22leave\x20blank\x20to\x20keep\x22\x20:value=\x22password\x22\x20@input=\x22password\x20=\x20$el.value\x22\x20:disabled=\x22busy\x20||\x20!name\x22\x20autocomplete=\x22new-password\x22>\x20<button\x20class=\x22tf-pw-eye\x22\x20@click=\x22toggleShowPassword()\x22\x20type=\x22button\x22\x20tabindex=\x22-1\x22>{{\x20showPassword\x20?\x20\x27🙈\x27\x20:\x20\x27👁\x27\x20}}</button></div><if\x20:=\x22password\x22><div\x20class=\x22tf-strength-bar\x22><div\x20class=\x22tf-strength-fill\x22\x20:style=\x22\x27width:\x27\x20+\x20(passwordStrength(password)/5*100)\x20+\x20\x27%;\x20background:\x27\x20+\x20passwordStrengthColor(password)\x22/></div><div\x20class=\x22tf-strength-text\x22\x20:style=\x22\x27color:\x27\x20+\x20passwordStrengthColor(password)\x22>{{\x20passwordStrengthLabel(password)\x20}}</div></if></div></div></div></div><div\x20class=\x22tf-divider\x22/><if\x20:=\x22catalogLoading\x22><div\x20class=\x22tf-hint\x22\x20style=\x22padding-bottom:12px;\x22>Loading\x20permissions…</div></if><if\x20:=\x22catalogError\x20&&\x20!catalogLoading\x22><div\x20class=\x22tf-section\x22><span\x20class=\x22tf-label\x22>Permissions\x20<span\x20style=\x22color:var(--okdb-danger);\x22>(fallback)</span></span>\x20<input\x20class=\x22tf-input\x22\x20type=\x22text\x22\x20placeholder=\x22data:read,\x20data:write\x22\x20:value=\x22selectedPerms._fallback\x20||\x20\x27\x27\x22\x20@input=\x22selectedPerms\x20=\x20{\x20_fallback:\x20$el.value\x20}\x22\x20:disabled=\x22busy\x22>\x20<span\x20class=\x22tf-hint\x22>Comma-separated\x20permission\x20strings</span></div></if><if\x20:=\x22catalog\x20&&\x20!catalogError\x20&&\x20!catalogLoading\x22><div\x20class=\x22tf-section\x22\x20style=\x22gap:4px;\x22><div\x20:class=\x22[\x27tf-pill\x27,\x20\x27tf-pill--full\x27,\x20godMode\x20?\x20\x27tf-pill--full-on\x27\x20:\x20\x27\x27]\x22\x20@click=\x22toggleGodMode()\x22\x20style=\x22width:fit-content;\x22>★\x20 Full\x20access\x20—\x20all\x20permissions</div></div><if\x20:=\x22!godMode\x22><each\x20:of=\x22getPermSections()\x22\x20let:item=\x22section\x22><div\x20class=\x22tf-section\x22><div\x20class=\x22tf-scope-header\x22\x20@click=\x22toggleScope(section.scope)\x22><span\x20class=\x22tf-scope-name\x22>{{\x20section.label\x20}}</span><if\x20:=\x22scopeSelectionCount(section)\x22><span\x20class=\x22tf-scope-count\x22>{{\x20scopeSelectionCount(section)\x20}}</span></if><span\x20class=\x22tf-scope-chevron\x22>{{\x20isCollapsed(section.scope)\x20?\x20\x27▸\x27\x20:\x20\x27▾\x27\x20}}</span></div><if\x20:=\x22!isCollapsed(section.scope)\x22><each\x20:of=\x22section.namespaces\x22\x20let:item=\x22nsEntry\x22><div\x20class=\x22tf-ns-block\x22><div\x20class=\x22tf-ns-row\x22><span\x20:class=\x22[\x27tf-ns-label\x27,\x20isNsAllSelected(nsEntry.ns)\x20?\x20\x27tf-ns-label--on\x27\x20:\x20\x27\x27]\x22\x20@click=\x22toggleNamespace(nsEntry.ns,\x20nsEntry.operations)\x22\x20title=\x22Toggle\x20all\x22>{{\x20nsEntry.nsLabel\x20||\x20nsEntry.ns\x20}}</span><if\x20:=\x22nsEntry.nsDescription\x22><span\x20class=\x22tf-ns-desc\x22>{{\x20nsEntry.nsDescription\x20}}</span></if></div><div\x20class=\x22tf-pills\x22><span\x20:class=\x22[\x27tf-pill\x27,\x20\x27tf-pill--wild\x27,\x20isNsAllSelected(nsEntry.ns)\x20?\x20\x27tf-pill--wild-on\x27\x20:\x20\x27\x27]\x22\x20@click=\x22toggleNamespace(nsEntry.ns,\x20nsEntry.operations)\x22\x20title=\x22ns:*\x20—\x20toggle\x20all\x22>*</span><each\x20:of=\x22getPermOps(nsEntry.ns,\x20nsEntry.operations,\x20nsEntry.operationMeta)\x22\x20let:item=\x22permOp\x22><span\x20class=\x22tf-pill-wrap\x22\x20@mouseenter=\x22setHover($event,\x20permOp.perm,\x20permOp)\x22\x20@mouseleave=\x22clearHover()\x22><span\x20:class=\x22[\x27tf-pill\x27,\x20permOp.checked\x20?\x20\x27tf-pill--on\x27\x20:\x20\x27\x27,\x20permOp.hasDestructive\x20?\x20\x27tf-pill--destructive\x27\x20:\x20\x27\x27]\x22\x20@click=\x22togglePerm(permOp.ns,\x20permOp.op,\x20nsEntry.operations)\x22>{{\x20permOp.op\x20}}<if\x20:=\x22permOp.hasDestructive\x22><span\x20class=\x22tf-pill-warn\x22>⚠</span></if></span></span></each></div></div></each></if></div></each><if\x20:=\x22catalog.envs\x20&&\x20catalog.envs.length\x20>\x200\x22><div\x20class=\x22tf-divider\x22/><div\x20class=\x22tf-section\x22\x20style=\x22gap:8px;\x22><div\x20class=\x22tf-scope-header\x22\x20style=\x22cursor:default;\x20pointer-events:none;\x22><span\x20class=\x22tf-scope-name\x22>Per-env\x20grants</span>\x20<span\x20class=\x22tf-hint\x22\x20style=\x22margin-left:6px;\x22>extra\x20permissions\x20for\x20a\x20specific\x20environment</span></div><if\x20:=\x22availableGrantEnvs().length\x20>\x200\x22><div\x20class=\x22tf-pills\x22><each\x20:of=\x22availableGrantEnvs()\x22\x20let:item=\x22envName\x22><span\x20class=\x22tf-pill\x20tf-pill--add\x22\x20@click=\x22addGrantEnv(envName)\x22>+\x20{{\x20envName\x20}}</span></each></div></if><each\x20:of=\x22getGrantEntries()\x22\x20let:item=\x22grantEntry\x22><div\x20class=\x22tf-env-row\x22><div\x20class=\x22tf-env-row-header\x22><div\x20style=\x22display:flex;\x20align-items:center;\x20gap:6px;\x22><span\x20class=\x22tf-env-name\x22>{{\x20grantEntry.env\x20}}</span>\x20<span\x20:class=\x22[\x27tf-pill\x27,\x20\x27tf-pill--wild\x27,\x20isEnvAllSelected(grantEntry.env)\x20?\x20\x27tf-pill--wild-on\x27\x20:\x20isEnvWildInherited(grantEntry.env)\x20?\x20\x27tf-pill--wild-inherited\x27\x20:\x20\x27\x27]\x22\x20@click=\x22toggleGrantAllPerms(grantEntry.env)\x22\x20title=\x22*\x20—\x20all\x20permissions\x20for\x20this\x20env\x22\x20style=\x22font-size:11px;\x20padding:1px\x206px;\x22>*</span><if\x20:=\x22grantEntry.globalCoverAll\x22><span\x20class=\x22tf-hint\x22\x20style=\x22color:rgba(79,193,255,.35);\x22\x20title=\x22All\x20permissions\x20already\x20covered\x20by\x20global\x20*\x20or\x20god\x20mode\x22>inherited</span></if></div><span\x20class=\x22tf-env-remove\x22\x20@click=\x22removeGrantEnv(grantEntry.env)\x22>✕\x20remove</span></div><each\x20:of=\x22grantEntry.nGroups\x22\x20let:item=\x22nsGroup\x22><div\x20class=\x22tf-ns-row\x22><span\x20:class=\x22[\x27tf-ns-label\x27,\x20isNsAllSelectedForGrant(grantEntry.env,\x20nsGroup.ns)\x20?\x20\x27tf-ns-label--on\x27\x20:\x20\x27\x27]\x22\x20@click=\x22toggleGrantNamespace(grantEntry.env,\x20nsGroup.ns,\x20nsGroup.ops)\x22\x20title=\x22Toggle\x20all\x22>{{\x20nsGroup.ns\x20}}</span><div\x20class=\x22tf-pills\x22><span\x20:class=\x22[\x27tf-pill\x27,\x20\x27tf-pill--wild\x27,\x20isNsAllSelectedForGrant(grantEntry.env,\x20nsGroup.ns)\x20?\x20\x27tf-pill--wild-on\x27\x20:\x20isNsWildInheritedForGrant(grantEntry.env,\x20nsGroup.ns)\x20?\x20\x27tf-pill--wild-inherited\x27\x20:\x20\x27\x27]\x22\x20@click=\x22toggleGrantNamespace(grantEntry.env,\x20nsGroup.ns,\x20nsGroup.ops)\x22\x20title=\x22ns:*\x20—\x20toggle\x20all\x22>*</span><each\x20:of=\x22nsGroup.ops\x22\x20let:item=\x22grantPerm\x22><span\x20class=\x22tf-pill-wrap\x22\x20@mouseenter=\x22setHover($event,\x20grantPerm.perm,\x20grantPerm)\x22\x20@mouseleave=\x22clearHover()\x22><span\x20:class=\x22[\x27tf-pill\x27,\x20grantPerm.checked\x20?\x20\x27tf-pill--on\x27\x20:\x20grantPerm.inherited\x20?\x20\x27tf-pill--inherited\x27\x20:\x20\x27\x27,\x20grantPerm.hasDestructive\x20?\x20\x27tf-pill--destructive\x27\x20:\x20\x27\x27]\x22\x20@click=\x22toggleGrantPerm(grantEntry.env,\x20nsGroup.ns,\x20grantPerm.op,\x20nsGroup.ops.map(o\x20=>\x20o.op))\x22>{{\x20grantPerm.op\x20}}<if\x20:=\x22grantPerm.hasDestructive\x22><span\x20class=\x22tf-pill-warn\x22>⚠</span></if></span></span></each></div></div></each></div></each></div></if></if></if><if\x20:=\x22error\x22><div\x20class=\x22tf-error\x22>{{\x20error\x20}}</div></if><div\x20class=\x22tf-actions\x22><button\x20class=\x22tf-btn\x20tf-btn--secondary\x22\x20@click=\x22cancel()\x22\x20:disabled=\x22busy\x22>Cancel</button>\x20<button\x20class=\x22tf-btn\x20tf-btn--primary\x22\x20@click=\x22save()\x22\x20:disabled=\x22busy\x20||\x20!label.trim()\x22>Save\x20Changes</button></div><ok-flyover\x20:open=\x22hoveredPermOp\x20!=\x20null\x22\x20:anchor=\x22hoveredAnchor\x22\x20placement=\x22bottom-start\x22\x20:gap=\x224\x22\x20style=\x22--ok-flyover-bg:transparent;\x20--ok-flyover-border:none;\x20--ok-flyover-shadow:none;\x20--ok-flyover-radius:0;\x22><if\x20:=\x22hoveredPermOp\x22><div\x20class=\x22tf-pip\x22><div\x20class=\x22tf-pip-perm\x22>{{\x20hoveredPermOp.perm\x20||\x20hoveredPerm\x20}}</div><if\x20:=\x22hoveredPermOp.summary\x22><div\x20class=\x22tf-pip-summary\x22>{{\x20hoveredPermOp.summary\x20}}</div></if><if\x20:=\x22hoveredPermOp.routes\x20&&\x20hoveredPermOp.routes.length\x22><div\x20class=\x22tf-pip-routes-hd\x22>Routes\x20({{\x20hoveredPermOp.routes.length\x20}})</div><each\x20:of=\x22hoveredPermOp.routes\x22\x20let:item=\x22r\x22><div\x20class=\x22tf-pip-route\x22><span\x20class=\x22tf-pip-method\x22>{{\x20r.method\x20}}</span>\x20<span\x20class=\x22tf-pip-path\x22>{{\x20r.path\x20}}</span><if\x20:=\x22r.destructive\x22><span\x20class=\x22tf-pip-bd\x22>destructive</span></if><if\x20:=\x22r.longRunning\x22><span\x20class=\x22tf-pip-lr\x22>long</span></if></div><if\x20:=\x22r.summary\x22><div\x20class=\x22tf-pip-route-desc\x22>{{\x20r.summary\x20}}</div></if></each></if><if\x20:=\x22!(hoveredPermOp.routes\x20&&\x20hoveredPermOp.routes.length)\x22><div\x20class=\x22tf-pip-gate\x22>Gate\x20—\x20combine\x20with\x20underlying\x20namespace\x20permissions.</div></if><if\x20:=\x22getImpliedBy(hoveredPerm).length\x22><div\x20class=\x22tf-pip-implied\x22>Implied\x20by:\x20{{\x20getImpliedBy(hoveredPerm).join(\x27,\x20\x27)\x20}}</div></if></div></if></ok-flyover></div>','scope','query','env','result','7418238EIchHo','envs','toast','busy','operations','destructive','weak','/auth/tokens/','grants','showPassword','strong','split','read','passwordStrength','peer','message','permissions','isNsAllSelectedForGrant','Token\x20updated','expiresAt','some','includes','catalogError','onDone','API','2936448pYSVmt','var(--okdb-warning)','toISOString','hoveredPermOp','var(--okdb-success)','perm','selectedPerms','isEnvAllSelected','currentTarget','_fallback','write','label','$attr','run'];_0x3678=function(){return _0x42055b;};return _0x3678();}const _0x4ad938=_0x1e7e;(function(_0xf6f0bc,_0x42467a){const _0x5d3047=_0x1e7e,_0x5b0c2f=_0xf6f0bc();while(!![]){try{const _0x8dab4e=-parseInt(_0x5d3047(0xde))/0x1+parseInt(_0x5d3047(0x11f))/0x2+parseInt(_0x5d3047(0xd3))/0x3*(-parseInt(_0x5d3047(0xfe))/0x4)+parseInt(_0x5d3047(0xf4))/0x5*(-parseInt(_0x5d3047(0x106))/0x6)+-parseInt(_0x5d3047(0x100))/0x7+-parseInt(_0x5d3047(0xd6))/0x8*(-parseInt(_0x5d3047(0xed))/0x9)+parseInt(_0x5d3047(0xd2))/0xa;if(_0x8dab4e===_0x42467a)break;else _0x5b0c2f['push'](_0x5b0c2f['shift']());}catch(_0x377e38){_0x5b0c2f['push'](_0x5b0c2f['shift']());}}}(_0x3678,0xbce45));import _0x6eb1e9 from'@toolkit/elements/ok-icon.ok.js';import _0x4189cb from'@toolkit/core/ok-overlay.ok.js';import _0x10ec29 from'@toolkit/interaction/ok-flyover.ok.js';export default{'tag':_0x4ad938(0xf5),'dependencies':[_0x4189cb,_0x6eb1e9,_0x10ec29],'attr':{'modal':{},'token':{},'onDone':{}},'context'(_0x59b551){const _0x3040b0=_0x4ad938,_0x1e77f1=_0x59b551[_0x3040b0(0x12b)]['token']?.[_0x3040b0(0x116)]||[],_0x366ec6=_0x1e77f1[_0x3040b0(0x11b)]('*'),_0x1c5406={};if(!_0x366ec6){for(const _0x2d1746 of _0x1e77f1)_0x1c5406[_0x2d1746]=!0x0;}const _0x2355b0={},_0x475717=_0x59b551[_0x3040b0(0x12b)][_0x3040b0(0x12f)]?.[_0x3040b0(0x10e)]||{};for(const [_0x1e2875,_0x43bde3]of Object[_0x3040b0(0xdf)](_0x475717)){_0x2355b0[_0x1e2875]={};for(const _0x434c28 of Array[_0x3040b0(0xec)](_0x43bde3)?_0x43bde3:[])_0x2355b0[_0x1e2875][_0x434c28]=!0x0;}return{'busy':!0x1,'error':null,'label':_0x59b551['$attr'][_0x3040b0(0x12f)]?.[_0x3040b0(0x12a)]||'','name':_0x59b551[_0x3040b0(0x12b)][_0x3040b0(0x12f)]?.[_0x3040b0(0xfb)]||'','password':'','showPassword':!0x1,'expiresAt':_0x59b551[_0x3040b0(0x12b)][_0x3040b0(0x12f)]?.[_0x3040b0(0x119)]?new Date(_0x59b551['$attr'][_0x3040b0(0x12f)][_0x3040b0(0x119)])[_0x3040b0(0x121)]()[_0x3040b0(0xff)](0x0,0x10):'','catalog':null,'catalogError':!0x1,'catalogLoading':!0x1,'godMode':_0x366ec6,'selectedPerms':_0x1c5406,'grants':_0x2355b0,'collapsedScopes':{},'hoveredPerm':null,'hoveredPermOp':null,'hoveredAnchor':null,'setHover'(_0x41623a,_0x7e68fc,_0x599374){const _0x4f6286=_0x3040b0;this[_0x4f6286(0xe6)]=_0x7e68fc,this['hoveredPermOp']=_0x599374,this[_0x4f6286(0xf6)]=_0x41623a[_0x4f6286(0x127)];},'clearHover'(){const _0x2a40a1=_0x3040b0;this[_0x2a40a1(0xe6)]=null,this[_0x2a40a1(0x122)]=null,this[_0x2a40a1(0xf6)]=null;},async 'loadCatalog'(){const _0x102c9d=_0x3040b0;this[_0x102c9d(0xe4)]=!0x0;try{const _0x3d1586=await fetch(__ENV__[_0x102c9d(0xdc)]+_0x102c9d(0x12e));if(!_0x3d1586['ok'])throw new Error(_0x102c9d(0xdd));const _0x3f442a=await _0x3d1586[_0x102c9d(0xe7)]();this[_0x102c9d(0xfc)]=_0x3f442a[_0x102c9d(0xf3)]??_0x3f442a[_0x102c9d(0x105)];}catch{this[_0x102c9d(0x11c)]=!0x0;}finally{this[_0x102c9d(0xe4)]=!0x1;}},'togglePerm'(_0xcacc4f,_0x5a3988,_0x500976){const _0xad84e1=_0x3040b0;if(this[_0xad84e1(0xdb)])return;const _0x416c57=_0xcacc4f+':*';if(this['selectedPerms'][_0x416c57]){const _0x197965={...this[_0xad84e1(0x125)]};delete _0x197965[_0x416c57];for(const _0x2bbae3 of _0x500976)_0x2bbae3!==_0x5a3988&&(_0x197965[_0xcacc4f+':'+_0x2bbae3]=!0x0);this[_0xad84e1(0x125)]=_0x197965;}else this[_0xad84e1(0x125)]={...this[_0xad84e1(0x125)],[_0xcacc4f+':'+_0x5a3988]:!this[_0xad84e1(0x125)][_0xcacc4f+':'+_0x5a3988]};},'toggleNamespace'(_0x7ac75a,_0x22afdf){const _0x1e7873=_0x3040b0;if(this[_0x1e7873(0xdb)])return;const _0x1742ca=_0x7ac75a+':*',_0x354465={...this[_0x1e7873(0x125)]};if(_0x354465[_0x1742ca])delete _0x354465[_0x1742ca];else{for(const _0x374d1d of _0x22afdf)delete _0x354465[_0x7ac75a+':'+_0x374d1d];_0x354465[_0x1742ca]=!0x0;}this[_0x1e7873(0x125)]=_0x354465;},'toggleGodMode'(){const _0x4a8ff7=_0x3040b0;this[_0x4a8ff7(0xdb)]=!this[_0x4a8ff7(0xdb)],this['godMode']&&(this[_0x4a8ff7(0x125)]={});},'toggleScope'(_0x294bc8){const _0x2d01a8=_0x3040b0;this[_0x2d01a8(0xe0)]={...this['collapsedScopes'],[_0x294bc8]:!this[_0x2d01a8(0xe0)][_0x294bc8]};},'isCollapsed'(_0x5d1b4f){const _0x51f78f=_0x3040b0;return!!this[_0x51f78f(0xe0)][_0x5d1b4f];},'scopeSelectionCount'(_0x297997){const _0x2de301=_0x3040b0;let _0x5ef0b1=0x0,_0x9e0c87=0x0;for(const _0x168a3f of _0x297997[_0x2de301(0xea)])for(const _0x30c1bb of _0x168a3f[_0x2de301(0x10a)])_0x9e0c87++,(this[_0x2de301(0x125)][_0x168a3f['ns']+':'+_0x30c1bb]||this[_0x2de301(0x125)][_0x168a3f['ns']+':*'])&&_0x5ef0b1++;return _0x5ef0b1>0x0?_0x5ef0b1+'/'+_0x9e0c87:'';},'addGrantEnv'(_0x69a3f7){const _0xf6ef5f=_0x3040b0;_0x69a3f7&&!this[_0xf6ef5f(0x10e)][_0x69a3f7]&&(this[_0xf6ef5f(0x10e)]={...this[_0xf6ef5f(0x10e)],[_0x69a3f7]:{}});},'removeGrantEnv'(_0x1113d6){const _0x9be914=_0x3040b0,_0x2413b5={...this['grants']};delete _0x2413b5[_0x1113d6],this[_0x9be914(0x10e)]=_0x2413b5;},'availableGrantEnvs'(){const _0x512ba7=_0x3040b0;return this['catalog']?.[_0x512ba7(0x107)]?this[_0x512ba7(0xfc)][_0x512ba7(0x107)]['filter'](_0x228166=>!this[_0x512ba7(0x10e)][_0x228166]):[];},'getPermSections'(){const _0xd51479=_0x3040b0;if(!this['catalog']?.[_0xd51479(0xea)])return[];const _0x1dcafc=this[_0xd51479(0xfc)][_0xd51479(0xfa)]||[_0xd51479(0x112),_0xd51479(0x103),_0xd51479(0x12c),_0xd51479(0x129),_0xd51479(0x132),_0xd51479(0x114)];return[{'scope':_0xd51479(0x104),'label':'Environment'},{'scope':_0xd51479(0xf8),'label':_0xd51479(0xe1)},{'scope':'gate','label':_0xd51479(0xe3)}][_0xd51479(0xee)](_0x4a03ff=>({'scope':_0x4a03ff['scope'],'label':_0x4a03ff[_0xd51479(0x12a)],'namespaces':Object[_0xd51479(0xdf)](this[_0xd51479(0xfc)][_0xd51479(0xea)])[_0xd51479(0xd0)](([,_0x55729d])=>_0x55729d[_0xd51479(0x102)]===_0x4a03ff['scope'])[_0xd51479(0xee)](([_0x28ad6b,_0x2b6a3f])=>({'ns':_0x28ad6b,'nsLabel':_0x2b6a3f['label'],'nsDescription':_0x2b6a3f['description'],'operations':Object[_0xd51479(0xe8)](_0x2b6a3f['operations'])[_0xd51479(0xd5)]((_0x26f299,_0x2d3a85)=>{const _0x1eea10=_0xd51479,_0x2d9388=_0x1dcafc['indexOf'](_0x26f299),_0x31620c=_0x1dcafc[_0x1eea10(0xf0)](_0x2d3a85);return-0x1===_0x2d9388&&-0x1===_0x31620c?_0x26f299[_0x1eea10(0xcf)](_0x2d3a85):-0x1===_0x2d9388?0x1:-0x1===_0x31620c?-0x1:_0x2d9388-_0x31620c;}),'operationMeta':_0x2b6a3f[_0xd51479(0x10a)]}))}))[_0xd51479(0xd0)](_0x1616f7=>_0x1616f7[_0xd51479(0xea)][_0xd51479(0xe9)]>0x0);},'getPermOps'(_0x4dbe42,_0x4897b2,_0x1a1ee2){const _0x54bdeb=_0x3040b0;return _0x4897b2[_0x54bdeb(0xee)](_0x46d7fe=>{const _0x223232=_0x54bdeb,_0x3a5ca9=_0x1a1ee2?.[_0x46d7fe]||{},_0x47e589=_0x3a5ca9['routes']||[];return{'ns':_0x4dbe42,'op':_0x46d7fe,'perm':_0x4dbe42+':'+_0x46d7fe,'summary':_0x3a5ca9[_0x223232(0xce)]||'','routes':_0x47e589,'hasDestructive':_0x47e589['some'](_0x257bce=>_0x257bce['destructive']),'checked':!!this['selectedPerms'][_0x4dbe42+':'+_0x46d7fe]||!!this[_0x223232(0x125)][_0x4dbe42+':*']};});},'getImpliedBy'(_0x9ab941){const _0x356429=_0x3040b0,_0xc2e1eb=this[_0x356429(0xfc)]?.[_0x356429(0xd9)]||{};return Object[_0x356429(0xdf)](_0xc2e1eb)[_0x356429(0xd0)](([,_0x4cd238])=>_0x4cd238[_0x356429(0x11b)](_0x9ab941))[_0x356429(0xee)](([_0x3e9863])=>_0x3e9863);},'isNsAllSelected'(_0x46f2b0){const _0x2e06ee=_0x3040b0;return!!this[_0x2e06ee(0x125)][_0x46f2b0+':*'];},'isEnvAllSelected'(_0x5b63d9){return!!this['grants'][_0x5b63d9]?.['*'];},'isEnvWildInherited'(_0x1a3485){const _0x27d05e=_0x3040b0;return!this[_0x27d05e(0x126)](_0x1a3485)&&(this[_0x27d05e(0xdb)]||!!this[_0x27d05e(0x125)]['*']);},'isNsAllSelectedForGrant'(_0xe4eab4,_0x181a31){const _0x973e8a=_0x3040b0;return!!this[_0x973e8a(0x10e)][_0xe4eab4]?.['*']||!!this[_0x973e8a(0x10e)][_0xe4eab4]?.[_0x181a31+':*'];},'isNsWildInheritedForGrant'(_0x4619f8,_0x5e8ca3){const _0x18ea27=_0x3040b0;return!this[_0x18ea27(0x117)](_0x4619f8,_0x5e8ca3)&&(this['godMode']||!!this[_0x18ea27(0x125)]['*']||!!this[_0x18ea27(0x125)][_0x5e8ca3+':*']);},'toggleGrantPerm'(_0x2a4592,_0x41efbe,_0x41bc84,_0x4c56ac){const _0x1e18b6=_0x3040b0,_0x1ef98d=_0x41efbe+':'+_0x41bc84,_0x5dbc0d=_0x41efbe+':*',_0x2e28d4={...this[_0x1e18b6(0x10e)][_0x2a4592]||{}};if(_0x2e28d4['*'])delete _0x2e28d4['*'];else{if(_0x2e28d4[_0x5dbc0d]){delete _0x2e28d4[_0x5dbc0d];for(const _0x350d2e of _0x4c56ac)_0x350d2e!==_0x41bc84&&(_0x2e28d4[_0x41efbe+':'+_0x350d2e]=!0x0);}else _0x2e28d4[_0x1ef98d]=!_0x2e28d4[_0x1ef98d];}this[_0x1e18b6(0x10e)]={...this[_0x1e18b6(0x10e)],[_0x2a4592]:_0x2e28d4};},'toggleGrantNamespace'(_0x219d99,_0x5eacfd,_0x13ccd5){const _0x11a262=_0x3040b0,_0x21d44d=_0x5eacfd+':*',_0x29cf5b={...this[_0x11a262(0x10e)][_0x219d99]||{}};if(_0x29cf5b['*'])delete _0x29cf5b['*'];else{if(_0x29cf5b[_0x21d44d])delete _0x29cf5b[_0x21d44d];else{for(const _0x1f4bce of _0x13ccd5)delete _0x29cf5b[_0x1f4bce[_0x11a262(0x124)]];_0x29cf5b[_0x21d44d]=!0x0;}}this[_0x11a262(0x10e)]={...this[_0x11a262(0x10e)],[_0x219d99]:_0x29cf5b};},'toggleGrantAllPerms'(_0x42734d){const _0x252e9d=_0x3040b0,_0x5c69d4=this[_0x252e9d(0x10e)][_0x42734d]||{};if(_0x5c69d4['*']){const _0x4eac6c={..._0x5c69d4};delete _0x4eac6c['*'],this[_0x252e9d(0x10e)]={...this[_0x252e9d(0x10e)],[_0x42734d]:_0x4eac6c};}else this[_0x252e9d(0x10e)]={...this[_0x252e9d(0x10e)],[_0x42734d]:{'*':!0x0}};},'getGrantEntries'(){const _0x4c9b56=_0x3040b0;if(!this[_0x4c9b56(0xfc)]?.['namespaces'])return[];const _0x48840f=this[_0x4c9b56(0xfc)][_0x4c9b56(0xfa)]||[_0x4c9b56(0x112),_0x4c9b56(0x103),'run',_0x4c9b56(0x129),_0x4c9b56(0x132),_0x4c9b56(0x114)],_0x26d53a=Object[_0x4c9b56(0xdf)](this['catalog'][_0x4c9b56(0xea)])[_0x4c9b56(0xd0)](([,_0x36839c])=>_0x4c9b56(0x104)===_0x36839c[_0x4c9b56(0x102)])[_0x4c9b56(0xee)](([_0x5096d2,_0x326ab4])=>({'ns':_0x5096d2,'operations':Object['keys'](_0x326ab4[_0x4c9b56(0x10a)])['sort']((_0x8a93ea,_0x38acce)=>{const _0x26b3ad=_0x4c9b56,_0x6df04f=_0x48840f['indexOf'](_0x8a93ea),_0x971da8=_0x48840f['indexOf'](_0x38acce);return-0x1===_0x6df04f&&-0x1===_0x971da8?_0x8a93ea[_0x26b3ad(0xcf)](_0x38acce):-0x1===_0x6df04f?0x1:-0x1===_0x971da8?-0x1:_0x6df04f-_0x971da8;})})),_0x49b8a5=this['selectedPerms'],_0x4d6c64=this[_0x4c9b56(0xdb)];return Object[_0x4c9b56(0xdf)](this[_0x4c9b56(0x10e)])[_0x4c9b56(0xee)](([_0x18120c,_0x5b2577])=>({'env':_0x18120c,'globalCoverAll':_0x4d6c64||!!_0x49b8a5['*'],'nGroups':_0x26d53a[_0x4c9b56(0xee)](({ns:_0x5f55fa,operations:_0x5e6973})=>({'ns':_0x5f55fa,'ops':_0x5e6973[_0x4c9b56(0xee)](_0x3d10df=>{const _0x5c73db=_0x4c9b56,_0x1159d7=_0x5f55fa+':'+_0x3d10df,_0x69cb05=!!_0x5b2577[_0x1159d7]||!!_0x5b2577[_0x5f55fa+':*']||!!_0x5b2577['*'],_0x10d70c=!_0x69cb05&&(_0x4d6c64||!!_0x49b8a5['*']||!!_0x49b8a5[_0x5f55fa+':*']||!!_0x49b8a5[_0x1159d7]),_0x48b2ef=this[_0x5c73db(0xfc)][_0x5c73db(0xea)][_0x5f55fa]?.['operations']?.[_0x3d10df]||{};return{'perm':_0x1159d7,'op':_0x3d10df,'summary':_0x48b2ef[_0x5c73db(0xce)]||'','routes':_0x48b2ef[_0x5c73db(0xd8)]||[],'hasDestructive':(_0x48b2ef[_0x5c73db(0xd8)]||[])[_0x5c73db(0x11a)](_0x365a0f=>_0x365a0f[_0x5c73db(0x10b)]),'checked':_0x69cb05,'inherited':_0x10d70c};})}))}));},'validateForm'(){const _0x58311b=_0x3040b0;if(!this[_0x58311b(0x12a)][_0x58311b(0x130)]())throw new Error(_0x58311b(0xf7));return!0x0;},async 'save'(){const _0x4411db=_0x3040b0;this[_0x4411db(0xeb)]=null;try{this[_0x4411db(0xe2)](),this[_0x4411db(0x109)]=!0x0;const _0x30cb2={'label':this[_0x4411db(0x12a)][_0x4411db(0x130)]()};if(this[_0x4411db(0x119)]?_0x30cb2[_0x4411db(0x119)]=new Date(this[_0x4411db(0x119)])[_0x4411db(0xd1)]():_0x30cb2[_0x4411db(0x119)]=null,this['godMode'])_0x30cb2[_0x4411db(0x116)]=['*'];else{if(this['catalogError']&&void 0x0!==this[_0x4411db(0x125)]['_fallback']){const _0x323600=String(this[_0x4411db(0x125)]['_fallback']||'')[_0x4411db(0x111)](',')['map'](_0x8d6bb8=>_0x8d6bb8[_0x4411db(0x130)]())[_0x4411db(0xd0)](_0x1de349=>_0x1de349);_0x323600[_0x4411db(0xe9)]&&(_0x30cb2[_0x4411db(0x116)]=_0x323600);}else{const _0x1d6dbe=Object[_0x4411db(0xdf)](this[_0x4411db(0x125)])['filter'](([_0x3b5095,_0x46ad25])=>_0x46ad25&&_0x4411db(0x128)!==_0x3b5095)[_0x4411db(0xee)](([_0x5edbd5])=>_0x5edbd5);_0x1d6dbe[_0x4411db(0xe9)]&&(_0x30cb2[_0x4411db(0x116)]=_0x1d6dbe);}}const _0x201bb4={};for(const [_0x52e325,_0x41127f]of Object[_0x4411db(0xdf)](this[_0x4411db(0x10e)])){const _0x2c95e9=Object[_0x4411db(0xdf)](_0x41127f)[_0x4411db(0xd0)](([,_0x17d0b1])=>_0x17d0b1)[_0x4411db(0xee)](([_0x48568b])=>_0x48568b);_0x2c95e9[_0x4411db(0xe9)]&&(_0x201bb4[_0x52e325]=_0x2c95e9);}Object[_0x4411db(0xe8)](_0x201bb4)['length']&&(_0x30cb2[_0x4411db(0x10e)]=_0x201bb4),this[_0x4411db(0xfb)][_0x4411db(0x130)]()&&(_0x30cb2[_0x4411db(0xfb)]=this[_0x4411db(0xfb)]['trim'](),this['password']&&(_0x30cb2[_0x4411db(0x131)]=this['password']));const _0x3d2ddd=await fetch(__ENV__[_0x4411db(0x11e)]+_0x4411db(0x10d)+encodeURIComponent(_0x59b551['$attr'][_0x4411db(0x12f)]['id']),{'method':_0x4411db(0xf1),'headers':{'Content-Type':_0x4411db(0xf2)},'body':JSON['stringify'](_0x30cb2)});if(!_0x3d2ddd['ok']){const _0x3ad199=await _0x3d2ddd[_0x4411db(0xe7)]();throw new Error(_0x3ad199?.[_0x4411db(0xeb)]?.[_0x4411db(0x115)]||_0x4411db(0xef));}_0x59b551[_0x4411db(0xe5)][_0x4411db(0xd7)]?.['toast']?.[_0x4411db(0x12d)]?.(_0x4411db(0x118)),await _0x59b551[_0x4411db(0x12b)]['modal'][_0x4411db(0xd4)](),await _0x59b551['$attr'][_0x4411db(0x11d)]?.(_0x59b551[_0x4411db(0x12b)][_0x4411db(0x12f)]['id']);}catch(_0x157531){this[_0x4411db(0xeb)]=_0x157531?.[_0x4411db(0x115)]||String(_0x157531),_0x59b551[_0x4411db(0xe5)][_0x4411db(0xd7)]?.[_0x4411db(0x108)]?.[_0x4411db(0xeb)]?.(this[_0x4411db(0xeb)]);}finally{this[_0x4411db(0x109)]=!0x1;}},'cancel'(){const _0x4dad1e=_0x3040b0;_0x59b551[_0x4dad1e(0x12b)]['modal'][_0x4dad1e(0xd4)]();},'passwordStrength'(_0x4c3079){const _0x1999e8=_0x3040b0;if(!_0x4c3079)return 0x0;let _0x55fd58=0x0;return _0x4c3079['length']>=0x8&&_0x55fd58++,_0x4c3079[_0x1999e8(0xe9)]>=0xe&&_0x55fd58++,/[A-Z]/[_0x1999e8(0xda)](_0x4c3079)&&_0x55fd58++,/[0-9]/[_0x1999e8(0xda)](_0x4c3079)&&_0x55fd58++,/[^A-Za-z0-9]/[_0x1999e8(0xda)](_0x4c3079)&&_0x55fd58++,_0x55fd58;},'passwordStrengthLabel'(_0x1536fd){const _0x4eeefc=_0x3040b0,_0x1e2ae1=this['passwordStrength'](_0x1536fd);return _0x1536fd?_0x1e2ae1<=0x1?_0x4eeefc(0x10c):_0x1e2ae1<=0x3?_0x4eeefc(0xcc):_0x4eeefc(0x110):'';},'passwordStrengthColor'(_0x46053c){const _0xecc79=_0x3040b0,_0x36878a=this[_0xecc79(0x113)](_0x46053c);return _0x46053c?_0x36878a<=0x1?_0xecc79(0xcd):_0x36878a<=0x3?_0xecc79(0x120):_0xecc79(0x123):'transparent';},'toggleShowPassword'(){const _0x5d382f=_0x3040b0;this[_0x5d382f(0x10f)]=!this[_0x5d382f(0x10f)];}};},'mount'(_0x9074ea){const _0x146e0a=_0x4ad938;this[_0x146e0a(0xfd)]();},'style':_0x4ad938(0xf9),'template':_0x4ad938(0x101)};
|
|
1
|
+
const _0x46c444=_0x5647;(function(_0x417067,_0x481a78){const _0x3dd593=_0x5647,_0xd3011f=_0x417067();while(!![]){try{const _0x315fac=-parseInt(_0x3dd593(0x17c))/0x1+parseInt(_0x3dd593(0x13d))/0x2*(-parseInt(_0x3dd593(0x16f))/0x3)+-parseInt(_0x3dd593(0x15c))/0x4+parseInt(_0x3dd593(0x18a))/0x5+-parseInt(_0x3dd593(0x12d))/0x6*(-parseInt(_0x3dd593(0x155))/0x7)+-parseInt(_0x3dd593(0x151))/0x8*(-parseInt(_0x3dd593(0x169))/0x9)+parseInt(_0x3dd593(0x13f))/0xa;if(_0x315fac===_0x481a78)break;else _0xd3011f['push'](_0xd3011f['shift']());}catch(_0x58bc6b){_0xd3011f['push'](_0xd3011f['shift']());}}}(_0x1ffa,0x562ed));import _0xe4ccb0 from'@toolkit/elements/ok-icon.ok.js';import _0x3b20a6 from'@toolkit/core/ok-overlay.ok.js';import _0x22351a from'@toolkit/interaction/ok-flyover.ok.js';function _0x1ffa(){const _0x5e215a=['summary','.tf-header-fields,.tf-root,edit-token-modal{display:flex;flex-direction:column}.tf-root{gap:0;width:520px;max-width:88vw;position:relative}.tf-header-fields{gap:12px;padding-bottom:16px}.tf-field,.tf-header-row{display:flex;gap:10px}.tf-field{flex-direction:column;gap:4px;min-width:0}.tf-label{font-size:10px;color:var(--okdb-app-fg-muted);text-transform:uppercase;letter-spacing:.07em;font-weight:600}.tf-creds-section{display:flex;flex-direction:column;gap:8px;padding:10px\x2012px;border:1px\x20solid\x20var(--okdb-app-surface);border-radius:6px;background:rgba(0,0,0,.15)}.tf-creds-label{font-size:10px;color:var(--okdb-app-fg-muted);text-transform:uppercase;letter-spacing:.07em;font-weight:600}.tf-creds-hint{font-size:10px;color:var(--okdb-app-fg-subtle);line-height:1.4;margin-top:-4px}.tf-creds-row{display:flex;gap:10px}.tf-pw-wrap{position:relative;display:flex;align-items:center}.tf-pw-wrap\x20.tf-input{padding-right:30px}.tf-pw-eye{position:absolute;right:7px;background:0\x200;border:0;color:var(--okdb-app-fg-subtle);cursor:pointer;font-size:12px;padding:0;line-height:1;user-select:none}.tf-pw-eye:hover,.tf-scope-header:hover\x20.tf-scope-name{color:var(--okdb-accent-muted)}.tf-strength-bar{height:2px;border-radius:1px;background:var(--okdb-app-surface);margin-top:3px;overflow:hidden}.tf-strength-fill{height:100%;border-radius:1px;transition:width\x20.2s,background-color\x20.2s}.tf-strength-text{font-size:9px;margin-top:2px;text-transform:uppercase;letter-spacing:.05em}.tf-input{padding:6px\x208px;border:1px\x20solid\x20var(--okdb-app-surface-2);border-radius:4px;background:0\x200;color:var(--okdb-app-fg-strong);font-size:12px;font-family:monospace;width:100%;box-sizing:border-box}.tf-input:focus{outline:0;border-color:rgba(79,193,255,.4)}.tf-hint{font-size:10px;color:var(--okdb-app-fg-subtle);line-height:1.4}.tf-divider{height:1px;background:var(--okdb-app-surface);margin-bottom:12px}.tf-section{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}.tf-scope-header{display:flex;align-items:center;gap:8px;cursor:pointer;user-select:none;padding:2px\x200}.tf-scope-name{font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:var(--okdb-app-fg-muted);font-weight:600;transition:color\x20.1s}.tf-scope-count{font-size:10px;color:var(--okdb-accent);opacity:.8}.tf-scope-chevron{margin-left:auto;font-size:10px;color:var(--okdb-app-fg-subtle)}.tf-ns-block{display:flex;flex-direction:column;gap:4px;margin-bottom:8px}.tf-ns-row{display:flex;align-items:baseline;gap:8px}.tf-ns-label{font-size:11px;color:var(--okdb-app-fg-subtle);font-family:monospace;flex-shrink:0;cursor:pointer;user-select:none;transition:color\x20.1s;font-weight:600}.tf-ns-label:hover{color:var(--okdb-accent-muted)}.tf-ns-label--on{color:var(--okdb-accent)}.tf-ns-desc{font-size:10px;color:var(--okdb-app-fg-subtle);line-height:1.4}.tf-pills{display:flex;flex-wrap:wrap;gap:4px;padding-left:4px}.tf-pill-wrap{display:inline-flex}.tf-pill-warn{font-size:7px;color:rgba(215,150,60,.85);vertical-align:super;margin-left:1px;line-height:0}.tf-pill--destructive{border-color:rgba(200,140,60,.35)}.tf-pill--destructive:hover{border-color:rgba(200,140,60,.6)}.tf-pill{display:inline-flex;align-items:center;padding:2px\x208px;border-radius:4px;font-size:11px;font-family:monospace;border:1px\x20solid\x20var(--okdb-app-surface-2);color:var(--okdb-app-fg-subtle);cursor:pointer;user-select:none;transition:background\x20.1s,border-color\x20.1s,color\x20.1s;white-space:nowrap}.tf-pill:hover{border-color:var(--okdb-app-border);color:var(--okdb-accent-muted)}.tf-pill--on{background:rgba(79,193,255,.1);border-color:rgba(79,193,255,.35);color:var(--okdb-accent)}.tf-pill--on:hover{background:rgba(79,193,255,.15)}.tf-pill--full{border-color:rgba(251,191,36,.2);color:#5a4a20}.tf-pill--full-on,.tf-pill--full:hover{border-color:rgba(251,191,36,.4);color:var(--okdb-warning-text)}.tf-pill--full-on{background:rgba(251,191,36,.1)}.tf-pill--full-on:hover{background:rgba(251,191,36,.16)}.tf-pill--add{border-style:dashed;border-color:var(--okdb-app-surface-2);color:var(--okdb-app-fg-subtle)}.tf-pill--add:hover{border-color:var(--okdb-app-border);color:var(--okdb-accent-muted);border-style:solid}.tf-pill--wild{border-color:rgba(251,191,36,.2);color:#5a4a20;font-weight:700}.tf-pill--wild-on,.tf-pill--wild:hover{border-color:rgba(251,191,36,.4);color:var(--okdb-warning-text)}.tf-pill--wild-on{background:rgba(251,191,36,.1);font-weight:700}.tf-pill--wild-on:hover{background:rgba(251,191,36,.16)}.tf-pill--wild-inherited{border-style:dashed;border-color:rgba(251,191,36,.45);color:rgba(251,191,36,.6);background:rgba(251,191,36,.05);font-weight:700}.tf-pill--wild-inherited:hover{border-color:rgba(251,191,36,.65);color:rgba(251,191,36,.8);background:rgba(251,191,36,.09)}.tf-pill--inherited{border-style:dashed;border-color:rgba(79,193,255,.5);color:rgba(79,193,255,.65);background:rgba(79,193,255,.06)}.tf-pill--inherited:hover{border-color:rgba(79,193,255,.7);color:rgba(79,193,255,.85);background:rgba(79,193,255,.1)}.tf-env-row{display:flex;flex-direction:column;gap:6px;padding:8px\x200\x2010px;border-top:1px\x20solid\x20var(--okdb-app-bg)}.tf-env-row-header{display:flex;align-items:center;justify-content:space-between}.tf-env-name{font-size:11px;font-weight:600;color:var(--okdb-app-fg-muted);font-family:monospace}.tf-env-all,.tf-env-remove{font-size:10px;color:var(--okdb-app-fg-subtle);cursor:pointer;user-select:none;padding:1px\x204px;transition:color\x20.1s}.tf-env-remove:hover{color:var(--okdb-danger)}.tf-env-all:hover{color:var(--okdb-accent-muted)}.tf-env-all--on{color:var(--okdb-warning-text)}.tf-env-all--on:hover{color:var(--okdb-warning)}.tf-error{font-size:11px;color:var(--okdb-danger);padding:6px\x200\x200}.tf-actions{display:flex;gap:8px;justify-content:flex-end;padding-top:14px;margin-top:4px;border-top:1px\x20solid\x20var(--okdb-app-surface)}.tf-btn{padding:5px\x2012px;border-radius:5px;font-size:12px;border:1px\x20solid;background:0\x200;cursor:pointer;transition:background\x20.12s,color\x20.12s}.tf-btn:disabled{opacity:.4;cursor:not-allowed}.tf-btn--primary{border-color:var(--okdb-app-border);color:var(--okdb-accent-muted)}.tf-btn--primary:not(:disabled):hover{background:var(--okdb-app-surface);border-color:var(--okdb-app-border);color:var(--okdb-sky)}.tf-btn--secondary{border-color:var(--okdb-app-surface-2);color:var(--okdb-app-fg-subtle)}.tf-btn--secondary:hover{background:var(--okdb-app-bg)}.tf-pip{min-width:260px;max-width:460px;background:var(--okdb-app-bg-deep);border:1px\x20solid\x20var(--okdb-app-surface-2);border-radius:5px;padding:8px\x2010px;box-shadow:0\x204px\x2018px\x20rgba(0,0,0,.75);pointer-events:none;white-space:normal;font-size:11px}.tf-pip-perm{font-family:monospace;font-size:10px;color:var(--okdb-accent);margin-bottom:3px}.tf-pip-summary{color:var(--okdb-accent-muted);line-height:1.4;margin-bottom:5px}.tf-pip-routes-hd{font-size:9px;color:var(--okdb-app-fg-subtle);text-transform:uppercase;letter-spacing:.06em;margin-bottom:3px}.tf-pip-route{display:flex;align-items:baseline;gap:5px;padding:1px\x200}.tf-pip-method{font-family:monospace;font-size:9px;color:var(--okdb-accent);width:34px;flex-shrink:0}.tf-pip-path{font-family:monospace;font-size:10px;color:var(--okdb-accent-muted);word-break:break-all}.tf-pip-bd,.tf-pip-lr{font-size:8px;border-radius:2px;padding:0\x203px;flex-shrink:0}.tf-pip-bd{color:var(--okdb-danger);background:rgba(180,50,40,.15)}.tf-pip-lr{color:var(--okdb-app-fg-muted);background:rgba(100,100,100,.12)}.tf-pip-route-desc{font-size:9px;color:var(--okdb-app-fg-subtle);padding-left:39px;margin-bottom:1px}.tf-pip-gate,.tf-pip-implied{color:var(--okdb-app-fg-subtle);font-size:10px}.tf-pip-implied{margin-top:5px;font-size:9px;font-family:monospace}','destructive','$attr','weak','stringify','work','description','name','627289LDdUXJ','loadCatalog','catalogError','token','godMode','env','data','application/json','perm','var(--okdb-danger)','getTime','includes','shared','isEnvAllSelected','2001420NRLhFV','routes','Environment','map','458586klaJQi','var(--okdb-warning)','Gate','success','system','transparent','/auth/permissions','permissions','split','operations','isNsAllSelectedForGrant','$ok','entries','localeCompare','keys','sort','2wLCENc','var(--okdb-success)','10486920hwSeVY','password','close','implies','expiresAt','ADMIN_API','some','PATCH','catalogLoading','hoveredPerm','catalog','message','passwordStrength','namespaces','opOrder','_fallback','scope','Token\x20updated','32QkYUEY','selectedPerms','slice','fair','7UqXkQR','run','write','label','/auth/tokens/','hoveredAnchor','API','399296maiWkB','Token\x20label\x20is\x20required','error','toast','envs','<div\x20class=\x22tf-root\x22><if\x20:=\x22busy\x22><ok-overlay><div\x20class=\x22loader-center\x22><ok-icon\x20name=\x22loader\x22\x20class=\x22spin\x22\x20style=\x22width:28px;height:28px;\x22/></div></ok-overlay></if><div\x20class=\x22tf-header-fields\x22><div\x20class=\x22tf-header-row\x22><div\x20class=\x22tf-field\x22\x20style=\x22flex:2;\x22><span\x20class=\x22tf-label\x22>Label</span>\x20<input\x20class=\x22tf-input\x22\x20type=\x22text\x22\x20placeholder=\x22e.g.,\x20API\x20Client\x22\x20:value=\x22label\x22\x20@input=\x22label\x20=\x20$el.value\x22\x20:disabled=\x22busy\x22></div><div\x20class=\x22tf-field\x22\x20style=\x22flex:1.5;\x22><span\x20class=\x22tf-label\x22>Expires\x20<span\x20style=\x22opacity:.4;\x22>(optional)</span></span>\x20<input\x20class=\x22tf-input\x22\x20type=\x22datetime-local\x22\x20:value=\x22expiresAt\x22\x20@input=\x22expiresAt\x20=\x20$el.value\x22\x20:disabled=\x22busy\x22></div></div><div\x20class=\x22tf-creds-section\x22><div><div\x20class=\x22tf-creds-label\x22>Login\x20credentials\x20<span\x20style=\x22opacity:.4;\x20text-transform:none;\x20font-weight:400;\x20letter-spacing:0;\x22>(optional)</span></div><div\x20class=\x22tf-creds-hint\x22>If\x20set,\x20this\x20token\x20can\x20also\x20be\x20used\x20via\x20username\x20+\x20password\x20authentication.</div></div><div\x20class=\x22tf-creds-row\x22><div\x20class=\x22tf-field\x22\x20style=\x22flex:1;\x22><span\x20class=\x22tf-label\x22>Username</span>\x20<input\x20class=\x22tf-input\x22\x20type=\x22text\x22\x20placeholder=\x22leave\x20blank\x20for\x20token-only\x22\x20:value=\x22name\x22\x20@input=\x22name\x20=\x20$el.value\x22\x20:disabled=\x22busy\x22\x20autocomplete=\x22off\x22></div><div\x20class=\x22tf-field\x22\x20style=\x22flex:1;\x22><span\x20class=\x22tf-label\x22>Password\x20<span\x20style=\x22opacity:.4;\x22>(new)</span></span><div\x20class=\x22tf-pw-wrap\x22><input\x20class=\x22tf-input\x22\x20:type=\x22showPassword\x20?\x20\x27text\x27\x20:\x20\x27password\x27\x22\x20placeholder=\x22leave\x20blank\x20to\x20keep\x22\x20:value=\x22password\x22\x20@input=\x22password\x20=\x20$el.value\x22\x20:disabled=\x22busy\x20||\x20!name\x22\x20autocomplete=\x22new-password\x22>\x20<button\x20class=\x22tf-pw-eye\x22\x20@click=\x22toggleShowPassword()\x22\x20type=\x22button\x22\x20tabindex=\x22-1\x22>{{\x20showPassword\x20?\x20\x27🙈\x27\x20:\x20\x27👁\x27\x20}}</button></div><if\x20:=\x22password\x22><div\x20class=\x22tf-strength-bar\x22><div\x20class=\x22tf-strength-fill\x22\x20:style=\x22\x27width:\x27\x20+\x20(passwordStrength(password)/5*100)\x20+\x20\x27%;\x20background:\x27\x20+\x20passwordStrengthColor(password)\x22/></div><div\x20class=\x22tf-strength-text\x22\x20:style=\x22\x27color:\x27\x20+\x20passwordStrengthColor(password)\x22>{{\x20passwordStrengthLabel(password)\x20}}</div></if></div></div></div></div><div\x20class=\x22tf-divider\x22/><if\x20:=\x22catalogLoading\x22><div\x20class=\x22tf-hint\x22\x20style=\x22padding-bottom:12px;\x22>Loading\x20permissions…</div></if><if\x20:=\x22catalogError\x20&&\x20!catalogLoading\x22><div\x20class=\x22tf-section\x22><span\x20class=\x22tf-label\x22>Permissions\x20<span\x20style=\x22color:var(--okdb-danger);\x22>(fallback)</span></span>\x20<input\x20class=\x22tf-input\x22\x20type=\x22text\x22\x20placeholder=\x22data:read,\x20data:write\x22\x20:value=\x22selectedPerms._fallback\x20||\x20\x27\x27\x22\x20@input=\x22selectedPerms\x20=\x20{\x20_fallback:\x20$el.value\x20}\x22\x20:disabled=\x22busy\x22>\x20<span\x20class=\x22tf-hint\x22>Comma-separated\x20permission\x20strings</span></div></if><if\x20:=\x22catalog\x20&&\x20!catalogError\x20&&\x20!catalogLoading\x22><div\x20class=\x22tf-section\x22\x20style=\x22gap:4px;\x22><div\x20:class=\x22[\x27tf-pill\x27,\x20\x27tf-pill--full\x27,\x20godMode\x20?\x20\x27tf-pill--full-on\x27\x20:\x20\x27\x27]\x22\x20@click=\x22toggleGodMode()\x22\x20style=\x22width:fit-content;\x22>★\x20 Full\x20access\x20—\x20all\x20permissions</div></div><if\x20:=\x22!godMode\x22><each\x20:of=\x22getPermSections()\x22\x20let:item=\x22section\x22><div\x20class=\x22tf-section\x22><div\x20class=\x22tf-scope-header\x22\x20@click=\x22toggleScope(section.scope)\x22><span\x20class=\x22tf-scope-name\x22>{{\x20section.label\x20}}</span><if\x20:=\x22scopeSelectionCount(section)\x22><span\x20class=\x22tf-scope-count\x22>{{\x20scopeSelectionCount(section)\x20}}</span></if><span\x20class=\x22tf-scope-chevron\x22>{{\x20isCollapsed(section.scope)\x20?\x20\x27▸\x27\x20:\x20\x27▾\x27\x20}}</span></div><if\x20:=\x22!isCollapsed(section.scope)\x22><each\x20:of=\x22section.namespaces\x22\x20let:item=\x22nsEntry\x22><div\x20class=\x22tf-ns-block\x22><div\x20class=\x22tf-ns-row\x22><span\x20:class=\x22[\x27tf-ns-label\x27,\x20isNsAllSelected(nsEntry.ns)\x20?\x20\x27tf-ns-label--on\x27\x20:\x20\x27\x27]\x22\x20@click=\x22toggleNamespace(nsEntry.ns,\x20nsEntry.operations)\x22\x20title=\x22Toggle\x20all\x22>{{\x20nsEntry.nsLabel\x20||\x20nsEntry.ns\x20}}</span><if\x20:=\x22nsEntry.nsDescription\x22><span\x20class=\x22tf-ns-desc\x22>{{\x20nsEntry.nsDescription\x20}}</span></if></div><div\x20class=\x22tf-pills\x22><span\x20:class=\x22[\x27tf-pill\x27,\x20\x27tf-pill--wild\x27,\x20isNsAllSelected(nsEntry.ns)\x20?\x20\x27tf-pill--wild-on\x27\x20:\x20\x27\x27]\x22\x20@click=\x22toggleNamespace(nsEntry.ns,\x20nsEntry.operations)\x22\x20title=\x22ns:*\x20—\x20toggle\x20all\x22>*</span><each\x20:of=\x22getPermOps(nsEntry.ns,\x20nsEntry.operations,\x20nsEntry.operationMeta)\x22\x20let:item=\x22permOp\x22><span\x20class=\x22tf-pill-wrap\x22\x20@mouseenter=\x22setHover($event,\x20permOp.perm,\x20permOp)\x22\x20@mouseleave=\x22clearHover()\x22><span\x20:class=\x22[\x27tf-pill\x27,\x20permOp.checked\x20?\x20\x27tf-pill--on\x27\x20:\x20\x27\x27,\x20permOp.hasDestructive\x20?\x20\x27tf-pill--destructive\x27\x20:\x20\x27\x27]\x22\x20@click=\x22togglePerm(permOp.ns,\x20permOp.op,\x20nsEntry.operations)\x22>{{\x20permOp.op\x20}}<if\x20:=\x22permOp.hasDestructive\x22><span\x20class=\x22tf-pill-warn\x22>⚠</span></if></span></span></each></div></div></each></if></div></each><if\x20:=\x22catalog.envs\x20&&\x20catalog.envs.length\x20>\x200\x22><div\x20class=\x22tf-divider\x22/><div\x20class=\x22tf-section\x22\x20style=\x22gap:8px;\x22><div\x20class=\x22tf-scope-header\x22\x20style=\x22cursor:default;\x20pointer-events:none;\x22><span\x20class=\x22tf-scope-name\x22>Per-env\x20grants</span>\x20<span\x20class=\x22tf-hint\x22\x20style=\x22margin-left:6px;\x22>extra\x20permissions\x20for\x20a\x20specific\x20environment</span></div><if\x20:=\x22availableGrantEnvs().length\x20>\x200\x22><div\x20class=\x22tf-pills\x22><each\x20:of=\x22availableGrantEnvs()\x22\x20let:item=\x22envName\x22><span\x20class=\x22tf-pill\x20tf-pill--add\x22\x20@click=\x22addGrantEnv(envName)\x22>+\x20{{\x20envName\x20}}</span></each></div></if><each\x20:of=\x22getGrantEntries()\x22\x20let:item=\x22grantEntry\x22><div\x20class=\x22tf-env-row\x22><div\x20class=\x22tf-env-row-header\x22><div\x20style=\x22display:flex;\x20align-items:center;\x20gap:6px;\x22><span\x20class=\x22tf-env-name\x22>{{\x20grantEntry.env\x20}}</span>\x20<span\x20:class=\x22[\x27tf-pill\x27,\x20\x27tf-pill--wild\x27,\x20isEnvAllSelected(grantEntry.env)\x20?\x20\x27tf-pill--wild-on\x27\x20:\x20isEnvWildInherited(grantEntry.env)\x20?\x20\x27tf-pill--wild-inherited\x27\x20:\x20\x27\x27]\x22\x20@click=\x22toggleGrantAllPerms(grantEntry.env)\x22\x20title=\x22*\x20—\x20all\x20permissions\x20for\x20this\x20env\x22\x20style=\x22font-size:11px;\x20padding:1px\x206px;\x22>*</span><if\x20:=\x22grantEntry.globalCoverAll\x22><span\x20class=\x22tf-hint\x22\x20style=\x22color:rgba(79,193,255,.35);\x22\x20title=\x22All\x20permissions\x20already\x20covered\x20by\x20global\x20*\x20or\x20god\x20mode\x22>inherited</span></if></div><span\x20class=\x22tf-env-remove\x22\x20@click=\x22removeGrantEnv(grantEntry.env)\x22>✕\x20remove</span></div><each\x20:of=\x22grantEntry.nGroups\x22\x20let:item=\x22nsGroup\x22><div\x20class=\x22tf-ns-row\x22><span\x20:class=\x22[\x27tf-ns-label\x27,\x20isNsAllSelectedForGrant(grantEntry.env,\x20nsGroup.ns)\x20?\x20\x27tf-ns-label--on\x27\x20:\x20\x27\x27]\x22\x20@click=\x22toggleGrantNamespace(grantEntry.env,\x20nsGroup.ns,\x20nsGroup.ops)\x22\x20title=\x22Toggle\x20all\x22>{{\x20nsGroup.ns\x20}}</span><div\x20class=\x22tf-pills\x22><span\x20:class=\x22[\x27tf-pill\x27,\x20\x27tf-pill--wild\x27,\x20isNsAllSelectedForGrant(grantEntry.env,\x20nsGroup.ns)\x20?\x20\x27tf-pill--wild-on\x27\x20:\x20isNsWildInheritedForGrant(grantEntry.env,\x20nsGroup.ns)\x20?\x20\x27tf-pill--wild-inherited\x27\x20:\x20\x27\x27]\x22\x20@click=\x22toggleGrantNamespace(grantEntry.env,\x20nsGroup.ns,\x20nsGroup.ops)\x22\x20title=\x22ns:*\x20—\x20toggle\x20all\x22>*</span><each\x20:of=\x22nsGroup.ops\x22\x20let:item=\x22grantPerm\x22><span\x20class=\x22tf-pill-wrap\x22\x20@mouseenter=\x22setHover($event,\x20grantPerm.perm,\x20grantPerm)\x22\x20@mouseleave=\x22clearHover()\x22><span\x20:class=\x22[\x27tf-pill\x27,\x20grantPerm.checked\x20?\x20\x27tf-pill--on\x27\x20:\x20grantPerm.inherited\x20?\x20\x27tf-pill--inherited\x27\x20:\x20\x27\x27,\x20grantPerm.hasDestructive\x20?\x20\x27tf-pill--destructive\x27\x20:\x20\x27\x27]\x22\x20@click=\x22toggleGrantPerm(grantEntry.env,\x20nsGroup.ns,\x20grantPerm.op,\x20nsGroup.ops.map(o\x20=>\x20o.op))\x22>{{\x20grantPerm.op\x20}}<if\x20:=\x22grantPerm.hasDestructive\x22><span\x20class=\x22tf-pill-warn\x22>⚠</span></if></span></span></each></div></div></each></div></each></div></if></if></if><if\x20:=\x22error\x22><div\x20class=\x22tf-error\x22>{{\x20error\x20}}</div></if><div\x20class=\x22tf-actions\x22><button\x20class=\x22tf-btn\x20tf-btn--secondary\x22\x20@click=\x22cancel()\x22\x20:disabled=\x22busy\x22>Cancel</button>\x20<button\x20class=\x22tf-btn\x20tf-btn--primary\x22\x20@click=\x22save()\x22\x20:disabled=\x22busy\x20||\x20!label.trim()\x22>Save\x20Changes</button></div><ok-flyover\x20:open=\x22hoveredPermOp\x20!=\x20null\x22\x20:anchor=\x22hoveredAnchor\x22\x20placement=\x22bottom-start\x22\x20:gap=\x224\x22\x20style=\x22--ok-flyover-bg:transparent;\x20--ok-flyover-border:none;\x20--ok-flyover-shadow:none;\x20--ok-flyover-radius:0;\x22><if\x20:=\x22hoveredPermOp\x22><div\x20class=\x22tf-pip\x22><div\x20class=\x22tf-pip-perm\x22>{{\x20hoveredPermOp.perm\x20||\x20hoveredPerm\x20}}</div><if\x20:=\x22hoveredPermOp.summary\x22><div\x20class=\x22tf-pip-summary\x22>{{\x20hoveredPermOp.summary\x20}}</div></if><if\x20:=\x22hoveredPermOp.routes\x20&&\x20hoveredPermOp.routes.length\x22><div\x20class=\x22tf-pip-routes-hd\x22>Routes\x20({{\x20hoveredPermOp.routes.length\x20}})</div><each\x20:of=\x22hoveredPermOp.routes\x22\x20let:item=\x22r\x22><div\x20class=\x22tf-pip-route\x22><span\x20class=\x22tf-pip-method\x22>{{\x20r.method\x20}}</span>\x20<span\x20class=\x22tf-pip-path\x22>{{\x20r.path\x20}}</span><if\x20:=\x22r.destructive\x22><span\x20class=\x22tf-pip-bd\x22>destructive</span></if><if\x20:=\x22r.longRunning\x22><span\x20class=\x22tf-pip-lr\x22>long</span></if></div><if\x20:=\x22r.summary\x22><div\x20class=\x22tf-pip-route-desc\x22>{{\x20r.summary\x20}}</div></if></each></if><if\x20:=\x22!(hoveredPermOp.routes\x20&&\x20hoveredPermOp.routes.length)\x22><div\x20class=\x22tf-pip-gate\x22>Gate\x20—\x20combine\x20with\x20underlying\x20namespace\x20permissions.</div></if><if\x20:=\x22getImpliedBy(hoveredPerm).length\x22><div\x20class=\x22tf-pip-implied\x22>Implied\x20by:\x20{{\x20getImpliedBy(hoveredPerm).join(\x27,\x20\x27)\x20}}</div></if></div></if></ok-flyover></div>','length','grants','result','modal','isArray','filter','showPassword','546543ogJwfg','hoveredPermOp','test','trim','collapsedScopes','busy','2064591FZWXbn','indexOf','json','read'];_0x1ffa=function(){return _0x5e215a;};return _0x1ffa();}function _0x5647(_0x2b988f,_0x1bee3d){_0x2b988f=_0x2b988f-0x12d;const _0x1ffa46=_0x1ffa();let _0x5647c0=_0x1ffa46[_0x2b988f];return _0x5647c0;}export default{'tag':'edit-token-modal','dependencies':[_0x3b20a6,_0xe4ccb0,_0x22351a],'attr':{'modal':{},'token':{},'onDone':{}},'context'(_0x588ef3){const _0x33d05d=_0x5647,_0xc61f2=_0x588ef3[_0x33d05d(0x176)][_0x33d05d(0x17f)]?.[_0x33d05d(0x134)]||[],_0x54d20e=_0xc61f2['includes']('*'),_0xb80ca5={};if(!_0x54d20e){for(const _0x1f4fb0 of _0xc61f2)_0xb80ca5[_0x1f4fb0]=!0x0;}const _0x4c5a16={},_0x327e08=_0x588ef3[_0x33d05d(0x176)][_0x33d05d(0x17f)]?.['grants']||{};for(const [_0x27f494,_0x4e0332]of Object[_0x33d05d(0x139)](_0x327e08)){_0x4c5a16[_0x27f494]={};for(const _0x1b8553 of Array[_0x33d05d(0x166)](_0x4e0332)?_0x4e0332:[])_0x4c5a16[_0x27f494][_0x1b8553]=!0x0;}return{'busy':!0x1,'error':null,'label':_0x588ef3['$attr'][_0x33d05d(0x17f)]?.[_0x33d05d(0x158)]||'','name':_0x588ef3[_0x33d05d(0x176)][_0x33d05d(0x17f)]?.['name']||'','password':'','showPassword':!0x1,'expiresAt':_0x588ef3[_0x33d05d(0x176)][_0x33d05d(0x17f)]?.[_0x33d05d(0x143)]?new Date(_0x588ef3[_0x33d05d(0x176)][_0x33d05d(0x17f)][_0x33d05d(0x143)])['toISOString']()[_0x33d05d(0x153)](0x0,0x10):'','catalog':null,'catalogError':!0x1,'catalogLoading':!0x1,'godMode':_0x54d20e,'selectedPerms':_0xb80ca5,'grants':_0x4c5a16,'collapsedScopes':{},'hoveredPerm':null,'hoveredPermOp':null,'hoveredAnchor':null,'setHover'(_0x1c3a16,_0x5a698a,_0x29f3cc){const _0x1d70ab=_0x33d05d;this[_0x1d70ab(0x148)]=_0x5a698a,this[_0x1d70ab(0x16a)]=_0x29f3cc,this[_0x1d70ab(0x15a)]=_0x1c3a16['currentTarget'];},'clearHover'(){const _0x4d6cc5=_0x33d05d;this[_0x4d6cc5(0x148)]=null,this['hoveredPermOp']=null,this[_0x4d6cc5(0x15a)]=null;},async 'loadCatalog'(){const _0x49652f=_0x33d05d;this[_0x49652f(0x147)]=!0x0;try{const _0x4f87b2=await fetch(__ENV__[_0x49652f(0x144)]+_0x49652f(0x133));if(!_0x4f87b2['ok'])throw new Error('Failed');const _0x14b631=await _0x4f87b2['json']();this['catalog']=_0x14b631[_0x49652f(0x182)]??_0x14b631[_0x49652f(0x164)];}catch{this['catalogError']=!0x0;}finally{this[_0x49652f(0x147)]=!0x1;}},'togglePerm'(_0x51b48d,_0x4df8f4,_0x18ff3f){const _0xdc42d1=_0x33d05d;if(this[_0xdc42d1(0x180)])return;const _0x54893e=_0x51b48d+':*';if(this[_0xdc42d1(0x152)][_0x54893e]){const _0x4b19e6={...this[_0xdc42d1(0x152)]};delete _0x4b19e6[_0x54893e];for(const _0x1f4f58 of _0x18ff3f)_0x1f4f58!==_0x4df8f4&&(_0x4b19e6[_0x51b48d+':'+_0x1f4f58]=!0x0);this[_0xdc42d1(0x152)]=_0x4b19e6;}else this[_0xdc42d1(0x152)]={...this[_0xdc42d1(0x152)],[_0x51b48d+':'+_0x4df8f4]:!this[_0xdc42d1(0x152)][_0x51b48d+':'+_0x4df8f4]};},'toggleNamespace'(_0x2bfc55,_0x25e231){const _0x2936ca=_0x33d05d;if(this[_0x2936ca(0x180)])return;const _0x5899df=_0x2bfc55+':*',_0x33da9b={...this[_0x2936ca(0x152)]};if(_0x33da9b[_0x5899df])delete _0x33da9b[_0x5899df];else{for(const _0x234320 of _0x25e231)delete _0x33da9b[_0x2bfc55+':'+_0x234320];_0x33da9b[_0x5899df]=!0x0;}this[_0x2936ca(0x152)]=_0x33da9b;},'toggleGodMode'(){const _0x3f3303=_0x33d05d;this['godMode']=!this[_0x3f3303(0x180)],this['godMode']&&(this['selectedPerms']={});},'toggleScope'(_0x1eb3cf){const _0x22caec=_0x33d05d;this[_0x22caec(0x16d)]={...this[_0x22caec(0x16d)],[_0x1eb3cf]:!this[_0x22caec(0x16d)][_0x1eb3cf]};},'isCollapsed'(_0x450e3e){const _0x22e526=_0x33d05d;return!!this[_0x22e526(0x16d)][_0x450e3e];},'scopeSelectionCount'(_0x45d56f){const _0xe380c5=_0x33d05d;let _0x1d8e5b=0x0,_0x85bbb3=0x0;for(const _0x1c0749 of _0x45d56f[_0xe380c5(0x14c)])for(const _0x249472 of _0x1c0749[_0xe380c5(0x136)])_0x85bbb3++,(this[_0xe380c5(0x152)][_0x1c0749['ns']+':'+_0x249472]||this[_0xe380c5(0x152)][_0x1c0749['ns']+':*'])&&_0x1d8e5b++;return _0x1d8e5b>0x0?_0x1d8e5b+'/'+_0x85bbb3:'';},'addGrantEnv'(_0x2c9395){const _0x27c314=_0x33d05d;_0x2c9395&&!this[_0x27c314(0x163)][_0x2c9395]&&(this[_0x27c314(0x163)]={...this['grants'],[_0x2c9395]:{}});},'removeGrantEnv'(_0x37014e){const _0x460c79=_0x33d05d,_0x979916={...this[_0x460c79(0x163)]};delete _0x979916[_0x37014e],this[_0x460c79(0x163)]=_0x979916;},'availableGrantEnvs'(){const _0xb5af5d=_0x33d05d;return this[_0xb5af5d(0x149)]?.[_0xb5af5d(0x160)]?this[_0xb5af5d(0x149)][_0xb5af5d(0x160)][_0xb5af5d(0x167)](_0x140138=>!this[_0xb5af5d(0x163)][_0x140138]):[];},'getPermSections'(){const _0x12cb73=_0x33d05d;if(!this[_0x12cb73(0x149)]?.[_0x12cb73(0x14c)])return[];const _0x5a1d55=this[_0x12cb73(0x149)]['opOrder']||[_0x12cb73(0x172),'query',_0x12cb73(0x156),_0x12cb73(0x157),'work','peer'];return[{'scope':'env','label':_0x12cb73(0x18c)},{'scope':_0x12cb73(0x131),'label':'System'},{'scope':'gate','label':_0x12cb73(0x12f)}][_0x12cb73(0x18d)](_0x1406ab=>({'scope':_0x1406ab[_0x12cb73(0x14f)],'label':_0x1406ab['label'],'namespaces':Object[_0x12cb73(0x139)](this[_0x12cb73(0x149)][_0x12cb73(0x14c)])[_0x12cb73(0x167)](([,_0x242f0a])=>_0x242f0a[_0x12cb73(0x14f)]===_0x1406ab['scope'])[_0x12cb73(0x18d)](([_0x5f9e85,_0x481d1e])=>({'ns':_0x5f9e85,'nsLabel':_0x481d1e['label'],'nsDescription':_0x481d1e[_0x12cb73(0x17a)],'operations':Object[_0x12cb73(0x13b)](_0x481d1e['operations'])[_0x12cb73(0x13c)]((_0x36aaa1,_0x2d161f)=>{const _0x3bda6b=_0x12cb73,_0x24fc35=_0x5a1d55[_0x3bda6b(0x170)](_0x36aaa1),_0x14d39f=_0x5a1d55['indexOf'](_0x2d161f);return-0x1===_0x24fc35&&-0x1===_0x14d39f?_0x36aaa1[_0x3bda6b(0x13a)](_0x2d161f):-0x1===_0x24fc35?0x1:-0x1===_0x14d39f?-0x1:_0x24fc35-_0x14d39f;}),'operationMeta':_0x481d1e['operations']}))}))[_0x12cb73(0x167)](_0x3b0f82=>_0x3b0f82[_0x12cb73(0x14c)]['length']>0x0);},'getPermOps'(_0x2f3ad7,_0xd243a3,_0x3ccb5d){const _0x5decf3=_0x33d05d;return _0xd243a3[_0x5decf3(0x18d)](_0x49b052=>{const _0x4f096a=_0x5decf3,_0x32fdae=_0x3ccb5d?.[_0x49b052]||{},_0x19f0c8=_0x32fdae['routes']||[];return{'ns':_0x2f3ad7,'op':_0x49b052,'perm':_0x2f3ad7+':'+_0x49b052,'summary':_0x32fdae[_0x4f096a(0x173)]||'','routes':_0x19f0c8,'hasDestructive':_0x19f0c8[_0x4f096a(0x145)](_0x56eb16=>_0x56eb16['destructive']),'checked':!!this[_0x4f096a(0x152)][_0x2f3ad7+':'+_0x49b052]||!!this[_0x4f096a(0x152)][_0x2f3ad7+':*']};});},'getImpliedBy'(_0x4e1860){const _0x209dbe=_0x33d05d,_0x371011=this[_0x209dbe(0x149)]?.[_0x209dbe(0x142)]||{};return Object[_0x209dbe(0x139)](_0x371011)['filter'](([,_0x3f630a])=>_0x3f630a[_0x209dbe(0x187)](_0x4e1860))[_0x209dbe(0x18d)](([_0xcb6ce1])=>_0xcb6ce1);},'isNsAllSelected'(_0x1ffa5c){const _0x1413f7=_0x33d05d;return!!this[_0x1413f7(0x152)][_0x1ffa5c+':*'];},'isEnvAllSelected'(_0x2bc8cc){return!!this['grants'][_0x2bc8cc]?.['*'];},'isEnvWildInherited'(_0x385393){const _0xc64389=_0x33d05d;return!this[_0xc64389(0x189)](_0x385393)&&(this['godMode']||!!this[_0xc64389(0x152)]['*']);},'isNsAllSelectedForGrant'(_0x50ebfe,_0x3f1858){const _0x2a5088=_0x33d05d;return!!this[_0x2a5088(0x163)][_0x50ebfe]?.['*']||!!this[_0x2a5088(0x163)][_0x50ebfe]?.[_0x3f1858+':*'];},'isNsWildInheritedForGrant'(_0x127b3b,_0x29a412){const _0x4dfa40=_0x33d05d;return!this[_0x4dfa40(0x137)](_0x127b3b,_0x29a412)&&(this[_0x4dfa40(0x180)]||!!this[_0x4dfa40(0x152)]['*']||!!this[_0x4dfa40(0x152)][_0x29a412+':*']);},'toggleGrantPerm'(_0x56f55c,_0x91d9d6,_0x5b3ea3,_0x3ae6ac){const _0x310fda=_0x33d05d,_0x3c4289=_0x91d9d6+':'+_0x5b3ea3,_0x4fa946=_0x91d9d6+':*',_0x22b66d={...this['grants'][_0x56f55c]||{}};if(_0x22b66d['*'])delete _0x22b66d['*'];else{if(_0x22b66d[_0x4fa946]){delete _0x22b66d[_0x4fa946];for(const _0x441044 of _0x3ae6ac)_0x441044!==_0x5b3ea3&&(_0x22b66d[_0x91d9d6+':'+_0x441044]=!0x0);}else _0x22b66d[_0x3c4289]=!_0x22b66d[_0x3c4289];}this[_0x310fda(0x163)]={...this[_0x310fda(0x163)],[_0x56f55c]:_0x22b66d};},'toggleGrantNamespace'(_0xb47477,_0x20f279,_0x39b37b){const _0x4efe50=_0x33d05d,_0x36c1ea=_0x20f279+':*',_0x3b9022={...this['grants'][_0xb47477]||{}};if(_0x3b9022['*'])delete _0x3b9022['*'];else{if(_0x3b9022[_0x36c1ea])delete _0x3b9022[_0x36c1ea];else{for(const _0x2cac33 of _0x39b37b)delete _0x3b9022[_0x2cac33[_0x4efe50(0x184)]];_0x3b9022[_0x36c1ea]=!0x0;}}this[_0x4efe50(0x163)]={...this[_0x4efe50(0x163)],[_0xb47477]:_0x3b9022};},'toggleGrantAllPerms'(_0x2b4796){const _0x396d43=_0x33d05d,_0x464333=this['grants'][_0x2b4796]||{};if(_0x464333['*']){const _0x4df042={..._0x464333};delete _0x4df042['*'],this[_0x396d43(0x163)]={...this['grants'],[_0x2b4796]:_0x4df042};}else this[_0x396d43(0x163)]={...this[_0x396d43(0x163)],[_0x2b4796]:{'*':!0x0}};},'getGrantEntries'(){const _0x4a9ae1=_0x33d05d;if(!this[_0x4a9ae1(0x149)]?.[_0x4a9ae1(0x14c)])return[];const _0x2be2fe=this[_0x4a9ae1(0x149)][_0x4a9ae1(0x14d)]||['read','query',_0x4a9ae1(0x156),_0x4a9ae1(0x157),_0x4a9ae1(0x179),'peer'],_0x88d695=Object[_0x4a9ae1(0x139)](this[_0x4a9ae1(0x149)]['namespaces'])[_0x4a9ae1(0x167)](([,_0x3fe30d])=>_0x4a9ae1(0x181)===_0x3fe30d[_0x4a9ae1(0x14f)])[_0x4a9ae1(0x18d)](([_0x34205f,_0x1ec5b3])=>({'ns':_0x34205f,'operations':Object[_0x4a9ae1(0x13b)](_0x1ec5b3[_0x4a9ae1(0x136)])[_0x4a9ae1(0x13c)]((_0x2c30b3,_0x24dbb1)=>{const _0x3b9975=_0x4a9ae1,_0x13c022=_0x2be2fe[_0x3b9975(0x170)](_0x2c30b3),_0x333e86=_0x2be2fe['indexOf'](_0x24dbb1);return-0x1===_0x13c022&&-0x1===_0x333e86?_0x2c30b3['localeCompare'](_0x24dbb1):-0x1===_0x13c022?0x1:-0x1===_0x333e86?-0x1:_0x13c022-_0x333e86;})})),_0x5ebd31=this[_0x4a9ae1(0x152)],_0x3906be=this[_0x4a9ae1(0x180)];return Object[_0x4a9ae1(0x139)](this[_0x4a9ae1(0x163)])[_0x4a9ae1(0x18d)](([_0x251834,_0xb5afa4])=>({'env':_0x251834,'globalCoverAll':_0x3906be||!!_0x5ebd31['*'],'nGroups':_0x88d695[_0x4a9ae1(0x18d)](({ns:_0x1ee2c0,operations:_0xc2cb1f})=>({'ns':_0x1ee2c0,'ops':_0xc2cb1f[_0x4a9ae1(0x18d)](_0x4eca99=>{const _0x307921=_0x4a9ae1,_0x2960b9=_0x1ee2c0+':'+_0x4eca99,_0x7d129c=!!_0xb5afa4[_0x2960b9]||!!_0xb5afa4[_0x1ee2c0+':*']||!!_0xb5afa4['*'],_0x4f8edd=!_0x7d129c&&(_0x3906be||!!_0x5ebd31['*']||!!_0x5ebd31[_0x1ee2c0+':*']||!!_0x5ebd31[_0x2960b9]),_0x3c57cf=this[_0x307921(0x149)]['namespaces'][_0x1ee2c0]?.[_0x307921(0x136)]?.[_0x4eca99]||{};return{'perm':_0x2960b9,'op':_0x4eca99,'summary':_0x3c57cf[_0x307921(0x173)]||'','routes':_0x3c57cf[_0x307921(0x18b)]||[],'hasDestructive':(_0x3c57cf[_0x307921(0x18b)]||[])[_0x307921(0x145)](_0x1e75e1=>_0x1e75e1[_0x307921(0x175)]),'checked':_0x7d129c,'inherited':_0x4f8edd};})}))}));},'validateForm'(){const _0x10890a=_0x33d05d;if(!this['label']['trim']())throw new Error(_0x10890a(0x15d));return!0x0;},async 'save'(){const _0x2725e9=_0x33d05d;this[_0x2725e9(0x15e)]=null;try{this['validateForm'](),this['busy']=!0x0;const _0x206b00={'label':this[_0x2725e9(0x158)][_0x2725e9(0x16c)]()};if(this[_0x2725e9(0x143)]?_0x206b00['expiresAt']=new Date(this['expiresAt'])[_0x2725e9(0x186)]():_0x206b00[_0x2725e9(0x143)]=null,this[_0x2725e9(0x180)])_0x206b00[_0x2725e9(0x134)]=['*'];else{if(this[_0x2725e9(0x17e)]&&void 0x0!==this[_0x2725e9(0x152)]['_fallback']){const _0x25bfe7=String(this['selectedPerms']['_fallback']||'')[_0x2725e9(0x135)](',')[_0x2725e9(0x18d)](_0x5f35fd=>_0x5f35fd[_0x2725e9(0x16c)]())[_0x2725e9(0x167)](_0x52d893=>_0x52d893);_0x25bfe7[_0x2725e9(0x162)]&&(_0x206b00[_0x2725e9(0x134)]=_0x25bfe7);}else{const _0x19ac79=Object[_0x2725e9(0x139)](this['selectedPerms'])[_0x2725e9(0x167)](([_0x13e98f,_0x4fc8b5])=>_0x4fc8b5&&_0x2725e9(0x14e)!==_0x13e98f)['map'](([_0x589528])=>_0x589528);_0x19ac79[_0x2725e9(0x162)]&&(_0x206b00[_0x2725e9(0x134)]=_0x19ac79);}}const _0x4c97a5={};for(const [_0x16cbd8,_0x2cc719]of Object[_0x2725e9(0x139)](this[_0x2725e9(0x163)])){const _0xcb5ed2=Object[_0x2725e9(0x139)](_0x2cc719)[_0x2725e9(0x167)](([,_0x2838d5])=>_0x2838d5)[_0x2725e9(0x18d)](([_0x63d10a])=>_0x63d10a);_0xcb5ed2[_0x2725e9(0x162)]&&(_0x4c97a5[_0x16cbd8]=_0xcb5ed2);}Object[_0x2725e9(0x13b)](_0x4c97a5)[_0x2725e9(0x162)]&&(_0x206b00['grants']=_0x4c97a5),this[_0x2725e9(0x17b)][_0x2725e9(0x16c)]()&&(_0x206b00[_0x2725e9(0x17b)]=this[_0x2725e9(0x17b)][_0x2725e9(0x16c)](),this[_0x2725e9(0x140)]&&(_0x206b00[_0x2725e9(0x140)]=this['password']));const _0xcd1680=await fetch(__ENV__[_0x2725e9(0x15b)]+_0x2725e9(0x159)+encodeURIComponent(_0x588ef3['$attr'][_0x2725e9(0x17f)]['id']),{'method':_0x2725e9(0x146),'headers':{'Content-Type':_0x2725e9(0x183)},'body':JSON[_0x2725e9(0x178)](_0x206b00)});if(!_0xcd1680['ok']){const _0x30077c=await _0xcd1680[_0x2725e9(0x171)]();throw new Error(_0x30077c?.[_0x2725e9(0x15e)]?.[_0x2725e9(0x14a)]||'Failed\x20to\x20update\x20token');}_0x588ef3[_0x2725e9(0x138)]['shared']?.['toast']?.[_0x2725e9(0x130)]?.(_0x2725e9(0x150)),await _0x588ef3[_0x2725e9(0x176)][_0x2725e9(0x165)][_0x2725e9(0x141)](),await _0x588ef3[_0x2725e9(0x176)]['onDone']?.(_0x588ef3[_0x2725e9(0x176)]['token']['id']);}catch(_0x501cae){this['error']=_0x501cae?.[_0x2725e9(0x14a)]||String(_0x501cae),_0x588ef3[_0x2725e9(0x138)][_0x2725e9(0x188)]?.[_0x2725e9(0x15f)]?.[_0x2725e9(0x15e)]?.(this['error']);}finally{this[_0x2725e9(0x16e)]=!0x1;}},'cancel'(){const _0x9e4508=_0x33d05d;_0x588ef3[_0x9e4508(0x176)][_0x9e4508(0x165)][_0x9e4508(0x141)]();},'passwordStrength'(_0x135cb4){const _0x2c3448=_0x33d05d;if(!_0x135cb4)return 0x0;let _0x2d8109=0x0;return _0x135cb4['length']>=0x8&&_0x2d8109++,_0x135cb4['length']>=0xe&&_0x2d8109++,/[A-Z]/[_0x2c3448(0x16b)](_0x135cb4)&&_0x2d8109++,/[0-9]/[_0x2c3448(0x16b)](_0x135cb4)&&_0x2d8109++,/[^A-Za-z0-9]/['test'](_0x135cb4)&&_0x2d8109++,_0x2d8109;},'passwordStrengthLabel'(_0x5cecad){const _0x55182f=_0x33d05d,_0x4c0c2b=this[_0x55182f(0x14b)](_0x5cecad);return _0x5cecad?_0x4c0c2b<=0x1?_0x55182f(0x177):_0x4c0c2b<=0x3?_0x55182f(0x154):'strong':'';},'passwordStrengthColor'(_0x1a59ba){const _0xe044=_0x33d05d,_0xc9eab8=this[_0xe044(0x14b)](_0x1a59ba);return _0x1a59ba?_0xc9eab8<=0x1?_0xe044(0x185):_0xc9eab8<=0x3?_0xe044(0x12e):_0xe044(0x13e):_0xe044(0x132);},'toggleShowPassword'(){const _0xbcdd9c=_0x33d05d;this[_0xbcdd9c(0x168)]=!this[_0xbcdd9c(0x168)];}};},'mount'(_0x35a5df){const _0x1cf8a8=_0x5647;this[_0x1cf8a8(0x17d)]();},'style':_0x46c444(0x174),'template':_0x46c444(0x161)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x8c89(){var _0x3191cc=['62037EHKvyW','10RYriCd','318975GlmACB','51352DjPjwi','49WDntvU','211444eDQIDz','perm-info-popover','5302hMjCDx','370062qHEcge','14890WRUpyB','408rHXmOK','58500tiYhnq','<style>.pip\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20absolute;\x0a\x20\x20\x20\x20\x20\x20\x20\x20bottom:\x20calc(100%\x20+\x206px);\x0a\x20\x20\x20\x20\x20\x20\x20\x20left:\x2050%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20transform:\x20translateX(-50%);\x0a\x20\x20\x20\x20\x20\x20\x20\x20z-index:\x20200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20min-width:\x20280px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20max-width:\x20480px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20var(--okdb-app-bg-deep);\x0a\x20\x20\x20\x20\x20\x20\x20\x20border:\x201px\x20solid\x20var(--okdb-app-surface-2);\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x205px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x208px\x2010px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20box-shadow:\x200\x204px\x2016px\x20rgba(0,0,0,.7);\x0a\x20\x20\x20\x20\x20\x20\x20\x20pointer-events:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20white-space:\x20normal;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20.pip-perm\x20\x20\x20{\x20font-family:\x20monospace;\x20font-size:\x2010px;\x20color:\x20var(--okdb-accent);\x20margin-bottom:\x203px;\x20}\x0a\x20\x20\x20\x20\x20\x20.pip-summary\x20{\x20font-size:\x2011px;\x20color:\x20var(--okdb-accent-muted);\x20line-height:\x201.4;\x20margin-bottom:\x206px;\x20}\x0a\x20\x20\x20\x20\x20\x20.pip-routes-hd\x20{\x20font-size:\x209px;\x20color:\x20var(--okdb-app-fg-subtle);\x20text-transform:\x20uppercase;\x20letter-spacing:\x20.06em;\x20margin-bottom:\x203px;\x20}\x0a\x20\x20\x20\x20\x20\x20.pip-route\x20\x20{\x20display:\x20flex;\x20align-items:\x20baseline;\x20gap:\x205px;\x20padding:\x201px\x200;\x20}\x0a\x20\x20\x20\x20\x20\x20.pip-method\x20{\x20font-family:\x20monospace;\x20font-size:\x209px;\x20color:\x20var(--okdb-accent);\x20width:\x2034px;\x20flex-shrink:\x200;\x20}\x0a\x20\x20\x20\x20\x20\x20.pip-path\x20\x20\x20{\x20font-family:\x20monospace;\x20font-size:\x2010px;\x20color:\x20var(--okdb-accent-muted);\x20word-break:\x20break-all;\x20}\x0a\x20\x20\x20\x20\x20\x20.pip-bd\x20\x20\x20\x20\x20{\x20font-size:\x208px;\x20color:\x20var(--okdb-danger);\x20background:\x20rgba(180,50,40,.15);\x20border-radius:\x202px;\x20padding:\x200\x203px;\x20flex-shrink:\x200;\x20}\x0a\x20\x20\x20\x20\x20\x20.pip-lr\x20\x20\x20\x20\x20{\x20font-size:\x208px;\x20color:\x20var(--okdb-app-fg-muted);\x20background:\x20rgba(100,100,100,.12);\x20border-radius:\x202px;\x20padding:\x200\x203px;\x20flex-shrink:\x200;\x20}\x0a\x20\x20\x20\x20\x20\x20.pip-route-desc\x20{\x20font-size:\x209px;\x20color:\x20var(--okdb-app-fg-subtle);\x20padding-left:\x2039px;\x20}\x0a\x20\x20\x20\x20\x20\x20.pip-implied\x20{\x20margin-top:\x206px;\x20font-size:\x209px;\x20color:\x20var(--okdb-app-fg-subtle);\x20}\x0a\x20\x20\x20\x20\x20\x20.pip-implied\x20code\x20{\x20font-family:\x20monospace;\x20color:\x20var(--okdb-accent-muted);\x20}\x0a\x20\x20\x20\x20\x20\x20.pip-gate\x20{\x20font-size:\x2010px;\x20color:\x20var(--okdb-app-fg-subtle);\x20}</style><div\x20class=\x22pip\x22><div\x20class=\x22pip-perm\x22>{{\x20$attr.permission\x20}}</div><if\x20:=\x22$attr.summary\x22><div\x20class=\x22pip-summary\x22>{{\x20$attr.summary\x20}}</div></if><if\x20:=\x22$attr.routes\x20&&\x20$attr.routes.length\x22><div\x20class=\x22pip-routes-hd\x22>Routes\x20({{\x20$attr.routes.length\x20}})</div><each\x20:of=\x22$attr.routes\x22\x20let:item=\x22r\x22><div\x20class=\x22pip-route\x22><span\x20class=\x22pip-method\x22>{{\x20r.method\x20}}</span>\x20<span\x20class=\x22pip-path\x22>{{\x20r.path\x20}}</span><if\x20:=\x22r.destructive\x22><span\x20class=\x22pip-bd\x22>destructive</span></if><if\x20:=\x22r.longRunning\x22><span\x20class=\x22pip-lr\x22>long</span></if></div><if\x20:=\x22r.summary\x22><div\x20class=\x22pip-route-desc\x22>{{\x20r.summary\x20}}</div></if></each></if><if\x20:=\x22!($attr.routes\x20&&\x20$attr.routes.length)\x22><div\x20class=\x22pip-gate\x22>Gate\x20—\x20not\x20tied\x20to\x20a\x20route.\x20Combine\x20with\x20underlying\x20namespace\x20permissions.</div></if><if\x20:=\x22$attr.impliedBy\x20&&\x20$attr.impliedBy.length\x22><div\x20class=\x22pip-implied\x22>Implied\x20by:<each\x20:of=\x22$attr.impliedBy\x22\x20let:item=\x22p\x22><code>{{\x20p\x20}}</code></each></div></if></div>'];_0x8c89=function(){return _0x3191cc;};return _0x8c89();}var _0x20d3cb=_0x2b2a;function _0x2b2a(_0x2a5c95,_0x11a6ac){_0x2a5c95=_0x2a5c95-0x191;var _0x8c8964=_0x8c89();var _0x2b2a42=_0x8c8964[_0x2a5c95];return _0x2b2a42;}(function(_0x153113,_0xd022e7){var _0x2606e1=_0x2b2a,_0x50ce78=_0x153113();while(!![]){try{var _0x48452b=parseInt(_0x2606e1(0x195))/0x1+-parseInt(_0x2606e1(0x196))/0x2+-parseInt(_0x2606e1(0x191))/0x3+-parseInt(_0x2606e1(0x198))/0x4*(parseInt(_0x2606e1(0x194))/0x5)+-parseInt(_0x2606e1(0x19b))/0x6*(-parseInt(_0x2606e1(0x197))/0x7)+parseInt(_0x2606e1(0x19d))/0x8*(parseInt(_0x2606e1(0x193))/0x9)+-parseInt(_0x2606e1(0x19c))/0xa*(parseInt(_0x2606e1(0x19a))/0xb);if(_0x48452b===_0xd022e7)break;else _0x50ce78['push'](_0x50ce78['shift']());}catch(_0x107d32){_0x50ce78['push'](_0x50ce78['shift']());}}}(_0x8c89,0x390bd));export default{'tag':_0x20d3cb(0x199),'attr':{'permission':{},'summary':{},'routes':{},'impliedBy':{}},'template':_0x20d3cb(0x192)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const _0x550183=_0x49ec;function _0x49ec(_0x8a14e1,_0x452979){_0x8a14e1=_0x8a14e1-0x108;const _0xe8f45a=_0xe8f4();let _0x49eca0=_0xe8f45a[_0x8a14e1];return _0x49eca0;}(function(_0x11950e,_0x9a7cc8){const _0x199b1c=_0x49ec,_0x499baa=_0x11950e();while(!![]){try{const _0x59f7ec=-parseInt(_0x199b1c(0x116))/0x1+-parseInt(_0x199b1c(0x114))/0x2+parseInt(_0x199b1c(0x129))/0x3+parseInt(_0x199b1c(0x124))/0x4*(-parseInt(_0x199b1c(0x119))/0x5)+parseInt(_0x199b1c(0x122))/0x6+parseInt(_0x199b1c(0x123))/0x7+parseInt(_0x199b1c(0x120))/0x8;if(_0x59f7ec===_0x9a7cc8)break;else _0x499baa['push'](_0x499baa['shift']());}catch(_0x25fad5){_0x499baa['push'](_0x499baa['shift']());}}}(_0xe8f4,0x1b900));export default{'tag':_0x550183(0x10b),'attr':{'token':{}},'context':_0x1d772f=>({get 'token'(){const _0xa8a0fe=_0x550183;return _0x1d772f[_0xa8a0fe(0x10f)][_0xa8a0fe(0x10c)];},'edit'(){const _0x2a1a97=_0x550183;_0x1d772f[_0x2a1a97(0x11f)](_0x2a1a97(0x10a),_0x1d772f[_0x2a1a97(0x10f)][_0x2a1a97(0x10c)]);},'permissionTags'(){const _0x4a104b=_0x550183,_0x48c71e=_0x1d772f[_0x4a104b(0x10f)]['token']?.[_0x4a104b(0x126)]||[];return _0x48c71e[_0x4a104b(0x127)]('*')?[{'label':_0x4a104b(0x11c),'full':!0x0}]:_0x48c71e[_0x4a104b(0x11b)](_0x2e8058=>({'label':_0x2e8058,'full':!0x1}));},'grantEntries'(){const _0x281c2c=_0x550183,_0x2bbaf2=_0x1d772f[_0x281c2c(0x10f)][_0x281c2c(0x10c)]?.['grants']||{};return Object[_0x281c2c(0x121)](_0x2bbaf2)['map'](([_0x45f374,_0x25b6bb])=>({'env':_0x45f374,'ops':Array[_0x281c2c(0x111)](_0x25b6bb)?_0x25b6bb:[]}));},'createdDate'(){const _0xe5c51a=_0x550183,_0x2c9749=_0x1d772f[_0xe5c51a(0x10f)]['token'];return _0x2c9749?.['createdAt']?new Date(_0x2c9749[_0xe5c51a(0x118)])['toLocaleString']():null;},'lastUsedDate'(){const _0x5c99a3=_0x550183,_0x346bf6=_0x1d772f['$attr'][_0x5c99a3(0x10c)];return _0x346bf6?.[_0x5c99a3(0x113)]?new Date(_0x346bf6[_0x5c99a3(0x113)])[_0x5c99a3(0x125)]():null;},'expiryInfo'(){const _0x281b0e=_0x550183,_0x26f9b4=_0x1d772f[_0x281b0e(0x10f)]['token'];if(!_0x26f9b4?.[_0x281b0e(0x110)])return null;const _0x188d75=new Date(_0x26f9b4[_0x281b0e(0x110)]),_0x211927=_0x26f9b4['expiresAt']<Date[_0x281b0e(0x128)]();return{'label':_0x188d75['toLocaleString'](),'expired':_0x211927};},'isConfig':()=>_0x550183(0x115)!==_0x1d772f[_0x550183(0x10f)][_0x550183(0x10c)]?.[_0x550183(0x11e)],async 'openDeleteConfirmation'(){const _0x29954b=_0x550183,_0x1c4f10=_0x1d772f[_0x29954b(0x10f)]['token'];await _0x1d772f[_0x29954b(0x12a)][_0x29954b(0x117)]['modal']['confirm']('Delete\x20token\x20\x22'+(_0x1c4f10['label']||_0x29954b(0x10e))+'\x22?',{'title':_0x29954b(0x10d),'confirmText':_0x29954b(0x109),'confirmClass':_0x29954b(0x11a)})&&_0x1d772f[_0x29954b(0x11f)](_0x29954b(0x11d),_0x1c4f10['id']);}}),'style':_0x550183(0x108),'template':_0x550183(0x112)};function _0xe8f4(){const _0x293989=['destructive','map','*\x20—\x20full\x20access','delete','source','$dispatch','2401600HJevSw','entries','856884CkYsfy','604170ksyjjW','35448PlqEfS','toLocaleString','permissions','includes','now','71604pSsLfH','$ok','token-detail{height:100%;overflow-y:auto}.td-empty{display:flex;align-items:center;justify-content:center;height:100%;font-size:12px;color:var(--okdb-app-fg-muted)}.td-header,.td-wrap,token-detail{display:flex;flex-direction:column}.td-wrap{gap:20px;padding:20px\x2024px}.td-header{gap:6px}.td-title-row{display:flex;align-items:baseline;gap:10px}.td-name{font-size:15px;font-weight:600;color:var(--okdb-app-fg-strong);margin:0}.td-config-note,.td-meta{font-size:11px;color:var(--okdb-app-fg-muted)}.td-meta{display:flex;gap:12px;flex-wrap:wrap}.td-divider{height:1px;background:var(--okdb-app-surface-2)}.td-actions{display:flex;gap:6px}.td-btn{padding:5px\x2011px;border-radius:5px;font-size:12px;border:1px\x20solid;background:0\x200;cursor:pointer;transition:background\x20.12s}.td-btn--primary,.td-btn--primary:hover{border-color:var(--okdb-app-border);color:var(--okdb-accent-muted)}.td-btn--primary:hover{background:var(--okdb-app-surface);color:var(--okdb-sky)}.td-btn--danger{border-color:rgba(248,113,113,.3);color:var(--okdb-danger)}.td-btn--danger:hover{background:rgba(248,113,113,.08)}.td-section{display:flex;flex-direction:column;gap:8px}.td-section-label{font-size:10px;color:var(--okdb-app-fg-muted);text-transform:uppercase;letter-spacing:.07em;font-weight:600}.td-tags{display:flex;flex-wrap:wrap;gap:4px}.td-tag{display:inline-block;padding:2px\x207px;border-radius:3px;font-size:11px;font-family:monospace;background:rgba(79,193,255,.06);border:1px\x20solid\x20rgba(79,193,255,.15);color:#6db8d8}.td-tag--full{background:rgba(251,191,36,.08);border-color:rgba(251,191,36,.2);color:var(--okdb-warning-text)}.td-none{font-size:11px;color:var(--okdb-app-fg-muted)}.td-grant{display:flex;flex-direction:column;gap:5px;padding:8px\x2010px;border:1px\x20solid\x20var(--okdb-app-surface-2);border-radius:5px}.td-grant-env{font-size:11px;font-weight:600;color:var(--okdb-app-fg-muted)}.td-identity{font-size:12px;color:var(--okdb-app-fg-strong);font-family:monospace;padding:8px\x2010px;background:var(--okdb-app-bg-deep);border-radius:4px;border:1px\x20solid\x20var(--okdb-app-surface-2);word-break:break-all}','Delete','edit','token-detail','token','Delete\x20Token','Unnamed','$attr','expiresAt','isArray','<if\x20:=\x22!token\x22><div\x20class=\x22td-empty\x22>Select\x20a\x20token\x20to\x20view\x20details</div></if><if\x20:=\x22token\x22><div\x20class=\x22td-wrap\x22><div\x20class=\x22td-header\x22><div\x20class=\x22td-title-row\x22><h3\x20class=\x22td-name\x22>{{\x20token.label\x20||\x20\x27Unnamed\x20Token\x27\x20}}</h3><if\x20:=\x22isConfig()\x22><span\x20style=\x22font-size:10px;\x20color:var(--okdb-app-fg-muted);\x20text-transform:uppercase;\x20letter-spacing:.05em;\x22>read-only</span></if></div><div\x20class=\x22td-meta\x22><if\x20:=\x22createdDate()\x22><span>Created\x20{{\x20createdDate()\x20}}</span></if><if\x20:=\x22lastUsedDate()\x22><span>Last\x20used\x20{{\x20lastUsedDate()\x20}}</span></if><if\x20:=\x22expiryInfo()\x22><span\x20:style=\x22expiryInfo().expired\x20?\x20\x27color:var(--okdb-danger);\x27\x20:\x20\x27\x27\x22>{{\x20expiryInfo().expired\x20?\x20\x27Expired\x27\x20:\x20\x27Expires\x27\x20}}\x20{{\x20expiryInfo().label\x20}}</span></if><if\x20:=\x22!expiryInfo()\x22><span\x20style=\x22opacity:.5;\x22>No\x20expiry</span></if></div><if\x20:=\x22isConfig()\x22><div\x20class=\x22td-config-note\x22>This\x20token\x20comes\x20from\x20the\x20server\x20config\x20and\x20cannot\x20be\x20edited\x20here.</div></if></div><div\x20class=\x22td-divider\x22/><if\x20:=\x22!isConfig()\x22><div\x20class=\x22td-actions\x22><button\x20class=\x22td-btn\x20td-btn--primary\x22\x20@click=\x22edit()\x22>Edit</button>\x20<button\x20class=\x22td-btn\x20td-btn--danger\x22\x20@click=\x22openDeleteConfirmation()\x22>Delete</button></div></if><div\x20class=\x22td-section\x22><div\x20class=\x22td-section-label\x22>Permissions</div><div\x20class=\x22td-tags\x22><each\x20:of=\x22permissionTags()\x22\x20let:item=\x22tag\x22><span\x20:class=\x22[\x27td-tag\x27,\x20tag.full\x20?\x20\x27td-tag--full\x27\x20:\x20\x27\x27]\x22>{{\x20tag.label\x20}}</span></each><if\x20:=\x22permissionTags().length\x20===\x200\x22><span\x20class=\x22td-none\x22>None</span></if></div></div><if\x20:=\x22grantEntries().length\x20>\x200\x22><div\x20class=\x22td-section\x22><div\x20class=\x22td-section-label\x22>Per-env\x20Grants</div><each\x20:of=\x22grantEntries()\x22\x20let:item=\x22entry\x22><div\x20class=\x22td-grant\x22><span\x20class=\x22td-grant-env\x22>{{\x20entry.env\x20}}</span><div\x20class=\x22td-tags\x22><each\x20:of=\x22entry.ops\x22\x20let:item=\x22op\x22><span\x20class=\x22td-tag\x22>{{\x20op\x20}}</span></each></div></div></each></div></if><if\x20:=\x22token.name\x22><div\x20class=\x22td-section\x22><div\x20class=\x22td-section-label\x22>Identity</div><div\x20class=\x22td-identity\x22>{{\x20token.name\x20}}</div></div></if></div></if>','lastUsedAt','440296oenXjk','cluster','175838VzCsGJ','shared','createdAt','25QkqDjE'];_0xe8f4=function(){return _0x293989;};return _0xe8f4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x31d9e9=_0x480c;(function(_0x3edc3a,_0x4fb255){const _0x3b79c2=_0x480c,_0x445e92=_0x3edc3a();while(!![]){try{const _0x134e65=-parseInt(_0x3b79c2(0xc9))/0x1*(parseInt(_0x3b79c2(0xc2))/0x2)+parseInt(_0x3b79c2(0xcc))/0x3*(-parseInt(_0x3b79c2(0xe0))/0x4)+parseInt(_0x3b79c2(0xe4))/0x5+parseInt(_0x3b79c2(0xd5))/0x6*(parseInt(_0x3b79c2(0xc4))/0x7)+parseInt(_0x3b79c2(0xdc))/0x8+parseInt(_0x3b79c2(0xe8))/0x9+-parseInt(_0x3b79c2(0xcb))/0xa;if(_0x134e65===_0x4fb255)break;else _0x445e92['push'](_0x445e92['shift']());}catch(_0x324ea9){_0x445e92['push'](_0x445e92['shift']());}}}(_0x5767,0xbba05));function _0x5767(){const _0x5b7d02=['4KAyFhT','source','<div\x20style=\x22display:\x20flex;\x20flex-direction:\x20column;\x20gap:\x202px;\x20min-height:\x200;\x20height:\x20100%;\x22><if\x20:=\x22loading\x22><div\x20style=\x22font-size:\x2011px;\x20opacity:\x200.4;\x20padding:\x208px\x2010px;\x22>Loading…</div></if><if\x20:=\x22error\x20&&\x20!loading\x22><div\x20style=\x22font-size:\x2011px;\x20color:\x20var(--okdb-danger);\x20padding:\x208px\x2010px;\x22>{{\x20error\x20}}</div></if><div\x20style=\x22flex:\x201;\x20overflow-y:\x20auto;\x20min-height:\x200;\x22><each\x20:of=\x22tokens\x22\x20let:item=\x22t\x22><button\x20:class=\x22[\x27tl-item\x27,\x20selected?.id\x20===\x20t.id\x20?\x20\x27tl-item--selected\x27\x20:\x20\x27\x27]\x22\x20@click=\x22select(t)\x22><div\x20class=\x22tl-item__body\x22><span\x20class=\x22tl-item__label\x22>{{\x20t.label\x20||\x20\x27Unnamed\x27\x20}}</span>\x20<span\x20class=\x22tl-item__sub\x22>{{\x20permSummary(t)\x20}}</span></div><if\x20:=\x22isConfig(t)\x22><span\x20class=\x22tl-config-badge\x22>Config</span></if></button></each><if\x20:=\x22!loading\x20&&\x20tokens.length\x20===\x200\x20&&\x20!error\x22><div\x20style=\x22font-size:\x2011px;\x20opacity:\x200.4;\x20padding:\x208px\x2010px;\x22>No\x20tokens\x20yet</div></if></div></div>','/auth/tokens','7585275AagvAr','error','Load\x20tokens\x20error','loading','3487005wIegVt','selected','226026qHCcxI','$attr','4140367pwgSYc','API','json','no\x20permissions','selectedId','5EkyRgf','cluster','8623600myhFKx','4415109qlIZcH','length','tokens','load','_selectedId','token-list','$ok','message','find','6qRzwVF','\x20permissions','stores','$dispatch','Failed\x20to\x20load\x20tokens','data','token-list{display:flex;flex-direction:column;gap:2px;min-height:0}.tl-item{display:flex;align-items:center;gap:6px;padding:6px\x2010px;font-size:12px;background:0\x200;border:1px\x20solid\x20transparent;border-radius:7px;color:var(--okdb-app-fg-muted);text-align:left;cursor:pointer;width:100%;transition:background\x20.1s,color\x20.1s}.tl-item:hover{background:var(--okdb-app-surface-2);border-color:var(--okdb-app-border);color:var(--okdb-app-fg-strong)}.tl-item--selected{background:var(--okdb-accent-soft-bg)!important;border-color:var(--okdb-accent-soft-border)!important;color:var(--okdb-accent)!important}.tl-item__body{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.tl-item__label,.tl-item__sub{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-item__label{font-size:12px;font-weight:500}.tl-item__sub{font-size:10px;opacity:.5}.tl-config-badge{font-size:9px;padding:1px\x205px;border-radius:3px;background:rgba(160,174,192,.08);border:1px\x20solid\x20rgba(160,174,192,.2);color:var(--okdb-app-fg-muted);flex-shrink:0;white-space:nowrap;text-transform:uppercase;letter-spacing:.04em}','9373312uKDlkC','includes','$watch','permissions'];_0x5767=function(){return _0x5b7d02;};return _0x5767();}function _0x480c(_0x2e3ee1,_0x412a94){_0x2e3ee1=_0x2e3ee1-0xc2;const _0x5767f6=_0x5767();let _0x480cce=_0x5767f6[_0x2e3ee1];return _0x480cce;}export default{'tag':_0x31d9e9(0xd1),'attr':{'selectedId':{}},'context':_0x270618=>({'tokens':[],'loading':!0x1,'error':null,'selected':null,'_selectedId':null,async 'load'(){const _0x18a62f=_0x31d9e9;this[_0x18a62f(0xe7)]=!0x0,this[_0x18a62f(0xe5)]=null;try{const _0x2faacd=await fetch(__ENV__[_0x18a62f(0xc5)]+_0x18a62f(0xe3));if(!_0x2faacd['ok'])throw new Error((await _0x2faacd[_0x18a62f(0xc6)]())?.[_0x18a62f(0xe5)]?.[_0x18a62f(0xd3)]||_0x18a62f(0xd9));const _0x4842db=await _0x2faacd[_0x18a62f(0xc6)]();this['tokens']=_0x4842db[_0x18a62f(0xda)]??[];const _0x2e3f4b=this[_0x18a62f(0xd0)]||_0x270618[_0x18a62f(0xc3)][_0x18a62f(0xc8)];if(_0x2e3f4b){const _0x2bf588=this[_0x18a62f(0xce)][_0x18a62f(0xd4)](_0x42994e=>_0x42994e['id']===_0x2e3f4b);_0x2bf588?(this[_0x18a62f(0xe9)]=_0x2bf588,this[_0x18a62f(0xd0)]=_0x2bf588['id'],_0x270618[_0x18a62f(0xd8)]('selected',_0x2bf588)):(this[_0x18a62f(0xe9)]=null,this[_0x18a62f(0xd0)]=null,_0x270618[_0x18a62f(0xd8)](_0x18a62f(0xe9),null));}}catch(_0x4f2523){this['error']=_0x4f2523?.[_0x18a62f(0xd3)]||String(_0x4f2523),console[_0x18a62f(0xe5)](_0x18a62f(0xe6),_0x4f2523);}finally{this[_0x18a62f(0xe7)]=!0x1;}},'select'(_0x21c0b1){const _0x4a91d5=_0x31d9e9;this['selected']=_0x21c0b1??null,this[_0x4a91d5(0xd0)]=_0x21c0b1?.['id']??null,_0x270618['$dispatch'](_0x4a91d5(0xe9),_0x21c0b1??null);},'permSummary'(_0x170433){const _0x529d84=_0x31d9e9,_0x27fa89=_0x170433[_0x529d84(0xdf)]||[];return _0x27fa89[_0x529d84(0xdd)]('*')?'full\x20access':0x0===_0x27fa89[_0x529d84(0xcd)]?_0x529d84(0xc7):0x1===_0x27fa89[_0x529d84(0xcd)]?_0x27fa89[0x0]:_0x27fa89[_0x529d84(0xcd)]+_0x529d84(0xd6);},'isConfig':_0xb026d5=>_0x31d9e9(0xca)!==_0xb026d5[_0x31d9e9(0xe1)]}),'mount'(_0x391baf){const _0x4c1b41=_0x31d9e9;_0x391baf[_0x4c1b41(0xde)](()=>_0x391baf[_0x4c1b41(0xd2)][_0x4c1b41(0xd7)]['okdb']['selectedEnv'],()=>this['load']()),this[_0x4c1b41(0xcf)]();},'style':_0x31d9e9(0xdb),'template':_0x31d9e9(0xe2)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x3320ce=_0x3d41;(function(_0x15d501,_0x545406){const _0x183b48=_0x3d41,_0x400fc0=_0x15d501();while(!![]){try{const _0x38ab0f=-parseInt(_0x183b48(0x1a0))/0x1*(parseInt(_0x183b48(0x1a2))/0x2)+parseInt(_0x183b48(0x19a))/0x3*(-parseInt(_0x183b48(0x188))/0x4)+-parseInt(_0x183b48(0x198))/0x5*(-parseInt(_0x183b48(0x185))/0x6)+parseInt(_0x183b48(0x193))/0x7*(parseInt(_0x183b48(0x1a1))/0x8)+-parseInt(_0x183b48(0x18e))/0x9+-parseInt(_0x183b48(0x180))/0xa+parseInt(_0x183b48(0x1a3))/0xb;if(_0x38ab0f===_0x545406)break;else _0x400fc0['push'](_0x400fc0['shift']());}catch(_0xb997c6){_0x400fc0['push'](_0x400fc0['shift']());}}}(_0x482d,0xe0a43));function _0x482d(){const _0x476252=['11232001oWknoo','/type/','type','390860PIwnbn','onDone','okdb','stringify','PUT','6miohNG','close','Add\x20failed','1076708XmtcqO','shared','application/json','error','apiBase','add-item-modal','117882wJEGgy','message','reloadTypes','statusText','$ok','17038aFiFUm','Add\x20item\x20error','busy','$attr','/item/','3848840OolnLs','toast','9CAxoan','modal','value','stores','trim','success','3ZkVaTe','4728ArPuUK','966338ypzCCd'];_0x482d=function(){return _0x476252;};return _0x482d();}import _0x198f0d from'@toolkit/elements/ok-icon.ok.js';function _0x3d41(_0x1f1fe0,_0x3d64c1){_0x1f1fe0=_0x1f1fe0-0x17f;const _0x482d6b=_0x482d();let _0x3d41e4=_0x482d6b[_0x1f1fe0];return _0x3d41e4;}import _0x32b3a4 from'@toolkit/core/ok-overlay.ok.js';import _0x178951 from'../../../components/ok-json-input.ok.js';export default{'tag':_0x3320ce(0x18d),'dependencies':[_0x178951,_0x32b3a4,_0x198f0d],'attr':{'modal':{},'type':{},'onDone':{}},'context':_0x1b7bf3=>({'busy':!0x1,'key':'','valueInit':{},'value':{},async 'save'(){const _0x130662=_0x3320ce,_0x1d3e61=String(this['key']||'')[_0x130662(0x19e)]();if(_0x1d3e61){this[_0x130662(0x195)]=!0x0;try{const _0x468c53=await fetch(_0x1b7bf3[_0x130662(0x192)][_0x130662(0x19d)]['okdb'][_0x130662(0x18c)]+_0x130662(0x1a4)+_0x1b7bf3['$attr'][_0x130662(0x17f)]+_0x130662(0x197)+encodeURIComponent(_0x1d3e61),{'method':_0x130662(0x184),'headers':{'Content-Type':_0x130662(0x18a)},'body':JSON[_0x130662(0x183)](this[_0x130662(0x19c)])});if(!_0x468c53['ok'])throw new Error((await _0x468c53['json']())?.['error']?.[_0x130662(0x18f)]||_0x468c53[_0x130662(0x191)]);await _0x1b7bf3[_0x130662(0x192)]['stores'][_0x130662(0x182)][_0x130662(0x190)](),_0x1b7bf3['$ok'][_0x130662(0x189)]?.[_0x130662(0x199)]?.[_0x130662(0x19f)]?.('Item\x20added'),await _0x1b7bf3[_0x130662(0x196)][_0x130662(0x19b)][_0x130662(0x186)](),await _0x1b7bf3['$attr'][_0x130662(0x181)]?.({'key':_0x1d3e61,'value':this[_0x130662(0x19c)]});}catch(_0x38c44c){_0x1b7bf3['$ok'][_0x130662(0x189)]?.[_0x130662(0x199)]?.[_0x130662(0x18b)]?.(_0x38c44c?.[_0x130662(0x18f)]||_0x130662(0x187)),console[_0x130662(0x18b)](_0x130662(0x194),_0x38c44c);}finally{this[_0x130662(0x195)]=!0x1;}}},'cancel'(){const _0x264e54=_0x3320ce;_0x1b7bf3['$attr'][_0x264e54(0x19b)][_0x264e54(0x186)]();}}),'template':'\x0a<div\x20style=\x22position:relative;\x20min-width:360px;\x20display:flex;\x20flex-direction:column;\x20gap:10px;\x22>\x0a\x0a\x20\x20<if\x20:=\x22busy\x22>\x0a\x20\x20\x20\x20<ok-overlay>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22loader-center\x22>\x0a\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</div>\x0a\x20\x20\x20\x20</ok-overlay>\x0a\x20\x20</if>\x0a\x0a\x20\x20<input\x20type=\x22text\x22\x20placeholder=\x22Key\x22\x20:value=\x22key\x22\x20@input=\x22key\x20=\x20$el.value\x22\x20/>\x0a\x0a\x20\x20<div\x20style=\x22font-size:11px;\x20opacity:.65;\x20line-height:1.45;\x22>\x0a\x20\x20\x20\x20Value\x20may\x20be\x20any\x20JSON\x20value:\x20object,\x20array,\x20string,\x20number,\x20boolean,\x20or\x20<code>null</code>.\x0a\x20\x20\x20\x20Editing\x20in\x20the\x20data\x20view\x20replaces\x20the\x20full\x20stored\x20value.\x0a\x20\x20</div>\x0a\x0a\x20\x20<ok-json-input\x0a\x20\x20\x20\x20mode=\x22textarea\x22\x0a\x20\x20\x20\x20style=\x22height:300px;\x22\x0a\x20\x20\x20\x20:value=\x22valueInit\x22\x0a\x20\x20\x20\x20@edit=\x22value\x20=\x20$event.detail\x22\x0a\x20\x20/>\x0a\x0a\x20\x20<div\x20style=\x22display:flex;\x20gap:10px;\x20justify-content:flex-end;\x22>\x0a\x20\x20\x20\x20<button\x20@click=\x22cancel()\x22>Cancel</button>\x0a\x20\x20\x20\x20<button\x20@click=\x22save()\x22\x20:disabled=\x22!key\x20||\x20value\x20===\x20undefined\x20||\x20busy\x22>Save</button>\x0a\x20\x20</div>\x0a\x0a</div>\x0a'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x1c8e24=_0x2905;(function(_0x109cc4,_0x4cfb40){const _0x256a96=_0x2905,_0x293b9e=_0x109cc4();while(!![]){try{const _0x3c5641=-parseInt(_0x256a96(0x194))/0x1*(-parseInt(_0x256a96(0x199))/0x2)+parseInt(_0x256a96(0x189))/0x3+-parseInt(_0x256a96(0x18f))/0x4+parseInt(_0x256a96(0x190))/0x5*(parseInt(_0x256a96(0x19d))/0x6)+-parseInt(_0x256a96(0x188))/0x7+-parseInt(_0x256a96(0x197))/0x8*(parseInt(_0x256a96(0x196))/0x9)+parseInt(_0x256a96(0x187))/0xa;if(_0x3c5641===_0x4cfb40)break;else _0x293b9e['push'](_0x293b9e['shift']());}catch(_0x1cd166){_0x293b9e['push'](_0x293b9e['shift']());}}}(_0x1c24,0xe5e11));export default{'tag':_0x1c8e24(0x18c),'attr':{'modal':{},'onDone':{}},'context':_0x2af61e=>({'busy':!0x1,'name':'','sync':!0x0,'compression':!0x0,'error':null,get 'canSave'(){const _0x48d698=_0x1c8e24;return this[_0x48d698(0x186)][_0x48d698(0x192)]()['length']>0x0&&!this[_0x48d698(0x198)];},async 'save'(){const _0x3bed73=_0x1c8e24,_0x510786=this[_0x3bed73(0x186)][_0x3bed73(0x192)]();if(_0x510786){this[_0x3bed73(0x19b)]=null,this['busy']=!0x0;try{const _0x2a9452=await fetch(__ENV__[_0x3bed73(0x19a)]+'/envs',{'method':_0x3bed73(0x195),'headers':{'Content-Type':'application/json'},'body':JSON[_0x3bed73(0x18d)]({'name':_0x510786,'sync':this[_0x3bed73(0x19e)],'compression':this[_0x3bed73(0x18a)]})});if(!_0x2a9452['ok']){const _0x53dece=await _0x2a9452[_0x3bed73(0x18b)]()[_0x3bed73(0x193)](()=>({}));throw new Error(_0x53dece?.[_0x3bed73(0x19b)]?.['message']||_0x2a9452['statusText']);}await _0x2af61e[_0x3bed73(0x191)][_0x3bed73(0x185)][_0x3bed73(0x19c)](),await _0x2af61e[_0x3bed73(0x191)][_0x3bed73(0x18e)]?.(_0x510786);}catch(_0x573273){this['error']=_0x573273?.['message']||'Failed\x20to\x20create\x20environment';}finally{this[_0x3bed73(0x198)]=!0x1;}}},'cancel'(){const _0x5d0370=_0x1c8e24;_0x2af61e[_0x5d0370(0x191)][_0x5d0370(0x185)][_0x5d0370(0x19c)]();}}),'template':'\x0a<div\x20style=\x22min-width:340px;\x20display:flex;\x20flex-direction:column;\x20gap:14px;\x22>\x0a\x0a\x20\x20<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:4px;\x22>\x0a\x20\x20\x20\x20<label\x20style=\x22font-size:12px;\x20opacity:.6;\x22>Environment\x20name</label>\x0a\x20\x20\x20\x20<input\x0a\x20\x20\x20\x20\x20\x20type=\x22text\x22\x0a\x20\x20\x20\x20\x20\x20placeholder=\x22e.g.\x20staging,\x20analytics,\x20archive\x22\x0a\x20\x20\x20\x20\x20\x20:value=\x22name\x22\x0a\x20\x20\x20\x20\x20\x20@input=\x22name\x20=\x20$el.value\x22\x0a\x20\x20\x20\x20\x20\x20@keydown.enter=\x22save()\x22\x0a\x20\x20\x20\x20\x20\x20autofocus\x0a\x20\x20\x20\x20\x20\x20style=\x22font-family:monospace;\x22\x0a\x20\x20\x20\x20/>\x0a\x20\x20\x20\x20<div\x20style=\x22font-size:11px;\x20opacity:.45;\x20margin-top:2px;\x22>\x0a\x20\x20\x20\x20\x20\x20Use\x20letters,\x20numbers,\x20hyphens.\x20Prefix\x20with\x20<code>~</code>\x20for\x20system\x20envs.\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</div>\x0a\x0a\x20\x20<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:8px;\x22>\x0a\x20\x20\x20\x20<label\x20style=\x22display:flex;\x20align-items:center;\x20gap:8px;\x20cursor:pointer;\x20font-size:13px;\x20user-select:none;\x22>\x0a\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20:checked=\x22sync\x22\x20@change=\x22sync\x20=\x20$event.target.checked\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20<span>Sync-enabled\x20<span\x20style=\x22opacity:.5;\x20font-size:11px;\x22>(HLC\x20clock\x20+\x20changelog)</span></span>\x0a\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20<label\x20style=\x22display:flex;\x20align-items:center;\x20gap:8px;\x20cursor:pointer;\x20font-size:13px;\x20user-select:none;\x22>\x0a\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20:checked=\x22compression\x22\x20@change=\x22compression\x20=\x20$event.target.checked\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20<span>Compression\x20<span\x20style=\x22opacity:.5;\x20font-size:11px;\x22>(smaller\x20on\x20disk,\x20slight\x20CPU\x20overhead)</span></span>\x0a\x20\x20\x20\x20</label>\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:13px;\x20padding:6px\x2010px;\x20background:var(--okdb-danger-deep-bg);\x20border-radius:4px;\x20border:1px\x20solid\x20color-mix(in\x20srgb,\x20var(--okdb-danger)\x2020%,\x20transparent);\x22>\x0a\x20\x20\x20\x20\x20\x20{{\x20error\x20}}\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</if>\x0a\x0a\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20justify-content:flex-end;\x20padding-top:4px;\x20border-top:1px\x20solid\x20var(--okdb-app-border);\x22>\x0a\x20\x20\x20\x20<button\x20@click=\x22cancel()\x22>Cancel</button>\x0a\x20\x20\x20\x20<button\x20class=\x22btn-primary\x22\x20@click=\x22save()\x22\x20:disabled=\x22!canSave\x22>\x0a\x20\x20\x20\x20\x20\x20{{\x20busy\x20?\x20\x27Creating…\x27\x20:\x20\x27Create\x27\x20}}\x0a\x20\x20\x20\x20</button>\x0a\x20\x20</div>\x0a\x0a</div>'};function _0x2905(_0x12b105,_0x3567e4){_0x12b105=_0x12b105-0x185;const _0x1c24c3=_0x1c24();let _0x29058e=_0x1c24c3[_0x12b105];return _0x29058e;}function _0x1c24(){const _0x3a8ab4=['busy','2188518pfIsiL','API','error','close','12GQwJNz','sync','modal','name','7988400PbbOfp','10250499TIRywI','4644198dgSlzq','compression','json','create-env-modal','stringify','onDone','1566528xeUHGq','179265chkHNW','$attr','trim','catch','1dVwNJu','POST','6437673DjZYsP','8jMQCqR'];_0x1c24=function(){return _0x3a8ab4;};return _0x1c24();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x188b(_0x20e452,_0x1a0c24){_0x20e452=_0x20e452-0x1de;const _0x2def01=_0x2def();let _0x188b10=_0x2def01[_0x20e452];return _0x188b10;}function _0x2def(){const _0x2c50fb=['type','trim','4044186JsOCLg','geo','statusText','toast','modal','busy','length','every','2Wfyvpt','$attr','14Cnmzxu','message','maxTokenLength','1275152EbdwXq','POST','includes','map','12hTLsXr','error','Create\x20FTS\x20error','1415731RikeUQ','string','13988711NEfraR','application/json','canSave','label','object','entries','json','apiBase','$ok','close','4185055VYZQQX','API','970356pQQLfp','filter','minTokenLength','push','fields','selected','4DNnFZf','99eMBTYY','/type/','effectiveFields','onDone','/fts/','keepNumbers','16894520nMIRLV'];_0x2def=function(){return _0x2c50fb;};return _0x2def();}(function(_0x3d53cd,_0x434c9f){const _0x1739f8=_0x188b,_0x4201ef=_0x3d53cd();while(!![]){try{const _0x32735f=parseInt(_0x1739f8(0x1ed))/0x1+-parseInt(_0x1739f8(0x1e1))/0x2*(parseInt(_0x1739f8(0x20b))/0x3)+-parseInt(_0x1739f8(0x201))/0x4*(parseInt(_0x1739f8(0x1f9))/0x5)+parseInt(_0x1739f8(0x1fb))/0x6*(parseInt(_0x1739f8(0x1e3))/0x7)+parseInt(_0x1739f8(0x1e6))/0x8*(parseInt(_0x1739f8(0x202))/0x9)+-parseInt(_0x1739f8(0x208))/0xa+-parseInt(_0x1739f8(0x1ef))/0xb*(-parseInt(_0x1739f8(0x1ea))/0xc);if(_0x32735f===_0x434c9f)break;else _0x4201ef['push'](_0x4201ef['shift']());}catch(_0x54d644){_0x4201ef['push'](_0x4201ef['shift']());}}}(_0x2def,0xd935d));import _0x3d808b from'@toolkit/elements/ok-icon.ok.js';import _0x4c8af2 from'@toolkit/core/ok-overlay.ok.js';import _0x1beb37 from'../../../components/field-path-input.ok.js';export default{'tag':'create-fts-modal','dependencies':[_0x1beb37,_0x4c8af2,_0x3d808b],'attr':{'modal':{},'type':{},'apiBase':{},'deepPaths':{},'possibleFields':{},'onDone':{}},'context':_0x2e4aa9=>({'busy':!0x1,'label':'','fields':[],'selected':'','wholeDoc':!0x1,'tokenizerOpen':!0x1,'minTokenLength':0x2,'maxTokenLength':0x40,'toLower':!0x0,'keepNumbers':!0x0,get 'items'(){const _0x543757=_0x188b,_0x3f32c9=_0x2e4aa9[_0x543757(0x1e2)]['deepPaths'];return _0x3f32c9&&_0x543757(0x1f3)==typeof _0x3f32c9&&Object['keys'](_0x3f32c9)[_0x543757(0x1df)]?Object[_0x543757(0x1f4)](_0x3f32c9)[_0x543757(0x1fc)](([,_0x3d0aff])=>!_0x3d0aff[_0x543757(0x1e0)](_0x4bb6bf=>_0x543757(0x1f3)===_0x4bb6bf||_0x543757(0x20c)===_0x4bb6bf))[_0x543757(0x1e9)](([_0x48395c,_0x536e80])=>({'path':_0x48395c,'types':_0x536e80,'hint':null})):(_0x2e4aa9[_0x543757(0x1e2)]['possibleFields']??[])[_0x543757(0x1e9)](_0x4509de=>({'path':_0x4509de,'types':[_0x543757(0x1ee)],'hint':null}));},get 'effectiveFields'(){const _0x50f382=_0x188b;return this['wholeDoc']?['*']:this[_0x50f382(0x1ff)];},get 'derivedName'(){const _0x10d540=_0x188b;return this['wholeDoc']?'*':this[_0x10d540(0x1ff)]['join'](',');},get 'actualName'(){const _0x3c6135=_0x188b;return this[_0x3c6135(0x1f2)]['trim']()||this['derivedName'];},get 'canSave'(){const _0x230ab6=_0x188b;return this[_0x230ab6(0x204)][_0x230ab6(0x1df)]>0x0;},'addField'(){const _0xba6c56=_0x188b,_0x6bd2f5=String(this[_0xba6c56(0x200)]||'')[_0xba6c56(0x20a)]();_0x6bd2f5&&!this[_0xba6c56(0x1ff)][_0xba6c56(0x1e8)](_0x6bd2f5)&&(this[_0xba6c56(0x1ff)][_0xba6c56(0x1fe)](_0x6bd2f5),this[_0xba6c56(0x200)]='');},'removeField'(_0x131a49){const _0x51b3e2=this['fields']['indexOf'](_0x131a49);_0x51b3e2>=0x0&&this['fields']['splice'](_0x51b3e2,0x1);},async 'save'(){const _0x119c3a=_0x188b;if(this[_0x119c3a(0x1f1)]){this[_0x119c3a(0x1de)]=!0x0;try{const _0x31f3f9={'fields':this[_0x119c3a(0x204)],'tokenizer':{'minTokenLength':Number(this[_0x119c3a(0x1fd)]),'maxTokenLength':Number(this[_0x119c3a(0x1e5)]),'toLower':this['toLower'],'keepNumbers':this[_0x119c3a(0x207)]}},_0x29e07e=_0x2e4aa9[_0x119c3a(0x1e2)][_0x119c3a(0x1f6)]||__ENV__[_0x119c3a(0x1fa)],_0x59d1f7=await fetch(_0x29e07e+_0x119c3a(0x203)+_0x2e4aa9[_0x119c3a(0x1e2)][_0x119c3a(0x209)]+_0x119c3a(0x206)+encodeURIComponent(this['actualName']),{'method':_0x119c3a(0x1e7),'headers':{'Content-Type':_0x119c3a(0x1f0)},'body':JSON['stringify'](_0x31f3f9)});if(!_0x59d1f7['ok'])throw new Error((await _0x59d1f7[_0x119c3a(0x1f5)]())?.[_0x119c3a(0x1eb)]?.[_0x119c3a(0x1e4)]||_0x59d1f7[_0x119c3a(0x20d)]);await _0x2e4aa9[_0x119c3a(0x1e2)][_0x119c3a(0x20f)][_0x119c3a(0x1f8)](),await _0x2e4aa9[_0x119c3a(0x1e2)][_0x119c3a(0x205)]?.();}catch(_0x2f1b9f){_0x2e4aa9[_0x119c3a(0x1f7)]['shared']?.[_0x119c3a(0x20e)]?.['error']?.(_0x2f1b9f?.[_0x119c3a(0x1e4)]||'Create\x20FTS\x20index\x20failed'),console[_0x119c3a(0x1eb)](_0x119c3a(0x1ec),_0x2f1b9f);}finally{this['busy']=!0x1;}}},'cancel'(){const _0x5a290e=_0x188b;_0x2e4aa9[_0x5a290e(0x1e2)][_0x5a290e(0x20f)][_0x5a290e(0x1f8)]();}}),'template':'\x0a<div\x20style=\x22position:relative;\x20min-width:380px;\x20display:flex;\x20flex-direction:column;\x20gap:14px;\x22>\x0a\x0a\x20\x20<if\x20:=\x22busy\x22>\x0a\x20\x20\x20\x20<ok-overlay>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22loader-center\x22>\x0a\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</div>\x0a\x20\x20\x20\x20</ok-overlay>\x0a\x20\x20</if>\x0a\x0a\x20\x20<!--\x20Whole-document\x20shortcut\x20-->\x0a\x20\x20<label\x20style=\x22display:flex;\x20align-items:center;\x20gap:8px;\x20cursor:pointer;\x20font-size:13px;\x20user-select:none;\x22>\x0a\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20:checked=\x22wholeDoc\x22\x20@change=\x22wholeDoc\x20=\x20$event.target.checked\x22\x20/>\x0a\x20\x20\x20\x20<span>Search\x20entire\x20document\x20<span\x20style=\x22opacity:.5;\x20font-size:11px;\x22>(indexes\x20all\x20fields\x20recursively)</span></span>\x0a\x20\x20</label>\x0a\x0a\x20\x20<!--\x20Field\x20picker\x20—\x20hidden\x20when\x20wholeDoc\x20is\x20checked\x20-->\x0a\x20\x20<if\x20:=\x22!wholeDoc\x22>\x0a\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:8px;\x22>\x0a\x0a\x20\x20\x20\x20\x20\x20<label\x20style=\x22font-size:12px;\x20opacity:.6;\x22>Fields\x20to\x20index</label>\x0a\x0a\x20\x20\x20\x20\x20\x20<!--\x20Input\x20row\x20-->\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20align-items:center;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22flex:1;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<field-path-input\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:value=\x22selected\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:items=\x22items\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20placeholder=\x22Field\x20path,\x20e.g.\x20title\x20or\x20content.body\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@change=\x22selected\x20=\x20$event.detail\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<button\x20@click=\x22addField()\x22\x20:disabled=\x22!selected\x20||\x20fields.includes(selected)\x22>+</button>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20\x20\x20<!--\x20Selected\x20fields\x20tags\x20-->\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20flex-wrap:wrap;\x20gap:6px;\x20min-height:24px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<each\x20:of=\x22fields\x22\x20let:item=\x22f\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22background:var(--okdb-app-border);\x20padding:3px\x208px;\x20border-radius:4px;\x20font-size:12px;\x20display:flex;\x20align-items:center;\x20gap:4px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{\x20f\x20}}\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\x20\x20style=\x22cursor:pointer;\x20font-weight:bold;\x20opacity:.6;\x20line-height:1;\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22removeField(f)\x22>×</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</each>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22fields.length\x20===\x200\x20?\x20\x27opacity:.35;\x20font-size:12px;\x27\x20:\x20\x27display:none\x27\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(no\x20fields\x20selected)\x0a\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</if>\x0a\x0a\x20\x20<!--\x20Whole-doc\x20summary\x20when\x20checked\x20-->\x0a\x20\x20<if\x20:=\x22wholeDoc\x22>\x0a\x20\x20\x20\x20<div\x20style=\x22font-size:12px;\x20opacity:.5;\x20padding:4px\x200;\x22>\x0a\x20\x20\x20\x20\x20\x20All\x20scalar\x20leaf\x20values\x20(strings,\x20numbers,\x20booleans)\x20will\x20be\x20tokenized\x20and\x20indexed.\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</if>\x0a\x0a\x20\x20<!--\x20Derived\x20name\x20display\x20-->\x0a\x20\x20<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:4px;\x22>\x0a\x20\x20\x20\x20<label\x20style=\x22font-size:12px;\x20opacity:.6;\x22>\x0a\x20\x20\x20\x20\x20\x20Index\x20name\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.55;\x20font-size:11px;\x20font-weight:normal;\x22>(auto-derived\x20from\x20fields)</span>\x0a\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20<div\x20style=\x22font-size:13px;\x20color:var(--okdb-accent);\x20font-family:monospace;\x20padding:6px\x2010px;\x20background:var(--okdb-app-bg-deep);\x20border-radius:4px;\x20border:1px\x20solid\x20var(--okdb-app-border);\x20min-height:30px;\x20display:flex;\x20align-items:center;\x22>\x0a\x20\x20\x20\x20\x20\x20<if\x20:=\x22derivedName\x22>{{\x20derivedName\x20}}</if>\x0a\x20\x20\x20\x20\x20\x20<if\x20:=\x22!derivedName\x22><span\x20style=\x22opacity:.3;\x20font-style:italic;\x22>select\x20fields\x20first</span></if>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</div>\x0a\x0a\x20\x20<!--\x20Optional\x20label\x20override\x20-->\x0a\x20\x20<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:4px;\x22>\x0a\x20\x20\x20\x20<label\x20style=\x22font-size:12px;\x20opacity:.6;\x22>\x0a\x20\x20\x20\x20\x20\x20Custom\x20label\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.45;\x20font-size:11px;\x20font-weight:normal;\x22>(optional\x20—\x20overrides\x20the\x20auto\x20name\x20above)</span>\x0a\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20<input\x0a\x20\x20\x20\x20\x20\x20type=\x22text\x22\x0a\x20\x20\x20\x20\x20\x20placeholder=\x22e.g.\x20full,\x20title-search\x22\x0a\x20\x20\x20\x20\x20\x20:value=\x22label\x22\x0a\x20\x20\x20\x20\x20\x20@input=\x22label\x20=\x20$el.value\x22\x0a\x20\x20\x20\x20/>\x0a\x20\x20</div>\x0a\x0a\x20\x20<!--\x20Tokenizer\x20options\x20accordion\x20-->\x0a\x20\x20<div>\x0a\x20\x20\x20\x20<div\x0a\x20\x20\x20\x20\x20\x20@click=\x22tokenizerOpen\x20=\x20!tokenizerOpen\x22\x0a\x20\x20\x20\x20\x20\x20style=\x22display:flex;\x20align-items:center;\x20gap:6px;\x20cursor:pointer;\x20font-size:12px;\x20opacity:.7;\x20user-select:none;\x20padding:4px\x200;\x22>\x0a\x20\x20\x20\x20\x20\x20<ok-icon\x0a\x20\x20\x20\x20\x20\x20\x20\x20:name=\x22tokenizerOpen\x20?\x20\x27chevron-down\x27\x20:\x20\x27chevron-right\x27\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20style=\x22width:12px;height:12px;\x22>\x0a\x20\x20\x20\x20\x20\x20</ok-icon>\x0a\x20\x20\x20\x20\x20\x20Tokenizer\x20options\x0a\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20<if\x20:=\x22tokenizerOpen\x22>\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:grid;\x20grid-template-columns:160px\x201fr;\x20gap:6px\x2012px;\x20font-size:13px;\x20padding:8px\x200\x200\x2016px;\x22>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.6;\x20align-self:center;\x22>Min\x20token\x20length</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<input\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type=\x22number\x22\x20min=\x221\x22\x20max=\x2220\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:value=\x22minTokenLength\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@input=\x22minTokenLength\x20=\x20+$el.value\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22width:70px;\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20/>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.6;\x20align-self:center;\x22>Max\x20token\x20length</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<input\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type=\x22number\x22\x20min=\x224\x22\x20max=\x22256\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:value=\x22maxTokenLength\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@input=\x22maxTokenLength\x20=\x20+$el.value\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22width:70px;\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20/>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.6;\x20align-self:center;\x22>Lowercase</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<label\x20style=\x22display:flex;\x20align-items:center;\x20gap:6px;\x20cursor:pointer;\x20user-select:none;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20:checked=\x22toLower\x22\x20@change=\x22toLower\x20=\x20$event.target.checked\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:12px;\x20opacity:.6;\x22>convert\x20tokens\x20to\x20lowercase</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.6;\x20align-self:center;\x22>Keep\x20numbers</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<label\x20style=\x22display:flex;\x20align-items:center;\x20gap:6px;\x20cursor:pointer;\x20user-select:none;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20:checked=\x22keepNumbers\x22\x20@change=\x22keepNumbers\x20=\x20$event.target.checked\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:12px;\x20opacity:.6;\x22>index\x20numeric\x20tokens</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20</if>\x0a\x20\x20</div>\x0a\x0a\x20\x20<!--\x20Actions\x20-->\x0a\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20justify-content:flex-end;\x20padding-top:4px;\x20border-top:1px\x20solid\x20var(--okdb-app-border);\x22>\x0a\x20\x20\x20\x20<button\x20@click=\x22cancel()\x22>Cancel</button>\x0a\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20class=\x22btn-primary\x22\x0a\x20\x20\x20\x20\x20\x20@click=\x22save()\x22\x0a\x20\x20\x20\x20\x20\x20:disabled=\x22!canSave\x20||\x20busy\x22>\x0a\x20\x20\x20\x20\x20\x20Create\x0a\x20\x20\x20\x20</button>\x0a\x20\x20</div>\x0a\x0a</div>'};
|
|
1
|
+
const _0x34a40f=_0x2f14;function _0x1f94(){const _0x345fc7=['1179319QLtRms','type','toLower','actualName','effectiveFields','error','apiBase','208072WkVwZI','derivedName','35sebJmh','21876oApVNr','create-fts-modal','31315CXJjel','keys','API','27BjSHCq','selected','possibleFields','message','stringify','$ok','application/json','fields','close','string','map','maxTokenLength','canSave','join','shared','820006rwxyeT','push','object','13590aTJDGV','includes','38110iHBGdV','2151Ravlss','trim','label','wholeDoc','every','modal','length','geo','splice','Create\x20FTS\x20index\x20failed','364hqlpaY','indexOf','Create\x20FTS\x20error','POST','onDone','$attr','busy','\x0a<div\x20style=\x22position:relative;\x20min-width:380px;\x20display:flex;\x20flex-direction:column;\x20gap:14px;\x22>\x0a\x0a\x20\x20<if\x20:=\x22busy\x22>\x0a\x20\x20\x20\x20<ok-overlay>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22loader-center\x22>\x0a\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</div>\x0a\x20\x20\x20\x20</ok-overlay>\x0a\x20\x20</if>\x0a\x0a\x20\x20<!--\x20Whole-document\x20shortcut\x20-->\x0a\x20\x20<label\x20style=\x22display:flex;\x20align-items:center;\x20gap:8px;\x20cursor:pointer;\x20font-size:13px;\x20user-select:none;\x22>\x0a\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20:checked=\x22wholeDoc\x22\x20@change=\x22wholeDoc\x20=\x20$event.target.checked\x22\x20/>\x0a\x20\x20\x20\x20<span>Search\x20entire\x20document\x20<span\x20style=\x22opacity:.5;\x20font-size:11px;\x22>(indexes\x20all\x20fields\x20recursively)</span></span>\x0a\x20\x20</label>\x0a\x0a\x20\x20<!--\x20Field\x20picker\x20—\x20hidden\x20when\x20wholeDoc\x20is\x20checked\x20-->\x0a\x20\x20<if\x20:=\x22!wholeDoc\x22>\x0a\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:8px;\x22>\x0a\x0a\x20\x20\x20\x20\x20\x20<label\x20style=\x22font-size:12px;\x20opacity:.6;\x22>Fields\x20to\x20index</label>\x0a\x0a\x20\x20\x20\x20\x20\x20<!--\x20Input\x20row\x20-->\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20align-items:center;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22flex:1;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<field-path-input\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:value=\x22selected\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:items=\x22items\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20placeholder=\x22Field\x20path,\x20e.g.\x20title\x20or\x20content.body\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@change=\x22selected\x20=\x20$event.detail\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<button\x20@click=\x22addField()\x22\x20:disabled=\x22!selected\x20||\x20fields.includes(selected)\x22>+</button>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20\x20\x20<!--\x20Selected\x20fields\x20tags\x20-->\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20flex-wrap:wrap;\x20gap:6px;\x20min-height:24px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<each\x20:of=\x22fields\x22\x20let:item=\x22f\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22background:var(--okdb-app-border);\x20padding:3px\x208px;\x20border-radius:4px;\x20font-size:12px;\x20display:flex;\x20align-items:center;\x20gap:4px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{\x20f\x20}}\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\x20\x20style=\x22cursor:pointer;\x20font-weight:bold;\x20opacity:.6;\x20line-height:1;\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@click=\x22removeField(f)\x22>×</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</each>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20:style=\x22fields.length\x20===\x200\x20?\x20\x27opacity:.35;\x20font-size:12px;\x27\x20:\x20\x27display:none\x27\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(no\x20fields\x20selected)\x0a\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</if>\x0a\x0a\x20\x20<!--\x20Whole-doc\x20summary\x20when\x20checked\x20-->\x0a\x20\x20<if\x20:=\x22wholeDoc\x22>\x0a\x20\x20\x20\x20<div\x20style=\x22font-size:12px;\x20opacity:.5;\x20padding:4px\x200;\x22>\x0a\x20\x20\x20\x20\x20\x20All\x20scalar\x20leaf\x20values\x20(strings,\x20numbers,\x20booleans)\x20will\x20be\x20tokenized\x20and\x20indexed.\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</if>\x0a\x0a\x20\x20<!--\x20Derived\x20name\x20display\x20-->\x0a\x20\x20<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:4px;\x22>\x0a\x20\x20\x20\x20<label\x20style=\x22font-size:12px;\x20opacity:.6;\x22>\x0a\x20\x20\x20\x20\x20\x20Index\x20name\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.55;\x20font-size:11px;\x20font-weight:normal;\x22>(auto-derived\x20from\x20fields)</span>\x0a\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20<div\x20style=\x22font-size:13px;\x20color:var(--okdb-accent);\x20font-family:monospace;\x20padding:6px\x2010px;\x20background:var(--okdb-app-bg-deep);\x20border-radius:4px;\x20border:1px\x20solid\x20var(--okdb-app-border);\x20min-height:30px;\x20display:flex;\x20align-items:center;\x22>\x0a\x20\x20\x20\x20\x20\x20<if\x20:=\x22derivedName\x22>{{\x20derivedName\x20}}</if>\x0a\x20\x20\x20\x20\x20\x20<if\x20:=\x22!derivedName\x22><span\x20style=\x22opacity:.3;\x20font-style:italic;\x22>select\x20fields\x20first</span></if>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</div>\x0a\x0a\x20\x20<!--\x20Optional\x20label\x20override\x20-->\x0a\x20\x20<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:4px;\x22>\x0a\x20\x20\x20\x20<label\x20style=\x22font-size:12px;\x20opacity:.6;\x22>\x0a\x20\x20\x20\x20\x20\x20Custom\x20label\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.45;\x20font-size:11px;\x20font-weight:normal;\x22>(optional\x20—\x20overrides\x20the\x20auto\x20name\x20above)</span>\x0a\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20<input\x0a\x20\x20\x20\x20\x20\x20type=\x22text\x22\x0a\x20\x20\x20\x20\x20\x20placeholder=\x22e.g.\x20full,\x20title-search\x22\x0a\x20\x20\x20\x20\x20\x20:value=\x22label\x22\x0a\x20\x20\x20\x20\x20\x20@input=\x22label\x20=\x20$el.value\x22\x0a\x20\x20\x20\x20/>\x0a\x20\x20</div>\x0a\x0a\x20\x20<!--\x20Tokenizer\x20options\x20accordion\x20-->\x0a\x20\x20<div>\x0a\x20\x20\x20\x20<div\x0a\x20\x20\x20\x20\x20\x20@click=\x22tokenizerOpen\x20=\x20!tokenizerOpen\x22\x0a\x20\x20\x20\x20\x20\x20style=\x22display:flex;\x20align-items:center;\x20gap:6px;\x20cursor:pointer;\x20font-size:12px;\x20opacity:.7;\x20user-select:none;\x20padding:4px\x200;\x22>\x0a\x20\x20\x20\x20\x20\x20<ok-icon\x0a\x20\x20\x20\x20\x20\x20\x20\x20:name=\x22tokenizerOpen\x20?\x20\x27chevron-down\x27\x20:\x20\x27chevron-right\x27\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20style=\x22width:12px;height:12px;\x22>\x0a\x20\x20\x20\x20\x20\x20</ok-icon>\x0a\x20\x20\x20\x20\x20\x20Tokenizer\x20options\x0a\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20<if\x20:=\x22tokenizerOpen\x22>\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:grid;\x20grid-template-columns:160px\x201fr;\x20gap:6px\x2012px;\x20font-size:13px;\x20padding:8px\x200\x200\x2016px;\x22>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.6;\x20align-self:center;\x22>Min\x20token\x20length</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<input\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type=\x22number\x22\x20min=\x221\x22\x20max=\x2220\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:value=\x22minTokenLength\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@input=\x22minTokenLength\x20=\x20+$el.value\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22width:70px;\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20/>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.6;\x20align-self:center;\x22>Max\x20token\x20length</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<input\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type=\x22number\x22\x20min=\x224\x22\x20max=\x22256\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:value=\x22maxTokenLength\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@input=\x22maxTokenLength\x20=\x20+$el.value\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22width:70px;\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20/>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.6;\x20align-self:center;\x22>Lowercase</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<label\x20style=\x22display:flex;\x20align-items:center;\x20gap:6px;\x20cursor:pointer;\x20user-select:none;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20:checked=\x22toLower\x22\x20@change=\x22toLower\x20=\x20$event.target.checked\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:12px;\x20opacity:.6;\x22>convert\x20tokens\x20to\x20lowercase</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.6;\x20align-self:center;\x22>Keep\x20numbers</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<label\x20style=\x22display:flex;\x20align-items:center;\x20gap:6px;\x20cursor:pointer;\x20user-select:none;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20:checked=\x22keepNumbers\x22\x20@change=\x22keepNumbers\x20=\x20$event.target.checked\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:12px;\x20opacity:.6;\x22>index\x20numeric\x20tokens</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20</if>\x0a\x20\x20</div>\x0a\x0a\x20\x20<!--\x20Actions\x20-->\x0a\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20justify-content:flex-end;\x20padding-top:4px;\x20border-top:1px\x20solid\x20var(--okdb-app-border);\x22>\x0a\x20\x20\x20\x20<button\x20@click=\x22cancel()\x22>Cancel</button>\x0a\x20\x20\x20\x20<button\x0a\x20\x20\x20\x20\x20\x20class=\x22btn-primary\x22\x0a\x20\x20\x20\x20\x20\x20@click=\x22save()\x22\x0a\x20\x20\x20\x20\x20\x20:disabled=\x22!canSave\x20||\x20busy\x22>\x0a\x20\x20\x20\x20\x20\x20Create\x0a\x20\x20\x20\x20</button>\x0a\x20\x20</div>\x0a\x0a</div>','json','120ZseOnP','/type/','entries'];_0x1f94=function(){return _0x345fc7;};return _0x1f94();}function _0x2f14(_0x4fbdcf,_0x937487){_0x4fbdcf=_0x4fbdcf-0x77;const _0x1f94ee=_0x1f94();let _0x2f143d=_0x1f94ee[_0x4fbdcf];return _0x2f143d;}(function(_0x511d50,_0xb37c34){const _0x175939=_0x2f14,_0x33e637=_0x511d50();while(!![]){try{const _0x57681c=parseInt(_0x175939(0xa0))/0x1+parseInt(_0x175939(0xaa))/0x2*(parseInt(_0x175939(0xaf))/0x3)+parseInt(_0x175939(0x94))/0x4*(-parseInt(_0x175939(0xac))/0x5)+-parseInt(_0x175939(0x87))/0x6+parseInt(_0x175939(0xa9))/0x7*(parseInt(_0x175939(0xa7))/0x8)+-parseInt(_0x175939(0x8a))/0x9*(parseInt(_0x175939(0x89))/0xa)+parseInt(_0x175939(0x84))/0xb*(parseInt(_0x175939(0x9d))/0xc);if(_0x57681c===_0xb37c34)break;else _0x33e637['push'](_0x33e637['shift']());}catch(_0x4be7e1){_0x33e637['push'](_0x33e637['shift']());}}}(_0x1f94,0xa3a1f));import _0x50bfd9 from'@toolkit/elements/ok-icon.ok.js';import _0x17f74b from'@toolkit/core/ok-overlay.ok.js';import _0x12cc22 from'../../../components/field-path-input.ok.js';export default{'tag':_0x34a40f(0xab),'dependencies':[_0x12cc22,_0x17f74b,_0x50bfd9],'attr':{'modal':{},'type':{},'apiBase':{},'deepPaths':{},'possibleFields':{},'onDone':{}},'context':_0x3608b3=>({'busy':!0x1,'label':'','fields':[],'selected':'','wholeDoc':!0x1,'tokenizerOpen':!0x1,'minTokenLength':0x2,'maxTokenLength':0x40,'toLower':!0x0,'keepNumbers':!0x0,get 'items'(){const _0xb9e08c=_0x34a40f,_0x4d8ab8=_0x3608b3['$attr']['deepPaths'];return _0x4d8ab8&&_0xb9e08c(0x86)==typeof _0x4d8ab8&&Object[_0xb9e08c(0xad)](_0x4d8ab8)[_0xb9e08c(0x90)]?Object[_0xb9e08c(0x9f)](_0x4d8ab8)['filter'](([,_0x46319e])=>!_0x46319e[_0xb9e08c(0x8e)](_0x1399cd=>_0xb9e08c(0x86)===_0x1399cd||_0xb9e08c(0x91)===_0x1399cd))[_0xb9e08c(0x7f)](([_0x48855a,_0x3263d1])=>({'path':_0x48855a,'types':_0x3263d1,'hint':null})):(_0x3608b3[_0xb9e08c(0x99)][_0xb9e08c(0x77)]??[])[_0xb9e08c(0x7f)](_0x8aaa5d=>({'path':_0x8aaa5d,'types':[_0xb9e08c(0x7e)],'hint':null}));},get 'effectiveFields'(){const _0x334934=_0x34a40f;return this[_0x334934(0x8d)]?['*']:this[_0x334934(0x7c)];},get 'derivedName'(){const _0x597954=_0x34a40f;return this[_0x597954(0x8d)]?'*':this['fields'][_0x597954(0x82)](',');},get 'actualName'(){const _0x984de9=_0x34a40f;return this[_0x984de9(0x8c)][_0x984de9(0x8b)]()||this[_0x984de9(0xa8)];},get 'canSave'(){const _0x35bff3=_0x34a40f;return this['effectiveFields'][_0x35bff3(0x90)]>0x0;},'addField'(){const _0x2ea7a5=_0x34a40f,_0x5cb846=String(this[_0x2ea7a5(0xb0)]||'')[_0x2ea7a5(0x8b)]();_0x5cb846&&!this[_0x2ea7a5(0x7c)][_0x2ea7a5(0x88)](_0x5cb846)&&(this[_0x2ea7a5(0x7c)][_0x2ea7a5(0x85)](_0x5cb846),this[_0x2ea7a5(0xb0)]='');},'removeField'(_0x25c4c6){const _0x11c4be=_0x34a40f,_0x514ae3=this[_0x11c4be(0x7c)][_0x11c4be(0x95)](_0x25c4c6);_0x514ae3>=0x0&&this[_0x11c4be(0x7c)][_0x11c4be(0x92)](_0x514ae3,0x1);},async 'save'(){const _0x374890=_0x34a40f;if(this[_0x374890(0x81)]){this[_0x374890(0x9a)]=!0x0;try{const _0x2a56bb={'fields':this[_0x374890(0xa4)],'tokenizer':{'minTokenLength':Number(this['minTokenLength']),'maxTokenLength':Number(this[_0x374890(0x80)]),'toLower':this[_0x374890(0xa2)],'keepNumbers':this['keepNumbers']}},_0x38a364=_0x3608b3['$attr'][_0x374890(0xa6)]||__ENV__[_0x374890(0xae)],_0x306715=await fetch(_0x38a364+_0x374890(0x9e)+_0x3608b3[_0x374890(0x99)][_0x374890(0xa1)]+'/fts/'+encodeURIComponent(this[_0x374890(0xa3)]),{'method':_0x374890(0x97),'headers':{'Content-Type':_0x374890(0x7b)},'body':JSON[_0x374890(0x79)](_0x2a56bb)});if(!_0x306715['ok'])throw new Error((await _0x306715[_0x374890(0x9c)]())?.[_0x374890(0xa5)]?.[_0x374890(0x78)]||_0x306715['statusText']);await _0x3608b3[_0x374890(0x99)][_0x374890(0x8f)][_0x374890(0x7d)](),await _0x3608b3[_0x374890(0x99)][_0x374890(0x98)]?.();}catch(_0x51916d){_0x3608b3[_0x374890(0x7a)][_0x374890(0x83)]?.['toast']?.[_0x374890(0xa5)]?.(_0x51916d?.[_0x374890(0x78)]||_0x374890(0x93)),console[_0x374890(0xa5)](_0x374890(0x96),_0x51916d);}finally{this['busy']=!0x1;}}},'cancel'(){const _0x517f5b=_0x34a40f;_0x3608b3[_0x517f5b(0x99)]['modal'][_0x517f5b(0x7d)]();}}),'template':_0x34a40f(0x9b)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x19d618=_0x1b78;function _0x1b78(_0x4e0f2f,_0x47e504){_0x4e0f2f=_0x4e0f2f-0xca;const _0x43a69a=_0x43a6();let _0x1b7828=_0x43a69a[_0x4e0f2f];return _0x1b7828;}(function(_0x2d686d,_0x16dac9){const _0xfe337b=_0x1b78,_0x5b1f5a=_0x2d686d();while(!![]){try{const _0x2f75aa=parseInt(_0xfe337b(0xe5))/0x1+-parseInt(_0xfe337b(0xf3))/0x2+-parseInt(_0xfe337b(0xea))/0x3+parseInt(_0xfe337b(0xd1))/0x4*(-parseInt(_0xfe337b(0xd3))/0x5)+parseInt(_0xfe337b(0xe1))/0x6+parseInt(_0xfe337b(0xce))/0x7+-parseInt(_0xfe337b(0xf1))/0x8*(parseInt(_0xfe337b(0xdc))/0x9);if(_0x2f75aa===_0x16dac9)break;else _0x5b1f5a['push'](_0x5b1f5a['shift']());}catch(_0x4a5d21){_0x5b1f5a['push'](_0x5b1f5a['shift']());}}}(_0x43a6,0xbff92));import _0x25111a from'@toolkit/elements/ok-icon.ok.js';import _0x1886e4 from'@toolkit/core/ok-overlay.ok.js';import _0x55a44f from'../../../components/field-path-input.ok.js';export default{'tag':_0x19d618(0xfd),'dependencies':[_0x55a44f,_0x1886e4,_0x25111a],'attr':{'modal':{},'type':{},'deepPaths':{},'geoFields':{},'onDone':{}},'context':_0x1b6871=>({'busy':!0x1,'parts':[],'selected':'','isGeo':!0x1,'isUnique':!0x1,'precision':0x7,get 'items'(){const _0x5d0aad=_0x19d618,_0x28f47f=_0x1b6871[_0x5d0aad(0xe8)][_0x5d0aad(0xf8)];if(_0x28f47f&&_0x5d0aad(0xe3)==typeof _0x28f47f&&Object[_0x5d0aad(0xcf)](_0x28f47f)[_0x5d0aad(0xe2)])return Object[_0x5d0aad(0xee)](_0x28f47f)[_0x5d0aad(0xd7)](([_0x126a2a,_0x47093c])=>({'path':_0x126a2a,'types':Array[_0x5d0aad(0xed)](_0x47093c)?_0x47093c:[],'hint':Array[_0x5d0aad(0xed)](_0x47093c)&&_0x47093c['includes']('geo')?_0x5d0aad(0xef):null}));const _0x4a2610=new Set(_0x1b6871[_0x5d0aad(0xe8)][_0x5d0aad(0xf0)]??[]);return(_0x1b6871[_0x5d0aad(0xe8)][_0x5d0aad(0xd4)]??[])[_0x5d0aad(0xd7)](_0x3e7f3b=>({'path':_0x3e7f3b,'types':_0x4a2610['has'](_0x3e7f3b)?['geo']:['string'],'hint':_0x4a2610['has'](_0x3e7f3b)?'geo':null}));},get 'geoSet'(){const _0x166f4e=_0x19d618;return new Set(_0x1b6871['$attr'][_0x166f4e(0xf0)]??[]);},'addPart'(){const _0x4163c7=_0x19d618,_0x3f3867=String(this[_0x4163c7(0xfb)]||'')[_0x4163c7(0xd5)]();_0x3f3867&&!this[_0x4163c7(0xd6)]['includes'](_0x3f3867)&&(this['parts'][_0x4163c7(0xe0)](_0x3f3867),this[_0x4163c7(0xdb)][_0x4163c7(0xdd)](_0x3f3867)&&(this['isGeo']=!0x0,this[_0x4163c7(0xfc)]=!0x1),this['selected']='');},'removePart'(_0x3da5ea){const _0x5e8adf=_0x19d618,_0x240ba9=this[_0x5e8adf(0xd6)][_0x5e8adf(0xd8)](_0x3da5ea);_0x240ba9>=0x0&&this['parts'][_0x5e8adf(0xf2)](_0x240ba9,0x1);},'onGeoToggle'(_0x29daf4){const _0x9a8a23=_0x19d618;this[_0x9a8a23(0xca)]=!!_0x29daf4,this['isGeo']&&(this[_0x9a8a23(0xfc)]=!0x1);},async 'save'(){const _0x443538=_0x19d618;if(this[_0x443538(0xd6)][_0x443538(0xe2)]){this['busy']=!0x0;try{const _0x47f547={};this['isGeo']&&(_0x47f547[_0x443538(0xe9)]=_0x443538(0xef),_0x47f547['precision']=this[_0x443538(0xe4)]),this[_0x443538(0xfc)]&&!this[_0x443538(0xca)]&&(_0x47f547['unique']=!0x0);const _0x30262c={'method':'POST',...Object[_0x443538(0xcf)](_0x47f547)[_0x443538(0xe2)]?{'headers':{'Content-Type':_0x443538(0xf4)},'body':JSON[_0x443538(0xeb)](_0x47f547)}:{}},_0x551751=await fetch(_0x1b6871[_0x443538(0xda)]['stores']['okdb'][_0x443538(0xdf)]+_0x443538(0xfa)+_0x1b6871[_0x443538(0xe8)][_0x443538(0xe9)]+_0x443538(0xf9)+this[_0x443538(0xd6)][_0x443538(0xf6)]('~'),_0x30262c);if(!_0x551751['ok'])throw new Error((await _0x551751[_0x443538(0xf7)]())?.[_0x443538(0xcc)]?.[_0x443538(0xcb)]||_0x551751[_0x443538(0xe6)]);await _0x1b6871[_0x443538(0xe8)][_0x443538(0xe7)][_0x443538(0xde)](),await _0x1b6871[_0x443538(0xe8)][_0x443538(0xd2)]?.();}catch(_0x3d9605){_0x1b6871[_0x443538(0xda)][_0x443538(0xd9)]?.[_0x443538(0xcd)]?.[_0x443538(0xcc)]?.(_0x3d9605?.[_0x443538(0xcb)]||_0x443538(0xd0)),console[_0x443538(0xcc)]('Create\x20index\x20error',_0x3d9605);}finally{this[_0x443538(0xec)]=!0x1;}}},'cancel'(){const _0x54b6c1=_0x19d618;_0x1b6871[_0x54b6c1(0xe8)][_0x54b6c1(0xe7)][_0x54b6c1(0xde)]();}}),'template':_0x19d618(0xf5)};function _0x43a6(){const _0x4d0b87=['possibleFields','trim','parts','map','indexOf','shared','$ok','geoSet','6312663xShfEJ','has','close','apiBase','push','7816800DwEYxA','length','object','precision','1518880JtpvZu','statusText','modal','$attr','type','2053116WATvlS','stringify','busy','isArray','entries','geo','geoFields','8esImVM','splice','140174PiaLzG','application/json','\x0a<div\x20style=\x22position:relative;\x20min-width:380px;\x20display:flex;\x20flex-direction:column;\x20gap:14px;\x22>\x0a\x0a\x20\x20<if\x20:=\x22busy\x22>\x0a\x20\x20\x20\x20<ok-overlay>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22loader-center\x22>\x0a\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</div>\x0a\x20\x20\x20\x20</ok-overlay>\x0a\x20\x20</if>\x0a\x0a\x20\x20<!--\x20Field\x20picker\x20-->\x0a\x20\x20<div>\x0a\x20\x20\x20\x20<div\x20style=\x22font-size:11px;\x20opacity:.5;\x20margin-bottom:6px;\x20text-transform:uppercase;\x20letter-spacing:.05em;\x22>Fields</div>\x0a\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20align-items:center;\x22>\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22flex:1;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<field-path-input\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:value=\x22selected\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:items=\x22items\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20placeholder=\x22Field\x20path\x20(dot-notation)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@change=\x22selected\x20=\x20$event.detail\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20/>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20<button\x20@click=\x22addPart()\x22\x20:disabled=\x22!selected\x20||\x20parts.includes(selected)\x22>+\x20Add</button>\x0a\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20<!--\x20Parts\x20chips\x20-->\x0a\x20\x20\x20\x20<div\x20style=\x22margin-top:8px;\x20min-height:28px;\x20display:flex;\x20align-items:center;\x20gap:6px;\x20flex-wrap:wrap;\x22>\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:12px;\x20opacity:.4;\x20user-select:none;\x22>Index:</span>\x0a\x20\x20\x20\x20\x20\x20<each\x20:of=\x22parts\x22\x20let:item=\x22p\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22background:var(--okdb-app-border);\x20padding:3px\x208px;\x20border-radius:4px;\x20font-size:12px;\x20display:inline-flex;\x20align-items:center;\x20gap:4px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{\x20p\x20}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22cursor:pointer;\x20opacity:.6;\x20font-weight:bold;\x22\x20@click=\x22removePart(p)\x22>×</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20</each>\x0a\x20\x20\x20\x20\x20\x20<if\x20:=\x22isGeo\x20&&\x20parts.length\x20>\x200\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:10px;\x20color:var(--okdb-success);\x20opacity:.7;\x22>◎\x20geo</span>\x0a\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20<if\x20:=\x22isUnique\x20&&\x20!isGeo\x20&&\x20parts.length\x20>\x200\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:10px;\x20color:var(--okdb-warning);\x20opacity:.7;\x22>◆\x20unique</span>\x0a\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.3;\x20font-size:12px;\x22\x20:style=\x22parts.length\x20?\x20\x27display:none\x27\x20:\x20\x27\x27\x22>(none\x20yet)</span>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</div>\x0a\x0a\x20\x20<!--\x20Index\x20type\x20options\x20-->\x0a\x20\x20<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:6px;\x22>\x0a\x0a\x20\x20\x20\x20<label\x20style=\x22font-size:12px;\x20display:flex;\x20align-items:center;\x20gap:6px;\x20cursor:pointer;\x20user-select:none;\x22>\x0a\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20:checked=\x22isGeo\x22\x20@change=\x22onGeoToggle($event.target.checked)\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20◎\x20Geo\x20index\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.4;\x20font-size:11px;\x22>(field\x20stores\x20<code\x20style=\x22font-size:11px;\x22>{\x20lat,\x20lon\x20}</code>\x20coordinates)</span>\x0a\x20\x20\x20\x20</label>\x0a\x0a\x20\x20\x20\x20<if\x20:=\x22isGeo\x22>\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20align-items:center;\x20gap:8px;\x20padding-left:22px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:11px;\x20opacity:.5;\x22>Precision</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22range\x22\x20min=\x224\x22\x20max=\x229\x22\x20step=\x221\x22\x20:value=\x22precision\x22\x20@input=\x22precision\x20=\x20Number($event.target.value)\x22\x20style=\x22width:120px;\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:12px;\x20min-width:16px;\x22>{{\x20precision\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:11px;\x20opacity:.35;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{\x20precision\x20<=\x206\x20?\x20\x27~\x27\x20+\x20[39,\x204.9,\x201.2][precision\x20-\x204]\x20+\x20\x27\x20km\x20cells\x27\x20:\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27~\x27\x20+\x20[153,\x2038,\x204.8][precision\x20-\x207]\x20+\x20\x27\x20m\x20cells\x27\x20}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20</if>\x0a\x0a\x20\x20\x20\x20<label\x20style=\x22font-size:12px;\x20display:flex;\x20align-items:center;\x20gap:6px;\x20cursor:pointer;\x20user-select:none;\x22\x20:style=\x22isGeo\x20?\x20\x27opacity:.35;\x20pointer-events:none;\x27\x20:\x20\x27\x27\x22>\x0a\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20:checked=\x22isUnique\x22\x20:disabled=\x22isGeo\x22\x20@change=\x22isUnique\x20=\x20$event.target.checked\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20◆\x20Unique\x20index\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.4;\x20font-size:11px;\x22>(enforces\x20one\x20record\x20per\x20index\x20key)</span>\x0a\x20\x20\x20\x20</label>\x0a\x0a\x20\x20</div>\x0a\x0a\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20justify-content:flex-end;\x20padding-top:4px;\x20border-top:1px\x20solid\x20var(--okdb-app-border);\x22>\x0a\x20\x20\x20\x20<button\x20@click=\x22cancel()\x22>Cancel</button>\x0a\x20\x20\x20\x20<button\x20@click=\x22save()\x22\x20:disabled=\x22!parts.length\x20||\x20busy\x22>Create\x20Index</button>\x0a\x20\x20</div>\x0a\x0a</div>\x0a','join','json','deepPaths','/index/','/type/','selected','isUnique','create-index-modal','isGeo','message','error','toast','2158345aVaTQP','keys','Create\x20index\x20failed','3551308vDqyQB','onDone','5ukqCBi'];_0x43a6=function(){return _0x4d0b87;};return _0x43a6();}
|
|
1
|
+
const _0x34ca09=_0x3a97;(function(_0x3dba72,_0x256c6b){const _0x2b5f5f=_0x3a97,_0x5d35ed=_0x3dba72();while(!![]){try{const _0x2dd8fd=parseInt(_0x2b5f5f(0xba))/0x1+parseInt(_0x2b5f5f(0xd9))/0x2*(parseInt(_0x2b5f5f(0xbf))/0x3)+parseInt(_0x2b5f5f(0xde))/0x4+parseInt(_0x2b5f5f(0xc0))/0x5*(-parseInt(_0x2b5f5f(0xe0))/0x6)+-parseInt(_0x2b5f5f(0xb6))/0x7+parseInt(_0x2b5f5f(0xcd))/0x8*(parseInt(_0x2b5f5f(0xd8))/0x9)+parseInt(_0x2b5f5f(0xb8))/0xa*(-parseInt(_0x2b5f5f(0xd5))/0xb);if(_0x2dd8fd===_0x256c6b)break;else _0x5d35ed['push'](_0x5d35ed['shift']());}catch(_0x98a2fa){_0x5d35ed['push'](_0x5d35ed['shift']());}}}(_0x16af,0x37636));import _0x55c487 from'@toolkit/elements/ok-icon.ok.js';import _0x4cf1d1 from'@toolkit/core/ok-overlay.ok.js';import _0x30dd25 from'../../../components/field-path-input.ok.js';function _0x3a97(_0x195395,_0x3b185c){_0x195395=_0x195395-0xae;const _0x16afd0=_0x16af();let _0x3a97d4=_0x16afd0[_0x195395];return _0x3a97d4;}function _0x16af(){const _0x2d8d9a=['geoFields','104347aebjqY','object','shared','length','$ok','422580OtbUuS','50vTqqeD','stores','string','close','indexOf','deepPaths','POST','\x0a<div\x20style=\x22position:relative;\x20min-width:380px;\x20display:flex;\x20flex-direction:column;\x20gap:14px;\x22>\x0a\x0a\x20\x20<if\x20:=\x22busy\x22>\x0a\x20\x20\x20\x20<ok-overlay>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22loader-center\x22>\x0a\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</div>\x0a\x20\x20\x20\x20</ok-overlay>\x0a\x20\x20</if>\x0a\x0a\x20\x20<!--\x20Field\x20picker\x20-->\x0a\x20\x20<div>\x0a\x20\x20\x20\x20<div\x20style=\x22font-size:11px;\x20opacity:.5;\x20margin-bottom:6px;\x20text-transform:uppercase;\x20letter-spacing:.05em;\x22>Fields</div>\x0a\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20align-items:center;\x22>\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22flex:1;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<field-path-input\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:value=\x22selected\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:items=\x22items\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20placeholder=\x22Field\x20path\x20(dot-notation)\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20@change=\x22selected\x20=\x20$event.detail\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20/>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20<button\x20@click=\x22addPart()\x22\x20:disabled=\x22!selected\x20||\x20parts.includes(selected)\x22>+\x20Add</button>\x0a\x20\x20\x20\x20</div>\x0a\x0a\x20\x20\x20\x20<!--\x20Parts\x20chips\x20-->\x0a\x20\x20\x20\x20<div\x20style=\x22margin-top:8px;\x20min-height:28px;\x20display:flex;\x20align-items:center;\x20gap:6px;\x20flex-wrap:wrap;\x22>\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:12px;\x20opacity:.4;\x20user-select:none;\x22>Index:</span>\x0a\x20\x20\x20\x20\x20\x20<each\x20:of=\x22parts\x22\x20let:item=\x22p\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22background:var(--okdb-app-border);\x20padding:3px\x208px;\x20border-radius:4px;\x20font-size:12px;\x20display:inline-flex;\x20align-items:center;\x20gap:4px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{\x20p\x20}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22cursor:pointer;\x20opacity:.6;\x20font-weight:bold;\x22\x20@click=\x22removePart(p)\x22>×</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20</each>\x0a\x20\x20\x20\x20\x20\x20<if\x20:=\x22isGeo\x20&&\x20parts.length\x20>\x200\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:10px;\x20color:var(--okdb-success);\x20opacity:.7;\x22>◎\x20geo</span>\x0a\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20<if\x20:=\x22isUnique\x20&&\x20!isGeo\x20&&\x20parts.length\x20>\x200\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:10px;\x20color:var(--okdb-warning);\x20opacity:.7;\x22>◆\x20unique</span>\x0a\x20\x20\x20\x20\x20\x20</if>\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.3;\x20font-size:12px;\x22\x20:style=\x22parts.length\x20?\x20\x27display:none\x27\x20:\x20\x27\x27\x22>(none\x20yet)</span>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20</div>\x0a\x0a\x20\x20<!--\x20Index\x20type\x20options\x20-->\x0a\x20\x20<div\x20style=\x22display:flex;\x20flex-direction:column;\x20gap:6px;\x22>\x0a\x0a\x20\x20\x20\x20<label\x20style=\x22font-size:12px;\x20display:flex;\x20align-items:center;\x20gap:6px;\x20cursor:pointer;\x20user-select:none;\x22>\x0a\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20:checked=\x22isGeo\x22\x20@change=\x22onGeoToggle($event.target.checked)\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20◎\x20Geo\x20index\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.4;\x20font-size:11px;\x22>(field\x20stores\x20<code\x20style=\x22font-size:11px;\x22>{\x20lat,\x20lon\x20}</code>\x20coordinates)</span>\x0a\x20\x20\x20\x20</label>\x0a\x0a\x20\x20\x20\x20<if\x20:=\x22isGeo\x22>\x0a\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:flex;\x20align-items:center;\x20gap:8px;\x20padding-left:22px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:11px;\x20opacity:.5;\x22>Precision</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22range\x22\x20min=\x224\x22\x20max=\x229\x22\x20step=\x221\x22\x20:value=\x22precision\x22\x20@input=\x22precision\x20=\x20Number($event.target.value)\x22\x20style=\x22width:120px;\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:12px;\x20min-width:16px;\x22>{{\x20precision\x20}}</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22font-size:11px;\x20opacity:.35;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{\x20precision\x20<=\x206\x20?\x20\x27~\x27\x20+\x20[39,\x204.9,\x201.2][precision\x20-\x204]\x20+\x20\x27\x20km\x20cells\x27\x20:\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27~\x27\x20+\x20[153,\x2038,\x204.8][precision\x20-\x207]\x20+\x20\x27\x20m\x20cells\x27\x20}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20</if>\x0a\x0a\x20\x20\x20\x20<label\x20style=\x22font-size:12px;\x20display:flex;\x20align-items:center;\x20gap:6px;\x20cursor:pointer;\x20user-select:none;\x22\x20:style=\x22isGeo\x20?\x20\x27opacity:.35;\x20pointer-events:none;\x27\x20:\x20\x27\x27\x22>\x0a\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20:checked=\x22isUnique\x22\x20:disabled=\x22isGeo\x22\x20@change=\x22isUnique\x20=\x20$event.target.checked\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20◆\x20Unique\x20index\x0a\x20\x20\x20\x20\x20\x20<span\x20style=\x22opacity:.4;\x20font-size:11px;\x22>(enforces\x20one\x20record\x20per\x20index\x20key)</span>\x0a\x20\x20\x20\x20</label>\x0a\x0a\x20\x20</div>\x0a\x0a\x20\x20<div\x20style=\x22display:flex;\x20gap:8px;\x20justify-content:flex-end;\x20padding-top:4px;\x20border-top:1px\x20solid\x20var(--okdb-app-border);\x22>\x0a\x20\x20\x20\x20<button\x20@click=\x22cancel()\x22>Cancel</button>\x0a\x20\x20\x20\x20<button\x20@click=\x22save()\x22\x20:disabled=\x22!parts.length\x20||\x20busy\x22>Create\x20Index</button>\x0a\x20\x20</div>\x0a\x0a</div>\x0a','type','Create\x20index\x20error','selected','apiBase','precision','8johJQv','/type/','busy','isGeo','keys','okdb','map','includes','11nLRpiA','push','toast','3484062oEsWCl','4EuntqR','parts','message','isArray','application/json','1438792vlLMHV','modal','57066HOfgVu','error','stringify','has','join','Create\x20index\x20failed','$attr','statusText','isUnique','entries','224504jmeXhV','geo','7788310RHCaFE'];_0x16af=function(){return _0x2d8d9a;};return _0x16af();}export default{'tag':'create-index-modal','dependencies':[_0x30dd25,_0x4cf1d1,_0x55c487],'attr':{'modal':{},'type':{},'deepPaths':{},'geoFields':{},'onDone':{}},'context':_0x1ffa03=>({'busy':!0x1,'parts':[],'selected':'','isGeo':!0x1,'isUnique':!0x1,'precision':0x7,get 'items'(){const _0x4e0162=_0x3a97,_0x190eea=_0x1ffa03[_0x4e0162(0xb2)][_0x4e0162(0xc5)];if(_0x190eea&&_0x4e0162(0xbb)==typeof _0x190eea&&Object[_0x4e0162(0xd1)](_0x190eea)[_0x4e0162(0xbd)])return Object[_0x4e0162(0xb5)](_0x190eea)[_0x4e0162(0xd3)](([_0x411b60,_0x2a6382])=>({'path':_0x411b60,'types':Array['isArray'](_0x2a6382)?_0x2a6382:[],'hint':Array[_0x4e0162(0xdc)](_0x2a6382)&&_0x2a6382[_0x4e0162(0xd4)]('geo')?_0x4e0162(0xb7):null}));const _0x3a71d1=new Set(_0x1ffa03[_0x4e0162(0xb2)][_0x4e0162(0xb9)]??[]);return(_0x1ffa03[_0x4e0162(0xb2)]['possibleFields']??[])['map'](_0x2bb15f=>({'path':_0x2bb15f,'types':_0x3a71d1[_0x4e0162(0xaf)](_0x2bb15f)?[_0x4e0162(0xb7)]:[_0x4e0162(0xc2)],'hint':_0x3a71d1['has'](_0x2bb15f)?'geo':null}));},get 'geoSet'(){const _0x3d59cc=_0x3a97;return new Set(_0x1ffa03[_0x3d59cc(0xb2)]['geoFields']??[]);},'addPart'(){const _0x236f6f=_0x3a97,_0x11e960=String(this[_0x236f6f(0xca)]||'')['trim']();_0x11e960&&!this[_0x236f6f(0xda)][_0x236f6f(0xd4)](_0x11e960)&&(this[_0x236f6f(0xda)][_0x236f6f(0xd6)](_0x11e960),this['geoSet'][_0x236f6f(0xaf)](_0x11e960)&&(this[_0x236f6f(0xd0)]=!0x0,this['isUnique']=!0x1),this[_0x236f6f(0xca)]='');},'removePart'(_0x2e62be){const _0x31d43e=_0x3a97,_0x5cc549=this[_0x31d43e(0xda)][_0x31d43e(0xc4)](_0x2e62be);_0x5cc549>=0x0&&this[_0x31d43e(0xda)]['splice'](_0x5cc549,0x1);},'onGeoToggle'(_0x35d1e8){const _0x313f27=_0x3a97;this[_0x313f27(0xd0)]=!!_0x35d1e8,this[_0x313f27(0xd0)]&&(this[_0x313f27(0xb4)]=!0x1);},async 'save'(){const _0x37e31b=_0x3a97;if(this[_0x37e31b(0xda)]['length']){this[_0x37e31b(0xcf)]=!0x0;try{const _0x43fb5c={};this[_0x37e31b(0xd0)]&&(_0x43fb5c[_0x37e31b(0xc8)]=_0x37e31b(0xb7),_0x43fb5c['precision']=this[_0x37e31b(0xcc)]),this[_0x37e31b(0xb4)]&&!this['isGeo']&&(_0x43fb5c['unique']=!0x0);const _0x4d61a0={'method':_0x37e31b(0xc6),...Object[_0x37e31b(0xd1)](_0x43fb5c)['length']?{'headers':{'Content-Type':_0x37e31b(0xdd)},'body':JSON[_0x37e31b(0xae)](_0x43fb5c)}:{}},_0x43cbd7=await fetch(_0x1ffa03['$ok'][_0x37e31b(0xc1)][_0x37e31b(0xd2)][_0x37e31b(0xcb)]+_0x37e31b(0xce)+_0x1ffa03[_0x37e31b(0xb2)]['type']+'/index/'+this[_0x37e31b(0xda)][_0x37e31b(0xb0)]('~'),_0x4d61a0);if(!_0x43cbd7['ok'])throw new Error((await _0x43cbd7['json']())?.[_0x37e31b(0xe1)]?.[_0x37e31b(0xdb)]||_0x43cbd7[_0x37e31b(0xb3)]);await _0x1ffa03[_0x37e31b(0xb2)][_0x37e31b(0xdf)][_0x37e31b(0xc3)](),await _0x1ffa03[_0x37e31b(0xb2)]['onDone']?.();}catch(_0x21b907){_0x1ffa03[_0x37e31b(0xbe)][_0x37e31b(0xbc)]?.[_0x37e31b(0xd7)]?.[_0x37e31b(0xe1)]?.(_0x21b907?.[_0x37e31b(0xdb)]||_0x37e31b(0xb1)),console['error'](_0x37e31b(0xc9),_0x21b907);}finally{this['busy']=!0x1;}}},'cancel'(){const _0x404289=_0x3a97;_0x1ffa03[_0x404289(0xb2)][_0x404289(0xdf)]['close']();}}),'template':_0x34ca09(0xc7)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
var _0x24e9e8=_0x1c23;(function(_0x28d71d,_0x263dda){var _0x5881c7=_0x1c23,_0xed325c=_0x28d71d();while(!![]){try{var _0x3b62a8=-parseInt(_0x5881c7(0x1c1))/0x1*(parseInt(_0x5881c7(0x1c0))/0x2)+-parseInt(_0x5881c7(0x1b9))/0x3+-parseInt(_0x5881c7(0x1c2))/0x4*(-parseInt(_0x5881c7(0x1b6))/0x5)+-parseInt(_0x5881c7(0x1be))/0x6*(parseInt(_0x5881c7(0x1bf))/0x7)+-parseInt(_0x5881c7(0x1c3))/0x8+-parseInt(_0x5881c7(0x1c4))/0x9*(parseInt(_0x5881c7(0x1bd))/0xa)+-parseInt(_0x5881c7(0x1b8))/0xb*(-parseInt(_0x5881c7(0x1b7))/0xc);if(_0x3b62a8===_0x263dda)break;else _0xed325c['push'](_0xed325c['shift']());}catch(_0x40f8fc){_0xed325c['push'](_0xed325c['shift']());}}}(_0x104f,0x655fd));import _0x13e821 from'../../embeddings/parts/pipeline-create-panel.ok.js';function _0x1c23(_0x5237f7,_0x2e000b){_0x5237f7=_0x5237f7-0x1b3;var _0x104f86=_0x104f();var _0x1c23c8=_0x104f86[_0x5237f7];return _0x1c23c8;}export default{'tag':_0x24e9e8(0x1bb),'dependencies':[_0x13e821],'attr':{'modal':{},'type':{},'env':{},'onDone':{}},'context':_0x9e6c09=>({get 'typeName'(){var _0x2a1030=_0x24e9e8;return String(_0x9e6c09['$attr']['type']||'')[_0x2a1030(0x1b3)]();},get 'envName'(){var _0x526793=_0x24e9e8;return String(_0x9e6c09[_0x526793(0x1ba)]['env']||'')[_0x526793(0x1b3)]()||_0x526793(0x1b4);},async 'onCreated'(_0x1bf397){var _0x1111f2=_0x24e9e8;await _0x9e6c09['$attr'][_0x1111f2(0x1b5)]?.['close']?.(),await _0x9e6c09['$attr'][_0x1111f2(0x1c5)]?.(_0x1bf397);}}),'template':_0x24e9e8(0x1bc)};function _0x104f(){var _0x5a4d55=['374ReiCPm','4226clMqCa','4ongkro','877016ahCSDp','18rGLEGX','onDone','trim','default','modal','2792235WCtTnA','651900YSGyGg','319cZZBdm','994053zTeOii','$attr','create-pipeline-modal','\x0a<div\x20style=\x22width:min(92vw,\x20920px);\x20max-width:920px;\x20max-height:min(88vh,\x20960px);\x20overflow:auto;\x20display:flex;\x20flex-direction:column;\x20gap:12px;\x20padding-right:4px;\x22>\x0a\x20\x20<div\x20style=\x22font-size:12px;\x20opacity:.55;\x20line-height:1.6;\x22>\x0a\x20\x20\x20\x20Creating\x20a\x20pipeline\x20for\x20<b>{{\x20typeName\x20}}</b>\x20in\x20<b>{{\x20envName\x20}}</b>.\x0a\x20\x20\x20\x20The\x20source\x20type\x20stays\x20locked\x20in\x20this\x20contextual\x20DB\x20flow,\x20and\x20queue\x20workers\x20remain\x20available\x20from\x20the\x20Queue\x20section.\x0a\x20\x20</div>\x0a\x0a\x20\x20<pipeline-create-panel\x0a\x20\x20\x20\x20:locktype=\x22typeName\x22\x0a\x20\x20\x20\x20:lockenv=\x22envName\x22\x0a\x20\x20\x20\x20:locktypestrict=\x22true\x22\x0a\x20\x20\x20\x20:hidequeueworker=\x22true\x22\x0a\x20\x20\x20\x20@created=\x22onCreated($event.detail)\x22\x0a\x20\x20/>\x0a</div>','26470fTDRhZ','18bDOKel','1124921JrCZAi'];_0x104f=function(){return _0x5a4d55;};return _0x104f();}
|