@coffer-org/web 7.0.0 → 7.2.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 (115) hide show
  1. package/dist/assets/ChatWidget-ByBb2eNs.js +31 -0
  2. package/dist/assets/DiagnosticsPage-tAFkmCz8.js +1 -0
  3. package/dist/assets/IBM-Plex-Mono-400-cyrillic-BSMlKf0J.woff2 +0 -0
  4. package/dist/assets/IBM-Plex-Mono-400-cyrillic-ext-xuaO2J-f.woff2 +0 -0
  5. package/dist/assets/IBM-Plex-Mono-400-latin-DMJ8VG8y.woff2 +0 -0
  6. package/dist/assets/IBM-Plex-Mono-400-latin-ext-BmRBH3aV.woff2 +0 -0
  7. package/dist/assets/IBM-Plex-Mono-500-cyrillic-Bq9vWWag.woff2 +0 -0
  8. package/dist/assets/IBM-Plex-Mono-500-cyrillic-ext-BqneJy0T.woff2 +0 -0
  9. package/dist/assets/IBM-Plex-Mono-500-latin-DSY6xOcd.woff2 +0 -0
  10. package/dist/assets/IBM-Plex-Mono-500-latin-ext-CAhNIIs5.woff2 +0 -0
  11. package/dist/assets/IBM-Plex-Mono-600-cyrillic-CTOM6hUh.woff2 +0 -0
  12. package/dist/assets/IBM-Plex-Mono-600-cyrillic-ext-V-xxqcpd.woff2 +0 -0
  13. package/dist/assets/IBM-Plex-Mono-600-latin-BgSNZQsw.woff2 +0 -0
  14. package/dist/assets/IBM-Plex-Mono-600-latin-ext-D38SheWl.woff2 +0 -0
  15. package/dist/assets/IBM-Plex-Sans-400-600-cyrillic-BAAhND-U.woff2 +0 -0
  16. package/dist/assets/IBM-Plex-Sans-400-600-cyrillic-ext-d45eAU9y.woff2 +0 -0
  17. package/dist/assets/IBM-Plex-Sans-400-600-latin-IvpUvPa2.woff2 +0 -0
  18. package/dist/assets/IBM-Plex-Sans-400-600-latin-ext-CIII54If.woff2 +0 -0
  19. package/dist/assets/{MarkdownEditor-B2QcGxzl.js → MarkdownEditor-0mNSwLu_.js} +3 -3
  20. package/dist/assets/NewRecordView-CTSqFBfe.js +1 -0
  21. package/dist/assets/Onest-400-700-cyrillic-DayYxulF.woff2 +0 -0
  22. package/dist/assets/Onest-400-700-cyrillic-ext-DOFToQv1.woff2 +0 -0
  23. package/dist/assets/Onest-400-700-latin-Dun_Rd-l.woff2 +0 -0
  24. package/dist/assets/Onest-400-700-latin-ext-QAhDxQuo.woff2 +0 -0
  25. package/dist/assets/{PluginSettingsPage-BkMqmqxo.js → PluginSettingsPage-BFsSZgTa.js} +1 -1
  26. package/dist/assets/ScanSummary-CaG-s5qh.js +1 -0
  27. package/dist/assets/SettingsForm-C_K9RpFr.js +1 -0
  28. package/dist/assets/SettingsPage-Cqp1tUyi.js +3 -0
  29. package/dist/assets/ThemeSwitcher-BPuCvU1U.js +1 -0
  30. package/dist/assets/{api-ChM6smRq.js → api-DD1tY5Dq.js} +1 -1
  31. package/dist/assets/arrow-left-DDsxjRCq.js +1 -0
  32. package/dist/assets/{auth-context-CGdGFadP.js → auth-context-BCos5wiL.js} +1 -1
  33. package/dist/assets/{data-size-oPRYOwnj.js → data-size-qpzofknI.js} +1 -1
  34. package/dist/assets/{extend-BTkr7oJ8.js → extend-BMkkNVfm.js} +1 -1
  35. package/dist/assets/{fields-BtCN_frr.js → fields-GPyF03tK.js} +1 -1
  36. package/dist/assets/{file-text-DzYzGxiY.js → file-text-DI3tERhf.js} +1 -1
  37. package/dist/assets/ical-FRtCagm-.js +8 -0
  38. package/dist/assets/index-C5rNjIku.css +2 -0
  39. package/dist/assets/index-DpBBejzP.js +24 -0
  40. package/dist/assets/{input-DqF3I-kT.js → input-tJjsdU1x.js} +1 -1
  41. package/dist/assets/{list-cache-D-BfHI9X.js → list-cache-B4i_A9fj.js} +1 -1
  42. package/dist/assets/phone-input-BeYLRpyW.js +1 -0
  43. package/dist/assets/{phone-input-vooQJZf_.js → phone-input-CZF7hU3E.js} +2 -2
  44. package/dist/assets/popover-C2xHG6L3.js +1 -0
  45. package/dist/assets/settings-rQsBFoL2.js +1 -0
  46. package/dist/assets/shelf-CpE68_8d.js +1 -0
  47. package/dist/assets/{showcase-Boajqdx8.js → showcase-CUDyXMb7.js} +1 -1
  48. package/dist/assets/src-2QhdFJyH.js +1 -0
  49. package/dist/assets/src-BRA1s942.js +1 -0
  50. package/dist/assets/src-Bmc_xgWr.js +1 -0
  51. package/dist/assets/{src-BiJuengh.js → src-BnvKHmLu.js} +1 -1
  52. package/dist/assets/src-Bv7IbF5F.js +1 -0
  53. package/dist/assets/{src-DWgNUcSX2.js → src-C3X1cmlu.js} +1 -1
  54. package/dist/assets/{src-B3nX_MMy.js → src-C3hdIsRT.js} +1 -1
  55. package/dist/assets/src-CIrBx5O0.js +1 -0
  56. package/dist/assets/src-CTlBmB5n.js +1 -0
  57. package/dist/assets/src-Cp4yFztL.js +4 -0
  58. package/dist/assets/src-D5pqHmdF.js +1 -0
  59. package/dist/assets/src-D9ZNj5Fi2.js +1 -0
  60. package/dist/assets/src-DAUYP87f2.js +1 -0
  61. package/dist/assets/{src-DB2N_cct.js → src-DEcZTAam.js} +4 -4
  62. package/dist/assets/src-DEqFDnFO.js +1 -0
  63. package/dist/assets/{src-BxLhm2cd.js → src-DXSkgVrX.js} +2 -2
  64. package/dist/assets/src-DaHZILQZ.js +1 -0
  65. package/dist/assets/src-Dvbi--2I.js +6 -0
  66. package/dist/assets/src-IYiBUs1S.js +1 -0
  67. package/dist/assets/src-Uu0k-CHA.js +1 -0
  68. package/dist/assets/src-WB1-7_Wh.js +1 -0
  69. package/dist/assets/src-dXlj2maQ.js +1 -0
  70. package/dist/assets/src-d_-Z83D-.js +2 -0
  71. package/dist/assets/src-eAsO2o4h2.js +1 -0
  72. package/dist/assets/{src-BJF2nMuG.js → src-uWOnIJWD.js} +2 -2
  73. package/dist/assets/{src-Ys25cnOv.js → src-yL3q5Nfe.js} +1 -1
  74. package/dist/assets/ui-A8aS2-NQ.js +2 -0
  75. package/dist/assets/ui-BK1F_c4b.js +2 -0
  76. package/dist/assets/ui-C9-epiVm.js +2 -0
  77. package/dist/assets/ui-kICtw37s.js +1 -0
  78. package/dist/assets/ui-vendor-BuwRGdK1.js +44 -0
  79. package/dist/index.html +26 -18
  80. package/dist-vendor/web-ui.js +8869 -8316
  81. package/package.json +1 -1
  82. package/dist/assets/ChatWidget-YZqj6v6F.js +0 -31
  83. package/dist/assets/DiagnosticsPage-C_lLM_Hw.js +0 -1
  84. package/dist/assets/NewRecordView-CC_fERty.js +0 -1
  85. package/dist/assets/ScanSummary-xKGEaOS0.js +0 -1
  86. package/dist/assets/SettingsForm-DW1KCYe4.js +0 -1
  87. package/dist/assets/SettingsPage-DuP06DkM.js +0 -3
  88. package/dist/assets/ThemeSwitcher-CR6oJXQD.js +0 -1
  89. package/dist/assets/arrow-left-5G0O-4HL.js +0 -1
  90. package/dist/assets/index-i___vlpd.css +0 -2
  91. package/dist/assets/index-zcINFUZQ.js +0 -28
  92. package/dist/assets/phone-input-CX0JAfCj.js +0 -1
  93. package/dist/assets/popover-DjWMp23y.js +0 -1
  94. package/dist/assets/settings-BfEurOH1.js +0 -1
  95. package/dist/assets/shelf-CRUDKiTz.js +0 -1
  96. package/dist/assets/src-6lNAeDcP.js +0 -1
  97. package/dist/assets/src-BDmFR0_v.js +0 -2
  98. package/dist/assets/src-BRzAjJX_.js +0 -6
  99. package/dist/assets/src-BinvE9sd2.js +0 -1
  100. package/dist/assets/src-BqhS-0sX.js +0 -1
  101. package/dist/assets/src-Br4oAdCy.js +0 -1
  102. package/dist/assets/src-C-Xmuyui.js +0 -1
  103. package/dist/assets/src-C2zqLDpV.js +0 -1
  104. package/dist/assets/src-C9WAFG8V.js +0 -4
  105. package/dist/assets/src-CFcpeTQ5.js +0 -1
  106. package/dist/assets/src-CYiAjCO3.js +0 -1
  107. package/dist/assets/src-Cr_oHzOc.js +0 -1
  108. package/dist/assets/src-CzmJIKcf.js +0 -1
  109. package/dist/assets/src-D2hi5jAO.js +0 -1
  110. package/dist/assets/src-DpPV1q-1.js +0 -1
  111. package/dist/assets/src-DwXka-KQ.js +0 -1
  112. package/dist/assets/ui-A-A-cO8j2.js +0 -2
  113. package/dist/assets/ui-CAxfAaN9.js +0 -2
  114. package/dist/assets/ui-D7QZRcxZ.js +0 -2
  115. package/dist/assets/ui-vendor-C79K_wDx.js +0 -44
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./fields-GPyF03tK.js";import{s as n}from"./shelf-CpE68_8d.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=e=>{let t=e?.value;return typeof t==`number`&&Number.isFinite(t)?t:null},u=n({shelf:`food_item`,library:`kitchen`,label:`kitchen.food_item.label`,icon:`lucide:soup`,agent:'A kitchen product is generic (buckwheat, milk), and its `variants` rows are the actual goods on the shelf. The unit is declared once on the product, inside its stock: `quantity` is written as `{"unit": "<unit>"}` — the unit alone, never a value. Every amount below it — `minQuantity`, each variant row\'s `quantity` — is written as `{"value": <number>}` alone, on that scale. Do NOT send a unit inside those amounts: the server fills it in from the product\'s `quantity.unit` and discards anything you put there. Reads hand them back as `{"value": …, "unit": …}`, which you may echo unchanged. The `value` of the product\'s `quantity`, and `expires`, are computed from the variants and MUST NOT be written — to record a purchase or a write-off, change the `quantity` of the relevant variant row, or add a variant row for a good that is not there yet. A variant with quantity 0 means "this good is known, none in stock" and is a shopping-list candidate, so do not delete it.',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}})}}),stats:e.stats({fields:{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`),mutate:[`stockState`]}),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(),value:e.real({rules:{min:0},mutate:[`stockState`]})}})}}),status:e.status({source:{stockState:e.string({label:`kitchen.food_item.fields.stockState`,value:({record:e})=>{let t=l(e.minQuantity);return t==null?`ok`:(l(e.quantity)??0)<t?`low`:`ok`},strict:!0,noSearch:!0,options:[{value:`ok`,title:`kitchen.food_item.options.stockState.ok`,tone:`success`},{value:`low`,title:`kitchen.food_item.options.stockState.low`,tone:`danger`}]})}}),expires:e.reminder({label:`kitchen.food_item.fields.expires`,rules:{lead:14},ui:{span:4},value:({record:e})=>c(e.variants,`expires`)}),photos:e.image({label:`kitchen.food_item.fields.photos`,multiple:!0}),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}})}}),d=async({ref:e})=>{let t=(await e?.(`product`))?.quantity;return t&&typeof t==`object`?t.unit??null:null},f=e=>{let t=e?.value;return typeof t==`number`&&Number.isFinite(t)?t:null},p=async({ref:e})=>(await e?.(`product`))?.quantity??null,m=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`}),description:e.text({label:`kitchen.food_recipe.fields.description`,rules:{max:500}}),status:e.status({source:{readiness:e.string({label:`kitchen.food_recipe.fields.readiness`,value:({record:e})=>(e.ingredients??[]).filter(e=>!e.optional).every(e=>e.stock_state===`enough`)?`ready`:`not_ready`,strict:!0,noSearch:!0,options:[{value:`ready`,title:`kitchen.food_recipe.options.readiness.ready`,tone:`success`},{value:`not_ready`,title:`kitchen.food_recipe.options.readiness.not_ready`,tone:`danger`}]})}}),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`})}}),images:e.image({label:`kitchen.food_recipe.fields.images`,multiple:!0}),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:d,strict:!0,cache:0}),value:e.real({rules:{min:0},mutate:[`.stock_state`]})}}),optional:e.boolean({label:`kitchen.food_recipe.ingredient.optional`,mutate:[`readiness`]}),stock:e.measured({label:`kitchen.food_recipe.ingredient.stock`,units:`cooking`,cache:0,value:p}),stock_state:e.string({label:`kitchen.food_recipe.ingredient.stock_state`,cache:0,value:async e=>{let t=f(await p(e));if(t==null)return null;let n=f(e.parent?.amount);return n==null?t>0?null:`missing`:t>=n?`enough`:t>0?`partial`:`missing`},mutate:[`readiness`],strict:!0,noSearch:!0,options:[{value:`enough`,title:`kitchen.food_recipe.options.stock_state.enough`,icon:{kind:`icon`,value:`lucide:check`},tone:`success`},{value:`partial`,title:`kitchen.food_recipe.options.stock_state.partial`,icon:{kind:`icon`,value:`lucide:minus`},tone:`danger`},{value:`missing`,title:`kitchen.food_recipe.options.stock_state.missing`,icon:{kind:`icon`,value:`lucide:x`},tone:`danger`}]})}}),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_body`,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}})}}),h=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}})}}),g=r({id:`kitchen`,version:`1.0.0`,dependsOn:[`things`],libraries:[{meta:i({id:`kitchen`,label:`kitchen.library.label`,icon:`lucide:cooking-pot`,agent:{description:`Food inventory and recipes — what is in stock, what is expiring, what can be cooked.`,instructions:`Read kitchen/preferences before creating, merging or renaming a product: it records how this household splits products from variants, which units each family of goods uses, and why. It governs — these rules are the mechanics, that record is the intent.`},starterHint:`what's expiring soon, or what can be cooked from what's in stock`}),shelves:[u,m,h]}],fieldContribs:[{library:`things`,shelf:`item`,field:`type`,options:[{value:`kitchenware`,title:`kitchen.contrib.type.kitchenware`}]}]});export{g as default};
@@ -0,0 +1 @@
1
+ import{n as e}from"./fields-GPyF03tK.js";import{s as t}from"./shelf-CpE68_8d.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:{identity:e.identity({avatar:{logo:e.avatar({label:`people.person.fields.logo`,ui:{role:`avatar`}})},name:{fullName:e.title({label:`people.person.fields.fullName`,required:!0})}}),bio:e.prose({fields:{description:e.text({label:`people.person.fields.description`,rules:{max:500}})}}),hairline:e.divider(),properties:e.properties({columns:4,fields:{occupation:e.string({label:`people.person.fields.occupation`,rules:{max:200},ui:{span:3}}),birthDate:e.age({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:{description:`People (person) — contacts, birthdays, jobs; referenced by health, travel, and others.`,instructions:`Count birthdays by birthDate. When contacts/address/job change — update the relevant fields via update_record.`}}),shelves:[i]}]});export{a as default};
@@ -0,0 +1 @@
1
+ import{n as e}from"./fields-GPyF03tK.js";import{s as t}from"./shelf-CpE68_8d.js";import{n,r}from"./plugin-CFEkHH3f.js";import{t as i}from"./settings-rQsBFoL2.js";var a=t({shelf:`title`,library:`media`,label:`media.title.label`,icon:`lucide:clapperboard`,agent:`A movie or series in the watchlist. name — the title. kind — movie/series. status — viewing intent (want=added to the list, not in Jellyfin yet / unwatched=in Jellyfin, not watched / watching / watched / dropped). in_library, jellyfin_id and source are mirrored from Jellyfin — do not edit manually when source=jellyfin (sync will overwrite).`,views:{list:[`kind`,`status`,`year`,`imdb_rating`],groupBy:[`kind`,`status`,`genres`,`year`,`source`]},fields:{name:e.title({label:`core.fields.name`}),about:e.illustrated({label:`media.title.fields.about`,fields:{image:e.poster({}),text:e.text({rules:{max:2e3}})}}),runtime:e.duration({label:`media.title.fields.runtime`,ui:{span:4}}),seasons:e.int({label:`media.title.fields.seasons`,rules:{min:0},ui:{span:4}}),episodes:e.int({label:`media.title.fields.episodes`,rules:{min:0},ui:{span:4}}),link:e.link({label:`media.title.fields.link`,ui:{span:6}}),jellyfin_id:e.link({label:`media.title.fields.jellyfin_id`,rules:{max:300},ui:{span:6}}),scores:e.score({label:`media.title.fields.scores`,max:10,source:{tmdb_rating:e.real({label:`media.title.fields.tmdb_rating`}),imdb_rating:e.real({label:`media.title.fields.imdb_rating`})}}),properties:e.properties({columns:3,fields:{kind:e.string({label:`media.title.fields.kind`,strict:!0,noSearch:!0,ui:{span:4},options:[{value:`movie`,title:`media.title.options.kind.movie`},{value:`series`,title:`media.title.options.kind.series`}]}),year:e.int({label:`media.title.fields.year`,ui:{span:4}}),status:e.string({label:`media.title.fields.status`,strict:!0,noSearch:!0,ui:{span:4},options:[{value:`want`,title:`media.title.options.status.want`},{value:`unwatched`,title:`media.title.options.status.unwatched`},{value:`watching`,title:`media.title.options.status.watching`},{value:`watched`,title:`media.title.options.status.watched`},{value:`dropped`,title:`media.title.options.status.dropped`}]}),watched_date:e.date({label:`media.title.fields.watched_date`,ui:{span:4}}),in_library:e.boolean({label:`media.title.fields.in_library`,ui:{span:4}}),tmdb_id:e.identifier({label:`media.title.fields.tmdb_id`,rules:{max:32},ui:{span:4}}),imdb_id:e.identifier({label:`media.title.fields.imdb_id`,rules:{max:32},ui:{span:4}}),source:e.string({label:`media.title.fields.source`,default:`manual`,strict:!0,noSearch:!0,ui:{span:4},options:[{value:`manual`,title:`media.title.options.source.manual`},{value:`jellyfin`,title:`media.title.options.source.jellyfin`},{value:`agent`,title:`media.title.options.source.agent`}]})}}),genres:e.tags({label:`media.title.fields.genres`}),notes:e.text({label:`media.title.fields.notes`,rules:{max:2e3}})}}),o=n({id:`media`,version:`1.0.0`,dependsOn:[],libraries:[{meta:r({id:`media`,label:`media.library.label`,icon:`lucide:clapperboard`,agent:{description:`Movies and series watchlist (title) — tracked against a Jellyfin library.`,instructions:`status: want=added to the list, not in Jellyfin yet; unwatched=in Jellyfin, not watched; watching; watched; dropped. in_library, jellyfin_id and source are mirrored from Jellyfin — do not edit manually when source=jellyfin. To add a movie by name — search_titles (review candidates) then add_title.`}}),shelves:[a]}],settings:i({label:`media.settings.label`,fields:{tmdb_key:e.password({label:`media.settings.tmdb_key`,required:!0}),omdb_key:e.password({label:`media.settings.omdb_key`}),jellyfin_url:e.string({label:`media.settings.jellyfin_url`}),jellyfin_token:e.password({label:`media.settings.jellyfin_token`}),jellyfin_user_id:e.string({label:`media.settings.jellyfin_user_id`}),button:e.button({label:`media.settings.test_button`,value:`media.testJellyfin`,icon:`lucide:wifi`}),button2:e.button({label:`media.settings.sync_button`,value:`media.syncJellyfin`,icon:`lucide:refresh-cw`})}})});export{o as default};
@@ -1,8 +1,8 @@
1
- import{D as e,M as t,P as n,W as r,k as i,n as a,r as o}from"./fields-BtCN_frr.js";import{s}from"./shelf-CRUDKiTz.js";import{t as c}from"./extend-BTkr7oJ8.js";import{n as l,r as u}from"./plugin-CFEkHH3f.js";import{t as d}from"./settings-BfEurOH1.js";var f=/^[A-Za-z]{2}\d{2}[A-Za-z0-9]{11,30}$/;function p(e){let t=e.toUpperCase().replace(/\s+/g,``),n=t.slice(4)+t.slice(0,4),r=``;for(let e of n){let t=e.charCodeAt(0);t>=65&&t<=90?r+=(t-55).toString():r+=e}let i=0;for(let e of r)i=(i*10+(e.charCodeAt(0)-48))%97;return i===1}function m(a){let o=a.required??!1,s=r().regex(f,{message:n(`pattern`,{messageKey:`core.presets.iban`})}).refine(p,{message:n(`pattern`,{messageKey:`core.presets.iban`})});return i(void 0,a,e({kind:`text`,label:a.label??``,required:o,prim:`text`,column:`text`,hints:{mask:`iban`,maskStore:`unmasked`},zod:t(s,o)},a.multiple??!1))}var h=/^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;function g(a){let o=a.required??!1,s=r().regex(h,{message:n(`pattern`,{messageKey:`finance.presets.bic`})});return i(void 0,a,e({kind:`text`,label:a.label??``,required:o,prim:`text`,column:`text`,hints:{},zod:t(s,o)},a.multiple??!1))}var _=s({shelf:`account`,library:`finance`,label:`finance.account.label`,icon:`lucide:landmark`,agent:`Firefly III account (read-only mirror). kind — account type.
1
+ import{D as e,M as t,P as n,W as r,k as i,n as a,r as o}from"./fields-GPyF03tK.js";import{s}from"./shelf-CpE68_8d.js";import{t as c}from"./extend-BMkkNVfm.js";import{n as l,r as u}from"./plugin-CFEkHH3f.js";import{t as d}from"./settings-rQsBFoL2.js";var f=/^[A-Za-z]{2}\d{2}[A-Za-z0-9]{11,30}$/;function p(e){let t=e.toUpperCase().replace(/\s+/g,``),n=t.slice(4)+t.slice(0,4),r=``;for(let e of n){let t=e.charCodeAt(0);t>=65&&t<=90?r+=(t-55).toString():r+=e}let i=0;for(let e of r)i=(i*10+(e.charCodeAt(0)-48))%97;return i===1}function m(a){let o=a.required??!1,s=r().regex(f,{message:n(`pattern`,{messageKey:`core.presets.iban`})}).refine(p,{message:n(`pattern`,{messageKey:`core.presets.iban`})});return i(void 0,a,e({kind:`text`,label:a.label??``,required:o,prim:`text`,column:`text`,hints:{mask:`iban`,maskStore:`unmasked`},zod:t(s,o)},a.multiple??!1))}var h=/^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;function g(a){let o=a.required??!1,s=r().regex(h,{message:n(`pattern`,{messageKey:`finance.presets.bic`})});return i(void 0,a,e({kind:`text`,label:a.label??``,required:o,prim:`text`,column:`text`,hints:{},zod:t(s,o)},a.multiple??!1))}var _=s({shelf:`account`,library:`finance`,label:`finance.account.label`,icon:`lucide:landmark`,agent:`Firefly III account (read-only mirror). kind — account type.
2
2
  current_balance — current balance. firefly_id — external key (do not edit).`,views:{list:[`kind`,`currency`,`current_balance`]},fields:{name:a.title({label:`core.fields.name`}),description:a.text({label:`finance.account.fields.description`,rules:{max:1e3}}),balance:a.balance({source:{current_balance:a.money({label:`finance.account.fields.current_balance`})}}),status:a.status({source:{kind:a.string({label:`finance.account.fields.kind`,strict:!0,noSearch:!0,options:[{value:`asset`,title:`finance.account.options.asset`},{value:`expense`,title:`finance.account.options.expense`},{value:`revenue`,title:`finance.account.options.revenue`},{value:`liability`,title:`finance.account.options.liability`},{value:`cash`,title:`finance.account.options.cash`}]})}}),sheet:a.sheet({fields:{account:{currency:a.currency({label:`finance.account.fields.currency`}),iban:m({label:`finance.account.fields.iban`})},bank:{bank:a.string({label:`finance.account.fields.bank`,rules:{max:120}}),bic:g({label:`finance.account.fields.bic`})}}}),firefly_id:a.string({label:`finance.account.fields.firefly_id`,rules:{max:32}}),notes:a.text({label:`finance.account.fields.notes`,rules:{max:2e3}})}}),v=s({shelf:`transaction`,library:`finance`,label:`finance.transaction.label`,icon:`lucide:arrow-left-right`,agent:`Firefly III transaction (read-only). Each split = a separate record.
3
- source/destination — accounts. firefly_id — split journal id (do not edit).`,views:{list:[`date`,`amount`,`kind`]},fields:{description:a.title({label:`finance.transaction.fields.description`}),receipt:a.receipt({fields:{date:a.date({label:`finance.transaction.fields.date`}),kind:a.string({label:`finance.transaction.fields.kind`,strict:!0,noSearch:!0,options:[{value:`withdrawal`,title:`finance.transaction.options.withdrawal`},{value:`deposit`,title:`finance.transaction.options.deposit`},{value:`transfer`,title:`finance.transaction.options.transfer`}]}),category:a.string({label:`finance.transaction.fields.category`,rules:{max:100}}),currency:a.currency({label:`core.fields.currency`}),source:a.relation({label:`finance.transaction.fields.source`,options:o({library:`finance`,shelf:`account`})}),destination:a.relation({label:`finance.transaction.fields.destination`,options:o({library:`finance`,shelf:`account`})})},total:{amount:a.money({label:`finance.transaction.fields.amount`})}}),firefly_id:a.string({label:`finance.transaction.fields.firefly_id`,rules:{max:32}}),notes:a.text({label:`finance.transaction.fields.notes`,rules:{max:2e3}})}}),y=s({shelf:`bill`,library:`finance`,label:`finance.bill.label`,icon:`lucide:receipt`,agent:`Recurring Firefly III payment (Bill = subscription, read-only).
4
- repeat — recurrence. next_expected — next expected date. firefly_id — do not edit.`,views:{list:[`amount_min`,`repeat`,`next_expected`,`active`]},fields:{name:a.title({label:`core.fields.name`}),description:a.text({label:`finance.bill.fields.description`,rules:{max:1e3}}),currency:a.currency({label:`core.fields.currency`}),sheet:a.sheet({fields:{amount:{amount_min:a.money({label:`finance.bill.fields.amount_min`}),amount_max:a.money({label:`finance.bill.fields.amount_max`})},schedule:{repeat:a.string({label:`finance.bill.fields.repeat`,strict:!0,noSearch:!0,options:[{value:`weekly`,title:`finance.bill.options.weekly`},{value:`monthly`,title:`finance.bill.options.monthly`},{value:`quarterly`,title:`finance.bill.options.quarterly`},{value:`yearly`,title:`finance.bill.options.yearly`}]})}}}),countdown:a.countdown({source:{next_expected:a.date({label:`finance.bill.fields.next_expected`})}}),active:a.boolean({label:`finance.bill.fields.active`}),firefly_id:a.string({label:`finance.bill.fields.firefly_id`,rules:{max:32}}),notes:a.text({label:`finance.bill.fields.notes`,rules:{max:2e3}})}}),b=e=>typeof e==`number`&&Number.isFinite(e)?e:Number.isFinite(Number(e))&&e!==null&&e!==``?Number(e):null,x=c({id:`item_financing`,label:`finance.item_financing.label`,icon:`lucide:credit-card`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{paymentStatus:{$in:[`installment`,`credit`]}},agent:`Installment/credit details for an item. creditor — who is owed (bank/store).
3
+ source/destination — accounts. firefly_id — split journal id (do not edit).`,views:{list:[`date`,`amount`,`kind`]},fields:{description:a.title({label:`finance.transaction.fields.description`}),flow:a.flow({amount:{amount:a.money({label:`finance.transaction.fields.amount`})},from:{source:a.relation({label:`finance.transaction.fields.source`,options:o({library:`finance`,shelf:`account`})})},to:{destination:a.relation({label:`finance.transaction.fields.destination`,options:o({library:`finance`,shelf:`account`})})},meta:{date:a.date({label:`finance.transaction.fields.date`,ui:{span:3}}),kind:a.string({label:`finance.transaction.fields.kind`,strict:!0,noSearch:!0,ui:{span:3},options:[{value:`withdrawal`,title:`finance.transaction.options.withdrawal`},{value:`deposit`,title:`finance.transaction.options.deposit`,tone:`success`},{value:`transfer`,title:`finance.transaction.options.transfer`}]}),category:a.string({label:`finance.transaction.fields.category`,rules:{max:100},ui:{span:3}}),currency:a.currency({label:`core.fields.currency`,ui:{span:3}})}}),firefly_id:a.string({label:`finance.transaction.fields.firefly_id`,rules:{max:32}}),notes:a.text({label:`finance.transaction.fields.notes`,rules:{max:2e3}})}}),y=s({shelf:`bill`,library:`finance`,label:`finance.bill.label`,icon:`lucide:receipt`,agent:`Recurring Firefly III payment (Bill = subscription, read-only).
4
+ repeat — recurrence. next_expected — next expected date. firefly_id — do not edit.`,views:{list:[`amount_min`,`repeat`,`next_expected`,`active`]},fields:{name:a.title({label:`core.fields.name`}),description:a.text({label:`finance.bill.fields.description`,rules:{max:1e3}}),currency:a.currency({label:`core.fields.currency`}),sheet:a.sheet({fields:{amount:{amount_min:a.money({label:`finance.bill.fields.amount_min`}),amount_max:a.money({label:`finance.bill.fields.amount_max`})},schedule:{repeat:a.string({label:`finance.bill.fields.repeat`,strict:!0,noSearch:!0,options:[{value:`weekly`,title:`finance.bill.options.weekly`},{value:`monthly`,title:`finance.bill.options.monthly`},{value:`quarterly`,title:`finance.bill.options.quarterly`},{value:`yearly`,title:`finance.bill.options.yearly`}]})}}}),countdown:a.countdown({source:{next_expected:a.date({label:`finance.bill.fields.next_expected`})},caption:`units.days`}),active:a.boolean({label:`finance.bill.fields.active`}),firefly_id:a.string({label:`finance.bill.fields.firefly_id`,rules:{max:32}}),notes:a.text({label:`finance.bill.fields.notes`,rules:{max:2e3}})}}),b=e=>typeof e==`number`&&Number.isFinite(e)?e:Number.isFinite(Number(e))&&e!==null&&e!==``?Number(e):null,x=c({id:`item_financing`,label:`finance.item_financing.label`,icon:`lucide:credit-card`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{paymentStatus:{$in:[`installment`,`credit`]}},agent:`Installment/credit details for an item. creditor — who is owed (bank/store).
5
5
  holder — which person the debt is registered to (relation people/person).
6
6
  total — full debt amount. monthly — monthly payment. termMonths/paidMonths — schedule.
7
7
  remaining — how much is left; COMPUTED (total − downPayment − monthly × paidMonths), never write it.
8
- nextPayment — payment reminder. paidOff — settled (manual: an early lump payoff is not in the schedule).`,fields:{creditor:a.string({label:`finance.item_financing.fields.creditor`,rules:{max:120}}),holder:a.relation({label:`finance.item_financing.fields.holder`,options:o({library:`people`,shelf:`person`})}),currency:a.currency({label:`core.fields.currency`,default:`UAH`}),sheet:a.sheet({fields:{principal:{total:a.money({label:`finance.item_financing.fields.total`,mutate:[`remaining`]}),downPayment:a.money({label:`finance.item_financing.fields.downPayment`,mutate:[`remaining`]})},outstanding:{monthly:a.money({label:`finance.item_financing.fields.monthly`,mutate:[`remaining`]}),remaining:a.money({label:`finance.item_financing.fields.remaining`,value:({record:e})=>{let t=b(e.total);if(t==null)return null;let n=(b(e.monthly)??0)*(Number(e.paidMonths)||0),r=t-(b(e.downPayment)??0)-n;return Math.max(0,Math.round(r*100)/100)}})},term:{termMonths:a.int({label:`finance.item_financing.fields.termMonths`,rules:{min:0}}),paidMonths:a.int({label:`finance.item_financing.fields.paidMonths`,rules:{min:0},mutate:[`remaining`]}),rate:a.real({label:`finance.item_financing.fields.rate`,rules:{min:0}})}}}),startDate:a.date({label:`finance.item_financing.fields.startDate`}),nextPayment:a.reminder({label:`finance.item_financing.fields.nextPayment`,rules:{lead:3}}),paidOff:a.boolean({label:`finance.item_financing.fields.paidOff`}),notes:a.text({label:`finance.item_financing.fields.notes`,rules:{max:2e3}})}}),S={iban:m},C=l({id:`finance`,version:`1.0.0`,dependsOn:[`things`,`people`],libraries:[{meta:u({id:`finance`,label:`finance.library.label`,icon:`lucide:wallet`,agent:`Bank accounts, bills, and transactions — mirrored from Firefly.`,starterHint:`bills due soon, or how this month compares with the last`}),shelves:[_,v,y]}],extends_:[x],settings:d({label:`finance.settings.label`,fields:{firefly_url:a.string({label:`finance.settings.firefly_url`,required:!0}),token:a.password({label:`finance.settings.token`,required:!0}),button:a.button({label:`finance.settings.test_button`,value:`finance.testConnection`,icon:`lucide:wifi`}),button2:a.button({label:`finance.settings.sync_button`,value:`finance.sync`,icon:`lucide:refresh-cw`}),wise_csv:a.file({label:`finance.settings.wise_csv`}),wise_account:a.relation({label:`finance.settings.wise_account`,options:o({library:`finance`,shelf:`account`})}),button3:a.button({label:`finance.settings.wise_import_button`,value:`finance.importWise`,icon:`lucide:upload`})}})});export{C as n,m as r,S as t};
8
+ nextPayment — payment reminder. paidOff — settled (manual: an early lump payoff is not in the schedule).`,fields:{creditor:a.string({label:`finance.item_financing.fields.creditor`,rules:{max:120}}),holder:a.relation({label:`finance.item_financing.fields.holder`,options:o({library:`people`,shelf:`person`})}),currency:a.currency({label:`core.fields.currency`,default:`UAH`}),sheet:a.sheet({fields:{principal:{total:a.money({label:`finance.item_financing.fields.total`,mutate:[`remaining`]}),downPayment:a.money({label:`finance.item_financing.fields.downPayment`,mutate:[`remaining`]})},outstanding:{monthly:a.money({label:`finance.item_financing.fields.monthly`,mutate:[`remaining`]}),remaining:a.money({label:`finance.item_financing.fields.remaining`,value:({record:e})=>{let t=b(e.total);if(t==null)return null;let n=(b(e.monthly)??0)*(Number(e.paidMonths)||0),r=t-(b(e.downPayment)??0)-n;return Math.max(0,Math.round(r*100)/100)}})},term:{termMonths:a.int({label:`finance.item_financing.fields.termMonths`,rules:{min:0}}),paidMonths:a.int({label:`finance.item_financing.fields.paidMonths`,rules:{min:0},mutate:[`remaining`]}),rate:a.real({label:`finance.item_financing.fields.rate`,rules:{min:0}})}}}),startDate:a.date({label:`finance.item_financing.fields.startDate`}),nextPayment:a.reminder({label:`finance.item_financing.fields.nextPayment`,rules:{lead:3}}),paidOff:a.boolean({label:`finance.item_financing.fields.paidOff`}),notes:a.text({label:`finance.item_financing.fields.notes`,rules:{max:2e3}})}}),S={iban:m},C=l({id:`finance`,version:`1.0.0`,dependsOn:[`things`,`people`],libraries:[{meta:u({id:`finance`,label:`finance.library.label`,icon:`lucide:wallet`,agent:{description:`Bank accounts, bills, and transactions — mirrored from Firefly.`,instructions:`Data is mirrored from Firefly (firefly_id). Do NOT edit current_balance manually — new operations live as a transaction (kind: withdrawal/deposit/transfer). bill.next_expected — next payment date.`},starterHint:`bills due soon, or how this month compares with the last`}),shelves:[_,v,y]}],extends_:[x],settings:d({label:`finance.settings.label`,fields:{firefly_url:a.string({label:`finance.settings.firefly_url`,required:!0}),token:a.password({label:`finance.settings.token`,required:!0}),button:a.button({label:`finance.settings.test_button`,value:`finance.testConnection`,icon:`lucide:wifi`}),button2:a.button({label:`finance.settings.sync_button`,value:`finance.sync`,icon:`lucide:refresh-cw`}),wise_csv:a.file({label:`finance.settings.wise_csv`}),wise_account:a.relation({label:`finance.settings.wise_account`,options:o({library:`finance`,shelf:`account`})}),button3:a.button({label:`finance.settings.wise_import_button`,value:`finance.importWise`,icon:`lucide:upload`})}})});export{C as n,m as r,S as t};
@@ -0,0 +1 @@
1
+ import{i as e,r as t,s as n}from"./data-size-qpzofknI.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-CIrBx5O0.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,4 +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".
1
+ import{n as e,r as t}from"./fields-GPyF03tK.js";import{s as n}from"./shelf-CpE68_8d.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
2
  date — reading date. cold_water/hot_water — water meter readings (m³).
