@coffer-org/web 5.0.0 → 7.0.0

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.
Files changed (64) hide show
  1. package/dist/assets/ChatWidget-YZqj6v6F.js +31 -0
  2. package/dist/assets/{DiagnosticsPage-D_AO8VVI.js → DiagnosticsPage-C_lLM_Hw.js} +1 -1
  3. package/dist/assets/{NewRecordView-DUZMiN50.js → NewRecordView-CC_fERty.js} +1 -1
  4. package/dist/assets/{PluginSettingsPage-OR2USDcf.js → PluginSettingsPage-BkMqmqxo.js} +1 -1
  5. package/dist/assets/ScanSummary-xKGEaOS0.js +1 -0
  6. package/dist/assets/{SettingsForm-BZrcG7PG.js → SettingsForm-DW1KCYe4.js} +1 -1
  7. package/dist/assets/SettingsPage-DuP06DkM.js +3 -0
  8. package/dist/assets/{ThemeSwitcher-CCakzR9t.js → ThemeSwitcher-CR6oJXQD.js} +1 -1
  9. package/dist/assets/{data-size-BzMyF1we.js → data-size-oPRYOwnj.js} +1 -1
  10. package/dist/assets/{extend-u4UeeES5.js → extend-BTkr7oJ8.js} +1 -1
  11. package/dist/assets/{fields-DMchbbOm.js → fields-BtCN_frr.js} +1 -1
  12. package/dist/assets/index-i___vlpd.css +2 -0
  13. package/dist/assets/index-zcINFUZQ.js +28 -0
  14. package/dist/assets/{list-cache-DpFBka0W.js → list-cache-D-BfHI9X.js} +1 -1
  15. package/dist/assets/settings-BfEurOH1.js +1 -0
  16. package/dist/assets/{shelf-DmAuGkTS.js → shelf-CRUDKiTz.js} +1 -1
  17. package/dist/assets/{showcase-DwzheZMA.js → showcase-Boajqdx8.js} +1 -1
  18. package/dist/assets/src-6lNAeDcP.js +1 -0
  19. package/dist/assets/{src-vXu15Im-.js → src-B3nX_MMy.js} +1 -1
  20. package/dist/assets/{src-Ci3LBUkd.js → src-BDmFR0_v.js} +2 -2
  21. package/dist/assets/{src-B-LFXYq3.js → src-BJF2nMuG.js} +2 -2
  22. package/dist/assets/src-BRzAjJX_.js +6 -0
  23. package/dist/assets/{src-Cmv7hauh.js → src-BiJuengh.js} +1 -1
  24. package/dist/assets/{src-Celn4l3M2.js → src-BinvE9sd2.js} +1 -1
  25. package/dist/assets/src-BqhS-0sX.js +1 -0
  26. package/dist/assets/src-Br4oAdCy.js +1 -0
  27. package/dist/assets/src-BxLhm2cd.js +4 -0
  28. package/dist/assets/{src-CLp6CaAC.js → src-C-Xmuyui.js} +1 -1
  29. package/dist/assets/src-C2zqLDpV.js +1 -0
  30. package/dist/assets/src-C9WAFG8V.js +4 -0
  31. package/dist/assets/{src-aKeR5FZD.js → src-CFcpeTQ5.js} +1 -1
  32. package/dist/assets/src-CYiAjCO3.js +1 -0
  33. package/dist/assets/src-Cr_oHzOc.js +1 -0
  34. package/dist/assets/src-CzmJIKcf.js +1 -0
  35. package/dist/assets/{src-BgUirxhE.js → src-D2hi5jAO.js} +1 -1
  36. package/dist/assets/{src-Bay9M7eI.js → src-DB2N_cct.js} +5 -5
  37. package/dist/assets/{src-M--RK4iO.js → src-DWgNUcSX2.js} +1 -1
  38. package/dist/assets/{src-DSS8nZOn2.js → src-DpPV1q-1.js} +1 -1
  39. package/dist/assets/{src-CcepgUty.js → src-DwXka-KQ.js} +1 -1
  40. package/dist/assets/{src-BD5Jx1R6.js → src-Ys25cnOv.js} +1 -1
  41. package/dist/assets/{ui-hoL_b3fm.js → ui-A-A-cO8j2.js} +2 -2
  42. package/dist/assets/ui-CAxfAaN9.js +2 -0
  43. package/dist/assets/{ui-BgMkXxiS.js → ui-D7QZRcxZ.js} +2 -2
  44. package/dist/index.html +9 -9
  45. package/dist-vendor/web-ui.js +7635 -7391
  46. package/package.json +1 -1
  47. package/dist/assets/ChatWidget-BLbWUv1t.js +0 -31
  48. package/dist/assets/NoMac-BazkVXEy.js +0 -1
  49. package/dist/assets/ScanSummary-B8hGwTtd.js +0 -1
  50. package/dist/assets/SettingsPage-wZH0coJv.js +0 -3
  51. package/dist/assets/index-B5P0VtoK.css +0 -2
  52. package/dist/assets/index-DSKrqebU.js +0 -28
  53. package/dist/assets/settings-mXXsgRiF.js +0 -1
  54. package/dist/assets/src-B3cKJlPg.js +0 -6
  55. package/dist/assets/src-B5S006_b.js +0 -1
  56. package/dist/assets/src-Bal28z0o.js +0 -1
  57. package/dist/assets/src-Bayfjx1G.js +0 -1
  58. package/dist/assets/src-BbLDg7Jt.js +0 -1
  59. package/dist/assets/src-CNJybBpP.js +0 -4
  60. package/dist/assets/src-Cqe2vlJJ.js +0 -1
  61. package/dist/assets/src-Dz7A3kLJ.js +0 -4
  62. package/dist/assets/src-lX-LLjmo.js +0 -1
  63. package/dist/assets/src-ziyxxA8g.js +0 -1
  64. package/dist/assets/ui-DtrkuhyS.js +0 -2
