@kedem/okdb 1.0.0 → 1.0.1
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/okdb-data/default/data.mdb +0 -0
- package/okdb-data/default/lock.mdb +0 -0
- package/okdb-data/~log/data.mdb +0 -0
- package/okdb-data/~log/lock.mdb +0 -0
- package/okdb-data/~system/data.mdb +0 -0
- package/okdb-data/~system/lock.mdb +0 -0
- package/okdb.js +1 -1
- package/package.json +1 -1
- 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/view-models/type-query-vm.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x4877(){const _0x1d918e=['onDone','54IYZtrC','5690100WHINOG','4782656pclkxW','name','Failed\x20to\x20create\x20environment','7227yyTZkf','5GwLULY','26984111JdXCkZ','busy','create-env-modal','$attr','486073kIXTpm','4336wnUYOk','13123RdIMuM','trim','statusText','4292373QAnFwc','message','modal','112aaUFPD','close','\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>','length','error'];_0x4877=function(){return _0x1d918e;};return _0x4877();}const _0x1e89d1=_0x9a35;(function(_0x1f101a,_0x50a41f){const _0x1e7919=_0x9a35,_0x1a1ede=_0x1f101a();while(!![]){try{const _0x15b566=parseInt(_0x1e7919(0x12d))/0x1*(-parseInt(_0x1e7919(0x11a))/0x2)+-parseInt(_0x1e7919(0x117))/0x3+parseInt(_0x1e7919(0x122))/0x4*(-parseInt(_0x1e7919(0x126))/0x5)+parseInt(_0x1e7919(0x120))/0x6*(parseInt(_0x1e7919(0x12b))/0x7)+-parseInt(_0x1e7919(0x12c))/0x8*(-parseInt(_0x1e7919(0x125))/0x9)+parseInt(_0x1e7919(0x121))/0xa+parseInt(_0x1e7919(0x127))/0xb;if(_0x15b566===_0x50a41f)break;else _0x1a1ede['push'](_0x1a1ede['shift']());}catch(_0x5977b9){_0x1a1ede['push'](_0x1a1ede['shift']());}}}(_0x4877,0xb0031));function _0x9a35(_0x1ef3de,_0xb9e756){_0x1ef3de=_0x1ef3de-0x116;const _0x4877be=_0x4877();let _0x9a35c7=_0x4877be[_0x1ef3de];return _0x9a35c7;}export default{'tag':_0x1e89d1(0x129),'attr':{'modal':{},'onDone':{}},'context':_0x27d38f=>({'busy':!0x1,'name':'','sync':!0x0,'compression':!0x0,'error':null,get 'canSave'(){const _0x163ef0=_0x1e89d1;return this[_0x163ef0(0x123)]['trim']()[_0x163ef0(0x11d)]>0x0&&!this[_0x163ef0(0x128)];},async 'save'(){const _0x282587=_0x1e89d1,_0x38d6d7=this['name'][_0x282587(0x12e)]();if(_0x38d6d7){this[_0x282587(0x11e)]=null,this[_0x282587(0x128)]=!0x0;try{const _0x35c364=await fetch(__ENV__['API']+'/envs',{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON['stringify']({'name':_0x38d6d7,'sync':this['sync'],'compression':this['compression']})});if(!_0x35c364['ok']){const _0x3fe26c=await _0x35c364['json']()['catch'](()=>({}));throw new Error(_0x3fe26c?.['error']?.['message']||_0x35c364[_0x282587(0x116)]);}await _0x27d38f[_0x282587(0x12a)][_0x282587(0x119)][_0x282587(0x11b)](),await _0x27d38f['$attr'][_0x282587(0x11f)]?.(_0x38d6d7);}catch(_0x996964){this[_0x282587(0x11e)]=_0x996964?.[_0x282587(0x118)]||_0x282587(0x124);}finally{this[_0x282587(0x128)]=!0x1;}}},'cancel'(){const _0x76d419=_0x1e89d1;_0x27d38f['$attr'][_0x76d419(0x119)][_0x76d419(0x11b)]();}}),'template':_0x1e89d1(0x11c)};
|
|
@@ -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 _0xb79aee=_0x5e19;function _0x5e19(_0x37ac92,_0x53a219){_0x37ac92=_0x37ac92-0x155;const _0x26e571=_0x26e5();let _0x5e1923=_0x26e571[_0x37ac92];return _0x5e1923;}(function(_0x4da62f,_0x23ff1d){const _0x154a7d=_0x5e19,_0x308106=_0x4da62f();while(!![]){try{const _0x754717=parseInt(_0x154a7d(0x159))/0x1+-parseInt(_0x154a7d(0x17c))/0x2+parseInt(_0x154a7d(0x15b))/0x3*(-parseInt(_0x154a7d(0x171))/0x4)+parseInt(_0x154a7d(0x162))/0x5+parseInt(_0x154a7d(0x156))/0x6+parseInt(_0x154a7d(0x173))/0x7+parseInt(_0x154a7d(0x158))/0x8;if(_0x754717===_0x23ff1d)break;else _0x308106['push'](_0x308106['shift']());}catch(_0x20105f){_0x308106['push'](_0x308106['shift']());}}}(_0x26e5,0x87351));import _0x1c6a5c from'@toolkit/elements/ok-icon.ok.js';function _0x26e5(){const _0x1efdfe=['$attr','busy','keys','indexOf','includes','every','error','minTokenLength','derivedName','close','17944xOLGcL','API','5733273DhCYwI','filter','modal','join','\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>','message','deepPaths','push','effectiveFields','1538604Oelmvr','actualName','possibleFields','fields','/type/','toast','object','json','173304ftWgKt','label','5742264icrYvN','142392NuJpIt','trim','588KhvIck','onDone','application/json','maxTokenLength','toLower','Create\x20FTS\x20index\x20failed','canSave','2471345WxYGAo','length','wholeDoc','Create\x20FTS\x20error','selected'];_0x26e5=function(){return _0x1efdfe;};return _0x26e5();}import _0x19ce51 from'@toolkit/core/ok-overlay.ok.js';import _0x341f2b from'../../../components/field-path-input.ok.js';export default{'tag':'create-fts-modal','dependencies':[_0x341f2b,_0x19ce51,_0x1c6a5c],'attr':{'modal':{},'type':{},'apiBase':{},'deepPaths':{},'possibleFields':{},'onDone':{}},'context':_0x83dec9=>({'busy':!0x1,'label':'','fields':[],'selected':'','wholeDoc':!0x1,'tokenizerOpen':!0x1,'minTokenLength':0x2,'maxTokenLength':0x40,'toLower':!0x0,'keepNumbers':!0x0,get 'items'(){const _0x35a99d=_0x5e19,_0x5a48a8=_0x83dec9[_0x35a99d(0x167)][_0x35a99d(0x179)];return _0x5a48a8&&'object'==typeof _0x5a48a8&&Object[_0x35a99d(0x169)](_0x5a48a8)[_0x35a99d(0x163)]?Object['entries'](_0x5a48a8)[_0x35a99d(0x174)](([,_0x5b8981])=>!_0x5b8981[_0x35a99d(0x16c)](_0x150d5b=>_0x35a99d(0x182)===_0x150d5b||'geo'===_0x150d5b))['map'](([_0x25dc3b,_0x506dcc])=>({'path':_0x25dc3b,'types':_0x506dcc,'hint':null})):(_0x83dec9[_0x35a99d(0x167)][_0x35a99d(0x17e)]??[])['map'](_0x10e1c2=>({'path':_0x10e1c2,'types':['string'],'hint':null}));},get 'effectiveFields'(){const _0x548a36=_0x5e19;return this[_0x548a36(0x164)]?['*']:this[_0x548a36(0x17f)];},get 'derivedName'(){const _0xb1d806=_0x5e19;return this[_0xb1d806(0x164)]?'*':this['fields'][_0xb1d806(0x176)](',');},get 'actualName'(){const _0x18f4df=_0x5e19;return this[_0x18f4df(0x157)]['trim']()||this[_0x18f4df(0x16f)];},get 'canSave'(){const _0x445b0a=_0x5e19;return this['effectiveFields'][_0x445b0a(0x163)]>0x0;},'addField'(){const _0x212def=_0x5e19,_0x1b7241=String(this[_0x212def(0x166)]||'')[_0x212def(0x15a)]();_0x1b7241&&!this[_0x212def(0x17f)][_0x212def(0x16b)](_0x1b7241)&&(this['fields'][_0x212def(0x17a)](_0x1b7241),this['selected']='');},'removeField'(_0x33ec6e){const _0x59d506=_0x5e19,_0x16cfcd=this[_0x59d506(0x17f)][_0x59d506(0x16a)](_0x33ec6e);_0x16cfcd>=0x0&&this['fields']['splice'](_0x16cfcd,0x1);},async 'save'(){const _0x51a270=_0x5e19;if(this[_0x51a270(0x161)]){this[_0x51a270(0x168)]=!0x0;try{const _0x8eca91={'fields':this[_0x51a270(0x17b)],'tokenizer':{'minTokenLength':Number(this[_0x51a270(0x16e)]),'maxTokenLength':Number(this[_0x51a270(0x15e)]),'toLower':this[_0x51a270(0x15f)],'keepNumbers':this['keepNumbers']}},_0x477ddd=_0x83dec9['$attr']['apiBase']||__ENV__[_0x51a270(0x172)],_0x18ff7a=await fetch(_0x477ddd+_0x51a270(0x180)+_0x83dec9[_0x51a270(0x167)]['type']+'/fts/'+encodeURIComponent(this[_0x51a270(0x17d)]),{'method':'POST','headers':{'Content-Type':_0x51a270(0x15d)},'body':JSON['stringify'](_0x8eca91)});if(!_0x18ff7a['ok'])throw new Error((await _0x18ff7a[_0x51a270(0x155)]())?.['error']?.[_0x51a270(0x178)]||_0x18ff7a['statusText']);await _0x83dec9[_0x51a270(0x167)][_0x51a270(0x175)][_0x51a270(0x170)](),await _0x83dec9[_0x51a270(0x167)][_0x51a270(0x15c)]?.();}catch(_0x3637b5){_0x83dec9['$ok']['shared']?.[_0x51a270(0x181)]?.[_0x51a270(0x16d)]?.(_0x3637b5?.[_0x51a270(0x178)]||_0x51a270(0x160)),console[_0x51a270(0x16d)](_0x51a270(0x165),_0x3637b5);}finally{this['busy']=!0x1;}}},'cancel'(){const _0x3b4f72=_0x5e19;_0x83dec9[_0x3b4f72(0x167)][_0x3b4f72(0x175)][_0x3b4f72(0x170)]();}}),'template':_0xb79aee(0x177)};
|
|
@@ -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
|
+
function _0x81fb(){const _0x308c00=['18955057qUnkmg','create-index-modal','application/json','entries','$attr','unique','splice','isGeo','busy','geoSet','geoFields','stores','possibleFields','parts','string','113074ctdXnr','/type/','geo','modal','precision','type','has','statusText','deepPaths','message','join','indexOf','trim','map','1434378Gfqhej','POST','/index/','isArray','31770NWBTDa','2862yrHKwL','Create\x20index\x20error','shared','stringify','26665wjrjiO','length','error','12zgevqI','json','keys','1316vBlctW','okdb','$ok','includes','4767590tijLfg','11200nDcmby','\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','10kvFqCb','2824IYcBpK'];_0x81fb=function(){return _0x308c00;};return _0x81fb();}function _0x969e(_0x542dc4,_0xb430c9){_0x542dc4=_0x542dc4-0x11e;const _0x81fb56=_0x81fb();let _0x969e0b=_0x81fb56[_0x542dc4];return _0x969e0b;}const _0x41f1a7=_0x969e;(function(_0x1ac050,_0xfeb985){const _0x35241e=_0x969e,_0x4a8507=_0x1ac050();while(!![]){try{const _0xe154ad=-parseInt(_0x35241e(0x14c))/0x1*(parseInt(_0x35241e(0x13b))/0x2)+-parseInt(_0x35241e(0x125))/0x3+parseInt(_0x35241e(0x134))/0x4*(parseInt(_0x35241e(0x12e))/0x5)+parseInt(_0x35241e(0x12a))/0x6*(-parseInt(_0x35241e(0x139))/0x7)+parseInt(_0x35241e(0x13c))/0x8*(-parseInt(_0x35241e(0x129))/0x9)+parseInt(_0x35241e(0x138))/0xa+-parseInt(_0x35241e(0x13d))/0xb*(-parseInt(_0x35241e(0x131))/0xc);if(_0xe154ad===_0xfeb985)break;else _0x4a8507['push'](_0x4a8507['shift']());}catch(_0x34dca9){_0x4a8507['push'](_0x4a8507['shift']());}}}(_0x81fb,0xdc255));import _0x14e8bf from'@toolkit/elements/ok-icon.ok.js';import _0x55a5a8 from'@toolkit/core/ok-overlay.ok.js';import _0x1b4800 from'../../../components/field-path-input.ok.js';export default{'tag':_0x41f1a7(0x13e),'dependencies':[_0x1b4800,_0x55a5a8,_0x14e8bf],'attr':{'modal':{},'type':{},'deepPaths':{},'geoFields':{},'onDone':{}},'context':_0x559000=>({'busy':!0x1,'parts':[],'selected':'','isGeo':!0x1,'isUnique':!0x1,'precision':0x7,get 'items'(){const _0x4e0fce=_0x41f1a7,_0x4e9418=_0x559000[_0x4e0fce(0x141)][_0x4e0fce(0x11f)];if(_0x4e9418&&'object'==typeof _0x4e9418&&Object[_0x4e0fce(0x133)](_0x4e9418)[_0x4e0fce(0x12f)])return Object[_0x4e0fce(0x140)](_0x4e9418)[_0x4e0fce(0x124)](([_0x286cb9,_0x4b68f4])=>({'path':_0x286cb9,'types':Array[_0x4e0fce(0x128)](_0x4b68f4)?_0x4b68f4:[],'hint':Array[_0x4e0fce(0x128)](_0x4b68f4)&&_0x4b68f4['includes'](_0x4e0fce(0x14e))?'geo':null}));const _0x29d43f=new Set(_0x559000[_0x4e0fce(0x141)][_0x4e0fce(0x147)]??[]);return(_0x559000[_0x4e0fce(0x141)][_0x4e0fce(0x149)]??[])[_0x4e0fce(0x124)](_0x22af7a=>({'path':_0x22af7a,'types':_0x29d43f['has'](_0x22af7a)?[_0x4e0fce(0x14e)]:[_0x4e0fce(0x14b)],'hint':_0x29d43f['has'](_0x22af7a)?'geo':null}));},get 'geoSet'(){const _0x3843e4=_0x41f1a7;return new Set(_0x559000['$attr'][_0x3843e4(0x147)]??[]);},'addPart'(){const _0x1fbb5a=_0x41f1a7,_0x55d09b=String(this['selected']||'')[_0x1fbb5a(0x123)]();_0x55d09b&&!this['parts'][_0x1fbb5a(0x137)](_0x55d09b)&&(this[_0x1fbb5a(0x14a)]['push'](_0x55d09b),this[_0x1fbb5a(0x146)][_0x1fbb5a(0x152)](_0x55d09b)&&(this[_0x1fbb5a(0x144)]=!0x0,this['isUnique']=!0x1),this['selected']='');},'removePart'(_0x21c2b7){const _0x5d486d=_0x41f1a7,_0x5cc723=this[_0x5d486d(0x14a)][_0x5d486d(0x122)](_0x21c2b7);_0x5cc723>=0x0&&this[_0x5d486d(0x14a)][_0x5d486d(0x143)](_0x5cc723,0x1);},'onGeoToggle'(_0x29fac3){const _0x21e94a=_0x41f1a7;this[_0x21e94a(0x144)]=!!_0x29fac3,this[_0x21e94a(0x144)]&&(this['isUnique']=!0x1);},async 'save'(){const _0x336d15=_0x41f1a7;if(this[_0x336d15(0x14a)][_0x336d15(0x12f)]){this['busy']=!0x0;try{const _0x4eafae={};this[_0x336d15(0x144)]&&(_0x4eafae[_0x336d15(0x151)]=_0x336d15(0x14e),_0x4eafae[_0x336d15(0x150)]=this[_0x336d15(0x150)]),this['isUnique']&&!this[_0x336d15(0x144)]&&(_0x4eafae[_0x336d15(0x142)]=!0x0);const _0x5dd6ea={'method':_0x336d15(0x126),...Object[_0x336d15(0x133)](_0x4eafae)['length']?{'headers':{'Content-Type':_0x336d15(0x13f)},'body':JSON[_0x336d15(0x12d)](_0x4eafae)}:{}},_0x187b0=await fetch(_0x559000[_0x336d15(0x136)][_0x336d15(0x148)][_0x336d15(0x135)]['apiBase']+_0x336d15(0x14d)+_0x559000[_0x336d15(0x141)][_0x336d15(0x151)]+_0x336d15(0x127)+this[_0x336d15(0x14a)][_0x336d15(0x121)]('~'),_0x5dd6ea);if(!_0x187b0['ok'])throw new Error((await _0x187b0[_0x336d15(0x132)]())?.[_0x336d15(0x130)]?.[_0x336d15(0x120)]||_0x187b0[_0x336d15(0x11e)]);await _0x559000['$attr'][_0x336d15(0x14f)]['close'](),await _0x559000[_0x336d15(0x141)]['onDone']?.();}catch(_0x2e2b66){_0x559000[_0x336d15(0x136)][_0x336d15(0x12c)]?.['toast']?.[_0x336d15(0x130)]?.(_0x2e2b66?.[_0x336d15(0x120)]||'Create\x20index\x20failed'),console[_0x336d15(0x130)](_0x336d15(0x12b),_0x2e2b66);}finally{this[_0x336d15(0x145)]=!0x1;}}},'cancel'(){const _0x2e8195=_0x41f1a7;_0x559000[_0x2e8195(0x141)][_0x2e8195(0x14f)]['close']();}}),'template':_0x41f1a7(0x13a)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x1027(_0x53ff35,_0x582602){_0x53ff35=_0x53ff35-0x117;var _0x2c01b8=_0x2c01();var _0x10279a=_0x2c01b8[_0x53ff35];return _0x10279a;}var _0x1e06b3=_0x1027;(function(_0x3058b8,_0x3857ca){var _0x3d6eb2=_0x1027,_0x5cd958=_0x3058b8();while(!![]){try{var _0x5ee9fc=-parseInt(_0x3d6eb2(0x118))/0x1*(parseInt(_0x3d6eb2(0x11a))/0x2)+parseInt(_0x3d6eb2(0x11c))/0x3+-parseInt(_0x3d6eb2(0x127))/0x4*(-parseInt(_0x3d6eb2(0x117))/0x5)+-parseInt(_0x3d6eb2(0x11b))/0x6*(parseInt(_0x3d6eb2(0x125))/0x7)+parseInt(_0x3d6eb2(0x11d))/0x8*(parseInt(_0x3d6eb2(0x126))/0x9)+-parseInt(_0x3d6eb2(0x128))/0xa+-parseInt(_0x3d6eb2(0x11f))/0xb*(-parseInt(_0x3d6eb2(0x119))/0xc);if(_0x5ee9fc===_0x3857ca)break;else _0x5cd958['push'](_0x5cd958['shift']());}catch(_0x357c06){_0x5cd958['push'](_0x5cd958['shift']());}}}(_0x2c01,0x39c00));import _0x1dac17 from'../../embeddings/parts/pipeline-create-panel.ok.js';function _0x2c01(){var _0x496a2d=['modal','203RUWUXQ','20457lllpDu','47868qyCGHB','3648700mDTZrM','onDone','trim','165zlYuCC','11qyHGeu','3088212Sjtnyc','59992fVJUqL','66696wUPulA','733833rdCDjg','1256vqyjGv','env','11gXvetJ','type','close','default','create-pipeline-modal'];_0x2c01=function(){return _0x496a2d;};return _0x2c01();}export default{'tag':_0x1e06b3(0x123),'dependencies':[_0x1dac17],'attr':{'modal':{},'type':{},'env':{},'onDone':{}},'context':_0x32f8f0=>({get 'typeName'(){var _0x40983d=_0x1e06b3;return String(_0x32f8f0['$attr'][_0x40983d(0x120)]||'')[_0x40983d(0x12a)]();},get 'envName'(){var _0x3b23e4=_0x1e06b3;return String(_0x32f8f0['$attr'][_0x3b23e4(0x11e)]||'')[_0x3b23e4(0x12a)]()||_0x3b23e4(0x122);},async 'onCreated'(_0xde5957){var _0xb1ca69=_0x1e06b3;await _0x32f8f0['$attr'][_0xb1ca69(0x124)]?.[_0xb1ca69(0x121)]?.(),await _0x32f8f0['$attr'][_0xb1ca69(0x129)]?.(_0xde5957);}}),'template':'\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>'};
|