3
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};
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:{description:`The home itself — renovation materials, utility meter readings, rooms.`,instructions:`meter_reading readings are cumulative; consumption over a period = difference between adjacent dates. New meter readings — create_record meter_reading (do NOT edit old ones); used up a material — update material.quantity via update_record.`},starterHint:`meter readings that are overdue, or renovation materials running low`}),shelves:[a,o,s]}]});export{c as default};
@@ -0,0 +1 @@
1
+ import{n as e}from"./fields-GPyF03tK.js";import{n as t}from"./plugin-CFEkHH3f.js";import{t as n}from"./settings-rQsBFoL2.js";var r=t({id:`http`,version:`1.0.0`,dependsOn:[],settings:n({label:`http.settings.label`,fields:{port:e.int({label:`http.settings.port`})}})});export{r as default};
@@ -0,0 +1,6 @@
1
+ import{n as e,r as t}from"./fields-GPyF03tK.js";import{s as n}from"./shelf-CpE68_8d.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`,`tags`]},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}})}}),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.identifier({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.path({label:`things.storage_location.fields.path`,rules:{max:120}}),contents:e.backrefs({label:`things.storage_location.fields.contents`,from:{library:`things`,shelf:`item`,field:`location`}}),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`,`tags`]},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:{description:`Belongings and where they are stored (item, storage_location, store). Also hosts network hosts (device_info) and drone builds.`,instructions:`item: quantity {value,unit}, location (relation to storage_location), condition, warrantyExpires (ISO date). Find an item via list_records things/item (filters or text q). When an item is moved/changes condition/is repaired — update location/condition/quantity via update_record; on purchase — purchaseDate/warrantyExpires.`},starterHint:`what's about to warranty-expire`}),shelves:[a,o,s]}]});export{c as default};
@@ -0,0 +1 @@
1
+ import{n as e}from"./plugin-CFEkHH3f.js";var t=class extends Error{},n=class extends Error{},r=new Map;function i(e){if(!/^[A-Za-z0-9-]+$/.test(e.id))throw Error(`[dav] source id '${e.id}': letters, digits and '-' only`);if(r.has(e.id))throw Error(`[dav] source '${e.id}' already registered`);r.set(e.id,e)}function a(e){r.delete(e)}function o(){return[...r.values()]}var s=e({id:`dav`,version:`1.0.0`,dependsOn:[]});export{n as NotFound,t as PreconditionFailed,s as default,o as listCalendarSources,i as registerCalendarSource,a as unregisterCalendarSource};
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./fields-GPyF03tK.js";import{s as n}from"./shelf-CpE68_8d.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`]})},caption:`units.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`,tone:`danger`}]})}}),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`}),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`,ui:{title:[`date`,`leg_type`]},multiple:!0,fields:{route:e.route({from:{origin_code:e.string({label:`travel.trip.leg.origin_code`,rules:{max:10}})},to:{destination_code:e.string({label:`travel.trip.leg.destination_code`,rules:{max:10}})},depart:{departure_time:e.time({label:`travel.trip.leg.departure_time`})},arrive:{arrival_time:e.time({label:`travel.trip.leg.arrival_time`})},duration:{duration:e.duration({label:`travel.trip.leg.duration`})}}),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}}),destination_city:e.string({label:`travel.trip.leg.destination_city`,rules:{max:100}}),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`,ui:{title:[`check_in`,`accom_type`]},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`,ui:{title:[`insurer`]},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.reminder({label:`travel.trip.insur.valid_until`,rules:{lead:14}}),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`,ui:{title:[`date`,`activity_type`]},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}),budget_meter:e.meter({source:{spent:e.money({label:`travel.trip.fields.spent`,value:c,currencyFrom:`currency`,mutate:[`budget_state`]})},of:{budget:e.money({label:`travel.trip.fields.budget`,currencyFrom:`currency`,mutate:[`budget_state`]})},direction:`ceiling`}),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`},tone:`success`},{value:`over`,title:`travel.trip.options.budget_state.over`,icon:{kind:`icon`,value:`lucide:x`},tone:`danger`}]}),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:{description:`Trips (trip) with legs, lodging, insurance, activities, and packing lists.`,instructions:`trip: status + date range (date_from/date_to). Nested collections: legs (transport), accommodations (lodging), insurances, activities, packing_items (linked things), packing_list (free text). When a trip/booking status changes — update trip.status and the relevant fields via update_record.`}}),shelves:[l]}]});export{u as default};
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./fields-GPyF03tK.js";import{s as n}from"./shelf-CpE68_8d.js";import{t as r}from"./extend-BMkkNVfm.js";import{n as i,r as a}from"./plugin-CFEkHH3f.js";import{n as o}from"./src-CTlBmB5n.js";import{t as s}from"./settings-rQsBFoL2.js";import{t as c}from"./src-CIrBx5O0.js";import{t as l}from"./src-DEcZTAam.js";var u=n({shelf:`field_demo`,library:`lab`,label:`lab.field_demo.label`,icon:`lucide:flask-conical`,views:{inline:[`name`,`select`],listKind:`map`,list:[`place`,`text_minmax`,`integer`,`boolean`,`select`,`rating_5`,`measured_currency`]},fields:{name:e.title({label:`core.fields.name`}),image:e.image({label:`lab.field_demo.fields.image`,ui:{role:`cover`}}),avatar:e.avatar({label:`lab.field_demo.fields.avatar`,ui:{role:`avatar`}}),info:e.info(`lab.field_demo.info.intro`),button:e.button({label:`lab.field_demo.fields.button_demo`,value:`lab.demoAction`,icon:`lucide:zap`,variant:`outline`}),properties:e.properties({label:`lab.field_demo.groups.properties_inspector`,icon:`lucide:sliders-horizontal`,columns:4,fields:{demo_status:e.string({label:`lab.field_demo.fields.demo_status`,ui:{span:3}}),demo_author:e.string({label:`lab.field_demo.fields.demo_author`,ui:{span:3}}),demo_prop_rating:e.rating({label:`lab.field_demo.fields.rating_5`,ui:{span:3}}),demo_prop_date:e.date({label:`lab.field_demo.fields.date`,ui:{span:3}})}}),stack:e.stack({label:`lab.field_demo.groups.vertical_stack`,icon:`lucide:layers`,fields:{stack_note_1:e.string({label:`lab.field_demo.fields.stack_note_1`}),stack_note_2:e.string({label:`lab.field_demo.fields.stack_note_2`})}}),group:e.group({label:`lab.field_demo.groups.embeds`,icon:`lucide:tv`,scope:`hoist`,fields:{embed_wide:e.embed({label:`lab.field_demo.fields.embed_wide`,multiple:!0}),embed_narrow:e.embed({label:`lab.field_demo.fields.embed_narrow`,multiple:!0})}}),group2:e.group({label:`lab.field_demo.groups.text_pattern`,icon:`lucide:type`,scope:`hoist`,fields:{text_pattern:e.string({label:`lab.field_demo.fields.text_pattern`,rules:{pattern:`^[A-Za-z]+$`,messageKey:`lab.field_demo.validation.letters_only`}})}}),group3:e.group({label:`lab.field_demo.groups.text_email`,icon:`lucide:mail`,scope:`hoist`,fields:{text_emails:e.email({label:`lab.field_demo.fields.text_emails`,multiple:!0})}}),group4:e.group({label:`lab.field_demo.groups.text_url`,icon:`lucide:link`,scope:`hoist`,fields:{text_url:e.url({label:`lab.field_demo.fields.text_url`})}}),group5:e.group({label:`lab.field_demo.groups.text_password`,icon:`lucide:key-round`,scope:`hoist`,fields:{text_password:e.password({label:`lab.field_demo.fields.text_password`})}}),group6:e.group({label:`lab.field_demo.groups.slug_link`,icon:`lucide:link-2`,scope:`hoist`,fields:{demo_slug:e.slug({label:`lab.field_demo.fields.demo_slug`}),demo_link:e.link({label:`lab.field_demo.fields.demo_link`})}}),group7:e.group({label:`lab.field_demo.groups.string_mask`,icon:`lucide:credit-card`,scope:`hoist`,fields:{demo_mask_card:e.string({label:`lab.field_demo.fields.demo_mask_card`,rules:{pattern:`^\\d{4} \\d{4} \\d{4} \\d{4}$`}})}}),group8:e.group({label:`lab.field_demo.groups.percent_year`,icon:`lucide:percent`,scope:`hoist`,fields:{demo_percent:e.percent({label:`lab.field_demo.fields.demo_percent`}),demo_year:e.year({label:`lab.field_demo.fields.demo_year`})}}),group9:e.group({label:`lab.field_demo.groups.local_paths`,icon:`lucide:folder-tree`,scope:`hoist`,fields:{demo_local_dir:e.localDir({label:`lab.field_demo.fields.demo_local_dir`}),demo_local_file:e.localFile({label:`lab.field_demo.fields.demo_local_file`})}}),group10:e.group({label:`lab.field_demo.groups.tag_i18n`,icon:`lucide:tags`,scope:`hoist`,fields:{demo_tag:e.tag({label:`lab.field_demo.fields.demo_tag`,options:[`new`,`sale`,`featured`]}),demo_i18n:e.i18n({label:`lab.field_demo.fields.demo_i18n`})}}),group11:e.group({label:`lab.field_demo.groups.source_poster`,icon:`lucide:file-code`,scope:`hoist`,fields:{demo_source:e.source({label:`lab.field_demo.fields.demo_source`}),demo_poster:e.poster({label:`lab.field_demo.fields.demo_poster`})}}),group12:e.group({label:`lab.field_demo.groups.ranges`,icon:`lucide:chevrons-left-right`,scope:`hoist`,fields:{demo_number_range:e.numberRange({label:`lab.field_demo.fields.demo_number_range`}),demo_real_range:e.realRange({label:`lab.field_demo.fields.demo_real_range`})}}),group13:e.group({label:`lab.field_demo.groups.date_month`,icon:`lucide:calendar`,scope:`hoist`,fields:{demo_month:e.date({label:`lab.field_demo.fields.demo_month`,rules:{granularity:`month`}})}}),group14:e.group({label:`lab.field_demo.groups.ratings`,icon:`lucide:star`,scope:`hoist`,fields:{rating_5:e.rating({label:`lab.field_demo.fields.rating_5`}),rating_10:e.rating({label:`lab.field_demo.fields.rating_10`,rules:{max:10}})}}),group15:e.group({label:`lab.field_demo.groups.hostname`,icon:`lucide:globe`,scope:`hoist`,fields:{demo_hostname:c.hostname({label:`lab.field_demo.fields.demo_hostname`})}}),group16:e.group({label:`lab.field_demo.groups.unit_amount`,icon:`lucide:calculator`,scope:`hoist`,fields:{demo_unit:e.unit({label:`lab.field_demo.fields.demo_unit`,options:`weight`}),demo_amount:e.amount({label:`lab.field_demo.fields.demo_amount`,unitFrom:`demo_unit`})}}),group17:e.group({label:`lab.field_demo.groups.datetimes`,icon:`lucide:calendar-clock`,scope:`hoist`,fields:{datetimes_multi:e.datetime({label:`lab.field_demo.fields.datetimes_multi`,multiple:!0})}}),group18:e.group({label:`lab.field_demo.groups.times_multi`,icon:`lucide:alarm-clock`,scope:`hoist`,fields:{times_multi:e.time({label:`lab.field_demo.fields.times_multi`,multiple:!0})}}),group18b:e.group({label:`lab.field_demo.groups.recurrence`,icon:`lucide:repeat`,scope:`hoist`,fields:{demo_recurrence:o.recurrence({label:`lab.field_demo.fields.demo_recurrence`,exdates:`demo_exdates`}),demo_exdates:e.datetime({label:`lab.field_demo.fields.demo_exdates`,multiple:!0})}}),sheet:e.sheet({label:`lab.field_demo.fields.demo_sheet`,icon:`lucide:grid-2x2`,fields:{row1:{sheet_a1:e.string({label:`lab.field_demo.fields.sheet_a1`}),sheet_b1:e.string({label:`lab.field_demo.fields.sheet_b1`})},row2:{sheet_a2:e.string({label:`lab.field_demo.fields.sheet_a2`}),sheet_b2:e.string({label:`lab.field_demo.fields.sheet_b2`})}}}),demo_table_specs:e.row({scope:`nest`,multiple:!0,label:`lab.field_demo.fields.demo_table_specs`,icon:`lucide:table`,fields:{param:e.string({label:`lab.field_demo.per_row.param`}),val:e.string({label:`lab.field_demo.per_row.val`})}}),demo_check_multi:e.check({label:`lab.field_demo.fields.demo_check_multi`,multiple:!0}),demo_check_stages:e.check({label:`lab.field_demo.fields.demo_check_stages`,slots:[`lab.field_demo.fields.stage_ordered`,`lab.field_demo.fields.stage_paid`,`lab.field_demo.fields.stage_shipped`],multiple:!0}),demo_stepper:e.stepper({label:`lab.field_demo.fields.demo_stepper`,options:[{value:`ordered`,title:`lab.field_demo.options.stage.ordered`},{value:`packed`,title:`lab.field_demo.options.stage.packed`},{value:`shipped`,title:`lab.field_demo.options.stage.shipped`},{value:`delivered`,title:`lab.field_demo.options.stage.delivered`}]}),divider:e.divider({label:`lab.field_demo.blocks.divider`}),bento:e.bento({label:`lab.field_demo.blocks.bento`,icon:`lucide:layout-grid`,fields:{number_int:{span:`2x1`,el:e.int({label:`lab.field_demo.fields.number_int`,rules:{min:0,max:100}})},color_multi:e.color({label:`lab.field_demo.fields.color_multi`,multiple:!0}),numbers_multi:e.real({label:`lab.field_demo.fields.numbers_multi`,multiple:!0}),dates_multi:{span:`2x1`,el:e.date({label:`lab.field_demo.fields.dates_multi`,multiple:!0})}}}),group19:e.group({label:`lab.field_demo.groups.split_rating`,icon:`lucide:columns-2`,fields:{split:e.split({ratio:[1,1],columns:[{rating_split_5:e.rating({label:`lab.field_demo.fields.rating_split_5`})},{rating_split_10:e.rating({label:`lab.field_demo.fields.rating_split_10`,rules:{max:10}})}]})},scope:`hoist`}),grid:e.grid({label:`lab.field_demo.blocks.grid`,icon:`lucide:clock`,columns:2,fields:{time_field:e.time({label:`lab.field_demo.fields.time_field`})}}),group20:e.group({label:`lab.field_demo.groups.spread`,icon:`lucide:newspaper`,fields:{spread:e.spread({visual:{cover:e.cover({label:`lab.field_demo.fields.cover`})},quote:{nolabel_note:e.string({ui:{noEditControl:!0}})},facts:{origin:e.country({label:`lab.field_demo.fields.origin`}),tags_field:e.tags({label:`lab.field_demo.fields.tags_field`,options:[`alpha`,`beta`,`gamma`,`delta`]})}})},scope:`hoist`}),group21:e.group({label:`lab.field_demo.groups.aside`,icon:`lucide:panel-right`,scope:`hoist`,fields:{aside:e.aside({fields:{demo_weight:e.weight({label:`lab.field_demo.fields.demo_weight`})},aside:{demo_dimensions:e.dimensions({label:`lab.field_demo.fields.demo_dimensions`})}})}}),tabs:e.tabs({tabs:[{name:`tab1`,label:`lab.field_demo.blocks.tab1`,fields:{demo_datasize:c.dataSize({label:`lab.field_demo.fields.demo_datasize`}),demo_ram:c.ram({label:`lab.field_demo.fields.demo_ram`})}},{name:`tab2`,label:`lab.field_demo.blocks.tab2`,fields:{demo_disk:c.diskSize({label:`lab.field_demo.fields.demo_disk`}),ip_addr:c.ip({label:`lab.field_demo.fields.ip_addr`})}}]}),accordion:e.accordion({sections:[{name:`section1`,label:`lab.field_demo.blocks.section1`,open:!0,fields:{demo_weekday:e.string({label:`lab.field_demo.fields.demo_weekday`,options:`weekdays`,strict:!0,noSearch:!0}),demo_weekdays:e.string({label:`lab.field_demo.fields.demo_weekdays`,options:`weekdays`,multiple:!0,strict:!0,noSearch:!0})}},{name:`section2`,label:`lab.field_demo.blocks.section2`,fields:{cidr_subnet:c.cidr({label:`lab.field_demo.fields.cidr_subnet`}),ip_addrs:c.ip({label:`lab.field_demo.fields.ip_addrs`,multiple:!0})}}]}),divider2:e.divider({label:`lab.field_demo.blocks.leaves`}),prose:e.prose({label:`lab.field_demo.blocks.prose`,icon:`lucide:file-text`,dropCap:`markdown`,fields:{markdown:e.markdown({label:`lab.field_demo.fields.markdown`,rules:{max:5e3}}),text_multiline:e.text({label:`lab.field_demo.fields.text_multiline`,rules:{max:500}})}}),plaque:e.plaque({label:`lab.field_demo.blocks.plaque`,icon:`lucide:cpu`,title:{mac:c.mac({label:`lab.field_demo.fields.mac`})},subtitle:{imei:c.imei({label:`lab.field_demo.fields.imei`})}}),ledger:e.ledger({label:`lab.field_demo.blocks.ledger`,icon:`lucide:list`,fields:{duration_short:e.duration({label:`lab.field_demo.fields.duration_short`,rules:{max:28800,step:300}}),measured_weight:e.measured({label:`lab.field_demo.fields.measured_weight`,units:`weight`})}}),stats:e.stats({label:`lab.field_demo.blocks.stats`,icon:`lucide:thermometer`,fields:{tempRange:e.realRange({label:`lab.field_demo.fields.tempRange`})}}),facets:e.facets({label:`lab.field_demo.blocks.facets`,icon:`lucide:sun-medium`,fields:{day_period:e.string({label:`lab.field_demo.fields.day_period`,options:`day-periods`,strict:!0,noSearch:!0})}}),terminal:e.terminal({label:`lab.field_demo.blocks.terminal`,icon:`lucide:terminal`,caption:`lab.field_demo.blocks.terminal_caption`,fields:{code:e.snippet({label:`lab.field_demo.fields.code`,rules:{language:`yaml`,max:5e3}})}}),callout:e.callout({label:`lab.field_demo.blocks.callout`,icon:`lucide:shield-check`,tone:`warn`,fields:{agree:e.triState({label:`lab.field_demo.fields.agree`}),boolean:e.boolean({label:`lab.field_demo.fields.boolean`})}}),compare:e.compare({label:`lab.field_demo.blocks.compare`,icon:`lucide:git-compare`,leftLabel:`lab.field_demo.blocks.compare_left`,rightLabel:`lab.field_demo.blocks.compare_right`,left:{country_multi:e.string({label:`lab.field_demo.fields.country_multi`,options:`countries`,multiple:!0,strict:!0,noSearch:!0})},right:{demo_check:e.check({label:`lab.field_demo.fields.demo_check`}),select_multi:e.string({label:`lab.field_demo.fields.select_multi`,multiple:!0,strict:!0,noSearch:!0,options:[{value:`red`,title:`lab.field_demo.options.select.red`},{value:`green`,title:`lab.field_demo.options.select.green`},{value:`blue`,title:`lab.field_demo.options.select.blue`}]})}}),group22:e.group({label:`lab.field_demo.groups.figure`,icon:`lucide:image`,fields:{figure:e.figure({image:{image_gallery:e.image({label:`lab.field_demo.fields.image_gallery`,multiple:!0})},caption:{small_text:e.smallText({label:`lab.field_demo.fields.small_text`,rules:{max:500}})}})},scope:`hoist`}),group23:e.group({label:`lab.field_demo.groups.illustrated`,icon:`lucide:image`,scope:`hoist`,fields:{illustrated_one:e.illustrated({label:`lab.field_demo.fields.illustrated_one`}),illustrated_many:e.illustrated({label:`lab.field_demo.fields.illustrated_many`,multiple:!0,fields:{text:e.markdown({}),image:e.image({})}})}}),group24:e.group({label:`lab.field_demo.groups.epigraph`,icon:`lucide:quote`,fields:{epigraph:e.epigraph({source:{textarea:e.text({label:`lab.field_demo.fields.textarea`,rules:{max:1e3},ui:{noLabel:!0}})},attribution:{compact_note:e.string({label:`lab.field_demo.fields.compact_note`,ui:{noEditControl:!0}})}})},scope:`hoist`}),group25:e.group({label:`lab.field_demo.groups.masthead`,icon:`lucide:calendar-days`,fields:{masthead:e.masthead({overline:{day_period_multi:e.string({label:`lab.field_demo.fields.day_period_multi`,options:`day-periods`,multiple:!0,strict:!0,noSearch:!0})},title:{birthYear:e.date({label:`lab.field_demo.fields.birthYear`,rules:{granularity:`year`}})}})},scope:`hoist`}),divider3:e.divider({label:`lab.field_demo.blocks.domain`}),group26:e.group({label:`lab.field_demo.groups.timeline`,icon:`lucide:history`,fields:{timeline:e.timeline({fields:{date_future:e.date({label:`lab.field_demo.fields.date_future`,rules:{min:`today`}}),demo_reminder:e.reminder({label:`lab.field_demo.fields.demo_reminder`,rules:{lead:14}})}})},scope:`hoist`}),group27:e.group({label:`lab.field_demo.groups.countdown`,icon:`lucide:timer`,fields:{countdown:e.countdown({source:{datetime:e.datetime({label:`lab.field_demo.fields.datetime`})},caption:`lab.field_demo.blocks.countdown_caption`})},scope:`hoist`}),group28:e.group({label:`lab.field_demo.groups.deck`,icon:`lucide:layers`,fields:{deck:e.deck({source:{relation_multi:e.relation({label:`lab.field_demo.fields.relation_multi`,options:t({library:`lab`,shelf:`field_demo_child`}),multiple:!0})}})},scope:`hoist`}),group29:e.group({label:`lab.field_demo.groups.people`,icon:`lucide:user`,fields:{people:e.people({source:{relation_single:e.relation({label:`lab.field_demo.fields.relation_single`,options:t({library:`lab`,shelf:`field_demo_child`})})}})},scope:`hoist`}),group30:e.group({label:`lab.field_demo.groups.identity`,icon:`lucide:contact`,fields:{identity:e.identity({name:{text_plain:e.string({label:`lab.field_demo.fields.text_plain`,rules:{max:200}})},role:{text_minmax:e.string({label:`lab.field_demo.fields.text_minmax`,rules:{min:3,max:20}})},channels:{text_tel:e.tel({label:`lab.field_demo.fields.text_tel`}),text_email:e.email({label:`lab.field_demo.fields.text_email`})}})},scope:`hoist`}),group31:e.group({label:`lab.field_demo.groups.score`,icon:`lucide:gauge`,fields:{score:e.score({source:{integer:e.int({label:`lab.field_demo.fields.integer`,rules:{min:1,max:12}})},max:12})},scope:`hoist`}),group32:e.group({label:`lab.field_demo.groups.status`,icon:`lucide:check-circle`,fields:{status:e.status({source:{select:e.string({label:`lab.field_demo.fields.select`,strict:!0,noSearch:!0,options:[{value:`red`,title:`lab.field_demo.options.select.red`},{value:`green`,title:`lab.field_demo.options.select.green`},{value:`blue`,title:`lab.field_demo.options.select.blue`}]})}})},scope:`hoist`}),group33:e.group({label:`lab.field_demo.groups.meter`,icon:`lucide:sliders-horizontal`,fields:{meter:e.meter({source:{meter_value:e.int({label:`lab.field_demo.fields.meter_value`,rules:{min:0,max:50}})},min:0,max:50})},scope:`hoist`}),group34:e.group({label:`lab.field_demo.groups.receipt`,icon:`lucide:receipt`,scope:`hoist`,fields:{receipt:e.receipt({fields:{number_decimal:e.real({label:`lab.field_demo.fields.number_decimal`,rules:{min:0,max:1e3}})},total:{price:e.money({label:`lab.field_demo.fields.price`})}}),currency:e.currency({label:`core.fields.currency`,default:`UAH`})}}),group35:e.group({label:`lab.field_demo.groups.balance`,icon:`lucide:scale`,fields:{balance:e.balance({source:{measured_currency:e.measured({label:`lab.field_demo.fields.measured_currency`,units:`currency`})},caption:`lab.field_demo.blocks.balance_caption`})},scope:`hoist`}),group36:e.group({label:`lab.field_demo.groups.route`,icon:`lucide:map-pin`,fields:{route:e.route({from:{country:e.string({label:`lab.field_demo.fields.country`,options:`countries`,strict:!0,noSearch:!0})},to:{place:e.geo({label:`lab.field_demo.fields.place`})}})},scope:`hoist`}),calendar:e.calendar({source:{calendar_dates:e.group({scope:`nest`,label:`lab.field_demo.fields.calendar_dates`,icon:`lucide:calendar`,multiple:!0,fields:{occurs_on:e.date({label:`lab.field_demo.per_row.occurs_on`})}})},date:`occurs_on`}),journal:e.journal({source:{journal_log:e.group({scope:`nest`,label:`lab.field_demo.fields.journal_log`,icon:`lucide:book-open`,multiple:!0,fields:{logged_at:e.date({label:`lab.field_demo.per_row.logged_at`}),entry:e.text({label:`lab.field_demo.per_row.entry`,rules:{max:500}})}})},date:`logged_at`,text:`entry`}),group37:e.group({label:`lab.field_demo.groups.nutrition`,icon:`lucide:flame`,scope:`hoist`,fields:{nutrition:e.nutrition({energy:{ageRange:e.numberRange({label:`lab.field_demo.fields.ageRange`,rules:{min:0,max:120}})},fields:{measured_custom:e.measured({label:`lab.field_demo.fields.measured_custom`,units:[{value:`shot`,label:`lab.field_demo.units.shot`},{value:`scoop`,label:`lab.field_demo.units.scoop`}]})}})}}),group38:e.group({label:`lab.field_demo.groups.specimen`,icon:`lucide:palette`,fields:{specimen:e.specimen({title:{color_name:e.string({label:`lab.field_demo.fields.color_name`,options:`colors`,strict:!0,noSearch:!0})},subtitle:{color_hex:e.color({label:`lab.field_demo.fields.color_hex`})}})},scope:`hoist`}),manifest:e.manifest({source:{row_ingredients:e.group({scope:`nest`,label:`lab.field_demo.fields.row_ingredients`,icon:`lucide:carrot`,multiple:!0,rules:{unique:[`product`]},fields:{product:e.relation({label:`lab.field_demo.per_row.product`,options:t({library:`kitchen`,shelf:`food_item`})}),amount:e.real({label:`lab.field_demo.per_row.amount`,rules:{min:0}}),stock:e.measured({label:`lab.field_demo.per_row.stock`,units:`cooking`,cache:0,value:async e=>(await e.ref?.(`product`))?.quantity??null})}})},quantity:`amount`,item:`product`}),table:e.table({label:`lab.field_demo.fields.demo_table`,source:{demo_table_rows:e.row({scope:`nest`,label:`lab.field_demo.fields.demo_table`,multiple:!0,fields:{part:e.string({label:`lab.field_demo.table.part`}),vendor:e.string({label:`lab.field_demo.table.vendor`}),qty:e.int({label:`lab.field_demo.table.qty`})}})},sort:`qty`,dir:`desc`,groupBy:`vendor`,totals:{qty:`sum`},numbered:!0}),group39:e.group({label:`lab.field_demo.groups.idcard`,icon:`lucide:credit-card`,fields:{idcard:e.idcard({number:{iban:l.iban({label:`lab.field_demo.fields.iban`})},meta:{date:e.date({label:`lab.field_demo.fields.date`})}})},scope:`hoist`}),divider4:e.divider({label:`lab.field_demo.blocks.computed`}),chart:e.chart({source:{chart_readings:e.group({scope:`nest`,label:`lab.field_demo.fields.chart_readings`,icon:`lucide:trending-up`,multiple:!0,fields:{measured_on:e.date({label:`lab.field_demo.per_row.measured_on`}),reading:e.real({label:`lab.field_demo.per_row.reading`})}})},value:`reading`,date:`measured_on`,delta:!0}),heatmap:e.heatmap({source:{heatmap_sessions:e.group({scope:`nest`,label:`lab.field_demo.fields.heatmap_sessions`,icon:`lucide:calendar-check`,multiple:!0,fields:{happened_on:e.date({label:`lab.field_demo.per_row.happened_on`})}})},date:`happened_on`}),divider5:e.divider(),group40:e.group({label:`lab.field_demo.groups.periods`,icon:`lucide:calendar-range`,scope:`hoist`,fields:{periods:e.period({label:`lab.field_demo.fields.periods`,multiple:!0})}}),group41:e.group({label:`lab.field_demo.groups.json`,icon:`lucide:code-2`,scope:`hoist`,fields:{json:e.json({label:`lab.field_demo.fields.json`,ui:{emphasis:`muted`}})}}),row_single:e.group({scope:`nest`,label:`lab.field_demo.fields.row_single`,icon:`lucide:rows-3`,fields:{env:e.string({label:`lab.field_demo.per_row.env`,strict:!0,noSearch:!0,options:[{value:`dev`,title:`lab.field_demo.options.env.dev`},{value:`prod`,title:`lab.field_demo.options.env.prod`}]}),url:e.url({label:`lab.field_demo.per_row.url`}),token:e.password({label:`lab.field_demo.per_row.token`})}}),variants:e.keyed({label:`lab.field_demo.fields.variants`,icon:`lucide:languages`,fields:{lang:e.string({label:`lab.field_demo.per_row.lang`,options:`languages`,strict:!0,noSearch:!0}),name:e.string({label:`lab.field_demo.per_row.name`}),surname:e.string({label:`lab.field_demo.per_row.surname`})},by:`lang`}),perkey_fixed:e.keyed({label:`lab.field_demo.fields.perkey_fixed`,icon:`lucide:key`,fixed:!0,fields:{size:e.string({label:`lab.field_demo.per_row.size`,strict:!0,noSearch:!0,options:[{value:`s`,title:`lab.field_demo.options.size.s`},{value:`m`,title:`lab.field_demo.options.size.m`},{value:`l`,title:`lab.field_demo.options.size.l`}]}),qty:e.int({label:`lab.field_demo.per_row.qty`,rules:{min:0}})},by:`size`}),coll_text:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_text`,icon:`lucide:type`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.string({label:`lab.field_demo.fields.pp_value`})}}),coll_integer:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_integer`,icon:`lucide:hash`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.int({label:`lab.field_demo.fields.pp_value`})}}),coll_select:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_select`,icon:`lucide:list-checks`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.string({label:`lab.field_demo.fields.pp_value`,strict:!0,noSearch:!0,options:[{value:`s`,title:`lab.field_demo.options.pp_select.s`},{value:`m`,title:`lab.field_demo.options.pp_select.m`},{value:`l`,title:`lab.field_demo.options.pp_select.l`}]})}}),group42:e.group({label:`lab.field_demo.groups.per_weekday`,icon:`lucide:calendar-days`,scope:`hoist`,fields:{per_weekday:e.perWeekday({label:`lab.field_demo.fields.per_weekday`,rules:{min:0,max:5,step:.5}})}}),per_weekday_per_person:e.group({scope:`nest`,label:`lab.field_demo.fields.per_weekday_per_person`,icon:`lucide:users`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.perWeekday({label:`lab.field_demo.fields.pp_value`,rules:{min:0,max:10,step:1}})}}),group43:e.group({label:`lab.field_demo.groups.media_carousel`,icon:`lucide:images`,scope:`hoist`,fields:{avatar_row:e.avatar({label:`lab.field_demo.fields.avatar_row`,multiple:!0}),cover_carousel:e.cover({label:`lab.field_demo.fields.cover_carousel`,multiple:!0})}}),group44:e.group({label:`lab.field_demo.groups.files`,icon:`lucide:paperclip`,scope:`hoist`,fields:{attachment:e.file({label:`lab.field_demo.fields.attachment`}),doc:e.document({label:`lab.field_demo.fields.doc`}),voice:e.audio({label:`lab.field_demo.fields.voice`}),clip:e.video({label:`lab.field_demo.fields.clip`}),gallery:e.media({label:`lab.field_demo.fields.gallery`,multiple:!0}),attachment_one:e.attachment({label:`lab.field_demo.fields.attachment_one`}),attachment_many:e.attachment({label:`lab.field_demo.fields.attachment_many`,multiple:!0,fields:{file:e.document({})}})}}),group45:e.group({label:`lab.field_demo.groups.key_value`,icon:`lucide:key-round`,scope:`hoist`,fields:{key_value:e.keyValue({label:`lab.field_demo.fields.key_value`,multiple:!0}),key_value_secret:e.keyValue({label:`lab.field_demo.fields.key_value_secret`,fields:{value:e.password({label:``})}})}}),services_bylist:e.group({scope:`nest`,label:`lab.field_demo.fields.services_bylist`,icon:`lucide:server`,multiple:!0,fields:{type:e.string({label:`devices.service.type`,options:`service-types`,strict:!0,noSearch:!0}),url:e.url({label:`devices.service.url`}),login:e.string({label:`devices.service.login`}),password:e.password({label:`devices.service.password`,ui:{emphasis:`muted`}}),token:e.password({label:`devices.service.token`})}}),group47:e.group({label:`lab.field_demo.groups.catalogue_gap`,icon:`lucide:scan-line`,scope:`hoist`,fields:{identifier:e.identifier({label:`lab.field_demo.fields.identifier`,rules:{max:50},ui:{span:4}}),colorname:e.colorname({label:`lab.field_demo.fields.colorname`,ui:{span:4}}),age:e.age({label:`lab.field_demo.fields.age`,rules:{min:`1900-01-01`,max:`today`},ui:{span:4}}),path:e.path({label:`lab.field_demo.fields.path`,rules:{max:120},ui:{span:6}}),mrz:e.mrz({label:`lab.field_demo.fields.mrz`,rules:{max:200},ui:{span:6}}),timetable:e.timetable({label:`lab.field_demo.fields.timetable`,ui:{span:12}})}}),assay:e.assay({label:`lab.field_demo.groups.assay`,icon:`lucide:activity`,analyte:`analyte`,value:`value`,unit:`unit`,low:`low`,high:`high`,source:{readings:e.group({scope:`nest`,multiple:!0,fields:{analyte:e.string({label:`lab.field_demo.fields.analyte`,rules:{max:100}}),value:e.real({label:`lab.field_demo.fields.value`}),unit:e.string({label:`lab.field_demo.fields.unit`,rules:{max:20}}),low:e.real({label:`lab.field_demo.fields.low`}),high:e.real({label:`lab.field_demo.fields.high`})}})}}),flow:e.flow({amount:{flow_amount:e.money({label:`lab.field_demo.fields.flow_amount`})},from:{flow_from:e.relation({label:`lab.field_demo.fields.flow_from`,options:t({library:`lab`,shelf:`field_demo_child`})})},to:{flow_to:e.relation({label:`lab.field_demo.fields.flow_to`,options:t({library:`lab`,shelf:`field_demo_child`})})}}),children:e.backrefs({label:`lab.field_demo.fields.children`,from:{library:`lab`,shelf:`field_demo_child`,field:`demo_id`}}),group46:e.group({label:`lab.field_demo.groups.classifier`,icon:`lucide:toggle-right`,scope:`hoist`,fields:{type:e.string({label:`lab.field_demo.fields.type`,strict:!0,noSearch:!0,options:[{value:`basic`,title:`lab.field_demo.options.type.basic`},{value:`advanced`,title:`lab.field_demo.options.type.advanced`}]})}})}}),d=n({shelf:`field_demo_child`,library:`lab`,label:`lab.field_demo_child.label`,icon:`lucide:link`,standalone:!1,fields:{name:e.title({label:`core.fields.name`}),demo_id:e.relation({label:`lab.field_demo_child.fields.demo_id`,options:t({library:`lab`,shelf:`field_demo`})}),notes:e.text({label:`lab.field_demo_child.fields.notes`,rules:{max:500}})}}),f=r({id:`demo_extra`,label:`lab.demo_extra.label`,icon:`lucide:plus`,attachTo:[{library:`lab`,shelf:`field_demo`}],showWhen:{type:`advanced`},fields:{extra_text:e.string({label:`lab.demo_extra.fields.extra_text`,rules:{max:200}}),extra_number:e.int({label:`lab.demo_extra.fields.extra_number`,rules:{min:0}}),extra_flag:e.boolean({label:`lab.demo_extra.fields.extra_flag`})}}),p=i({id:`lab`,version:`1.0.0`,dependsOn:[`people`,`kitchen`,`devices`,`finance`,`geo`,`calendar`],settings:s({label:`lab.settings.label`,icon:`lucide:flask-conical`,fields:{info:e.info(`lab.settings.intro`),greeting:e.string({label:`lab.settings.fields.greeting`,rules:{max:80}}),enabled:e.boolean({label:`lab.settings.fields.enabled`}),mode:e.string({label:`lab.settings.fields.mode`,strict:!0,noSearch:!0,options:[{value:`fast`,title:`lab.settings.modes.fast`},{value:`safe`,title:`lab.settings.modes.safe`},{value:`debug`,title:`lab.settings.modes.debug`}]}),retries:e.int({label:`lab.settings.fields.retries`,rules:{min:0,max:10}}),divider:e.divider(),info2:e.info(`lab.settings.actions_info`),button:e.button({label:`lab.settings.run_button`,value:`lab.demoAction`,icon:`lucide:play`}),button2:e.button({label:`lab.settings.fail_button`,value:`lab.demoFail`,icon:`lucide:bug`,variant:`destructive`}),button3:e.button({label:`lab.settings.variants.default`,value:`lab.demoAction`,icon:`lucide:check`,variant:`default`}),button4:e.button({label:`lab.settings.variants.secondary`,value:`lab.demoAction`,icon:`lucide:settings`,variant:`secondary`}),button5:e.button({label:`lab.settings.variants.ghost`,value:`lab.demoAction`,icon:`lucide:ghost`,variant:`ghost`}),button6:e.button({label:`lab.settings.variants.link`,value:`lab.demoAction`,icon:`lucide:link`,variant:`link`})}}),libraries:[{meta:a({id:`lab`,label:`lab.library.label`,icon:`lucide:flask-conical`,agent:`Developer demo of field types — not real household data; ignore unless explicitly asked.`}),shelves:[u,d]}],extends_:[f]});export{p as default};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./src-CTlBmB5n.js";export{e as cal,n as default,t as recurrence};
@@ -0,0 +1,2 @@
1
+ import{n as e,r as t}from"./fields-GPyF03tK.js";import{s as n}from"./shelf-CpE68_8d.js";import{t as r}from"./extend-BMkkNVfm.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({overline:{type:e.string({label:`core.fields.type`,required:!0,strict:!0,noSearch:!0,options:[{value:`P`,title:`documents.personal_document.options.type.P`,face:`passport`},{value:`PA`,title:`documents.personal_document.options.type.PA`,face:`biometric`},{value:`ID`,title:`documents.personal_document.options.type.ID`,face:`idcard`},{value:`DL`,title:`documents.personal_document.options.type.DL`,face:`licence`},{value:`RP`,title:`documents.personal_document.options.type.RP`,face:`residence`},{value:`TP`,title:`documents.personal_document.options.type.TP`,face:`protection`},{value:`MIL`,title:`documents.personal_document.options.type.MIL`,face:`military`},{value:`TIN`,title:`documents.personal_document.options.type.TIN`,face:`tax`},{value:`SSN`,title:`documents.personal_document.options.type.SSN`,face:`social`},{value:`V`,title:`documents.personal_document.options.type.V`,face:`visa`},{value:`WP`,title:`documents.personal_document.options.type.WP`,face:`workpermit`},{value:`MC`,title:`documents.personal_document.options.type.MC`,face:`medical`},{value:`INS`,title:`documents.personal_document.options.type.INS`,face:`insurance`},{value:`BR`,title:`documents.personal_document.options.type.BR`,face:`birth`},{value:`MAR`,title:`documents.personal_document.options.type.MAR`,face:`marriage`},{value:`DIV`,title:`documents.personal_document.options.type.DIV`,face:`divorce`},{value:`DEA`,title:`documents.personal_document.options.type.DEA`,face:`death`},{value:`EDU`,title:`documents.personal_document.options.type.EDU`,face:`diploma`},{value:`VAC`,title:`documents.personal_document.options.type.VAC`,face:`vaccination`},{value:`OT`,title:`documents.personal_document.options.type.OT`}]})},number:{number:e.identifier({label:`documents.personal_document.fields.number`,rules:{max:50}})},photo:{portrait:e.image({label:`documents.personal_document.fields.portrait`})},meta:{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,faces:[`passport`,`biometric`,`idcard`,`licence`,`residence`,`protection`,`military`,`visa`]}}),nationality:e.string({label:`documents.personal_document.fields.nationality`,options:`countries`,strict:!0,noSearch:!0,ui:{span:4,faces:[`passport`,`biometric`,`idcard`,`licence`,`residence`,`protection`,`military`,`visa`]}})},footer:{issued:e.date({label:`documents.personal_document.fields.issued`,ui:{span:4}}),authority:e.string({label:`documents.personal_document.fields.authority`,rules:{max:200},ui:{span:4}}),record_no:e.string({label:`documents.personal_document.fields.record_no`,rules:{max:50},ui:{span:4}})},mrz:{mrz:e.mrz({label:`documents.personal_document.fields.mrz`,rules:{max:200}})}}),expires:e.reminder({label:`documents.personal_document.fields.expires`,rules:{lead:60}}),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}}),photos:e.image({label:`documents.personal_document.fields.photos`,multiple:!0}),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:{description:`Personal documents — IDs, passports, licences (personal_document); tracks expiry.`,instructions:`Expiring documents — count by expires. When a document is reissued — update number/issued/expires via update_record.`},starterHint:`documents that are about to expire`}),shelves:[o]}],extends_:[s]});export{c as default};
@@ -0,0 +1 @@
1
+ import{n as e}from"./fields-GPyF03tK.js";import{s as t}from"./shelf-CpE68_8d.js";import{n,r}from"./plugin-CFEkHH3f.js";import{t as i}from"./settings-rQsBFoL2.js";var a=t({shelf:`bus_route`,library:`transit`,label:`transit.bus_route.label`,icon:`lucide:bus`,views:{list:[`route_number`,`from`,`to`]},fields:{name:e.title({label:`core.fields.name`}),description:e.text({label:`transit.bus_route.fields.description`,rules:{max:1e3}}),route_number:e.int({label:`transit.bus_route.fields.route_number`,ui:{span:3}}),from:e.string({label:`transit.bus_route.fields.from`,rules:{max:100},ui:{span:3}}),to:e.string({label:`transit.bus_route.fields.to`,rules:{max:100},ui:{span:3}}),stop:e.string({label:`transit.bus_route.fields.stop`,rules:{max:200},ui:{span:3}}),weekday_times:e.timetable({label:`transit.bus_route.fields.weekday_times`,ui:{span:12}}),saturday_times:e.timetable({label:`transit.bus_route.fields.saturday_times`,ui:{span:6}}),sunday_times:e.timetable({label:`transit.bus_route.fields.sunday_times`,ui:{span:6}}),tags:e.tags({label:`transit.bus_route.fields.tags`}),notes:e.text({label:`transit.bus_route.fields.notes`,rules:{max:500}})}}),o=n({id:`transit`,version:`1.0.0`,dependsOn:[],libraries:[{meta:r({id:`transit`,label:`transit.library.label`,icon:`lucide:bus`,agent:{description:`Local bus routes and their departure schedules (bus_route).`,instructions:`bus_route: weekday_times/saturday_times/sunday_times — departure schedule. When the schedule changes, update *_times via update_record.`},starterHint:`the next departures on the saved routes`}),shelves:[a]}],settings:i({label:`transit.settings.label`,fields:{caldav_calendar:e.string({label:`transit.settings.caldav_calendar`}),caldav_url:e.string({label:`transit.settings.caldav_url`}),caldav_username:e.string({label:`transit.settings.caldav_username`}),caldav_password:e.password({label:`transit.settings.caldav_password`})}})});export{o as default};
@@ -1,6 +1,6 @@
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.
1
+ import{n as e}from"./fields-GPyF03tK.js";import{s as t}from"./shelf-CpE68_8d.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.`,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};
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`]}),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:{description:`Garden plants (plant) — watering and fertilizing schedule.`,instructions:`To find what needs watering — compare nextWatering with today. When watered/fertilized — update lastWatered/lastFertilized via update_record; nextWatering/nextFertilizing are computed by the server from those dates and the interval, and are rejected if you write them.`},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};
@@ -1 +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=t({id:`console`,version:`1.0.0`,dependsOn:[],settings:n({label:`console.settings.label`,icon:`lucide:terminal`,fields:{info:e.info(`console.settings.intro`),divider:e.divider(),info2:e.info(`console.settings.claude`),divider2:e.divider(),info3:e.info(`console.settings.codex`),divider3:e.divider(),info4:e.info(`console.settings.skills`)}})});export{r as default};
1
+ import{n as e}from"./fields-GPyF03tK.js";import{n as t}from"./plugin-CFEkHH3f.js";import{t as n}from"./settings-rQsBFoL2.js";var r=t({id:`console`,version:`1.0.0`,dependsOn:[],settings:n({label:`console.settings.label`,icon:`lucide:terminal`,fields:{info:e.info(`console.settings.intro`),divider:e.divider(),info2:e.info(`console.settings.claude`),divider2:e.divider(),info3:e.info(`console.settings.codex`),divider3:e.divider(),info4:e.info(`console.settings.skills`)}})});export{r as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ScanSummary-CaG-s5qh.js","assets/react-vendor-CzSUaSLk.js","assets/rolldown-runtime-QTnfLwEv.js","assets/i18n-vendor-T6EnJ_TL.js"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{a as t}from"./i18n-vendor-T6EnJ_TL.js";import{p as n,t as r}from"./react-vendor-CzSUaSLk.js";import{Fn as i,In as a,Ln as o,et as s,un as c,ut as l}from"./src-Cp4yFztL.js";import{n as u}from"./plugin-ui-CKd6q8ec.js";import{t as d}from"./input-tJjsdU1x.js";import{a as f,c as p,n as m,o as h,t as g}from"./data-size-qpzofknI.js";var _=e(t(),1);function v(e){let t=e.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);if(t){let e=t.slice(1).map(Number);return e.every(e=>e>=0&&e<=255)?{v:4,a:e}:null}try{let t=e;if(e.includes(`::`)){let[n,r]=e.split(`::`),i=n?n.split(`:`):[],a=r?r.split(`:`):[],o=8-i.length-a.length;t=[...i,...Array(o).fill(`0`),...a].join(`:`)}let n=t.split(`:`);if(n.length!==8)return null;let r=n.map(e=>parseInt(e,16));return r.some(e=>isNaN(e)||e<0||e>65535)?null:{v:6,a:r}}catch{return null}}function y(e){return e.v===4?e.a.join(`.`):e.a.map(e=>e.toString(16)).join(`:`)}function b(e){let t=e.lastIndexOf(`/`);if(t===-1)return null;let n=e.slice(0,t),r=e.slice(t+1),i=parseInt(r,10),a=v(n);if(!a||isNaN(i))return null;let o=a.v===4?32:128;return i<0||i>o?null:{...a,p:i}}function x(e){return`${y(e)}/${e.p}`}var S=r(),C=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/plugin-devices/src/fields/ui.tsx`;function w({value:e,onChange:t,parse:n,format:r,placeholder:i}){let a=(0,_.useMemo)(()=>{if(e&&typeof e==`object`)return e;if(typeof e!=`string`)return null;try{return JSON.parse(e)}catch{return null}},[e]),o=typeof e==`string`?e:``,[s,c]=(0,_.useState)(a?r(a):o);(0,_.useEffect)(()=>{c(a?r(a):o)},[o,a]);let l=e=>{let r=e.trim(),i=n(r);t(i?JSON.stringify(i):r)};return(0,S.jsxDEV)(d,{value:s,placeholder:i,onChange:e=>c(e.target.value),onBlur:()=>l(s),onKeyDown:e=>{e.key===`Enter`&&l(s)}},void 0,!1,{fileName:C,lineNumber:67,columnNumber:5},this)}function T(e,t){return(0,S.jsxDEV)(o,{items:c(e,[]),content:e=>{let n=typeof e==`string`?c(e,null):e;return n&&typeof n==`object`?t(n):String(e)}},void 0,!1,{fileName:C,lineNumber:84,columnNumber:5},this)}function E(e,t){let n=typeof e==`string`?c(e,null):e??null;if(n&&typeof n==`object`)return(0,S.jsxDEV)(`code`,{className:`font-mono text-sm`,children:t(n)},void 0,!1,{fileName:C,lineNumber:103,columnNumber:46},this);let r=String(e??``);return r?(0,S.jsxDEV)(`span`,{className:`text-muted`,children:r},void 0,!1,{fileName:C,lineNumber:105,columnNumber:16},this):(0,S.jsxDEV)(a,{},void 0,!1,{fileName:C,lineNumber:105,columnNumber:60},this)}function D({value:e}){return E(e,y)}function O({value:e}){return E(e,x)}function k(e){return(0,S.jsxDEV)(s,{field:e.field,value:e.value,label:e.label,required:e.required,error:e.error,mode:e.mode,geom:`inline`,bare:e.bare,view:t=>e.field.hints.multiple===!0?T(t,e=>y(e)):(()=>{let e=c(t,null);if(e)return(0,S.jsxDEV)(`code`,{className:`font-mono text-sm`,children:y(e)},void 0,!1,{fileName:C,lineNumber:132,columnNumber:34},this);let n=String(t??``);return n?(0,S.jsxDEV)(`span`,{className:`text-muted`,children:n},void 0,!1,{fileName:C,lineNumber:134,columnNumber:28},this):(0,S.jsxDEV)(a,{},void 0,!1,{fileName:C,lineNumber:134,columnNumber:72},this)})(),edit:(t,n)=>e.field.hints.multiple===!0?(0,S.jsxDEV)(l,{value:String(t),onChange:n,validate:e=>v(e.trim())!==null,serialize:e=>{let t=v(e.trim());return t?JSON.stringify(t):null},display:e=>{try{return y(JSON.parse(e))}catch{return e}},renderInput:(e,t,n)=>(0,S.jsxDEV)(d,{value:e,placeholder:`192.168.1.1`,onChange:e=>t(e.target.value),className:`flex-1`,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),n())}},void 0,!1,{fileName:C,lineNumber:155,columnNumber:15},this)},void 0,!1,{fileName:C,lineNumber:139,columnNumber:11},this):(0,S.jsxDEV)(w,{value:t,onChange:n,parse:v,format:y,placeholder:`192.168.1.1`},void 0,!1,{fileName:C,lineNumber:170,columnNumber:11},this)},void 0,!1,{fileName:C,lineNumber:118,columnNumber:5},this)}function A({value:e}){let t=null;try{t=y(JSON.parse(String(e)))}catch{t=null}return t===null?(0,S.jsxDEV)(`span`,{className:`truncate`,children:`—`},void 0,!1,{fileName:C,lineNumber:192,columnNumber:26},this):(0,S.jsxDEV)(`span`,{className:`truncate font-mono`,children:t},void 0,!1,{fileName:C,lineNumber:192,columnNumber:64},this)}var j={kinds:[`ip`],voice:`data`,Page:k,Inline:A,Value:D};function M(e){return(0,S.jsxDEV)(s,{field:e.field,value:e.value,label:e.label,required:e.required,error:e.error,mode:e.mode,geom:`inline`,bare:e.bare,view:t=>e.field.hints.multiple===!0?T(t,e=>x(e)):(()=>{let e=c(t,null);if(e)return(0,S.jsxDEV)(`code`,{className:`font-mono text-sm`,children:x(e)},void 0,!1,{fileName:C,lineNumber:222,columnNumber:34},this);let n=String(t??``);return n?(0,S.jsxDEV)(`span`,{className:`text-muted`,children:n},void 0,!1,{fileName:C,lineNumber:224,columnNumber:28},this):(0,S.jsxDEV)(a,{},void 0,!1,{fileName:C,lineNumber:224,columnNumber:72},this)})(),edit:(t,n)=>e.field.hints.multiple===!0?(0,S.jsxDEV)(l,{value:String(t),onChange:n,validate:e=>b(e.trim())!==null,serialize:e=>{let t=b(e.trim());return t?JSON.stringify(t):null},display:e=>{try{return x(JSON.parse(e))}catch{return e}},renderInput:(e,t,n)=>(0,S.jsxDEV)(d,{value:e,placeholder:`192.168.1.0/24`,onChange:e=>t(e.target.value),className:`flex-1`,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),n())}},void 0,!1,{fileName:C,lineNumber:245,columnNumber:15},this)},void 0,!1,{fileName:C,lineNumber:229,columnNumber:11},this):(0,S.jsxDEV)(w,{value:t,onChange:n,parse:b,format:x,placeholder:`192.168.1.0/24`},void 0,!1,{fileName:C,lineNumber:260,columnNumber:11},this)},void 0,!1,{fileName:C,lineNumber:208,columnNumber:5},this)}function N({value:e}){let t=null;try{t=x(JSON.parse(String(e)))}catch{t=null}return t===null?(0,S.jsxDEV)(`span`,{className:`truncate`,children:`—`},void 0,!1,{fileName:C,lineNumber:282,columnNumber:26},this):(0,S.jsxDEV)(`span`,{className:`truncate font-mono`,children:t},void 0,!1,{fileName:C,lineNumber:282,columnNumber:64},this)}var P={kinds:[`cidr`],voice:`data`,Page:M,Inline:N,Value:O};function F({field:e,value:t,onChange:n}){let r=p(e),a=t===``?``:Number(t),[o,s]=(0,_.useState)(()=>a!==``&&Number(a)>0?m(Number(a),r)[0]:e.hints.unit??`GB`),c=f(r,o),l=a===``?``:Number((Number(a)/c).toFixed(4)),u=e=>Math.round(e*c);return(0,S.jsxDEV)(`div`,{className:`flex gap-2 min-w-0`,children:[(0,S.jsxDEV)(d,{type:`number`,className:`flex-1 min-w-0`,min:0,value:l,onChange:e=>n(e.target.value===``?``:String(u(Number(e.target.value))))},void 0,!1,{fileName:C,lineNumber:306,columnNumber:7},this),(0,S.jsxDEV)(i,{value:o,onChange:s,items:g[r].map(([e])=>({value:e,title:e})),triggerClassName:`w-24 justify-between gap-1 px-2 font-normal`},void 0,!1,{fileName:C,lineNumber:313,columnNumber:7},this)]},void 0,!0,{fileName:C,lineNumber:305,columnNumber:5},this)}function I({value:e,system:t}){let n=h(e,t);return n?(0,S.jsxDEV)(`span`,{children:n},void 0,!1,{fileName:C,lineNumber:328,columnNumber:14},this):(0,S.jsxDEV)(a,{},void 0,!1,{fileName:C,lineNumber:328,columnNumber:33},this)}function L(e){let t=p(e.field);return(0,S.jsxDEV)(s,{field:e.field,value:e.value,label:e.label,required:e.required,error:e.error,mode:e.mode,geom:`inline`,width:`w-48`,bare:e.bare,view:e=>(0,S.jsxDEV)(I,{value:e,system:t},void 0,!1,{fileName:C,lineNumber:344,columnNumber:20},this),edit:(t,n)=>(0,S.jsxDEV)(F,{field:e.field,value:String(t??``),onChange:n},void 0,!1,{fileName:C,lineNumber:346,columnNumber:9},this)},void 0,!1,{fileName:C,lineNumber:334,columnNumber:5},this)}function R({field:e,value:t}){return(0,S.jsxDEV)(I,{value:t,system:p(e)},void 0,!1,{fileName:C,lineNumber:353,columnNumber:10},this)}var z=u({shelf:{library:`devices`,shelf:`network`},renderers:[j,P,{kinds:[`dataSize`],Page:L,Inline:R}],templates:{"devices.scan.summary":()=>n(()=>import(`./ScanSummary-CaG-s5qh.js`),__vite__mapDeps([0,1,2,3]))}});export{z as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GeoMap-B1DFGu6_.js","assets/rolldown-runtime-QTnfLwEv.js","assets/i18n-vendor-T6EnJ_TL.js","assets/react-vendor-CzSUaSLk.js","assets/GeoMap-vh-t_kPv.css"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{a as t,t as n}from"./i18n-vendor-T6EnJ_TL.js";import{p as r,r as i,t as a,u as o}from"./react-vendor-CzSUaSLk.js";import{Ot as s,Rt as c,Tr as l,Xt as u,Yt as d,cn as f,j as p,jr as m,nt as h}from"./src-Cp4yFztL.js";import{x as g}from"./fields-GPyF03tK.js";import{l as _,r as v}from"./shelf-CpE68_8d.js";import{n as y}from"./plugin-ui-CKd6q8ec.js";import{r as b,t as x}from"./input-tJjsdU1x.js";import{l as S}from"./phone-input-CZF7hU3E.js";var C=b(`locate-fixed`,[[`line`,{x1:`2`,x2:`5`,y1:`12`,y2:`12`,key:`bvdh0s`}],[`line`,{x1:`19`,x2:`22`,y1:`12`,y2:`12`,key:`1tbv5k`}],[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`5`,key:`11lu5j`}],[`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`,key:`x3vr5v`}],[`circle`,{cx:`12`,cy:`12`,r:`7`,key:`fim9np`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),w=e(t(),1);function T(e,t){return Math.floor((e+180)/360*2**t)}function E(e,t){let n=e*Math.PI/180;return Math.floor((1-Math.log(Math.tan(n)+1/Math.cos(n))/Math.PI)/2*2**t)}function D(e,t,n=13){return`https://tile.openstreetmap.org/${n}/${T(t,n)}/${E(e,n)}.png`}function O(e){let t=g(e.parts??[]);return{latKey:t.lat??`lat`,lngKey:t.lng??`lng`,labelKey:t.label??`label`}}function k(e,t){let{latKey:n,lngKey:r,labelKey:i}=O(t),a=e&&typeof e==`object`?e:(()=>{try{let t=JSON.parse(String(e??``));return t&&typeof t==`object`?t:null}catch{return null}})();return a?{lat:a[n],lng:a[r],label:a[i]}:{}}var A=e=>Number(e.toFixed(6)),j=(e,t)=>{if(e.lat==null&&e.lng==null&&!e.label)return``;let{latKey:n,lngKey:r,labelKey:i}=O(t);return{[n]:e.lat,[r]:e.lng,[i]:e.label}},M=a(),N=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/plugin-geo/src/geo-field.tsx`;function P(e){return e.lat!=null||e.lng!=null||e.label!=null}var F=(0,w.lazy)(()=>r(()=>import(`./GeoMap-B1DFGu6_.js`),__vite__mapDeps([0,1,2,3,4])));function I({g:e,onOpen:t}){let{t:r}=n();return e.lat==null||e.lng==null?(0,M.jsxDEV)(`button`,{type:`button`,onClick:t,className:`flex h-24 w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-border text-sm text-muted hover:border-accent`,children:[(0,M.jsxDEV)(m,{size:16},void 0,!1,{fileName:N,lineNumber:37,columnNumber:9},this),` `,r(`geo.pick`)]},void 0,!0,{fileName:N,lineNumber:32,columnNumber:7},this):(0,M.jsxDEV)(`button`,{type:`button`,onClick:t,title:e.label??`${e.lat}, ${e.lng}`,className:`relative block h-24 w-full overflow-hidden rounded-lg border border-border hover:border-accent`,children:[(0,M.jsxDEV)(`img`,{src:D(e.lat,e.lng),alt:``,loading:`lazy`,className:`h-full w-full object-cover`},void 0,!1,{fileName:N,lineNumber:48,columnNumber:7},this),(0,M.jsxDEV)(m,{size:22,fill:`currentColor`,className:`pointer-events-none absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-full text-danger drop-shadow`},void 0,!1,{fileName:N,lineNumber:49,columnNumber:7},this)]},void 0,!0,{fileName:N,lineNumber:42,columnNumber:5},this)}function L({field:e,value:t,commit:r,editable:i,label:a,onClose:o}){let{t:s}=n(),[u,f]=(0,w.useState)(``),[p,m]=(0,w.useState)(!1),g=e=>e===``?void 0:Number(e),_=e.parts?.find(e=>e.role===`lat`),v=e.parts?.find(e=>e.role===`lng`),y=_!=null&&_.mode!==`stored`||v!=null&&v.mode!==`stored`,b=e.parts?.find(e=>e.role===`label`),T=b!=null&&b.mode!==`stored`,E=i&&!y,{draft:D,setDraft:O,save:I,clear:L,clearable:R,error:z,busy:B}=h({field:e,seed:t,commit:r??(async()=>void 0),remove:i&&!e.required&&P(k(t,e))?()=>``:void 0,onDone:o}),V=(0,w.useMemo)(()=>k(D,e),[D,e]),H=t=>O(j(t,e));function U(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(e=>H({...V,lat:A(e.coords.latitude),lng:A(e.coords.longitude)}),()=>{},{enableHighAccuracy:!0})}async function W(){if(u.trim()){m(!0);try{let e=await(await fetch(`https://nominatim.openstreetmap.org/search?format=json&limit=1&q=${encodeURIComponent(u)}`)).json();Array.isArray(e)&&e[0]&&H({lat:A(+e[0].lat),lng:A(+e[0].lon),label:V.label||e[0].display_name})}catch{}m(!1)}}return(0,M.jsxDEV)(c,{open:!0,onOpenChange:e=>!e&&o(),title:a,children:(0,M.jsxDEV)(`div`,{className:`flex min-h-0 flex-col gap-2`,children:[E&&(0,M.jsxDEV)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsxDEV)(x,{placeholder:s(`geo.searchPlaceholder`),value:u,onChange:e=>f(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),W())},className:`flex-1`},void 0,!1,{fileName:N,lineNumber:137,columnNumber:13},this),(0,M.jsxDEV)(S,{type:`button`,variant:`secondary`,size:`icon`,disabled:p,onClick:W,title:s(`geo.search`),children:(0,M.jsxDEV)(l,{size:16},void 0,!1,{fileName:N,lineNumber:157,columnNumber:15},this)},void 0,!1,{fileName:N,lineNumber:149,columnNumber:13},this),(0,M.jsxDEV)(S,{type:`button`,variant:`secondary`,size:`icon`,onClick:U,title:s(`geo.myLocation`),children:(0,M.jsxDEV)(C,{size:16},void 0,!1,{fileName:N,lineNumber:160,columnNumber:15},this)},void 0,!1,{fileName:N,lineNumber:159,columnNumber:13},this)]},void 0,!0,{fileName:N,lineNumber:136,columnNumber:11},this),(0,M.jsxDEV)(w.Suspense,{fallback:(0,M.jsxDEV)(`div`,{className:`h-[60dvh] rounded-lg border border-border bg-surface/40`},void 0,!1,{fileName:N,lineNumber:164,columnNumber:29},this),children:(0,M.jsxDEV)(`div`,{className:`[&>div]:h-[60dvh]`,children:(0,M.jsxDEV)(F,{lat:V.lat,lng:V.lng,interactive:E,onPick:E?(e,t)=>H({...V,lat:e,lng:t}):void 0},void 0,!1,{fileName:N,lineNumber:166,columnNumber:13},this)},void 0,!1,{fileName:N,lineNumber:165,columnNumber:11},this)},void 0,!1,{fileName:N,lineNumber:164,columnNumber:9},this),(0,M.jsxDEV)(d,{error:z},void 0,!1,{fileName:N,lineNumber:174,columnNumber:9},this),i?(0,M.jsxDEV)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center`,children:[(0,M.jsxDEV)(`div`,{className:`grid flex-1 grid-cols-1 gap-2 sm:grid-cols-[7rem_7rem_1fr]`,children:[y?(0,M.jsxDEV)(`div`,{className:`flex h-9 items-center rounded-lg border border-transparent px-3 text-sm text-muted`,children:V.lat??`—`},void 0,!1,{fileName:N,lineNumber:180,columnNumber:17},this):(0,M.jsxDEV)(x,{type:`number`,step:`any`,placeholder:`lat`,value:V.lat??``,onChange:e=>H({...V,lat:g(e.target.value)})},void 0,!1,{fileName:N,lineNumber:184,columnNumber:17},this),y?(0,M.jsxDEV)(`div`,{className:`flex h-9 items-center rounded-lg border border-transparent px-3 text-sm text-muted`,children:V.lng??`—`},void 0,!1,{fileName:N,lineNumber:193,columnNumber:17},this):(0,M.jsxDEV)(x,{type:`number`,step:`any`,placeholder:`lng`,value:V.lng??``,onChange:e=>H({...V,lng:g(e.target.value)})},void 0,!1,{fileName:N,lineNumber:197,columnNumber:17},this),T?(0,M.jsxDEV)(`div`,{className:`flex h-9 items-center rounded-lg border border-transparent px-3 text-sm text-muted`,children:V.label??`—`},void 0,!1,{fileName:N,lineNumber:206,columnNumber:17},this):(0,M.jsxDEV)(x,{placeholder:s(`geo.label`),value:V.label??``,onChange:e=>H({...V,label:e.target.value||void 0})},void 0,!1,{fileName:N,lineNumber:210,columnNumber:17},this)]},void 0,!0,{fileName:N,lineNumber:178,columnNumber:13},this),R&&(0,M.jsxDEV)(S,{type:`button`,variant:`destructiveOutline`,disabled:B,onClick:()=>void L(),className:`sm:self-auto`,children:s(`actions.clear`)},void 0,!1,{fileName:N,lineNumber:218,columnNumber:15},this),(0,M.jsxDEV)(S,{type:`button`,disabled:B,onClick:()=>void I(),className:`sm:self-auto`,children:s(`actions.save`)},void 0,!1,{fileName:N,lineNumber:228,columnNumber:13},this)]},void 0,!0,{fileName:N,lineNumber:176,columnNumber:11},this):V.lat!=null&&V.lng!=null&&(0,M.jsxDEV)(`a`,{className:`text-sm text-accent hover:underline`,target:`_blank`,rel:`noreferrer`,href:`https://www.openstreetmap.org/?mlat=${V.lat}&mlon=${V.lng}#map=15/${V.lat}/${V.lng}`,children:V.label??`${V.lat.toFixed(5)}, ${V.lng?.toFixed(5)}`},void 0,!1,{fileName:N,lineNumber:235,columnNumber:13},this)]},void 0,!0,{fileName:N,lineNumber:134,columnNumber:7},this)},void 0,!1,{fileName:N,lineNumber:133,columnNumber:5},this)}function R({field:e,value:t,commit:n,editable:r,label:i}){let a=(0,w.useMemo)(()=>k(t,e),[t,e]),[o,s]=(0,w.useState)(!1);return(0,M.jsxDEV)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsxDEV)(I,{g:a,onOpen:()=>s(!0)},void 0,!1,{fileName:N,lineNumber:267,columnNumber:7},this),a.label&&(0,M.jsxDEV)(`span`,{className:`text-sm break-words`,children:a.label},void 0,!1,{fileName:N,lineNumber:273,columnNumber:19},this),a.lat!=null&&a.lng!=null&&(0,M.jsxDEV)(`span`,{className:`text-[11px] text-muted ${f(e)}`.trim(),"data-testid":`geo-point`,children:[a.lat.toFixed(5),`, `,a.lng.toFixed(5)]},void 0,!0,{fileName:N,lineNumber:275,columnNumber:9},this),o&&(0,M.jsxDEV)(L,{field:e,value:t,commit:n,editable:r,label:i,onClose:()=>s(!1)},void 0,!1,{fileName:N,lineNumber:280,columnNumber:9},this)]},void 0,!0,{fileName:N,lineNumber:266,columnNumber:5},this)}function z(e){let t=s(),n=t?.writable?t.write:void 0,r=!!n&&!(e.field.hints.noEditControl===!0&&e.mode===`view`),i=(0,M.jsxDEV)(R,{field:e.field,value:e.value,commit:n,editable:r,label:e.label},void 0,!1,{fileName:N,lineNumber:297,columnNumber:16},this);return e.bare?i:(0,M.jsxDEV)(`div`,{className:`group/field w-56`,children:[e.label!==void 0&&(0,M.jsxDEV)(u,{label:e.label,required:e.required},void 0,!1,{fileName:N,lineNumber:301,columnNumber:33},this),i,(0,M.jsxDEV)(d,{error:e.error},void 0,!1,{fileName:N,lineNumber:303,columnNumber:7},this)]},void 0,!0,{fileName:N,lineNumber:300,columnNumber:5},this)}function B({value:e,field:t}){let n=k(e,t);return(0,M.jsxDEV)(`span`,{className:`truncate`,children:n.label??(n.lat==null?`—`:`${n.lat.toFixed(3)}, ${n.lng?.toFixed(3)}`)},void 0,!1,{fileName:N,lineNumber:311,columnNumber:5},this)}var V={kinds:[`geo`],editor:`own`,Page:z,Inline:B};function H(e,t){let n=_(e.fields);return t.filter(e=>n[e]?.kind===`geo`)}function U(e,t){let n=H(e,t);return n.length===1?n[0]:null}function W(e,t){let n=_(e.fields),r=t[0];if(!r||!n[r])return`views.list: shelf has no text field for its title (titleKey fell back to "id")`;let i=H(e,t);return i.length===0?`views.list does not contain a kind:"geo" field`:i.length>1?`views.list contains multiple geo fields: ${i.join(`, `)}`:null}var G=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/plugin-geo/src/map-view.tsx`,K=(0,w.lazy)(()=>r(()=>import(`./GeoMap-B1DFGu6_.js`).then(e=>({default:e.MarkersMap})),__vite__mapDeps([0,1,2,3,4])));function q({rows:e,shelf:t,keys:r,hrefBase:a}){let{t:s}=n(),c=o(),[l,u]=(0,w.useState)(!1),d=_(t.fields),f=U(t,r),m=r[0],{points:h,without:g}=(0,w.useMemo)(()=>{let t=[],n=[];for(let r of e){let e=f?v(d[f],f,r):void 0;e&&typeof e.lat==`number`&&typeof e.lng==`number`?t.push({id:String(r.id),lat:e.lat,lng:e.lng,title:String(v(d[m],m,r)??r.id)}):n.push(r)}return{points:t,without:n}},[e,f,m,d]);return(0,M.jsxDEV)(`div`,{className:`p-4`,children:[(0,M.jsxDEV)(w.Suspense,{fallback:(0,M.jsxDEV)(`div`,{className:`h-64 rounded-lg border border-border`},void 0,!1,{fileName:G,lineNumber:48,columnNumber:27},this),children:(0,M.jsxDEV)(K,{points:h,onPick:e=>c(`${a}/${e}`)},void 0,!1,{fileName:G,lineNumber:49,columnNumber:9},this)},void 0,!1,{fileName:G,lineNumber:48,columnNumber:7},this),g.length>0&&(0,M.jsxDEV)(`div`,{className:`mt-3`,children:[(0,M.jsxDEV)(`button`,{type:`button`,onClick:()=>u(e=>!e),className:`text-sm text-muted hover:text-text transition-colors`,children:s(`geo.withoutCoords`,{count:g.length})},void 0,!1,{fileName:G,lineNumber:53,columnNumber:11},this),l&&(0,M.jsxDEV)(`ul`,{className:`mt-2 flex flex-col gap-1`,children:g.map(e=>(0,M.jsxDEV)(`li`,{children:(0,M.jsxDEV)(i,{to:`${a}/${e.id}`,className:`text-sm text-text hover:text-accent`,children:(0,M.jsxDEV)(p,{field:d[m],value:v(d[m],m,e)},void 0,!1,{fileName:G,lineNumber:65,columnNumber:21},this)},void 0,!1,{fileName:G,lineNumber:64,columnNumber:19},this)},String(e.id),!1,{fileName:G,lineNumber:63,columnNumber:17},this))},void 0,!1,{fileName:G,lineNumber:61,columnNumber:13},this)]},void 0,!0,{fileName:G,lineNumber:52,columnNumber:9},this)]},void 0,!0,{fileName:G,lineNumber:47,columnNumber:5},this)}var J=y({renderers:[V],listViews:[{kind:`map`,View:q,check:W}],translations:{uk:{geo:{searchPlaceholder:`Пошук адреси…`,search:`Знайти`,myLocation:`Моє місцеположення`,label:`Підпис`,pick:`Обрати місце`,withoutCoords:`Без координат: {{count}}`}},ru:{geo:{searchPlaceholder:`Поиск адреса…`,search:`Найти`,myLocation:`Моё местоположение`,label:`Подпись`,pick:`Выбрать место`,withoutCoords:`Без координат: {{count}}`}},en:{geo:{searchPlaceholder:`Search address…`,search:`Search`,myLocation:`My location`,label:`Label`,pick:`Pick location`,withoutCoords:`Without coordinates: {{count}}`}}}});export{J as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatWidget-ByBb2eNs.js","assets/rolldown-runtime-QTnfLwEv.js","assets/i18n-vendor-T6EnJ_TL.js","assets/react-vendor-CzSUaSLk.js","assets/src-Cp4yFztL.js","assets/fields-GPyF03tK.js","assets/shelf-CpE68_8d.js","assets/input-tJjsdU1x.js","assets/phone-input-CZF7hU3E.js","assets/ui-vendor-BuwRGdK1.js","assets/icons-BTbA1N7a.js","assets/popover-C2xHG6L3.js","assets/development-olQNibq5.js","assets/file-text-DI3tERhf.js","assets/plugin-ui-CKd6q8ec.js","assets/lib-DU7Qh2A4.js"])))=>i.map(i=>d[i]);
2
+ import{p as e}from"./react-vendor-CzSUaSLk.js";import"./src-Cp4yFztL.js";import{n as t}from"./plugin-ui-CKd6q8ec.js";var n=t({slots:[{slot:`overlay`,id:`webchat`,load:()=>e(()=>import(`./ChatWidget-ByBb2eNs.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]))}]});export{n as default};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{a as t,t as n}from"./i18n-vendor-T6EnJ_TL.js";import{f as r,r as i,t as a,u as o}from"./react-vendor-CzSUaSLk.js";import{Ir as s,Lr as c,Lt as l,Wt as u,et as d,t as f}from"./src-Cp4yFztL.js";import{l as p,r as m}from"./shelf-CpE68_8d.js";import{n as h}from"./plugin-ui-CKd6q8ec.js";import{l as g}from"./phone-input-CZF7hU3E.js";import{n as _,r as v,t as y}from"./ical-FRtCagm-.js";var b={uk:{calendar:{library:{label:`Календар`},entry:{label:`Календар`,fields:{summary:`Назва`,description:`Опис`,when:`Коли`,allDay:`Увесь день`,location:`Місце`,recurrence:`Повторення`,exdates:`Пропущені дати`,master:`Серія`,recurrenceId:`Замінює екземпляр`,status:`Статус`,uid:`Ідентифікатор синхронізації`,ics:`Дані клієнта`,tags:`Теги`,notes:`Нотатки`},options:{type:{event:`Подія`,task:`Завдання`},status:{tentative:`Попередньо`,confirmed:`Підтверджено`,needs_action:`Треба зробити`,in_process:`У процесі`,completed:`Виконано`,cancelled:`Скасовано`}}},task_details:{label:`Завдання`,fields:{priority:`Пріоритет`,percent:`Прогрес`,completed:`Виконано о`}},validation:{rrule:`Некоректне правило повторення`},view:{today:`Сьогодні`,prev:`Попередній місяць`,next:`Наступний місяць`,more:`+{{count}}`,withoutDate:`Без дати`,allDay:`увесь день`},recurrence:{never:`Не повторюється`,freq:`Повторювати`,daily:`Щодня`,weekly:`Щотижня`,monthly:`Щомісяця`,yearly:`Щороку`,interval:`Кожні`,ends:`Закінчується`,endsNever:`Ніколи`,endsAfter:`Після`,endsOn:`На дату`,times:`разів`,raw:`Правило (RRULE)`,exceptions:`Винятки`,sentence:{every:{daily_one:`Щодня`,daily_few:`Кожні {{count}} дні`,daily_many:`Кожні {{count}} днів`,daily_other:`Кожні {{count}} днів`,weekly_one:`Щотижня`,weekly_few:`Кожні {{count}} тижні`,weekly_many:`Кожні {{count}} тижнів`,weekly_other:`Кожні {{count}} тижнів`,monthly_one:`Щомісяця`,monthly_few:`Кожні {{count}} місяці`,monthly_many:`Кожні {{count}} місяців`,monthly_other:`Кожні {{count}} місяців`,yearly_one:`Щороку`,yearly_few:`Кожні {{count}} роки`,yearly_many:`Кожні {{count}} років`,yearly_other:`Кожні {{count}} років`},on:`{{every}} у {{days}}`,times_one:`{{count}} раз`,times_few:`{{count}} рази`,times_many:`{{count}} разів`,times_other:`{{count}} разів`,until:`до {{date}}`}},daysShort:{mo:`Пн`,tu:`Вт`,we:`Ср`,th:`Чт`,fr:`Пт`,sa:`Сб`,su:`Нд`},daysIn:{mo:`понеділок`,tu:`вівторок`,we:`середу`,th:`четвер`,fr:`п'ятницю`,sa:`суботу`,su:`неділю`},days:{mo:`Понеділок`,tu:`Вівторок`,we:`Середа`,th:`Четвер`,fr:`П'ятниця`,sa:`Субота`,su:`Неділя`}}},ru:{calendar:{library:{label:`Календарь`},entry:{label:`Календарь`,fields:{summary:`Название`,description:`Описание`,when:`Когда`,allDay:`Весь день`,location:`Место`,recurrence:`Повторение`,exdates:`Пропущенные даты`,master:`Серия`,recurrenceId:`Заменяет экземпляр`,status:`Статус`,uid:`Идентификатор синхронизации`,ics:`Данные клиента`,tags:`Теги`,notes:`Заметки`},options:{type:{event:`Событие`,task:`Задача`},status:{tentative:`Предварительно`,confirmed:`Подтверждено`,needs_action:`Нужно сделать`,in_process:`В процессе`,completed:`Выполнено`,cancelled:`Отменено`}}},task_details:{label:`Задача`,fields:{priority:`Приоритет`,percent:`Прогресс`,completed:`Выполнено в`}},validation:{rrule:`Некорректное правило повторения`},view:{today:`Сегодня`,prev:`Предыдущий месяц`,next:`Следующий месяц`,more:`+{{count}}`,withoutDate:`Без даты`,allDay:`весь день`},recurrence:{never:`Не повторяется`,freq:`Повторять`,daily:`Ежедневно`,weekly:`Еженедельно`,monthly:`Ежемесячно`,yearly:`Ежегодно`,interval:`Каждые`,ends:`Заканчивается`,endsNever:`Никогда`,endsAfter:`После`,endsOn:`В дату`,times:`раз`,raw:`Правило (RRULE)`,exceptions:`Исключения`,sentence:{every:{daily_one:`Каждый день`,daily_few:`Каждые {{count}} дня`,daily_many:`Каждые {{count}} дней`,daily_other:`Каждые {{count}} дней`,weekly_one:`Каждую неделю`,weekly_few:`Каждые {{count}} недели`,weekly_many:`Каждые {{count}} недель`,weekly_other:`Каждые {{count}} недель`,monthly_one:`Каждый месяц`,monthly_few:`Каждые {{count}} месяца`,monthly_many:`Каждые {{count}} месяцев`,monthly_other:`Каждые {{count}} месяцев`,yearly_one:`Каждый год`,yearly_few:`Каждые {{count}} года`,yearly_many:`Каждые {{count}} лет`,yearly_other:`Каждые {{count}} лет`},on:`{{every}} в {{days}}`,times_one:`{{count}} раз`,times_few:`{{count}} раза`,times_many:`{{count}} раз`,times_other:`{{count}} раз`,until:`до {{date}}`}},daysShort:{mo:`Пн`,tu:`Вт`,we:`Ср`,th:`Чт`,fr:`Пт`,sa:`Сб`,su:`Вс`},daysIn:{mo:`понедельник`,tu:`вторник`,we:`среду`,th:`четверг`,fr:`пятницу`,sa:`субботу`,su:`воскресенье`},days:{mo:`Понедельник`,tu:`Вторник`,we:`Среда`,th:`Четверг`,fr:`Пятница`,sa:`Суббота`,su:`Воскресенье`}}},en:{calendar:{library:{label:`Calendar`},entry:{label:`Calendar`,fields:{summary:`Title`,description:`Description`,when:`When`,allDay:`All day`,location:`Location`,recurrence:`Repeats`,exdates:`Skipped dates`,master:`Series`,recurrenceId:`Replaces the instance of`,status:`Status`,uid:`Sync id`,ics:`Client data`,tags:`Tags`,notes:`Notes`},options:{type:{event:`Event`,task:`Task`},status:{tentative:`Tentative`,confirmed:`Confirmed`,needs_action:`To do`,in_process:`In progress`,completed:`Done`,cancelled:`Cancelled`}}},task_details:{label:`Task`,fields:{priority:`Priority`,percent:`Progress`,completed:`Completed at`}},validation:{rrule:`Not a valid repeat rule`},view:{today:`Today`,prev:`Previous month`,next:`Next month`,more:`+{{count}}`,withoutDate:`Without a date`,allDay:`all day`},recurrence:{never:`Does not repeat`,freq:`Repeat`,daily:`Daily`,weekly:`Weekly`,monthly:`Monthly`,yearly:`Yearly`,interval:`Every`,ends:`Ends`,endsNever:`Never`,endsAfter:`After`,endsOn:`On`,times:`times`,raw:`Rule (RRULE)`,exceptions:`Exceptions`,sentence:{every:{daily_one:`Every day`,daily_other:`Every {{count}} days`,weekly_one:`Every week`,weekly_other:`Every {{count}} weeks`,monthly_one:`Every month`,monthly_other:`Every {{count}} months`,yearly_one:`Every year`,yearly_other:`Every {{count}} years`},on:`{{every}} on {{days}}`,times_one:`{{count}} time`,times_other:`{{count}} times`,until:`until {{date}}`}},daysShort:{mo:`Mo`,tu:`Tu`,we:`We`,th:`Th`,fr:`Fr`,sa:`Sa`,su:`Su`},daysIn:{mo:`Monday`,tu:`Tuesday`,we:`Wednesday`,th:`Thursday`,fr:`Friday`,sa:`Saturday`,su:`Sunday`},days:{mo:`Monday`,tu:`Tuesday`,we:`Wednesday`,th:`Thursday`,fr:`Friday`,sa:`Saturday`,su:`Sunday`}}}},x=new Set([`FREQ`,`INTERVAL`,`BYDAY`,`COUNT`,`UNTIL`]);function S(e){if(!e)return null;let t=Object.fromEntries(e.split(`;`).map(e=>e.split(`=`)));if(Object.keys(t).some(e=>!x.has(e)))return null;let n=t.FREQ;if(!n||![`DAILY`,`WEEKLY`,`MONTHLY`,`YEARLY`].includes(n))return null;let r=(t.BYDAY??``).split(`,`).filter(Boolean);if(r.some(e=>!/^(MO|TU|WE|TH|FR|SA|SU)$/.test(e)))return null;let i={freq:n,interval:Number(t.INTERVAL??1),byDay:r,ends:`never`};return t.COUNT?(i.ends=`count`,i.count=Number(t.COUNT)):t.UNTIL&&(i.ends=`until`,i.until=`${t.UNTIL.slice(0,4)}-${t.UNTIL.slice(4,6)}-${t.UNTIL.slice(6,8)}`),i}function C(e){let t=[`FREQ=${e.freq}`];return e.interval>1&&t.push(`INTERVAL=${e.interval}`),e.byDay.length&&t.push(`BYDAY=${e.byDay.join(`,`)}`),e.ends===`count`&&e.count&&t.push(`COUNT=${e.count}`),e.ends===`until`&&e.until&&t.push(`UNTIL=${e.until.replace(/-/g,``)}`),t.join(`;`)}var w=a(),T=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/plugin-calendar/src/recurrence/renderer.tsx`,E=[`MO`,`TU`,`WE`,`TH`,`FR`,`SA`,`SU`],D={freq:`WEEKLY`,interval:1,byDay:[],ends:`never`};function O(){let e=new Date,t=String(e.getMonth()+1).padStart(2,`0`),n=String(e.getDate()).padStart(2,`0`);return`${e.getFullYear()}-${t}-${n}`}function k(e,t){let n=v(e);if(!n)return e;let r=t(`calendar.recurrence.sentence.every.${n.freq.toLowerCase()}`,{count:n.interval}),i=n.days.map(e=>t(`calendar.daysIn.${e.toLowerCase()}`)).join(`, `),a=[];return n.count&&a.push(t(`calendar.recurrence.sentence.times`,{count:n.count})),n.until&&a.push(t(`calendar.recurrence.sentence.until`,{date:n.until})),[i?t(`calendar.recurrence.sentence.on`,{every:r,days:i}):r,...a].join(`, `)}function A({value:e}){let{t}=n(),r=typeof e==`string`?e:``;return r?(0,w.jsxDEV)(`span`,{children:k(r,t)},void 0,!1,{fileName:T,lineNumber:47,columnNumber:10},this):(0,w.jsxDEV)(`span`,{className:`text-muted`,children:t(`calendar.recurrence.never`)},void 0,!1,{fileName:T,lineNumber:46,columnNumber:21},this)}function j({value:e,onChange:t}){let{t:r}=n(),i=typeof e==`string`?e:``,a=S(i),o=a??D,s=i===``||a!==null,c=e=>t(C(e));return(0,w.jsxDEV)(`div`,{className:`flex flex-col gap-2`,children:[(0,w.jsxDEV)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,w.jsxDEV)(`span`,{className:`w-24 text-muted`,children:r(`calendar.recurrence.freq`)},void 0,!1,{fileName:T,lineNumber:71,columnNumber:9},this),(0,w.jsxDEV)(`select`,{"aria-label":r(`calendar.recurrence.freq`),value:i?o.freq:``,disabled:!s,onChange:e=>e.target.value?c({...o,freq:e.target.value}):t(``),className:`rounded-md border border-border bg-bg px-2 py-1`,children:[(0,w.jsxDEV)(`option`,{value:``,children:r(`calendar.recurrence.never`)},void 0,!1,{fileName:T,lineNumber:81,columnNumber:11},this),[`DAILY`,`WEEKLY`,`MONTHLY`,`YEARLY`].map(e=>(0,w.jsxDEV)(`option`,{value:e,children:r(`calendar.recurrence.${e.toLowerCase()}`)},e,!1,{fileName:T,lineNumber:83,columnNumber:13},this))]},void 0,!0,{fileName:T,lineNumber:72,columnNumber:9},this)]},void 0,!0,{fileName:T,lineNumber:70,columnNumber:7},this),i&&s&&(0,w.jsxDEV)(w.Fragment,{children:[(0,w.jsxDEV)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,w.jsxDEV)(`span`,{className:`w-24 text-muted`,children:r(`calendar.recurrence.interval`)},void 0,!1,{fileName:T,lineNumber:92,columnNumber:13},this),(0,w.jsxDEV)(`input`,{type:`number`,min:1,"aria-label":r(`calendar.recurrence.interval`),value:o.interval,onChange:e=>c({...o,interval:Math.max(1,Number(e.target.value))}),className:`w-20 rounded-md border border-border bg-bg px-2 py-1`},void 0,!1,{fileName:T,lineNumber:93,columnNumber:13},this)]},void 0,!0,{fileName:T,lineNumber:91,columnNumber:11},this),o.freq===`WEEKLY`&&(0,w.jsxDEV)(`div`,{className:`flex flex-wrap gap-1`,children:E.map(e=>(0,w.jsxDEV)(`label`,{className:`cursor-pointer rounded-md border px-2 py-0.5 text-xs ${o.byDay.includes(e)?`border-accent text-accent`:`border-border text-muted`}`,children:[(0,w.jsxDEV)(`input`,{type:`checkbox`,className:`sr-only`,"aria-label":r(`calendar.days.${e.toLowerCase()}`),checked:o.byDay.includes(e),onChange:t=>c({...o,byDay:t.target.checked?E.filter(t=>t===e||o.byDay.includes(t)):o.byDay.filter(t=>t!==e)})},void 0,!1,{fileName:T,lineNumber:109,columnNumber:19},this),r(`calendar.daysShort.${e.toLowerCase()}`)]},e,!0,{fileName:T,lineNumber:105,columnNumber:17},this))},void 0,!1,{fileName:T,lineNumber:103,columnNumber:13},this),(0,w.jsxDEV)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,w.jsxDEV)(`span`,{className:`w-24 text-muted`,children:r(`calendar.recurrence.ends`)},void 0,!1,{fileName:T,lineNumber:129,columnNumber:13},this),(0,w.jsxDEV)(`select`,{"aria-label":r(`calendar.recurrence.ends`),value:o.ends,onChange:e=>{let t=e.target.value;c(t===`count`?{...o,ends:t,count:o.count??1}:t===`until`?{...o,ends:t,until:o.until??O()}:{...o,ends:t,count:void 0,until:void 0})},className:`rounded-md border border-border bg-bg px-2 py-1`,children:[(0,w.jsxDEV)(`option`,{value:`never`,children:r(`calendar.recurrence.endsNever`)},void 0,!1,{fileName:T,lineNumber:147,columnNumber:15},this),(0,w.jsxDEV)(`option`,{value:`count`,children:r(`calendar.recurrence.endsAfter`)},void 0,!1,{fileName:T,lineNumber:148,columnNumber:15},this),(0,w.jsxDEV)(`option`,{value:`until`,children:r(`calendar.recurrence.endsOn`)},void 0,!1,{fileName:T,lineNumber:149,columnNumber:15},this)]},void 0,!0,{fileName:T,lineNumber:130,columnNumber:13},this),o.ends===`count`&&(0,w.jsxDEV)(`input`,{type:`number`,min:1,"aria-label":r(`calendar.recurrence.times`),value:o.count??1,onChange:e=>c({...o,count:Math.max(1,Number(e.target.value))}),className:`w-20 rounded-md border border-border bg-bg px-2 py-1`},void 0,!1,{fileName:T,lineNumber:152,columnNumber:15},this),o.ends===`until`&&(0,w.jsxDEV)(`input`,{type:`date`,"aria-label":r(`calendar.recurrence.endsOn`),value:o.until??``,onChange:e=>c({...o,until:e.target.value}),className:`rounded-md border border-border bg-bg px-2 py-1`},void 0,!1,{fileName:T,lineNumber:162,columnNumber:15},this)]},void 0,!0,{fileName:T,lineNumber:128,columnNumber:11},this)]},void 0,!0,{fileName:T,lineNumber:90,columnNumber:9},this),(0,w.jsxDEV)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,w.jsxDEV)(`span`,{className:`w-24 text-muted`,children:r(`calendar.recurrence.raw`)},void 0,!1,{fileName:T,lineNumber:174,columnNumber:9},this),(0,w.jsxDEV)(`input`,{type:`text`,"aria-label":r(`calendar.recurrence.raw`),value:i,onChange:e=>t(e.target.value),className:`flex-1 rounded-md border border-border bg-bg px-2 py-1 font-mono text-xs`},void 0,!1,{fileName:T,lineNumber:175,columnNumber:9},this)]},void 0,!0,{fileName:T,lineNumber:173,columnNumber:7},this)]},void 0,!0,{fileName:T,lineNumber:69,columnNumber:5},this)}function M(e){return(0,w.jsxDEV)(d,{field:e.field,value:e.value,label:e.label,required:e.required,error:e.error,mode:e.mode,geom:`inline`,bare:e.bare,view:e=>(0,w.jsxDEV)(A,{value:e},void 0,!1,{fileName:T,lineNumber:198,columnNumber:20},this),edit:(e,t)=>(0,w.jsxDEV)(j,{value:e,onChange:t},void 0,!1,{fileName:T,lineNumber:199,columnNumber:30},this)},void 0,!1,{fileName:T,lineNumber:189,columnNumber:5},this)}var N={kinds:[`recurrence`],layout:`block`,editor:`own`,Page:M,Inline:({value:e})=>(0,w.jsxDEV)(A,{value:e},void 0,!1,{fileName:T,lineNumber:209,columnNumber:26},void 0)},P=e(t(),1),F=new Set([`period`,`date`,`datetime`]);function I(e,t){let n=p(e.fields);return t.filter(e=>F.has(String(n[e]?.kind)))}function L(e,t){let n=I(e,t);return n.length===1?n[0]:null}function R(e){let t=Object.entries(p(e.fields)).filter(([,e])=>e.kind===`recurrence`).map(([e])=>e);return t.length===1?t[0]:null}function z(e,t){let n=p(e.fields),r=t[0];if(!r||!n[r])return`views.list: shelf has no text field for its title (titleKey fell back to "id")`;let i=I(e,t);if(i.length===0)return`views.list contains no date, datetime or period field`;if(i.length>1)return`views.list contains multiple time fields: ${i.join(`, `)}`;let a=R(e);if(a){let e=n[a].hints;if(e.exdates&&!n[e.exdates])return`${a} declares exdates '${e.exdates}', which does not exist`;if(e.allDay&&!n[e.allDay])return`${a} declares allDay '${e.allDay}', which does not exist`;if(e.overrides){for(let[t,r]of Object.entries(e.overrides))if(!n[r])return`${a} declares overrides.${t} '${r}', which does not exist`}}return null}function B(e,t,n,r,i,a){let o=p(t.fields),s=L(t,n);if(!s)return[];let c=n[0],l=R(t),u=l?o[l].hints:{},d=(e,t)=>t&&o[t]?m(o[t],t,e):void 0,f=e=>{let t=d(e,s),n=typeof t==`string`?t:t?.from,r=typeof t==`string`?void 0:t?.until;if(!n)return null;let i=u.allDay?!!d(e,u.allDay):!n.includes(`T`),a=e=>e&&i?e.slice(0,10):e;return{kind:`event`,uid:String(e.id),start:a(n),end:a(r),allDay:i,recurrenceId:u.overrides?a(d(e,u.overrides.at)||void 0):void 0,rrule:l&&d(e,l)||void 0,exdates:((u.exdates?d(e,u.exdates):void 0)??[]).map(e=>a(e)),categories:[],raw:``,summary:String(d(e,c)??e.id)}},h=e=>!!(u.overrides&&d(e,u.overrides.master)),g=e.filter(e=>!h(e)),v=[];for(let t of g){let n=f(t);if(!n)continue;let o=(u.overrides?e.filter(e=>String(d(e,u.overrides.master))===String(t.id)):[]).map(e=>({row:e,comp:f(e)})).filter(e=>e.comp!==null);for(let e of y(n,o.map(e=>e.comp),i,a)){let n=e.recurrenceId?o.find(t=>t.comp.recurrenceId&&_(t.comp.recurrenceId)===_(e.recurrenceId))?.row??t:t;v.push({id:String(n.id),title:String(d(n,c)??n.id),start:e.start,end:e.end,allDay:e.allDay,href:`${r}/${n.id}`})}}return v.sort((e,t)=>e.start.localeCompare(t.start))}var V=e=>String(e).padStart(2,`0`),H=(e,t,n)=>`${e}-${V(t+1)}-${V(n)}`;function U(e,t){let n=t===11?{y:e+1,m:0}:{y:e,m:t+1};return{from:H(e,t,1),to:H(n.y,n.m,1)}}function W(e,t){let n=(new Date(e,t,1).getDay()+6)%7,r=new Date(e,t+1,0).getDate(),i=[];for(let a=0;a<42;a++){let o=a-n+1;i.push({date:o>=1&&o<=r?H(e,t,o):null})}return i}var G=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/plugin-calendar/src/calendar-view/month-grid.tsx`,K=3;function q({year:e,month:t,occurrences:r,selected:i,onSelectDay:a,onPick:o,compact:s}){let{t:c,i18n:l}=n(),d=new Map;for(let e of r){let t=e.start.slice(0,10);d.set(t,[...d.get(t)??[],e])}let f=Array.from({length:7},(e,t)=>new Date(2026,8,7+t).toLocaleDateString(l.language,{weekday:`short`})),p=new Date,m=`${p.getFullYear()}-${String(p.getMonth()+1).padStart(2,`0`)}-${String(p.getDate()).padStart(2,`0`)}`;return(0,w.jsxDEV)(`div`,{className:`grid grid-cols-7 gap-px rounded-lg border border-border bg-border overflow-hidden`,children:[f.map(e=>(0,w.jsxDEV)(`div`,{className:`bg-bg px-1 py-1 text-center ${u}`,children:e},e,!1,{fileName:G,lineNumber:42,columnNumber:9},this)),W(e,t).map((e,t)=>{let n=e.date?d.get(e.date)??[]:[],r=e.date===m,l=e.date===i;return(0,w.jsxDEV)(`div`,{"data-testid":`calendar-cell`,role:e.date?`button`:void 0,tabIndex:e.date?0:-1,onClick:()=>e.date&&a(e.date),className:`min-h-16 bg-bg p-1 text-xs ${e.date?`cursor-pointer hover:bg-elevated`:``} ${l?`border-l-2 border-accent`:``}`,children:[e.date&&(0,w.jsxDEV)(`div`,{className:`mb-0.5 text-right ${r?`font-semibold text-accent`:`text-muted`}`,children:Number(e.date.slice(8))},void 0,!1,{fileName:G,lineNumber:60,columnNumber:15},this),s?n.length>0&&(0,w.jsxDEV)(`div`,{className:`flex justify-center gap-0.5`,children:n.slice(0,K).map((e,t)=>(0,w.jsxDEV)(`span`,{className:`h-1.5 w-1.5 rounded-full`,style:{background:`var(--accent)`}},t,!1,{fileName:G,lineNumber:68,columnNumber:21},this))},void 0,!1,{fileName:G,lineNumber:66,columnNumber:17},this):(0,w.jsxDEV)(w.Fragment,{children:[n.slice(0,K).map((e,t)=>(0,w.jsxDEV)(`button`,{type:`button`,title:e.title,onClick:t=>{t.stopPropagation(),o(e)},className:`mb-0.5 block w-full truncate rounded border-l-2 bg-bg pl-1 text-left text-text hover:bg-elevated`,style:{borderColor:`var(--accent)`},children:[!e.allDay&&(0,w.jsxDEV)(`span`,{className:`mr-1 text-muted`,children:e.start.slice(11,16)},void 0,!1,{fileName:G,lineNumber:86,columnNumber:35},this),e.title]},t,!0,{fileName:G,lineNumber:75,columnNumber:19},this)),n.length>K&&(0,w.jsxDEV)(`div`,{className:`text-muted`,children:c(`calendar.view.more`,{count:n.length-K})},void 0,!1,{fileName:G,lineNumber:91,columnNumber:19},this)]},void 0,!0,{fileName:G,lineNumber:73,columnNumber:15},this)]},t,!0,{fileName:G,lineNumber:51,columnNumber:11},this)})]},void 0,!0,{fileName:G,lineNumber:36,columnNumber:5},this)}var J=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/plugin-calendar/src/calendar-view/calendar-view.tsx`;function Y(e){let t=/^(\d{4})-(\d{2})$/.exec(e??``);if(t)return{year:Number(t[1]),month:Number(t[2])-1};let n=new Date;return{year:n.getFullYear(),month:n.getMonth()}}var X=`mt-4 mb-1 text-sm font-semibold`;function Z(e){return e&&e[0].toLocaleUpperCase()+e.slice(1)}function Q(e){let{rows:t,shelf:a,keys:u,hrefBase:d}=e,{t:h,i18n:_}=n(),v=o(),[y,b]=r(),{year:x,month:S}=Y(y.get(`ym`)),[C,T]=(0,P.useState)(null),E=!l(`panel`,1e3),D=p(a.fields),O=L(a,u),k=U(x,S),A=(0,P.useMemo)(()=>B(t,a,u,d,k.from,k.to),[t,a,u,d,k.from,k.to]),j=(0,P.useMemo)(()=>t.filter(e=>{let t=m(D[O],O,e);return!(typeof t==`string`?t:t?.from)}),[t,D,O]),M=(0,P.useMemo)(()=>{if(!C)return[];let e=new Set(A.filter(e=>e.start.slice(0,10)===C).map(e=>e.id));return t.filter(t=>e.has(String(t.id)))},[C,A,t]),N=(e,t)=>{T(null),y.set(`ym`,`${e}-${String(t+1).padStart(2,`0`)}`),b(y,{replace:!0})},F=()=>S===0?N(x-1,11):N(x,S-1),I=()=>S===11?N(x+1,0):N(x,S+1),R=new Date(x,S,1).toLocaleDateString(_.language,{month:`long`,year:`numeric`}),z=C?Z(new Date(`${C}T00:00:00`).toLocaleDateString(_.language,{weekday:`long`,day:`numeric`,month:`long`})):``,V={...e,scrollKey:void 0,embedded:!0};return(0,w.jsxDEV)(`div`,{className:`p-4 pb-24`,children:[(0,w.jsxDEV)(`div`,{className:`mb-3 flex items-center gap-2`,children:[(0,w.jsxDEV)(g,{variant:`outline`,size:`icon`,"aria-label":h(`calendar.view.prev`),onClick:F,children:(0,w.jsxDEV)(c,{size:16},void 0,!1,{fileName:J,lineNumber:101,columnNumber:11},this)},void 0,!1,{fileName:J,lineNumber:100,columnNumber:9},this),(0,w.jsxDEV)(`h2`,{className:`min-w-40 text-center text-sm font-semibold capitalize`,children:R},void 0,!1,{fileName:J,lineNumber:103,columnNumber:9},this),(0,w.jsxDEV)(g,{variant:`outline`,size:`icon`,"aria-label":h(`calendar.view.next`),onClick:I,children:(0,w.jsxDEV)(s,{size:16},void 0,!1,{fileName:J,lineNumber:105,columnNumber:11},this)},void 0,!1,{fileName:J,lineNumber:104,columnNumber:9},this),(0,w.jsxDEV)(g,{variant:`outline`,onClick:()=>{let e=new Date;N(e.getFullYear(),e.getMonth())},children:h(`calendar.view.today`)},void 0,!1,{fileName:J,lineNumber:107,columnNumber:9},this)]},void 0,!0,{fileName:J,lineNumber:99,columnNumber:7},this),(0,w.jsxDEV)(q,{year:x,month:S,occurrences:A,selected:C,compact:E,onSelectDay:e=>T(t=>t===e?null:e),onPick:e=>v(e.href)},void 0,!1,{fileName:J,lineNumber:117,columnNumber:7},this),C&&(0,w.jsxDEV)(`section`,{children:[(0,w.jsxDEV)(`h3`,{className:X,children:z},void 0,!1,{fileName:J,lineNumber:128,columnNumber:11},this),M.length===0?(0,w.jsxDEV)(i,{to:`${d}/new`,className:`text-sm text-muted hover:text-accent`,children:h(`actions.new`)},void 0,!1,{fileName:J,lineNumber:130,columnNumber:13},this):(0,w.jsxDEV)(f,{...V,rows:M},void 0,!1,{fileName:J,lineNumber:134,columnNumber:13},this)]},void 0,!0,{fileName:J,lineNumber:127,columnNumber:9},this),j.length>0&&(0,w.jsxDEV)(`section`,{children:[(0,w.jsxDEV)(`h3`,{className:X,children:h(`calendar.view.withoutDate`)},void 0,!1,{fileName:J,lineNumber:140,columnNumber:11},this),(0,w.jsxDEV)(f,{...V,rows:j},void 0,!1,{fileName:J,lineNumber:141,columnNumber:11},this)]},void 0,!0,{fileName:J,lineNumber:139,columnNumber:9},this)]},void 0,!0,{fileName:J,lineNumber:98,columnNumber:5},this)}var $=h({translations:b,renderers:[N],listViews:[{kind:`calendar`,View:Q,check:z}]});export{$ as default};