@@ -1 +1 @@
1
- import{Gr as e,en as t}from"./src-Dz7A3kLJ.js";import{C as n,O as r,_ as i,d as a,g as o,h as s,i as c,m as l,p as u,u as d}from"./fields-DMchbbOm.js";import{D as f,E as p,a as m,c as h,m as g,u as _,v,w as y}from"./shelf-DmAuGkTS.js";import{n as b}from"./extend-u4UeeES5.js";import{t as ee}from"./plugin-CFEkHH3f.js";var x=(()=>{try{return Intl.supportedValuesOf(`currency`)}catch{return[`USD`,`EUR`,`UAH`,`GBP`,`PLN`]}})();new Set(x);function S(e,t){try{return new Intl.NumberFormat(t,{style:`currency`,currency:e,currencyDisplay:`narrowSymbol`}).formatToParts(0).find(e=>e.type===`currency`)?.value??e}catch{return e}}function C(e,t=`en`){try{return new Intl.DisplayNames([t],{type:`currency`}).of(e)??e}catch{return e}}var te=[{name:`countries`,options:t.map(e=>({value:e.code,title:`core.countries.${e.code}`,icon:{kind:`icon`,value:`flag:${e.code}`},subtitle:e.code.toUpperCase()}))},{name:`colors`,options:e.map(e=>({value:e.name,title:`core.colors.${e.name}`,icon:{kind:`swatch`,value:e.hex},subtitle:e.hex}))},{name:`sex`,options:[...o]},{name:`weekdays`,options:[...i]},{name:`languages`,options:s.map(e=>({value:e.code,title:e.name}))},{name:`currencies`,options:x.map(e=>({value:e,title:C(e),subtitle:S(e)}))}],w=class extends Error{};function T(e,t){let n=e.split(`.`);for(let e of n)if(e===``)throw new w(`[mutate-path] '${t}': empty segment — a path may not contain '..', a leading '.' beyond the first character, or a trailing '.'`);return n}function E(e){if(typeof e!=`string`||e.trim()===``)throw new w(`[mutate-path] a target path must be a non-empty string`);let t=e.startsWith(`.`),n=t?e.slice(1):e;if(n===``)throw new w(`[mutate-path] '${e}': nothing after the leading '.'`);let r=n.split(`/`);if(r.some(e=>e===``))throw new w(`[mutate-path] '${e}': empty side of a '/' — both a relation path and a target path are required`);let i=T(r[r.length-1],e);return{hops:r.slice(0,-1).map(t=>T(t,e)),path:i,relative:t}}function D(e,t){if(!e.relative)return e;let n=[...t];return e.hops.length>0?{hops:[[...n,...e.hops[0]],...e.hops.slice(1)],path:e.path,relative:!1}:{hops:[],path:[...n,...e.path],relative:!1}}var O=class extends Error{};function k(e,t){return`${e}#${t.join(`.`)}`}function A(e,t){return M(e,t,0)}function j(e,t,n,r){let i=n[r],a=r===n.length-1,o=e.parts?.find(e=>e.key===i)??e.parts?.find(e=>e.role===i);return o?a?{relation:o.meta.relation,desc:`part '${i}' of composite '${t}' (kind '${o.meta.kind}')`}:o.meta.parts?j(o.meta,`${t}.${i}`,n,r+1):null:e.columns&&i in e.columns&&a?{desc:`sub-column '${i}' of composite '${t}'`}:null}function M(e,t,n){let r=t[n],i=n===t.length-1;for(let o of e){if(a(o)){if(o.key!==r)continue;return i?{relation:o.type.relation,desc:`field '${r}' (kind '${o.type.kind}')`}:j(o.type,r,t,n+1)}if(c(o)){if(!u(o)){let e=M(o.fields,t,n);if(e)return e;continue}if(o.key===r){if(i)return o.compute===void 0?null:{desc:`group '${r}' (a container)`};let e=M(o.fields,t,n+1);if(e)return e;continue}}}return null}function N(e,t){if(t.startsWith(`extend:`)){let n=t.slice(7);return e.extends_.find(e=>e.id===n).fields}let n=t.indexOf(`/`);return e.getShelf(t.slice(0,n),t.slice(n+1)).fields}function P(e,t,n,r,i){let a=`[mutate] ${t}.${n.join(`.`)}: target '${r}'`,o=t,s=N(e,o);for(let t of i.hops){let n=A(s,t);if(!n)throw new O(`${a} — unknown segment in relation hop '${t.join(`.`)}'`);if(!n.relation)throw new O(`${a} — '${t.join(`.`)}' is not a relation — it is ${n.desc}`);o=`${n.relation.library}/${n.relation.shelf}`,s=N(e,o)}if(!A(s,i.path))throw new O(`${a} — unknown segment in path '${i.path.join(`.`)}' (looked up in ${o})`);return o}function F(e,t,n){for(let r of e)if(a(r)){let e=[...t,r.key];r.type.mutate?.length&&n.push({path:e,scope:t,meta:r.type});for(let i of r.type.parts??[])i.meta.mutate?.length&&n.push({path:[...e,i.key],scope:t,meta:i.meta})}else c(r)&&F(r.fields,u(r)?[...t,r.key]:t,n)}function I(e){for(let t of e)if(c(t)){if(u(t)&&t.compute!==void 0){for(let e of t.fields)if(a(e)&&e.type.compute!==void 0)throw new O(`[mutate] group '${t.key}': child '${e.key}' carries its own value while the group already carries value — two writers for one column, drop one of the two computations.`)}I(t.fields)}}function L(e){let t=new Map;for(let[n,r]of e)for(let e of r){let r=k(n,e.from),i=k(e.toShelf,e.to.path),a=t.get(r);a?a.push(i):t.set(r,[i])}let n=new Map,r=[],i=e=>{n.set(e,1),r.push(e);for(let a of t.get(e)??[]){let e=n.get(a)??0;if(e===0){let e=i(a);if(e)return e}else if(e===1){let e=r.indexOf(a);return[...r.slice(e),a]}}return r.pop(),n.set(e,2),null};for(let e of t.keys())if((n.get(e)??0)===0){let t=i(e);if(t)return t}return null}function R(e,t,n,r){for(let i of e)if(a(i)){let e=[...n,i.key],a=i.type;a.compute!==void 0&&r.push({scope:t,path:e,cache:a.cache});for(let n of a.parts??[])n.mode===`computedStored`&&r.push({scope:t,path:[...e,n.key],cache:n.meta?.cache})}else if(c(i)){let e=u(i)?[...n,i.key]:n;u(i)&&i.compute!==void 0&&r.push({scope:t,path:e,cache:void 0}),R(i.fields,t,e,r)}}function z(e,t){let n=new Set;for(let e of t.values())for(let t of e)n.add(k(t.toShelf,t.to.path));let r=[...(e.shelves??[]).map(e=>({scope:`${e.library}/${e.shelf}`,fields:e.fields})),...(e.extends_??[]).map(e=>({scope:`extend:${e.id}`,fields:e.fields}))];for(let{scope:e,fields:t}of r){let r=[];R(t,e,[],r);for(let t of r)t.cache===void 0&&(n.has(k(t.scope,t.path))||console.warn(`[mutate-graph] ${e}: '${t.path.join(`.`)}' is a computed-and-stored unit with no incoming mutate edge and no cache — nothing will ever trigger its recompute after it is first written.`))}}function B(e){let t=new Map,n=[...(e.shelves??[]).map(e=>({scope:`${e.library}/${e.shelf}`,fields:e.fields})),...(e.extends_??[]).map(e=>({scope:`extend:${e.id}`,fields:e.fields}))];for(let{fields:e}of n)I(e);for(let{scope:r,fields:i}of n){let n=[];if(F(i,[],n),!n.length)continue;let a=[];for(let t of n)for(let n of t.meta.mutate??[]){let i=D(E(n),t.scope),o=P(e,r,t.path,n,i);a.push({from:t.path,to:i,toShelf:o})}t.set(r,a)}let r=L(t);if(r)throw new O(`[mutate] cycle: ${r.join(` -> `)}`);return z(e,t),t}var V=63,H=`__cachedAt`;V-10;var U=`_parent_id_index`;V-16;function W(e,t){for(let n of t){let t=`key`in n?n.key:void 0;if(t?.includes(`__`))throw Error(`[storage] ${e}: key '${t}' contains '__', the storage path separator — two different paths would spell one column name. Rename the key; an enclosing group's prefix supplies the '__'.`);c(n)&&W(e,n.fields)}}function G(e,t,n){if(t.length>47)throw Error(`[storage] ${e}: table name '${t}' is ${t.length} characters, over the 47-character budget (${V} minus '${U}', the identifier the ORM derives from it). PostgreSQL truncates a longer one silently. Shorten the library, the shelf, or a collection key along the path.`);let r=new Map;for(let[t,i]of h(n)){if(i.columns){if(!i.parts)throw Error(`[storage] ${e}.${t}: sets \`columns\` without \`parts\` — build a composite's columns from roles via resolveParts (see f.measured), or store the value whole with \`json: true\``);if(i.json)throw Error(`[storage] ${e}.${t}: is both a composite (\`columns\`) and JSON-stored (\`json\`) — a field persists one way or the other`)}for(let[n]of v(t,i)){let i=r.get(n);if(i!==void 0&&i!==t)throw Error(`[storage] ${e}: fields '${i}' and '${t}' both generate the column '${n}' — one value would overwrite the other and the second field would vanish from every response. Rename one.`);if(r.set(n,t),n.length>53)throw Error(`[storage] ${e}.${t}: generated column '${n}' is ${n.length} characters, over the 53-character budget (${V} minus '${H}'). PostgreSQL truncates a longer one silently. Shorten a key along the path.`)}}W(e,n);for(let r of m(n))G(`${e}/${r.key}`,`${t}__${r.key}`,r.group.fields)}function K(e,t={}){let i=t.disabled??new Set,o=e.filter(e=>!i.has(e.id)),s=new Map;for(let e of o){for(let t of e.libraries??[])for(let n of t.shelves)s.set(`${n.library}/${n.shelf}`,e.id);for(let t of e.libraryShelves??[])s.set(`${t.library}/${t.shelf}`,e.id)}let u=(e,t)=>s.get(`${e}/${t}`);for(let e of o)for(let t of e.dependsOn)if(i.has(t))throw Error(`[plugin] '${e.id}' is enabled, but its dependency '${t}' is disabled`);let m=ee(o),{order:v,libraries:x}=m,S=m.shelves.map(n),C=m.extends_.map(n),w=new Map(o.filter(e=>e.settings).map(e=>[e.id,n(e.settings).fields]));for(let e of t.settingsGroups??[])if(w.has(e.id))throw Error(`[settings] group '${e.id}' is declared by a plugin and passed in by the caller — pick one owner`);let T=[...[...w].map(([e,t])=>({id:e,fields:t})),...t.settingsGroups??[]],E=new Map;for(let e of o)for(let t of e.fieldContribs??[]){let e=`${t.library}/${t.shelf}/${t.field}`,n=E.get(e)??{options:[],suggestions:[]};t.options&&n.options.push(...t.options),t.suggestions&&n.suggestions.push(...t.suggestions),E.set(e,n)}let D=(e,t)=>{if(t.options.length){let n=new Set((e.options??[]).map(e=>e.value));e.options=[...e.options??[],...t.options.filter(e=>!n.has(e.value))]}if(t.suggestions.length){let n=e.hints.suggestions??[],r=new Set(n);e.hints.suggestions=[...n,...t.suggestions.filter(e=>!r.has(e))]}},O=new Map;for(let e of te)O.set(e.name,e.options);for(let e of o)for(let t of e.optionLists??[])O.set(t.name,t.options);let k=e=>O.get(e)??[];for(let[e,t,n]of[...S.map(e=>[`${e.library}/${e.shelf}`,`${e.library}__${e.shelf}`,e.fields]),...T.map(e=>[`_settings/${e.id}`,`_settings__${e.id}`,e.fields]),...C.map(e=>[`extend/${e.id}`,`extend__${e.id}`,e.fields])])G(e,t,n);for(let e of S)for(let[t,n]of h(e.fields)){let r=E.get(`${e.library}/${e.shelf}/${t}`);r&&D(n,r)}for(let e of T)for(let[t,n]of h(e.fields)){let i=E.get(`_settings/${e.id}/${t}`);i&&(D(n,i),l(n)&&n.options?.length&&r(n,n.options.map(e=>e.value)))}let A=new Map;for(let e of S)for(let[t,n]of h(e.fields)){let i=n.hints.source,a=n.options??[],o=i?O.get(i)??[]:[],s=new Set(a.map(e=>e.value)),c=[...a,...o.filter(e=>!s.has(e.value))];l(n)&&c.length&&r(n,c.map(e=>e.value)),c.length&&(n.options=c,A.set(`${e.library}/${e.shelf}/${t}`,c))}let j=e=>{let t=[];for(let n of e)a(n)?t.push(n.type):c(n)&&t.push(...j(n.fields));return t};for(let e of C)for(let t of j(e.fields)){if(!l(t))continue;let e=t.hints.source;if(!e)continue;let n=O.get(e)??[],i=t.options??[],a=new Set(i.map(e=>e.value)),o=[...i,...n.filter(e=>!a.has(e.value))];o.length&&r(t,o.map(e=>e.value))}let M=(e,t,n)=>{let r=e[t];if(!r)throw Error(n);return r},N=[];for(let e of o)for(let t of e.showcases??[]){let e=S.find(e=>e.library===t.source.library&&e.shelf===t.source.shelf);if(!e)throw Error(`[showcase] ${t.library}/${t.id}: unknown source shelf ${t.source.library}/${t.source.shelf}`);let n=Object.fromEntries(h(e.fields));for(let e of p(t.filter)){let r=M(n,e,`[showcase] ${t.library}/${t.id}: filter field '${e}' is not in ${t.source.library}/${t.source.shelf}`),i=f(t.filter,e),a=i.filter(e=>y.has(e));if(a.length&&!r.hints.multiple)throw Error(`[showcase] ${t.library}/${t.id}: operator '${a[0]}' on '${e}' needs a multiple field, but ${t.source.library}/${t.source.shelf}.${e} stores a single value`);if(d(r)&&a.length!==i.length)throw Error(`[showcase] ${t.library}/${t.id}: filter field '${e}' is stored as JSON — only ${[...y].join(`/`)} applies`);if(r.columns)throw Error(`[showcase] ${t.library}/${t.id}: filter field '${e}' is a composite scalar stored across sub-columns`)}let r=g(e);for(let e of t.columns){if(!n[e])throw Error(`[showcase] ${t.library}/${t.id}: column '${e}' is not in ${t.source.library}/${t.source.shelf}`);if(!r.includes(e))throw Error(`[showcase] ${t.library}/${t.id}: column '${e}' is outside ${t.source.library}/${t.source.shelf}'s list projection (views.list/groupBy/inline) and would render blank`)}if(t.defaultGroupBy!==void 0){if(!n[t.defaultGroupBy])throw Error(`[showcase] ${t.library}/${t.id}: defaultGroupBy '${t.defaultGroupBy}' is not in ${t.source.library}/${t.source.shelf}`);if(!_(e).includes(t.defaultGroupBy))throw Error(`[showcase] ${t.library}/${t.id}: defaultGroupBy '${t.defaultGroupBy}' is not a grouping candidate of ${t.source.library}/${t.source.shelf} (views.groupBy)`)}if(N.some(e=>e.library===t.library&&e.id===t.id))throw Error(`[showcase] duplicate ${t.library}/${t.id}`);N.push(t)}let P=[...S.map(e=>({label:`${e.library}/${e.shelf}`,fields:e.fields})),...C.map(e=>({label:`extend '${e.id}'`,fields:e.fields}))];for(let{label:e,fields:t}of P)for(let[n,r]of h(t)){let t=r.relation;if(!t)continue;let i=S.find(e=>e.library===t.library&&e.shelf===t.shelf);if(!i)throw Error(`[relation] ${e}.${n}: unknown target shelf ${t.library}/${t.shelf}`);if(!t.filter)continue;let a=Object.fromEntries(h(i.fields));for(let r of p(t.filter))M(a,r,`[relation] ${e}.${n}: filter key '${r}' is not in ${t.library}/${t.shelf}`)}let F={order:v,libraries:x,shelves:S,extends_:C,showcases:N,getShowcase:(e,t)=>N.find(n=>n.library===e&&n.id===t),getShowcasesFor:e=>N.filter(t=>t.library===e),getShelf:(e,t)=>S.find(n=>n.library===e&&n.shelf===t),getLibrary:e=>x.find(t=>t.meta.id===e),getExtendsFor:(e,t)=>C.filter(n=>b(n,e,t)),getFieldOptions:(e,t,n)=>A.get(`${e}/${t}/${n}`)??[],getOptionList:k,getShelfOwner:u,mutateGraph:new Map};return F.mutateGraph=B(F),F}var q=null;function J(e){q=K(e)}function Y(){if(!q)throw Error(`[registry] not initialized — call initRegistry() in the boot loader`);return q}var X=(e,t)=>Y().getShelf(e,t),Z=(e,t)=>Y().getExtendsFor(e,t),ne=e=>Y().getOptionList(e),re=(e,t)=>Y().getShowcase(e,t),ie=e=>Y().getShowcasesFor(e),ae=()=>Y().libraries,oe=()=>Y().shelves,se=()=>Y().extends_,Q=20,$=new Map;function ce(e){let t=$.get(e);if(t)return $.delete(e),$.set(e,t),t}function le(e,t){for($.delete(e),$.set(e,{rows:t,ts:Date.now()});$.size>Q;){let e=$.keys().next();if(e.done)break;$.delete(e.value)}}function ue(e){for(let t of[...$.keys()])(t===e||t.startsWith(`${e}?`))&&$.delete(t)}function de(e,t){let n=String(t.id??``);if(n)for(let[r,i]of $){if(r!==e&&!r.startsWith(`${e}?`))continue;let a=!1,o=i.rows.map(e=>{if(String(e.id)!==n)return e;a=!0;let r={...e};for(let n of Object.keys(e))n in t&&(r[n]=t[n]);return r});a&&$.set(r,{rows:o,ts:i.ts})}}export{se as a,ne as c,re as d,ie as f,le as i,X as l,S as m,de as n,Z as o,J as p,ce as r,ae as s,ue as t,oe as u};
1
+ import{Qr as e,on as t}from"./src-C9WAFG8V.js";import{C as n,O as r,_ as i,d as a,g as o,h as s,i as c,m as l,p as u,u as d}from"./fields-BtCN_frr.js";import{D as f,E as p,a as m,c as h,m as g,u as _,v,w as y}from"./shelf-CRUDKiTz.js";import{n as b}from"./extend-BTkr7oJ8.js";import{t as ee}from"./plugin-CFEkHH3f.js";var x=(()=>{try{return Intl.supportedValuesOf(`currency`)}catch{return[`USD`,`EUR`,`UAH`,`GBP`,`PLN`]}})();new Set(x);function S(e,t){try{return new Intl.NumberFormat(t,{style:`currency`,currency:e,currencyDisplay:`narrowSymbol`}).formatToParts(0).find(e=>e.type===`currency`)?.value??e}catch{return e}}function C(e,t=`en`){try{return new Intl.DisplayNames([t],{type:`currency`}).of(e)??e}catch{return e}}var te=[{name:`countries`,options:t.map(e=>({value:e.code,title:`core.countries.${e.code}`,icon:{kind:`icon`,value:`flag:${e.code}`},subtitle:e.code.toUpperCase()}))},{name:`colors`,options:e.map(e=>({value:e.name,title:`core.colors.${e.name}`,icon:{kind:`swatch`,value:e.hex},subtitle:e.hex}))},{name:`sex`,options:[...o]},{name:`weekdays`,options:[...i]},{name:`languages`,options:s.map(e=>({value:e.code,title:e.name}))},{name:`currencies`,options:x.map(e=>({value:e,title:C(e),subtitle:S(e)}))}],w=class extends Error{};function T(e,t){let n=e.split(`.`);for(let e of n)if(e===``)throw new w(`[mutate-path] '${t}': empty segment — a path may not contain '..', a leading '.' beyond the first character, or a trailing '.'`);return n}function E(e){if(typeof e!=`string`||e.trim()===``)throw new w(`[mutate-path] a target path must be a non-empty string`);let t=e.startsWith(`.`),n=t?e.slice(1):e;if(n===``)throw new w(`[mutate-path] '${e}': nothing after the leading '.'`);let r=n.split(`/`);if(r.some(e=>e===``))throw new w(`[mutate-path] '${e}': empty side of a '/' — both a relation path and a target path are required`);let i=T(r[r.length-1],e);return{hops:r.slice(0,-1).map(t=>T(t,e)),path:i,relative:t}}function D(e,t){if(!e.relative)return e;let n=[...t];return e.hops.length>0?{hops:[[...n,...e.hops[0]],...e.hops.slice(1)],path:e.path,relative:!1}:{hops:[],path:[...n,...e.path],relative:!1}}var O=class extends Error{};function k(e,t){return`${e}#${t.join(`.`)}`}function A(e,t){return M(e,t,0)}function j(e,t,n,r){let i=n[r],a=r===n.length-1,o=e.parts?.find(e=>e.key===i)??e.parts?.find(e=>e.role===i);return o?a?{relation:o.meta.relation,desc:`part '${i}' of composite '${t}' (kind '${o.meta.kind}')`}:o.meta.parts?j(o.meta,`${t}.${i}`,n,r+1):null:e.columns&&i in e.columns&&a?{desc:`sub-column '${i}' of composite '${t}'`}:null}function M(e,t,n){let r=t[n],i=n===t.length-1;for(let o of e){if(a(o)){if(o.key!==r)continue;return i?{relation:o.type.relation,desc:`field '${r}' (kind '${o.type.kind}')`}:j(o.type,r,t,n+1)}if(c(o)){if(!u(o)){let e=M(o.fields,t,n);if(e)return e;continue}if(o.key===r){if(i)return o.compute===void 0?null:{desc:`group '${r}' (a container)`};let e=M(o.fields,t,n+1);if(e)return e;continue}}}return null}function N(e,t){if(t.startsWith(`extend:`)){let n=t.slice(7);return e.extends_.find(e=>e.id===n).fields}let n=t.indexOf(`/`);return e.getShelf(t.slice(0,n),t.slice(n+1)).fields}function P(e,t,n,r,i){let a=`[mutate] ${t}.${n.join(`.`)}: target '${r}'`,o=t,s=N(e,o);for(let t of i.hops){let n=A(s,t);if(!n)throw new O(`${a} — unknown segment in relation hop '${t.join(`.`)}'`);if(!n.relation)throw new O(`${a} — '${t.join(`.`)}' is not a relation — it is ${n.desc}`);o=`${n.relation.library}/${n.relation.shelf}`,s=N(e,o)}if(!A(s,i.path))throw new O(`${a} — unknown segment in path '${i.path.join(`.`)}' (looked up in ${o})`);return o}function F(e,t,n){for(let r of e)if(a(r)){let e=[...t,r.key];r.type.mutate?.length&&n.push({path:e,scope:t,meta:r.type});for(let i of r.type.parts??[])i.meta.mutate?.length&&n.push({path:[...e,i.key],scope:t,meta:i.meta})}else c(r)&&F(r.fields,u(r)?[...t,r.key]:t,n)}function I(e){for(let t of e)if(c(t)){if(u(t)&&t.compute!==void 0){for(let e of t.fields)if(a(e)&&e.type.compute!==void 0)throw new O(`[mutate] group '${t.key}': child '${e.key}' carries its own value while the group already carries value — two writers for one column, drop one of the two computations.`)}I(t.fields)}}function L(e){let t=new Map;for(let[n,r]of e)for(let e of r){let r=k(n,e.from),i=k(e.toShelf,e.to.path),a=t.get(r);a?a.push(i):t.set(r,[i])}let n=new Map,r=[],i=e=>{n.set(e,1),r.push(e);for(let a of t.get(e)??[]){let e=n.get(a)??0;if(e===0){let e=i(a);if(e)return e}else if(e===1){let e=r.indexOf(a);return[...r.slice(e),a]}}return r.pop(),n.set(e,2),null};for(let e of t.keys())if((n.get(e)??0)===0){let t=i(e);if(t)return t}return null}function R(e,t,n,r){for(let i of e)if(a(i)){let e=[...n,i.key],a=i.type;a.compute!==void 0&&r.push({scope:t,path:e,cache:a.cache});for(let n of a.parts??[])n.mode===`computedStored`&&r.push({scope:t,path:[...e,n.key],cache:n.meta?.cache})}else if(c(i)){let e=u(i)?[...n,i.key]:n;u(i)&&i.compute!==void 0&&r.push({scope:t,path:e,cache:void 0}),R(i.fields,t,e,r)}}function z(e,t){let n=new Set;for(let e of t.values())for(let t of e)n.add(k(t.toShelf,t.to.path));let r=[...(e.shelves??[]).map(e=>({scope:`${e.library}/${e.shelf}`,fields:e.fields})),...(e.extends_??[]).map(e=>({scope:`extend:${e.id}`,fields:e.fields}))];for(let{scope:e,fields:t}of r){let r=[];R(t,e,[],r);for(let t of r)t.cache===void 0&&(n.has(k(t.scope,t.path))||console.warn(`[mutate-graph] ${e}: '${t.path.join(`.`)}' is a computed-and-stored unit with no incoming mutate edge and no cache — nothing will ever trigger its recompute after it is first written.`))}}function B(e){let t=new Map,n=[...(e.shelves??[]).map(e=>({scope:`${e.library}/${e.shelf}`,fields:e.fields})),...(e.extends_??[]).map(e=>({scope:`extend:${e.id}`,fields:e.fields}))];for(let{fields:e}of n)I(e);for(let{scope:r,fields:i}of n){let n=[];if(F(i,[],n),!n.length)continue;let a=[];for(let t of n)for(let n of t.meta.mutate??[]){let i=D(E(n),t.scope),o=P(e,r,t.path,n,i);a.push({from:t.path,to:i,toShelf:o})}t.set(r,a)}let r=L(t);if(r)throw new O(`[mutate] cycle: ${r.join(` -> `)}`);return z(e,t),t}var V=63,H=`__cachedAt`;V-10;var U=`_parent_id_index`;V-16;function W(e,t){for(let n of t){let t=`key`in n?n.key:void 0;if(t?.includes(`__`))throw Error(`[storage] ${e}: key '${t}' contains '__', the storage path separator — two different paths would spell one column name. Rename the key; an enclosing group's prefix supplies the '__'.`);c(n)&&W(e,n.fields)}}function G(e,t,n){if(t.length>47)throw Error(`[storage] ${e}: table name '${t}' is ${t.length} characters, over the 47-character budget (${V} minus '${U}', the identifier the ORM derives from it). PostgreSQL truncates a longer one silently. Shorten the library, the shelf, or a collection key along the path.`);let r=new Map;for(let[t,i]of h(n)){if(i.columns){if(!i.parts)throw Error(`[storage] ${e}.${t}: sets \`columns\` without \`parts\` — build a composite's columns from roles via resolveParts (see f.measured), or store the value whole with \`json: true\``);if(i.json)throw Error(`[storage] ${e}.${t}: is both a composite (\`columns\`) and JSON-stored (\`json\`) — a field persists one way or the other`)}for(let[n]of v(t,i)){let i=r.get(n);if(i!==void 0&&i!==t)throw Error(`[storage] ${e}: fields '${i}' and '${t}' both generate the column '${n}' — one value would overwrite the other and the second field would vanish from every response. Rename one.`);if(r.set(n,t),n.length>53)throw Error(`[storage] ${e}.${t}: generated column '${n}' is ${n.length} characters, over the 53-character budget (${V} minus '${H}'). PostgreSQL truncates a longer one silently. Shorten a key along the path.`)}}W(e,n);for(let r of m(n))G(`${e}/${r.key}`,`${t}__${r.key}`,r.group.fields)}function K(e,t={}){let i=t.disabled??new Set,o=e.filter(e=>!i.has(e.id)),s=new Map;for(let e of o){for(let t of e.libraries??[])for(let n of t.shelves)s.set(`${n.library}/${n.shelf}`,e.id);for(let t of e.libraryShelves??[])s.set(`${t.library}/${t.shelf}`,e.id)}let u=(e,t)=>s.get(`${e}/${t}`);for(let e of o)for(let t of e.dependsOn)if(i.has(t))throw Error(`[plugin] '${e.id}' is enabled, but its dependency '${t}' is disabled`);let m=ee(o),{order:v,libraries:x}=m,S=m.shelves.map(n),C=m.extends_.map(n),w=new Map(o.filter(e=>e.settings).map(e=>[e.id,n(e.settings).fields]));for(let e of t.settingsGroups??[])if(w.has(e.id))throw Error(`[settings] group '${e.id}' is declared by a plugin and passed in by the caller — pick one owner`);let T=[...[...w].map(([e,t])=>({id:e,fields:t})),...t.settingsGroups??[]],E=new Map;for(let e of o)for(let t of e.fieldContribs??[]){let e=`${t.library}/${t.shelf}/${t.field}`,n=E.get(e)??{options:[],suggestions:[]};t.options&&n.options.push(...t.options),t.suggestions&&n.suggestions.push(...t.suggestions),E.set(e,n)}let D=(e,t)=>{if(t.options.length){let n=new Set((e.options??[]).map(e=>e.value));e.options=[...e.options??[],...t.options.filter(e=>!n.has(e.value))]}if(t.suggestions.length){let n=e.hints.suggestions??[],r=new Set(n);e.hints.suggestions=[...n,...t.suggestions.filter(e=>!r.has(e))]}},O=new Map;for(let e of te)O.set(e.name,e.options);for(let e of o)for(let t of e.optionLists??[])O.set(t.name,t.options);let k=e=>O.get(e)??[];for(let[e,t,n]of[...S.map(e=>[`${e.library}/${e.shelf}`,`${e.library}__${e.shelf}`,e.fields]),...T.map(e=>[`_settings/${e.id}`,`_settings__${e.id}`,e.fields]),...C.map(e=>[`extend/${e.id}`,`extend__${e.id}`,e.fields])])G(e,t,n);for(let e of S)for(let[t,n]of h(e.fields)){let r=E.get(`${e.library}/${e.shelf}/${t}`);r&&D(n,r)}for(let e of T)for(let[t,n]of h(e.fields)){let i=E.get(`_settings/${e.id}/${t}`);i&&(D(n,i),l(n)&&n.options?.length&&r(n,n.options.map(e=>e.value)))}let A=new Map;for(let e of S)for(let[t,n]of h(e.fields)){let i=n.hints.source,a=n.options??[],o=i?O.get(i)??[]:[],s=new Set(a.map(e=>e.value)),c=[...a,...o.filter(e=>!s.has(e.value))];l(n)&&c.length&&r(n,c.map(e=>e.value)),c.length&&(n.options=c,A.set(`${e.library}/${e.shelf}/${t}`,c))}let j=e=>{let t=[];for(let n of e)a(n)?t.push(n.type):c(n)&&t.push(...j(n.fields));return t};for(let e of C)for(let t of j(e.fields)){if(!l(t))continue;let e=t.hints.source;if(!e)continue;let n=O.get(e)??[],i=t.options??[],a=new Set(i.map(e=>e.value)),o=[...i,...n.filter(e=>!a.has(e.value))];o.length&&r(t,o.map(e=>e.value))}let M=(e,t,n)=>{let r=e[t];if(!r)throw Error(n);return r},N=[];for(let e of o)for(let t of e.showcases??[]){let e=S.find(e=>e.library===t.source.library&&e.shelf===t.source.shelf);if(!e)throw Error(`[showcase] ${t.library}/${t.id}: unknown source shelf ${t.source.library}/${t.source.shelf}`);let n=Object.fromEntries(h(e.fields));for(let e of p(t.filter)){let r=M(n,e,`[showcase] ${t.library}/${t.id}: filter field '${e}' is not in ${t.source.library}/${t.source.shelf}`),i=f(t.filter,e),a=i.filter(e=>y.has(e));if(a.length&&!r.hints.multiple)throw Error(`[showcase] ${t.library}/${t.id}: operator '${a[0]}' on '${e}' needs a multiple field, but ${t.source.library}/${t.source.shelf}.${e} stores a single value`);if(d(r)&&a.length!==i.length)throw Error(`[showcase] ${t.library}/${t.id}: filter field '${e}' is stored as JSON — only ${[...y].join(`/`)} applies`);if(r.columns)throw Error(`[showcase] ${t.library}/${t.id}: filter field '${e}' is a composite scalar stored across sub-columns`)}let r=g(e);for(let e of t.columns){if(!n[e])throw Error(`[showcase] ${t.library}/${t.id}: column '${e}' is not in ${t.source.library}/${t.source.shelf}`);if(!r.includes(e))throw Error(`[showcase] ${t.library}/${t.id}: column '${e}' is outside ${t.source.library}/${t.source.shelf}'s list projection (views.list/groupBy/inline) and would render blank`)}if(t.defaultGroupBy!==void 0){if(!n[t.defaultGroupBy])throw Error(`[showcase] ${t.library}/${t.id}: defaultGroupBy '${t.defaultGroupBy}' is not in ${t.source.library}/${t.source.shelf}`);if(!_(e).includes(t.defaultGroupBy))throw Error(`[showcase] ${t.library}/${t.id}: defaultGroupBy '${t.defaultGroupBy}' is not a grouping candidate of ${t.source.library}/${t.source.shelf} (views.groupBy)`)}if(N.some(e=>e.library===t.library&&e.id===t.id))throw Error(`[showcase] duplicate ${t.library}/${t.id}`);N.push(t)}let P=[...S.map(e=>({label:`${e.library}/${e.shelf}`,fields:e.fields})),...C.map(e=>({label:`extend '${e.id}'`,fields:e.fields}))];for(let{label:e,fields:t}of P)for(let[n,r]of h(t)){let t=r.relation;if(!t)continue;let i=S.find(e=>e.library===t.library&&e.shelf===t.shelf);if(!i)throw Error(`[relation] ${e}.${n}: unknown target shelf ${t.library}/${t.shelf}`);if(!t.filter)continue;let a=Object.fromEntries(h(i.fields));for(let r of p(t.filter))M(a,r,`[relation] ${e}.${n}: filter key '${r}' is not in ${t.library}/${t.shelf}`)}let F={order:v,libraries:x,shelves:S,extends_:C,showcases:N,getShowcase:(e,t)=>N.find(n=>n.library===e&&n.id===t),getShowcasesFor:e=>N.filter(t=>t.library===e),getShelf:(e,t)=>S.find(n=>n.library===e&&n.shelf===t),getLibrary:e=>x.find(t=>t.meta.id===e),getExtendsFor:(e,t)=>C.filter(n=>b(n,e,t)),getFieldOptions:(e,t,n)=>A.get(`${e}/${t}/${n}`)??[],getOptionList:k,getShelfOwner:u,mutateGraph:new Map};return F.mutateGraph=B(F),F}var q=null;function J(e){q=K(e)}function Y(){if(!q)throw Error(`[registry] not initialized — call initRegistry() in the boot loader`);return q}var X=(e,t)=>Y().getShelf(e,t),Z=(e,t)=>Y().getExtendsFor(e,t),ne=e=>Y().getOptionList(e),re=(e,t)=>Y().getShowcase(e,t),ie=e=>Y().getShowcasesFor(e),ae=()=>Y().libraries,oe=()=>Y().shelves,se=()=>Y().extends_,Q=20,$=new Map;function ce(e){let t=$.get(e);if(t)return $.delete(e),$.set(e,t),t}function le(e,t){for($.delete(e),$.set(e,{rows:t,ts:Date.now()});$.size>Q;){let e=$.keys().next();if(e.done)break;$.delete(e.value)}}function ue(e){for(let t of[...$.keys()])(t===e||t.startsWith(`${e}?`))&&$.delete(t)}function de(e,t){let n=String(t.id??``);if(n)for(let[r,i]of $){if(r!==e&&!r.startsWith(`${e}?`))continue;let a=!1,o=i.rows.map(e=>{if(String(e.id)!==n)return e;a=!0;let r={...e};for(let n of Object.keys(e))n in t&&(r[n]=t[n]);return r});a&&$.set(r,{rows:o,ts:i.ts})}}export{se as a,ne as c,re as d,ie as f,le as i,X as l,S as m,de as n,Z as o,J as p,ce as r,ae as s,ue as t,oe as u};
@@ -0,0 +1 @@
1
+ import{C as e}from"./fields-BtCN_frr.js";function t(t){return e(t)}export{t};
@@ -1 +1 @@
1
- import{B as e,C as t,H as n,L as r,P as i,S as a,T as o,U as s,a as c,c as l,d as u,i as d,l as f,o as ee,p as te,v as ne,y as re}from"./fields-DMchbbOm.js";var ie=/^[a-z][a-z0-9+.-]*:\/\//i;function p(e){let t=e.trim();if(!t)return null;let n=ie.test(t),r;try{r=new URL(n?t:`http://${t}`)}catch{return{host:t}}let i={};return n&&(i.scheme=r.protocol.replace(/:$/,``)),r.username&&(i.username=r.username),r.password&&(i.password=r.password),r.hostname&&(i.host=r.hostname),r.port&&(i.port=Number(r.port)),r.pathname&&r.pathname!==`/`&&(i.path=r.pathname),r.search&&(i.query=r.search.slice(1)),r.hash&&(i.hash=r.hash.slice(1)),i}function m(e){return e?`${e.scheme?`${e.scheme}://`:``}${e.username?`${e.username}${e.password?`:${e.password}`:``}@`:``}${e.host??``}${e.port==null?``:`:${e.port}`}${e.path??``}${e.query?`?${e.query}`:``}${e.hash?`#${e.hash}`:``}`:``}function ae(e){return!e||!m(e)?``:e.scheme?m(e):`https://${m(e)}`}var h=function(e,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},h(e,t)};function g(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);h(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var _=function(e){var t=`[object `+e+`]`;return function(e){return oe(e)===t}},oe=function(e){return Object.prototype.toString.call(e)},v=function(e){return e instanceof Date?e.getTime():y(e)?e.map(v):e&&typeof e.toJSON==`function`?e.toJSON():e},se=function(e){return e??null},y=_(`Array`),ce=_(`Object`),b=_(`Function`),le=function(e,t){return e.hasOwnProperty(t)&&!b(e[t])},ue=function(e){return e&&(e.constructor===Object||e.constructor===Array||e.constructor.toString()===`function Object() { [native code] }`||e.constructor.toString()===`function Array() { [native code] }`)&&!e.toJSON},x=function(e,t){if(e==null&&e==t||e===t)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(t))return!1;if(y(e)){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(!x(e[n],t[n]))return!1;return!0}else if(ce(e)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var i in e)if(!x(e[i],t[i]))return!1;return!0}return!1},S=function(e,t,n,r,i,a){var o=t[r];if(y(e)&&isNaN(Number(o))&&!le(e,o)){for(var s=0,c=e.length;s<c;s++)if(!S(e[s],t,n,r,s,e))return!1}return r===t.length||e==null?n(e,i,a,r===0,r===t.length):S(e[o],t,n,r+1,o,e)},C=function(){function e(e,t,n,r){this.params=e,this.owneryQuery=t,this.options=n,this.name=r,this.init()}return e.prototype.init=function(){},e.prototype.reset=function(){this.done=!1,this.keep=!1},e}(),w=function(e){g(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r)||this;return a.children=i,a}return t.prototype.reset=function(){this.keep=!1,this.done=!1;for(var e=0,t=this.children.length;e<t;e++)this.children[e].reset()},t.prototype.childrenNext=function(e,t,n,r,i){for(var a=!0,o=!0,s=0,c=this.children.length;s<c;s++){var l=this.children[s];if(l.done||l.next(e,t,n,r,i),l.keep||(o=!1),l.done){if(!l.keep)break}else a=!1}this.done=a,this.keep=o},t}(C),de=function(e){g(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r,i)||this;return o.name=a,o}return t}(w),fe=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.next=function(e,t,n,r){this.childrenNext(e,t,n,r)},t}(w),T=function(e){g(t,e);function t(t,n,r,i,a){var o=e.call(this,n,r,i,a)||this;return o.keyPath=t,o.propop=!0,o._nextNestedValue=function(e,t,n,r,i){return o.childrenNext(e,t,n,r,i),!o.done},o}return t.prototype.next=function(e,t,n){S(e,this.keyPath,this._nextNestedValue,0,t,n)},t}(w),E=function(e,t){if(e instanceof Function)return e;if(e instanceof RegExp)return function(t){var n=typeof t==`string`&&e.test(t);return e.lastIndex=0,n};var n=v(e);return function(e){return t(n,v(e))}},D=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){this._test=E(this.params,this.options.compare)},t.prototype.next=function(e,t,n){(!Array.isArray(n)||n.hasOwnProperty(t))&&this._test(e,t,n)&&(this.done=!0,this.keep=!0)},t}(C),pe=function(e){return function(t,n,r,i){return e(t,n,r,i)}},O=function(e){return pe(function(t,n,r,i){var a=typeof v(t),o=e(t);return new D(function(e){var t=se(e);return typeof v(t)===a&&o(t)},n,r,i)})},me=function(e,t,n,r){var i=r.operations[e];return i||k(e),i(t,n,r,e)},k=function(e){throw Error(`Unsupported operation: ${e}`)},he=function(e,t){for(var n in e)if(t.operations.hasOwnProperty(n)||n.charAt(0)===`$`)return!0;return!1},ge=function(e,t,n,r,i){if(he(t,i)){var a=j(t,n,i),o=a[0];if(a[1].length)throw Error(`Property queries must contain only operations, or exact objects.`);return new T(e,t,r,i,o)}return new T(e,t,r,i,[new D(t,r,i)])},A=function(e,t,n){t===void 0&&(t=null);var r=n===void 0?{}:n,i=r.compare,a=r.operations,o={compare:i||x,operations:Object.assign({},a||{})},s=j(e,null,o),c=s[0],l=s[1],u=[];return c.length&&u.push(new T([],e,t,o,c)),u.push.apply(u,l),u.length===1?u[0]:new fe(e,t,o,u)},j=function(e,t,n){var r=[],i=[];if(!ue(e))return r.push(new D(e,e,n)),[r,i];for(var a in e)if(n.operations.hasOwnProperty(a)){var o=me(a,e[a],e,n);if(o&&!o.propop&&t&&!n.operations[t])throw Error(`Malformed query. ${a} cannot be matched against property.`);o!=null&&r.push(o)}else a.charAt(0)===`$`?k(a):i.push(ge(a.split(`.`),e[a],a,e,n));return[r,i]},_e=function(e){return function(t,n,r){return e.reset(),e.next(t,n,r),e.keep}},ve=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){this._test=E(this.params,this.options.compare)},t.prototype.reset=function(){e.prototype.reset.call(this),this.keep=!0},t.prototype.next=function(e){this._test(e)&&(this.done=!0,this.keep=!1)},t}(C),ye=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){if(!this.params||typeof this.params!=`object`)throw Error(`Malformed query. $elemMatch must by an object.`);this._queryOperation=A(this.params,this.owneryQuery,this.options)},t.prototype.reset=function(){e.prototype.reset.call(this),this._queryOperation.reset()},t.prototype.next=function(e){if(y(e)){for(var t=0,n=e.length;t<n;t++){this._queryOperation.reset();var r=e[t];this._queryOperation.next(r,t,e,!1),this.keep=this.keep||this._queryOperation.keep}this.done=!0}else this.done=!1,this.keep=!1},t}(C),be=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){this._queryOperation=A(this.params,this.owneryQuery,this.options)},t.prototype.reset=function(){e.prototype.reset.call(this),this._queryOperation.reset()},t.prototype.next=function(e,t,n,r){this._queryOperation.next(e,t,n,r),this.done=this._queryOperation.done,this.keep=!this._queryOperation.keep},t}(C),M=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){},t.prototype.next=function(e){y(e)&&e.length===this.params&&(this.done=!0,this.keep=!0)},t}(C),xe=function(e){if(e.length===0)throw Error(`$and/$or/$nor must be a nonempty array`)},Se=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!1,t}return t.prototype.init=function(){var e=this;xe(this.params),this._ops=this.params.map(function(t){return A(t,null,e.options)})},t.prototype.reset=function(){this.done=!1,this.keep=!1;for(var e=0,t=this._ops.length;e<t;e++)this._ops[e].reset()},t.prototype.next=function(e,t,n){for(var r=!1,i=!1,a=0,o=this._ops.length;a<o;a++){var s=this._ops[a];if(s.next(e,t,n),s.keep){r=!0,i=s.keep;break}}this.keep=i,this.done=r},t}(C),Ce=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!1,t}return t.prototype.next=function(t,n,r){e.prototype.next.call(this,t,n,r),this.keep=!this.keep},t}(Se),we=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){var e=this,t=Array.isArray(this.params)?this.params:[this.params];this._testers=t.map(function(t){if(he(t,e.options))throw Error(`cannot nest \$ under ${e.name.toLowerCase()}`);return E(t,e.options.compare)})},t.prototype.next=function(e,t,n){for(var r=!1,i=!1,a=0,o=this._testers.length;a<o;a++){var s=this._testers[a];if(s(e)){r=!0,i=!0;break}}this.keep=i,this.done=r},t}(C),Te=function(e){g(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r,i)||this;return a.propop=!0,a._in=new we(t,n,r,i),a}return t.prototype.next=function(e,t,n,r){this._in.next(e,t,n),y(n)&&!r?this._in.keep?(this.keep=!1,this.done=!0):t==n.length-1&&(this.keep=!0,this.done=!0):(this.keep=!this._in.keep,this.done=!0)},t.prototype.reset=function(){e.prototype.reset.call(this),this._in.reset()},t}(C),Ee=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.next=function(e,t,n,r,i){i?n.hasOwnProperty(t)===this.params&&(this.done=!0,this.keep=!0):(this.done=!0,this.keep=!this.params)},t}(C),De=function(e){g(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r,t.map(function(e){return A(e,n,r)}),i)||this;return a.propop=!1,xe(t),a}return t.prototype.next=function(e,t,n,r){this.childrenNext(e,t,n,r)},t}(de),Oe=function(e){g(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r,t.map(function(e){return A(e,n,r)}),i)||this;return a.propop=!0,a}return t.prototype.next=function(e,t,n,r){this.childrenNext(e,t,n,r)},t}(de),ke=function(e,t,n){return new D(e,t,n)},Ae=function(e,t,n,r){return new ve(e,t,n,r)},je=function(e,t,n,r){return new Se(e,t,n,r)},Me=function(e,t,n,r){return new Ce(e,t,n,r)},Ne=function(e,t,n,r){return new ye(e,t,n,r)},Pe=function(e,t,n,r){return new Te(e,t,n,r)},Fe=function(e,t,n,r){return new we(e,t,n,r)},Ie=O(function(e){return function(t){return t!=null&&t<e}}),Le=O(function(e){return function(t){return t===e||t<=e}}),Re=O(function(e){return function(t){return t!=null&&t>e}}),ze=O(function(e){return function(t){return t===e||t>=e}}),Be=function(e,t,n){var r=e[0],i=e[1];return new D(function(e){return v(e)%r===i},t,n)},Ve=function(e,t,n,r){return new Ee(e,t,n,r)},He=function(e,t,n){return new D(new RegExp(e,t.$options),t,n)},Ue=function(e,t,n,r){return new be(e,t,n,r)},We={number:function(e){return typeof e==`number`},string:function(e){return typeof e==`string`},bool:function(e){return typeof e==`boolean`},array:function(e){return Array.isArray(e)},null:function(e){return e===null},timestamp:function(e){return e instanceof Date}},Ge=Object.freeze({__proto__:null,$Size:M,$all:function(e,t,n,r){return new Oe(e,t,n,r)},$and:function(e,t,n,r){return new De(e,t,n,r)},$elemMatch:Ne,$eq:ke,$exists:Ve,$gt:Re,$gte:ze,$in:Fe,$lt:Ie,$lte:Le,$mod:Be,$ne:Ae,$nin:Pe,$nor:Me,$not:Ue,$options:function(){return null},$or:je,$regex:He,$size:function(e,t,n){return new M(e,t,n,`$size`)},$type:function(e,t,n){return new D(function(t){if(typeof e==`string`){if(!We[e])throw Error(`Type alias does not exist`);return We[e](t)}return t==null?!1:t instanceof e||t.constructor===e},t,n)},$where:function(e,t,n){var r;if(b(e))r=e;else if(!{}.CSP_ENABLED)r=Function(`obj`,`return `+e);else throw Error(`In CSP mode, sift does not support strings in "$where" condition`);return new D(function(e){return r.bind(e)(e)},t,n)}}),Ke=function(e,t,n){var r=n===void 0?{}:n,i=r.compare,a=r.operations;return A(e,t,{compare:i,operations:Object.assign({},Ge,a||{})})},qe=function(e,t){return t===void 0&&(t={}),_e(Ke(e,null,t))},Je=new Set([`$eq`,`$ne`,`$gt`,`$gte`,`$lt`,`$lte`]),Ye=new Set([`$in`,`$nin`]),Xe=new Set([`$contains`]),Ze=qe.createEqualsOperation,Qe=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`,$e=(e,t)=>String(e)===String(t),et={$contains(e,t,n){return Ze(t=>Array.isArray(t)&&t.some(t=>$e(t,e)),t,n)}};function N(e,t){if(!e)return!0;try{return qe(e,{operations:et})(t)}catch{return!1}}function P(e,t){return typeof e==`boolean`?e:e?N(e,t):!1}function tt(e,t,n){if(Qe(t))return[`${e} = ${n(t)}`];let r=[];for(let[i,a]of Object.entries(t))if(a!==void 0)switch(i){case`$eq`:r.push(`${e} = ${n(a)}`);break;case`$ne`:r.push(`${e} ≠ ${n(a)}`);break;case`$gt`:r.push(`${e} > ${String(a)}`);break;case`$lt`:r.push(`${e} < ${String(a)}`);break;case`$gte`:r.push(`${e} ≥ ${String(a)}`);break;case`$lte`:r.push(`${e} ≤ ${String(a)}`);break;case`$in`:r.push(`${e} ∈ {${a.map(n).join(`, `)}}`);break;case`$nin`:r.push(`${e} ∉ {${a.map(n).join(`, `)}}`);break;case`$contains`:r.push(`${e} contains ${n(a)}`);break;default:break}return r}function F(e){if(!e)return[];let t=[];for(let[n,r]of Object.entries(e))if(r!==void 0){if(n===`$and`||n===`$or`){for(let e of r)t.push(...F(e));continue}t.push(n)}return[...new Set(t)]}function I(e,t){if(!e)return[];let n=[];for(let[r,i]of Object.entries(e))if(i!==void 0){if(r===`$and`||r===`$or`){for(let e of i)n.push(...I(e,t));continue}r===t&&(typeof i==`object`&&i&&!Array.isArray(i)?n.push(...Object.keys(i)):n.push(`$eq`))}return[...new Set(n)]}function nt(e,t,n){let r=n===void 0?void 0:new Set(Array.isArray(n)?n:[n]);return e.filter(e=>r!==void 0&&e.value!==void 0&&r.has(e.value)||!e.when||N(e.when,t))}function L(e,t,n){if(!e)return[];let r=[];for(let[i,a]of Object.entries(e))if(a!==void 0){if(i===`$and`){for(let e of a)r.push(...L(e,t,n));continue}if(i===`$or`){let e=a.map(e=>L(e,t,n)).filter(e=>e.length>0).map(e=>e.length>1?`(${e.join(` and `)})`:e[0]);e.length&&r.push(e.join(` or `));continue}r.push(...tt(t(i),a,e=>n?n(i,e):String(e)))}return r}function R(e){let t=[];for(let n of e){let e=o(n)?a(n):n;if(u(e))t.push([e.key,e.type]);else if(d(e)){if(l(e))continue;let n=f(e)?`${e.key}__`:``;for(let[r,i]of R(e.fields))t.push([n+r,i])}}return t}function rt(e,t){return t.columns?Object.entries(t.columns).map(([t,n])=>[`${e}__${t}`,n]):[[e,t.column]]}function z(e,t,n,r){let i={},a=!1;for(let o of e.parts??[]){let e=`${t}__${o.key}`;if(o.meta.parts){let t=z(o.meta,e,n,r);t!==void 0&&(i[o.key]=t,a=!0);continue}if(!(e in n))continue;let s=n[e];r?.(e),i[o.key]=s,s!=null&&s!==``&&(a=!0)}return a?i:void 0}function it(e,t,n){return!e.columns||n[t]!==void 0?n[t]:z(e,t,n)}function at(e){if(e.columns)return Object.keys(e.columns)[0]}function ot(e,t){let n=e;for(let e of t.split(`__`)){if(typeof n!=`object`||!n||Array.isArray(n))return;n=n[e]}return n}function st(e,t,n){let r=e=>e&&typeof e==`object`&&!Array.isArray(e)?{...e}:{},i=t.split(`__`),a=r(e),o=a;for(let e of i.slice(0,-1))o[e]=r(o[e]),o=o[e];return o[i[i.length-1]]=n,a}function B(e){let t=[];for(let n of e){let e=o(n)?a(n):n;d(e)&&(l(e)?t.push({key:e.key,group:e}):t.push(...B(e.fields)))}return t}var V=new WeakMap;function H(e){let t=V.get(e);return t||(t=Object.fromEntries(R(e)),V.set(e,t)),t}function U(e,t){for(let n of e){if(`value`in n&&typeof n.value==`function`)throw Error(`${t}: computed element needs a key — the server computes it and needs a name to return it under`);d(n)&&U(n.fields,t)}}function W(e,t,n=``){for(let r of e){if(d(r)){W(r.fields,t,te(r)?`${n}${r.key}.`:n);continue}if(!(ee(r)&&r.key!==void 0)||!r.type.parts)continue;let e=re(r.type.parts);if(!e)continue;let i=ne(r.type.required,r.type.parts);i.length&&console.warn(`${t}: composite '${n}${r.key}' mandates a client-owned stored part (${i.join(`, `)}) and mixes it with a server-owned stored part (${e.server.join(`, `)}) — a mandated part is the client's to declare, so the write path does NOT materialize this composite and the computed part stays absent until a client sends the field. Either drop \`required\` (from the field or from the ${i.join(`/`)} filling), or give every stored part a \`value\` (the composite becomes fully server-owned).`)}}function G(e,t){U(e,t),W(e,t)}function ct(e){let n=t(e),r=R(n.fields).map(([e])=>e),i=r.find((e,t)=>r.indexOf(e)!==t);if(i)throw Error(`[shelf] ${n.library}/${n.shelf}: duplicate key '${i}'`);if(n.single&&!n.claude)throw Error(`[shelf] ${n.library}/${n.shelf}: single shelf requires \`claude\` — the agent cannot find it otherwise`);if(n.views?.list!==void 0&&!Array.isArray(n.views.list))throw Error(`[shelf] ${n.library}/${n.shelf}: views.list is a flat array of field keys — the { kind, fields } form is gone; use views.list: [...] plus views.listKind`);if(n.standalone!==!1&&!n.single&&!n.views?.list?.length&&console.warn(`[shelf] ${n.library}/${n.shelf}: standalone shelf without an explicit views.list`),n.views?.title&&!K(n.fields).some(([e])=>e===n.views.title))throw Error(`[shelf] ${n.library}/${n.shelf}: views.title '${n.views.title}' is not a field`);n.views?.list?.includes(q(n))&&console.warn(`[shelf] ${n.library}/${n.shelf}: views.list repeats the title '${q(n)}' — the title is declared separately`);let a=K(n.fields).filter(([,e])=>e.kind===`title`);return a.length>1&&console.warn(`[shelf] ${n.library}/${n.shelf}: ${a.length} title fields (${a.map(([e])=>e).join(`, `)}) — '${a[0][0]}' wins`),n.standalone!==!1&&!n.single&&q(n)===`id`&&console.warn(`[shelf] ${n.library}/${n.shelf}: no title declared (field.title() or views.title) — the record renders no heading`),G(n.fields,`[shelf] ${n.library}/${n.shelf}`),n}function K(e){let t=[];for(let n of e)u(n)?t.push([n.key,n.type]):d(n)&&!l(n)&&!f(n)&&t.push(...K(n.fields));return t}function q(e){if(e.views?.title)return e.views.title;let t=K(e.fields).find(([,e])=>e.kind===`title`);return t?t[0]:`id`}function J(e,t){return String(t[q(e)]??t.id??``)}function Y(e,t){let n=H(e.fields);return t.filter(e=>n[e])}var lt=new Set([`image`,`media`,`avatar`,`cover`]),X=e=>lt.has(e);function Z(e){let t=e.views?.inline?.length?Y(e,e.views.inline):[];return t.length?t:[q(e)]}function ut(e){let t=H(e.fields);return Z(e).find(e=>t[e]&&X(t[e].kind))}function dt(e,t){let n=H(e.fields);return Z(e).reduce((e,r)=>{if(!n[r]||!X(n[r].kind)){let n=t[r];n!=null&&n!==``&&e.push(String(n))}return e},[]).join(` `).trim()||J(e,t)}function ft(e){let t=q(e);return[t,...e.views?.list?.length?Y(e,e.views.list.filter(e=>e!==t)):[]]}function pt(e){return e.views?.listKind??`table`}var mt=new Set([`checkbox`,`relation`]);function Q(e){return e.views?.groupBy?.length?Y(e,e.views.groupBy):R(e.fields).filter(([,e])=>mt.has(e.prim)||c(e)).map(([e])=>e)}function ht(e){let t=e.views?.defaultGroupBy;return t&&H(e.fields)[t]?t:Q(e)[0]}function gt(e){return R(e.fields).find(([,e])=>e.kind===`cover`)?.[0]}function _t(e){let t=H(e.fields),n=[],r=e=>{!e||e===`id`||n.includes(e)||t[e]&&n.push(e)};r(q(e)),ft(e).forEach(r),Q(e).forEach(r),Z(e).forEach(r),r(ut(e)),r(gt(e));let i=e.views?.select;return i&&(r(i.icon),(Array.isArray(i.title)?i.title:[i.title]).forEach(r),r(i.subtitle)),[`id`,...n]}function $(t,a){let o={};for(let c of t)if(u(c)){if(c.type.compute){o[c.key]=e({error:()=>i(`derived`)}).optional();continue}o[c.key]=a?c.type.zod.optional():c.type.zod}else if(d(c))if(l(c)){let e=r(n($(c.fields,a)).passthrough());o[c.key]=a?e.optional():c.required?e:e.optional()}else if(f(c)){let e=n($(c.fields,a)).passthrough();c.kind===`url`&&(e=s(e=>typeof e==`string`?p(e)??{}:e,e)),o[c.key]=a?e.optional():c.required?e:e.optional()}else Object.assign(o,$(c.fields,a));return o}var vt=e=>e==null||e===``||Array.isArray(e)&&e.length===0;function yt(e,t,n){return e.superRefine((e,r)=>{for(let[i,a]of R(t.fields))i.includes(`__`)||n&&!(i in e)||a.required!==!0&&P(a.required,e)&&vt(e[i])&&r.addIssue({code:`custom`,path:[i],message:JSON.stringify({code:`required`})})})}function bt(e){return yt(n($(e.fields,!1)),e,!1)}function xt(e){return yt(n($(e.fields,!0)),e,!0)}export{P as A,Ye as C,I as D,F as E,m as M,ae as N,L as O,p as P,st as S,Je as T,J as _,B as a,q as b,R as c,ut as d,dt as f,at as g,pt as h,G as i,nt as j,N as k,H as l,_t as m,xt as n,ht as o,X as p,it as r,ct as s,bt as t,Q as u,rt as v,Xe as w,ft as x,ot as y};
1
+ import{B as e,C as t,H as n,L as r,P as i,S as a,T as o,U as s,a as c,c as l,d as u,i as d,l as f,o as ee,p as te,v as ne,y as re}from"./fields-BtCN_frr.js";var ie=/^[a-z][a-z0-9+.-]*:\/\//i;function p(e){let t=e.trim();if(!t)return null;let n=ie.test(t),r;try{r=new URL(n?t:`http://${t}`)}catch{return{host:t}}let i={};return n&&(i.scheme=r.protocol.replace(/:$/,``)),r.username&&(i.username=r.username),r.password&&(i.password=r.password),r.hostname&&(i.host=r.hostname),r.port&&(i.port=Number(r.port)),r.pathname&&r.pathname!==`/`&&(i.path=r.pathname),r.search&&(i.query=r.search.slice(1)),r.hash&&(i.hash=r.hash.slice(1)),i}function m(e){return e?`${e.scheme?`${e.scheme}://`:``}${e.username?`${e.username}${e.password?`:${e.password}`:``}@`:``}${e.host??``}${e.port==null?``:`:${e.port}`}${e.path??``}${e.query?`?${e.query}`:``}${e.hash?`#${e.hash}`:``}`:``}function ae(e){return!e||!m(e)?``:e.scheme?m(e):`https://${m(e)}`}var h=function(e,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},h(e,t)};function g(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);h(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var _=function(e){var t=`[object `+e+`]`;return function(e){return oe(e)===t}},oe=function(e){return Object.prototype.toString.call(e)},v=function(e){return e instanceof Date?e.getTime():y(e)?e.map(v):e&&typeof e.toJSON==`function`?e.toJSON():e},se=function(e){return e??null},y=_(`Array`),ce=_(`Object`),b=_(`Function`),le=function(e,t){return e.hasOwnProperty(t)&&!b(e[t])},ue=function(e){return e&&(e.constructor===Object||e.constructor===Array||e.constructor.toString()===`function Object() { [native code] }`||e.constructor.toString()===`function Array() { [native code] }`)&&!e.toJSON},x=function(e,t){if(e==null&&e==t||e===t)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(t))return!1;if(y(e)){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(!x(e[n],t[n]))return!1;return!0}else if(ce(e)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var i in e)if(!x(e[i],t[i]))return!1;return!0}return!1},S=function(e,t,n,r,i,a){var o=t[r];if(y(e)&&isNaN(Number(o))&&!le(e,o)){for(var s=0,c=e.length;s<c;s++)if(!S(e[s],t,n,r,s,e))return!1}return r===t.length||e==null?n(e,i,a,r===0,r===t.length):S(e[o],t,n,r+1,o,e)},C=function(){function e(e,t,n,r){this.params=e,this.owneryQuery=t,this.options=n,this.name=r,this.init()}return e.prototype.init=function(){},e.prototype.reset=function(){this.done=!1,this.keep=!1},e}(),w=function(e){g(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r)||this;return a.children=i,a}return t.prototype.reset=function(){this.keep=!1,this.done=!1;for(var e=0,t=this.children.length;e<t;e++)this.children[e].reset()},t.prototype.childrenNext=function(e,t,n,r,i){for(var a=!0,o=!0,s=0,c=this.children.length;s<c;s++){var l=this.children[s];if(l.done||l.next(e,t,n,r,i),l.keep||(o=!1),l.done){if(!l.keep)break}else a=!1}this.done=a,this.keep=o},t}(C),de=function(e){g(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r,i)||this;return o.name=a,o}return t}(w),fe=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.next=function(e,t,n,r){this.childrenNext(e,t,n,r)},t}(w),T=function(e){g(t,e);function t(t,n,r,i,a){var o=e.call(this,n,r,i,a)||this;return o.keyPath=t,o.propop=!0,o._nextNestedValue=function(e,t,n,r,i){return o.childrenNext(e,t,n,r,i),!o.done},o}return t.prototype.next=function(e,t,n){S(e,this.keyPath,this._nextNestedValue,0,t,n)},t}(w),E=function(e,t){if(e instanceof Function)return e;if(e instanceof RegExp)return function(t){var n=typeof t==`string`&&e.test(t);return e.lastIndex=0,n};var n=v(e);return function(e){return t(n,v(e))}},D=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){this._test=E(this.params,this.options.compare)},t.prototype.next=function(e,t,n){(!Array.isArray(n)||n.hasOwnProperty(t))&&this._test(e,t,n)&&(this.done=!0,this.keep=!0)},t}(C),pe=function(e){return function(t,n,r,i){return e(t,n,r,i)}},O=function(e){return pe(function(t,n,r,i){var a=typeof v(t),o=e(t);return new D(function(e){var t=se(e);return typeof v(t)===a&&o(t)},n,r,i)})},me=function(e,t,n,r){var i=r.operations[e];return i||k(e),i(t,n,r,e)},k=function(e){throw Error(`Unsupported operation: ${e}`)},he=function(e,t){for(var n in e)if(t.operations.hasOwnProperty(n)||n.charAt(0)===`$`)return!0;return!1},ge=function(e,t,n,r,i){if(he(t,i)){var a=j(t,n,i),o=a[0];if(a[1].length)throw Error(`Property queries must contain only operations, or exact objects.`);return new T(e,t,r,i,o)}return new T(e,t,r,i,[new D(t,r,i)])},A=function(e,t,n){t===void 0&&(t=null);var r=n===void 0?{}:n,i=r.compare,a=r.operations,o={compare:i||x,operations:Object.assign({},a||{})},s=j(e,null,o),c=s[0],l=s[1],u=[];return c.length&&u.push(new T([],e,t,o,c)),u.push.apply(u,l),u.length===1?u[0]:new fe(e,t,o,u)},j=function(e,t,n){var r=[],i=[];if(!ue(e))return r.push(new D(e,e,n)),[r,i];for(var a in e)if(n.operations.hasOwnProperty(a)){var o=me(a,e[a],e,n);if(o&&!o.propop&&t&&!n.operations[t])throw Error(`Malformed query. ${a} cannot be matched against property.`);o!=null&&r.push(o)}else a.charAt(0)===`$`?k(a):i.push(ge(a.split(`.`),e[a],a,e,n));return[r,i]},_e=function(e){return function(t,n,r){return e.reset(),e.next(t,n,r),e.keep}},ve=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){this._test=E(this.params,this.options.compare)},t.prototype.reset=function(){e.prototype.reset.call(this),this.keep=!0},t.prototype.next=function(e){this._test(e)&&(this.done=!0,this.keep=!1)},t}(C),ye=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){if(!this.params||typeof this.params!=`object`)throw Error(`Malformed query. $elemMatch must by an object.`);this._queryOperation=A(this.params,this.owneryQuery,this.options)},t.prototype.reset=function(){e.prototype.reset.call(this),this._queryOperation.reset()},t.prototype.next=function(e){if(y(e)){for(var t=0,n=e.length;t<n;t++){this._queryOperation.reset();var r=e[t];this._queryOperation.next(r,t,e,!1),this.keep=this.keep||this._queryOperation.keep}this.done=!0}else this.done=!1,this.keep=!1},t}(C),be=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){this._queryOperation=A(this.params,this.owneryQuery,this.options)},t.prototype.reset=function(){e.prototype.reset.call(this),this._queryOperation.reset()},t.prototype.next=function(e,t,n,r){this._queryOperation.next(e,t,n,r),this.done=this._queryOperation.done,this.keep=!this._queryOperation.keep},t}(C),M=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){},t.prototype.next=function(e){y(e)&&e.length===this.params&&(this.done=!0,this.keep=!0)},t}(C),xe=function(e){if(e.length===0)throw Error(`$and/$or/$nor must be a nonempty array`)},Se=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!1,t}return t.prototype.init=function(){var e=this;xe(this.params),this._ops=this.params.map(function(t){return A(t,null,e.options)})},t.prototype.reset=function(){this.done=!1,this.keep=!1;for(var e=0,t=this._ops.length;e<t;e++)this._ops[e].reset()},t.prototype.next=function(e,t,n){for(var r=!1,i=!1,a=0,o=this._ops.length;a<o;a++){var s=this._ops[a];if(s.next(e,t,n),s.keep){r=!0,i=s.keep;break}}this.keep=i,this.done=r},t}(C),Ce=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!1,t}return t.prototype.next=function(t,n,r){e.prototype.next.call(this,t,n,r),this.keep=!this.keep},t}(Se),we=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){var e=this,t=Array.isArray(this.params)?this.params:[this.params];this._testers=t.map(function(t){if(he(t,e.options))throw Error(`cannot nest \$ under ${e.name.toLowerCase()}`);return E(t,e.options.compare)})},t.prototype.next=function(e,t,n){for(var r=!1,i=!1,a=0,o=this._testers.length;a<o;a++){var s=this._testers[a];if(s(e)){r=!0,i=!0;break}}this.keep=i,this.done=r},t}(C),Te=function(e){g(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r,i)||this;return a.propop=!0,a._in=new we(t,n,r,i),a}return t.prototype.next=function(e,t,n,r){this._in.next(e,t,n),y(n)&&!r?this._in.keep?(this.keep=!1,this.done=!0):t==n.length-1&&(this.keep=!0,this.done=!0):(this.keep=!this._in.keep,this.done=!0)},t.prototype.reset=function(){e.prototype.reset.call(this),this._in.reset()},t}(C),Ee=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.next=function(e,t,n,r,i){i?n.hasOwnProperty(t)===this.params&&(this.done=!0,this.keep=!0):(this.done=!0,this.keep=!this.params)},t}(C),De=function(e){g(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r,t.map(function(e){return A(e,n,r)}),i)||this;return a.propop=!1,xe(t),a}return t.prototype.next=function(e,t,n,r){this.childrenNext(e,t,n,r)},t}(de),Oe=function(e){g(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r,t.map(function(e){return A(e,n,r)}),i)||this;return a.propop=!0,a}return t.prototype.next=function(e,t,n,r){this.childrenNext(e,t,n,r)},t}(de),ke=function(e,t,n){return new D(e,t,n)},Ae=function(e,t,n,r){return new ve(e,t,n,r)},je=function(e,t,n,r){return new Se(e,t,n,r)},Me=function(e,t,n,r){return new Ce(e,t,n,r)},Ne=function(e,t,n,r){return new ye(e,t,n,r)},Pe=function(e,t,n,r){return new Te(e,t,n,r)},Fe=function(e,t,n,r){return new we(e,t,n,r)},Ie=O(function(e){return function(t){return t!=null&&t<e}}),Le=O(function(e){return function(t){return t===e||t<=e}}),Re=O(function(e){return function(t){return t!=null&&t>e}}),ze=O(function(e){return function(t){return t===e||t>=e}}),Be=function(e,t,n){var r=e[0],i=e[1];return new D(function(e){return v(e)%r===i},t,n)},Ve=function(e,t,n,r){return new Ee(e,t,n,r)},He=function(e,t,n){return new D(new RegExp(e,t.$options),t,n)},Ue=function(e,t,n,r){return new be(e,t,n,r)},We={number:function(e){return typeof e==`number`},string:function(e){return typeof e==`string`},bool:function(e){return typeof e==`boolean`},array:function(e){return Array.isArray(e)},null:function(e){return e===null},timestamp:function(e){return e instanceof Date}},Ge=Object.freeze({__proto__:null,$Size:M,$all:function(e,t,n,r){return new Oe(e,t,n,r)},$and:function(e,t,n,r){return new De(e,t,n,r)},$elemMatch:Ne,$eq:ke,$exists:Ve,$gt:Re,$gte:ze,$in:Fe,$lt:Ie,$lte:Le,$mod:Be,$ne:Ae,$nin:Pe,$nor:Me,$not:Ue,$options:function(){return null},$or:je,$regex:He,$size:function(e,t,n){return new M(e,t,n,`$size`)},$type:function(e,t,n){return new D(function(t){if(typeof e==`string`){if(!We[e])throw Error(`Type alias does not exist`);return We[e](t)}return t==null?!1:t instanceof e||t.constructor===e},t,n)},$where:function(e,t,n){var r;if(b(e))r=e;else if(!{}.CSP_ENABLED)r=Function(`obj`,`return `+e);else throw Error(`In CSP mode, sift does not support strings in "$where" condition`);return new D(function(e){return r.bind(e)(e)},t,n)}}),Ke=function(e,t,n){var r=n===void 0?{}:n,i=r.compare,a=r.operations;return A(e,t,{compare:i,operations:Object.assign({},Ge,a||{})})},qe=function(e,t){return t===void 0&&(t={}),_e(Ke(e,null,t))},Je=new Set([`$eq`,`$ne`,`$gt`,`$gte`,`$lt`,`$lte`]),Ye=new Set([`$in`,`$nin`]),Xe=new Set([`$contains`]),Ze=qe.createEqualsOperation,Qe=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`,$e=(e,t)=>String(e)===String(t),et={$contains(e,t,n){return Ze(t=>Array.isArray(t)&&t.some(t=>$e(t,e)),t,n)}};function N(e,t){if(!e)return!0;try{return qe(e,{operations:et})(t)}catch{return!1}}function P(e,t){return typeof e==`boolean`?e:e?N(e,t):!1}function tt(e,t,n){if(Qe(t))return[`${e} = ${n(t)}`];let r=[];for(let[i,a]of Object.entries(t))if(a!==void 0)switch(i){case`$eq`:r.push(`${e} = ${n(a)}`);break;case`$ne`:r.push(`${e} ≠ ${n(a)}`);break;case`$gt`:r.push(`${e} > ${String(a)}`);break;case`$lt`:r.push(`${e} < ${String(a)}`);break;case`$gte`:r.push(`${e} ≥ ${String(a)}`);break;case`$lte`:r.push(`${e} ≤ ${String(a)}`);break;case`$in`:r.push(`${e} ∈ {${a.map(n).join(`, `)}}`);break;case`$nin`:r.push(`${e} ∉ {${a.map(n).join(`, `)}}`);break;case`$contains`:r.push(`${e} contains ${n(a)}`);break;default:break}return r}function F(e){if(!e)return[];let t=[];for(let[n,r]of Object.entries(e))if(r!==void 0){if(n===`$and`||n===`$or`){for(let e of r)t.push(...F(e));continue}t.push(n)}return[...new Set(t)]}function I(e,t){if(!e)return[];let n=[];for(let[r,i]of Object.entries(e))if(i!==void 0){if(r===`$and`||r===`$or`){for(let e of i)n.push(...I(e,t));continue}r===t&&(typeof i==`object`&&i&&!Array.isArray(i)?n.push(...Object.keys(i)):n.push(`$eq`))}return[...new Set(n)]}function nt(e,t,n){let r=n===void 0?void 0:new Set(Array.isArray(n)?n:[n]);return e.filter(e=>r!==void 0&&e.value!==void 0&&r.has(e.value)||!e.when||N(e.when,t))}function L(e,t,n){if(!e)return[];let r=[];for(let[i,a]of Object.entries(e))if(a!==void 0){if(i===`$and`){for(let e of a)r.push(...L(e,t,n));continue}if(i===`$or`){let e=a.map(e=>L(e,t,n)).filter(e=>e.length>0).map(e=>e.length>1?`(${e.join(` and `)})`:e[0]);e.length&&r.push(e.join(` or `));continue}r.push(...tt(t(i),a,e=>n?n(i,e):String(e)))}return r}function R(e){let t=[];for(let n of e){let e=o(n)?a(n):n;if(u(e))t.push([e.key,e.type]);else if(d(e)){if(l(e))continue;let n=f(e)?`${e.key}__`:``;for(let[r,i]of R(e.fields))t.push([n+r,i])}}return t}function rt(e,t){return t.columns?Object.entries(t.columns).map(([t,n])=>[`${e}__${t}`,n]):[[e,t.column]]}function z(e,t,n,r){let i={},a=!1;for(let o of e.parts??[]){let e=`${t}__${o.key}`;if(o.meta.parts){let t=z(o.meta,e,n,r);t!==void 0&&(i[o.key]=t,a=!0);continue}if(!(e in n))continue;let s=n[e];r?.(e),i[o.key]=s,s!=null&&s!==``&&(a=!0)}return a?i:void 0}function it(e,t,n){return!e.columns||n[t]!==void 0?n[t]:z(e,t,n)}function at(e){if(e.columns)return Object.keys(e.columns)[0]}function ot(e,t){let n=e;for(let e of t.split(`__`)){if(typeof n!=`object`||!n||Array.isArray(n))return;n=n[e]}return n}function st(e,t,n){let r=e=>e&&typeof e==`object`&&!Array.isArray(e)?{...e}:{},i=t.split(`__`),a=r(e),o=a;for(let e of i.slice(0,-1))o[e]=r(o[e]),o=o[e];return o[i[i.length-1]]=n,a}function B(e){let t=[];for(let n of e){let e=o(n)?a(n):n;d(e)&&(l(e)?t.push({key:e.key,group:e}):t.push(...B(e.fields)))}return t}var V=new WeakMap;function H(e){let t=V.get(e);return t||(t=Object.fromEntries(R(e)),V.set(e,t)),t}function U(e,t){for(let n of e){if(`value`in n&&typeof n.value==`function`)throw Error(`${t}: computed element needs a key — the server computes it and needs a name to return it under`);d(n)&&U(n.fields,t)}}function W(e,t,n=``){for(let r of e){if(d(r)){W(r.fields,t,te(r)?`${n}${r.key}.`:n);continue}if(!(ee(r)&&r.key!==void 0)||!r.type.parts)continue;let e=re(r.type.parts);if(!e)continue;let i=ne(r.type.required,r.type.parts);i.length&&console.warn(`${t}: composite '${n}${r.key}' mandates a client-owned stored part (${i.join(`, `)}) and mixes it with a server-owned stored part (${e.server.join(`, `)}) — a mandated part is the client's to declare, so the write path does NOT materialize this composite and the computed part stays absent until a client sends the field. Either drop \`required\` (from the field or from the ${i.join(`/`)} filling), or give every stored part a \`value\` (the composite becomes fully server-owned).`)}}function G(e,t){U(e,t),W(e,t)}function ct(e){let n=t(e),r=R(n.fields).map(([e])=>e),i=r.find((e,t)=>r.indexOf(e)!==t);if(i)throw Error(`[shelf] ${n.library}/${n.shelf}: duplicate key '${i}'`);if(n.single&&!n.agent)throw Error(`[shelf] ${n.library}/${n.shelf}: single shelf requires \`agent\` — the agent cannot find it otherwise`);if(n.views?.list!==void 0&&!Array.isArray(n.views.list))throw Error(`[shelf] ${n.library}/${n.shelf}: views.list is a flat array of field keys — the { kind, fields } form is gone; use views.list: [...] plus views.listKind`);if(n.standalone!==!1&&!n.single&&!n.views?.list?.length&&console.warn(`[shelf] ${n.library}/${n.shelf}: standalone shelf without an explicit views.list`),n.views?.title&&!K(n.fields).some(([e])=>e===n.views.title))throw Error(`[shelf] ${n.library}/${n.shelf}: views.title '${n.views.title}' is not a field`);n.views?.list?.includes(q(n))&&console.warn(`[shelf] ${n.library}/${n.shelf}: views.list repeats the title '${q(n)}' — the title is declared separately`);let a=K(n.fields).filter(([,e])=>e.kind===`title`);return a.length>1&&console.warn(`[shelf] ${n.library}/${n.shelf}: ${a.length} title fields (${a.map(([e])=>e).join(`, `)}) — '${a[0][0]}' wins`),n.standalone!==!1&&!n.single&&q(n)===`id`&&console.warn(`[shelf] ${n.library}/${n.shelf}: no title declared (field.title() or views.title) — the record renders no heading`),G(n.fields,`[shelf] ${n.library}/${n.shelf}`),n}function K(e){let t=[];for(let n of e)u(n)?t.push([n.key,n.type]):d(n)&&!l(n)&&!f(n)&&t.push(...K(n.fields));return t}function q(e){if(e.views?.title)return e.views.title;let t=K(e.fields).find(([,e])=>e.kind===`title`);return t?t[0]:`id`}function J(e,t){return String(t[q(e)]??t.id??``)}function Y(e,t){let n=H(e.fields);return t.filter(e=>n[e])}var lt=new Set([`image`,`media`,`avatar`,`cover`]),X=e=>lt.has(e);function Z(e){let t=e.views?.inline?.length?Y(e,e.views.inline):[];return t.length?t:[q(e)]}function ut(e){let t=H(e.fields);return Z(e).find(e=>t[e]&&X(t[e].kind))}function dt(e,t){let n=H(e.fields);return Z(e).reduce((e,r)=>{if(!n[r]||!X(n[r].kind)){let n=t[r];n!=null&&n!==``&&e.push(String(n))}return e},[]).join(` `).trim()||J(e,t)}function ft(e){let t=q(e);return[t,...e.views?.list?.length?Y(e,e.views.list.filter(e=>e!==t)):[]]}function pt(e){return e.views?.listKind??`table`}var mt=new Set([`checkbox`,`relation`]);function Q(e){return e.views?.groupBy?.length?Y(e,e.views.groupBy):R(e.fields).filter(([,e])=>mt.has(e.prim)||c(e)).map(([e])=>e)}function ht(e){let t=e.views?.defaultGroupBy;return t&&H(e.fields)[t]?t:Q(e)[0]}function gt(e){return R(e.fields).find(([,e])=>e.kind===`cover`)?.[0]}function _t(e){let t=H(e.fields),n=[],r=e=>{!e||e===`id`||n.includes(e)||t[e]&&n.push(e)};r(q(e)),ft(e).forEach(r),Q(e).forEach(r),Z(e).forEach(r),r(ut(e)),r(gt(e));let i=e.views?.select;return i&&(r(i.icon),(Array.isArray(i.title)?i.title:[i.title]).forEach(r),r(i.subtitle)),[`id`,...n]}function $(t,a){let o={};for(let c of t)if(u(c)){if(c.type.compute){o[c.key]=e({error:()=>i(`derived`)}).optional();continue}o[c.key]=a?c.type.zod.optional():c.type.zod}else if(d(c))if(l(c)){let e=r(n($(c.fields,a)).passthrough());o[c.key]=a?e.optional():c.required?e:e.optional()}else if(f(c)){let e=n($(c.fields,a)).passthrough();c.kind===`url`&&(e=s(e=>typeof e==`string`?p(e)??{}:e,e)),o[c.key]=a?e.optional():c.required?e:e.optional()}else Object.assign(o,$(c.fields,a));return o}var vt=e=>e==null||e===``||Array.isArray(e)&&e.length===0;function yt(e,t,n){return e.superRefine((e,r)=>{for(let[i,a]of R(t.fields))i.includes(`__`)||n&&!(i in e)||a.required!==!0&&P(a.required,e)&&vt(e[i])&&r.addIssue({code:`custom`,path:[i],message:JSON.stringify({code:`required`})})})}function bt(e){return yt(n($(e.fields,!1)),e,!1)}function xt(e){return yt(n($(e.fields,!0)),e,!0)}export{P as A,Ye as C,I as D,F as E,m as M,ae as N,L as O,p as P,st as S,Je as T,J as _,B as a,q as b,R as c,ut as d,dt as f,at as g,pt as h,G as i,nt as j,N as k,H as l,_t as m,xt as n,ht as o,X as p,it as r,ct as s,bt as t,Q as u,rt as v,Xe as w,ft as x,ot as y};
@@ -1 +1 @@
1
- import{C as e,T as t,w as n}from"./shelf-DmAuGkTS.js";var r=new Set([...t,...e,...n]);function i(e,t){for(let[n,a]of Object.entries(e))if(a!==void 0){if(n===`$and`||n===`$or`){for(let e of a)i(e,t);continue}if(typeof a==`object`&&a){for(let e of Object.keys(a))if(!r.has(e))throw Error(`[showcase] ${t}: operator '${e}' on '${n}' does not compile to SQL`)}}}function a(e){if(!e.id)throw Error(`[showcase] missing id`);if(!e.library)throw Error(`[showcase] ${e.id}: missing library`);if(!e.source?.library||!e.source?.shelf)throw Error(`[showcase] ${e.id}: missing source library/shelf`);if(!e.columns?.length)throw Error(`[showcase] ${e.id}: columns must not be empty`);if(!e.filter||Object.keys(e.filter).length===0)throw Error(`[showcase] ${e.id}: filter must not be empty — an unfiltered showcase is the shelf itself`);return i(e.filter,e.id),e}export{a as t};
1
+ import{C as e,T as t,w as n}from"./shelf-CRUDKiTz.js";var r=new Set([...t,...e,...n]);function i(e,t){for(let[n,a]of Object.entries(e))if(a!==void 0){if(n===`$and`||n===`$or`){for(let e of a)i(e,t);continue}if(typeof a==`object`&&a){for(let e of Object.keys(a))if(!r.has(e))throw Error(`[showcase] ${t}: operator '${e}' on '${n}' does not compile to SQL`)}}}function a(e){if(!e.id)throw Error(`[showcase] missing id`);if(!e.library)throw Error(`[showcase] ${e.id}: missing library`);if(!e.source?.library||!e.source?.shelf)throw Error(`[showcase] ${e.id}: missing source library/shelf`);if(!e.columns?.length)throw Error(`[showcase] ${e.id}: columns must not be empty`);if(!e.filter||Object.keys(e.filter).length===0)throw Error(`[showcase] ${e.id}: filter must not be empty — an unfiltered showcase is the shelf itself`);return i(e.filter,e.id),e}export{a as t};
@@ -0,0 +1 @@
1
+ import{i as e,r as t,s as n}from"./data-size-oPRYOwnj.js";import{a as r,c as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./src-Cr_oHzOc.js";export{c as SCHEME_TO_ACCESS_TYPE,a as cidr,t as dataSize,o as default,u as dev,e as diskSize,r as hostname,s as imei,l as ip,i as mac,n as ram};
@@ -1 +1 @@
1
- import{n as e}from"./fields-DMchbbOm.js";import{n as t}from"./plugin-CFEkHH3f.js";import{t as n}from"./settings-mXXsgRiF.js";var r=t({id:`webexport`,version:`1.0.0`,dependsOn:[],libraries:[],settings:n({label:`webexport.settings.label`,icon:`lucide:folder-output`,fields:{output_dir:e.localDir({label:`webexport.settings.output_dir`,required:!0})}})});export{r as default};
1
+ import{n as e}from"./fields-BtCN_frr.js";import{n as t}from"./plugin-CFEkHH3f.js";import{t as n}from"./settings-BfEurOH1.js";var r=t({id:`webexport`,version:`1.0.0`,dependsOn:[],libraries:[],settings:n({label:`webexport.settings.label`,icon:`lucide:folder-output`,fields:{output_dir:e.localDir({label:`webexport.settings.output_dir`,required:!0})}})});export{r as default};
@@ -1,2 +1,2 @@
1
- import{n as e,r as t}from"./fields-DMchbbOm.js";import{s as n}from"./shelf-DmAuGkTS.js";import{t as r}from"./extend-u4UeeES5.js";import{n as i,r as a}from"./plugin-CFEkHH3f.js";var o=n({shelf:`personal_document`,library:`documents`,label:`documents.personal_document.label`,icon:`lucide:id-card`,views:{list:[`owner`,`type`,`surname`,`expires`]},fields:{name:e.title({label:`core.fields.name`}),about:e.illustrated({label:`documents.personal_document.fields.about`,fields:{image:e.avatar({ui:{role:`avatar`}}),text:e.text({rules:{max:1e3}})}}),idcard:e.idcard({number:{number:e.string({label:`documents.personal_document.fields.number`,rules:{max:50}})},meta:{issued:e.date({label:`documents.personal_document.fields.issued`}),authority:e.string({label:`documents.personal_document.fields.authority`,rules:{max:200}})}}),countdown:e.countdown({source:{expires:e.reminder({label:`documents.personal_document.fields.expires`,rules:{lead:60}})}}),surname:e.string({label:`documents.personal_document.fields.surname`,rules:{max:100},ui:{span:6}}),given_names:e.string({label:`documents.personal_document.fields.given_names`,rules:{max:200},ui:{span:6}}),birth_date:e.date({label:`documents.personal_document.fields.birth_date`,ui:{span:4}}),sex:e.string({label:`documents.personal_document.fields.sex`,strict:!0,noSearch:!0,options:[{value:`M`,title:`documents.personal_document.options.sex.M`},{value:`F`,title:`documents.personal_document.options.sex.F`}],ui:{span:4}}),nationality:e.string({label:`documents.personal_document.fields.nationality`,options:`countries`,strict:!0,noSearch:!0,ui:{span:4}}),owner:e.relation({label:`documents.personal_document.fields.owner`,options:t({library:`people`,shelf:`person`}),ui:{span:6}}),storage:e.relation({label:`documents.personal_document.fields.storage`,options:t({library:`things`,shelf:`storage_location`}),ui:{span:6}}),record_no:e.string({label:`documents.personal_document.fields.record_no`,rules:{max:50},ui:{span:6}}),mrz:e.string({label:`documents.personal_document.fields.mrz`,rules:{max:200},ui:{span:6}}),photos:e.image({label:`documents.personal_document.fields.photos`,multiple:!0}),type:e.string({label:`core.fields.type`,required:!0,strict:!0,noSearch:!0,options:[{value:`P`,title:`documents.personal_document.options.type.P`},{value:`PA`,title:`documents.personal_document.options.type.PA`},{value:`TP`,title:`documents.personal_document.options.type.TP`},{value:`ID`,title:`documents.personal_document.options.type.ID`},{value:`DL`,title:`documents.personal_document.options.type.DL`},{value:`BR`,title:`documents.personal_document.options.type.BR`},{value:`MC`,title:`documents.personal_document.options.type.MC`},{value:`OT`,title:`documents.personal_document.options.type.OT`}]}),tags:e.tags({label:`documents.personal_document.fields.tags`}),notes:e.text({label:`documents.personal_document.fields.notes`,rules:{max:1e3}})}}),s=r({id:`person_identity`,label:`documents.person_identity.label`,icon:`lucide:globe`,attachTo:[{library:`people`,shelf:`person`}],claude:`Canonical person identity (not tied to a physical document).
2
- nationality — ISO alpha-2. variants — given/family name per language (field.keyed by lang: name+surname).`,fields:{nationality:e.string({label:`documents.person_identity.fields.nationality`,options:`countries`,strict:!0,noSearch:!0}),variants:e.keyed({label:`documents.person_identity.fields.variants`,icon:`lucide:languages`,fields:{lang:e.string({label:`documents.person_identity.variants.lang`,options:`languages`,strict:!0,noSearch:!0}),name:e.string({label:`documents.person_identity.variants.name`}),surname:e.string({label:`documents.person_identity.variants.surname`})},by:`lang`})}}),c=i({id:`documents`,version:`1.0.0`,dependsOn:[`people`,`things`],libraries:[{meta:a({id:`documents`,label:`documents.library.label`,icon:`lucide:id-card`,agent:`Personal documents — IDs, passports, licences (personal_document); tracks expiry.`}),shelves:[o]}],extends_:[s]});export{c as default};
1
+ import{n as e,r as t}from"./fields-BtCN_frr.js";import{s as n}from"./shelf-CRUDKiTz.js";import{t as r}from"./extend-BTkr7oJ8.js";import{n as i,r as a}from"./plugin-CFEkHH3f.js";var o=n({shelf:`personal_document`,library:`documents`,label:`documents.personal_document.label`,icon:`lucide:id-card`,views:{list:[`owner`,`type`,`surname`,`expires`]},fields:{name:e.title({label:`core.fields.name`}),about:e.illustrated({label:`documents.personal_document.fields.about`,fields:{image:e.avatar({ui:{role:`avatar`}}),text:e.text({rules:{max:1e3}})}}),idcard:e.idcard({number:{number:e.string({label:`documents.personal_document.fields.number`,rules:{max:50}})},meta:{issued:e.date({label:`documents.personal_document.fields.issued`}),authority:e.string({label:`documents.personal_document.fields.authority`,rules:{max:200}})}}),countdown:e.countdown({source:{expires:e.reminder({label:`documents.personal_document.fields.expires`,rules:{lead:60}})}}),surname:e.string({label:`documents.personal_document.fields.surname`,rules:{max:100},ui:{span:6}}),given_names:e.string({label:`documents.personal_document.fields.given_names`,rules:{max:200},ui:{span:6}}),birth_date:e.date({label:`documents.personal_document.fields.birth_date`,ui:{span:4}}),sex:e.string({label:`documents.personal_document.fields.sex`,strict:!0,noSearch:!0,options:[{value:`M`,title:`documents.personal_document.options.sex.M`},{value:`F`,title:`documents.personal_document.options.sex.F`}],ui:{span:4}}),nationality:e.string({label:`documents.personal_document.fields.nationality`,options:`countries`,strict:!0,noSearch:!0,ui:{span:4}}),owner:e.relation({label:`documents.personal_document.fields.owner`,options:t({library:`people`,shelf:`person`}),ui:{span:6}}),storage:e.relation({label:`documents.personal_document.fields.storage`,options:t({library:`things`,shelf:`storage_location`}),ui:{span:6}}),record_no:e.string({label:`documents.personal_document.fields.record_no`,rules:{max:50},ui:{span:6}}),mrz:e.string({label:`documents.personal_document.fields.mrz`,rules:{max:200},ui:{span:6}}),photos:e.image({label:`documents.personal_document.fields.photos`,multiple:!0}),type:e.string({label:`core.fields.type`,required:!0,strict:!0,noSearch:!0,options:[{value:`P`,title:`documents.personal_document.options.type.P`},{value:`PA`,title:`documents.personal_document.options.type.PA`},{value:`TP`,title:`documents.personal_document.options.type.TP`},{value:`ID`,title:`documents.personal_document.options.type.ID`},{value:`DL`,title:`documents.personal_document.options.type.DL`},{value:`BR`,title:`documents.personal_document.options.type.BR`},{value:`MC`,title:`documents.personal_document.options.type.MC`},{value:`OT`,title:`documents.personal_document.options.type.OT`}]}),tags:e.tags({label:`documents.personal_document.fields.tags`}),notes:e.text({label:`documents.personal_document.fields.notes`,rules:{max:1e3}})}}),s=r({id:`person_identity`,label:`documents.person_identity.label`,icon:`lucide:globe`,attachTo:[{library:`people`,shelf:`person`}],agent:`Canonical person identity (not tied to a physical document).
2
+ nationality — ISO alpha-2. variants — given/family name per language (field.keyed by lang: name+surname).`,fields:{nationality:e.string({label:`documents.person_identity.fields.nationality`,options:`countries`,strict:!0,noSearch:!0}),variants:e.keyed({label:`documents.person_identity.fields.variants`,icon:`lucide:languages`,fields:{lang:e.string({label:`documents.person_identity.variants.lang`,options:`languages`,strict:!0,noSearch:!0}),name:e.string({label:`documents.person_identity.variants.name`}),surname:e.string({label:`documents.person_identity.variants.surname`})},by:`lang`})}}),c=i({id:`documents`,version:`1.0.0`,dependsOn:[`people`,`things`],libraries:[{meta:a({id:`documents`,label:`documents.library.label`,icon:`lucide:id-card`,agent:`Personal documents — IDs, passports, licences (personal_document); tracks expiry.`,starterHint:`documents that are about to expire`}),shelves:[o]}],extends_:[s]});export{c as default};
@@ -1,6 +1,6 @@
1
- import{n as e}from"./fields-DMchbbOm.js";import{s as t}from"./shelf-DmAuGkTS.js";import{n,r}from"./plugin-CFEkHH3f.js";function i(e,t){if(typeof e!=`string`||!e)return null;let n=Number(t);if(!Number.isFinite(n)||n<=0)return null;let r=Date.parse(e);return Number.isNaN(r)?null:new Date(r+n*864e5).toISOString().slice(0,10)}var a=(e,t)=>({record:n})=>i(n[e],n[t]),o=t({shelf:`plant`,library:`garden`,label:`garden.plant.label`,icon:`lucide:sprout`,claude:`A houseplant. title — name. variety — cultivar/subspecies. location — where it stands.
1
+ import{n as e}from"./fields-BtCN_frr.js";import{s as t}from"./shelf-CRUDKiTz.js";import{n,r}from"./plugin-CFEkHH3f.js";function i(e,t){if(typeof e!=`string`||!e)return null;let n=Number(t);if(!Number.isFinite(n)||n<=0)return null;let r=Date.parse(e);return Number.isNaN(r)?null:new Date(r+n*864e5).toISOString().slice(0,10)}var a=(e,t)=>({record:n})=>i(n[e],n[t]),o=t({shelf:`plant`,library:`garden`,label:`garden.plant.label`,icon:`lucide:sprout`,agent:`A houseplant. title — name. variety — cultivar/subspecies. location — where it stands.
2
2
  wateringDays — watering interval (days). lastWatered — date of last watering.
3
3
  fertilizerDays — fertilizing interval. lastFertilized — last date.
4
4
  planted — date planted/acquired.
5
5
  nextWatering/nextFertilizing are COMPUTED by the server (last date + interval) and rejected on write:
6
- to move them, write lastWatered/lastFertilized.`,views:{list:[`variety`,`location`,`wateringDays`,`lastWatered`]},fields:{name:e.title({label:`core.fields.name`}),about:e.illustrated({label:`garden.plant.fields.about`,fields:{image:e.avatar({ui:{role:`avatar`}}),text:e.text({rules:{max:1e3}})}}),photos:e.image({label:`garden.plant.fields.photos`,multiple:!0}),specimen:e.specimen({title:{variety:e.string({label:`garden.plant.fields.variety`,rules:{max:100}})},subtitle:{location:e.string({label:`garden.plant.fields.location`,strict:!0,noSearch:!0,options:[{value:`windowsill`,title:`garden.plant.options.location.windowsill`},{value:`balcony`,title:`garden.plant.options.location.balcony`},{value:`hanging`,title:`garden.plant.options.location.hanging`},{value:`floor`,title:`garden.plant.options.location.floor`},{value:`other`,title:`garden.plant.options.location.other`}]})},conditions:{sunlight:e.string({label:`garden.plant.fields.sunlight`,strict:!0,noSearch:!0,options:[{value:`shade`,title:`garden.plant.options.sunlight.shade`},{value:`partial`,title:`garden.plant.options.sunlight.partial`},{value:`indirect`,title:`garden.plant.options.sunlight.indirect`},{value:`direct`,title:`garden.plant.options.sunlight.direct`}]}),pot:e.string({label:`garden.plant.fields.pot`,rules:{max:100}})}}),planted:e.date({label:`garden.plant.fields.planted`,rules:{min:`2000-01-01`,max:`today`}}),wateringDays:e.int({label:`garden.plant.fields.wateringDays`,rules:{min:1,max:365},mutate:[`nextWatering`]}),lastWatered:e.date({label:`garden.plant.fields.lastWatered`,rules:{max:`today`},mutate:[`nextWatering`]}),countdown:e.countdown({source:{nextWatering:e.reminder({label:`garden.plant.fields.nextWatering`,rules:{lead:3},value:a(`lastWatered`,`wateringDays`)})}}),fertilizerDays:e.int({label:`garden.plant.fields.fertilizerDays`,rules:{min:1,max:365},mutate:[`nextFertilizing`]}),lastFertilized:e.date({label:`garden.plant.fields.lastFertilized`,rules:{max:`today`},mutate:[`nextFertilizing`]}),nextFertilizing:e.reminder({label:`garden.plant.fields.nextFertilizing`,rules:{lead:7},value:a(`lastFertilized`,`fertilizerDays`)}),button:e.button({label:`garden.plant.actions.watered`,value:`garden.watered`,icon:`lucide:droplet`}),button2:e.button({label:`garden.plant.actions.fertilized`,value:`garden.fertilized`,icon:`lucide:flask-conical`}),tags:e.tags({label:`garden.plant.fields.tags`}),notes:e.text({label:`garden.plant.fields.notes`,rules:{max:500}})}}),s=n({id:`garden`,version:`1.0.0`,dependsOn:[`things`],libraries:[{meta:r({id:`garden`,label:`garden.library.label`,icon:`lucide:sprout`,agent:`Garden plants (plant) — watering and fertilizing schedule.`}),shelves:[o]}],fieldContribs:[{library:`things`,shelf:`item`,field:`type`,options:[{value:`garden`,title:`garden.contrib.type.garden`}]}]});export{s as default};
6
+ to move them, write lastWatered/lastFertilized.`,views:{list:[`variety`,`location`,`wateringDays`,`lastWatered`]},fields:{name:e.title({label:`core.fields.name`}),about:e.illustrated({label:`garden.plant.fields.about`,fields:{image:e.avatar({ui:{role:`avatar`}}),text:e.text({rules:{max:1e3}})}}),photos:e.image({label:`garden.plant.fields.photos`,multiple:!0}),specimen:e.specimen({title:{variety:e.string({label:`garden.plant.fields.variety`,rules:{max:100}})},subtitle:{location:e.string({label:`garden.plant.fields.location`,strict:!0,noSearch:!0,options:[{value:`windowsill`,title:`garden.plant.options.location.windowsill`},{value:`balcony`,title:`garden.plant.options.location.balcony`},{value:`hanging`,title:`garden.plant.options.location.hanging`},{value:`floor`,title:`garden.plant.options.location.floor`},{value:`other`,title:`garden.plant.options.location.other`}]})},conditions:{sunlight:e.string({label:`garden.plant.fields.sunlight`,strict:!0,noSearch:!0,options:[{value:`shade`,title:`garden.plant.options.sunlight.shade`},{value:`partial`,title:`garden.plant.options.sunlight.partial`},{value:`indirect`,title:`garden.plant.options.sunlight.indirect`},{value:`direct`,title:`garden.plant.options.sunlight.direct`}]}),pot:e.string({label:`garden.plant.fields.pot`,rules:{max:100}})}}),planted:e.date({label:`garden.plant.fields.planted`,rules:{min:`2000-01-01`,max:`today`}}),wateringDays:e.int({label:`garden.plant.fields.wateringDays`,rules:{min:1,max:365},mutate:[`nextWatering`]}),lastWatered:e.date({label:`garden.plant.fields.lastWatered`,rules:{max:`today`},mutate:[`nextWatering`]}),countdown:e.countdown({source:{nextWatering:e.reminder({label:`garden.plant.fields.nextWatering`,rules:{lead:3},value:a(`lastWatered`,`wateringDays`)})}}),fertilizerDays:e.int({label:`garden.plant.fields.fertilizerDays`,rules:{min:1,max:365},mutate:[`nextFertilizing`]}),lastFertilized:e.date({label:`garden.plant.fields.lastFertilized`,rules:{max:`today`},mutate:[`nextFertilizing`]}),nextFertilizing:e.reminder({label:`garden.plant.fields.nextFertilizing`,rules:{lead:7},value:a(`lastFertilized`,`fertilizerDays`)}),button:e.button({label:`garden.plant.actions.watered`,value:`garden.watered`,icon:`lucide:droplet`}),button2:e.button({label:`garden.plant.actions.fertilized`,value:`garden.fertilized`,icon:`lucide:flask-conical`}),tags:e.tags({label:`garden.plant.fields.tags`}),notes:e.text({label:`garden.plant.fields.notes`,rules:{max:500}})}}),s=n({id:`garden`,version:`1.0.0`,dependsOn:[`things`],libraries:[{meta:r({id:`garden`,label:`garden.library.label`,icon:`lucide:sprout`,agent:`Garden plants (plant) — watering and fertilizing schedule.`,starterHint:`plants due for watering or fertilizing`}),shelves:[o]}],fieldContribs:[{library:`things`,shelf:`item`,field:`type`,options:[{value:`garden`,title:`garden.contrib.type.garden`}]}]});export{s as default};
@@ -0,0 +1,6 @@
1
+ import{n as e,r as t}from"./fields-BtCN_frr.js";import{s as n}from"./shelf-CRUDKiTz.js";import{n as r,r as i}from"./plugin-CFEkHH3f.js";var a=n({shelf:`item`,library:`things`,label:`things.item.label`,icon:`lucide:package`,agent:`A physical item. name — the title. type — an optional FAMILY classifier (extends can add types, e.g. device). subtype — an optional LEAF within that family (e.g. type=device, subtype=vtx for a video transmitter); an empty subtype is a valid state. Nothing validates that the pair is coherent, so when you set one, set the other consistently with it. store — a relation to things/store; store_legacy is hidden pre-migration free text kept only as a one-release rollback safety net, never write to it.`,views:{list:[`type`,`subtype`,`brand`,`model`,`location`],groupBy:[`type`,`subtype`,`paymentStatus`,`condition`,`owner`,`location`,`store`,`madeIn`]},fields:{name:e.title({label:`core.fields.name`}),about:e.illustrated({label:`things.item.fields.about`,fields:{image:e.avatar({ui:{role:`avatar`}}),text:e.text({rules:{max:1e3}})}}),properties:e.properties({columns:4,fields:{type:e.string({label:`core.fields.type`,options:[{value:`clothing`,title:`things.item.options.type.clothing`},{value:`bag`,title:`things.item.options.type.bag`},{value:`cable`,title:`things.item.options.type.cable`},{value:`tool`,title:`things.item.options.type.tool`},{value:`furniture`,title:`things.item.options.type.furniture`},{value:`appliance`,title:`things.item.options.type.appliance`},{value:`household`,title:`things.item.options.type.household`},{value:`consumable`,title:`things.item.options.type.consumable`},{value:`personal_care`,title:`things.item.options.type.personal_care`},{value:`sports`,title:`things.item.options.type.sports`},{value:`hobby`,title:`things.item.options.type.hobby`},{value:`hardware`,title:`things.item.options.type.hardware`},{value:`decor`,title:`things.item.options.type.decor`},{value:`stationery`,title:`things.item.options.type.stationery`},{value:`other`,title:`things.item.options.type.other`}],strict:!0,noSearch:!0,ui:{span:3}}),subtype:e.string({label:`core.fields.subtype`,options:[],strict:!0,noSearch:!0,ui:{span:3}}),status:e.status({source:{condition:e.string({label:`things.item.fields.condition`,strict:!0,noSearch:!0,ui:{span:3},options:[{value:`new`,title:`things.item.options.condition.new`},{value:`good`,title:`things.item.options.condition.good`},{value:`fair`,title:`things.item.options.condition.fair`},{value:`poor`,title:`things.item.options.condition.poor`}]})}}),quantity:e.int({label:`things.item.fields.quantity`,rules:{min:0},ui:{span:3}}),owner:e.relation({label:`things.item.fields.owner`,options:t({library:`people`,shelf:`person`}),ui:{span:3}}),location:e.relation({label:`things.item.fields.location`,options:t({library:`things`,shelf:`storage_location`}),ui:{span:3}}),brand:e.string({label:`things.item.fields.brand`,rules:{max:100},ui:{span:3}}),model:e.string({label:`things.item.fields.model`,rules:{max:100},ui:{span:3}})}}),countdown:e.countdown({source:{warrantyExpires:e.reminder({label:`things.item.fields.warrantyExpires`,rules:{lead:30},agent:`When the warranty EXPIRES — not when the item was bought.`})}}),group:e.group({label:`things.item.groups.specs`,icon:`lucide:ruler`,scope:`hoist`,fields:{serialNumber:e.string({label:`things.item.fields.serialNumber`,rules:{max:80},ui:{span:4}}),weight:e.weight({label:`things.item.fields.weight`,ui:{span:4}}),dimensions:e.dimensions({label:`things.item.fields.dimensions`,ui:{span:4}}),color:e.string({label:`things.item.fields.color`,rules:{max:120},ui:{span:4}}),material:e.string({label:`things.item.fields.material`,rules:{max:80},ui:{span:4}}),madeIn:e.country({label:`things.item.fields.madeIn`,ui:{span:4}})}}),group2:e.group({label:`things.item.groups.purchase`,icon:`lucide:shopping-cart`,scope:`hoist`,fields:{purchaseDate:e.date({label:`things.item.fields.purchaseDate`,ui:{span:4}}),purchasePrice:e.money({label:`things.item.fields.purchasePrice`,ui:{span:2}}),currency:e.currency({label:`core.fields.currency`,default:`UAH`,ui:{span:2}}),paymentStatus:e.string({label:`things.item.fields.paymentStatus`,strict:!0,noSearch:!0,ui:{span:4},options:[{value:`bought`,title:`things.item.options.paymentStatus.bought`},{value:`installment`,title:`things.item.options.paymentStatus.installment`},{value:`credit`,title:`things.item.options.paymentStatus.credit`}]}),store:e.relation({label:`things.item.fields.store`,options:t({library:`things`,shelf:`store`}),ui:{span:6}}),store_legacy:e.string({label:`things.item.fields.store_legacy`,ui:{hidden:!0},rules:{max:100}}),orderNumber:e.string({label:`things.item.fields.orderNumber`,rules:{max:100},ui:{span:6}}),link:e.link({label:`things.item.fields.link`,ui:{span:12}}),receipt:e.image({label:`things.item.fields.receipt`})}}),group3:e.group({label:`things.item.groups.media`,icon:`lucide:images`,scope:`hoist`,fields:{manual:e.document({label:`things.item.fields.manual`,ui:{span:6}}),photos:e.image({label:`things.item.fields.photos`,multiple:!0})}}),tags:e.tags({label:`things.item.fields.tags`}),notes:e.text({label:`things.item.fields.notes`,rules:{max:2e3}})}}),o=n({shelf:`storage_location`,library:`things`,label:`things.storage_location.label`,icon:`lucide:map-pin`,agent:`A storage location for items. name — what we call the place. path — hierarchy levels in order (room, furniture, shelf, container), free-form.`,views:{list:[`path`]},fields:{name:e.title({label:`core.fields.name`,required:!0}),description:e.text({label:`things.storage_location.fields.description`,rules:{max:1e3}}),path:e.string({label:`things.storage_location.fields.path`,multiple:!0,rules:{max:120}}),notes:e.text({label:`things.storage_location.fields.notes`,rules:{max:2e3}})}}),s=n({shelf:`store`,library:`things`,label:`things.store.label`,icon:`lucide:store`,agent:`A shop, marketplace or seller a thing was bought from; things/item.store points here.
2
+ scripts — a collection of page-extraction scripts for this shop. Each row's script field is
3
+ plain JavaScript text, readable in one record read, and is written by uploading a file or
4
+ through the API — never hand-edited in the web form. urlPattern is a human hint about which
5
+ pages a script applies to; nothing matches against it automatically. account holds a login or
6
+ a loyalty-card number and is stored in the clear — never write a password there.`,views:{list:[`type`,`country`,`status`,`rating`],inline:[`logo`,`name`],groupBy:[`type`,`status`,`country`]},fields:{name:e.title({label:`core.fields.name`}),logo:e.avatar({label:`things.store.fields.logo`,ui:{role:`avatar`}}),description:e.text({label:`things.store.fields.description`,rules:{max:1e3}}),group:e.group({label:`things.store.groups.place`,icon:`lucide:map-pin`,scope:`hoist`,fields:{address:e.string({label:`things.store.fields.address`,rules:{max:200},ui:{span:6}}),geo:e.geo({label:`things.store.fields.geo`,ui:{span:6}}),hours:e.keyed({label:`things.store.fields.hours`,fields:{day:e.string({label:`core.fields.weekday`,options:`weekdays`,strict:!0,noSearch:!0}),open:e.time({label:`things.store.fields.open`}),close:e.time({label:`things.store.fields.close`})},by:`day`,unique:[`day`]})}}),links:e.group({scope:`nest`,label:`things.store.groups.links`,icon:`lucide:link`,multiple:!0,fields:{kind:e.string({label:`things.store.fields.linkKind`,options:[{value:`site`,title:`things.store.options.linkKind.site`},{value:`account`,title:`things.store.options.linkKind.account`},{value:`orders`,title:`things.store.options.linkKind.orders`},{value:`support`,title:`things.store.options.linkKind.support`},{value:`other`,title:`things.store.options.linkKind.other`}],strict:!0,noSearch:!0}),url:e.link({label:`things.store.fields.url`,required:!0})}}),account:e.string({label:`things.store.fields.account`,rules:{max:100}}),scripts:e.group({scope:`nest`,label:`things.store.groups.scripts`,icon:`lucide:code`,multiple:!0,fields:{title:e.string({label:`things.store.fields.scriptTitle`,required:!0,rules:{max:100}}),kind:e.string({label:`things.store.fields.scriptKind`,options:[{value:`product`,title:`things.store.options.scriptKind.product`},{value:`orders`,title:`things.store.options.scriptKind.orders`},{value:`receipt`,title:`things.store.options.scriptKind.receipt`},{value:`search`,title:`things.store.options.scriptKind.search`},{value:`other`,title:`things.store.options.scriptKind.other`}],strict:!0,noSearch:!0}),urlPattern:e.string({label:`things.store.fields.urlPattern`,rules:{max:200}}),script:e.source({label:`things.store.fields.script`,rules:{ext:`js`}}),note:e.text({label:`things.store.fields.scriptNote`,rules:{max:500}})}}),photos:e.image({label:`things.store.fields.photos`,multiple:!0}),properties:e.properties({columns:4,fields:{type:e.string({label:`core.fields.type`,options:[{value:`marketplace`,title:`things.store.options.type.marketplace`},{value:`online_store`,title:`things.store.options.type.online_store`},{value:`retail`,title:`things.store.options.type.retail`},{value:`secondhand`,title:`things.store.options.type.secondhand`},{value:`manufacturer`,title:`things.store.options.type.manufacturer`}],strict:!0,noSearch:!0,ui:{span:3}}),country:e.country({label:`things.store.fields.country`,ui:{span:3}}),rating:e.rating({label:`things.store.fields.rating`,ui:{span:3}}),status:e.string({label:`things.store.fields.status`,options:[{value:`active`,title:`things.store.options.status.active`},{value:`rare`,title:`things.store.options.status.rare`},{value:`abandoned`,title:`things.store.options.status.abandoned`}],strict:!0,noSearch:!0,ui:{span:3}})}}),tags:e.tags({label:`things.store.fields.tags`}),notes:e.text({label:`things.store.fields.notes`,rules:{max:2e3}})}}),c=r({id:`things`,version:`1.0.0`,dependsOn:[`people`],libraries:[{meta:i({id:`things`,label:`things.library.label`,icon:`lucide:package`,agent:`Belongings and where they are stored (item, storage_location, store). Also hosts network hosts (device_info) and drone builds.`,starterHint:`what's about to warranty-expire`}),shelves:[a,o,s]}]});export{c as default};
@@ -1 +1 @@
1
- import{n as e}from"./fields-DMchbbOm.js";import{n as t}from"./plugin-CFEkHH3f.js";import{t as n}from"./settings-mXXsgRiF.js";var r=t({id:`telegram`,version:`1.0.0`,dependsOn:[],settings:n({label:`telegram.settings.label`,fields:{api_id:e.int({label:`telegram.settings.api_id`}),api_hash:e.password({label:`telegram.settings.api_hash`}),bot_token:e.password({label:`telegram.settings.bot_token`}),phone:e.tel({label:`telegram.settings.phone`}),reasoning_display:e.string({label:`telegram.settings.reasoning_display`,default:`collapsible`,strict:!0,noSearch:!0,options:[{value:`off`,title:`telegram.settings.reasoning_display_off`},{value:`collapsible`,title:`telegram.settings.reasoning_display_collapsible`},{value:`separate`,title:`telegram.settings.reasoning_display_separate`}]})}})});export{r as default};
1
+ import{n as e}from"./fields-BtCN_frr.js";import{n as t}from"./plugin-CFEkHH3f.js";import{t as n}from"./settings-BfEurOH1.js";var r=t({id:`telegram`,version:`1.0.0`,dependsOn:[],settings:n({label:`telegram.settings.label`,fields:{api_id:e.int({label:`telegram.settings.api_id`}),api_hash:e.password({label:`telegram.settings.api_hash`}),bot_token:e.password({label:`telegram.settings.bot_token`}),phone:e.tel({label:`telegram.settings.phone`}),reasoning_display:e.string({label:`telegram.settings.reasoning_display`,default:`collapsible`,strict:!0,noSearch:!0,options:[{value:`off`,title:`telegram.settings.reasoning_display_off`},{value:`collapsible`,title:`telegram.settings.reasoning_display_collapsible`},{value:`separate`,title:`telegram.settings.reasoning_display_separate`}]})}})});export{r as default};
@@ -1 +1 @@
1
- import{n as e,r as t}from"./fields-DMchbbOm.js";import{s as n}from"./shelf-DmAuGkTS.js";import{n as r,r as i}from"./plugin-CFEkHH3f.js";var a=[`accommodations`,`activities`,`insurances`],o=e=>{let t=typeof e==`string`&&e!==``?Number(e):e;return typeof t==`number`&&Number.isFinite(t)?t:null},s=({record:e})=>{let t=Date.parse(String(e.date_from??``)),n=Date.parse(String(e.date_to??``));return Number.isNaN(t)||Number.isNaN(n)||n<t?null:Math.round((n-t)/864e5)+1},c=({record:e})=>{let t=0,n=!1;for(let r of a){let i=e[r];if(Array.isArray(i))for(let e of i){let r=o(e?.cost);r!=null&&(t+=r,n=!0)}}return n?Math.round(t*100)/100:null},l=n({shelf:`trip`,library:`travel`,label:`travel.trip.label`,icon:`lucide:plane`,views:{list:[`destination`,`date_from`,`date_to`,`status`]},fields:{name:e.title({label:`core.fields.name`}),description:e.text({label:`travel.trip.fields.description`,rules:{max:2e3}}),destination:e.string({label:`travel.trip.fields.destination`,rules:{max:200}}),countdown:e.countdown({source:{date_from:e.date({label:`travel.trip.fields.date_from`,mutate:[`days`]})}}),date_to:e.date({label:`travel.trip.fields.date_to`,mutate:[`days`]}),status:e.status({source:{status:e.string({label:`travel.trip.fields.status`,strict:!0,noSearch:!0,options:[{value:`planned`,title:`travel.trip.options.status.planned`},{value:`active`,title:`travel.trip.options.status.active`},{value:`completed`,title:`travel.trip.options.status.completed`},{value:`cancelled`,title:`travel.trip.options.status.cancelled`}]})}}),people:e.people({source:{participants:e.relation({label:`travel.trip.fields.participants`,options:t({library:`people`,shelf:`person`}),multiple:!0})}}),currency:e.currency({label:`core.fields.currency`,default:`UAH`}),budget:e.money({label:`travel.trip.fields.budget`,mutate:[`budget_state`]}),photos:e.image({label:`travel.trip.fields.photos`,multiple:!0}),packing_items:e.check({label:`travel.trip.fields.packing_items`,slots:[`travel.trip.packing.prepared`,`travel.trip.packing.packed`,`travel.trip.packing.packed_back`],fields:{item:e.relation({label:`travel.trip.packing.item`,options:t({library:`things`,shelf:`item`})})},multiple:!0}),packing_list:e.check({label:`travel.trip.fields.packing_list`,slots:[`travel.trip.packing.prepared`,`travel.trip.packing.packed`,`travel.trip.packing.packed_back`],multiple:!0}),legs:e.group({scope:`nest`,label:`travel.trip.fields.legs`,icon:`lucide:route`,multiple:!0,fields:{date:e.date({label:`travel.trip.leg.date`}),leg_type:e.string({label:`travel.trip.leg.leg_type`,strict:!0,noSearch:!0,options:[{value:`flight`,title:`travel.trip.leg_opt.leg_type.flight`},{value:`train`,title:`travel.trip.leg_opt.leg_type.train`},{value:`bus`,title:`travel.trip.leg_opt.leg_type.bus`},{value:`car`,title:`travel.trip.leg_opt.leg_type.car`},{value:`ferry`,title:`travel.trip.leg_opt.leg_type.ferry`},{value:`other`,title:`travel.trip.leg_opt.leg_type.other`}]}),operator:e.string({label:`travel.trip.leg.operator`,rules:{max:100}}),number:e.string({label:`travel.trip.leg.number`,rules:{max:20}}),seat:e.string({label:`travel.trip.leg.seat`,rules:{max:10}}),class:e.string({label:`travel.trip.leg.class`,strict:!0,noSearch:!0,options:[{value:`economy`,title:`travel.trip.leg_opt.class.economy`},{value:`business`,title:`travel.trip.leg_opt.class.business`},{value:`first`,title:`travel.trip.leg_opt.class.first`}]}),booking_ref:e.string({label:`travel.trip.leg.booking_ref`,rules:{max:50}}),terminal:e.string({label:`travel.trip.leg.terminal`,rules:{max:20}}),gate:e.string({label:`travel.trip.leg.gate`,rules:{max:20}}),origin_city:e.string({label:`travel.trip.leg.origin_city`,rules:{max:100}}),origin_code:e.string({label:`travel.trip.leg.origin_code`,rules:{max:10}}),departure_time:e.time({label:`travel.trip.leg.departure_time`}),destination_city:e.string({label:`travel.trip.leg.destination_city`,rules:{max:100}}),destination_code:e.string({label:`travel.trip.leg.destination_code`,rules:{max:10}}),arrival_time:e.time({label:`travel.trip.leg.arrival_time`}),duration:e.duration({label:`travel.trip.leg.duration`}),checked_in:e.boolean({label:`travel.trip.leg.checked_in`}),documents:e.document({label:`travel.trip.leg.documents`,multiple:!0}),notes:e.text({label:`travel.trip.leg.notes`,rules:{max:2e3}})}}),accommodations:e.group({scope:`nest`,label:`travel.trip.fields.accommodations`,icon:`lucide:bed`,multiple:!0,fields:{accom_type:e.string({label:`travel.trip.accom.accom_type`,strict:!0,noSearch:!0,options:[{value:`hotel`,title:`travel.trip.accom_opt.accom_type.hotel`},{value:`apartment`,title:`travel.trip.accom_opt.accom_type.apartment`},{value:`hostel`,title:`travel.trip.accom_opt.accom_type.hostel`},{value:`other`,title:`travel.trip.accom_opt.accom_type.other`}]}),location:e.string({label:`travel.trip.accom.location`,rules:{max:300}}),address:e.string({label:`travel.trip.accom.address`,rules:{max:300}}),rating:e.rating({label:`travel.trip.accom.rating`,rules:{max:5}}),breakfast:e.boolean({label:`travel.trip.accom.breakfast`}),check_in:e.date({label:`travel.trip.accom.check_in`}),check_out:e.date({label:`travel.trip.accom.check_out`}),booking_ref:e.string({label:`travel.trip.accom.booking_ref`,rules:{max:100}}),cost:e.money({label:`travel.trip.accom.cost`,currencyFrom:`parent:currency`,mutate:[`spent`]}),documents:e.document({label:`travel.trip.accom.documents`,multiple:!0}),notes:e.text({label:`travel.trip.accom.notes`,rules:{max:2e3}})}}),insurances:e.group({scope:`nest`,label:`travel.trip.fields.insurances`,icon:`lucide:shield-check`,multiple:!0,fields:{insurer:e.string({label:`travel.trip.insur.insurer`,rules:{max:200}}),policy_number:e.string({label:`travel.trip.insur.policy_number`,rules:{max:100}}),coverage:e.text({label:`travel.trip.insur.coverage`,rules:{max:1e3}}),cost:e.money({label:`travel.trip.insur.cost`,currencyFrom:`parent:currency`,mutate:[`spent`]}),valid_from:e.date({label:`travel.trip.insur.valid_from`}),valid_until:e.date({label:`travel.trip.insur.valid_until`}),emergency_phone:e.string({label:`travel.trip.insur.emergency_phone`,rules:{max:50}}),documents:e.document({label:`travel.trip.insur.documents`,multiple:!0}),notes:e.text({label:`travel.trip.insur.notes`,rules:{max:2e3}})}}),activities:e.group({scope:`nest`,label:`travel.trip.fields.activities`,icon:`lucide:ticket`,multiple:!0,fields:{activity_type:e.string({label:`travel.trip.act.activity_type`,strict:!0,noSearch:!0,options:[{value:`sightseeing`,title:`travel.trip.act_opt.activity_type.sightseeing`},{value:`museum`,title:`travel.trip.act_opt.activity_type.museum`},{value:`beach`,title:`travel.trip.act_opt.activity_type.beach`},{value:`nature`,title:`travel.trip.act_opt.activity_type.nature`},{value:`restaurant`,title:`travel.trip.act_opt.activity_type.restaurant`},{value:`tour`,title:`travel.trip.act_opt.activity_type.tour`},{value:`shopping`,title:`travel.trip.act_opt.activity_type.shopping`},{value:`entertainment`,title:`travel.trip.act_opt.activity_type.entertainment`},{value:`other`,title:`travel.trip.act_opt.activity_type.other`}]}),date:e.date({label:`travel.trip.act.date`}),time_start:e.time({label:`travel.trip.act.time_start`}),time_end:e.time({label:`travel.trip.act.time_end`}),location:e.string({label:`travel.trip.act.location`,rules:{max:300}}),booking_ref:e.string({label:`travel.trip.act.booking_ref`,rules:{max:100}}),cost:e.money({label:`travel.trip.act.cost`,currencyFrom:`parent:currency`,mutate:[`spent`]}),documents:e.document({label:`travel.trip.act.documents`,multiple:!0}),notes:e.text({label:`travel.trip.act.notes`,rules:{max:2e3}})}}),days:e.int({label:`travel.trip.fields.days`,value:s}),spent:e.money({label:`travel.trip.fields.spent`,value:c,mutate:[`budget_state`]}),budget_state:e.string({label:`travel.trip.fields.budget_state`,value:e=>{let t=o(e.record.budget),n=o(c(e));return t==null||t<=0||n==null?null:n>t?`over`:`within`},strict:!0,noSearch:!0,options:[{value:`within`,title:`travel.trip.options.budget_state.within`,icon:{kind:`icon`,value:`lucide:check`}},{value:`over`,title:`travel.trip.options.budget_state.over`,icon:{kind:`icon`,value:`lucide:x`}}]}),tags:e.tags({label:`travel.trip.fields.tags`}),notes:e.text({label:`travel.trip.fields.notes`,rules:{max:3e3}})}}),u=r({id:`travel`,version:`1.0.0`,dependsOn:[`people`,`things`],libraries:[{meta:i({id:`travel`,label:`travel.library.label`,icon:`lucide:plane`,agent:`Trips (trip) with legs, lodging, insurance, activities, and packing lists.`}),shelves:[l]}]});export{u as default};
1
+ import{n as e,r as t}from"./fields-BtCN_frr.js";import{s as n}from"./shelf-CRUDKiTz.js";import{n as r,r as i}from"./plugin-CFEkHH3f.js";var a=[`accommodations`,`activities`,`insurances`],o=e=>{let t=typeof e==`string`&&e!==``?Number(e):e;return typeof t==`number`&&Number.isFinite(t)?t:null},s=({record:e})=>{let t=Date.parse(String(e.date_from??``)),n=Date.parse(String(e.date_to??``));return Number.isNaN(t)||Number.isNaN(n)||n<t?null:Math.round((n-t)/864e5)+1},c=({record:e})=>{let t=0,n=!1;for(let r of a){let i=e[r];if(Array.isArray(i))for(let e of i){let r=o(e?.cost);r!=null&&(t+=r,n=!0)}}return n?Math.round(t*100)/100:null},l=n({shelf:`trip`,library:`travel`,label:`travel.trip.label`,icon:`lucide:plane`,views:{list:[`destination`,`date_from`,`date_to`,`status`]},fields:{name:e.title({label:`core.fields.name`}),description:e.text({label:`travel.trip.fields.description`,rules:{max:2e3}}),destination:e.string({label:`travel.trip.fields.destination`,rules:{max:200}}),countdown:e.countdown({source:{date_from:e.date({label:`travel.trip.fields.date_from`,mutate:[`days`]})}}),date_to:e.date({label:`travel.trip.fields.date_to`,mutate:[`days`]}),status:e.status({source:{status:e.string({label:`travel.trip.fields.status`,strict:!0,noSearch:!0,options:[{value:`planned`,title:`travel.trip.options.status.planned`},{value:`active`,title:`travel.trip.options.status.active`},{value:`completed`,title:`travel.trip.options.status.completed`},{value:`cancelled`,title:`travel.trip.options.status.cancelled`}]})}}),people:e.people({source:{participants:e.relation({label:`travel.trip.fields.participants`,options:t({library:`people`,shelf:`person`}),multiple:!0})}}),currency:e.currency({label:`core.fields.currency`,default:`UAH`}),budget:e.money({label:`travel.trip.fields.budget`,mutate:[`budget_state`]}),photos:e.image({label:`travel.trip.fields.photos`,multiple:!0}),packing_items:e.check({label:`travel.trip.fields.packing_items`,slots:[`travel.trip.packing.prepared`,`travel.trip.packing.packed`,`travel.trip.packing.packed_back`],fields:{item:e.relation({label:`travel.trip.packing.item`,options:t({library:`things`,shelf:`item`})})},multiple:!0}),packing_list:e.check({label:`travel.trip.fields.packing_list`,slots:[`travel.trip.packing.prepared`,`travel.trip.packing.packed`,`travel.trip.packing.packed_back`],multiple:!0}),legs:e.group({scope:`nest`,label:`travel.trip.fields.legs`,icon:`lucide:route`,multiple:!0,fields:{date:e.date({label:`travel.trip.leg.date`}),leg_type:e.string({label:`travel.trip.leg.leg_type`,strict:!0,noSearch:!0,options:[{value:`flight`,title:`travel.trip.leg_opt.leg_type.flight`},{value:`train`,title:`travel.trip.leg_opt.leg_type.train`},{value:`bus`,title:`travel.trip.leg_opt.leg_type.bus`},{value:`car`,title:`travel.trip.leg_opt.leg_type.car`},{value:`ferry`,title:`travel.trip.leg_opt.leg_type.ferry`},{value:`other`,title:`travel.trip.leg_opt.leg_type.other`}]}),operator:e.string({label:`travel.trip.leg.operator`,rules:{max:100}}),number:e.string({label:`travel.trip.leg.number`,rules:{max:20}}),seat:e.string({label:`travel.trip.leg.seat`,rules:{max:10}}),class:e.string({label:`travel.trip.leg.class`,strict:!0,noSearch:!0,options:[{value:`economy`,title:`travel.trip.leg_opt.class.economy`},{value:`business`,title:`travel.trip.leg_opt.class.business`},{value:`first`,title:`travel.trip.leg_opt.class.first`}]}),booking_ref:e.string({label:`travel.trip.leg.booking_ref`,rules:{max:50}}),terminal:e.string({label:`travel.trip.leg.terminal`,rules:{max:20}}),gate:e.string({label:`travel.trip.leg.gate`,rules:{max:20}}),origin_city:e.string({label:`travel.trip.leg.origin_city`,rules:{max:100}}),origin_code:e.string({label:`travel.trip.leg.origin_code`,rules:{max:10}}),departure_time:e.time({label:`travel.trip.leg.departure_time`}),destination_city:e.string({label:`travel.trip.leg.destination_city`,rules:{max:100}}),destination_code:e.string({label:`travel.trip.leg.destination_code`,rules:{max:10}}),arrival_time:e.time({label:`travel.trip.leg.arrival_time`}),duration:e.duration({label:`travel.trip.leg.duration`}),checked_in:e.boolean({label:`travel.trip.leg.checked_in`}),documents:e.document({label:`travel.trip.leg.documents`,multiple:!0}),notes:e.text({label:`travel.trip.leg.notes`,rules:{max:2e3}})}}),accommodations:e.group({scope:`nest`,label:`travel.trip.fields.accommodations`,icon:`lucide:bed`,multiple:!0,fields:{accom_type:e.string({label:`travel.trip.accom.accom_type`,strict:!0,noSearch:!0,options:[{value:`hotel`,title:`travel.trip.accom_opt.accom_type.hotel`},{value:`apartment`,title:`travel.trip.accom_opt.accom_type.apartment`},{value:`hostel`,title:`travel.trip.accom_opt.accom_type.hostel`},{value:`other`,title:`travel.trip.accom_opt.accom_type.other`}]}),location:e.string({label:`travel.trip.accom.location`,rules:{max:300}}),address:e.string({label:`travel.trip.accom.address`,rules:{max:300}}),rating:e.rating({label:`travel.trip.accom.rating`,rules:{max:5}}),breakfast:e.boolean({label:`travel.trip.accom.breakfast`}),check_in:e.date({label:`travel.trip.accom.check_in`}),check_out:e.date({label:`travel.trip.accom.check_out`}),booking_ref:e.string({label:`travel.trip.accom.booking_ref`,rules:{max:100}}),cost:e.money({label:`travel.trip.accom.cost`,currencyFrom:`parent:currency`,mutate:[`spent`]}),documents:e.document({label:`travel.trip.accom.documents`,multiple:!0}),notes:e.text({label:`travel.trip.accom.notes`,rules:{max:2e3}})}}),insurances:e.group({scope:`nest`,label:`travel.trip.fields.insurances`,icon:`lucide:shield-check`,multiple:!0,fields:{insurer:e.string({label:`travel.trip.insur.insurer`,rules:{max:200}}),policy_number:e.string({label:`travel.trip.insur.policy_number`,rules:{max:100}}),coverage:e.text({label:`travel.trip.insur.coverage`,rules:{max:1e3}}),cost:e.money({label:`travel.trip.insur.cost`,currencyFrom:`parent:currency`,mutate:[`spent`]}),valid_from:e.date({label:`travel.trip.insur.valid_from`}),valid_until:e.date({label:`travel.trip.insur.valid_until`}),emergency_phone:e.string({label:`travel.trip.insur.emergency_phone`,rules:{max:50}}),documents:e.document({label:`travel.trip.insur.documents`,multiple:!0}),notes:e.text({label:`travel.trip.insur.notes`,rules:{max:2e3}})}}),activities:e.group({scope:`nest`,label:`travel.trip.fields.activities`,icon:`lucide:ticket`,multiple:!0,fields:{activity_type:e.string({label:`travel.trip.act.activity_type`,strict:!0,noSearch:!0,options:[{value:`sightseeing`,title:`travel.trip.act_opt.activity_type.sightseeing`},{value:`museum`,title:`travel.trip.act_opt.activity_type.museum`},{value:`beach`,title:`travel.trip.act_opt.activity_type.beach`},{value:`nature`,title:`travel.trip.act_opt.activity_type.nature`},{value:`restaurant`,title:`travel.trip.act_opt.activity_type.restaurant`},{value:`tour`,title:`travel.trip.act_opt.activity_type.tour`},{value:`shopping`,title:`travel.trip.act_opt.activity_type.shopping`},{value:`entertainment`,title:`travel.trip.act_opt.activity_type.entertainment`},{value:`other`,title:`travel.trip.act_opt.activity_type.other`}]}),date:e.date({label:`travel.trip.act.date`}),time_start:e.time({label:`travel.trip.act.time_start`}),time_end:e.time({label:`travel.trip.act.time_end`}),location:e.string({label:`travel.trip.act.location`,rules:{max:300}}),booking_ref:e.string({label:`travel.trip.act.booking_ref`,rules:{max:100}}),cost:e.money({label:`travel.trip.act.cost`,currencyFrom:`parent:currency`,mutate:[`spent`]}),documents:e.document({label:`travel.trip.act.documents`,multiple:!0}),notes:e.text({label:`travel.trip.act.notes`,rules:{max:2e3}})}}),days:e.int({label:`travel.trip.fields.days`,value:s}),spent:e.money({label:`travel.trip.fields.spent`,value:c,mutate:[`budget_state`]}),budget_state:e.string({label:`travel.trip.fields.budget_state`,value:e=>{let t=o(e.record.budget),n=o(c(e));return t==null||t<=0||n==null?null:n>t?`over`:`within`},strict:!0,noSearch:!0,options:[{value:`within`,title:`travel.trip.options.budget_state.within`,icon:{kind:`icon`,value:`lucide:check`}},{value:`over`,title:`travel.trip.options.budget_state.over`,icon:{kind:`icon`,value:`lucide:x`}}]}),tags:e.tags({label:`travel.trip.fields.tags`}),notes:e.text({label:`travel.trip.fields.notes`,rules:{max:3e3}})}}),u=r({id:`travel`,version:`1.0.0`,dependsOn:[`people`,`things`],libraries:[{meta:i({id:`travel`,label:`travel.library.label`,icon:`lucide:plane`,agent:`Trips (trip) with legs, lodging, insurance, activities, and packing lists.`}),shelves:[l]}]});export{u as default};
@@ -0,0 +1 @@
1
+ import{n as e}from"./fields-BtCN_frr.js";import{n as t}from"./plugin-CFEkHH3f.js";import{t as n}from"./settings-BfEurOH1.js";var r=1800,i={vision:!0,documents:!0,tools:!0,reasoning:!0},a={vision:!0,documents:!0,tools:!0,reasoning:!1};function o(e){return{labelKey:`claude-agent.models.${e}.label`,titleKey:`claude-agent.models.${e}.title`,hintKey:`claude-agent.models.${e}.hint`}}var s=[{value:`haiku`,id:`claude-haiku-4-5`,effort:``,quality:1,time:1,...o(`haiku`),capabilities:a},{value:`sonnet-medium`,id:`claude-sonnet-5`,effort:`medium`,quality:2,time:2,...o(`sonnet-medium`),capabilities:i},{value:`sonnet-high`,id:`claude-sonnet-5`,effort:`high`,quality:3,time:3,...o(`sonnet-high`),capabilities:i},{value:`opus-medium`,id:`claude-opus-5`,effort:`medium`,quality:4,time:4,...o(`opus-medium`),capabilities:i},{value:`opus-high`,id:`claude-opus-5`,effort:`high`,quality:5,time:5,...o(`opus-high`),capabilities:i}],c=t({id:`claude-agent`,version:`1.0.0`,dependsOn:[],fieldContribs:[{library:`_settings`,shelf:`system`,field:`agent_id`,options:[{value:`claude-agent`,title:`claude-agent.plugin.label`}]}],settings:n({label:`claude-agent.settings.label`,fields:{group:e.group({label:`claude-agent.settings.groups.runtime`,icon:`lucide:bot`,scope:`hoist`,fields:{auth_mode:e.string({label:`claude-agent.settings.auth_mode`,default:`subscription`,strict:!0,noSearch:!0,options:[{value:`subscription`,title:`claude-agent.settings.auth_mode_subscription`},{value:`api_key`,title:`claude-agent.settings.auth_mode_api_key`}]}),anthropic_api_key:e.password({label:`claude-agent.settings.anthropic_api_key`,ui:{hidden:{auth_mode:{$ne:`api_key`}}}}),claude_model:e.string({label:`claude-agent.settings.claude_model`,default:`haiku`,strict:!0,noSearch:!0,options:s.map(e=>({value:e.value,title:e.labelKey}))}),thinking_enabled:e.boolean({label:`claude-agent.settings.thinking_enabled`,default:!1}),skip_permissions:e.boolean({label:`claude-agent.settings.skip_permissions`,default:!0}),response_timeout:e.int({label:`claude-agent.settings.response_timeout`,default:r})}}),group2:e.group({label:`claude-agent.settings.groups.rag`,icon:`lucide:search`,scope:`hoist`,fields:{rag_enabled:e.boolean({label:`claude-agent.settings.rag_enabled`,default:!0}),openai_api_key:e.password({label:`claude-agent.settings.openai_api_key`})}}),group3:e.group({label:`claude-agent.settings.groups.langfuse`,icon:`lucide:activity`,scope:`hoist`,fields:{tracing_enabled:e.boolean({label:`claude-agent.settings.tracing_enabled`}),langfuse_base_url:e.string({label:`claude-agent.settings.langfuse_base_url`}),langfuse_public_key:e.password({label:`claude-agent.settings.langfuse_public_key`}),langfuse_secret_key:e.password({label:`claude-agent.settings.langfuse_secret_key`})}})}})});export{c as default};
@@ -0,0 +1 @@
1
+ import{n as e}from"./fields-BtCN_frr.js";import{s as t}from"./shelf-CRUDKiTz.js";import{n,r}from"./plugin-CFEkHH3f.js";var i=t({shelf:`person`,library:`people`,label:`people.person.label`,icon:`lucide:user`,agent:`A person card. fullName — the full name (first + last), used as the title.`,views:{inline:[`logo`,`fullName`],list:[`birthDate`],select:{icon:`logo`,title:`fullName`,subtitle:`birthDate`}},fields:{logo:e.avatar({label:`people.person.fields.logo`,ui:{role:`avatar`}}),fullName:e.title({label:`people.person.fields.fullName`,required:!0}),description:e.text({label:`people.person.fields.description`,rules:{max:500}}),properties:e.properties({columns:4,fields:{occupation:e.string({label:`people.person.fields.occupation`,rules:{max:200},ui:{span:3}}),birthDate:e.date({label:`people.person.fields.birthDate`,rules:{min:`1900-01-01`,max:`today`},ui:{span:3}}),sex:e.string({label:`people.person.fields.sex`,strict:!0,noSearch:!0,options:`sex`,ui:{span:3}}),phone:e.tel({label:`people.person.fields.phone`,ui:{span:3}}),email:e.email({label:`people.person.fields.email`,ui:{span:6}}),address:e.text({label:`people.person.fields.address`,rules:{max:300},ui:{span:6}})}}),photos:e.image({label:`people.person.fields.photos`,multiple:!0}),tags:e.tags({label:`people.person.fields.tags`}),notes:e.text({label:`people.person.fields.notes`,rules:{max:1e3}})}}),a=n({id:`people`,version:`1.0.0`,dependsOn:[],libraries:[{meta:r({id:`people`,label:`people.library.label`,icon:`lucide:users`,agent:`People (person) — contacts, birthdays, jobs; referenced by health, travel, and others.`}),shelves:[i]}]});export{a as default};
@@ -0,0 +1,4 @@
1
+ import{n as e,r as t}from"./fields-BtCN_frr.js";import{s as n}from"./shelf-CRUDKiTz.js";import{n as r,r as i}from"./plugin-CFEkHH3f.js";var a=n({shelf:`meter_reading`,library:`home`,label:`home.meter_reading.label`,icon:`lucide:gauge`,agent:`Utility meter readings for a date. name — reading period, e.g. "2026-05".
2
+ date — reading date. cold_water/hot_water — water meter readings (m³).
3
+ electricity — electricity meter reading (kWh). gas — gas meter reading (m³).
4
+ Stores RAW cumulative readings, not consumption (the difference is a derived calculation).`,views:{title:`date`,inline:[`date`],list:[`cold_water`,`hot_water`,`electricity`,`gas`]},fields:{date:e.date({label:`home.meter_reading.fields.date`,required:!0,rules:{min:`2000-01-01`,max:`today`},ui:{span:12}}),cold_water:e.real({label:`home.meter_reading.fields.cold_water`,rules:{min:0},ui:{span:3}}),hot_water:e.real({label:`home.meter_reading.fields.hot_water`,rules:{min:0},ui:{span:3}}),electricity:e.real({label:`home.meter_reading.fields.electricity`,rules:{min:0},ui:{span:3}}),gas:e.real({label:`home.meter_reading.fields.gas`,rules:{min:0},ui:{span:3}}),notes:e.text({label:`home.meter_reading.fields.notes`,rules:{max:500}})}}),o=n({shelf:`room`,library:`home`,label:`home.room.label`,icon:`lucide:door-open`,agent:`A room/space in the apartment. name — name (Bedroom, Kitchen). area — area (m²). This is a reference list of places: a target for relations from material (where a material was used). Does not store the materials themselves.`,views:{inline:[`name`],list:[`area`]},fields:{name:e.title({label:`core.fields.name`,required:!0}),description:e.text({label:`home.room.fields.description`,rules:{max:1e3}}),area:e.measured({label:`home.room.fields.area`,units:`area`,rules:{min:0}}),notes:e.text({label:`home.room.fields.notes`,rules:{max:500}})}}),s=n({shelf:`material`,library:`home`,label:`home.material.label`,icon:`lucide:paint-roller`,agent:`A material/paint used in renovation. One record = a specific product (e.g. "Dulux Easycare, RAL 9010"). name — name, type — category, brand — manufacturer, color/color_code — color and tint code. rooms — relation to home/room (where used, can be several). price/quantity/store/bought_date/link — purchase data. photo/rating/notes — photos and impressions. Does NOT store a work log/timeline — only a catalog of "what was bought and where it is used".`,views:{inline:[`name`,`color`],list:[`type`,`color`,`brand`,`rooms`]},fields:{name:e.title({label:`core.fields.name`,required:!0}),description:e.text({label:`home.material.fields.description`,rules:{max:1e3}}),group:e.group({label:`home.material.group.identity`,icon:`lucide:tag`,scope:`hoist`,fields:{type:e.string({label:`core.fields.type`,strict:!0,noSearch:!0,options:[{value:`paint`,title:`home.material.options.type.paint`},{value:`primer`,title:`home.material.options.type.primer`},{value:`lacquer`,title:`home.material.options.type.lacquer`},{value:`enamel`,title:`home.material.options.type.enamel`},{value:`plaster`,title:`home.material.options.type.plaster`},{value:`tile`,title:`home.material.options.type.tile`},{value:`laminate`,title:`home.material.options.type.laminate`},{value:`wallpaper`,title:`home.material.options.type.wallpaper`},{value:`skirting`,title:`home.material.options.type.skirting`},{value:`panel`,title:`home.material.options.type.panel`},{value:`putty`,title:`home.material.options.type.putty`},{value:`glue`,title:`home.material.options.type.glue`},{value:`cement`,title:`home.material.options.type.cement`},{value:`drywall`,title:`home.material.options.type.drywall`},{value:`insulation`,title:`home.material.options.type.insulation`},{value:`fixture`,title:`home.material.options.type.fixture`},{value:`plumbing`,title:`home.material.options.type.plumbing`},{value:`other`,title:`home.material.options.type.other`}]}),brand:e.string({label:`home.material.fields.brand`,rules:{max:120}}),color:e.color({label:`home.material.fields.color`}),color_code:e.string({label:`home.material.fields.color_code`,rules:{max:60}}),rooms:e.relation({label:`home.material.fields.rooms`,options:t({library:`home`,shelf:`room`}),multiple:!0})}}),ledger:e.ledger({label:`home.material.group.purchase`,icon:`lucide:shopping-cart`,fields:{price:e.money({label:`home.material.fields.price`,rules:{min:0}}),currency:e.currency({label:`core.fields.currency`,default:`UAH`}),quantity:e.measured({label:`home.material.fields.quantity`,units:[{value:`l`,label:`core.units.l`},{value:`kg`,label:`core.units.kg`},{value:`m2`,label:`core.units.m2`},{value:`pcs`,label:`core.units.pcs`}],rules:{min:0}}),store:e.string({label:`home.material.fields.store`,rules:{max:120}}),bought_date:e.date({label:`home.material.fields.bought_date`,rules:{max:`today`}}),link:e.link({label:`home.material.fields.link`})}}),group2:e.group({label:`home.material.group.media`,icon:`lucide:image`,scope:`hoist`,fields:{photo:e.image({label:`home.material.fields.photo`,multiple:!0}),rating:e.rating({label:`home.material.fields.rating`,rules:{max:5}})}}),notes:e.text({label:`home.material.fields.notes`,rules:{max:2e3}})}}),c=r({id:`home`,version:`1.0.0`,dependsOn:[],libraries:[{meta:i({id:`home`,label:`home.library.label`,icon:`lucide:house`,agent:`The home itself — renovation materials, utility meter readings, rooms.`,starterHint:`meter readings that are overdue, or renovation materials running low`}),shelves:[a,o,s]}]});export{c as default};
@@ -1 +1 @@
1
- import{n as e,r as t}from"./fields-DMchbbOm.js";import{s as n}from"./shelf-DmAuGkTS.js";import{n as r,r as i}from"./plugin-CFEkHH3f.js";var a=(e,t)=>(e??[]).reduce((e,n)=>{let r=n?.[t];return e+(Number(r&&typeof r==`object`?r.value:r)||0)},0),o=e=>e&&typeof e==`object`?e.unit??null:null,s=()=>e.string({options:`cooking`,value:({record:e})=>o(e.quantity),strict:!0}),c=(e,t)=>(e??[]).map(e=>e?.[t]==null?``:String(e[t])).filter(e=>e!==``).sort()[0]??null,l=n({shelf:`food_item`,library:`kitchen`,label:`kitchen.food_item.label`,icon:`lucide:soup`,views:{list:[`subcategory`,`quantity`,`expires`]},fields:{name:e.title({label:`core.fields.name`}),about:e.illustrated({label:`kitchen.food_item.fields.about`,fields:{image:e.avatar({ui:{role:`avatar`}}),text:e.text({rules:{max:1e3}})}}),photos:e.image({label:`kitchen.food_item.fields.photos`,multiple:!0}),quantity:e.measured({label:`kitchen.food_item.fields.quantity`,units:`cooking`,rules:{min:0},ui:{span:4},fields:{value:e.real({value:({record:e})=>a(e.variants,`quantity`)}),unit:e.string({options:`cooking`,strict:!0,mutate:[`minQuantity.unit`,`variants.quantity.unit`]})}}),minQuantity:e.measured({label:`kitchen.food_item.fields.minQuantity`,units:`cooking`,rules:{min:0},ui:{span:4},fields:{unit:s()}}),countdown:e.countdown({source:{expires:e.reminder({label:`kitchen.food_item.fields.expires`,rules:{lead:14},ui:{span:4},value:({record:e})=>c(e.variants,`expires`)})}}),variants:e.row({scope:`nest`,multiple:!0,label:`kitchen.food_item.fields.variants`,icon:`lucide:package`,fields:{name:e.string({label:`kitchen.food_item.variant.name`,rules:{max:200}}),quantity:e.measured({label:`kitchen.food_item.variant.quantity`,units:`cooking`,rules:{min:0},fields:{unit:s(),value:e.real({rules:{min:0},mutate:[`quantity.value`]})}}),expires:e.reminder({label:`kitchen.food_item.variant.expires`,rules:{lead:14},mutate:[`expires`]}),location:e.relation({label:`kitchen.food_item.variant.location`,options:t({library:`things`,shelf:`storage_location`})}),shops:e.link({label:`kitchen.food_item.variant.shops`,multiple:!0}),photo:e.image({label:`kitchen.food_item.variant.photo`})}}),subcategory:e.string({label:`kitchen.food_item.fields.subcategory`,rules:{max:100}}),tags:e.tags({label:`kitchen.food_item.fields.tags`}),notes:e.text({label:`kitchen.food_item.fields.notes`,rules:{max:2e3}})}}),u=async({ref:e})=>{let t=(await e?.(`product`))?.quantity;return t&&typeof t==`object`?t.unit??null:null},d=e=>{let t=e?.value;return typeof t==`number`&&Number.isFinite(t)?t:null},f=async({ref:e})=>(await e?.(`product`))?.quantity??null,p=n({shelf:`food_recipe`,library:`kitchen`,label:`kitchen.food_recipe.label`,icon:`lucide:clipboard-list`,views:{list:[`category`,`description`,`prep_time`,`cook_time`]},fields:{name:e.title({label:`core.fields.name`}),images:e.image({label:`kitchen.food_recipe.fields.images`,multiple:!0}),description:e.text({label:`kitchen.food_recipe.fields.description`,rules:{max:500}}),stats:e.stats({fields:{servings:e.int({label:`kitchen.food_recipe.fields.servings`,rules:{min:1,max:100}}),prep_time:e.duration({label:`kitchen.food_recipe.fields.prep_time`}),cook_time:e.duration({label:`kitchen.food_recipe.fields.cook_time`})}}),ingredients:e.row({scope:`nest`,multiple:!0,label:`kitchen.food_recipe.fields.ingredients`,icon:`lucide:carrot`,rules:{unique:[`product`]},fields:{product:e.relation({label:`kitchen.food_recipe.ingredient.product`,options:t({library:`kitchen`,shelf:`food_item`})}),amount:e.measured({label:`kitchen.food_recipe.ingredient.amount`,units:`cooking`,rules:{min:0},fields:{unit:e.string({options:`cooking`,value:u,strict:!0,cache:0}),value:e.real({rules:{min:0},mutate:[`.stock_state`]})}}),optional:e.boolean({label:`kitchen.food_recipe.ingredient.optional`}),stock:e.measured({label:`kitchen.food_recipe.ingredient.stock`,units:`cooking`,cache:0,value:f}),stock_state:e.string({label:`kitchen.food_recipe.ingredient.stock_state`,cache:0,value:async e=>{let t=d(await f(e));if(t==null)return null;let n=d(e.parent?.amount);return n==null?t>0?null:`missing`:t>=n?`enough`:t>0?`partial`:`missing`},strict:!0,noSearch:!0,options:[{value:`enough`,title:`kitchen.food_recipe.options.stock_state.enough`,icon:{kind:`icon`,value:`lucide:check`}},{value:`partial`,title:`kitchen.food_recipe.options.stock_state.partial`,icon:{kind:`icon`,value:`lucide:minus`}},{value:`missing`,title:`kitchen.food_recipe.options.stock_state.missing`,icon:{kind:`icon`,value:`lucide:x`}}]})}}),ingredients_free:e.row({scope:`nest`,multiple:!0,label:`kitchen.food_recipe.fields.ingredients_free`,icon:`lucide:list`,rules:{unique:[`product`]},fields:{product:e.string({label:`kitchen.food_recipe.ingredient_free.product`,rules:{max:200}}),unit:e.unit({label:`kitchen.food_recipe.ingredient_free.unit`,options:`cooking`}),amount:e.amount({label:`kitchen.food_recipe.ingredient_free.amount`,unitFrom:`unit`,rules:{min:0}}),optional:e.boolean({label:`kitchen.food_recipe.ingredient_free.optional`})}}),prose:e.prose({label:`kitchen.food_recipe.fields.steps`,icon:`lucide:chef-hat`,fields:{steps:e.markdown({label:`kitchen.food_recipe.fields.steps`,rules:{max:5e3}})}}),properties:e.properties({columns:2,fields:{category:e.string({label:`kitchen.food_recipe.fields.category`,multiple:!0,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`first`,title:`kitchen.food_recipe.options.category.first`},{value:`main`,title:`kitchen.food_recipe.options.category.main`},{value:`salad`,title:`kitchen.food_recipe.options.category.salad`},{value:`appetizer`,title:`kitchen.food_recipe.options.category.appetizer`},{value:`side`,title:`kitchen.food_recipe.options.category.side`},{value:`dessert`,title:`kitchen.food_recipe.options.category.dessert`},{value:`drink`,title:`kitchen.food_recipe.options.category.drink`},{value:`sauce`,title:`kitchen.food_recipe.options.category.sauce`}]}),difficulty:e.string({label:`kitchen.food_recipe.fields.difficulty`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`easy`,title:`kitchen.food_recipe.options.difficulty.easy`},{value:`medium`,title:`kitchen.food_recipe.options.difficulty.medium`},{value:`hard`,title:`kitchen.food_recipe.options.difficulty.hard`}]})}}),tags:e.tags({label:`kitchen.food_recipe.fields.tags`}),notes:e.text({label:`kitchen.food_recipe.fields.notes`,rules:{max:1e3}})}}),m=n({shelf:`preferences`,library:`kitchen`,label:`kitchen.preferences.label`,icon:`lucide:notebook-pen`,single:!0,claude:`One record. The household food habits, diets and allergies; where groceries are bought, what is bought there and in what volumes; which kitchen appliances exist and which do not. Read it before suggesting recipes, building a shopping list, or planning a menu. An appliance listed as absent is a fact, not a gap — do not propose recipes that need it.`,fields:{preferences:e.markdown({label:`kitchen.preferences.fields.preferences`,rules:{max:1e4}}),shops:e.markdown({label:`kitchen.preferences.fields.shops`,rules:{max:1e4}}),equipment:e.markdown({label:`kitchen.preferences.fields.equipment`,rules:{max:1e4}}),notes:e.text({label:`kitchen.preferences.fields.notes`,rules:{max:1e4}})}}),h=r({id:`kitchen`,version:`1.0.0`,dependsOn:[`things`],libraries:[{meta:i({id:`kitchen`,label:`kitchen.library.label`,icon:`lucide:cooking-pot`,agent:`Food inventory and recipes — what is in stock, what is expiring, what can be cooked.`,starterHint:`what's expiring soon, or what can be cooked from what's in stock`}),shelves:[l,p,m]}],fieldContribs:[{library:`things`,shelf:`item`,field:`type`,options:[{value:`kitchenware`,title:`kitchen.contrib.type.kitchenware`}]}]});export{h as default};
1
+ import{n as e,r as t}from"./fields-BtCN_frr.js";import{s as n}from"./shelf-CRUDKiTz.js";import{n as r,r as i}from"./plugin-CFEkHH3f.js";var a=(e,t)=>(e??[]).reduce((e,n)=>{let r=n?.[t];return e+(Number(r&&typeof r==`object`?r.value:r)||0)},0),o=e=>e&&typeof e==`object`?e.unit??null:null,s=()=>e.string({options:`cooking`,value:({record:e})=>o(e.quantity),strict:!0}),c=(e,t)=>(e??[]).map(e=>e?.[t]==null?``:String(e[t])).filter(e=>e!==``).sort()[0]??null,l=n({shelf:`food_item`,library:`kitchen`,label:`kitchen.food_item.label`,icon:`lucide:soup`,views:{list:[`subcategory`,`quantity`,`expires`]},fields:{name:e.title({label:`core.fields.name`}),about:e.illustrated({label:`kitchen.food_item.fields.about`,fields:{image:e.avatar({ui:{role:`avatar`}}),text:e.text({rules:{max:1e3}})}}),photos:e.image({label:`kitchen.food_item.fields.photos`,multiple:!0}),quantity:e.measured({label:`kitchen.food_item.fields.quantity`,units:`cooking`,rules:{min:0},ui:{span:4},fields:{value:e.real({value:({record:e})=>a(e.variants,`quantity`)}),unit:e.string({options:`cooking`,strict:!0,mutate:[`minQuantity.unit`,`variants.quantity.unit`]})}}),minQuantity:e.measured({label:`kitchen.food_item.fields.minQuantity`,units:`cooking`,rules:{min:0},ui:{span:4},fields:{unit:s()}}),countdown:e.countdown({source:{expires:e.reminder({label:`kitchen.food_item.fields.expires`,rules:{lead:14},ui:{span:4},value:({record:e})=>c(e.variants,`expires`)})}}),variants:e.row({scope:`nest`,multiple:!0,label:`kitchen.food_item.fields.variants`,icon:`lucide:package`,fields:{name:e.string({label:`kitchen.food_item.variant.name`,rules:{max:200}}),quantity:e.measured({label:`kitchen.food_item.variant.quantity`,units:`cooking`,rules:{min:0},fields:{unit:s(),value:e.real({rules:{min:0},mutate:[`quantity.value`]})}}),expires:e.reminder({label:`kitchen.food_item.variant.expires`,rules:{lead:14},mutate:[`expires`]}),location:e.relation({label:`kitchen.food_item.variant.location`,options:t({library:`things`,shelf:`storage_location`})}),shops:e.link({label:`kitchen.food_item.variant.shops`,multiple:!0}),photo:e.image({label:`kitchen.food_item.variant.photo`})}}),subcategory:e.string({label:`kitchen.food_item.fields.subcategory`,rules:{max:100}}),tags:e.tags({label:`kitchen.food_item.fields.tags`}),notes:e.text({label:`kitchen.food_item.fields.notes`,rules:{max:2e3}})}}),u=async({ref:e})=>{let t=(await e?.(`product`))?.quantity;return t&&typeof t==`object`?t.unit??null:null},d=e=>{let t=e?.value;return typeof t==`number`&&Number.isFinite(t)?t:null},f=async({ref:e})=>(await e?.(`product`))?.quantity??null,p=n({shelf:`food_recipe`,library:`kitchen`,label:`kitchen.food_recipe.label`,icon:`lucide:clipboard-list`,views:{list:[`category`,`description`,`prep_time`,`cook_time`]},fields:{name:e.title({label:`core.fields.name`}),images:e.image({label:`kitchen.food_recipe.fields.images`,multiple:!0}),description:e.text({label:`kitchen.food_recipe.fields.description`,rules:{max:500}}),stats:e.stats({fields:{servings:e.int({label:`kitchen.food_recipe.fields.servings`,rules:{min:1,max:100}}),prep_time:e.duration({label:`kitchen.food_recipe.fields.prep_time`}),cook_time:e.duration({label:`kitchen.food_recipe.fields.cook_time`})}}),ingredients:e.row({scope:`nest`,multiple:!0,label:`kitchen.food_recipe.fields.ingredients`,icon:`lucide:carrot`,rules:{unique:[`product`]},fields:{product:e.relation({label:`kitchen.food_recipe.ingredient.product`,options:t({library:`kitchen`,shelf:`food_item`})}),amount:e.measured({label:`kitchen.food_recipe.ingredient.amount`,units:`cooking`,rules:{min:0},fields:{unit:e.string({options:`cooking`,value:u,strict:!0,cache:0}),value:e.real({rules:{min:0},mutate:[`.stock_state`]})}}),optional:e.boolean({label:`kitchen.food_recipe.ingredient.optional`}),stock:e.measured({label:`kitchen.food_recipe.ingredient.stock`,units:`cooking`,cache:0,value:f}),stock_state:e.string({label:`kitchen.food_recipe.ingredient.stock_state`,cache:0,value:async e=>{let t=d(await f(e));if(t==null)return null;let n=d(e.parent?.amount);return n==null?t>0?null:`missing`:t>=n?`enough`:t>0?`partial`:`missing`},strict:!0,noSearch:!0,options:[{value:`enough`,title:`kitchen.food_recipe.options.stock_state.enough`,icon:{kind:`icon`,value:`lucide:check`}},{value:`partial`,title:`kitchen.food_recipe.options.stock_state.partial`,icon:{kind:`icon`,value:`lucide:minus`}},{value:`missing`,title:`kitchen.food_recipe.options.stock_state.missing`,icon:{kind:`icon`,value:`lucide:x`}}]})}}),ingredients_free:e.row({scope:`nest`,multiple:!0,label:`kitchen.food_recipe.fields.ingredients_free`,icon:`lucide:list`,rules:{unique:[`product`]},fields:{product:e.string({label:`kitchen.food_recipe.ingredient_free.product`,rules:{max:200}}),unit:e.unit({label:`kitchen.food_recipe.ingredient_free.unit`,options:`cooking`}),amount:e.amount({label:`kitchen.food_recipe.ingredient_free.amount`,unitFrom:`unit`,rules:{min:0}}),optional:e.boolean({label:`kitchen.food_recipe.ingredient_free.optional`})}}),prose:e.prose({label:`kitchen.food_recipe.fields.steps`,icon:`lucide:chef-hat`,fields:{steps:e.markdown({label:`kitchen.food_recipe.fields.steps`,rules:{max:5e3}})}}),properties:e.properties({columns:2,fields:{category:e.string({label:`kitchen.food_recipe.fields.category`,multiple:!0,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`first`,title:`kitchen.food_recipe.options.category.first`},{value:`main`,title:`kitchen.food_recipe.options.category.main`},{value:`salad`,title:`kitchen.food_recipe.options.category.salad`},{value:`appetizer`,title:`kitchen.food_recipe.options.category.appetizer`},{value:`side`,title:`kitchen.food_recipe.options.category.side`},{value:`dessert`,title:`kitchen.food_recipe.options.category.dessert`},{value:`drink`,title:`kitchen.food_recipe.options.category.drink`},{value:`sauce`,title:`kitchen.food_recipe.options.category.sauce`}]}),difficulty:e.string({label:`kitchen.food_recipe.fields.difficulty`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`easy`,title:`kitchen.food_recipe.options.difficulty.easy`},{value:`medium`,title:`kitchen.food_recipe.options.difficulty.medium`},{value:`hard`,title:`kitchen.food_recipe.options.difficulty.hard`}]})}}),tags:e.tags({label:`kitchen.food_recipe.fields.tags`}),notes:e.text({label:`kitchen.food_recipe.fields.notes`,rules:{max:1e3}})}}),m=n({shelf:`preferences`,library:`kitchen`,label:`kitchen.preferences.label`,icon:`lucide:notebook-pen`,single:!0,agent:`One record. The household food habits, diets and allergies; where groceries are bought, what is bought there and in what volumes; which kitchen appliances exist and which do not. Read it before suggesting recipes, building a shopping list, or planning a menu. An appliance listed as absent is a fact, not a gap — do not propose recipes that need it.`,fields:{preferences:e.markdown({label:`kitchen.preferences.fields.preferences`,rules:{max:1e4}}),shops:e.markdown({label:`kitchen.preferences.fields.shops`,rules:{max:1e4}}),equipment:e.markdown({label:`kitchen.preferences.fields.equipment`,rules:{max:1e4}}),notes:e.text({label:`kitchen.preferences.fields.notes`,rules:{max:1e4}})}}),h=r({id:`kitchen`,version:`1.0.0`,dependsOn:[`things`],libraries:[{meta:i({id:`kitchen`,label:`kitchen.library.label`,icon:`lucide:cooking-pot`,agent:`Food inventory and recipes — what is in stock, what is expiring, what can be cooked.`,starterHint:`what's expiring soon, or what can be cooked from what's in stock`}),shelves:[l,p,m]}],fieldContribs:[{library:`things`,shelf:`item`,field:`type`,options:[{value:`kitchenware`,title:`kitchen.contrib.type.kitchenware`}]}]});export{h as default};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./src-DB2N_cct.js";export{e as default,n as fin,t as iban};